Removed gnus-move.el and pointers to it, since it doesn't really work.
[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 @kindex M-x gnus-group-clear-data-on-native-groups
1388 @findex gnus-group-clear-data-on-native-groups
1389 You can use the @kbd{M-x gnus-group-clear-data-on-native-groups}
1390 command to clear out all data that you have on your native groups.
1391 Use with caution.
1392
1393 @kindex M-x gnus-group-clear-data
1394 @findex gnus-group-clear-data
1395 Clear the data from the current group only---nix out marks and the
1396 list of read articles (@code{gnus-group-clear-data}).
1397
1398 After changing servers, you @strong{must} move the cache hierarchy away,
1399 since the cached articles will have wrong article numbers, which will
1400 affect which articles Gnus thinks are read.
1401 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1402 to have it done automatically; for @code{gnus-group-clear-data}, you
1403 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1404 cache for all groups).
1405
1406
1407 @node Startup Files
1408 @section Startup Files
1409 @cindex startup files
1410 @cindex .newsrc
1411 @cindex .newsrc.el
1412 @cindex .newsrc.eld
1413
1414 Most common Unix news readers use a shared startup file called
1415 @file{.newsrc}.  This file contains all the information about what
1416 groups are subscribed, and which articles in these groups have been
1417 read.
1418
1419 Things got a bit more complicated with @sc{gnus}.  In addition to
1420 keeping the @file{.newsrc} file updated, it also used a file called
1421 @file{.newsrc.el} for storing all the information that didn't fit into
1422 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1423 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1424 files was the most recently saved, which enabled people to swap between
1425 @sc{gnus} and other newsreaders.
1426
1427 That was kinda silly, so Gnus went one better: In addition to the
1428 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1429 @file{.newsrc.eld}.  It will read whichever of these files that are most
1430 recent, but it will never write a @file{.newsrc.el} file.  You should
1431 never delete the @file{.newsrc.eld} file---it contains much information
1432 not stored in the @file{.newsrc} file.
1433
1434 @vindex gnus-save-newsrc-file
1435 @vindex gnus-read-newsrc-file
1436 You can turn off writing the @file{.newsrc} file by setting
1437 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1438 the file and save some space, as well as exiting from Gnus faster.
1439 However, this will make it impossible to use other newsreaders than
1440 Gnus.  But hey, who would want to, right?  Similarly, setting
1441 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1442 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1443 convenient if you use a different news reader occasionally, and you
1444 want to read a different subset of the available groups with that
1445 news reader.
1446
1447 @vindex gnus-save-killed-list
1448 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1449 will not save the list of killed groups to the startup file.  This will
1450 save both time (when starting and quitting) and space (on disk).  It
1451 will also mean that Gnus has no record of what groups are new or old,
1452 so the automatic new groups subscription methods become meaningless.
1453 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1454 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1455 Groups}).  This variable can also be a regular expression.  If that's
1456 the case, remove all groups that do not match this regexp before
1457 saving.  This can be useful in certain obscure situations that involve
1458 several servers where not all servers support @code{ask-server}.
1459
1460 @vindex gnus-startup-file
1461 @vindex gnus-backup-startup-file
1462 @vindex version-control
1463 The @code{gnus-startup-file} variable says where the startup files are.
1464 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1465 file being whatever that one is, with a @samp{.eld} appended.
1466 If you want version control for this file, set
1467 @code{gnus-backup-startup-file}.  It respects the same values as the
1468 @code{version-control} variable.
1469
1470 @vindex gnus-save-newsrc-hook
1471 @vindex gnus-save-quick-newsrc-hook
1472 @vindex gnus-save-standard-newsrc-hook
1473 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1474 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1475 saving the @file{.newsrc.eld} file, and
1476 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1477 @file{.newsrc} file.  The latter two are commonly used to turn version
1478 control on or off.  Version control is on by default when saving the
1479 startup files.  If you want to turn backup creation off, say something like:
1480
1481 @lisp
1482 (defun turn-off-backup ()
1483   (set (make-local-variable 'backup-inhibited) t))
1484
1485 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1486 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1487 @end lisp
1488
1489 @vindex gnus-init-file
1490 @vindex gnus-site-init-file
1491 When Gnus starts, it will read the @code{gnus-site-init-file}
1492 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1493 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1494 and can be used to avoid cluttering your @file{~/.emacs} and
1495 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1496 with the same names as these, but with @file{.elc} and @file{.el}
1497 suffixes.  In other words, if you have set @code{gnus-init-file} to
1498 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1499 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1500 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1501 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1502 @code{gnus-init-file}.
1503
1504
1505 @node Auto Save
1506 @section Auto Save
1507 @cindex dribble file
1508 @cindex auto-save
1509
1510 Whenever you do something that changes the Gnus data (reading articles,
1511 catching up, killing/subscribing groups), the change is added to a
1512 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1513 Emacs way.  If your Emacs should crash before you have saved the
1514 @file{.newsrc} files, all changes you have made can be recovered from
1515 this file.
1516
1517 If Gnus detects this file at startup, it will ask the user whether to
1518 read it.  The auto save file is deleted whenever the real startup file is
1519 saved.
1520
1521 @vindex gnus-use-dribble-file
1522 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1523 maintain a dribble buffer.  The default is @code{t}.
1524
1525 @vindex gnus-dribble-directory
1526 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1527 this variable is @code{nil}, which it is by default, Gnus will dribble
1528 into the directory where the @file{.newsrc} file is located.  (This is
1529 normally the user's home directory.)  The dribble file will get the same
1530 file permissions as the @file{.newsrc} file.
1531
1532 @vindex gnus-always-read-dribble-file
1533 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1534 read the dribble file on startup without querying the user.
1535
1536
1537 @node The Active File
1538 @section The Active File
1539 @cindex active file
1540 @cindex ignored groups
1541
1542 When Gnus starts, or indeed whenever it tries to determine whether new
1543 articles have arrived, it reads the active file.  This is a very large
1544 file that lists all the active groups and articles on the server.
1545
1546 @vindex gnus-ignored-newsgroups
1547 Before examining the active file, Gnus deletes all lines that match the
1548 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1549 any groups with bogus names, but you can use this variable to make Gnus
1550 ignore hierarchies you aren't ever interested in.  However, this is not
1551 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1552 Groups} for an overview of other variables that can be used instead.
1553
1554 @c This variable is
1555 @c @code{nil} by default, and will slow down active file handling somewhat
1556 @c if you set it to anything else.
1557
1558 @vindex gnus-read-active-file
1559 @c @head
1560 The active file can be rather Huge, so if you have a slow network, you
1561 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1562 reading the active file.  This variable is @code{some} by default.
1563
1564 Gnus will try to make do by getting information just on the groups that
1565 you actually subscribe to.
1566
1567 Note that if you subscribe to lots and lots of groups, setting this
1568 variable to @code{nil} will probably make Gnus slower, not faster.  At
1569 present, having this variable @code{nil} will slow Gnus down
1570 considerably, unless you read news over a 2400 baud modem.
1571
1572 This variable can also have the value @code{some}.  Gnus will then
1573 attempt to read active info only on the subscribed groups.  On some
1574 servers this is quite fast (on sparkling, brand new INN servers that
1575 support the @code{LIST ACTIVE group} command), on others this isn't fast
1576 at all.  In any case, @code{some} should be faster than @code{nil}, and
1577 is certainly faster than @code{t} over slow lines.
1578
1579 Some news servers (old versions of Leafnode and old versions of INN, for
1580 instance) do not support the @code{LIST ACTIVE group}.  For these
1581 servers, @code{nil} is probably the most efficient value for this
1582 variable.
1583
1584 If this variable is @code{nil}, Gnus will ask for group info in total
1585 lock-step, which isn't very fast.  If it is @code{some} and you use an
1586 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1587 read all the replies in one swoop.  This will normally result in better
1588 performance, but if the server does not support the aforementioned
1589 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1590
1591 If you think that starting up Gnus takes too long, try all the three
1592 different values for this variable and see what works best for you.
1593
1594 In any case, if you use @code{some} or @code{nil}, you should definitely
1595 kill all groups that you aren't interested in to speed things up.
1596
1597 Note that this variable also affects active file retrieval from
1598 secondary select methods.
1599
1600
1601 @node Startup Variables
1602 @section Startup Variables
1603
1604 @table @code
1605
1606 @item gnus-load-hook
1607 @vindex gnus-load-hook
1608 A hook run while Gnus is being loaded.  Note that this hook will
1609 normally be run just once in each Emacs session, no matter how many
1610 times you start Gnus.
1611
1612 @item gnus-before-startup-hook
1613 @vindex gnus-before-startup-hook
1614 A hook called as the first thing when Gnus is started.
1615
1616 @item gnus-startup-hook
1617 @vindex gnus-startup-hook
1618 A hook run as the very last thing after starting up Gnus
1619
1620 @item gnus-started-hook
1621 @vindex gnus-started-hook
1622 A hook that is run as the very last thing after starting up Gnus
1623 successfully.
1624
1625 @item gnus-setup-news-hook
1626 @vindex gnus-setup-news-hook
1627 A hook that is run after reading the @file{.newsrc} file(s), but before
1628 generating the group buffer.
1629
1630 @item gnus-check-bogus-newsgroups
1631 @vindex gnus-check-bogus-newsgroups
1632 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1633 startup.  A @dfn{bogus group} is a group that you have in your
1634 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1635 bogus groups can take quite a while, so to save time and resources it's
1636 best to leave this option off, and do the checking for bogus groups once
1637 in a while from the group buffer instead (@pxref{Group Maintenance}).
1638
1639 @item gnus-inhibit-startup-message
1640 @vindex gnus-inhibit-startup-message
1641 If non-@code{nil}, the startup message won't be displayed.  That way,
1642 your boss might not notice as easily that you are reading news instead
1643 of doing your job.  Note that this variable is used before
1644 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1645
1646 @item gnus-no-groups-message
1647 @vindex gnus-no-groups-message
1648 Message displayed by Gnus when no groups are available.
1649
1650 @item gnus-play-startup-jingle
1651 @vindex gnus-play-startup-jingle
1652 If non-@code{nil}, play the Gnus jingle at startup.
1653
1654 @item gnus-startup-jingle
1655 @vindex gnus-startup-jingle
1656 Jingle to be played if the above variable is non-@code{nil}.  The
1657 default is @samp{Tuxedomoon.Jingle4.au}.
1658
1659 @end table
1660
1661
1662 @node Group Buffer
1663 @chapter Group Buffer
1664 @cindex group buffer
1665
1666 @c Alex Schroeder suggests to rearrange this as follows:
1667 @c
1668 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1669 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1670 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1671 @c   7. Group Score, 8. Group Buffer Format
1672 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1673 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1674 @c <kensanata> First, "Gnus considers groups... (default 9)."
1675 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1676 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1677 @c <kensanata> Then expand the next paragraph or add some more to it.
1678 @c    This short one sentence explains levels 1 and 2, therefore I understand
1679 @c    that I should keep important news at 3 and boring news at 4.
1680 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1681 @c    Maybe keep those that you don't want to read temporarily at 6,
1682 @c    those that you never want to read at 8, those that offend your
1683 @c    human rights at 9...
1684
1685
1686 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1687 is the first buffer shown when Gnus starts, and will never be killed as
1688 long as Gnus is active.
1689
1690 @iftex
1691 @iflatex
1692 \gnusfigure{The Group Buffer}{320}{
1693 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1694 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1695 \put(120,38){\vector(1,2){10}}
1696 \put(40,60){\makebox(0,0)[r]{Mode line}}
1697 \put(40,58){\vector(1,0){30}}
1698 \put(200,28){\makebox(0,0)[t]{Native select method}}
1699 \put(200,26){\vector(-1,2){15}}
1700 }
1701 @end iflatex
1702 @end iftex
1703
1704 @menu
1705 * Group Buffer Format::         Information listed and how you can change it.
1706 * Group Maneuvering::           Commands for moving in the group buffer.
1707 * Selecting a Group::           Actually reading news.
1708 * Subscription Commands::       Unsubscribing, killing, subscribing.
1709 * Group Data::                  Changing the info for a group.
1710 * Group Levels::                Levels? What are those, then?
1711 * Group Score::                 A mechanism for finding out what groups you like.
1712 * Marking Groups::              You can mark groups for later processing.
1713 * Foreign Groups::              Creating and editing groups.
1714 * Group Parameters::            Each group may have different parameters set.
1715 * Listing Groups::              Gnus can list various subsets of the groups.
1716 * Sorting Groups::              Re-arrange the group order.
1717 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1718 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1719 * Exiting Gnus::                Stop reading news and get some work done.
1720 * Group Topics::                A folding group mode divided into topics.
1721 * Non-ASCII Group Names::       Accessing groups of non-English names.
1722 * Searching::                   Mail search engines.
1723 * Misc Group Stuff::            Other stuff that you can to do.
1724 @end menu
1725
1726
1727 @node Group Buffer Format
1728 @section Group Buffer Format
1729
1730 @menu
1731 * Group Line Specification::    Deciding how the group buffer is to look.
1732 * Group Mode Line Specification::  The group buffer mode line.
1733 * Group Highlighting::          Having nice colors in the group buffer.
1734 @end menu
1735
1736 You can customize the Group Mode tool bar, see @kbd{M-x
1737 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1738 available in Emacs.
1739
1740 The tool bar icons are now (de)activated correctly depending on the
1741 cursor position.  Therefore, moving around in the Group Buffer is
1742 slower.  You can disable this via the variable
1743 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1744 Emacs version.
1745
1746 @node Group Line Specification
1747 @subsection Group Line Specification
1748 @cindex group buffer format
1749
1750 The default format of the group buffer is nice and dull, but you can
1751 make it as exciting and ugly as you feel like.
1752
1753 Here's a couple of example group lines:
1754
1755 @example
1756      25: news.announce.newusers
1757  *    0: alt.fan.andrea-dworkin
1758 @end example
1759
1760 Quite simple, huh?
1761
1762 You can see that there are 25 unread articles in
1763 @samp{news.announce.newusers}.  There are no unread articles, but some
1764 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1765 asterisk at the beginning of the line?).
1766
1767 @vindex gnus-group-line-format
1768 You can change that format to whatever you want by fiddling with the
1769 @code{gnus-group-line-format} variable.  This variable works along the
1770 lines of a @code{format} specification, which is pretty much the same as
1771 a @code{printf} specifications, for those of you who use (feh!) C.
1772 @xref{Formatting Variables}.
1773
1774 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1775
1776 There should always be a colon on the line; the cursor always moves to
1777 the colon after performing an operation.  @xref{Positioning
1778 Point}.  Nothing else is required---not even the group name.  All
1779 displayed text is just window dressing, and is never examined by Gnus.
1780 Gnus stores all real information it needs using text properties.
1781
1782 (Note that if you make a really strange, wonderful, spreadsheet-like
1783 layout, everybody will believe you are hard at work with the accounting
1784 instead of wasting time reading news.)
1785
1786 Here's a list of all available format characters:
1787
1788 @table @samp
1789
1790 @item M
1791 An asterisk if the group only has marked articles.
1792
1793 @item S
1794 Whether the group is subscribed.
1795
1796 @item L
1797 Level of subscribedness.
1798
1799 @item N
1800 Number of unread articles.
1801
1802 @item I
1803 Number of dormant articles.
1804
1805 @item T
1806 Number of ticked articles.
1807
1808 @item R
1809 Number of read articles.
1810
1811 @item U
1812 Number of unseen articles.
1813
1814 @item t
1815 Estimated total number of articles.  (This is really @var{max-number}
1816 minus @var{min-number} plus 1.)
1817
1818 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1819 efficient access to @var{max-number} and @var{min-number} but getting
1820 the true unread message count is not possible efficiently.  For
1821 hysterical raisins, even the mail back ends, where the true number of
1822 unread messages might be available efficiently, use the same limited
1823 interface.  To remove this restriction from Gnus means that the back
1824 end interface has to be changed, which is not an easy job.
1825
1826 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1827 compaction'' which circumvents this deficiency: the idea is to
1828 renumber all articles from 1, removing all gaps between numbers, hence
1829 getting a correct total count.  Other backends may support this in the
1830 future.  In order to keep your total article count relatively up to
1831 date, you might want to compact your groups (or even directly your
1832 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1833
1834 @item y
1835 Number of unread, unticked, non-dormant articles.
1836
1837 @item i
1838 Number of ticked and dormant articles.
1839
1840 @item g
1841 Full group name.
1842
1843 @item G
1844 Group name.
1845
1846 @item C
1847 Group comment (@pxref{Group Parameters}) or group name if there is no
1848 comment element in the group parameters.
1849
1850 @item D
1851 Newsgroup description.  You need to read the group descriptions
1852 before these will appear, and to do that, you either have to set
1853 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1854 command.
1855
1856 @item o
1857 @samp{m} if moderated.
1858
1859 @item O
1860 @samp{(m)} if moderated.
1861
1862 @item s
1863 Select method.
1864
1865 @item B
1866 If the summary buffer for the group is open or not.
1867
1868 @item n
1869 Select from where.
1870
1871 @item z
1872 A string that looks like @samp{<%s:%n>} if a foreign select method is
1873 used.
1874
1875 @item P
1876 Indentation based on the level of the topic (@pxref{Group Topics}).
1877
1878 @item c
1879 @vindex gnus-group-uncollapsed-levels
1880 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1881 variable says how many levels to leave at the end of the group name.
1882 The default is 1---this will mean that group names like
1883 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1884
1885 @item m
1886 @vindex gnus-new-mail-mark
1887 @cindex %
1888 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1889 the group lately.
1890
1891 @item p
1892 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1893
1894 @item d
1895 A string that says when you last read the group (@pxref{Group
1896 Timestamp}).
1897
1898 @item F
1899 The disk space used by the articles fetched by both the cache and
1900 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1901 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1902 of %7F is sufficient for a fixed-width column.
1903
1904 @item u
1905 User defined specifier.  The next character in the format string should
1906 be a letter.  Gnus will call the function
1907 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1908 following @samp{%u}.  The function will be passed a single dummy
1909 parameter as argument.  The function should return a string, which will
1910 be inserted into the buffer just like information from any other
1911 specifier.
1912 @end table
1913
1914 @cindex *
1915 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1916 if no info is available---for instance, if it is a non-activated foreign
1917 group, or a bogus native group.
1918
1919
1920 @node Group Mode Line Specification
1921 @subsection Group Mode Line Specification
1922 @cindex group mode line
1923
1924 @vindex gnus-group-mode-line-format
1925 The mode line can be changed by setting
1926 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1927 doesn't understand that many format specifiers:
1928
1929 @table @samp
1930 @item S
1931 The native news server.
1932 @item M
1933 The native select method.
1934 @end table
1935
1936
1937 @node Group Highlighting
1938 @subsection Group Highlighting
1939 @cindex highlighting
1940 @cindex group highlighting
1941
1942 @vindex gnus-group-highlight
1943 Highlighting in the group buffer is controlled by the
1944 @code{gnus-group-highlight} variable.  This is an alist with elements
1945 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1946 something non-@code{nil}, the @var{face} will be used on the line.
1947
1948 Here's an example value for this variable that might look nice if the
1949 background is dark:
1950
1951 @lisp
1952 (cond (window-system
1953        (setq custom-background-mode 'light)
1954        (defface my-group-face-1
1955          '((t (:foreground "Red" :bold t))) "First group face")
1956        (defface my-group-face-2
1957          '((t (:foreground "DarkSeaGreen4" :bold t)))
1958          "Second group face")
1959        (defface my-group-face-3
1960          '((t (:foreground "Green4" :bold t))) "Third group face")
1961        (defface my-group-face-4
1962          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1963        (defface my-group-face-5
1964          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1965
1966 (setq gnus-group-highlight
1967       '(((> unread 200) . my-group-face-1)
1968         ((and (< level 3) (zerop unread)) . my-group-face-2)
1969         ((< level 3) . my-group-face-3)
1970         ((zerop unread) . my-group-face-4)
1971         (t . my-group-face-5)))
1972 @end lisp
1973
1974 Also @pxref{Faces and Fonts}.
1975
1976 Variables that are dynamically bound when the forms are evaluated
1977 include:
1978
1979 @table @code
1980 @item group
1981 The group name.
1982 @item unread
1983 The number of unread articles in the group.
1984 @item method
1985 The select method.
1986 @item mailp
1987 Whether the group is a mail group.
1988 @item level
1989 The level of the group.
1990 @item score
1991 The score of the group.
1992 @item ticked
1993 The number of ticked articles in the group.
1994 @item total
1995 The total number of articles in the group.  Or rather,
1996 @var{max-number} minus @var{min-number} plus one.
1997 @item topic
1998 When using the topic minor mode, this variable is bound to the current
1999 topic being inserted.
2000 @end table
2001
2002 When the forms are @code{eval}ed, point is at the beginning of the line
2003 of the group in question, so you can use many of the normal Gnus
2004 functions for snarfing info on the group.
2005
2006 @vindex gnus-group-update-hook
2007 @findex gnus-group-highlight-line
2008 @code{gnus-group-update-hook} is called when a group line is changed.
2009 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2010 calls @code{gnus-group-highlight-line} by default.
2011
2012
2013 @node Group Maneuvering
2014 @section Group Maneuvering
2015 @cindex group movement
2016
2017 All movement commands understand the numeric prefix and will behave as
2018 expected, hopefully.
2019
2020 @table @kbd
2021
2022 @item n
2023 @kindex n (Group)
2024 @findex gnus-group-next-unread-group
2025 Go to the next group that has unread articles
2026 (@code{gnus-group-next-unread-group}).
2027
2028 @item p
2029 @itemx DEL
2030 @kindex DEL (Group)
2031 @kindex p (Group)
2032 @findex gnus-group-prev-unread-group
2033 Go to the previous group that has unread articles
2034 (@code{gnus-group-prev-unread-group}).
2035
2036 @item N
2037 @kindex N (Group)
2038 @findex gnus-group-next-group
2039 Go to the next group (@code{gnus-group-next-group}).
2040
2041 @item P
2042 @kindex P (Group)
2043 @findex gnus-group-prev-group
2044 Go to the previous group (@code{gnus-group-prev-group}).
2045
2046 @item M-n
2047 @kindex M-n (Group)
2048 @findex gnus-group-next-unread-group-same-level
2049 Go to the next unread group on the same (or lower) level
2050 (@code{gnus-group-next-unread-group-same-level}).
2051
2052 @item M-p
2053 @kindex M-p (Group)
2054 @findex gnus-group-prev-unread-group-same-level
2055 Go to the previous unread group on the same (or lower) level
2056 (@code{gnus-group-prev-unread-group-same-level}).
2057 @end table
2058
2059 Three commands for jumping to groups:
2060
2061 @table @kbd
2062
2063 @item j
2064 @kindex j (Group)
2065 @findex gnus-group-jump-to-group
2066 Jump to a group (and make it visible if it isn't already)
2067 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2068 like living groups.
2069
2070 @item ,
2071 @kindex , (Group)
2072 @findex gnus-group-best-unread-group
2073 Jump to the unread group with the lowest level
2074 (@code{gnus-group-best-unread-group}).
2075
2076 @item .
2077 @kindex . (Group)
2078 @findex gnus-group-first-unread-group
2079 Jump to the first group with unread articles
2080 (@code{gnus-group-first-unread-group}).
2081 @end table
2082
2083 @vindex gnus-group-goto-unread
2084 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2085 commands will move to the next group, not the next unread group.  Even
2086 the commands that say they move to the next unread group.  The default
2087 is @code{t}.
2088
2089 @vindex gnus-summary-next-group-on-exit
2090 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2091 exited, the point in the group buffer is moved to the next unread group.
2092 Otherwise, the point is set to the group just exited.  The default is
2093 @code{t}.
2094
2095 @node Selecting a Group
2096 @section Selecting a Group
2097 @cindex group selection
2098
2099 @table @kbd
2100
2101 @item SPACE
2102 @kindex SPACE (Group)
2103 @findex gnus-group-read-group
2104 Select the current group, switch to the summary buffer and display the
2105 first unread article (@code{gnus-group-read-group}).  If there are no
2106 unread articles in the group, or if you give a non-numerical prefix to
2107 this command, Gnus will offer to fetch all the old articles in this
2108 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2109 determines the number of articles Gnus will fetch.  If @var{n} is
2110 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2111 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2112
2113 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2114 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2115 - 4 2 SPC} fetches the 42 oldest ones.
2116
2117 When you are in the group (in the Summary buffer), you can type
2118 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2119 ones.
2120
2121 @item RET
2122 @kindex RET (Group)
2123 @findex gnus-group-select-group
2124 Select the current group and switch to the summary buffer
2125 (@code{gnus-group-select-group}).  Takes the same arguments as
2126 @code{gnus-group-read-group}---the only difference is that this command
2127 does not display the first unread article automatically upon group
2128 entry.
2129
2130 @item M-RET
2131 @kindex M-RET (Group)
2132 @findex gnus-group-quick-select-group
2133 This does the same as the command above, but tries to do it with the
2134 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2135 scoring/killing will be performed, there will be no highlights and no
2136 expunging.  This might be useful if you're in a real hurry and have to
2137 enter some humongous group.  If you give a 0 prefix to this command
2138 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2139 which is useful if you want to toggle threading before generating the
2140 summary buffer (@pxref{Summary Generation Commands}).
2141
2142 @item M-SPACE
2143 @kindex M-SPACE (Group)
2144 @findex gnus-group-visible-select-group
2145 This is yet one more command that does the same as the @kbd{RET}
2146 command, but this one does it without expunging and hiding dormants
2147 (@code{gnus-group-visible-select-group}).
2148
2149 @item C-M-RET
2150 @kindex C-M-RET (Group)
2151 @findex gnus-group-select-group-ephemerally
2152 Finally, this command selects the current group ephemerally without
2153 doing any processing of its contents
2154 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2155 turned off.  Everything you do in the group after selecting it in this
2156 manner will have no permanent effects.
2157
2158 @end table
2159
2160 @vindex gnus-large-newsgroup
2161 The @code{gnus-large-newsgroup} variable says what Gnus should
2162 consider to be a big group.  If it is @code{nil}, no groups are
2163 considered big.  The default value is 200.  If the group has more
2164 (unread and/or ticked) articles than this, Gnus will query the user
2165 before entering the group.  The user can then specify how many
2166 articles should be fetched from the server.  If the user specifies a
2167 negative number (@var{-n}), the @var{n} oldest articles will be
2168 fetched.  If it is positive, the @var{n} articles that have arrived
2169 most recently will be fetched.
2170
2171 @vindex gnus-large-ephemeral-newsgroup
2172 @code{gnus-large-ephemeral-newsgroup} is the same as
2173 @code{gnus-large-newsgroup}, but is only used for ephemeral
2174 newsgroups.
2175
2176 @vindex gnus-newsgroup-maximum-articles
2177 In groups in some news servers, there might be a big gap between a few
2178 very old articles that will never be expired and the recent ones.  In
2179 such a case, the server will return the data like @code{(1 . 30000000)}
2180 for the @code{LIST ACTIVE group} command, for example.  Even if there
2181 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2182 know it at first and prepares for getting 30000000 articles.  However,
2183 it will consume hundreds megabytes of memories and might make Emacs get
2184 stuck as the case may be.  If you use such news servers, set the
2185 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2186 The value means that Gnus ignores articles other than this number of the
2187 latest ones in every group.  For instance, the value 10000 makes Gnus
2188 get only the articles 29990001-30000000 (if the latest article number is
2189 30000000 in a group).  Note that setting this variable to a number might
2190 prevent you from reading very old articles.  The default value of the
2191 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2192 means Gnus never ignores old articles.
2193
2194 @vindex gnus-select-group-hook
2195 @vindex gnus-auto-select-first
2196 @vindex gnus-auto-select-subject
2197 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2198 automatically when entering a group with the @kbd{SPACE} command.
2199 Which article this is controlled by the
2200 @code{gnus-auto-select-subject} variable.  Valid values for this
2201 variable are:
2202
2203 @table @code
2204
2205 @item unread
2206 Place point on the subject line of the first unread article.
2207
2208 @item first
2209 Place point on the subject line of the first article.
2210
2211 @item unseen
2212 Place point on the subject line of the first unseen article.
2213
2214 @item unseen-or-unread
2215 Place point on the subject line of the first unseen article, and if
2216 there is no such article, place point on the subject line of the first
2217 unread article.
2218
2219 @item best
2220 Place point on the subject line of the highest-scored unread article.
2221
2222 @end table
2223
2224 This variable can also be a function.  In that case, that function
2225 will be called to place point on a subject line.
2226
2227 If you want to prevent automatic selection in some group (say, in a
2228 binary group with Huge articles) you can set the
2229 @code{gnus-auto-select-first} variable to @code{nil} in
2230 @code{gnus-select-group-hook}, which is called when a group is
2231 selected.
2232
2233
2234 @node Subscription Commands
2235 @section Subscription Commands
2236 @cindex subscription
2237
2238 @table @kbd
2239
2240 @item S t
2241 @itemx u
2242 @kindex S t (Group)
2243 @kindex u (Group)
2244 @findex gnus-group-unsubscribe-current-group
2245 @c @icon{gnus-group-unsubscribe}
2246 Toggle subscription to the current group
2247 (@code{gnus-group-unsubscribe-current-group}).
2248
2249 @item S s
2250 @itemx U
2251 @kindex S s (Group)
2252 @kindex U (Group)
2253 @findex gnus-group-unsubscribe-group
2254 Prompt for a group to subscribe, and then subscribe it.  If it was
2255 subscribed already, unsubscribe it instead
2256 (@code{gnus-group-unsubscribe-group}).
2257
2258 @item S k
2259 @itemx C-k
2260 @kindex S k (Group)
2261 @kindex C-k (Group)
2262 @findex gnus-group-kill-group
2263 @c @icon{gnus-group-kill-group}
2264 Kill the current group (@code{gnus-group-kill-group}).
2265
2266 @item S y
2267 @itemx C-y
2268 @kindex S y (Group)
2269 @kindex C-y (Group)
2270 @findex gnus-group-yank-group
2271 Yank the last killed group (@code{gnus-group-yank-group}).
2272
2273 @item C-x C-t
2274 @kindex C-x C-t (Group)
2275 @findex gnus-group-transpose-groups
2276 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2277 really a subscription command, but you can use it instead of a
2278 kill-and-yank sequence sometimes.
2279
2280 @item S w
2281 @itemx C-w
2282 @kindex S w (Group)
2283 @kindex C-w (Group)
2284 @findex gnus-group-kill-region
2285 Kill all groups in the region (@code{gnus-group-kill-region}).
2286
2287 @item S z
2288 @kindex S z (Group)
2289 @findex gnus-group-kill-all-zombies
2290 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2291
2292 @item S C-k
2293 @kindex S C-k (Group)
2294 @findex gnus-group-kill-level
2295 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2296 These groups can't be yanked back after killing, so this command should
2297 be used with some caution.  The only time where this command comes in
2298 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2299 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2300 kill off all unsubscribed groups that do not have message numbers in the
2301 @file{.newsrc} file.
2302
2303 @end table
2304
2305 Also @pxref{Group Levels}.
2306
2307
2308 @node Group Data
2309 @section Group Data
2310
2311 @table @kbd
2312
2313 @item c
2314 @kindex c (Group)
2315 @findex gnus-group-catchup-current
2316 @vindex gnus-group-catchup-group-hook
2317 @c @icon{gnus-group-catchup-current}
2318 Mark all unticked articles in this group as read
2319 (@code{gnus-group-catchup-current}).
2320 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2321 the group buffer.
2322
2323 @item C
2324 @kindex C (Group)
2325 @findex gnus-group-catchup-current-all
2326 Mark all articles in this group, even the ticked ones, as read
2327 (@code{gnus-group-catchup-current-all}).
2328
2329 @item M-c
2330 @kindex M-c (Group)
2331 @findex gnus-group-clear-data
2332 Clear the data from the current group---nix out marks and the list of
2333 read articles (@code{gnus-group-clear-data}).
2334
2335 @item M-x gnus-group-clear-data-on-native-groups
2336 @kindex M-x gnus-group-clear-data-on-native-groups
2337 @findex gnus-group-clear-data-on-native-groups
2338 If you have switched from one @acronym{NNTP} server to another, all your marks
2339 and read ranges have become worthless.  You can use this command to
2340 clear out all data that you have on your native groups.  Use with
2341 caution.
2342
2343 @end table
2344
2345
2346 @node Group Levels
2347 @section Group Levels
2348 @cindex group level
2349 @cindex level
2350
2351 All groups have a level of @dfn{subscribedness}.  For instance, if a
2352 group is on level 2, it is more subscribed than a group on level 5.  You
2353 can ask Gnus to just list groups on a given level or lower
2354 (@pxref{Listing Groups}), or to just check for new articles in groups on
2355 a given level or lower (@pxref{Scanning New Messages}).
2356
2357 Remember:  The higher the level of the group, the less important it is.
2358
2359 @table @kbd
2360
2361 @item S l
2362 @kindex S l (Group)
2363 @findex gnus-group-set-current-level
2364 Set the level of the current group.  If a numeric prefix is given, the
2365 next @var{n} groups will have their levels set.  The user will be
2366 prompted for a level.
2367 @end table
2368
2369 @vindex gnus-level-killed
2370 @vindex gnus-level-zombie
2371 @vindex gnus-level-unsubscribed
2372 @vindex gnus-level-subscribed
2373 Gnus considers groups from levels 1 to
2374 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2375 @code{gnus-level-subscribed} (exclusive) and
2376 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2377 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2378 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2379 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2380 same, but zombie and killed groups have no information on what articles
2381 you have read, etc, stored.  This distinction between dead and living
2382 groups isn't done because it is nice or clever, it is done purely for
2383 reasons of efficiency.
2384
2385 It is recommended that you keep all your mail groups (if any) on quite
2386 low levels (e.g. 1 or 2).
2387
2388 Maybe the following description of the default behavior of Gnus helps to
2389 understand what these levels are all about.  By default, Gnus shows you
2390 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2391 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2392 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2393 groups are hidden, in a way.
2394
2395 Zombie and killed groups are similar to unsubscribed groups in that they
2396 are hidden by default.  But they are different from subscribed and
2397 unsubscribed groups in that Gnus doesn't ask the news server for
2398 information (number of messages, number of unread messages) on zombie
2399 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2400 aren't interested in.  If most groups are killed, Gnus is faster.
2401
2402 Why does Gnus distinguish between zombie and killed groups?  Well, when
2403 a new group arrives on the server, Gnus by default makes it a zombie
2404 group.  This means that you are normally not bothered with new groups,
2405 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2406 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2407 list of killed groups.)
2408
2409 If you want to play with the level variables, you should show some care.
2410 Set them once, and don't touch them ever again.  Better yet, don't touch
2411 them at all unless you know exactly what you're doing.
2412
2413 @vindex gnus-level-default-unsubscribed
2414 @vindex gnus-level-default-subscribed
2415 Two closely related variables are @code{gnus-level-default-subscribed}
2416 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2417 which are the levels that new groups will be put on if they are
2418 (un)subscribed.  These two variables should, of course, be inside the
2419 relevant valid ranges.
2420
2421 @vindex gnus-keep-same-level
2422 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2423 will only move to groups of the same level (or lower).  In
2424 particular, going from the last article in one group to the next group
2425 will go to the next group of the same level (or lower).  This might be
2426 handy if you want to read the most important groups before you read the
2427 rest.
2428
2429 If this variable is @code{best}, Gnus will make the next newsgroup the
2430 one with the best level.
2431
2432 @vindex gnus-group-default-list-level
2433 All groups with a level less than or equal to
2434 @code{gnus-group-default-list-level} will be listed in the group buffer
2435 by default.
2436
2437 @vindex gnus-group-list-inactive-groups
2438 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2439 groups will be listed along with the unread groups.  This variable is
2440 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2441 listed.
2442
2443 @vindex gnus-group-use-permanent-levels
2444 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2445 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2446 use this level as the ``work'' level.
2447
2448 @vindex gnus-activate-level
2449 Gnus will normally just activate (i. e., query the server about) groups
2450 on level @code{gnus-activate-level} or less.  If you don't want to
2451 activate unsubscribed groups, for instance, you might set this variable
2452 to 5.  The default is 6.
2453
2454
2455 @node Group Score
2456 @section Group Score
2457 @cindex group score
2458 @cindex group rank
2459 @cindex rank
2460
2461 You would normally keep important groups on high levels, but that scheme
2462 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2463 group buffer according to how often you read groups, perhaps?  Within
2464 reason?
2465
2466 This is what @dfn{group score} is for.  You can have Gnus assign a score
2467 to each group through the mechanism described below.  You can then sort
2468 the group buffer based on this score.  Alternatively, you can sort on
2469 score and then level.  (Taken together, the level and the score is
2470 called the @dfn{rank} of the group.  A group that is on level 4 and has
2471 a score of 1 has a higher rank than a group on level 5 that has a score
2472 of 300.  (The level is the most significant part and the score is the
2473 least significant part.))
2474
2475 @findex gnus-summary-bubble-group
2476 If you want groups you read often to get higher scores than groups you
2477 read seldom you can add the @code{gnus-summary-bubble-group} function to
2478 the @code{gnus-summary-exit-hook} hook.  This will result (after
2479 sorting) in a bubbling sort of action.  If you want to see that in
2480 action after each summary exit, you can add
2481 @code{gnus-group-sort-groups-by-rank} or
2482 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2483 slow things down somewhat.
2484
2485
2486 @node Marking Groups
2487 @section Marking Groups
2488 @cindex marking groups
2489
2490 If you want to perform some command on several groups, and they appear
2491 subsequently in the group buffer, you would normally just give a
2492 numerical prefix to the command.  Most group commands will then do your
2493 bidding on those groups.
2494
2495 However, if the groups are not in sequential order, you can still
2496 perform a command on several groups.  You simply mark the groups first
2497 with the process mark and then execute the command.
2498
2499 @table @kbd
2500
2501 @item #
2502 @kindex # (Group)
2503 @itemx M m
2504 @kindex M m (Group)
2505 @findex gnus-group-mark-group
2506 Set the mark on the current group (@code{gnus-group-mark-group}).
2507
2508 @item M-#
2509 @kindex M-# (Group)
2510 @itemx M u
2511 @kindex M u (Group)
2512 @findex gnus-group-unmark-group
2513 Remove the mark from the current group
2514 (@code{gnus-group-unmark-group}).
2515
2516 @item M U
2517 @kindex M U (Group)
2518 @findex gnus-group-unmark-all-groups
2519 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2520
2521 @item M w
2522 @kindex M w (Group)
2523 @findex gnus-group-mark-region
2524 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2525
2526 @item M b
2527 @kindex M b (Group)
2528 @findex gnus-group-mark-buffer
2529 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2530
2531 @item M r
2532 @kindex M r (Group)
2533 @findex gnus-group-mark-regexp
2534 Mark all groups that match some regular expression
2535 (@code{gnus-group-mark-regexp}).
2536 @end table
2537
2538 Also @pxref{Process/Prefix}.
2539
2540 @findex gnus-group-universal-argument
2541 If you want to execute some command on all groups that have been marked
2542 with the process mark, you can use the @kbd{M-&}
2543 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2544 the command to be executed.
2545
2546
2547 @node Foreign Groups
2548 @section Foreign Groups
2549 @cindex foreign groups
2550
2551 Below are some group mode commands for making and editing general foreign
2552 groups, as well as commands to ease the creation of a few
2553 special-purpose groups.  All these commands insert the newly created
2554 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2555 consulted.
2556
2557 Changes from the group editing commands are stored in
2558 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2559 variable @code{gnus-parameters}, @xref{Group Parameters}.
2560
2561 @table @kbd
2562
2563 @item G m
2564 @kindex G m (Group)
2565 @findex gnus-group-make-group
2566 @cindex making groups
2567 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2568 for a name, a method and possibly an @dfn{address}.  For an easier way
2569 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2570
2571 @item G M
2572 @kindex G M (Group)
2573 @findex gnus-group-read-ephemeral-group
2574 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2575 will prompt you for a name, a method and an @dfn{address}.
2576
2577 @item G r
2578 @kindex G r (Group)
2579 @findex gnus-group-rename-group
2580 @cindex renaming groups
2581 Rename the current group to something else
2582 (@code{gnus-group-rename-group}).  This is valid only on some
2583 groups---mail groups mostly.  This command might very well be quite slow
2584 on some back ends.
2585
2586 @item G c
2587 @kindex G c (Group)
2588 @cindex customizing
2589 @findex gnus-group-customize
2590 Customize the group parameters (@code{gnus-group-customize}).
2591
2592 @item G e
2593 @kindex G e (Group)
2594 @findex gnus-group-edit-group-method
2595 @cindex renaming groups
2596 Enter a buffer where you can edit the select method of the current
2597 group (@code{gnus-group-edit-group-method}).
2598
2599 @item G p
2600 @kindex G p (Group)
2601 @findex gnus-group-edit-group-parameters
2602 Enter a buffer where you can edit the group parameters
2603 (@code{gnus-group-edit-group-parameters}).
2604
2605 @item G E
2606 @kindex G E (Group)
2607 @findex gnus-group-edit-group
2608 Enter a buffer where you can edit the group info
2609 (@code{gnus-group-edit-group}).
2610
2611 @item G d
2612 @kindex G d (Group)
2613 @findex gnus-group-make-directory-group
2614 @cindex nndir
2615 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2616 for a directory name (@code{gnus-group-make-directory-group}).
2617
2618 @item G h
2619 @kindex G h (Group)
2620 @cindex help group
2621 @findex gnus-group-make-help-group
2622 Make the Gnus help group (@code{gnus-group-make-help-group}).
2623
2624 @item G a
2625 @kindex G a (Group)
2626 @cindex (ding) archive
2627 @cindex archive group
2628 @findex gnus-group-make-archive-group
2629 @vindex gnus-group-archive-directory
2630 @vindex gnus-group-recent-archive-directory
2631 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2632 default a group pointing to the most recent articles will be created
2633 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2634 group will be created from @code{gnus-group-archive-directory}.
2635
2636 @item G k
2637 @kindex G k (Group)
2638 @findex gnus-group-make-kiboze-group
2639 @cindex nnkiboze
2640 Make a kiboze group.  You will be prompted for a name, for a regexp to
2641 match groups to be ``included'' in the kiboze group, and a series of
2642 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2643 @xref{Kibozed Groups}.
2644
2645 @item G D
2646 @kindex G D (Group)
2647 @findex gnus-group-enter-directory
2648 @cindex nneething
2649 Read an arbitrary directory as if it were a newsgroup with the
2650 @code{nneething} back end (@code{gnus-group-enter-directory}).
2651 @xref{Anything Groups}.
2652
2653 @item G f
2654 @kindex G f (Group)
2655 @findex gnus-group-make-doc-group
2656 @cindex ClariNet Briefs
2657 @cindex nndoc
2658 Make a group based on some file or other
2659 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2660 command, you will be prompted for a file name and a file type.
2661 Currently supported types are @code{mbox}, @code{babyl},
2662 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2663 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2664 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2665 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2666 you run this command without a prefix, Gnus will guess at the file
2667 type.  @xref{Document Groups}.
2668
2669 @item G u
2670 @kindex G u (Group)
2671 @vindex gnus-useful-groups
2672 @findex gnus-group-make-useful-group
2673 Create one of the groups mentioned in @code{gnus-useful-groups}
2674 (@code{gnus-group-make-useful-group}).
2675
2676 @item G w
2677 @kindex G w (Group)
2678 @findex gnus-group-make-web-group
2679 @cindex Google
2680 @cindex nnweb
2681 @cindex gmane
2682 Make an ephemeral group based on a web search
2683 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2684 command, make a solid group instead.  You will be prompted for the
2685 search engine type and the search string.  Valid search engine types
2686 include @code{google}, @code{dejanews}, and @code{gmane}.
2687 @xref{Web Searches}.
2688
2689 If you use the @code{google} search engine, you can limit the search
2690 to a particular group by using a match string like
2691 @samp{shaving group:alt.sysadmin.recovery}.
2692
2693 @item G R
2694 @kindex G R (Group)
2695 @findex gnus-group-make-rss-group
2696 Make a group based on an @acronym{RSS} feed
2697 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2698 @xref{RSS}.
2699
2700 @item G DEL
2701 @kindex G DEL (Group)
2702 @findex gnus-group-delete-group
2703 This function will delete the current group
2704 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2705 actually delete all the articles in the group, and forcibly remove the
2706 group itself from the face of the Earth.  Use a prefix only if you are
2707 absolutely sure of what you are doing.  This command can't be used on
2708 read-only groups (like @code{nntp} groups), though.
2709
2710 @item G V
2711 @kindex G V (Group)
2712 @findex gnus-group-make-empty-virtual
2713 Make a new, fresh, empty @code{nnvirtual} group
2714 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2715
2716 @item G v
2717 @kindex G v (Group)
2718 @findex gnus-group-add-to-virtual
2719 Add the current group to an @code{nnvirtual} group
2720 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2721 @end table
2722
2723 @xref{Select Methods}, for more information on the various select
2724 methods.
2725
2726 @vindex gnus-activate-foreign-newsgroups
2727 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2728 Gnus will check all foreign groups with this level or lower at startup.
2729 This might take quite a while, especially if you subscribe to lots of
2730 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2731 @code{gnus-activate-level} also affects activation of foreign
2732 newsgroups.
2733
2734
2735 The following commands create ephemeral groups.  They can be called not
2736 only from the Group buffer, but in any Gnus buffer.
2737
2738 @table @code
2739 @item gnus-read-ephemeral-gmane-group
2740 @findex gnus-read-ephemeral-gmane-group
2741 @vindex gnus-gmane-group-download-format
2742 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2743 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2744 Gnus will prompt you for a group name, the start article number and an
2745 the article range.
2746
2747 @item gnus-read-ephemeral-gmane-group-url
2748 @findex gnus-read-ephemeral-gmane-group-url
2749 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2750 the group name and the article number and range are constructed from a
2751 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2752 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2753 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2754 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2755 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2756 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2757
2758 @item gnus-read-ephemeral-emacs-bug-group
2759 @findex gnus-read-ephemeral-emacs-bug-group
2760 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2761 bug number.  The default is the number at point.  The @acronym{URL} is
2762 specified in @code{gnus-bug-group-download-format-alist}.
2763
2764 @item gnus-read-ephemeral-debian-bug-group
2765 @findex gnus-read-ephemeral-debian-bug-group
2766 Read a Debian bug report in an ephemeral group.  Analog to
2767 @code{gnus-read-ephemeral-emacs-bug-group}.
2768 @end table
2769
2770 Some of these command are also useful for article buttons, @xref{Article
2771 Buttons}.
2772
2773 Here is an example:
2774 @lisp
2775 (require 'gnus-art)
2776 (add-to-list
2777  'gnus-button-alist
2778  '("#\\([0-9]+\\)\\>" 1
2779    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2780    gnus-read-ephemeral-emacs-bug-group 1))
2781 @end lisp
2782
2783
2784 @node Group Parameters
2785 @section Group Parameters
2786 @cindex group parameters
2787
2788 The group parameters store information local to a particular group.
2789
2790 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2791 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2792 presents you with a Customize-like interface.  The latter helps avoid
2793 silly Lisp errors.)  You might also be interested in reading about topic
2794 parameters (@pxref{Topic Parameters}).
2795 Additionally, you can set group parameters via the
2796 @code{gnus-parameters} variable, see below.
2797
2798 Here's an example group parameter list:
2799
2800 @example
2801 ((to-address . "ding@@gnus.org")
2802  (auto-expire . t))
2803 @end example
2804
2805 We see that each element consists of a ``dotted pair''---the thing before
2806 the dot is the key, while the thing after the dot is the value.  All the
2807 parameters have this form @emph{except} local variable specs, which are
2808 not dotted pairs, but proper lists.
2809
2810 Some parameters have correspondent customizable variables, each of which
2811 is an alist of regexps and values.
2812
2813 The following group parameters can be used:
2814
2815 @table @code
2816 @item to-address
2817 @cindex to-address
2818 Address used by when doing followups and new posts.
2819
2820 @example
2821 (to-address . "some@@where.com")
2822 @end example
2823
2824 This is primarily useful in mail groups that represent closed mailing
2825 lists---mailing lists where it's expected that everybody that writes to
2826 the mailing list is subscribed to it.  Since using this parameter
2827 ensures that the mail only goes to the mailing list itself, it means
2828 that members won't receive two copies of your followups.
2829
2830 Using @code{to-address} will actually work whether the group is foreign
2831 or not.  Let's say there's a group on the server that is called
2832 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2833 the articles from a mail-to-news gateway.  Posting directly to this
2834 group is therefore impossible---you have to send mail to the mailing
2835 list address instead.
2836
2837 See also @code{gnus-parameter-to-address-alist}.
2838
2839 @item to-list
2840 @cindex to-list
2841 Address used when doing @kbd{a} in that group.
2842
2843 @example
2844 (to-list . "some@@where.com")
2845 @end example
2846
2847 It is totally ignored
2848 when doing a followup---except that if it is present in a news group,
2849 you'll get mail group semantics when doing @kbd{f}.
2850
2851 If you do an @kbd{a} command in a mail group and you have neither a
2852 @code{to-list} group parameter nor a @code{to-address} group parameter,
2853 then a @code{to-list} group parameter will be added automatically upon
2854 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2855 @vindex gnus-add-to-list
2856
2857 @findex gnus-mailing-list-mode
2858 @cindex mail list groups
2859 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2860 entering summary buffer.
2861
2862 See also @code{gnus-parameter-to-list-alist}.
2863
2864 @anchor{subscribed}
2865 @item subscribed
2866 @cindex subscribed
2867 @cindex Mail-Followup-To
2868 @findex gnus-find-subscribed-addresses
2869 If this parameter is set to @code{t}, Gnus will consider the
2870 to-address and to-list parameters for this group as addresses of
2871 mailing lists you are subscribed to.  Giving Gnus this information is
2872 (only) a first step in getting it to generate correct Mail-Followup-To
2873 headers for your posts to these lists.  The second step is to put the
2874 following in your @file{.gnus.el}
2875
2876 @lisp
2877 (setq message-subscribed-address-functions
2878       '(gnus-find-subscribed-addresses))
2879 @end lisp
2880
2881 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2882 a complete treatment of available MFT support.
2883
2884 @item visible
2885 @cindex visible
2886 If the group parameter list has the element @code{(visible . t)},
2887 that group will always be visible in the Group buffer, regardless
2888 of whether it has any unread articles.
2889
2890 This parameter cannot be set via @code{gnus-parameters}. See
2891 @code{gnus-permanently-visible-groups} as an alternative.
2892
2893 @item broken-reply-to
2894 @cindex broken-reply-to
2895 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2896 headers in this group are to be ignored, and for the header to be hidden
2897 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2898 can be useful if you're reading a mailing list group where the listserv
2899 has inserted @code{Reply-To} headers that point back to the listserv
2900 itself.  That is broken behavior.  So there!
2901
2902 @item to-group
2903 @cindex to-group
2904 Elements like @code{(to-group . "some.group.name")} means that all
2905 posts in that group will be sent to @code{some.group.name}.
2906
2907 @item newsgroup
2908 @cindex newsgroup
2909 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2910 will treat all responses as if they were responses to news articles.
2911 This can be useful if you have a mail group that's really a mirror of a
2912 news group.
2913
2914 @item gcc-self
2915 @cindex gcc-self
2916 If @code{(gcc-self . t)} is present in the group parameter list, newly
2917 composed messages will be @code{Gcc}'d to the current group.  If
2918 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2919 generated, if @code{(gcc-self . "string")} is present, this string will
2920 be inserted literally as a @code{gcc} header.  This parameter takes
2921 precedence over any default @code{Gcc} rules as described later
2922 (@pxref{Archived Messages}).
2923
2924 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2925 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2926 doesn't accept articles.
2927
2928 @item auto-expire
2929 @cindex auto-expire
2930 @cindex expiring mail
2931 If the group parameter has an element that looks like @code{(auto-expire
2932 . t)}, all articles read will be marked as expirable.  For an
2933 alternative approach, @pxref{Expiring Mail}.
2934
2935 See also @code{gnus-auto-expirable-newsgroups}.
2936
2937 @item total-expire
2938 @cindex total-expire
2939 @cindex expiring mail
2940 If the group parameter has an element that looks like
2941 @code{(total-expire . t)}, all read articles will be put through the
2942 expiry process, even if they are not marked as expirable.  Use with
2943 caution.  Unread, ticked and dormant articles are not eligible for
2944 expiry.
2945
2946 See also @code{gnus-total-expirable-newsgroups}.
2947
2948 @item expiry-wait
2949 @cindex expiry-wait
2950 @vindex nnmail-expiry-wait-function
2951 If the group parameter has an element that looks like
2952 @code{(expiry-wait . 10)}, this value will override any
2953 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2954 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2955 can either be a number of days (not necessarily an integer) or the
2956 symbols @code{never} or @code{immediate}.
2957
2958 @item expiry-target
2959 @cindex expiry-target
2960 Where expired messages end up.  This parameter overrides
2961 @code{nnmail-expiry-target}.
2962
2963 @item score-file
2964 @cindex score file group parameter
2965 Elements that look like @code{(score-file . "file")} will make
2966 @file{file} into the current score file for the group in question.  All
2967 interactive score entries will be put into this file.
2968
2969 @item adapt-file
2970 @cindex adapt file group parameter
2971 Elements that look like @code{(adapt-file . "file")} will make
2972 @file{file} into the current adaptive file for the group in question.
2973 All adaptive score entries will be put into this file.
2974
2975 @item admin-address
2976 @cindex admin-address
2977 When unsubscribing from a mailing list you should never send the
2978 unsubscription notice to the mailing list itself.  Instead, you'd send
2979 messages to the administrative address.  This parameter allows you to
2980 put the admin address somewhere convenient.
2981
2982 @item display
2983 @cindex display
2984 Elements that look like @code{(display . MODE)} say which articles to
2985 display on entering the group.  Valid values are:
2986
2987 @table @code
2988 @item all
2989 Display all articles, both read and unread.
2990
2991 @item an integer
2992 Display the last @var{integer} articles in the group.  This is the same as
2993 entering the group with @kbd{C-u @var{integer}}.
2994
2995 @item default
2996 Display the default visible articles, which normally includes unread and
2997 ticked articles.
2998
2999 @item an array
3000 Display articles that satisfy a predicate.
3001
3002 Here are some examples:
3003
3004 @table @code
3005 @item [unread]
3006 Display only unread articles.
3007
3008 @item [not expire]
3009 Display everything except expirable articles.
3010
3011 @item [and (not reply) (not expire)]
3012 Display everything except expirable and articles you've already
3013 responded to.
3014 @end table
3015
3016 The available operators are @code{not}, @code{and} and @code{or}.
3017 Predicates include @code{tick}, @code{unsend}, @code{undownload},
3018 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3019 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3020 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3021
3022 @end table
3023
3024 The @code{display} parameter works by limiting the summary buffer to
3025 the subset specified.  You can pop the limit by using the @kbd{/ w}
3026 command (@pxref{Limiting}).
3027
3028 @item comment
3029 @cindex comment
3030 Elements that look like @code{(comment . "This is a comment")} are
3031 arbitrary comments on the group.  You can display comments in the
3032 group line (@pxref{Group Line Specification}).
3033
3034 @item charset
3035 @cindex charset
3036 Elements that look like @code{(charset . iso-8859-1)} will make
3037 @code{iso-8859-1} the default charset; that is, the charset that will be
3038 used for all articles that do not specify a charset.
3039
3040 See also @code{gnus-group-charset-alist}.
3041
3042 @item ignored-charsets
3043 @cindex ignored-charset
3044 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3045 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3046 default charset will be used for decoding articles.
3047
3048 See also @code{gnus-group-ignored-charsets-alist}.
3049
3050 @item posting-style
3051 @cindex posting-style
3052 You can store additional posting style information for this group
3053 here (@pxref{Posting Styles}).  The format is that of an entry in the
3054 @code{gnus-posting-styles} alist, except that there's no regexp matching
3055 the group name (of course).  Style elements in this group parameter will
3056 take precedence over the ones found in @code{gnus-posting-styles}.
3057
3058 For instance, if you want a funky name and signature in this group only,
3059 instead of hacking @code{gnus-posting-styles}, you could put something
3060 like this in the group parameters:
3061
3062 @example
3063 (posting-style
3064   (name "Funky Name")
3065   ("X-My-Header" "Funky Value")
3066   (signature "Funky Signature"))
3067 @end example
3068
3069 If you're using topics to organize your group buffer
3070 (@pxref{Group Topics}), note that posting styles can also be set in
3071 the topics parameters. Posting styles in topic parameters apply to all
3072 groups in this topic. More precisely, the posting-style settings for a
3073 group result from the hierarchical merging of all posting-style
3074 entries in the parameters of this group and all the topics it belongs
3075 to.
3076
3077
3078 @item post-method
3079 @cindex post-method
3080 If it is set, the value is used as the method for posting message
3081 instead of @code{gnus-post-method}.
3082
3083 @item mail-source
3084 @cindex mail-source
3085 If it is set, and the setting of @code{mail-sources} includes a
3086 @code{group} mail source (@pxref{Mail Sources}), the value is a
3087 mail source for this group.
3088
3089 @item banner
3090 @cindex banner
3091 An item like @code{(banner . @var{regexp})} causes any part of an article
3092 that matches the regular expression @var{regexp} to be stripped.  Instead of
3093 @var{regexp}, you can also use the symbol @code{signature} which strips the
3094 last signature or any of the elements of the alist
3095 @code{gnus-article-banner-alist}.
3096
3097 @item sieve
3098 @cindex sieve
3099 This parameter contains a Sieve test that should match incoming mail
3100 that should be placed in this group.  From this group parameter, a
3101 Sieve @samp{IF} control structure is generated, having the test as the
3102 condition and @samp{fileinto "group.name";} as the body.
3103
3104 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3105 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3106 translating the group parameter into a Sieve script (@pxref{Sieve
3107 Commands}) the following Sieve code is generated:
3108
3109 @example
3110 if address "sender" "sieve-admin@@extundo.com" @{
3111         fileinto "INBOX.list.sieve";
3112 @}
3113 @end example
3114
3115 To generate tests for multiple email-addresses use a group parameter
3116 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3117 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3118 like the following is generated:
3119
3120 @example
3121 if address "sender" ["name@@one.org", "else@@two.org"] @{
3122         fileinto "INBOX.list.sieve";
3123 @}
3124 @end example
3125
3126 See @pxref{Sieve Commands} for commands and variables that might be of
3127 interest in relation to the sieve parameter.
3128
3129 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3130 Top, sieve, Emacs Sieve}.
3131
3132 @item (agent parameters)
3133 If the agent has been enabled, you can set any of the its parameters
3134 to control the behavior of the agent in individual groups. See Agent
3135 Parameters in @ref{Category Syntax}.  Most users will choose to set
3136 agent parameters in either an agent category or group topic to
3137 minimize the configuration effort.
3138
3139 @item (@var{variable} @var{form})
3140 You can use the group parameters to set variables local to the group you
3141 are entering.  If you want to turn threading off in @samp{news.answers},
3142 you could put @code{(gnus-show-threads nil)} in the group parameters of
3143 that group.  @code{gnus-show-threads} will be made into a local variable
3144 in the summary buffer you enter, and the form @code{nil} will be
3145 @code{eval}ed there.
3146
3147 Note that this feature sets the variable locally to the summary buffer
3148 if and only if @var{variable} has been bound as a variable.  Otherwise,
3149 only evaluating the form will take place.  So, you may want to bind the
3150 variable in advance using @code{defvar} or other if the result of the
3151 form needs to be set to it.
3152
3153 But some variables are evaluated in the article buffer, or in the
3154 message buffer (of a reply or followup or otherwise newly created
3155 message).  As a workaround, it might help to add the variable in
3156 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3157 Stuff}.  So if you want to set @code{message-from-style} via the group
3158 parameters, then you may need the following statement elsewhere in your
3159 @file{~/.gnus.el} file:
3160
3161 @lisp
3162 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3163 @end lisp
3164
3165 @vindex gnus-list-identifiers
3166 A use for this feature is to remove a mailing list identifier tag in
3167 the subject fields of articles.  E.g. if the news group
3168
3169 @example
3170 nntp+news.gnus.org:gmane.text.docbook.apps
3171 @end example
3172
3173 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3174 tag can be removed from the article subjects in the summary buffer for
3175 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3176 into the group parameters for the group.
3177
3178 This can also be used as a group-specific hook function.  If you want to
3179 hear a beep when you enter a group, you could put something like
3180 @code{(dummy-variable (ding))} in the parameters of that group.  If
3181 @code{dummy-variable} has been bound (see above), it will be set to the
3182 (meaningless) result of the @code{(ding)} form.
3183
3184 Alternatively, since the VARIABLE becomes local to the group, this
3185 pattern can be used to temporarily change a hook.  For example, if the
3186 following is added to a group parameter
3187
3188 @lisp
3189 (gnus-summary-prepared-hook
3190   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3191 @end lisp
3192
3193 when the group is entered, the 'd' key will not mark the article as
3194 expired.
3195
3196 @end table
3197
3198 @vindex gnus-parameters
3199 Group parameters can be set via the @code{gnus-parameters} variable too.
3200 But some variables, such as @code{visible}, have no effect (For this
3201 case see @code{gnus-permanently-visible-groups} as an alternative.).
3202 For example:
3203
3204 @lisp
3205 (setq gnus-parameters
3206       '(("mail\\..*"
3207          (gnus-show-threads nil)
3208          (gnus-use-scoring nil)
3209          (gnus-summary-line-format
3210           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3211          (gcc-self . t)
3212          (display . all))
3213
3214         ("^nnimap:\\(foo.bar\\)$"
3215          (to-group . "\\1"))
3216
3217         ("mail\\.me"
3218          (gnus-use-scoring  t))
3219
3220         ("list\\..*"
3221          (total-expire . t)
3222          (broken-reply-to . t))))
3223 @end lisp
3224
3225 String value of parameters will be subjected to regexp substitution, as
3226 the @code{to-group} example shows.
3227
3228 @vindex gnus-parameters-case-fold-search
3229 By default, whether comparing the group name and one of those regexps
3230 specified in @code{gnus-parameters} is done in a case-sensitive manner
3231 or a case-insensitive manner depends on the value of
3232 @code{case-fold-search} at the time when the comparison is done.  The
3233 value of @code{case-fold-search} is typically @code{t}; it means, for
3234 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3235 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3236 group.  If you want to make those regexps always case-sensitive, set the
3237 value of the @code{gnus-parameters-case-fold-search} variable to
3238 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3239 always in a case-insensitive manner.
3240
3241 You can define different sorting to different groups via
3242 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3243 group by reverse date to see the latest news at the top and an
3244 @acronym{RSS} group by subject.  In this example, the first group is the
3245 Debian daily news group @code{gmane.linux.debian.user.news} from
3246 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3247 weekly news RSS feed
3248 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3249 @xref{RSS}.
3250
3251 @lisp
3252 (setq
3253  gnus-parameters
3254  '(("nntp.*gmane\\.debian\\.user\\.news"
3255     (gnus-show-threads nil)
3256     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3257     (gnus-use-adaptive-scoring nil)
3258     (gnus-use-scoring nil))
3259    ("nnrss.*debian"
3260     (gnus-show-threads nil)
3261     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3262     (gnus-use-adaptive-scoring nil)
3263     (gnus-use-scoring t)
3264     (gnus-score-find-score-files-function 'gnus-score-find-single)
3265     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3266 @end lisp
3267
3268
3269 @node Listing Groups
3270 @section Listing Groups
3271 @cindex group listing
3272
3273 These commands all list various slices of the groups available.
3274
3275 @table @kbd
3276
3277 @item l
3278 @itemx A s
3279 @kindex A s (Group)
3280 @kindex l (Group)
3281 @findex gnus-group-list-groups
3282 List all groups that have unread articles
3283 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3284 command will list only groups of level ARG and lower.  By default, it
3285 only lists groups of level five (i.e.,
3286 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3287 groups).
3288
3289 @item L
3290 @itemx A u
3291 @kindex A u (Group)
3292 @kindex L (Group)
3293 @findex gnus-group-list-all-groups
3294 List all groups, whether they have unread articles or not
3295 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3296 this command will list only groups of level ARG and lower.  By default,
3297 it lists groups of level seven or lower (i.e., just subscribed and
3298 unsubscribed groups).
3299
3300 @item A l
3301 @kindex A l (Group)
3302 @findex gnus-group-list-level
3303 List all unread groups on a specific level
3304 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3305 with no unread articles.
3306
3307 @item A k
3308 @kindex A k (Group)
3309 @findex gnus-group-list-killed
3310 List all killed groups (@code{gnus-group-list-killed}).  If given a
3311 prefix argument, really list all groups that are available, but aren't
3312 currently (un)subscribed.  This could entail reading the active file
3313 from the server.
3314
3315 @item A z
3316 @kindex A z (Group)
3317 @findex gnus-group-list-zombies
3318 List all zombie groups (@code{gnus-group-list-zombies}).
3319
3320 @item A m
3321 @kindex A m (Group)
3322 @findex gnus-group-list-matching
3323 List all unread, subscribed groups with names that match a regexp
3324 (@code{gnus-group-list-matching}).
3325
3326 @item A M
3327 @kindex A M (Group)
3328 @findex gnus-group-list-all-matching
3329 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3330
3331 @item A A
3332 @kindex A A (Group)
3333 @findex gnus-group-list-active
3334 List absolutely all groups in the active file(s) of the
3335 server(s) you are connected to (@code{gnus-group-list-active}).  This
3336 might very well take quite a while.  It might actually be a better idea
3337 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3338 thing to match on.  Also note that this command may list groups that
3339 don't exist (yet)---these will be listed as if they were killed groups.
3340 Take the output with some grains of salt.
3341
3342 @item A a
3343 @kindex A a (Group)
3344 @findex gnus-group-apropos
3345 List all groups that have names that match a regexp
3346 (@code{gnus-group-apropos}).
3347
3348 @item A d
3349 @kindex A d (Group)
3350 @findex gnus-group-description-apropos
3351 List all groups that have names or descriptions that match a regexp
3352 (@code{gnus-group-description-apropos}).
3353
3354 @item A c
3355 @kindex A c (Group)
3356 @findex gnus-group-list-cached
3357 List all groups with cached articles (@code{gnus-group-list-cached}).
3358
3359 @item A ?
3360 @kindex A ? (Group)
3361 @findex gnus-group-list-dormant
3362 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3363
3364 @item A /
3365 @kindex A / (Group)
3366 @findex gnus-group-list-limit
3367 List groups limited within the current selection
3368 (@code{gnus-group-list-limit}).
3369
3370 @item A f
3371 @kindex A f (Group)
3372 @findex gnus-group-list-flush
3373 Flush groups from the current selection (@code{gnus-group-list-flush}).
3374
3375 @item A p
3376 @kindex A p (Group)
3377 @findex gnus-group-list-plus
3378 List groups plus the current selection (@code{gnus-group-list-plus}).
3379
3380 @end table
3381
3382 @vindex gnus-permanently-visible-groups
3383 @cindex visible group parameter
3384 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3385 always be shown, whether they have unread articles or not.  You can also
3386 add the @code{visible} element to the group parameters in question to
3387 get the same effect.
3388
3389 @vindex gnus-list-groups-with-ticked-articles
3390 Groups that have just ticked articles in it are normally listed in the
3391 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3392 @code{nil}, these groups will be treated just like totally empty
3393 groups.  It is @code{t} by default.
3394
3395
3396 @node Sorting Groups
3397 @section Sorting Groups
3398 @cindex sorting groups
3399
3400 @kindex C-c C-s (Group)
3401 @findex gnus-group-sort-groups
3402 @vindex gnus-group-sort-function
3403 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3404 group buffer according to the function(s) given by the
3405 @code{gnus-group-sort-function} variable.  Available sorting functions
3406 include:
3407
3408 @table @code
3409
3410 @item gnus-group-sort-by-alphabet
3411 @findex gnus-group-sort-by-alphabet
3412 Sort the group names alphabetically.  This is the default.
3413
3414 @item gnus-group-sort-by-real-name
3415 @findex gnus-group-sort-by-real-name
3416 Sort the group alphabetically on the real (unprefixed) group names.
3417
3418 @item gnus-group-sort-by-level
3419 @findex gnus-group-sort-by-level
3420 Sort by group level.
3421
3422 @item gnus-group-sort-by-score
3423 @findex gnus-group-sort-by-score
3424 Sort by group score.  @xref{Group Score}.
3425
3426 @item gnus-group-sort-by-rank
3427 @findex gnus-group-sort-by-rank
3428 Sort by group score and then the group level.  The level and the score
3429 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3430
3431 @item gnus-group-sort-by-unread
3432 @findex gnus-group-sort-by-unread
3433 Sort by number of unread articles.
3434
3435 @item gnus-group-sort-by-method
3436 @findex gnus-group-sort-by-method
3437 Sort alphabetically on the select method.
3438
3439 @item gnus-group-sort-by-server
3440 @findex gnus-group-sort-by-server
3441 Sort alphabetically on the Gnus server name.
3442
3443
3444 @end table
3445
3446 @code{gnus-group-sort-function} can also be a list of sorting
3447 functions.  In that case, the most significant sort key function must be
3448 the last one.
3449
3450
3451 There are also a number of commands for sorting directly according to
3452 some sorting criteria:
3453
3454 @table @kbd
3455 @item G S a
3456 @kindex G S a (Group)
3457 @findex gnus-group-sort-groups-by-alphabet
3458 Sort the group buffer alphabetically by group name
3459 (@code{gnus-group-sort-groups-by-alphabet}).
3460
3461 @item G S u
3462 @kindex G S u (Group)
3463 @findex gnus-group-sort-groups-by-unread
3464 Sort the group buffer by the number of unread articles
3465 (@code{gnus-group-sort-groups-by-unread}).
3466
3467 @item G S l
3468 @kindex G S l (Group)
3469 @findex gnus-group-sort-groups-by-level
3470 Sort the group buffer by group level
3471 (@code{gnus-group-sort-groups-by-level}).
3472
3473 @item G S v
3474 @kindex G S v (Group)
3475 @findex gnus-group-sort-groups-by-score
3476 Sort the group buffer by group score
3477 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3478
3479 @item G S r
3480 @kindex G S r (Group)
3481 @findex gnus-group-sort-groups-by-rank
3482 Sort the group buffer by group rank
3483 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3484
3485 @item G S m
3486 @kindex G S m (Group)
3487 @findex gnus-group-sort-groups-by-method
3488 Sort the group buffer alphabetically by back end name@*
3489 (@code{gnus-group-sort-groups-by-method}).
3490
3491 @item G S n
3492 @kindex G S n (Group)
3493 @findex gnus-group-sort-groups-by-real-name
3494 Sort the group buffer alphabetically by real (unprefixed) group name
3495 (@code{gnus-group-sort-groups-by-real-name}).
3496
3497 @end table
3498
3499 All the commands below obey the process/prefix convention
3500 (@pxref{Process/Prefix}).
3501
3502 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3503 commands will sort in reverse order.
3504
3505 You can also sort a subset of the groups:
3506
3507 @table @kbd
3508 @item G P a
3509 @kindex G P a (Group)
3510 @findex gnus-group-sort-selected-groups-by-alphabet
3511 Sort the groups alphabetically by group name
3512 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3513
3514 @item G P u
3515 @kindex G P u (Group)
3516 @findex gnus-group-sort-selected-groups-by-unread
3517 Sort the groups by the number of unread articles
3518 (@code{gnus-group-sort-selected-groups-by-unread}).
3519
3520 @item G P l
3521 @kindex G P l (Group)
3522 @findex gnus-group-sort-selected-groups-by-level
3523 Sort the groups by group level
3524 (@code{gnus-group-sort-selected-groups-by-level}).
3525
3526 @item G P v
3527 @kindex G P v (Group)
3528 @findex gnus-group-sort-selected-groups-by-score
3529 Sort the groups by group score
3530 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3531
3532 @item G P r
3533 @kindex G P r (Group)
3534 @findex gnus-group-sort-selected-groups-by-rank
3535 Sort the groups by group rank
3536 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3537
3538 @item G P m
3539 @kindex G P m (Group)
3540 @findex gnus-group-sort-selected-groups-by-method
3541 Sort the groups alphabetically by back end name@*
3542 (@code{gnus-group-sort-selected-groups-by-method}).
3543
3544 @item G P n
3545 @kindex G P n (Group)
3546 @findex gnus-group-sort-selected-groups-by-real-name
3547 Sort the groups alphabetically by real (unprefixed) group name
3548 (@code{gnus-group-sort-selected-groups-by-real-name}).
3549
3550 @item G P s
3551 @kindex G P s (Group)
3552 @findex gnus-group-sort-selected-groups
3553 Sort the groups according to @code{gnus-group-sort-function}.
3554
3555 @end table
3556
3557 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3558 move groups around.
3559
3560
3561 @node Group Maintenance
3562 @section Group Maintenance
3563 @cindex bogus groups
3564
3565 @table @kbd
3566 @item b
3567 @kindex b (Group)
3568 @findex gnus-group-check-bogus-groups
3569 Find bogus groups and delete them
3570 (@code{gnus-group-check-bogus-groups}).
3571
3572 @item F
3573 @kindex F (Group)
3574 @findex gnus-group-find-new-groups
3575 Find new groups and process them (@code{gnus-group-find-new-groups}).
3576 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3577 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3578 to query the server for new groups, and subscribe the new groups as
3579 zombies.
3580
3581 @item C-c C-x
3582 @kindex C-c C-x (Group)
3583 @findex gnus-group-expire-articles
3584 @cindex expiring mail
3585 Run all expirable articles in the current group through the expiry
3586 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3587 all expirable articles in the group that have been around for a while.
3588 (@pxref{Expiring Mail}).
3589
3590 @item C-c C-M-x
3591 @kindex C-c C-M-x (Group)
3592 @findex gnus-group-expire-all-groups
3593 @cindex expiring mail
3594 Run all expirable articles in all groups through the expiry process
3595 (@code{gnus-group-expire-all-groups}).
3596
3597 @end table
3598
3599
3600 @node Browse Foreign Server
3601 @section Browse Foreign Server
3602 @cindex foreign servers
3603 @cindex browsing servers
3604
3605 @table @kbd
3606 @item B
3607 @kindex B (Group)
3608 @findex gnus-group-browse-foreign-server
3609 You will be queried for a select method and a server name.  Gnus will
3610 then attempt to contact this server and let you browse the groups there
3611 (@code{gnus-group-browse-foreign-server}).
3612 @end table
3613
3614 @findex gnus-browse-mode
3615 A new buffer with a list of available groups will appear.  This buffer
3616 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3617 a lot) like a normal group buffer.
3618
3619 Here's a list of keystrokes available in the browse mode:
3620
3621 @table @kbd
3622 @item n
3623 @kindex n (Browse)
3624 @findex gnus-group-next-group
3625 Go to the next group (@code{gnus-group-next-group}).
3626
3627 @item p
3628 @kindex p (Browse)
3629 @findex gnus-group-prev-group
3630 Go to the previous group (@code{gnus-group-prev-group}).
3631
3632 @item SPACE
3633 @kindex SPACE (Browse)
3634 @findex gnus-browse-read-group
3635 Enter the current group and display the first article
3636 (@code{gnus-browse-read-group}).
3637
3638 @item RET
3639 @kindex RET (Browse)
3640 @findex gnus-browse-select-group
3641 Enter the current group (@code{gnus-browse-select-group}).
3642
3643 @item u
3644 @kindex u (Browse)
3645 @findex gnus-browse-unsubscribe-current-group
3646 Unsubscribe to the current group, or, as will be the case here,
3647 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3648
3649 @item l
3650 @itemx q
3651 @kindex q (Browse)
3652 @kindex l (Browse)
3653 @findex gnus-browse-exit
3654 Exit browse mode (@code{gnus-browse-exit}).
3655
3656 @item d
3657 @kindex d (Browse)
3658 @findex gnus-browse-describe-group
3659 Describe the current group (@code{gnus-browse-describe-group}).
3660
3661 @item ?
3662 @kindex ? (Browse)
3663 @findex gnus-browse-describe-briefly
3664 Describe browse mode briefly (well, there's not much to describe, is
3665 there) (@code{gnus-browse-describe-briefly}).
3666 @end table
3667
3668
3669 @node Exiting Gnus
3670 @section Exiting Gnus
3671 @cindex exiting Gnus
3672
3673 Yes, Gnus is ex(c)iting.
3674
3675 @table @kbd
3676 @item z
3677 @kindex z (Group)
3678 @findex gnus-group-suspend
3679 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3680 but it kills all buffers except the Group buffer.  I'm not sure why this
3681 is a gain, but then who am I to judge?
3682
3683 @item q
3684 @kindex q (Group)
3685 @findex gnus-group-exit
3686 @c @icon{gnus-group-exit}
3687 Quit Gnus (@code{gnus-group-exit}).
3688
3689 @item Q
3690 @kindex Q (Group)
3691 @findex gnus-group-quit
3692 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3693 The dribble file will be saved, though (@pxref{Auto Save}).
3694 @end table
3695
3696 @vindex gnus-exit-gnus-hook
3697 @vindex gnus-suspend-gnus-hook
3698 @vindex gnus-after-exiting-gnus-hook
3699 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3700 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3701 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3702 exiting Gnus.
3703
3704 Note:
3705
3706 @quotation
3707 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3708 numbly heavy and herself fall into a hazy trance as the boy sitting
3709 behind her drew repeated lines with his pencil across the back of her
3710 plastic chair.
3711 @end quotation
3712
3713
3714 @node Group Topics
3715 @section Group Topics
3716 @cindex topics
3717
3718 If you read lots and lots of groups, it might be convenient to group
3719 them hierarchically according to topics.  You put your Emacs groups over
3720 here, your sex groups over there, and the rest (what, two groups or so?)
3721 you put in some misc section that you never bother with anyway.  You can
3722 even group the Emacs sex groups as a sub-topic to either the Emacs
3723 groups or the sex groups---or both!  Go wild!
3724
3725 @iftex
3726 @iflatex
3727 \gnusfigure{Group Topics}{400}{
3728 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3729 }
3730 @end iflatex
3731 @end iftex
3732
3733 Here's an example:
3734
3735 @example
3736 Gnus
3737   Emacs -- I wuw it!
3738      3: comp.emacs
3739      2: alt.religion.emacs
3740     Naughty Emacs
3741      452: alt.sex.emacs
3742        0: comp.talk.emacs.recovery
3743   Misc
3744      8: comp.binaries.fractals
3745     13: comp.sources.unix
3746 @end example
3747
3748 @findex gnus-topic-mode
3749 @kindex t (Group)
3750 To get this @emph{fab} functionality you simply turn on (ooh!) the
3751 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3752 is a toggling command.)
3753
3754 Go ahead, just try it.  I'll still be here when you get back.  La de
3755 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3756 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3757 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3758 Hot and bothered?
3759
3760 If you want this permanently enabled, you should add that minor mode to
3761 the hook for the group mode.  Put the following line in your
3762 @file{~/.gnus.el} file:
3763
3764 @lisp
3765 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3766 @end lisp
3767
3768 @menu
3769 * Topic Commands::              Interactive E-Z commands.
3770 * Topic Variables::             How to customize the topics the Lisp Way.
3771 * Topic Sorting::               Sorting each topic individually.
3772 * Topic Topology::              A map of the world.
3773 * Topic Parameters::            Parameters that apply to all groups in a topic.
3774 @end menu
3775
3776
3777 @node Topic Commands
3778 @subsection Topic Commands
3779 @cindex topic commands
3780
3781 When the topic minor mode is turned on, a new @kbd{T} submap will be
3782 available.  In addition, a few of the standard keys change their
3783 definitions slightly.
3784
3785 In general, the following kinds of operations are possible on topics.
3786 First of all, you want to create topics.  Secondly, you want to put
3787 groups in topics and to move them around until you have an order you
3788 like.  The third kind of operation is to show/hide parts of the whole
3789 shebang.  You might want to hide a topic including its subtopics and
3790 groups, to get a better overview of the other groups.
3791
3792 Here is a list of the basic keys that you might need to set up topics
3793 the way you like.
3794
3795 @table @kbd
3796
3797 @item T n
3798 @kindex T n (Topic)
3799 @findex gnus-topic-create-topic
3800 Prompt for a new topic name and create it
3801 (@code{gnus-topic-create-topic}).
3802
3803 @item T TAB
3804 @itemx TAB
3805 @kindex T TAB (Topic)
3806 @kindex TAB (Topic)
3807 @findex gnus-topic-indent
3808 ``Indent'' the current topic so that it becomes a sub-topic of the
3809 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3810 ``un-indent'' the topic instead.
3811
3812 @item M-TAB
3813 @kindex M-TAB (Topic)
3814 @findex gnus-topic-unindent
3815 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3816 parent of its current parent (@code{gnus-topic-unindent}).
3817
3818 @end table
3819
3820 The following two keys can be used to move groups and topics around.
3821 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3822 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3823 kill and yank rather than cut and paste.
3824
3825 @table @kbd
3826
3827 @item C-k
3828 @kindex C-k (Topic)
3829 @findex gnus-topic-kill-group
3830 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3831 topic will be removed along with the topic.
3832
3833 @item C-y
3834 @kindex C-y (Topic)
3835 @findex gnus-topic-yank-group
3836 Yank the previously killed group or topic
3837 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3838 before all groups.
3839
3840 So, to move a topic to the beginning of the list of topics, just hit
3841 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3842 move the cursor to the beginning of the buffer (just below the ``Gnus''
3843 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3844 paste.  Like I said -- E-Z.
3845
3846 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3847 you can move topics around as well as groups.
3848
3849 @end table
3850
3851 After setting up the topics the way you like them, you might wish to
3852 hide a topic, or to show it again.  That's why we have the following
3853 key.
3854
3855 @table @kbd
3856
3857 @item RET
3858 @kindex RET (Topic)
3859 @findex gnus-topic-select-group
3860 @itemx SPACE
3861 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3862 When you perform this command on a group, you'll enter the group, as
3863 usual.  When done on a topic line, the topic will be folded (if it was
3864 visible) or unfolded (if it was folded already).  So it's basically a
3865 toggling command on topics.  In addition, if you give a numerical
3866 prefix, group on that level (and lower) will be displayed.
3867
3868 @end table
3869
3870 Now for a list of other commands, in no particular order.
3871
3872 @table @kbd
3873
3874 @item T m
3875 @kindex T m (Topic)
3876 @findex gnus-topic-move-group
3877 Move the current group to some other topic
3878 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3879 convention (@pxref{Process/Prefix}).
3880
3881 @item T j
3882 @kindex T j (Topic)
3883 @findex gnus-topic-jump-to-topic
3884 Go to a topic (@code{gnus-topic-jump-to-topic}).
3885
3886 @item T c
3887 @kindex T c (Topic)
3888 @findex gnus-topic-copy-group
3889 Copy the current group to some other topic
3890 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3891 convention (@pxref{Process/Prefix}).
3892
3893 @item T h
3894 @kindex T h (Topic)
3895 @findex gnus-topic-hide-topic
3896 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3897 a prefix, hide the topic permanently.
3898
3899 @item T s
3900 @kindex T s (Topic)
3901 @findex gnus-topic-show-topic
3902 Show the current topic (@code{gnus-topic-show-topic}).  If given
3903 a prefix, show the topic permanently.
3904
3905 @item T D
3906 @kindex T D (Topic)
3907 @findex gnus-topic-remove-group
3908 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3909 This command is mainly useful if you have the same group in several
3910 topics and wish to remove it from one of the topics.  You may also
3911 remove a group from all topics, but in that case, Gnus will add it to
3912 the root topic the next time you start Gnus.  In fact, all new groups
3913 (which, naturally, don't belong to any topic) will show up in the root
3914 topic.
3915
3916 This command uses the process/prefix convention
3917 (@pxref{Process/Prefix}).
3918
3919 @item T M
3920 @kindex T M (Topic)
3921 @findex gnus-topic-move-matching
3922 Move all groups that match some regular expression to a topic
3923 (@code{gnus-topic-move-matching}).
3924
3925 @item T C
3926 @kindex T C (Topic)
3927 @findex gnus-topic-copy-matching
3928 Copy all groups that match some regular expression to a topic
3929 (@code{gnus-topic-copy-matching}).
3930
3931 @item T H
3932 @kindex T H (Topic)
3933 @findex gnus-topic-toggle-display-empty-topics
3934 Toggle hiding empty topics
3935 (@code{gnus-topic-toggle-display-empty-topics}).
3936
3937 @item T #
3938 @kindex T # (Topic)
3939 @findex gnus-topic-mark-topic
3940 Mark all groups in the current topic with the process mark
3941 (@code{gnus-topic-mark-topic}).  This command works recursively on
3942 sub-topics unless given a prefix.
3943
3944 @item T M-#
3945 @kindex T M-# (Topic)
3946 @findex gnus-topic-unmark-topic
3947 Remove the process mark from all groups in the current topic
3948 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3949 sub-topics unless given a prefix.
3950
3951 @item C-c C-x
3952 @kindex C-c C-x (Topic)
3953 @findex gnus-topic-expire-articles
3954 @cindex expiring mail
3955 Run all expirable articles in the current group or topic through the
3956 expiry process (if any)
3957 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3958
3959 @item T r
3960 @kindex T r (Topic)
3961 @findex gnus-topic-rename
3962 Rename a topic (@code{gnus-topic-rename}).
3963
3964 @item T DEL
3965 @kindex T DEL (Topic)
3966 @findex gnus-topic-delete
3967 Delete an empty topic (@code{gnus-topic-delete}).
3968
3969 @item A T
3970 @kindex A T (Topic)
3971 @findex gnus-topic-list-active
3972 List all groups that Gnus knows about in a topics-ified way
3973 (@code{gnus-topic-list-active}).
3974
3975 @item T M-n
3976 @kindex T M-n (Topic)
3977 @findex gnus-topic-goto-next-topic
3978 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3979
3980 @item T M-p
3981 @kindex T M-p (Topic)
3982 @findex gnus-topic-goto-previous-topic
3983 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3984
3985 @item G p
3986 @kindex G p (Topic)
3987 @findex gnus-topic-edit-parameters
3988 @cindex group parameters
3989 @cindex topic parameters
3990 @cindex parameters
3991 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3992 @xref{Topic Parameters}.
3993
3994 @end table
3995
3996
3997 @node Topic Variables
3998 @subsection Topic Variables
3999 @cindex topic variables
4000
4001 The previous section told you how to tell Gnus which topics to display.
4002 This section explains how to tell Gnus what to display about each topic.
4003
4004 @vindex gnus-topic-line-format
4005 The topic lines themselves are created according to the
4006 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4007 Valid elements are:
4008
4009 @table @samp
4010 @item i
4011 Indentation.
4012 @item n
4013 Topic name.
4014 @item v
4015 Visibility.
4016 @item l
4017 Level.
4018 @item g
4019 Number of groups in the topic.
4020 @item a
4021 Number of unread articles in the topic.
4022 @item A
4023 Number of unread articles in the topic and all its subtopics.
4024 @end table
4025
4026 @vindex gnus-topic-indent-level
4027 Each sub-topic (and the groups in the sub-topics) will be indented with
4028 @code{gnus-topic-indent-level} times the topic level number of spaces.
4029 The default is 2.
4030
4031 @vindex gnus-topic-mode-hook
4032 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4033
4034 @vindex gnus-topic-display-empty-topics
4035 The @code{gnus-topic-display-empty-topics} says whether to display even
4036 topics that have no unread articles in them.  The default is @code{t}.
4037
4038
4039 @node Topic Sorting
4040 @subsection Topic Sorting
4041 @cindex topic sorting
4042
4043 You can sort the groups in each topic individually with the following
4044 commands:
4045
4046
4047 @table @kbd
4048 @item T S a
4049 @kindex T S a (Topic)
4050 @findex gnus-topic-sort-groups-by-alphabet
4051 Sort the current topic alphabetically by group name
4052 (@code{gnus-topic-sort-groups-by-alphabet}).
4053
4054 @item T S u
4055 @kindex T S u (Topic)
4056 @findex gnus-topic-sort-groups-by-unread
4057 Sort the current topic by the number of unread articles
4058 (@code{gnus-topic-sort-groups-by-unread}).
4059
4060 @item T S l
4061 @kindex T S l (Topic)
4062 @findex gnus-topic-sort-groups-by-level
4063 Sort the current topic by group level
4064 (@code{gnus-topic-sort-groups-by-level}).
4065
4066 @item T S v
4067 @kindex T S v (Topic)
4068 @findex gnus-topic-sort-groups-by-score
4069 Sort the current topic by group score
4070 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4071
4072 @item T S r
4073 @kindex T S r (Topic)
4074 @findex gnus-topic-sort-groups-by-rank
4075 Sort the current topic by group rank
4076 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4077
4078 @item T S m
4079 @kindex T S m (Topic)
4080 @findex gnus-topic-sort-groups-by-method
4081 Sort the current topic alphabetically by back end name
4082 (@code{gnus-topic-sort-groups-by-method}).
4083
4084 @item T S e
4085 @kindex T S e (Topic)
4086 @findex gnus-topic-sort-groups-by-server
4087 Sort the current topic alphabetically by server name
4088 (@code{gnus-topic-sort-groups-by-server}).
4089
4090 @item T S s
4091 @kindex T S s (Topic)
4092 @findex gnus-topic-sort-groups
4093 Sort the current topic according to the function(s) given by the
4094 @code{gnus-group-sort-function} variable
4095 (@code{gnus-topic-sort-groups}).
4096
4097 @end table
4098
4099 When given a prefix argument, all these commands will sort in reverse
4100 order.  @xref{Sorting Groups}, for more information about group
4101 sorting.
4102
4103
4104 @node Topic Topology
4105 @subsection Topic Topology
4106 @cindex topic topology
4107 @cindex topology
4108
4109 So, let's have a look at an example group buffer:
4110
4111 @example
4112 @group
4113 Gnus
4114   Emacs -- I wuw it!
4115      3: comp.emacs
4116      2: alt.religion.emacs
4117     Naughty Emacs
4118      452: alt.sex.emacs
4119        0: comp.talk.emacs.recovery
4120   Misc
4121      8: comp.binaries.fractals
4122     13: comp.sources.unix
4123 @end group
4124 @end example
4125
4126 So, here we have one top-level topic (@samp{Gnus}), two topics under
4127 that, and one sub-topic under one of the sub-topics.  (There is always
4128 just one (1) top-level topic).  This topology can be expressed as
4129 follows:
4130
4131 @lisp
4132 (("Gnus" visible)
4133  (("Emacs -- I wuw it!" visible)
4134   (("Naughty Emacs" visible)))
4135  (("Misc" visible)))
4136 @end lisp
4137
4138 @vindex gnus-topic-topology
4139 This is in fact how the variable @code{gnus-topic-topology} would look
4140 for the display above.  That variable is saved in the @file{.newsrc.eld}
4141 file, and shouldn't be messed with manually---unless you really want
4142 to.  Since this variable is read from the @file{.newsrc.eld} file,
4143 setting it in any other startup files will have no effect.
4144
4145 This topology shows what topics are sub-topics of what topics (right),
4146 and which topics are visible.  Two settings are currently
4147 allowed---@code{visible} and @code{invisible}.
4148
4149
4150 @node Topic Parameters
4151 @subsection Topic Parameters
4152 @cindex topic parameters
4153
4154 All groups in a topic will inherit group parameters from the parent
4155 (and ancestor) topic parameters.  All valid group parameters are valid
4156 topic parameters (@pxref{Group Parameters}).  When the agent is
4157 enabled, all agent parameters (See Agent Parameters in @ref{Category
4158 Syntax}) are also valid topic parameters.
4159
4160 In addition, the following parameters are only valid as topic
4161 parameters:
4162
4163 @table @code
4164 @item subscribe
4165 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4166 @code{subscribe} topic parameter says what groups go in what topic.  Its
4167 value should be a regexp to match the groups that should go in that
4168 topic.
4169
4170 @item subscribe-level
4171 When subscribing new groups by topic (see the @code{subscribe} parameter),
4172 the group will be subscribed with the level specified in the
4173 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4174
4175 @end table
4176
4177 Group parameters (of course) override topic parameters, and topic
4178 parameters in sub-topics override topic parameters in super-topics.  You
4179 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4180 verb, although you may feel free to disagree with me here.)
4181
4182 @example
4183 @group
4184 Gnus
4185   Emacs
4186      3: comp.emacs
4187      2: alt.religion.emacs
4188    452: alt.sex.emacs
4189     Relief
4190      452: alt.sex.emacs
4191        0: comp.talk.emacs.recovery
4192   Misc
4193      8: comp.binaries.fractals
4194     13: comp.sources.unix
4195    452: alt.sex.emacs
4196 @end group
4197 @end example
4198
4199 The @samp{Emacs} topic has the topic parameter @code{(score-file
4200 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4201 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4202 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4203 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4204 . "religion.SCORE")}.
4205
4206 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4207 will get the @file{relief.SCORE} home score file.  If you enter the same
4208 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4209 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4210 get the @file{religion.SCORE} home score file.
4211
4212 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4213 there are some problems, especially with the @code{total-expiry}
4214 parameter.  Say you have a mail group in two topics; one with
4215 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4216 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4217 of these topics you mean to expire articles from, so anything may
4218 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4219 happens.  You just have to be careful if you do stuff like that.
4220
4221
4222 @node Non-ASCII Group Names
4223 @section Accessing groups of non-English names
4224 @cindex non-ascii group names
4225
4226 There are some news servers that provide groups of which the names are
4227 expressed with their native languages in the world.  For instance, in a
4228 certain news server there are some newsgroups of which the names are
4229 spelled in Chinese, where people are talking in Chinese.  You can, of
4230 course, subscribe to such news groups using Gnus.  Currently Gnus
4231 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4232 back end but also with the @code{nnml} back end and the @code{nnrss}
4233 back end.
4234
4235 Every such group name is encoded by a certain charset in the server
4236 side (in an @acronym{NNTP} server its administrator determines the
4237 charset, but for groups in the other back ends it is determined by you).
4238 Gnus has to display the decoded ones for you in the group buffer and the
4239 article buffer, and needs to use the encoded ones when communicating
4240 with servers.  However, Gnus doesn't know what charset is used for each
4241 non-@acronym{ASCII} group name.  The following two variables are just
4242 the ones for telling Gnus what charset should be used for each group:
4243
4244 @table @code
4245 @item gnus-group-name-charset-method-alist
4246 @vindex gnus-group-name-charset-method-alist
4247 An alist of select methods and charsets.  The default value is
4248 @code{nil}.  The names of groups in the server specified by that select
4249 method are all supposed to use the corresponding charset.  For example:
4250
4251 @lisp
4252 (setq gnus-group-name-charset-method-alist
4253       '(((nntp "news.com.cn") . cn-gb-2312)))
4254 @end lisp
4255
4256 Charsets specified for groups with this variable are preferred to the
4257 ones specified for the same groups with the
4258 @code{gnus-group-name-charset-group-alist} variable (see below).
4259
4260 A select method can be very long, like:
4261
4262 @lisp
4263 (nntp "gmane"
4264       (nntp-address "news.gmane.org")
4265       (nntp-end-of-line "\n")
4266       (nntp-open-connection-function
4267        nntp-open-via-rlogin-and-telnet)
4268       (nntp-via-rlogin-command "ssh")
4269       (nntp-via-rlogin-command-switches
4270        ("-C" "-t" "-e" "none"))
4271       (nntp-via-address @dots{}))
4272 @end lisp
4273
4274 In that case, you can truncate it into @code{(nntp "gmane")} in this
4275 variable.  That is, it is enough to contain only the back end name and
4276 the server name.
4277
4278 @item gnus-group-name-charset-group-alist
4279 @cindex UTF-8 group names
4280 @vindex gnus-group-name-charset-group-alist
4281 An alist of regexp of group name and the charset for group names.
4282 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4283 otherwise the default is @code{nil}.  For example:
4284
4285 @lisp
4286 (setq gnus-group-name-charset-group-alist
4287       '(("\\.com\\.cn:" . cn-gb-2312)
4288         (".*" . utf-8)))
4289 @end lisp
4290
4291 Note that this variable is ignored if the match is made with
4292 @code{gnus-group-name-charset-method-alist}.
4293 @end table
4294
4295 Those two variables are used also to determine the charset for encoding
4296 and decoding non-@acronym{ASCII} group names that are in the back ends
4297 other than @code{nntp}.  It means that it is you who determine it.  If
4298 you do nothing, the charset used for group names in those back ends will
4299 all be @code{utf-8} because of the last element of
4300 @code{gnus-group-name-charset-group-alist}.
4301
4302 There is one more important variable for non-@acronym{ASCII} group
4303 names:
4304
4305 @table @code
4306 @item nnmail-pathname-coding-system
4307 @vindex nnmail-pathname-coding-system
4308 The value of this variable should be a coding system or @code{nil}.  The
4309 default is @code{nil} in Emacs, or is the aliasee of the coding system
4310 named @code{file-name} (a certain coding system of which an alias is
4311 @code{file-name}) in XEmacs.
4312
4313 The @code{nnml} back end, the @code{nnrss} back end, the @acronym{NNTP}
4314 marks feature (@pxref{NNTP marks}), the agent, and the cache use
4315 non-@acronym{ASCII} group names in those files and directories.  This
4316 variable overrides the value of @code{file-name-coding-system} which
4317 specifies the coding system used when encoding and decoding those file
4318 names and directory names.
4319
4320 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4321 is the only means to specify the coding system used to encode and decode
4322 file names.  On the other hand, Emacs uses the value of
4323 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4324 is @code{nil} or it is bound to the value of
4325 @code{nnmail-pathname-coding-system} which is @code{nil}.
4326
4327 Normally the value of @code{default-file-name-coding-system} in Emacs or
4328 @code{nnmail-pathname-coding-system} in XEmacs is initialized according
4329 to the locale, so you will need to do nothing if the value is suitable
4330 to encode and decode non-@acronym{ASCII} group names.
4331
4332 The value of this variable (or @code{default-file-name-coding-system})
4333 does not necessarily need to be the same value that is determined by
4334 @code{gnus-group-name-charset-method-alist} and
4335 @code{gnus-group-name-charset-group-alist}.
4336
4337 If @code{default-file-name-coding-system} or this variable is
4338 initialized by default to @code{iso-latin-1} for example, although you
4339 want to subscribe to the groups spelled in Chinese, that is the most
4340 typical case where you have to customize
4341 @code{nnmail-pathname-coding-system}.  The @code{utf-8} coding system is
4342 a good candidate for it.  Otherwise, you may change the locale in your
4343 system so that @code{default-file-name-coding-system} or this variable
4344 may be initialized to an appropriate value.
4345 @end table
4346
4347 Note that when you copy or move articles from a non-@acronym{ASCII}
4348 group to another group, the charset used to encode and decode group
4349 names should be the same in both groups.  Otherwise the Newsgroups
4350 header will be displayed incorrectly in the article buffer.
4351
4352
4353 @node Searching
4354 @section Searching
4355
4356 @menu
4357 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4358 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4359 @end menu
4360
4361 @cindex Searching
4362
4363 FIXME: This node is a stub.
4364
4365 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4366 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4367 as well.
4368
4369 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4370 and back-reference.
4371
4372 @node nnir
4373 @subsection nnir
4374
4375 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4376 @cindex nnir
4377
4378 @node nnmairix
4379 @subsection nnmairix
4380
4381 @cindex mairix
4382 @cindex nnmairix
4383 This paragraph describes how to set up mairix and the back end
4384 @code{nnmairix} for indexing and searching your mail from within
4385 Gnus.  Additionally, you can create permanent ``smart'' groups which are
4386 bound to mairix searches and are automatically updated.
4387
4388 @menu
4389 * About mairix::                About the mairix mail search engine
4390 * nnmairix requirements::       What you will need for using nnmairix
4391 * What nnmairix does::          What does nnmairix actually do?
4392 * Setting up mairix::           Set up your mairix installation
4393 * Configuring nnmairix::        Set up the nnmairix back end
4394 * nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4395 * Propagating marks::           How to propagate marks from nnmairix groups
4396 * nnmairix tips and tricks::    Some tips, tricks and examples
4397 * nnmairix caveats::            Some more stuff you might want to know
4398 @end menu
4399
4400 @c FIXME: The markup in this section might need improvement.
4401 @c E.g. adding @samp, @var, @file, @command, etc.
4402 @c Cf. (info "(texinfo)Indicating")
4403
4404 @node About mairix
4405 @subsubsection About mairix
4406
4407 Mairix is a tool for indexing and searching words in locally stored
4408 mail.  It was written by Richard Curnow and is licensed under the
4409 GPL.  Mairix comes with most popular GNU/Linux distributions, but it also
4410 runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
4411 be found at
4412 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4413
4414 Though mairix might not be as flexible as other search tools like
4415 swish++ or namazu, which you can use via the @code{nnir} back end, it
4416 has the prime advantage of being incredibly fast.  On current systems, it
4417 can easily search through headers and message bodies of thousands and
4418 thousands of mails in well under a second.  Building the database
4419 necessary for searching might take a minute or two, but only has to be
4420 done once fully.  Afterwards, the updates are done incrementally and
4421 therefore are really fast, too.  Additionally, mairix is very easy to set
4422 up.
4423
4424 For maximum speed though, mairix should be used with mails stored in
4425 @code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4426 end), although it also works with mbox.  Mairix presents the search
4427 results by populating a @emph{virtual} maildir/MH folder with symlinks
4428 which point to the ``real'' message files (if mbox is used, copies are
4429 made).  Since mairix already presents search results in such a virtual
4430 mail folder, it is very well suited for using it as an external program
4431 for creating @emph{smart} mail folders, which represent certain mail
4432 searches.  This is similar to a Kiboze group (@pxref{Kibozed Groups}),
4433 but much faster.
4434
4435 @node nnmairix requirements
4436 @subsubsection nnmairix requirements
4437
4438 Mairix searches local mail---that means, mairix absolutely must have
4439 direct access to your mail folders.  If your mail resides on another
4440 server (e.g. an @acronym{IMAP} server) and you happen to have shell
4441 access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4442
4443 Additionally, @code{nnmairix} only supports the following Gnus back
4444 ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}.  You must use
4445 one of these back ends for using @code{nnmairix}.  Other back ends, like
4446 @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4447
4448 If you absolutely must use mbox and still want to use @code{nnmairix},
4449 you can set up a local @acronym{IMAP} server, which you then access via
4450 @code{nnimap}.  This is a rather massive setup for accessing some mbox
4451 files, so just change to MH or Maildir already...  However, if you're
4452 really, really passionate about using mbox, you might want to look into
4453 the package @file{mairix.el}, which comes with Emacs 23.
4454
4455 @node What nnmairix does
4456 @subsubsection What nnmairix does
4457
4458 The back end @code{nnmairix} enables you to call mairix from within Gnus,
4459 either to query mairix with a search term or to update the
4460 database.  While visiting a message in the summary buffer, you can use
4461 several pre-defined shortcuts for calling mairix, e.g. to quickly
4462 search for all mails from the sender of the current message or to
4463 display the whole thread associated with the message, even if the
4464 mails are in different folders.
4465
4466 Additionally, you can create permanent @code{nnmairix} groups which are bound
4467 to certain mairix searches.  This way, you can easily create a group
4468 containing mails from a certain sender, with a certain subject line or
4469 even for one specific thread based on the Message-ID.  If you check for
4470 new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4471 automatically update themselves by calling mairix.
4472
4473 You might ask why you need @code{nnmairix} at all, since mairix already
4474 creates the group, populates it with links to the mails so that you can
4475 then access it with Gnus, right?  Well, this @emph{might} work, but often
4476 does not---at least not without problems.  Most probably you will get
4477 strange article counts, and sometimes you might see mails which Gnus
4478 claims have already been canceled and are inaccessible.  This is due to
4479 the fact that Gnus isn't really amused when things are happening behind
4480 its back.  Another problem can be the mail back end itself, e.g. if you
4481 use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4482 about corrupt index files when mairix changed the contents of the search
4483 group).  Using @code{nnmairix} should circumvent these problems.
4484
4485 @code{nnmairix} is not really a mail back end---it's actually more like
4486 a wrapper, sitting between a ``real'' mail back end where mairix stores
4487 the searches and the Gnus front end.  You can choose between three
4488 different mail back ends for the mairix folders: @code{nnml},
4489 @code{nnmaildir} or @code{nnimap}.  @code{nnmairix} will call the mairix
4490 binary so that the search results are stored in folders named
4491 @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4492 present these folders in the Gnus front end only with @code{<NAME>}.
4493 You can use an existing mail back end where you already store your mail,
4494 but if you're uncomfortable with @code{nnmairix} creating new mail
4495 groups alongside your other mail, you can also create e.g. a new
4496 @code{nnmaildir} or @code{nnml} server exclusively for mairix, but then
4497 make sure those servers do not accidentally receive your new mail
4498 (@pxref{nnmairix caveats}).  A special case exists if you want to use
4499 mairix remotely on an IMAP server with @code{nnimap}---here the mairix
4500 folders and your other mail must be on the same @code{nnimap} back end.
4501
4502 @node Setting up mairix
4503 @subsubsection Setting up mairix
4504
4505 First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4506
4507 Setting up mairix is easy: simply create a @file{.mairixrc} file with
4508 (at least) the following entries:
4509
4510 @example
4511 # Your Maildir/MH base folder
4512 base=~/Maildir
4513 @end example
4514
4515 This is the base folder for your mails.  All the following directories
4516 are relative to this base folder.  If you want to use @code{nnmairix}
4517 with @code{nnimap}, this base directory has to point to the mail
4518 directory where the @acronym{IMAP} server stores the mail folders!
4519
4520 @example
4521 maildir= ... your maildir folders which should be indexed ...
4522 mh= ... your nnml/mh folders which should be indexed ...
4523 mbox = ... your mbox files which should be indexed ...
4524 @end example
4525
4526 This specifies all your mail folders and mbox files (relative to the
4527 base directory!) you want to index with mairix.  Note that the
4528 @code{nnml} back end saves mails in MH format, so you have to put those
4529 directories in the @code{mh} line.  See the example at the end of this
4530 section and mairixrc's man-page for further details.
4531
4532 @example
4533 omit=zz_mairix-*
4534 @end example
4535
4536 @vindex nnmairix-group-prefix
4537 This should make sure that you don't accidentally index the mairix
4538 search results.  You can change the prefix of these folders with the
4539 variable @code{nnmairix-group-prefix}.
4540
4541 @example
4542 mformat= ... 'maildir' or 'mh' ...
4543 database= ... location of database file ...
4544 @end example
4545
4546 The @code{format} setting specifies the output format for the mairix
4547 search folder.  Set this to @code{mh} if you want to access search results
4548 with @code{nnml}.  Otherwise choose @code{maildir}.
4549
4550 To summarize, here is my shortened @file{.mairixrc} file as an example:
4551
4552 @example
4553 base=~/Maildir
4554 maildir=.personal:.work:.logcheck:.sent
4555 mh=../Mail/nnml/*...
4556 mbox=../mboxmail/mailarchive_year*
4557 mformat=maildir
4558 omit=zz_mairix-*
4559 database=~/.mairixdatabase
4560 @end example
4561
4562 In this case, the base directory is @file{~/Maildir}, where all my Maildir
4563 folders are stored.  As you can see, the folders are separated by
4564 colons.  If you wonder why every folder begins with a dot: this is
4565 because I use Dovecot as @acronym{IMAP} server, which again uses
4566 @code{Maildir++} folders.  For testing nnmairix, I also have some
4567 @code{nnml} mail, which is saved in @file{~/Mail/nnml}.  Since this has
4568 to be specified relative to the @code{base} directory, the @code{../Mail}
4569 notation is needed.  Note that the line ends in @code{*...}, which means
4570 to recursively scan all files under this directory.  Without the three
4571 dots, the wildcard @code{*} will not work recursively.  I also have some
4572 old mbox files with archived mail lying around in @file{~/mboxmail}.
4573 The other lines should be obvious.
4574
4575 See the man page for @code{mairixrc} for details and further options,
4576 especially regarding wildcard usage, which may be a little different
4577 than you are used to.
4578
4579 Now simply call @code{mairix} to create the index for the first time.
4580 Note that this may take a few minutes, but every following index will do
4581 the updates incrementally and hence is very fast.
4582
4583 @node Configuring nnmairix
4584 @subsubsection Configuring nnmairix
4585
4586 In group mode, type @kbd{G b c}
4587 (@code{nnmairix-create-server-and-default-group}).  This will ask you for all
4588 necessary information and create a @code{nnmairix} server as a foreign
4589 server.  You will have to specify the following:
4590
4591 @itemize @bullet
4592
4593 @item
4594 The @strong{name} of the @code{nnmairix} server---choose whatever you
4595 want.
4596
4597 @item
4598 The name of the @strong{back end server} where mairix should store its
4599 searches.  This must be a full server name, like @code{nnml:mymail}.
4600 Just hit @kbd{TAB} to see the available servers.  Currently, servers
4601 which are accessed through @code{nnmaildir}, @code{nnimap} and
4602 @code{nnml} are supported.  As explained above, for locally stored
4603 mails, this can be an existing server where you store your mails.
4604 However, you can also create e.g. a new @code{nnmaildir} or @code{nnml}
4605 server exclusively for @code{nnmairix} in your secondary select methods
4606 (@pxref{Finding the News}).  If you use a secondary @code{nnml} server
4607 just for mairix, make sure that you explicitly set the server variable
4608 @code{nnml-get-new-mail} to @code{nil}, or you might loose mail
4609 (@pxref{nnmairix caveats}).  If you want to use mairix remotely on an
4610 @acronym{IMAP} server, you have to choose the corresponding
4611 @code{nnimap} server here.
4612
4613 @item
4614 @vindex nnmairix-mairix-search-options
4615 The @strong{command} to call the mairix binary.  This will usually just
4616 be @code{mairix}, but you can also choose something like @code{ssh
4617 SERVER mairix} if you want to call mairix remotely, e.g. on your
4618 @acronym{IMAP} server.  If you want to add some default options to
4619 mairix, you could do this here, but better use the variable
4620 @code{nnmairix-mairix-search-options} instead.
4621
4622 @item
4623 The name of the @strong{default search group}.  This will be the group
4624 where all temporary mairix searches are stored, i.e. all searches which
4625 are not bound to permanent @code{nnmairix} groups.  Choose whatever you
4626 like.
4627
4628 @item
4629 If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4630 asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4631 folders (=beginning with a dot).  For example, you have to answer
4632 @samp{yes} here if you work with the Dovecot @acronym{IMAP}
4633 server.  Otherwise, you should answer @samp{no} here.
4634
4635 @end itemize
4636
4637 @node nnmairix keyboard shortcuts
4638 @subsubsection nnmairix keyboard shortcuts
4639
4640 In group mode:
4641
4642 @table @kbd
4643
4644 @item G b c
4645 @kindex G b c (Group)
4646 @findex nnmairix-create-server-and-default-group
4647 Creates @code{nnmairix} server and default search group for this server
4648 (@code{nnmairix-create-server-and-default-group}).  You should have done
4649 this by now (@pxref{Configuring nnmairix}).
4650
4651 @item G b s
4652 @kindex G b s (Group)
4653 @findex nnmairix-search
4654 Prompts for query which is then sent to the mairix binary.  Search
4655 results are put into the default search group which is automatically
4656 displayed (@code{nnmairix-search}).
4657
4658 @item G b m
4659 @kindex G b m (Group)
4660 @findex nnmairix-widget-search
4661 Allows you to create a mairix search or a permanent group more
4662 comfortably using graphical widgets, similar to a customization
4663 group.  Just try it to see how it works (@code{nnmairix-widget-search}).
4664
4665 @item G b i
4666 @kindex G b i (Group)
4667 @findex nnmairix-search-interactive
4668 Another command for creating a mairix query more comfortably, but uses
4669 only the minibuffer (@code{nnmairix-search-interactive}).
4670
4671 @item G b g
4672 @kindex G b g (Group)
4673 @findex nnmairix-create-search-group
4674 Creates a permanent group which is associated with a search query
4675 (@code{nnmairix-create-search-group}).  The @code{nnmairix} back end
4676 automatically calls mairix when you update this group with @kbd{g} or
4677 @kbd{M-g}.
4678
4679 @item G b q
4680 @kindex G b q (Group)
4681 @findex nnmairix-group-change-query-this-group
4682 Changes the search query for the @code{nnmairix} group under cursor
4683 (@code{nnmairix-group-change-query-this-group}).
4684
4685 @item G b t
4686 @kindex G b t (Group)
4687 @findex nnmairix-group-toggle-threads-this-group
4688 Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4689 i.e.  if you want see the whole threads of the found messages
4690 (@code{nnmairix-group-toggle-threads-this-group}).
4691
4692 @item G b u
4693 @kindex G b u (Group)
4694 @findex nnmairix-update-database
4695 @vindex nnmairix-mairix-update-options
4696 Calls mairix binary for updating the database
4697 (@code{nnmairix-update-database}).  The default parameters are @code{-F}
4698 and @code{-Q} for making this as fast as possible (see variable
4699 @code{nnmairix-mairix-update-options} for defining these default
4700 options).
4701
4702 @item G b r
4703 @kindex G b r (Group)
4704 @findex nnmairix-group-toggle-readmarks-this-group
4705 Keep articles in this @code{nnmairix} group always read or unread, or leave the
4706 marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4707
4708 @item G b d
4709 @kindex G b d (Group)
4710 @findex nnmairix-group-delete-recreate-this-group
4711 Recreate @code{nnmairix} group on the ``real'' mail back end
4712 (@code{nnmairix-group-delete-recreate-this-group}).  You can do this if
4713 you always get wrong article counts with a @code{nnmairix} group.
4714
4715 @item G b a
4716 @kindex G b a (Group)
4717 @findex nnmairix-group-toggle-allowfast-this-group
4718 Toggles the @code{allow-fast} parameters for group under cursor
4719 (@code{nnmairix-group-toggle-allowfast-this-group}).  The default
4720 behavior of @code{nnmairix} is to do a mairix search every time you
4721 update or enter the group.  With the @code{allow-fast} parameter set,
4722 mairix will only be called when you explicitly update the group, but not
4723 upon entering.  This makes entering the group faster, but it may also
4724 lead to dangling symlinks if something changed between updating and
4725 entering the group which is not yet in the mairix database.
4726
4727 @item G b p
4728 @kindex G b p (Group)
4729 @findex nnmairix-group-toggle-propmarks-this-group
4730 Toggle marks propagation for this group
4731 (@code{nnmairix-group-toggle-propmarks-this-group}).  (@pxref{Propagating
4732 marks}).
4733
4734 @item G b o
4735 @kindex G b o (Group)
4736 @findex nnmairix-propagate-marks
4737 Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4738 @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4739
4740 @end table
4741
4742 In summary mode:
4743
4744 @table @kbd
4745
4746 @item $ m
4747 @kindex $ m (Summary)
4748 @findex nnmairix-widget-search-from-this-article
4749 Allows you to create a mairix query or group based on the current
4750 message using graphical widgets (same as @code{nnmairix-widget-search})
4751 (@code{nnmairix-widget-search-from-this-article}).
4752
4753 @item $ g
4754 @kindex $ g (Summary)
4755 @findex nnmairix-create-search-group-from-message
4756 Interactively creates a new search group with query based on the current
4757 message, but uses the minibuffer instead of graphical widgets
4758 (@code{nnmairix-create-search-group-from-message}).
4759
4760 @item $ t
4761 @kindex $ t (Summary)
4762 @findex nnmairix-search-thread-this-article
4763 Searches thread for the current article
4764 (@code{nnmairix-search-thread-this-article}).  This is effectively a
4765 shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4766 current article and enabled threads.
4767
4768 @item $ f
4769 @kindex $ f (Summary)
4770 @findex nnmairix-search-from-this-article
4771 Searches all messages from sender of the current article
4772 (@code{nnmairix-search-from-this-article}).  This is a shortcut for
4773 calling @code{nnmairix-search} with @samp{f:From}.
4774
4775 @item $ o
4776 @kindex $ o (Summary)
4777 @findex nnmairix-goto-original-article
4778 (Only in @code{nnmairix} groups!) Tries determine the group this article
4779 originally came from and displays the article in this group, so that
4780 e.g. replying to this article the correct posting styles/group
4781 parameters are applied (@code{nnmairix-goto-original-article}).  This
4782 function will use the registry if available, but can also parse the
4783 article file name as a fallback method.
4784
4785 @item $ u
4786 @kindex $ u (Summary)
4787 @findex nnmairix-remove-tick-mark-original-article
4788 Remove possibly existing tick mark from original article
4789 (@code{nnmairix-remove-tick-mark-original-article}).  (@pxref{nnmairix
4790 tips and tricks}).
4791
4792 @end table
4793
4794 @node Propagating marks
4795 @subsubsection Propagating marks
4796
4797 First of: you really need a patched mairix binary for using the marks
4798 propagation feature efficiently. Otherwise, you would have to update
4799 the mairix database all the time. You can get the patch at
4800
4801 @uref{http://www.randomsample.de/mairix-maildir-patch.tar}
4802
4803 You need the mairix v0.21 source code for this patch; everything else
4804 is explained in the accompanied readme file. If you don't want to use
4805 marks propagation, you don't have to apply these patches, but they also
4806 fix some annoyances regarding changing maildir flags, so it might still
4807 be useful to you.
4808
4809 With the patched mairix binary, you can use @code{nnmairix} as an
4810 alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4811 example, instead of splitting all mails from @samp{david@@foobar.com}
4812 into a group, you can simply create a search group with the query
4813 @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4814 all about: simply put everything in one mail folder and dynamically
4815 create searches instead of splitting. This is more flexible, since you
4816 can dynamically change your folders any time you want to. This also
4817 implies that you will usually read your mails in the @code{nnmairix}
4818 groups instead of your ``real'' mail groups.
4819
4820 There is one problem, though: say you got a new mail from
4821 @samp{david@@foobar.com}; it will now show up in two groups, the
4822 ``real'' group (your INBOX, for example) and in the @code{nnmairix}
4823 search group (provided you have updated the mairix database). Now you
4824 enter the @code{nnmairix} group and read the mail. The mail will be
4825 marked as read, but only in the @code{nnmairix} group---in the ``real''
4826 mail group it will be still shown as unread.
4827
4828 You could now catch up the mail group (@pxref{Group Data}), but this is
4829 tedious and error prone, since you may overlook mails you don't have
4830 created @code{nnmairix} groups for. Of course, you could first use
4831 @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4832 shortcuts}) and then read the mail in the original group, but that's
4833 even more cumbersome.
4834
4835 Clearly, the easiest way would be if marks could somehow be
4836 automatically set for the original article. This is exactly what
4837 @emph{marks propagation} is about.
4838
4839 Marks propagation is deactivated by default. You can activate it for a
4840 certain @code{nnmairix} group with
4841 @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4842 p}). This function will warn you if you try to use it with your default
4843 search group; the reason is that the default search group is used for
4844 temporary searches, and it's easy to accidentally propagate marks from
4845 this group. However, you can ignore this warning if you really want to.
4846
4847 With marks propagation enabled, all the marks you set in a @code{nnmairix}
4848 group should now be propagated to the original article. For example,
4849 you can now tick an article (by default with @kbd{!}) and this mark should
4850 magically be set for the original article, too.
4851
4852 A few more remarks which you may or may not want to know:
4853
4854 @vindex nnmairix-propagate-marks-upon-close
4855 Marks will not be set immediately, but only upon closing a group. This
4856 not only makes marks propagation faster, it also avoids problems with
4857 dangling symlinks when dealing with maildir files (since changing flags
4858 will change the file name). You can also control when to propagate marks
4859 via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4860 details).
4861
4862 Obviously, @code{nnmairix} will have to look up the original group for every
4863 article you want to set marks for. If available, @code{nnmairix} will first use
4864 the registry for determining the original group. The registry is very
4865 fast, hence you should really, really enable the registry when using
4866 marks propagation. If you don't have to worry about RAM and disc space,
4867 set @code{gnus-registry-max-entries} to a large enough value; to be on
4868 the safe side, choose roughly the amount of mails you index with mairix.
4869
4870 @vindex nnmairix-only-use-registry
4871 If you don't want to use the registry or the registry hasn't seen the
4872 original article yet, @code{nnmairix} will use an additional mairix
4873 search for determining the file name of the article. This, of course, is
4874 way slower than the registry---if you set hundreds or even thousands of
4875 marks this way, it might take some time. You can avoid this situation by
4876 setting @code{nnmairix-only-use-registry} to t.
4877
4878 Maybe you also want to propagate marks the other way round, i.e. if you
4879 tick an article in a "real" mail group, you'd like to have the same
4880 article in a @code{nnmairix} group ticked, too. For several good
4881 reasons, this can only be done efficiently if you use maildir. To
4882 immediately contradict myself, let me mention that it WON'T work with
4883 @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4884 not in the file name. Therefore, propagating marks to @code{nnmairix}
4885 groups will usually only work if you use an IMAP server which uses
4886 maildir as its file format.
4887
4888 @vindex nnmairix-propagate-marks-to-nnmairix-groups
4889 If you work with this setup, just set
4890 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4891 happens. If you don't like what you see, just set it to @code{nil} again. One
4892 problem might be that you get a wrong number of unread articles; this
4893 usually happens when you delete or expire articles in the original
4894 groups. When this happens, you can recreate the @code{nnmairix} group on the
4895 back end using @kbd{G b d}.
4896
4897 @node nnmairix tips and tricks
4898 @subsubsection nnmairix tips and tricks
4899
4900 @itemize
4901 @item
4902 Checking Mail
4903
4904 @findex nnmairix-update-groups
4905 I put all my important mail groups at group level 1. The mairix groups
4906 have group level 5, so they do not get checked at start up (@pxref{Group
4907 Levels}).
4908
4909 I use the following to check for mails:
4910
4911 @lisp
4912 (defun my-check-mail-mairix-update (level)
4913   (interactive "P")
4914   ;; if no prefix given, set level=1
4915   (gnus-group-get-new-news (or level 1))
4916   (nnmairix-update-groups "mairixsearch" t t)
4917   (gnus-group-list-groups))
4918
4919 (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4920 @end lisp
4921
4922 Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4923 server. See the doc string for @code{nnmairix-update-groups} for
4924 details.
4925
4926 @item
4927 Example: search group for ticked articles
4928
4929 For example, you can create a group for all ticked articles, where the
4930 articles always stay unread:
4931
4932 Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4933 @samp{F:f} as query and do not include threads.
4934
4935 Now activate marks propagation for this group by using @kbd{G b p}. Then
4936 activate the always-unread feature by using @kbd{G b r} twice.
4937
4938 So far so good---but how do you remove the tick marks in the @code{nnmairix}
4939 group?  There are two options: You may simply use
4940 @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4941 tick marks from the original article. The other possibility is to set
4942 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4943 comments about this option.  If it works for you, the tick marks should
4944 also exist in the @code{nnmairix} group and you can remove them as usual,
4945 e.g. by marking an article as read.
4946
4947 When you have removed a tick mark from the original article, this
4948 article should vanish from the @code{nnmairix} group after you have updated the
4949 mairix database and updated the group.  Fortunately, there is a function
4950 for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4951 snippet and the doc string for details.
4952
4953 @item
4954 Dealing with auto-subscription of mail groups
4955
4956 As described before, all @code{nnmairix} groups are in fact stored on
4957 the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4958 see them when you enter the back end server in the server buffer. You
4959 should not subscribe these groups! Unfortunately, these groups will
4960 usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4961 @code{nnml}, i.e. you will suddenly see groups of the form
4962 @samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4963 simply kill these groups with C-k.  For avoiding this, turn off
4964 auto-subscription completely by setting the variable
4965 @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4966 Groups}), or if you like to keep this feature use the following kludge
4967 for turning it off for all groups beginning with @samp{zz_}:
4968
4969 @lisp
4970 (setq gnus-auto-subscribed-groups
4971       "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4972 @end lisp
4973
4974 @end itemize
4975
4976 @node nnmairix caveats
4977 @subsubsection nnmairix caveats
4978
4979 @itemize
4980 @item
4981 You can create a secondary @code{nnml} server just for nnmairix, but then
4982 you have to explicitly set the corresponding server variable
4983 @code{nnml-get-new-mail} to @code{nil}.  Otherwise, new mail might get
4984 put into this secondary server (and would never show up again).  Here's
4985 an example server definition:
4986
4987 @lisp
4988 (nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil))
4989 @end lisp
4990
4991 (The @code{nnmaildir} back end also has a server variabe
4992 @code{get-new-mail}, but its default value is @code{nil}, so you don't
4993 have to explicitly set it if you use a @code{nnmaildir} server just for
4994 mairix.)
4995
4996 @item
4997 If you use the Gnus registry: don't use the registry with
4998 @code{nnmairix} groups (put them in
4999 @code{gnus-registry-unfollowed-groups}).  Be @emph{extra careful} if
5000 you use @code{gnus-registry-split-fancy-with-parent}; mails which are
5001 split into @code{nnmairix} groups are usually gone for good as soon as
5002 you check the group for new mail (yes, it has happened to me...).
5003
5004 @item
5005 Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
5006 groups (you shouldn't be able to, anyway).
5007
5008 @item
5009 If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
5010 @code{nnmairix} groups (though I have no idea what happens if you do).
5011
5012 @item
5013 mairix does only support us-ascii characters.
5014
5015 @item
5016 @code{nnmairix} uses a rather brute force method to force Gnus to
5017 completely reread the group on the mail back end after mairix was
5018 called---it simply deletes and re-creates the group on the mail
5019 back end. So far, this has worked for me without any problems, and I
5020 don't see how @code{nnmairix} could delete other mail groups than its
5021 own, but anyway: you really should have a backup of your mail
5022 folders.
5023
5024 @item
5025 All necessary information is stored in the group parameters
5026 (@pxref{Group Parameters}). This has the advantage that no active file
5027 is needed, but also implies that when you kill a @code{nnmairix} group,
5028 it is gone for good.
5029
5030 @item
5031 @findex nnmairix-purge-old-groups
5032 If you create and kill a lot of @code{nnmairix} groups, the
5033 ``zz_mairix-*'' groups will accumulate on the mail back end server. To
5034 delete old groups which are no longer needed, call
5035 @code{nnmairix-purge-old-groups}. Note that this assumes that you don't
5036 save any ``real'' mail in folders of the form
5037 @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
5038 @code{nnmairix} groups by changing the variable
5039 @code{nnmairix-group-prefix}.
5040
5041 @item
5042 The following only applies if you @emph{don't} use the mentioned patch
5043 for mairix (@pxref{Propagating marks}):
5044
5045 A problem can occur when using @code{nnmairix} with maildir folders and
5046 comes with the fact that maildir stores mail flags like @samp{Seen} or
5047 @samp{Replied} by appending chars @samp{S} and @samp{R} to the message
5048 file name, respectively. This implies that currently you would have to
5049 update the mairix database not only when new mail arrives, but also when
5050 mail flags are changing. The same applies to new mails which are indexed
5051 while they are still in the @samp{new} folder but then get moved to
5052 @samp{cur} when Gnus has seen the mail. If you don't update the database
5053 after this has happened, a mairix query can lead to symlinks pointing to
5054 non-existing files. In Gnus, these messages will usually appear with
5055 ``(none)'' entries in the header and can't be accessed. If this happens
5056 to you, using @kbd{G b u} and updating the group will usually fix this.
5057
5058 @end itemize
5059
5060 @node Misc Group Stuff
5061 @section Misc Group Stuff
5062
5063 @menu
5064 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
5065 * Group Information::           Information and help on groups and Gnus.
5066 * Group Timestamp::             Making Gnus keep track of when you last read a group.
5067 * File Commands::               Reading and writing the Gnus files.
5068 * Sieve Commands::              Managing Sieve scripts.
5069 @end menu
5070
5071 @table @kbd
5072
5073 @item v
5074 @kindex v (Group)
5075 @cindex keys, reserved for users (Group)
5076 The key @kbd{v} is reserved for users.  You can bind it to some
5077 command or better use it as a prefix key.  For example:
5078
5079 @lisp
5080 (define-key gnus-group-mode-map (kbd "v j d")
5081   (lambda ()
5082     (interactive)
5083     (gnus-group-jump-to-group "nndraft:drafts")))
5084 @end lisp
5085
5086 On keys reserved for users in Emacs and on keybindings in general
5087 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
5088
5089 @item ^
5090 @kindex ^ (Group)
5091 @findex gnus-group-enter-server-mode
5092 Enter the server buffer (@code{gnus-group-enter-server-mode}).
5093 @xref{Server Buffer}.
5094
5095 @item a
5096 @kindex a (Group)
5097 @findex gnus-group-post-news
5098 Start composing a message (a news by default)
5099 (@code{gnus-group-post-news}).  If given a prefix, post to the group
5100 under the point.  If the prefix is 1, prompt for a group to post to.
5101 Contrary to what the name of this function suggests, the prepared
5102 article might be a mail instead of a news, if a mail group is specified
5103 with the prefix argument.  @xref{Composing Messages}.
5104
5105 @item m
5106 @kindex m (Group)
5107 @findex gnus-group-mail
5108 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
5109 use the posting style of the group under the point.  If the prefix is 1,
5110 prompt for a group name to find the posting style.
5111 @xref{Composing Messages}.
5112
5113 @item i
5114 @kindex i (Group)
5115 @findex gnus-group-news
5116 Start composing a news (@code{gnus-group-news}).  If given a prefix,
5117 post to the group under the point.  If the prefix is 1, prompt
5118 for group to post to.  @xref{Composing Messages}.
5119
5120 This function actually prepares a news even when using mail groups.
5121 This is useful for ``posting'' messages to mail groups without actually
5122 sending them over the network: they're just saved directly to the group
5123 in question.  The corresponding back end must have a request-post method
5124 for this to work though.
5125
5126 @item G z
5127 @kindex G z (Group)
5128 @findex gnus-group-compact-group
5129
5130 Compact the group under point (@code{gnus-group-compact-group}).
5131 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
5132 gaps between article numbers, hence getting a correct total article
5133 count.
5134
5135 @end table
5136
5137 Variables for the group buffer:
5138
5139 @table @code
5140
5141 @item gnus-group-mode-hook
5142 @vindex gnus-group-mode-hook
5143 is called after the group buffer has been
5144 created.
5145
5146 @item gnus-group-prepare-hook
5147 @vindex gnus-group-prepare-hook
5148 is called after the group buffer is
5149 generated.  It may be used to modify the buffer in some strange,
5150 unnatural way.
5151
5152 @item gnus-group-prepared-hook
5153 @vindex gnus-group-prepare-hook
5154 is called as the very last thing after the group buffer has been
5155 generated.  It may be used to move point around, for instance.
5156
5157 @item gnus-permanently-visible-groups
5158 @vindex gnus-permanently-visible-groups
5159 Groups matching this regexp will always be listed in the group buffer,
5160 whether they are empty or not.
5161
5162 @end table
5163
5164 @node Scanning New Messages
5165 @subsection Scanning New Messages
5166 @cindex new messages
5167 @cindex scanning new news
5168
5169 @table @kbd
5170
5171 @item g
5172 @kindex g (Group)
5173 @findex gnus-group-get-new-news
5174 @c @icon{gnus-group-get-new-news}
5175 Check the server(s) for new articles.  If the numerical prefix is used,
5176 this command will check only groups of level @var{arg} and lower
5177 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
5178 command will force a total re-reading of the active file(s) from the
5179 back end(s).
5180
5181 @item M-g
5182 @kindex M-g (Group)
5183 @findex gnus-group-get-new-news-this-group
5184 @vindex gnus-goto-next-group-when-activating
5185 @c @icon{gnus-group-get-new-news-this-group}
5186 Check whether new articles have arrived in the current group
5187 (@code{gnus-group-get-new-news-this-group}).
5188 @code{gnus-goto-next-group-when-activating} says whether this command is
5189 to move point to the next group or not.  It is @code{t} by default.
5190
5191 @findex gnus-activate-all-groups
5192 @cindex activating groups
5193 @item C-c M-g
5194 @kindex C-c M-g (Group)
5195 Activate absolutely all groups (@code{gnus-activate-all-groups}).
5196
5197 @item R
5198 @kindex R (Group)
5199 @cindex restarting
5200 @findex gnus-group-restart
5201 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
5202 file(s), closes the connection to all servers, clears up all run-time
5203 Gnus variables, and then starts Gnus all over again.
5204
5205 @end table
5206
5207 @vindex gnus-get-new-news-hook
5208 @code{gnus-get-new-news-hook} is run just before checking for new news.
5209
5210 @vindex gnus-after-getting-new-news-hook
5211 @code{gnus-after-getting-new-news-hook} is run after checking for new
5212 news.
5213
5214
5215 @node Group Information
5216 @subsection Group Information
5217 @cindex group information
5218 @cindex information on groups
5219
5220 @table @kbd
5221
5222
5223 @item H f
5224 @kindex H f (Group)
5225 @findex gnus-group-fetch-faq
5226 @vindex gnus-group-faq-directory
5227 @cindex FAQ
5228 @cindex ange-ftp
5229 Try to fetch the @acronym{FAQ} for the current group
5230 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
5231 from @code{gnus-group-faq-directory}, which is usually a directory on
5232 a remote machine.  This variable can also be a list of directories.
5233 In that case, giving a prefix to this command will allow you to choose
5234 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
5235 used for fetching the file.
5236
5237 If fetching from the first site is unsuccessful, Gnus will attempt to go
5238 through @code{gnus-group-faq-directory} and try to open them one by one.
5239
5240 @item H c
5241 @kindex H c (Group)
5242 @findex gnus-group-fetch-charter
5243 @vindex gnus-group-charter-alist
5244 @cindex charter
5245 Try to open the charter for the current group in a web browser
5246 (@code{gnus-group-fetch-charter}).  Query for a group if given a
5247 prefix argument.
5248
5249 Gnus will use @code{gnus-group-charter-alist} to find the location of
5250 the charter.  If no location is known, Gnus will fetch the control
5251 messages for the group, which in some cases includes the charter.
5252
5253 @item H C
5254 @kindex H C (Group)
5255 @findex gnus-group-fetch-control
5256 @vindex gnus-group-fetch-control-use-browse-url
5257 @cindex control message
5258 Fetch the control messages for the group from the archive at
5259 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
5260 group if given a prefix argument.
5261
5262 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
5263 Gnus will open the control messages in a browser using
5264 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
5265 and displayed in an ephemeral group.
5266
5267 Note that the control messages are compressed.  To use this command
5268 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
5269 Files, ,Compressed Files, emacs, The Emacs Manual}).
5270
5271 @item H d
5272 @itemx C-c C-d
5273 @c @icon{gnus-group-describe-group}
5274 @kindex H d (Group)
5275 @kindex C-c C-d (Group)
5276 @cindex describing groups
5277 @cindex group description
5278 @findex gnus-group-describe-group
5279 Describe the current group (@code{gnus-group-describe-group}).  If given
5280 a prefix, force Gnus to re-read the description from the server.
5281
5282 @item M-d
5283 @kindex M-d (Group)
5284 @findex gnus-group-describe-all-groups
5285 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
5286 prefix, force Gnus to re-read the description file from the server.
5287
5288 @item H v
5289 @itemx V
5290 @kindex V (Group)
5291 @kindex H v (Group)
5292 @cindex version
5293 @findex gnus-version
5294 Display current Gnus version numbers (@code{gnus-version}).
5295
5296 @item ?
5297 @kindex ? (Group)
5298 @findex gnus-group-describe-briefly
5299 Give a very short help message (@code{gnus-group-describe-briefly}).
5300
5301 @item C-c C-i
5302 @kindex C-c C-i (Group)
5303 @cindex info
5304 @cindex manual
5305 @findex gnus-info-find-node
5306 Go to the Gnus info node (@code{gnus-info-find-node}).
5307 @end table
5308
5309
5310 @node Group Timestamp
5311 @subsection Group Timestamp
5312 @cindex timestamps
5313 @cindex group timestamps
5314
5315 It can be convenient to let Gnus keep track of when you last read a
5316 group.  To set the ball rolling, you should add
5317 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
5318
5319 @lisp
5320 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
5321 @end lisp
5322
5323 After doing this, each time you enter a group, it'll be recorded.
5324
5325 This information can be displayed in various ways---the easiest is to
5326 use the @samp{%d} spec in the group line format:
5327
5328 @lisp
5329 (setq gnus-group-line-format
5330       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
5331 @end lisp
5332
5333 This will result in lines looking like:
5334
5335 @example
5336 *        0: mail.ding                                19961002T012943
5337          0: custom                                   19961002T012713
5338 @end example
5339
5340 As you can see, the date is displayed in compact ISO 8601 format.  This
5341 may be a bit too much, so to just display the date, you could say
5342 something like:
5343
5344 @lisp
5345 (setq gnus-group-line-format
5346       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
5347 @end lisp
5348
5349 If you would like greater control of the time format, you can use a
5350 user-defined format spec.  Something like the following should do the
5351 trick:
5352
5353 @lisp
5354 (setq gnus-group-line-format
5355       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
5356 (defun gnus-user-format-function-d (headers)
5357   (let ((time (gnus-group-timestamp gnus-tmp-group)))
5358     (if time
5359         (format-time-string "%b %d  %H:%M" time)
5360       "")))
5361 @end lisp
5362
5363
5364 @node File Commands
5365 @subsection File Commands
5366 @cindex file commands
5367
5368 @table @kbd
5369
5370 @item r
5371 @kindex r (Group)
5372 @findex gnus-group-read-init-file
5373 @vindex gnus-init-file
5374 @cindex reading init file
5375 Re-read the init file (@code{gnus-init-file}, which defaults to
5376 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
5377
5378 @item s
5379 @kindex s (Group)
5380 @findex gnus-group-save-newsrc
5381 @cindex saving .newsrc
5382 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
5383 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
5384 file(s) whether Gnus thinks it is necessary or not.
5385
5386 @c @item Z
5387 @c @kindex Z (Group)
5388 @c @findex gnus-group-clear-dribble
5389 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
5390
5391 @end table
5392
5393
5394 @node Sieve Commands
5395 @subsection Sieve Commands
5396 @cindex group sieve commands
5397
5398 Sieve is a server-side mail filtering language.  In Gnus you can use
5399 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
5400 sieve rules that should apply to each group.  Gnus provides two
5401 commands to translate all these group parameters into a proper Sieve
5402 script that can be transfered to the server somehow.
5403
5404 @vindex gnus-sieve-file
5405 @vindex gnus-sieve-region-start
5406 @vindex gnus-sieve-region-end
5407 The generated Sieve script is placed in @code{gnus-sieve-file} (by
5408 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
5409 between two delimiters, @code{gnus-sieve-region-start} and
5410 @code{gnus-sieve-region-end}, so you may write additional Sieve code
5411 outside these delimiters that will not be removed the next time you
5412 regenerate the Sieve script.
5413
5414 @vindex gnus-sieve-crosspost
5415 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
5416 is generated.  If it is non-@code{nil} (the default) articles is
5417 placed in all groups that have matching rules, otherwise the article
5418 is only placed in the group with the first matching rule.  For
5419 example, the group parameter @samp{(sieve address "sender"
5420 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
5421 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
5422 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
5423 except that the line containing the call to @code{stop} is removed.)
5424
5425 @example
5426 if address "sender" "owner-ding@@hpc.uh.edu" @{
5427         fileinto "INBOX.ding";
5428         stop;
5429 @}
5430 @end example
5431
5432 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
5433
5434 @table @kbd
5435
5436 @item D g
5437 @kindex D g (Group)
5438 @findex gnus-sieve-generate
5439 @vindex gnus-sieve-file
5440 @cindex generating sieve script
5441 Regenerate a Sieve script from the @code{sieve} group parameters and
5442 put you into the @code{gnus-sieve-file} without saving it.
5443
5444 @item D u
5445 @kindex D u (Group)
5446 @findex gnus-sieve-update
5447 @vindex gnus-sieve-file
5448 @cindex updating sieve script
5449 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
5450 @code{sieve} group parameters, save the file and upload it to the
5451 server using the @code{sieveshell} program.
5452
5453 @end table
5454
5455
5456 @node Summary Buffer
5457 @chapter Summary Buffer
5458 @cindex summary buffer
5459
5460 A line for each article is displayed in the summary buffer.  You can
5461 move around, read articles, post articles and reply to articles.
5462
5463 The most common way to a summary buffer is to select a group from the
5464 group buffer (@pxref{Selecting a Group}).
5465
5466 You can have as many summary buffers open as you wish.
5467
5468 You can customize the Summary Mode tool bar, see @kbd{M-x
5469 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
5470 available in Emacs.
5471
5472 @kindex v (Summary)
5473 @cindex keys, reserved for users (Summary)
5474 The key @kbd{v} is reserved for users.  You can bind it to some
5475 command or better use it as a prefix key.  For example:
5476 @lisp
5477 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
5478 @end lisp
5479
5480 @menu
5481 * Summary Buffer Format::       Deciding how the summary buffer is to look.
5482 * Summary Maneuvering::         Moving around the summary buffer.
5483 * Choosing Articles::           Reading articles.
5484 * Paging the Article::          Scrolling the current article.
5485 * Reply Followup and Post::     Posting articles.
5486 * Delayed Articles::            Send articles at a later time.
5487 * Marking Articles::            Marking articles as read, expirable, etc.
5488 * Limiting::                    You can limit the summary buffer.
5489 * Threading::                   How threads are made.
5490 * Sorting the Summary Buffer::  How articles and threads are sorted.
5491 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
5492 * Article Caching::             You may store articles in a cache.
5493 * Persistent Articles::         Making articles expiry-resistant.
5494 * Sticky Articles::             Article buffers that are not reused.
5495 * Article Backlog::             Having already read articles hang around.
5496 * Saving Articles::             Ways of customizing article saving.
5497 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
5498 * Article Treatment::           The article buffer can be mangled at will.
5499 * MIME Commands::               Doing MIMEy things with the articles.
5500 * Charsets::                    Character set issues.
5501 * Article Commands::            Doing various things with the article buffer.
5502 * Summary Sorting::             Sorting the summary buffer in various ways.
5503 * Finding the Parent::          No child support? Get the parent.
5504 * Alternative Approaches::      Reading using non-default summaries.
5505 * Tree Display::                A more visual display of threads.
5506 * Mail Group Commands::         Some commands can only be used in mail groups.
5507 * Various Summary Stuff::       What didn't fit anywhere else.
5508 * Exiting the Summary Buffer::  Returning to the Group buffer,
5509                                 or reselecting the current group.
5510 * Crosspost Handling::          How crossposted articles are dealt with.
5511 * Duplicate Suppression::       An alternative when crosspost handling fails.
5512 * Security::                    Decrypt and Verify.
5513 * Mailing List::                Mailing list minor mode.
5514 @end menu
5515
5516
5517 @node Summary Buffer Format
5518 @section Summary Buffer Format
5519 @cindex summary buffer format
5520
5521 @iftex
5522 @iflatex
5523 \gnusfigure{The Summary Buffer}{180}{
5524 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
5525 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
5526 }
5527 @end iflatex
5528 @end iftex
5529
5530 @menu
5531 * Summary Buffer Lines::        You can specify how summary lines should look.
5532 * To From Newsgroups::          How to not display your own name.
5533 * Summary Buffer Mode Line::    You can say how the mode line should look.
5534 * Summary Highlighting::        Making the summary buffer all pretty and nice.
5535 @end menu
5536
5537 @findex mail-extract-address-components
5538 @findex gnus-extract-address-components
5539 @vindex gnus-extract-address-components
5540 Gnus will use the value of the @code{gnus-extract-address-components}
5541 variable as a function for getting the name and address parts of a
5542 @code{From} header.  Two pre-defined functions exist:
5543 @code{gnus-extract-address-components}, which is the default, quite
5544 fast, and too simplistic solution; and
5545 @code{mail-extract-address-components}, which works very nicely, but is
5546 slower.  The default function will return the wrong answer in 5% of the
5547 cases.  If this is unacceptable to you, use the other function instead:
5548
5549 @lisp
5550 (setq gnus-extract-address-components
5551       'mail-extract-address-components)
5552 @end lisp
5553
5554 @vindex gnus-summary-same-subject
5555 @code{gnus-summary-same-subject} is a string indicating that the current
5556 article has the same subject as the previous.  This string will be used
5557 with those specs that require it.  The default is @code{""}.
5558
5559
5560 @node Summary Buffer Lines
5561 @subsection Summary Buffer Lines
5562
5563 @vindex gnus-summary-line-format
5564 You can change the format of the lines in the summary buffer by changing
5565 the @code{gnus-summary-line-format} variable.  It works along the same
5566 lines as a normal @code{format} string, with some extensions
5567 (@pxref{Formatting Variables}).
5568
5569 There should always be a colon or a point position marker on the line;
5570 the cursor always moves to the point position marker or the colon after
5571 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
5572 possible to change this.  Just write a new function
5573 @code{gnus-goto-colon} which does whatever you like with the cursor.)
5574 @xref{Positioning Point}.
5575
5576 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
5577
5578 The following format specification characters and extended format
5579 specification(s) are understood:
5580
5581 @table @samp
5582 @item N
5583 Article number.
5584 @item S
5585 Subject string.  List identifiers stripped,
5586 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
5587 @item s
5588 Subject if the article is the root of the thread or the previous article
5589 had a different subject, @code{gnus-summary-same-subject} otherwise.
5590 (@code{gnus-summary-same-subject} defaults to @code{""}.)
5591 @item F
5592 Full @code{From} header.
5593 @item n
5594 The name (from the @code{From} header).
5595 @item f
5596 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
5597 From Newsgroups}).
5598 @item a
5599 The name (from the @code{From} header).  This differs from the @code{n}
5600 spec in that it uses the function designated by the
5601 @code{gnus-extract-address-components} variable, which is slower, but
5602 may be more thorough.
5603 @item A
5604 The address (from the @code{From} header).  This works the same way as
5605 the @code{a} spec.
5606 @item L
5607 Number of lines in the article.
5608 @item c
5609 Number of characters in the article.  This specifier is not supported
5610 in some methods (like nnfolder).
5611 @item k
5612 Pretty-printed version of the number of characters in the article;
5613 for example, @samp{1.2k} or @samp{0.4M}.
5614 @item I
5615 Indentation based on thread level (@pxref{Customizing Threading}).
5616 @item B
5617 A complex trn-style thread tree, showing response-connecting trace
5618 lines.  A thread could be drawn like this:
5619
5620 @example
5621 >
5622 +->
5623 | +->
5624 | | \->
5625 | |   \->
5626 | \->
5627 +->
5628 \->
5629 @end example
5630
5631 You can customize the appearance with the following options.  Note
5632 that it is possible to make the thread display look really neat by
5633 replacing the default @acronym{ASCII} characters with graphic
5634 line-drawing glyphs.
5635 @table @code
5636 @item gnus-sum-thread-tree-root
5637 @vindex gnus-sum-thread-tree-root
5638 Used for the root of a thread.  If @code{nil}, use subject
5639 instead.  The default is @samp{> }.
5640
5641 @item gnus-sum-thread-tree-false-root
5642 @vindex gnus-sum-thread-tree-false-root
5643 Used for the false root of a thread (@pxref{Loose Threads}).  If
5644 @code{nil}, use subject instead.  The default is @samp{> }.
5645
5646 @item gnus-sum-thread-tree-single-indent
5647 @vindex gnus-sum-thread-tree-single-indent
5648 Used for a thread with just one message.  If @code{nil}, use subject
5649 instead.  The default is @samp{}.
5650
5651 @item gnus-sum-thread-tree-vertical
5652 @vindex gnus-sum-thread-tree-vertical
5653 Used for drawing a vertical line.  The default is @samp{| }.
5654
5655 @item gnus-sum-thread-tree-indent
5656 @vindex gnus-sum-thread-tree-indent
5657 Used for indenting.  The default is @samp{  }.
5658
5659 @item gnus-sum-thread-tree-leaf-with-other
5660 @vindex gnus-sum-thread-tree-leaf-with-other
5661 Used for a leaf with brothers.  The default is @samp{+-> }.
5662
5663 @item gnus-sum-thread-tree-single-leaf
5664 @vindex gnus-sum-thread-tree-single-leaf
5665 Used for a leaf without brothers.  The default is @samp{\-> }
5666
5667 @end table
5668
5669 @item T
5670 Nothing if the article is a root and lots of spaces if it isn't (it
5671 pushes everything after it off the screen).
5672 @item [
5673 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5674 for adopted articles (@pxref{Customizing Threading}).
5675 @item ]
5676 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5677 for adopted articles.
5678 @item >
5679 One space for each thread level.
5680 @item <
5681 Twenty minus thread level spaces.
5682 @item U
5683 Unread.  @xref{Read Articles}.
5684
5685 @item R
5686 This misleadingly named specifier is the @dfn{secondary mark}.  This
5687 mark will say whether the article has been replied to, has been cached,
5688 or has been saved.  @xref{Other Marks}.
5689
5690 @item i
5691 Score as a number (@pxref{Scoring}).
5692 @item z
5693 @vindex gnus-summary-zcore-fuzz
5694 Zcore, @samp{+} if above the default level and @samp{-} if below the
5695 default level.  If the difference between
5696 @code{gnus-summary-default-score} and the score is less than
5697 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5698 @item V
5699 Total thread score.
5700 @item x
5701 @code{Xref}.
5702 @item D
5703 @code{Date}.
5704 @item d
5705 The @code{Date} in @code{DD-MMM} format.
5706 @item o
5707 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5708 @item M
5709 @code{Message-ID}.
5710 @item r
5711 @code{References}.
5712 @item t
5713 Number of articles in the current sub-thread.  Using this spec will slow
5714 down summary buffer generation somewhat.
5715 @item e
5716 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5717 article has any children.
5718 @item P
5719 The line number.
5720 @item O
5721 Download mark.
5722 @item *
5723 Desired cursor position (instead of after first colon).
5724 @item &user-date;
5725 Age sensitive date format.  Various date format is defined in
5726 @code{gnus-user-date-format-alist}.
5727 @item u
5728 User defined specifier.  The next character in the format string should
5729 be a letter.  Gnus will call the function
5730 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5731 following @samp{%u}.  The function will be passed the current header as
5732 argument.  The function should return a string, which will be inserted
5733 into the summary just like information from any other summary specifier.
5734 @end table
5735
5736 Text between @samp{%(} and @samp{%)} will be highlighted with
5737 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5738 There can only be one such area.
5739
5740 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5741 have to be handled with care.  For reasons of efficiency, Gnus will
5742 compute what column these characters will end up in, and ``hard-code''
5743 that.  This means that it is invalid to have these specs after a
5744 variable-length spec.  Well, you might not be arrested, but your summary
5745 buffer will look strange, which is bad enough.
5746
5747 The smart choice is to have these specs as far to the left as possible.
5748 (Isn't that the case with everything, though?  But I digress.)
5749
5750 This restriction may disappear in later versions of Gnus.
5751
5752
5753 @node To From Newsgroups
5754 @subsection To From Newsgroups
5755 @cindex To
5756 @cindex Newsgroups
5757
5758 In some groups (particularly in archive groups), the @code{From} header
5759 isn't very interesting, since all the articles there are written by
5760 you.  To display the information in the @code{To} or @code{Newsgroups}
5761 headers instead, you need to decide three things: What information to
5762 gather; where to display it; and when to display it.
5763
5764 @enumerate
5765 @item
5766 @vindex gnus-extra-headers
5767 The reading of extra header information is controlled by the
5768 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5769 instance:
5770
5771 @lisp
5772 (setq gnus-extra-headers
5773       '(To Newsgroups X-Newsreader))
5774 @end lisp
5775
5776 This will result in Gnus trying to obtain these three headers, and
5777 storing it in header structures for later easy retrieval.
5778
5779 @item
5780 @findex gnus-extra-header
5781 The value of these extra headers can be accessed via the
5782 @code{gnus-extra-header} function.  Here's a format line spec that will
5783 access the @code{X-Newsreader} header:
5784
5785 @example
5786 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5787 @end example
5788
5789 @item
5790 @vindex gnus-ignored-from-addresses
5791 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5792 summary line spec returns the @code{To}, @code{Newsreader} or
5793 @code{From} header.  If this regexp matches the contents of the
5794 @code{From} header, the value of the @code{To} or @code{Newsreader}
5795 headers are used instead.
5796
5797 To distinguish regular articles from those where the @code{From} field
5798 has been swapped, a string is prefixed to the @code{To} or
5799 @code{Newsgroups} header in the summary line.  By default the string is
5800 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5801 customize these strings with @code{gnus-summary-to-prefix} and
5802 @code{gnus-summary-newsgroup-prefix}.
5803
5804 @end enumerate
5805
5806 @vindex nnmail-extra-headers
5807 A related variable is @code{nnmail-extra-headers}, which controls when
5808 to include extra headers when generating overview (@acronym{NOV}) files.
5809 If you have old overview files, you should regenerate them after
5810 changing this variable, by entering the server buffer using @kbd{^},
5811 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5812 regeneration.
5813
5814 @vindex gnus-summary-line-format
5815 You also have to instruct Gnus to display the data by changing the
5816 @code{%n} spec to the @code{%f} spec in the
5817 @code{gnus-summary-line-format} variable.
5818
5819 In summary, you'd typically put something like the following in
5820 @file{~/.gnus.el}:
5821
5822 @lisp
5823 (setq gnus-extra-headers
5824       '(To Newsgroups))
5825 (setq nnmail-extra-headers gnus-extra-headers)
5826 (setq gnus-summary-line-format
5827       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5828 (setq gnus-ignored-from-addresses
5829       "Your Name Here")
5830 @end lisp
5831
5832 (The values listed above are the default values in Gnus.  Alter them
5833 to fit your needs.)
5834
5835 A note for news server administrators, or for users who wish to try to
5836 convince their news server administrator to provide some additional
5837 support:
5838
5839 The above is mostly useful for mail groups, where you have control over
5840 the @acronym{NOV} files that are created.  However, if you can persuade your
5841 nntp admin to add (in the usual implementation, notably INN):
5842
5843 @example
5844 Newsgroups:full
5845 @end example
5846
5847 to the end of her @file{overview.fmt} file, then you can use that just
5848 as you would the extra headers from the mail groups.
5849
5850
5851 @node Summary Buffer Mode Line
5852 @subsection Summary Buffer Mode Line
5853
5854 @vindex gnus-summary-mode-line-format
5855 You can also change the format of the summary mode bar (@pxref{Mode Line
5856 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5857 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5858
5859 Here are the elements you can play with:
5860
5861 @table @samp
5862 @item G
5863 Group name.
5864 @item p
5865 Unprefixed group name.
5866 @item A
5867 Current article number.
5868 @item z
5869 Current article score.
5870 @item V
5871 Gnus version.
5872 @item U
5873 Number of unread articles in this group.
5874 @item e
5875 Number of unread articles in this group that aren't displayed in the
5876 summary buffer.
5877 @item Z
5878 A string with the number of unread and unselected articles represented
5879 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5880 articles, and just as @samp{<%U more>} if there are just unread articles
5881 and no unselected ones.
5882 @item g
5883 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5884 shortened to @samp{r.a.anime}.
5885 @item S
5886 Subject of the current article.
5887 @item u
5888 User-defined spec (@pxref{User-Defined Specs}).
5889 @item s
5890 Name of the current score file (@pxref{Scoring}).
5891 @item d
5892 Number of dormant articles (@pxref{Unread Articles}).
5893 @item t
5894 Number of ticked articles (@pxref{Unread Articles}).
5895 @item r
5896 Number of articles that have been marked as read in this session.
5897 @item E
5898 Number of articles expunged by the score files.
5899 @end table
5900
5901
5902 @node Summary Highlighting
5903 @subsection Summary Highlighting
5904
5905 @table @code
5906
5907 @item gnus-visual-mark-article-hook
5908 @vindex gnus-visual-mark-article-hook
5909 This hook is run after selecting an article.  It is meant to be used for
5910 highlighting the article in some way.  It is not run if
5911 @code{gnus-visual} is @code{nil}.
5912
5913 @item gnus-summary-update-hook
5914 @vindex gnus-summary-update-hook
5915 This hook is called when a summary line is changed.  It is not run if
5916 @code{gnus-visual} is @code{nil}.
5917
5918 @item gnus-summary-selected-face
5919 @vindex gnus-summary-selected-face
5920 This is the face (or @dfn{font} as some people call it) used to
5921 highlight the current article in the summary buffer.
5922
5923 @item gnus-summary-highlight
5924 @vindex gnus-summary-highlight
5925 Summary lines are highlighted according to this variable, which is a
5926 list where the elements are of the format @code{(@var{form}
5927 . @var{face})}.  If you would, for instance, like ticked articles to be
5928 italic and high-scored articles to be bold, you could set this variable
5929 to something like
5930 @lisp
5931 (((eq mark gnus-ticked-mark) . italic)
5932  ((> score default) . bold))
5933 @end lisp
5934 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5935 @var{face} will be applied to the line.
5936 @end table
5937
5938
5939 @node Summary Maneuvering
5940 @section Summary Maneuvering
5941 @cindex summary movement
5942
5943 All the straight movement commands understand the numeric prefix and
5944 behave pretty much as you'd expect.
5945
5946 None of these commands select articles.
5947
5948 @table @kbd
5949 @item G M-n
5950 @itemx M-n
5951 @kindex M-n (Summary)
5952 @kindex G M-n (Summary)
5953 @findex gnus-summary-next-unread-subject
5954 Go to the next summary line of an unread article
5955 (@code{gnus-summary-next-unread-subject}).
5956
5957 @item G M-p
5958 @itemx M-p
5959 @kindex M-p (Summary)
5960 @kindex G M-p (Summary)
5961 @findex gnus-summary-prev-unread-subject
5962 Go to the previous summary line of an unread article
5963 (@code{gnus-summary-prev-unread-subject}).
5964
5965 @item G g
5966 @kindex G g (Summary)
5967 @findex gnus-summary-goto-subject
5968 Ask for an article number and then go to the summary line of that article
5969 without displaying the article (@code{gnus-summary-goto-subject}).
5970 @end table
5971
5972 If Gnus asks you to press a key to confirm going to the next group, you
5973 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5974 buffer, searching for the next group to read without actually returning
5975 to the group buffer.
5976
5977 Variables related to summary movement:
5978
5979 @table @code
5980
5981 @vindex gnus-auto-select-next
5982 @item gnus-auto-select-next
5983 If you issue one of the movement commands (like @kbd{n}) and there are
5984 no more unread articles after the current one, Gnus will offer to go to
5985 the next group.  If this variable is @code{t} and the next group is
5986 empty, Gnus will exit summary mode and return to the group buffer.  If
5987 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5988 next group with unread articles.  As a special case, if this variable
5989 is @code{quietly}, Gnus will select the next group without asking for
5990 confirmation.  If this variable is @code{almost-quietly}, the same
5991 will happen only if you are located on the last article in the group.
5992 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5993 command will go to the next group without confirmation.  Also
5994 @pxref{Group Levels}.
5995
5996 @item gnus-auto-select-same
5997 @vindex gnus-auto-select-same
5998 If non-@code{nil}, all the movement commands will try to go to the next
5999 article with the same subject as the current.  (@dfn{Same} here might
6000 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
6001 for details (@pxref{Customizing Threading}).)  If there are no more
6002 articles with the same subject, go to the first unread article.
6003
6004 This variable is not particularly useful if you use a threaded display.
6005
6006 @item gnus-summary-check-current
6007 @vindex gnus-summary-check-current
6008 If non-@code{nil}, all the ``unread'' movement commands will not proceed
6009 to the next (or previous) article if the current article is unread.
6010 Instead, they will choose the current article.
6011
6012 @item gnus-auto-center-summary
6013 @vindex gnus-auto-center-summary
6014 If non-@code{nil}, Gnus will keep the point in the summary buffer
6015 centered at all times.  This makes things quite tidy, but if you have a
6016 slow network connection, or simply do not like this un-Emacsism, you can
6017 set this variable to @code{nil} to get the normal Emacs scrolling
6018 action.  This will also inhibit horizontal re-centering of the summary
6019 buffer, which might make it more inconvenient to read extremely long
6020 threads.
6021
6022 This variable can also be a number.  In that case, center the window at
6023 the given number of lines from the top.
6024
6025 @item gnus-summary-stop-at-end-of-message
6026 @vindex gnus-summary-stop-at-end-of-message
6027 If non-@code{nil}, don't go to the next article when hitting
6028 @kbd{SPC}, and you're at the end of the article.
6029
6030 @end table
6031
6032
6033 @node Choosing Articles
6034 @section Choosing Articles
6035 @cindex selecting articles
6036
6037 @menu
6038 * Choosing Commands::           Commands for choosing articles.
6039 * Choosing Variables::          Variables that influence these commands.
6040 @end menu
6041
6042
6043 @node Choosing Commands
6044 @subsection Choosing Commands
6045
6046 None of the following movement commands understand the numeric prefix,
6047 and they all select and display an article.
6048
6049 If you want to fetch new articles or redisplay the group, see
6050 @ref{Exiting the Summary Buffer}.
6051
6052 @table @kbd
6053 @item SPACE
6054 @kindex SPACE (Summary)
6055 @findex gnus-summary-next-page
6056 Select the current article, or, if that one's read already, the next
6057 unread article (@code{gnus-summary-next-page}).
6058
6059 If you have an article window open already and you press @kbd{SPACE}
6060 again, the article will be scrolled.  This lets you conveniently
6061 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
6062
6063 @item G n
6064 @itemx n
6065 @kindex n (Summary)
6066 @kindex G n (Summary)
6067 @findex gnus-summary-next-unread-article
6068 @c @icon{gnus-summary-next-unread}
6069 Go to next unread article (@code{gnus-summary-next-unread-article}).
6070
6071 @item G p
6072 @itemx p
6073 @kindex p (Summary)
6074 @findex gnus-summary-prev-unread-article
6075 @c @icon{gnus-summary-prev-unread}
6076 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
6077
6078 @item G N
6079 @itemx N
6080 @kindex N (Summary)
6081 @kindex G N (Summary)
6082 @findex gnus-summary-next-article
6083 Go to the next article (@code{gnus-summary-next-article}).
6084
6085 @item G P
6086 @itemx P
6087 @kindex P (Summary)
6088 @kindex G P (Summary)
6089 @findex gnus-summary-prev-article
6090 Go to the previous article (@code{gnus-summary-prev-article}).
6091
6092 @item G C-n
6093 @kindex G C-n (Summary)
6094 @findex gnus-summary-next-same-subject
6095 Go to the next article with the same subject
6096 (@code{gnus-summary-next-same-subject}).
6097
6098 @item G C-p
6099 @kindex G C-p (Summary)
6100 @findex gnus-summary-prev-same-subject
6101 Go to the previous article with the same subject
6102 (@code{gnus-summary-prev-same-subject}).
6103
6104 @item G f
6105 @itemx .
6106 @kindex G f  (Summary)
6107 @kindex .  (Summary)
6108 @findex gnus-summary-first-unread-article
6109 Go to the first unread article
6110 (@code{gnus-summary-first-unread-article}).
6111
6112 @item G b
6113 @itemx ,
6114 @kindex G b (Summary)
6115 @kindex , (Summary)
6116 @findex gnus-summary-best-unread-article
6117 Go to the unread article with the highest score
6118 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
6119 go to the first unread article that has a score over the default score.
6120
6121 @item G l
6122 @itemx l
6123 @kindex l (Summary)
6124 @kindex G l (Summary)
6125 @findex gnus-summary-goto-last-article
6126 Go to the previous article read (@code{gnus-summary-goto-last-article}).
6127
6128 @item G o
6129 @kindex G o (Summary)
6130 @findex gnus-summary-pop-article
6131 @cindex history
6132 @cindex article history
6133 Pop an article off the summary history and go to this article
6134 (@code{gnus-summary-pop-article}).  This command differs from the
6135 command above in that you can pop as many previous articles off the
6136 history as you like, while @kbd{l} toggles the two last read articles.
6137 For a somewhat related issue (if you use these commands a lot),
6138 @pxref{Article Backlog}.
6139
6140 @item G j
6141 @itemx j
6142 @kindex j (Summary)
6143 @kindex G j (Summary)
6144 @findex gnus-summary-goto-article
6145 Ask for an article number or @code{Message-ID}, and then go to that
6146 article (@code{gnus-summary-goto-article}).
6147
6148 @end table
6149
6150
6151 @node Choosing Variables
6152 @subsection Choosing Variables
6153
6154 Some variables relevant for moving and selecting articles:
6155
6156 @table @code
6157 @item gnus-auto-extend-newsgroup
6158 @vindex gnus-auto-extend-newsgroup
6159 All the movement commands will try to go to the previous (or next)
6160 article, even if that article isn't displayed in the Summary buffer if
6161 this variable is non-@code{nil}.  Gnus will then fetch the article from
6162 the server and display it in the article buffer.
6163
6164 @item gnus-select-article-hook
6165 @vindex gnus-select-article-hook
6166 This hook is called whenever an article is selected.  The default is
6167 @code{nil}.  If you would like each article to be saved in the Agent as
6168 you read it, putting @code{gnus-agent-fetch-selected-article} on this
6169 hook will do so.
6170
6171 @item gnus-mark-article-hook
6172 @vindex gnus-mark-article-hook
6173 @findex gnus-summary-mark-unread-as-read
6174 @findex gnus-summary-mark-read-and-unread-as-read
6175 @findex gnus-unread-mark
6176 This hook is called whenever an article is selected.  It is intended to
6177 be used for marking articles as read.  The default value is
6178 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
6179 mark of almost any article you read to @code{gnus-read-mark}.  The only
6180 articles not affected by this function are ticked, dormant, and
6181 expirable articles.  If you'd instead like to just have unread articles
6182 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
6183 instead.  It will leave marks like @code{gnus-low-score-mark},
6184 @code{gnus-del-mark} (and so on) alone.
6185
6186 @end table
6187
6188
6189 @node Paging the Article
6190 @section Scrolling the Article
6191 @cindex article scrolling
6192
6193 @table @kbd
6194
6195 @item SPACE
6196 @kindex SPACE (Summary)
6197 @findex gnus-summary-next-page
6198 Pressing @kbd{SPACE} will scroll the current article forward one page,
6199 or, if you have come to the end of the current article, will choose the
6200 next article (@code{gnus-summary-next-page}).
6201
6202 @vindex gnus-article-boring-faces
6203 @vindex gnus-article-skip-boring
6204 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
6205 the article consists only of citations and signature, then it will be
6206 skipped; the next article will be shown instead.  You can customize
6207 what is considered uninteresting with
6208 @code{gnus-article-boring-faces}.  You can manually view the article's
6209 pages, no matter how boring, using @kbd{C-M-v}.
6210
6211 @item DEL
6212 @kindex DEL (Summary)
6213 @findex gnus-summary-prev-page
6214 Scroll the current article back one page (@code{gnus-summary-prev-page}).
6215
6216 @item RET
6217 @kindex RET (Summary)
6218 @findex gnus-summary-scroll-up
6219 Scroll the current article one line forward
6220 (@code{gnus-summary-scroll-up}).
6221
6222 @item M-RET
6223 @kindex M-RET (Summary)
6224 @findex gnus-summary-scroll-down
6225 Scroll the current article one line backward
6226 (@code{gnus-summary-scroll-down}).
6227
6228 @item A g
6229 @itemx g
6230 @kindex A g (Summary)
6231 @kindex g (Summary)
6232 @findex gnus-summary-show-article
6233 @vindex gnus-summary-show-article-charset-alist
6234 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
6235 given a prefix, fetch the current article, but don't run any of the
6236 article treatment functions.  This will give you a ``raw'' article, just
6237 the way it came from the server.
6238
6239 @cindex charset, view article with different charset
6240 If given a numerical prefix, you can do semi-manual charset stuff.
6241 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
6242 encoded in the @code{cn-gb-2312} charset.  If you have
6243
6244 @lisp
6245 (setq gnus-summary-show-article-charset-alist
6246       '((1 . cn-gb-2312)
6247         (2 . big5)))
6248 @end lisp
6249
6250 then you can say @kbd{C-u 1 g} to get the same effect.
6251
6252 @item A <
6253 @itemx <
6254 @kindex < (Summary)
6255 @kindex A < (Summary)
6256 @findex gnus-summary-beginning-of-article
6257 Scroll to the beginning of the article
6258 (@code{gnus-summary-beginning-of-article}).
6259
6260 @item A >
6261 @itemx >
6262 @kindex > (Summary)
6263 @kindex A > (Summary)
6264 @findex gnus-summary-end-of-article
6265 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
6266
6267 @item A s
6268 @itemx s
6269 @kindex A s (Summary)
6270 @kindex s (Summary)
6271 @findex gnus-summary-isearch-article
6272 Perform an isearch in the article buffer
6273 (@code{gnus-summary-isearch-article}).
6274
6275 @item h
6276 @kindex h (Summary)
6277 @findex gnus-summary-select-article-buffer
6278 Select the article buffer (@code{gnus-summary-select-article-buffer}).
6279
6280 @end table
6281
6282
6283 @node Reply Followup and Post
6284 @section Reply, Followup and Post
6285
6286 @menu
6287 * Summary Mail Commands::       Sending mail.
6288 * Summary Post Commands::       Sending news.
6289 * Summary Message Commands::    Other Message-related commands.
6290 * Canceling and Superseding::
6291 @end menu
6292
6293
6294 @node Summary Mail Commands
6295 @subsection Summary Mail Commands
6296 @cindex mail
6297 @cindex composing mail
6298
6299 Commands for composing a mail message:
6300
6301 @table @kbd
6302
6303 @item S r
6304 @itemx r
6305 @kindex S r (Summary)
6306 @kindex r (Summary)
6307 @findex gnus-summary-reply
6308 @c @icon{gnus-summary-mail-reply}
6309 @c @icon{gnus-summary-reply}
6310 Mail a reply to the author of the current article
6311 (@code{gnus-summary-reply}).
6312
6313 @item S R
6314 @itemx R
6315 @kindex R (Summary)
6316 @kindex S R (Summary)
6317 @findex gnus-summary-reply-with-original
6318 @c @icon{gnus-summary-reply-with-original}
6319 Mail a reply to the author of the current article and include the
6320 original message (@code{gnus-summary-reply-with-original}).  This
6321 command uses the process/prefix convention.
6322
6323 @item S w
6324 @kindex S w (Summary)
6325 @findex gnus-summary-wide-reply
6326 Mail a wide reply to the author of the current article
6327 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
6328 goes out to all people listed in the @code{To}, @code{From} (or
6329 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
6330 present, that's used instead.
6331
6332 @item S W
6333 @kindex S W (Summary)
6334 @findex gnus-summary-wide-reply-with-original
6335 Mail a wide reply to the current article and include the original
6336 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
6337 the process/prefix convention, but only uses the headers from the
6338 first article to determine the recipients.
6339
6340 @item S v
6341 @kindex S v (Summary)
6342 @findex gnus-summary-very-wide-reply
6343 Mail a very wide reply to the author of the current article
6344 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
6345 that goes out to all people listed in the @code{To}, @code{From} (or
6346 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
6347 articles.  This command uses the process/prefix convention.
6348
6349 @item S V
6350 @kindex S V (Summary)
6351 @findex gnus-summary-very-wide-reply-with-original
6352 Mail a very wide reply to the author of the current article and include the
6353 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
6354 command uses the process/prefix convention.
6355
6356 @item S B r
6357 @kindex S B r (Summary)
6358 @findex gnus-summary-reply-broken-reply-to
6359 Mail a reply to the author of the current article but ignore the
6360 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
6361 If you need this because a mailing list incorrectly sets a
6362 @code{Reply-To} header pointing to the list, you probably want to set
6363 the @code{broken-reply-to} group parameter instead, so things will work
6364 correctly.  @xref{Group Parameters}.
6365
6366 @item S B R
6367 @kindex S B R (Summary)
6368 @findex gnus-summary-reply-broken-reply-to-with-original
6369 Mail a reply to the author of the current article and include the
6370 original message but ignore the @code{Reply-To} field
6371 (@code{gnus-summary-reply-broken-reply-to-with-original}).
6372
6373 @item S o m
6374 @itemx C-c C-f
6375 @kindex S o m (Summary)
6376 @kindex C-c C-f (Summary)
6377 @findex gnus-summary-mail-forward
6378 @c @icon{gnus-summary-mail-forward}
6379 Forward the current article to some other person
6380 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
6381 is forwarded according to the value of (@code{message-forward-as-mime})
6382 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
6383 message and forward directly inline; if the prefix is 2, forward message
6384 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6385 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6386 directly inline; otherwise, the message is forwarded as no prefix given
6387 but use the flipped value of (@code{message-forward-as-mime}).  By
6388 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
6389 section.
6390
6391 @item S m
6392 @itemx m
6393 @kindex m (Summary)
6394 @kindex S m (Summary)
6395 @findex gnus-summary-mail-other-window
6396 @c @icon{gnus-summary-mail-originate}
6397 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
6398 the posting style of the current group.  If given a prefix, disable that.
6399 If the prefix is 1, prompt for a group name to find the posting style.
6400
6401 @item S i
6402 @itemx i
6403 @kindex i (Summary)
6404 @kindex S i (Summary)
6405 @findex gnus-summary-news-other-window
6406 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
6407 post to the current group.  If given a prefix, disable that.  If the
6408 prefix is 1, prompt for a group to post to.
6409
6410 This function actually prepares a news even when using mail groups.
6411 This is useful for ``posting'' messages to mail groups without actually
6412 sending them over the network: they're just saved directly to the group
6413 in question.  The corresponding back end must have a request-post method
6414 for this to work though.
6415
6416 @item S D b
6417 @kindex S D b (Summary)
6418 @findex gnus-summary-resend-bounced-mail
6419 @cindex bouncing mail
6420 If you have sent a mail, but the mail was bounced back to you for some
6421 reason (wrong address, transient failure), you can use this command to
6422 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
6423 will be popped into a mail buffer where you can edit the headers before
6424 sending the mail off again.  If you give a prefix to this command, and
6425 the bounced mail is a reply to some other mail, Gnus will try to fetch
6426 that mail and display it for easy perusal of its headers.  This might
6427 very well fail, though.
6428
6429 @item S D r
6430 @kindex S D r (Summary)
6431 @findex gnus-summary-resend-message
6432 Not to be confused with the previous command,
6433 @code{gnus-summary-resend-message} will prompt you for an address to
6434 send the current message off to, and then send it to that place.  The
6435 headers of the message won't be altered---but lots of headers that say
6436 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
6437 means that you actually send a mail to someone that has a @code{To}
6438 header that (probably) points to yourself.  This will confuse people.
6439 So, natcherly you'll only do that if you're really eVIl.
6440
6441 This command is mainly used if you have several accounts and want to
6442 ship a mail to a different account of yours.  (If you're both
6443 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
6444 to the @code{root} account, you may want to resend it to
6445 @code{postmaster}.  Ordnung muss sein!
6446
6447 This command understands the process/prefix convention
6448 (@pxref{Process/Prefix}).
6449
6450 @item S D e
6451 @kindex S D e (Summary)
6452 @findex gnus-summary-resend-message-edit
6453
6454 Like the previous command, but will allow you to edit the message as
6455 if it were a new message before resending.
6456
6457 @item S O m
6458 @kindex S O m (Summary)
6459 @findex gnus-uu-digest-mail-forward
6460 Digest the current series (@pxref{Decoding Articles}) and forward the
6461 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
6462 uses the process/prefix convention (@pxref{Process/Prefix}).
6463
6464 @item S M-c
6465 @kindex S M-c (Summary)
6466 @findex gnus-summary-mail-crosspost-complaint
6467 @cindex crossposting
6468 @cindex excessive crossposting
6469 Send a complaint about excessive crossposting to the author of the
6470 current article (@code{gnus-summary-mail-crosspost-complaint}).
6471
6472 @findex gnus-crosspost-complaint
6473 This command is provided as a way to fight back against the current
6474 crossposting pandemic that's sweeping Usenet.  It will compose a reply
6475 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
6476 command understands the process/prefix convention
6477 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
6478
6479 @end table
6480
6481 Also @xref{Header Commands, ,Header Commands, message, The Message
6482 Manual}, for more information.
6483
6484
6485 @node Summary Post Commands
6486 @subsection Summary Post Commands
6487 @cindex post
6488 @cindex composing news
6489
6490 Commands for posting a news article:
6491
6492 @table @kbd
6493 @item S p
6494 @itemx a
6495 @kindex a (Summary)
6496 @kindex S p (Summary)
6497 @findex gnus-summary-post-news
6498 @c @icon{gnus-summary-post-news}
6499 Prepare for posting an article (@code{gnus-summary-post-news}).  By
6500 default, post to the current group.  If given a prefix, disable that.
6501 If the prefix is 1, prompt for another group instead.
6502
6503 @item S f
6504 @itemx f
6505 @kindex f (Summary)
6506 @kindex S f (Summary)
6507 @findex gnus-summary-followup
6508 @c @icon{gnus-summary-followup}
6509 Post a followup to the current article (@code{gnus-summary-followup}).
6510
6511 @item S F
6512 @itemx F
6513 @kindex S F (Summary)
6514 @kindex F (Summary)
6515 @c @icon{gnus-summary-followup-with-original}
6516 @findex gnus-summary-followup-with-original
6517 Post a followup to the current article and include the original message
6518 (@code{gnus-summary-followup-with-original}).  This command uses the
6519 process/prefix convention.
6520
6521 @item S n
6522 @kindex S n (Summary)
6523 @findex gnus-summary-followup-to-mail
6524 Post a followup to the current article via news, even if you got the
6525 message through mail (@code{gnus-summary-followup-to-mail}).
6526
6527 @item S N
6528 @kindex S N (Summary)
6529 @findex gnus-summary-followup-to-mail-with-original
6530 Post a followup to the current article via news, even if you got the
6531 message through mail and include the original message
6532 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
6533 the process/prefix convention.
6534
6535 @item S o p
6536 @kindex S o p (Summary)
6537 @findex gnus-summary-post-forward
6538 Forward the current article to a newsgroup
6539 (@code{gnus-summary-post-forward}).
6540  If no prefix is given, the message is forwarded according to the value
6541 of (@code{message-forward-as-mime}) and
6542 (@code{message-forward-show-mml}); if the prefix is 1, decode the
6543 message and forward directly inline; if the prefix is 2, forward message
6544 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6545 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6546 directly inline; otherwise, the message is forwarded as no prefix given
6547 but use the flipped value of (@code{message-forward-as-mime}).  By
6548 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
6549
6550 @item S O p
6551 @kindex S O p (Summary)
6552 @findex gnus-uu-digest-post-forward
6553 @cindex digests
6554 @cindex making digests
6555 Digest the current series and forward the result to a newsgroup
6556 (@code{gnus-uu-digest-post-forward}).  This command uses the
6557 process/prefix convention.
6558
6559 @item S u
6560 @kindex S u (Summary)
6561 @findex gnus-uu-post-news
6562 @c @icon{gnus-uu-post-news}
6563 Uuencode a file, split it into parts, and post it as a series
6564 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
6565 @end table
6566
6567 Also @xref{Header Commands, ,Header Commands, message, The Message
6568 Manual}, for more information.
6569
6570
6571 @node Summary Message Commands
6572 @subsection Summary Message Commands
6573
6574 @table @kbd
6575 @item S y
6576 @kindex S y (Summary)
6577 @findex gnus-summary-yank-message
6578 Yank the current article into an already existing Message composition
6579 buffer (@code{gnus-summary-yank-message}).  This command prompts for
6580 what message buffer you want to yank into, and understands the
6581 process/prefix convention (@pxref{Process/Prefix}).
6582
6583 @end table
6584
6585
6586 @node Canceling and Superseding
6587 @subsection Canceling Articles
6588 @cindex canceling articles
6589 @cindex superseding articles
6590
6591 Have you ever written something, and then decided that you really,
6592 really, really wish you hadn't posted that?
6593
6594 Well, you can't cancel mail, but you can cancel posts.
6595
6596 @findex gnus-summary-cancel-article
6597 @kindex C (Summary)
6598 @c @icon{gnus-summary-cancel-article}
6599 Find the article you wish to cancel (you can only cancel your own
6600 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
6601 c} (@code{gnus-summary-cancel-article}).  Your article will be
6602 canceled---machines all over the world will be deleting your article.
6603 This command uses the process/prefix convention (@pxref{Process/Prefix}).
6604
6605 Be aware, however, that not all sites honor cancels, so your article may
6606 live on here and there, while most sites will delete the article in
6607 question.
6608
6609 Gnus will use the ``current'' select method when canceling.  If you
6610 want to use the standard posting method, use the @samp{a} symbolic
6611 prefix (@pxref{Symbolic Prefixes}).
6612
6613 Gnus ensures that only you can cancel your own messages using a
6614 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
6615 message, Message Manual}).
6616
6617 If you discover that you have made some mistakes and want to do some
6618 corrections, you can post a @dfn{superseding} article that will replace
6619 your original article.
6620
6621 @findex gnus-summary-supersede-article
6622 @kindex S (Summary)
6623 Go to the original article and press @kbd{S s}
6624 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
6625 where you can edit the article all you want before sending it off the
6626 usual way.
6627
6628 The same goes for superseding as for canceling, only more so: Some
6629 sites do not honor superseding.  On those sites, it will appear that you
6630 have posted almost the same article twice.
6631
6632 If you have just posted the article, and change your mind right away,
6633 there is a trick you can use to cancel/supersede the article without
6634 waiting for the article to appear on your site first.  You simply return
6635 to the post buffer (which is called @code{*sent ...*}).  There you will
6636 find the article you just posted, with all the headers intact.  Change
6637 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
6638 header by substituting one of those words for the word
6639 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
6640 you would do normally.  The previous article will be
6641 canceled/superseded.
6642
6643 Just remember, kids: There is no 'c' in 'supersede'.
6644
6645 @node Delayed Articles
6646 @section Delayed Articles
6647 @cindex delayed sending
6648 @cindex send delayed
6649
6650 Sometimes, you might wish to delay the sending of a message.  For
6651 example, you might wish to arrange for a message to turn up just in time
6652 to remind your about the birthday of your Significant Other.  For this,
6653 there is the @code{gnus-delay} package.  Setup is simple:
6654
6655 @lisp
6656 (gnus-delay-initialize)
6657 @end lisp
6658
6659 @findex gnus-delay-article
6660 Normally, to send a message you use the @kbd{C-c C-c} command from
6661 Message mode.  To delay a message, use @kbd{C-c C-j}
6662 (@code{gnus-delay-article}) instead.  This will ask you for how long the
6663 message should be delayed.  Possible answers are:
6664
6665 @itemize @bullet
6666 @item
6667 A time span.  Consists of an integer and a letter.  For example,
6668 @code{42d} means to delay for 42 days.  Available letters are @code{m}
6669 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
6670 (months) and @code{Y} (years).
6671
6672 @item
6673 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6674 delayed until that day, at a specific time (eight o'clock by default).
6675 See also @code{gnus-delay-default-hour}.
6676
6677 @item
6678 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6679 stuff.  The deadline will be at that time today, except if that time has
6680 already passed, then it's at the given time tomorrow.  So if it's ten
6681 o'clock in the morning and you specify @code{11:15}, then the deadline
6682 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6683 that means a time tomorrow.
6684 @end itemize
6685
6686 The action of the @code{gnus-delay-article} command is influenced by a
6687 couple of variables:
6688
6689 @table @code
6690 @item gnus-delay-default-hour
6691 @vindex gnus-delay-default-hour
6692 When you specify a specific date, the message will be due on that hour
6693 on the given date.  Possible values are integers 0 through 23.
6694
6695 @item gnus-delay-default-delay
6696 @vindex gnus-delay-default-delay
6697 This is a string and gives the default delay.  It can be of any of the
6698 formats described above.
6699
6700 @item gnus-delay-group
6701 @vindex gnus-delay-group
6702 Delayed articles will be kept in this group on the drafts server until
6703 they are due.  You probably don't need to change this.  The default
6704 value is @code{"delayed"}.
6705
6706 @item gnus-delay-header
6707 @vindex gnus-delay-header
6708 The deadline for each article will be stored in a header.  This variable
6709 is a string and gives the header name.  You probably don't need to
6710 change this.  The default value is @code{"X-Gnus-Delayed"}.
6711 @end table
6712
6713 The way delaying works is like this: when you use the
6714 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6715 calculates the deadline of the message and stores it in the
6716 @code{X-Gnus-Delayed} header and puts the message in the
6717 @code{nndraft:delayed} group.
6718
6719 @findex gnus-delay-send-queue
6720 And whenever you get new news, Gnus looks through the group for articles
6721 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6722 function for this.  By default, this function is added to the hook
6723 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6724 Maybe you want to use the demon to send drafts?  Just tell the demon to
6725 execute the @code{gnus-delay-send-queue} function.
6726
6727 @table @code
6728 @item gnus-delay-initialize
6729 @findex gnus-delay-initialize
6730 By default, this function installs @code{gnus-delay-send-queue} in
6731 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6732 argument @code{no-check}.  If it is non-@code{nil},
6733 @code{gnus-get-new-news-hook} is not changed.  The optional first
6734 argument is ignored.
6735
6736 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6737 Presumably, you want to use the demon for sending due delayed articles.
6738 Just don't forget to set that up :-)
6739 @end table
6740
6741 When delaying an article with @kbd{C-c C-j}, Message mode will
6742 automatically add a @code{"Date"} header with the current time.  In
6743 many cases you probably want the @code{"Date"} header to reflect the
6744 time the message is sent instead.  To do this, you have to delete
6745 @code{Date} from @code{message-draft-headers}.
6746
6747
6748 @node Marking Articles
6749 @section Marking Articles
6750 @cindex article marking
6751 @cindex article ticking
6752 @cindex marks
6753
6754 There are several marks you can set on an article.
6755
6756 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6757 neologism ohoy!) of the article.  Alphabetic marks generally mean
6758 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6759
6760 In addition, you also have marks that do not affect readedness.
6761
6762 @ifinfo
6763 There's a plethora of commands for manipulating these marks.
6764 @end ifinfo
6765
6766 @menu
6767 * Unread Articles::             Marks for unread articles.
6768 * Read Articles::               Marks for read articles.
6769 * Other Marks::                 Marks that do not affect readedness.
6770 * Setting Marks::               How to set and remove marks.
6771 * Generic Marking Commands::    How to customize the marking.
6772 * Setting Process Marks::       How to mark articles for later processing.
6773 @end menu
6774
6775
6776 @node Unread Articles
6777 @subsection Unread Articles
6778
6779 The following marks mark articles as (kinda) unread, in one form or
6780 other.
6781
6782 @table @samp
6783 @item !
6784 @vindex gnus-ticked-mark
6785 Marked as ticked (@code{gnus-ticked-mark}).
6786
6787 @dfn{Ticked articles} are articles that will remain visible always.  If
6788 you see an article that you find interesting, or you want to put off
6789 reading it, or replying to it, until sometime later, you'd typically
6790 tick it.  However, articles can be expired (from news servers by the
6791 news server software, Gnus itself never expires ticked messages), so if
6792 you want to keep an article forever, you'll have to make it persistent
6793 (@pxref{Persistent Articles}).
6794
6795 @item ?
6796 @vindex gnus-dormant-mark
6797 Marked as dormant (@code{gnus-dormant-mark}).
6798
6799 @dfn{Dormant articles} will only appear in the summary buffer if there
6800 are followups to it.  If you want to see them even if they don't have
6801 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6802 Otherwise (except for the visibility issue), they are just like ticked
6803 messages.
6804
6805 @item SPACE
6806 @vindex gnus-unread-mark
6807 Marked as unread (@code{gnus-unread-mark}).
6808
6809 @dfn{Unread articles} are articles that haven't been read at all yet.
6810 @end table
6811
6812
6813 @node Read Articles
6814 @subsection Read Articles
6815 @cindex expirable mark
6816
6817 All the following marks mark articles as read.
6818
6819 @table @samp
6820
6821 @item r
6822 @vindex gnus-del-mark
6823 These are articles that the user has marked as read with the @kbd{d}
6824 command manually, more or less (@code{gnus-del-mark}).
6825
6826 @item R
6827 @vindex gnus-read-mark
6828 Articles that have actually been read (@code{gnus-read-mark}).
6829
6830 @item O
6831 @vindex gnus-ancient-mark
6832 Articles that were marked as read in previous sessions and are now
6833 @dfn{old} (@code{gnus-ancient-mark}).
6834
6835 @item K
6836 @vindex gnus-killed-mark
6837 Marked as killed (@code{gnus-killed-mark}).
6838
6839 @item X
6840 @vindex gnus-kill-file-mark
6841 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6842
6843 @item Y
6844 @vindex gnus-low-score-mark
6845 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6846
6847 @item C
6848 @vindex gnus-catchup-mark
6849 Marked as read by a catchup (@code{gnus-catchup-mark}).
6850
6851 @item G
6852 @vindex gnus-canceled-mark
6853 Canceled article (@code{gnus-canceled-mark})
6854
6855 @item F
6856 @vindex gnus-souped-mark
6857 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
6858
6859 @item Q
6860 @vindex gnus-sparse-mark
6861 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6862 Threading}.
6863
6864 @item M
6865 @vindex gnus-duplicate-mark
6866 Article marked as read by duplicate suppression
6867 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6868
6869 @end table
6870
6871 All these marks just mean that the article is marked as read, really.
6872 They are interpreted differently when doing adaptive scoring, though.
6873
6874 One more special mark, though:
6875
6876 @table @samp
6877 @item E
6878 @vindex gnus-expirable-mark
6879 Marked as expirable (@code{gnus-expirable-mark}).
6880
6881 Marking articles as @dfn{expirable} (or have them marked as such
6882 automatically) doesn't make much sense in normal groups---a user doesn't
6883 control expiring of news articles, but in mail groups, for instance,
6884 articles marked as @dfn{expirable} can be deleted by Gnus at
6885 any time.
6886 @end table
6887
6888
6889 @node Other Marks
6890 @subsection Other Marks
6891 @cindex process mark
6892 @cindex bookmarks
6893
6894 There are some marks that have nothing to do with whether the article is
6895 read or not.
6896
6897 @itemize @bullet
6898
6899 @item
6900 You can set a bookmark in the current article.  Say you are reading a
6901 long thesis on cats' urinary tracts, and have to go home for dinner
6902 before you've finished reading the thesis.  You can then set a bookmark
6903 in the article, and Gnus will jump to this bookmark the next time it
6904 encounters the article.  @xref{Setting Marks}.
6905
6906 @item
6907 @vindex gnus-replied-mark
6908 All articles that you have replied to or made a followup to (i.e., have
6909 answered) will be marked with an @samp{A} in the second column
6910 (@code{gnus-replied-mark}).
6911
6912 @item
6913 @vindex gnus-forwarded-mark
6914 All articles that you have forwarded will be marked with an @samp{F} in
6915 the second column (@code{gnus-forwarded-mark}).
6916
6917 @item
6918 @vindex gnus-cached-mark
6919 Articles stored in the article cache will be marked with an @samp{*} in
6920 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6921
6922 @item
6923 @vindex gnus-saved-mark
6924 Articles ``saved'' (in some manner or other; not necessarily
6925 religiously) are marked with an @samp{S} in the second column
6926 (@code{gnus-saved-mark}).
6927
6928 @item
6929 @vindex gnus-recent-mark
6930 Articles that according to the server haven't been shown to the user
6931 before are marked with a @samp{N} in the second column
6932 (@code{gnus-recent-mark}).  Note that not all servers support this
6933 mark, in which case it simply never appears.  Compare with
6934 @code{gnus-unseen-mark}.
6935
6936 @item
6937 @vindex gnus-unseen-mark
6938 Articles that haven't been seen before in Gnus by the user are marked
6939 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6940 Compare with @code{gnus-recent-mark}.
6941
6942 @item
6943 @vindex gnus-downloaded-mark
6944 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6945 downloaded for unplugged (offline) viewing.  If you are using the
6946 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6947 (The variable @code{gnus-downloaded-mark} controls which character to
6948 use.)
6949
6950 @item
6951 @vindex gnus-undownloaded-mark
6952 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6953 not have been downloaded.  Such articles cannot be viewed while you
6954 are unplugged (offline).  If you are using the @samp{%O} spec, these
6955 articles get the @samp{-} mark in that spec.  (The variable
6956 @code{gnus-undownloaded-mark} controls which character to use.)
6957
6958 @item
6959 @vindex gnus-downloadable-mark
6960 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6961 automatically, but it is also possible to explicitly mark articles for
6962 download, even if they would not be downloaded automatically.  Such
6963 explicitly-marked articles get the @samp{%} mark in the first column.
6964 (The variable @code{gnus-downloadable-mark} controls which character to
6965 use.)
6966
6967 @item
6968 @vindex gnus-not-empty-thread-mark
6969 @vindex gnus-empty-thread-mark
6970 If the @samp{%e} spec is used, the presence of threads or not will be
6971 marked with @code{gnus-not-empty-thread-mark} and
6972 @code{gnus-empty-thread-mark} in the third column, respectively.
6973
6974 @item
6975 @vindex gnus-process-mark
6976 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6977 variety of commands react to the presence of the process mark.  For
6978 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6979 all articles that have been marked with the process mark.  Articles
6980 marked with the process mark have a @samp{#} in the second column.
6981
6982 @end itemize
6983
6984 You might have noticed that most of these ``non-readedness'' marks
6985 appear in the second column by default.  So if you have a cached, saved,
6986 replied article that you have process-marked, what will that look like?
6987
6988 Nothing much.  The precedence rules go as follows: process -> cache ->
6989 replied -> saved.  So if the article is in the cache and is replied,
6990 you'll only see the cache mark and not the replied mark.
6991
6992
6993 @node Setting Marks
6994 @subsection Setting Marks
6995 @cindex setting marks
6996
6997 All the marking commands understand the numeric prefix.
6998
6999 @table @kbd
7000 @item M c
7001 @itemx M-u
7002 @kindex M c (Summary)
7003 @kindex M-u (Summary)
7004 @findex gnus-summary-clear-mark-forward
7005 @cindex mark as unread
7006 Clear all readedness-marks from the current article
7007 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
7008 article as unread.
7009
7010 @item M t
7011 @itemx !
7012 @kindex ! (Summary)
7013 @kindex M t (Summary)
7014 @findex gnus-summary-tick-article-forward
7015 Tick the current article (@code{gnus-summary-tick-article-forward}).
7016 @xref{Article Caching}.
7017
7018 @item M ?
7019 @itemx ?
7020 @kindex ? (Summary)
7021 @kindex M ? (Summary)
7022 @findex gnus-summary-mark-as-dormant
7023 Mark the current article as dormant
7024 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
7025
7026 @item M d
7027 @itemx d
7028 @kindex M d (Summary)
7029 @kindex d (Summary)
7030 @findex gnus-summary-mark-as-read-forward
7031 Mark the current article as read
7032 (@code{gnus-summary-mark-as-read-forward}).
7033
7034 @item D
7035 @kindex D (Summary)
7036 @findex gnus-summary-mark-as-read-backward
7037 Mark the current article as read and move point to the previous line
7038 (@code{gnus-summary-mark-as-read-backward}).
7039
7040 @item M k
7041 @itemx k
7042 @kindex k (Summary)
7043 @kindex M k (Summary)
7044 @findex gnus-summary-kill-same-subject-and-select
7045 Mark all articles that have the same subject as the current one as read,
7046 and then select the next unread article
7047 (@code{gnus-summary-kill-same-subject-and-select}).
7048
7049 @item M K
7050 @itemx C-k
7051 @kindex M K (Summary)
7052 @kindex C-k (Summary)
7053 @findex gnus-summary-kill-same-subject
7054 Mark all articles that have the same subject as the current one as read
7055 (@code{gnus-summary-kill-same-subject}).
7056
7057 @item M C
7058 @kindex M C (Summary)
7059 @findex gnus-summary-catchup
7060 @c @icon{gnus-summary-catchup}
7061 Mark all unread articles as read (@code{gnus-summary-catchup}).
7062
7063 @item M C-c
7064 @kindex M C-c (Summary)
7065 @findex gnus-summary-catchup-all
7066 Mark all articles in the group as read---even the ticked and dormant
7067 articles (@code{gnus-summary-catchup-all}).
7068
7069 @item M H
7070 @kindex M H (Summary)
7071 @findex gnus-summary-catchup-to-here
7072 Catchup the current group to point (before the point)
7073 (@code{gnus-summary-catchup-to-here}).
7074
7075 @item M h
7076 @kindex M h (Summary)
7077 @findex gnus-summary-catchup-from-here
7078 Catchup the current group from point (after the point)
7079 (@code{gnus-summary-catchup-from-here}).
7080
7081 @item C-w
7082 @kindex C-w (Summary)
7083 @findex gnus-summary-mark-region-as-read
7084 Mark all articles between point and mark as read
7085 (@code{gnus-summary-mark-region-as-read}).
7086
7087 @item M V k
7088 @kindex M V k (Summary)
7089 @findex gnus-summary-kill-below
7090 Kill all articles with scores below the default score (or below the
7091 numeric prefix) (@code{gnus-summary-kill-below}).
7092
7093 @item M e
7094 @itemx E
7095 @kindex M e (Summary)
7096 @kindex E (Summary)
7097 @findex gnus-summary-mark-as-expirable
7098 Mark the current article as expirable
7099 (@code{gnus-summary-mark-as-expirable}).
7100
7101 @item M b
7102 @kindex M b (Summary)
7103 @findex gnus-summary-set-bookmark
7104 Set a bookmark in the current article
7105 (@code{gnus-summary-set-bookmark}).
7106
7107 @item M B
7108 @kindex M B (Summary)
7109 @findex gnus-summary-remove-bookmark
7110 Remove the bookmark from the current article
7111 (@code{gnus-summary-remove-bookmark}).
7112
7113 @item M V c
7114 @kindex M V c (Summary)
7115 @findex gnus-summary-clear-above
7116 Clear all marks from articles with scores over the default score (or
7117 over the numeric prefix) (@code{gnus-summary-clear-above}).
7118
7119 @item M V u
7120 @kindex M V u (Summary)
7121 @findex gnus-summary-tick-above
7122 Tick all articles with scores over the default score (or over the
7123 numeric prefix) (@code{gnus-summary-tick-above}).
7124
7125 @item M V m
7126 @kindex M V m (Summary)
7127 @findex gnus-summary-mark-above
7128 Prompt for a mark, and mark all articles with scores over the default
7129 score (or over the numeric prefix) with this mark
7130 (@code{gnus-summary-clear-above}).
7131 @end table
7132
7133 @vindex gnus-summary-goto-unread
7134 The @code{gnus-summary-goto-unread} variable controls what action should
7135 be taken after setting a mark.  If non-@code{nil}, point will move to
7136 the next/previous unread article.  If @code{nil}, point will just move
7137 one line up or down.  As a special case, if this variable is
7138 @code{never}, all the marking commands as well as other commands (like
7139 @kbd{SPACE}) will move to the next article, whether it is unread or not.
7140 The default is @code{t}.
7141
7142
7143 @node Generic Marking Commands
7144 @subsection Generic Marking Commands
7145
7146 Some people would like the command that ticks an article (@kbd{!}) go to
7147 the next article.  Others would like it to go to the next unread
7148 article.  Yet others would like it to stay on the current article.  And
7149 even though I haven't heard of anybody wanting it to go to the
7150 previous (unread) article, I'm sure there are people that want that as
7151 well.
7152
7153 Multiply these five behaviors with five different marking commands, and
7154 you get a potentially complex set of variable to control what each
7155 command should do.
7156
7157 To sidestep that mess, Gnus provides commands that do all these
7158 different things.  They can be found on the @kbd{M M} map in the summary
7159 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
7160 to list in this manual.
7161
7162 While you can use these commands directly, most users would prefer
7163 altering the summary mode keymap.  For instance, if you would like the
7164 @kbd{!} command to go to the next article instead of the next unread
7165 article, you could say something like:
7166
7167 @lisp
7168 @group
7169 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
7170 (defun my-alter-summary-map ()
7171   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
7172 @end group
7173 @end lisp
7174
7175 @noindent
7176 or
7177
7178 @lisp
7179 (defun my-alter-summary-map ()
7180   (local-set-key "!" "MM!n"))
7181 @end lisp
7182
7183
7184 @node Setting Process Marks
7185 @subsection Setting Process Marks
7186 @cindex setting process marks
7187
7188 Process marks are displayed as @code{#} in the summary buffer, and are
7189 used for marking articles in such a way that other commands will
7190 process these articles.  For instance, if you process mark four
7191 articles and then use the @kbd{*} command, Gnus will enter these four
7192 articles into the cache.  For more information,
7193 @pxref{Process/Prefix}.
7194
7195 @table @kbd
7196
7197 @item M P p
7198 @itemx #
7199 @kindex # (Summary)
7200 @kindex M P p (Summary)
7201 @findex gnus-summary-mark-as-processable
7202 Mark the current article with the process mark
7203 (@code{gnus-summary-mark-as-processable}).
7204 @findex gnus-summary-unmark-as-processable
7205
7206 @item M P u
7207 @itemx M-#
7208 @kindex M P u (Summary)
7209 @kindex M-# (Summary)
7210 Remove the process mark, if any, from the current article
7211 (@code{gnus-summary-unmark-as-processable}).
7212
7213 @item M P U
7214 @kindex M P U (Summary)
7215 @findex gnus-summary-unmark-all-processable
7216 Remove the process mark from all articles
7217 (@code{gnus-summary-unmark-all-processable}).
7218
7219 @item M P i
7220 @kindex M P i (Summary)
7221 @findex gnus-uu-invert-processable
7222 Invert the list of process marked articles
7223 (@code{gnus-uu-invert-processable}).
7224
7225 @item M P R
7226 @kindex M P R (Summary)
7227 @findex gnus-uu-mark-by-regexp
7228 Mark articles that have a @code{Subject} header that matches a regular
7229 expression (@code{gnus-uu-mark-by-regexp}).
7230
7231 @item M P G
7232 @kindex M P G (Summary)
7233 @findex gnus-uu-unmark-by-regexp
7234 Unmark articles that have a @code{Subject} header that matches a regular
7235 expression (@code{gnus-uu-unmark-by-regexp}).
7236
7237 @item M P r
7238 @kindex M P r (Summary)
7239 @findex gnus-uu-mark-region
7240 Mark articles in region (@code{gnus-uu-mark-region}).
7241
7242 @item M P g
7243 @kindex M P g (Summary)
7244 @findex gnus-uu-unmark-region
7245 Unmark articles in region (@code{gnus-uu-unmark-region}).
7246
7247 @item M P t
7248 @kindex M P t (Summary)
7249 @findex gnus-uu-mark-thread
7250 Mark all articles in the current (sub)thread
7251 (@code{gnus-uu-mark-thread}).
7252
7253 @item M P T
7254 @kindex M P T (Summary)
7255 @findex gnus-uu-unmark-thread
7256 Unmark all articles in the current (sub)thread
7257 (@code{gnus-uu-unmark-thread}).
7258
7259 @item M P v
7260 @kindex M P v (Summary)
7261 @findex gnus-uu-mark-over
7262 Mark all articles that have a score above the prefix argument
7263 (@code{gnus-uu-mark-over}).
7264
7265 @item M P s
7266 @kindex M P s (Summary)
7267 @findex gnus-uu-mark-series
7268 Mark all articles in the current series (@code{gnus-uu-mark-series}).
7269
7270 @item M P S
7271 @kindex M P S (Summary)
7272 @findex gnus-uu-mark-sparse
7273 Mark all series that have already had some articles marked
7274 (@code{gnus-uu-mark-sparse}).
7275
7276 @item M P a
7277 @kindex M P a (Summary)
7278 @findex gnus-uu-mark-all
7279 Mark all articles in series order (@code{gnus-uu-mark-all}).
7280
7281 @item M P b
7282 @kindex M P b (Summary)
7283 @findex gnus-uu-mark-buffer
7284 Mark all articles in the buffer in the order they appear
7285 (@code{gnus-uu-mark-buffer}).
7286
7287 @item M P k
7288 @kindex M P k (Summary)
7289 @findex gnus-summary-kill-process-mark
7290 Push the current process mark set onto the stack and unmark all articles
7291 (@code{gnus-summary-kill-process-mark}).
7292
7293 @item M P y
7294 @kindex M P y (Summary)
7295 @findex gnus-summary-yank-process-mark
7296 Pop the previous process mark set from the stack and restore it
7297 (@code{gnus-summary-yank-process-mark}).
7298
7299 @item M P w
7300 @kindex M P w (Summary)
7301 @findex gnus-summary-save-process-mark
7302 Push the current process mark set onto the stack
7303 (@code{gnus-summary-save-process-mark}).
7304
7305 @end table
7306
7307 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
7308 set process marks based on article body contents.
7309
7310
7311 @node Limiting
7312 @section Limiting
7313 @cindex limiting
7314
7315 It can be convenient to limit the summary buffer to just show some
7316 subset of the articles currently in the group.  The effect most limit
7317 commands have is to remove a few (or many) articles from the summary
7318 buffer.
7319
7320 Limiting commands work on subsets of the articles already fetched from
7321 the servers.  These commands don't query the server for additional
7322 articles.
7323
7324 @table @kbd
7325
7326 @item / /
7327 @itemx / s
7328 @kindex / / (Summary)
7329 @findex gnus-summary-limit-to-subject
7330 Limit the summary buffer to articles that match some subject
7331 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
7332 matching articles.
7333
7334 @item / a
7335 @kindex / a (Summary)
7336 @findex gnus-summary-limit-to-author
7337 Limit the summary buffer to articles that match some author
7338 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
7339 matching articles.
7340
7341 @item / R
7342 @kindex / R (Summary)
7343 @findex gnus-summary-limit-to-recipient
7344 Limit the summary buffer to articles that match some recipient
7345 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
7346 matching articles.
7347
7348 @item / A
7349 @kindex / A (Summary)
7350 @findex gnus-summary-limit-to-address
7351 Limit the summary buffer to articles in which contents of From, To or Cc
7352 header match a given address (@code{gnus-summary-limit-to-address}).  If
7353 given a prefix, exclude matching articles.
7354
7355 @item / S
7356 @kindex / S (Summary)
7357 @findex gnus-summary-limit-to-singletons
7358 Limit the summary buffer to articles that aren't part of any displayed
7359 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
7360 limit to articles that are part of displayed threads.
7361
7362 @item / x
7363 @kindex / x (Summary)
7364 @findex gnus-summary-limit-to-extra
7365 Limit the summary buffer to articles that match one of the ``extra''
7366 headers (@pxref{To From Newsgroups})
7367 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
7368 matching articles.
7369
7370 @item / u
7371 @itemx x
7372 @kindex / u (Summary)
7373 @kindex x (Summary)
7374 @findex gnus-summary-limit-to-unread
7375 Limit the summary buffer to articles not marked as read
7376 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
7377 buffer to articles strictly unread.  This means that ticked and
7378 dormant articles will also be excluded.
7379
7380 @item / m
7381 @kindex / m (Summary)
7382 @findex gnus-summary-limit-to-marks
7383 Ask for a mark and then limit to all articles that have been marked
7384 with that mark (@code{gnus-summary-limit-to-marks}).
7385
7386 @item / t
7387 @kindex / t (Summary)
7388 @findex gnus-summary-limit-to-age
7389 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
7390 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
7391 articles younger than that number of days.
7392
7393 @item / n
7394 @kindex / n (Summary)
7395 @findex gnus-summary-limit-to-articles
7396 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
7397 articles.  If not given a prefix, use the process marked articles
7398 instead.  (@code{gnus-summary-limit-to-articles}).
7399
7400 @item / w
7401 @kindex / w (Summary)
7402 @findex gnus-summary-pop-limit
7403 Pop the previous limit off the stack and restore it
7404 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
7405 the stack.
7406
7407 @item / .
7408 @kindex / . (Summary)
7409 @findex gnus-summary-limit-to-unseen
7410 Limit the summary buffer to the unseen articles
7411 (@code{gnus-summary-limit-to-unseen}).
7412
7413 @item / v
7414 @kindex / v (Summary)
7415 @findex gnus-summary-limit-to-score
7416 Limit the summary buffer to articles that have a score at or above some
7417 score (@code{gnus-summary-limit-to-score}).
7418
7419 @item / p
7420 @kindex / p (Summary)
7421 @findex gnus-summary-limit-to-display-predicate
7422 Limit the summary buffer to articles that satisfy the @code{display}
7423 group parameter predicate
7424 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
7425 Parameters}, for more on this predicate.
7426
7427 @item / r
7428 @kindex / r (Summary)
7429 @findex gnus-summary-limit-to-replied
7430 Limit the summary buffer to replied articles
7431 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
7432 replied articles.
7433
7434 @item / E
7435 @itemx M S
7436 @kindex M S (Summary)
7437 @kindex / E (Summary)
7438 @findex gnus-summary-limit-include-expunged
7439 Include all expunged articles in the limit
7440 (@code{gnus-summary-limit-include-expunged}).
7441
7442 @item / D
7443 @kindex / D (Summary)
7444 @findex gnus-summary-limit-include-dormant
7445 Include all dormant articles in the limit
7446 (@code{gnus-summary-limit-include-dormant}).
7447
7448 @item / *
7449 @kindex / * (Summary)
7450 @findex gnus-summary-limit-include-cached
7451 Include all cached articles in the limit
7452 (@code{gnus-summary-limit-include-cached}).
7453
7454 @item / d
7455 @kindex / d (Summary)
7456 @findex gnus-summary-limit-exclude-dormant
7457 Exclude all dormant articles from the limit
7458 (@code{gnus-summary-limit-exclude-dormant}).
7459
7460 @item / M
7461 @kindex / M (Summary)
7462 @findex gnus-summary-limit-exclude-marks
7463 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
7464
7465 @item / T
7466 @kindex / T (Summary)
7467 @findex gnus-summary-limit-include-thread
7468 Include all the articles in the current thread in the limit.
7469
7470 @item / c
7471 @kindex / c (Summary)
7472 @findex gnus-summary-limit-exclude-childless-dormant
7473 Exclude all dormant articles that have no children from the limit@*
7474 (@code{gnus-summary-limit-exclude-childless-dormant}).
7475
7476 @item / C
7477 @kindex / C (Summary)
7478 @findex gnus-summary-limit-mark-excluded-as-read
7479 Mark all excluded unread articles as read
7480 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
7481 also mark excluded ticked and dormant articles as read.
7482
7483 @item / b
7484 @kindex / b (Summary)
7485 @findex gnus-summary-limit-to-bodies
7486 Limit the summary buffer to articles that have bodies that match a
7487 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
7488 prefix, reverse the limit.  This command is quite slow since it
7489 requires selecting each article to find the matches.
7490
7491 @item / h
7492 @kindex / h (Summary)
7493 @findex gnus-summary-limit-to-headers
7494 Like the previous command, only limit to headers instead
7495 (@code{gnus-summary-limit-to-headers}).
7496
7497 @end table
7498
7499
7500 The following commands aren't limiting commands, but use the @kbd{/}
7501 prefix as well.
7502
7503 @table @kbd
7504 @item / N
7505 @kindex / N (Summary)
7506 @findex gnus-summary-insert-new-articles
7507 Insert all new articles in the summary buffer.  It scans for new emails
7508 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
7509
7510 @item / o
7511 @kindex / o (Summary)
7512 @findex gnus-summary-insert-old-articles
7513 Insert all old articles in the summary buffer.  If given a numbered
7514 prefix, fetch this number of articles.
7515
7516 @end table
7517
7518
7519 @node Threading
7520 @section Threading
7521 @cindex threading
7522 @cindex article threading
7523
7524 Gnus threads articles by default.  @dfn{To thread} is to put responses
7525 to articles directly after the articles they respond to---in a
7526 hierarchical fashion.
7527
7528 Threading is done by looking at the @code{References} headers of the
7529 articles.  In a perfect world, this would be enough to build pretty
7530 trees, but unfortunately, the @code{References} header is often broken
7531 or simply missing.  Weird news propagation exacerbates the problem,
7532 so one has to employ other heuristics to get pleasing results.  A
7533 plethora of approaches exists, as detailed in horrible detail in
7534 @ref{Customizing Threading}.
7535
7536 First, a quick overview of the concepts:
7537
7538 @table @dfn
7539 @item root
7540 The top-most article in a thread; the first article in the thread.
7541
7542 @item thread
7543 A tree-like article structure.
7544
7545 @item sub-thread
7546 A small(er) section of this tree-like structure.
7547
7548 @item loose threads
7549 Threads often lose their roots due to article expiry, or due to the root
7550 already having been read in a previous session, and not displayed in the
7551 summary buffer.  We then typically have many sub-threads that really
7552 belong to one thread, but are without connecting roots.  These are
7553 called loose threads.
7554
7555 @item thread gathering
7556 An attempt to gather loose threads into bigger threads.
7557
7558 @item sparse threads
7559 A thread where the missing articles have been ``guessed'' at, and are
7560 displayed as empty lines in the summary buffer.
7561
7562 @end table
7563
7564
7565 @menu
7566 * Customizing Threading::       Variables you can change to affect the threading.
7567 * Thread Commands::             Thread based commands in the summary buffer.
7568 @end menu
7569
7570
7571 @node Customizing Threading
7572 @subsection Customizing Threading
7573 @cindex customizing threading
7574
7575 @menu
7576 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
7577 * Filling In Threads::          Making the threads displayed look fuller.
7578 * More Threading::              Even more variables for fiddling with threads.
7579 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
7580 @end menu
7581
7582
7583 @node Loose Threads
7584 @subsubsection Loose Threads
7585 @cindex <
7586 @cindex >
7587 @cindex loose threads
7588
7589 @table @code
7590 @item gnus-summary-make-false-root
7591 @vindex gnus-summary-make-false-root
7592 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
7593 and create a dummy root at the top.  (Wait a minute.  Root at the top?
7594 Yup.)  Loose subtrees occur when the real root has expired, or you've
7595 read or killed the root in a previous session.
7596
7597 When there is no real root of a thread, Gnus will have to fudge
7598 something.  This variable says what fudging method Gnus should use.
7599 There are four possible values:
7600
7601 @iftex
7602 @iflatex
7603 \gnusfigure{The Summary Buffer}{390}{
7604 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
7605 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
7606 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
7607 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
7608 }
7609 @end iflatex
7610 @end iftex
7611
7612 @cindex adopting articles
7613
7614 @table @code
7615
7616 @item adopt
7617 Gnus will make the first of the orphaned articles the parent.  This
7618 parent will adopt all the other articles.  The adopted articles will be
7619 marked as such by pointy brackets (@samp{<>}) instead of the standard
7620 square brackets (@samp{[]}).  This is the default method.
7621
7622 @item dummy
7623 @vindex gnus-summary-dummy-line-format
7624 @vindex gnus-summary-make-false-root-always
7625 Gnus will create a dummy summary line that will pretend to be the
7626 parent.  This dummy line does not correspond to any real article, so
7627 selecting it will just select the first real article after the dummy
7628 article.  @code{gnus-summary-dummy-line-format} is used to specify the
7629 format of the dummy roots.  It accepts only one format spec:  @samp{S},
7630 which is the subject of the article.  @xref{Formatting Variables}.
7631 If you want all threads to have a dummy root, even the non-gathered
7632 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
7633
7634 @item empty
7635 Gnus won't actually make any article the parent, but simply leave the
7636 subject field of all orphans except the first empty.  (Actually, it will
7637 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
7638 Buffer Format}).)
7639
7640 @item none
7641 Don't make any article parent at all.  Just gather the threads and
7642 display them after one another.
7643
7644 @item nil
7645 Don't gather loose threads.
7646 @end table
7647
7648 @item gnus-summary-gather-subject-limit
7649 @vindex gnus-summary-gather-subject-limit
7650 Loose threads are gathered by comparing subjects of articles.  If this
7651 variable is @code{nil}, Gnus requires an exact match between the
7652 subjects of the loose threads before gathering them into one big
7653 super-thread.  This might be too strict a requirement, what with the
7654 presence of stupid newsreaders that chop off long subject lines.  If
7655 you think so, set this variable to, say, 20 to require that only the
7656 first 20 characters of the subjects have to match.  If you set this
7657 variable to a really low number, you'll find that Gnus will gather
7658 everything in sight into one thread, which isn't very helpful.
7659
7660 @cindex fuzzy article gathering
7661 If you set this variable to the special value @code{fuzzy}, Gnus will
7662 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
7663 Matching}).
7664
7665 @item gnus-simplify-subject-fuzzy-regexp
7666 @vindex gnus-simplify-subject-fuzzy-regexp
7667 This can either be a regular expression or list of regular expressions
7668 that match strings that will be removed from subjects if fuzzy subject
7669 simplification is used.
7670
7671 @item gnus-simplify-ignored-prefixes
7672 @vindex gnus-simplify-ignored-prefixes
7673 If you set @code{gnus-summary-gather-subject-limit} to something as low
7674 as 10, you might consider setting this variable to something sensible:
7675
7676 @c Written by Michael Ernst <mernst@cs.rice.edu>
7677 @lisp
7678 (setq gnus-simplify-ignored-prefixes
7679       (concat
7680        "\\`\\[?\\("
7681        (mapconcat
7682         'identity
7683         '("looking"
7684           "wanted" "followup" "summary\\( of\\)?"
7685           "help" "query" "problem" "question"
7686           "answer" "reference" "announce"
7687           "How can I" "How to" "Comparison of"
7688           ;; ...
7689           )
7690         "\\|")
7691        "\\)\\s *\\("
7692        (mapconcat 'identity
7693                   '("for" "for reference" "with" "about")
7694                   "\\|")
7695        "\\)?\\]?:?[ \t]*"))
7696 @end lisp
7697
7698 All words that match this regexp will be removed before comparing two
7699 subjects.
7700
7701 @item gnus-simplify-subject-functions
7702 @vindex gnus-simplify-subject-functions
7703 If non-@code{nil}, this variable overrides
7704 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7705 list of functions to apply to the @code{Subject} string iteratively to
7706 arrive at the simplified version of the string.
7707
7708 Useful functions to put in this list include:
7709
7710 @table @code
7711 @item gnus-simplify-subject-re
7712 @findex gnus-simplify-subject-re
7713 Strip the leading @samp{Re:}.
7714
7715 @item gnus-simplify-subject-fuzzy
7716 @findex gnus-simplify-subject-fuzzy
7717 Simplify fuzzily.
7718
7719 @item gnus-simplify-whitespace
7720 @findex gnus-simplify-whitespace
7721 Remove excessive whitespace.
7722
7723 @item gnus-simplify-all-whitespace
7724 @findex gnus-simplify-all-whitespace
7725 Remove all whitespace.
7726 @end table
7727
7728 You may also write your own functions, of course.
7729
7730
7731 @item gnus-summary-gather-exclude-subject
7732 @vindex gnus-summary-gather-exclude-subject
7733 Since loose thread gathering is done on subjects only, that might lead
7734 to many false hits, especially with certain common subjects like
7735 @samp{} and @samp{(none)}.  To make the situation slightly better,
7736 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7737 what subjects should be excluded from the gathering process.@*
7738 The default is @samp{^ *$\\|^(none)$}.
7739
7740 @item gnus-summary-thread-gathering-function
7741 @vindex gnus-summary-thread-gathering-function
7742 Gnus gathers threads by looking at @code{Subject} headers.  This means
7743 that totally unrelated articles may end up in the same ``thread'', which
7744 is confusing.  An alternate approach is to look at all the
7745 @code{Message-ID}s in all the @code{References} headers to find matches.
7746 This will ensure that no gathered threads ever include unrelated
7747 articles, but it also means that people who have posted with broken
7748 newsreaders won't be gathered properly.  The choice is yours---plague or
7749 cholera:
7750
7751 @table @code
7752 @item gnus-gather-threads-by-subject
7753 @findex gnus-gather-threads-by-subject
7754 This function is the default gathering function and looks at
7755 @code{Subject}s exclusively.
7756
7757 @item gnus-gather-threads-by-references
7758 @findex gnus-gather-threads-by-references
7759 This function looks at @code{References} headers exclusively.
7760 @end table
7761
7762 If you want to test gathering by @code{References}, you could say
7763 something like:
7764
7765 @lisp
7766 (setq gnus-summary-thread-gathering-function
7767       'gnus-gather-threads-by-references)
7768 @end lisp
7769
7770 @end table
7771
7772
7773 @node Filling In Threads
7774 @subsubsection Filling In Threads
7775
7776 @table @code
7777 @item gnus-fetch-old-headers
7778 @vindex gnus-fetch-old-headers
7779 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7780 more old headers---headers to articles marked as read.  If you would
7781 like to display as few summary lines as possible, but still connect as
7782 many loose threads as possible, you should set this variable to
7783 @code{some} or a number.  If you set it to a number, no more than that
7784 number of extra old headers will be fetched.  In either case, fetching
7785 old headers only works if the back end you are using carries overview
7786 files---this would normally be @code{nntp}, @code{nnspool},
7787 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7788 the thread has been expired by the server, there's not much Gnus can
7789 do about that.
7790
7791 This variable can also be set to @code{invisible}.  This won't have any
7792 visible effects, but is useful if you use the @kbd{A T} command a lot
7793 (@pxref{Finding the Parent}).
7794
7795 The server has to support @acronym{NOV} for any of this to work.
7796
7797 @cindex Gmane, gnus-fetch-old-headers
7798 This feature can seriously impact performance it ignores all locally
7799 cached header entries.  Setting it to @code{t} for groups for a server
7800 that doesn't expire articles (such as news.gmane.org), leads to very
7801 slow summary generation.
7802
7803 @item gnus-fetch-old-ephemeral-headers
7804 @vindex gnus-fetch-old-ephemeral-headers
7805 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7806 newsgroups.
7807
7808 @item gnus-build-sparse-threads
7809 @vindex gnus-build-sparse-threads
7810 Fetching old headers can be slow.  A low-rent similar effect can be
7811 gotten by setting this variable to @code{some}.  Gnus will then look at
7812 the complete @code{References} headers of all articles and try to string
7813 together articles that belong in the same thread.  This will leave
7814 @dfn{gaps} in the threading display where Gnus guesses that an article
7815 is missing from the thread.  (These gaps appear like normal summary
7816 lines.  If you select a gap, Gnus will try to fetch the article in
7817 question.)  If this variable is @code{t}, Gnus will display all these
7818 ``gaps'' without regard for whether they are useful for completing the
7819 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7820 off sparse leaf nodes that don't lead anywhere.  This variable is
7821 @code{nil} by default.
7822
7823 @item gnus-read-all-available-headers
7824 @vindex gnus-read-all-available-headers
7825 This is a rather obscure variable that few will find useful.  It's
7826 intended for those non-news newsgroups where the back end has to fetch
7827 quite a lot to present the summary buffer, and where it's impossible to
7828 go back to parents of articles.  This is mostly the case in the
7829 web-based groups, like the @code{nnultimate} groups.
7830
7831 If you don't use those, then it's safe to leave this as the default
7832 @code{nil}.  If you want to use this variable, it should be a regexp
7833 that matches the group name, or @code{t} for all groups.
7834
7835 @end table
7836
7837
7838 @node More Threading
7839 @subsubsection More Threading
7840
7841 @table @code
7842 @item gnus-show-threads
7843 @vindex gnus-show-threads
7844 If this variable is @code{nil}, no threading will be done, and all of
7845 the rest of the variables here will have no effect.  Turning threading
7846 off will speed group selection up a bit, but it is sure to make reading
7847 slower and more awkward.
7848
7849 @item gnus-thread-hide-subtree
7850 @vindex gnus-thread-hide-subtree
7851 If non-@code{nil}, all threads will be hidden when the summary buffer is
7852 generated.
7853
7854 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7855 Available predicates are @code{gnus-article-unread-p} and
7856 @code{gnus-article-unseen-p}.
7857
7858 Here's an example:
7859
7860 @lisp
7861 (setq gnus-thread-hide-subtree
7862       '(or gnus-article-unread-p
7863            gnus-article-unseen-p))
7864 @end lisp
7865
7866 (It's a pretty nonsensical example, since all unseen articles are also
7867 unread, but you get my drift.)
7868
7869
7870 @item gnus-thread-expunge-below
7871 @vindex gnus-thread-expunge-below
7872 All threads that have a total score (as defined by
7873 @code{gnus-thread-score-function}) less than this number will be
7874 expunged.  This variable is @code{nil} by default, which means that no
7875 threads are expunged.
7876
7877 @item gnus-thread-hide-killed
7878 @vindex gnus-thread-hide-killed
7879 if you kill a thread and this variable is non-@code{nil}, the subtree
7880 will be hidden.
7881
7882 @item gnus-thread-ignore-subject
7883 @vindex gnus-thread-ignore-subject
7884 Sometimes somebody changes the subject in the middle of a thread.  If
7885 this variable is non-@code{nil}, which is the default, the subject
7886 change is ignored.  If it is @code{nil}, a change in the subject will
7887 result in a new thread.
7888
7889 @item gnus-thread-indent-level
7890 @vindex gnus-thread-indent-level
7891 This is a number that says how much each sub-thread should be indented.
7892 The default is 4.
7893
7894 @item gnus-sort-gathered-threads-function
7895 @vindex gnus-sort-gathered-threads-function
7896 Sometimes, particularly with mailing lists, the order in which mails
7897 arrive locally is not necessarily the same as the order in which they
7898 arrived on the mailing list.  Consequently, when sorting sub-threads
7899 using the default @code{gnus-thread-sort-by-number}, responses can end
7900 up appearing before the article to which they are responding to.
7901 Setting this variable to an alternate value
7902 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7903 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7904 more logical sub-thread ordering in such instances.
7905
7906 @end table
7907
7908
7909 @node Low-Level Threading
7910 @subsubsection Low-Level Threading
7911
7912 @table @code
7913
7914 @item gnus-parse-headers-hook
7915 @vindex gnus-parse-headers-hook
7916 Hook run before parsing any headers.
7917
7918 @item gnus-alter-header-function
7919 @vindex gnus-alter-header-function
7920 If non-@code{nil}, this function will be called to allow alteration of
7921 article header structures.  The function is called with one parameter,
7922 the article header vector, which it may alter in any way.  For instance,
7923 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7924 in systematic ways (by adding prefixes and such), you can use this
7925 variable to un-scramble the @code{Message-ID}s so that they are more
7926 meaningful.  Here's one example:
7927
7928 @lisp
7929 (setq gnus-alter-header-function 'my-alter-message-id)
7930
7931 (defun my-alter-message-id (header)
7932   (let ((id (mail-header-id header)))
7933     (when (string-match
7934            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7935       (mail-header-set-id
7936        (concat (match-string 1 id) "@@" (match-string 2 id))
7937        header))))
7938 @end lisp
7939
7940 @end table
7941
7942
7943 @node Thread Commands
7944 @subsection Thread Commands
7945 @cindex thread commands
7946
7947 @table @kbd
7948
7949 @item T k
7950 @itemx C-M-k
7951 @kindex T k (Summary)
7952 @kindex C-M-k (Summary)
7953 @findex gnus-summary-kill-thread
7954 Mark all articles in the current (sub-)thread as read
7955 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7956 remove all marks instead.  If the prefix argument is negative, tick
7957 articles instead.
7958
7959 @item T l
7960 @itemx C-M-l
7961 @kindex T l (Summary)
7962 @kindex C-M-l (Summary)
7963 @findex gnus-summary-lower-thread
7964 Lower the score of the current (sub-)thread
7965 (@code{gnus-summary-lower-thread}).
7966
7967 @item T i
7968 @kindex T i (Summary)
7969 @findex gnus-summary-raise-thread
7970 Increase the score of the current (sub-)thread
7971 (@code{gnus-summary-raise-thread}).
7972
7973 @item T #
7974 @kindex T # (Summary)
7975 @findex gnus-uu-mark-thread
7976 Set the process mark on the current (sub-)thread
7977 (@code{gnus-uu-mark-thread}).
7978
7979 @item T M-#
7980 @kindex T M-# (Summary)
7981 @findex gnus-uu-unmark-thread
7982 Remove the process mark from the current (sub-)thread
7983 (@code{gnus-uu-unmark-thread}).
7984
7985 @item T T
7986 @kindex T T (Summary)
7987 @findex gnus-summary-toggle-threads
7988 Toggle threading (@code{gnus-summary-toggle-threads}).
7989
7990 @item T s
7991 @kindex T s (Summary)
7992 @findex gnus-summary-show-thread
7993 Expose the (sub-)thread hidden under the current article, if any@*
7994 (@code{gnus-summary-show-thread}).
7995
7996 @item T h
7997 @kindex T h (Summary)
7998 @findex gnus-summary-hide-thread
7999 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
8000
8001 @item T S
8002 @kindex T S (Summary)
8003 @findex gnus-summary-show-all-threads
8004 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
8005
8006 @item T H
8007 @kindex T H (Summary)
8008 @findex gnus-summary-hide-all-threads
8009 Hide all threads (@code{gnus-summary-hide-all-threads}).
8010
8011 @item T t
8012 @kindex T t (Summary)
8013 @findex gnus-summary-rethread-current
8014 Re-thread the current article's thread
8015 (@code{gnus-summary-rethread-current}).  This works even when the
8016 summary buffer is otherwise unthreaded.
8017
8018 @item T ^
8019 @kindex T ^ (Summary)
8020 @findex gnus-summary-reparent-thread
8021 Make the current article the child of the marked (or previous) article
8022 (@code{gnus-summary-reparent-thread}).
8023
8024 @item T M-^
8025 @kindex T M-^ (Summary)
8026 @findex gnus-summary-reparent-children
8027 Make the current article the parent of the marked articles
8028 (@code{gnus-summary-reparent-children}).
8029
8030 @end table
8031
8032 The following commands are thread movement commands.  They all
8033 understand the numeric prefix.
8034
8035 @table @kbd
8036
8037 @item T n
8038 @kindex T n (Summary)
8039 @itemx C-M-f
8040 @kindex C-M-n (Summary)
8041 @itemx M-down
8042 @kindex M-down (Summary)
8043 @findex gnus-summary-next-thread
8044 Go to the next thread (@code{gnus-summary-next-thread}).
8045
8046 @item T p
8047 @kindex T p (Summary)
8048 @itemx C-M-b
8049 @kindex C-M-p (Summary)
8050 @itemx M-up
8051 @kindex M-up (Summary)
8052 @findex gnus-summary-prev-thread
8053 Go to the previous thread (@code{gnus-summary-prev-thread}).
8054
8055 @item T d
8056 @kindex T d (Summary)
8057 @findex gnus-summary-down-thread
8058 Descend the thread (@code{gnus-summary-down-thread}).
8059
8060 @item T u
8061 @kindex T u (Summary)
8062 @findex gnus-summary-up-thread
8063 Ascend the thread (@code{gnus-summary-up-thread}).
8064
8065 @item T o
8066 @kindex T o (Summary)
8067 @findex gnus-summary-top-thread
8068 Go to the top of the thread (@code{gnus-summary-top-thread}).
8069 @end table
8070
8071 @vindex gnus-thread-operation-ignore-subject
8072 If you ignore subject while threading, you'll naturally end up with
8073 threads that have several different subjects in them.  If you then issue
8074 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
8075 wish to kill the entire thread, but just those parts of the thread that
8076 have the same subject as the current article.  If you like this idea,
8077 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
8078 is non-@code{nil} (which it is by default), subjects will be ignored
8079 when doing thread commands.  If this variable is @code{nil}, articles in
8080 the same thread with different subjects will not be included in the
8081 operation in question.  If this variable is @code{fuzzy}, only articles
8082 that have subjects fuzzily equal will be included (@pxref{Fuzzy
8083 Matching}).
8084
8085
8086 @node Sorting the Summary Buffer
8087 @section Sorting the Summary Buffer
8088
8089 @findex gnus-thread-sort-by-total-score
8090 @findex gnus-thread-sort-by-date
8091 @findex gnus-thread-sort-by-score
8092 @findex gnus-thread-sort-by-subject
8093 @findex gnus-thread-sort-by-author
8094 @findex gnus-thread-sort-by-recipient
8095 @findex gnus-thread-sort-by-number
8096 @findex gnus-thread-sort-by-random
8097 @vindex gnus-thread-sort-functions
8098 @findex gnus-thread-sort-by-most-recent-number
8099 @findex gnus-thread-sort-by-most-recent-date
8100 If you are using a threaded summary display, you can sort the threads by
8101 setting @code{gnus-thread-sort-functions}, which can be either a single
8102 function, a list of functions, or a list containing functions and
8103 @code{(not some-function)} elements.
8104
8105 By default, sorting is done on article numbers.  Ready-made sorting
8106 predicate functions include @code{gnus-thread-sort-by-number},
8107 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
8108 @code{gnus-thread-sort-by-subject},
8109 @code{gnus-thread-sort-by-date},
8110 @code{gnus-thread-sort-by-score},
8111 @code{gnus-thread-sort-by-most-recent-number},
8112 @code{gnus-thread-sort-by-most-recent-date},
8113 @code{gnus-thread-sort-by-random} and
8114 @code{gnus-thread-sort-by-total-score}.
8115
8116 Each function takes two threads and returns non-@code{nil} if the first
8117 thread should be sorted before the other.  Note that sorting really is
8118 normally done by looking only at the roots of each thread.
8119
8120 If you use more than one function, the primary sort key should be the
8121 last function in the list.  You should probably always include
8122 @code{gnus-thread-sort-by-number} in the list of sorting
8123 functions---preferably first.  This will ensure that threads that are
8124 equal with respect to the other sort criteria will be displayed in
8125 ascending article order.
8126
8127 If you would like to sort by reverse score, then by subject, and finally
8128 by number, you could do something like:
8129
8130 @lisp
8131 (setq gnus-thread-sort-functions
8132       '(gnus-thread-sort-by-number
8133         gnus-thread-sort-by-subject
8134         (not gnus-thread-sort-by-total-score)))
8135 @end lisp
8136
8137 The threads that have highest score will be displayed first in the
8138 summary buffer.  When threads have the same score, they will be sorted
8139 alphabetically.  The threads that have the same score and the same
8140 subject will be sorted by number, which is (normally) the sequence in
8141 which the articles arrived.
8142
8143 If you want to sort by score and then reverse arrival order, you could
8144 say something like:
8145
8146 @lisp
8147 (setq gnus-thread-sort-functions
8148       '((not gnus-thread-sort-by-number)
8149         gnus-thread-sort-by-score))
8150 @end lisp
8151
8152 @vindex gnus-thread-score-function
8153 The function in the @code{gnus-thread-score-function} variable (default
8154 @code{+}) is used for calculating the total score of a thread.  Useful
8155 functions might be @code{max}, @code{min}, or squared means, or whatever
8156 tickles your fancy.
8157
8158 @findex gnus-article-sort-functions
8159 @findex gnus-article-sort-by-date
8160 @findex gnus-article-sort-by-most-recent-date
8161 @findex gnus-article-sort-by-score
8162 @findex gnus-article-sort-by-subject
8163 @findex gnus-article-sort-by-author
8164 @findex gnus-article-sort-by-random
8165 @findex gnus-article-sort-by-number
8166 @findex gnus-article-sort-by-most-recent-number
8167 If you are using an unthreaded display for some strange reason or
8168 other, you have to fiddle with the @code{gnus-article-sort-functions}
8169 variable.  It is very similar to the
8170 @code{gnus-thread-sort-functions}, except that it uses slightly
8171 different functions for article comparison.  Available sorting
8172 predicate functions are @code{gnus-article-sort-by-number},
8173 @code{gnus-article-sort-by-author},
8174 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
8175 @code{gnus-article-sort-by-random}, and
8176 @code{gnus-article-sort-by-score}.
8177
8178 If you want to sort an unthreaded summary display by subject, you could
8179 say something like:
8180
8181 @lisp
8182 (setq gnus-article-sort-functions
8183       '(gnus-article-sort-by-number
8184         gnus-article-sort-by-subject))
8185 @end lisp
8186
8187 You can define group specific sorting via @code{gnus-parameters},
8188 @xref{Group Parameters}.
8189
8190
8191 @node Asynchronous Fetching
8192 @section Asynchronous Article Fetching
8193 @cindex asynchronous article fetching
8194 @cindex article pre-fetch
8195 @cindex pre-fetch
8196
8197 If you read your news from an @acronym{NNTP} server that's far away, the
8198 network latencies may make reading articles a chore.  You have to wait
8199 for a while after pressing @kbd{n} to go to the next article before the
8200 article appears.  Why can't Gnus just go ahead and fetch the article
8201 while you are reading the previous one?  Why not, indeed.
8202
8203 First, some caveats.  There are some pitfalls to using asynchronous
8204 article fetching, especially the way Gnus does it.
8205
8206 Let's say you are reading article 1, which is short, and article 2 is
8207 quite long, and you are not interested in reading that.  Gnus does not
8208 know this, so it goes ahead and fetches article 2.  You decide to read
8209 article 3, but since Gnus is in the process of fetching article 2, the
8210 connection is blocked.
8211
8212 To avoid these situations, Gnus will open two (count 'em two)
8213 connections to the server.  Some people may think this isn't a very nice
8214 thing to do, but I don't see any real alternatives.  Setting up that
8215 extra connection takes some time, so Gnus startup will be slower.
8216
8217 Gnus will fetch more articles than you will read.  This will mean that
8218 the link between your machine and the @acronym{NNTP} server will become more
8219 loaded than if you didn't use article pre-fetch.  The server itself will
8220 also become more loaded---both with the extra article requests, and the
8221 extra connection.
8222
8223 Ok, so now you know that you shouldn't really use this thing@dots{} unless
8224 you really want to.
8225
8226 @vindex gnus-asynchronous
8227 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
8228 happen automatically.
8229
8230 @vindex gnus-use-article-prefetch
8231 You can control how many articles are to be pre-fetched by setting
8232 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
8233 that when you read an article in the group, the back end will pre-fetch
8234 the next 30 articles.  If this variable is @code{t}, the back end will
8235 pre-fetch all the articles it can without bound.  If it is
8236 @code{nil}, no pre-fetching will be done.
8237
8238 @vindex gnus-async-prefetch-article-p
8239 @findex gnus-async-unread-p
8240 There are probably some articles that you don't want to pre-fetch---read
8241 articles, for instance.  The @code{gnus-async-prefetch-article-p}
8242 variable controls whether an article is to be pre-fetched.  This
8243 function should return non-@code{nil} when the article in question is
8244 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
8245 returns @code{nil} on read articles.  The function is called with an
8246 article data structure as the only parameter.
8247
8248 If, for instance, you wish to pre-fetch only unread articles shorter
8249 than 100 lines, you could say something like:
8250
8251 @lisp
8252 (defun my-async-short-unread-p (data)
8253   "Return non-nil for short, unread articles."
8254   (and (gnus-data-unread-p data)
8255        (< (mail-header-lines (gnus-data-header data))
8256           100)))
8257
8258 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
8259 @end lisp
8260
8261 These functions will be called many, many times, so they should
8262 preferably be short and sweet to avoid slowing down Gnus too much.
8263 It's probably a good idea to byte-compile things like this.
8264
8265 @vindex gnus-async-post-fetch-function
8266 @findex gnus-html-prefetch-images
8267 After an article has been prefetched, this
8268 @code{gnus-async-post-fetch-function} will be called.  The buffer will
8269 be narrowed to the region of the article that was fetched.  A useful
8270 value would be @code{gnus-html-prefetch-images}, which will prefetch
8271 and store images referenced in the article, so that you don't have to
8272 wait for them to be fetched when you read the article.  This is useful
8273 for @acronym{HTML} messages that have external images.
8274
8275 @vindex gnus-prefetched-article-deletion-strategy
8276 Articles have to be removed from the asynch buffer sooner or later.  The
8277 @code{gnus-prefetched-article-deletion-strategy} says when to remove
8278 articles.  This is a list that may contain the following elements:
8279
8280 @table @code
8281 @item read
8282 Remove articles when they are read.
8283
8284 @item exit
8285 Remove articles when exiting the group.
8286 @end table
8287
8288 The default value is @code{(read exit)}.
8289
8290 @c @vindex gnus-use-header-prefetch
8291 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
8292 @c from the next group.
8293
8294
8295 @node Article Caching
8296 @section Article Caching
8297 @cindex article caching
8298 @cindex caching
8299
8300 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
8301 consider turning article caching on.  Each article will then be stored
8302 locally under your home directory.  As you may surmise, this could
8303 potentially use @emph{huge} amounts of disk space, as well as eat up all
8304 your inodes so fast it will make your head swim.  In vodka.
8305
8306 Used carefully, though, it could be just an easier way to save articles.
8307
8308 @vindex gnus-use-long-file-name
8309 @vindex gnus-cache-directory
8310 @vindex gnus-use-cache
8311 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
8312 all articles ticked or marked as dormant will then be copied
8313 over to your local cache (@code{gnus-cache-directory}).  Whether this
8314 cache is flat or hierarchical is controlled by the
8315 @code{gnus-use-long-file-name} variable, as usual.
8316
8317 When re-selecting a ticked or dormant article, it will be fetched from the
8318 cache instead of from the server.  As articles in your cache will never
8319 expire, this might serve as a method of saving articles while still
8320 keeping them where they belong.  Just mark all articles you want to save
8321 as dormant, and don't worry.
8322
8323 When an article is marked as read, is it removed from the cache.
8324
8325 @vindex gnus-cache-remove-articles
8326 @vindex gnus-cache-enter-articles
8327 The entering/removal of articles from the cache is controlled by the
8328 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
8329 variables.  Both are lists of symbols.  The first is @code{(ticked
8330 dormant)} by default, meaning that ticked and dormant articles will be
8331 put in the cache.  The latter is @code{(read)} by default, meaning that
8332 articles marked as read are removed from the cache.  Possibly
8333 symbols in these two lists are @code{ticked}, @code{dormant},
8334 @code{unread} and @code{read}.
8335
8336 @findex gnus-jog-cache
8337 So where does the massive article-fetching and storing come into the
8338 picture?  The @code{gnus-jog-cache} command will go through all
8339 subscribed newsgroups, request all unread articles, score them, and
8340 store them in the cache.  You should only ever, ever ever ever, use this
8341 command if 1) your connection to the @acronym{NNTP} server is really, really,
8342 really slow and 2) you have a really, really, really huge disk.
8343 Seriously.  One way to cut down on the number of articles downloaded is
8344 to score unwanted articles down and have them marked as read.  They will
8345 not then be downloaded by this command.
8346
8347 @vindex gnus-uncacheable-groups
8348 @vindex gnus-cacheable-groups
8349 It is likely that you do not want caching on all groups.  For instance,
8350 if your @code{nnml} mail is located under your home directory, it makes no
8351 sense to cache it somewhere else under your home directory.  Unless you
8352 feel that it's neat to use twice as much space.
8353
8354 To limit the caching, you could set @code{gnus-cacheable-groups} to a
8355 regexp of groups to cache, @samp{^nntp} for instance, or set the
8356 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
8357 Both variables are @code{nil} by default.  If a group matches both
8358 variables, the group is not cached.
8359
8360 @findex gnus-cache-generate-nov-databases
8361 @findex gnus-cache-generate-active
8362 @vindex gnus-cache-active-file
8363 The cache stores information on what articles it contains in its active
8364 file (@code{gnus-cache-active-file}).  If this file (or any other parts
8365 of the cache) becomes all messed up for some reason or other, Gnus
8366 offers two functions that will try to set things right.  @kbd{M-x
8367 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
8368 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
8369 file.
8370
8371 @findex gnus-cache-move-cache
8372 @code{gnus-cache-move-cache} will move your whole
8373 @code{gnus-cache-directory} to some other location.  You get asked to
8374 where, isn't that cool?
8375
8376 @node Persistent Articles
8377 @section Persistent Articles
8378 @cindex persistent articles
8379
8380 Closely related to article caching, we have @dfn{persistent articles}.
8381 In fact, it's just a different way of looking at caching, and much more
8382 useful in my opinion.
8383
8384 Say you're reading a newsgroup, and you happen on to some valuable gem
8385 that you want to keep and treasure forever.  You'd normally just save it
8386 (using one of the many saving commands) in some file.  The problem with
8387 that is that it's just, well, yucky.  Ideally you'd prefer just having
8388 the article remain in the group where you found it forever; untouched by
8389 the expiry going on at the news server.
8390
8391 This is what a @dfn{persistent article} is---an article that just won't
8392 be deleted.  It's implemented using the normal cache functions, but
8393 you use two explicit commands for managing persistent articles:
8394
8395 @table @kbd
8396
8397 @item *
8398 @kindex * (Summary)
8399 @findex gnus-cache-enter-article
8400 Make the current article persistent (@code{gnus-cache-enter-article}).
8401
8402 @item M-*
8403 @kindex M-* (Summary)
8404 @findex gnus-cache-remove-article
8405 Remove the current article from the persistent articles
8406 (@code{gnus-cache-remove-article}).  This will normally delete the
8407 article.
8408 @end table
8409
8410 Both these commands understand the process/prefix convention.
8411
8412 To avoid having all ticked articles (and stuff) entered into the cache,
8413 you should set @code{gnus-use-cache} to @code{passive} if you're just
8414 interested in persistent articles:
8415
8416 @lisp
8417 (setq gnus-use-cache 'passive)
8418 @end lisp
8419
8420 @node Sticky Articles
8421 @section Sticky Articles
8422 @cindex sticky articles
8423
8424 When you select an article the current article buffer will be reused
8425 according to the value of the variable
8426 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
8427 default) all articles reuse the same article buffer.  Else each group
8428 has its own article buffer.
8429
8430 This implies that it's not possible to have more than one article buffer
8431 in a group at a time.  But sometimes you might want to display all the
8432 latest emails from your mother, your father, your aunt, your uncle and
8433 your 17 cousins to coordinate the next christmas party.
8434
8435 That's where sticky articles come in handy.  A sticky article buffer
8436 basically is a normal article buffer, but it won't be reused when you
8437 select another article.  You can make an article sticky with:
8438
8439 @table @kbd
8440 @item A S
8441 @kindex A S (Summary)
8442 @findex gnus-sticky-article
8443 Make the current article sticky.  If a prefix arg is given, ask for a
8444 name for this sticky article buffer.
8445 @end table
8446
8447 To close a sticky article buffer you can use these commands:
8448
8449 @table @kbd
8450 @item q
8451 @kindex q (Article)
8452 @findex bury-buffer
8453 Puts this sticky article buffer at the end of the list of all buffers.
8454
8455 @item k
8456 @kindex k (Article)
8457 @findex gnus-kill-sticky-article-buffer
8458 Kills this sticky article buffer.
8459 @end table
8460
8461 To kill all sticky article buffers you can use:
8462
8463 @defun gnus-kill-sticky-article-buffers ARG
8464 Kill all sticky article buffers.
8465 If a prefix ARG is given, ask for confirmation.
8466 @end defun
8467
8468 @node Article Backlog
8469 @section Article Backlog
8470 @cindex backlog
8471 @cindex article backlog
8472
8473 If you have a slow connection, but the idea of using caching seems
8474 unappealing to you (and it is, really), you can help the situation some
8475 by switching on the @dfn{backlog}.  This is where Gnus will buffer
8476 already read articles so that it doesn't have to re-fetch articles
8477 you've already read.  This only helps if you are in the habit of
8478 re-selecting articles you've recently read, of course.  If you never do
8479 that, turning the backlog on will slow Gnus down a little bit, and
8480 increase memory usage some.
8481
8482 @vindex gnus-keep-backlog
8483 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
8484 at most @var{n} old articles in a buffer for later re-fetching.  If this
8485 variable is non-@code{nil} and is not a number, Gnus will store
8486 @emph{all} read articles, which means that your Emacs will grow without
8487 bound before exploding and taking your machine down with you.  I put
8488 that in there just to keep y'all on your toes.
8489
8490 The default value is 20.
8491
8492
8493 @node Saving Articles
8494 @section Saving Articles
8495 @cindex saving articles
8496
8497 Gnus can save articles in a number of ways.  Below is the documentation
8498 for saving articles in a fairly straight-forward fashion (i.e., little
8499 processing of the article is done before it is saved).  For a different
8500 approach (uudecoding, unsharing) you should use @code{gnus-uu}
8501 (@pxref{Decoding Articles}).
8502
8503 For the commands listed here, the target is a file.  If you want to
8504 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
8505 command (@pxref{Mail Group Commands}).
8506
8507 @vindex gnus-save-all-headers
8508 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
8509 unwanted headers before saving the article.
8510
8511 @vindex gnus-saved-headers
8512 If the preceding variable is @code{nil}, all headers that match the
8513 @code{gnus-saved-headers} regexp will be kept, while the rest will be
8514 deleted before saving.
8515
8516 @table @kbd
8517
8518 @item O o
8519 @itemx o
8520 @kindex O o (Summary)
8521 @kindex o (Summary)
8522 @findex gnus-summary-save-article
8523 @c @icon{gnus-summary-save-article}
8524 Save the current article using the default article saver
8525 (@code{gnus-summary-save-article}).
8526
8527 @item O m
8528 @kindex O m (Summary)
8529 @findex gnus-summary-save-article-mail
8530 Save the current article in a Unix mail box (mbox) file
8531 (@code{gnus-summary-save-article-mail}).
8532
8533 @item O r
8534 @kindex O r (Summary)
8535 @findex gnus-summary-save-article-rmail
8536 Save the current article in Rmail format
8537 (@code{gnus-summary-save-article-rmail}).  This is mbox since Emacs 23,
8538 Babyl in older versions.
8539
8540 @item O f
8541 @kindex O f (Summary)
8542 @findex gnus-summary-save-article-file
8543 @c @icon{gnus-summary-save-article-file}
8544 Save the current article in plain file format
8545 (@code{gnus-summary-save-article-file}).
8546
8547 @item O F
8548 @kindex O F (Summary)
8549 @findex gnus-summary-write-article-file
8550 Write the current article in plain file format, overwriting any previous
8551 file contents (@code{gnus-summary-write-article-file}).
8552
8553 @item O b
8554 @kindex O b (Summary)
8555 @findex gnus-summary-save-article-body-file
8556 Save the current article body in plain file format
8557 (@code{gnus-summary-save-article-body-file}).
8558
8559 @item O h
8560 @kindex O h (Summary)
8561 @findex gnus-summary-save-article-folder
8562 Save the current article in mh folder format
8563 (@code{gnus-summary-save-article-folder}).
8564
8565 @item O v
8566 @kindex O v (Summary)
8567 @findex gnus-summary-save-article-vm
8568 Save the current article in a VM folder
8569 (@code{gnus-summary-save-article-vm}).
8570
8571 @item O p
8572 @itemx |
8573 @kindex O p (Summary)
8574 @kindex | (Summary)
8575 @findex gnus-summary-pipe-output
8576 @vindex gnus-summary-pipe-output-default-command
8577 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
8578 the current article to a process (@code{gnus-summary-pipe-output}).
8579 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
8580 complete headers in the piped output.  The symbolic prefix @code{r} is
8581 special; it lets this command pipe a raw article including all headers.
8582 The @code{gnus-summary-pipe-output-default-command} variable can be set
8583 to a string containing the default command and options (default
8584 @code{nil}).
8585
8586 @item O P
8587 @kindex O P (Summary)
8588 @findex gnus-summary-muttprint
8589 @vindex gnus-summary-muttprint-program
8590 Save the current article into muttprint.  That is, print it using the
8591 external program @uref{http://muttprint.sourceforge.net/,
8592 Muttprint}.  The program name and options to use is controlled by the
8593 variable @code{gnus-summary-muttprint-program}.
8594 (@code{gnus-summary-muttprint}).
8595
8596 @end table
8597
8598 @vindex gnus-prompt-before-saving
8599 All these commands use the process/prefix convention
8600 (@pxref{Process/Prefix}).  If you save bunches of articles using these
8601 functions, you might get tired of being prompted for files to save each
8602 and every article in.  The prompting action is controlled by
8603 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
8604 default, giving you that excessive prompting action you know and
8605 loathe.  If you set this variable to @code{t} instead, you'll be prompted
8606 just once for each series of articles you save.  If you like to really
8607 have Gnus do all your thinking for you, you can even set this variable
8608 to @code{nil}, which means that you will never be prompted for files to
8609 save articles in.  Gnus will simply save all the articles in the default
8610 files.
8611
8612
8613 @vindex gnus-default-article-saver
8614 You can customize the @code{gnus-default-article-saver} variable to make
8615 Gnus do what you want it to.  You can use any of the eight ready-made
8616 functions below, or you can create your own.
8617
8618 @table @code
8619
8620 @item gnus-summary-save-in-rmail
8621 @findex gnus-summary-save-in-rmail
8622 @vindex gnus-rmail-save-name
8623 @findex gnus-plain-save-name
8624 This is the default format, that used by the Rmail package.  Since Emacs
8625 23, Rmail uses standard mbox format.  Before this, it used the
8626 @dfn{Babyl} format.  Accordingly, this command writes mbox format since
8627 Emacs 23, unless appending to an existing Babyl file.  In older versions
8628 of Emacs, it always uses Babyl format.  Uses the function in the
8629 @code{gnus-rmail-save-name} variable to get a file name to save the
8630 article in.  The default is @code{gnus-plain-save-name}.
8631
8632 @item gnus-summary-save-in-mail
8633 @findex gnus-summary-save-in-mail
8634 @vindex gnus-mail-save-name
8635 Save in a Unix mail (mbox) file.  Uses the function in the
8636 @code{gnus-mail-save-name} variable to get a file name to save the
8637 article in.  The default is @code{gnus-plain-save-name}.
8638
8639 @item gnus-summary-save-in-file
8640 @findex gnus-summary-save-in-file
8641 @vindex gnus-file-save-name
8642 @findex gnus-numeric-save-name
8643 Append the article straight to an ordinary file.  Uses the function in
8644 the @code{gnus-file-save-name} variable to get a file name to save the
8645 article in.  The default is @code{gnus-numeric-save-name}.
8646
8647 @item gnus-summary-write-to-file
8648 @findex gnus-summary-write-to-file
8649 Write the article straight to an ordinary file.  The file is
8650 overwritten if it exists.  Uses the function in the
8651 @code{gnus-file-save-name} variable to get a file name to save the
8652 article in.  The default is @code{gnus-numeric-save-name}.
8653
8654 @item gnus-summary-save-body-in-file
8655 @findex gnus-summary-save-body-in-file
8656 Append the article body to an ordinary file.  Uses the function in the
8657 @code{gnus-file-save-name} variable to get a file name to save the
8658 article in.  The default is @code{gnus-numeric-save-name}.
8659
8660 @item gnus-summary-write-body-to-file
8661 @findex gnus-summary-write-body-to-file
8662 Write the article body straight to an ordinary file.  The file is
8663 overwritten if it exists.  Uses the function in the
8664 @code{gnus-file-save-name} variable to get a file name to save the
8665 article in.  The default is @code{gnus-numeric-save-name}.
8666
8667 @item gnus-summary-save-in-folder
8668 @findex gnus-summary-save-in-folder
8669 @findex gnus-folder-save-name
8670 @findex gnus-Folder-save-name
8671 @vindex gnus-folder-save-name
8672 @cindex rcvstore
8673 @cindex MH folders
8674 Save the article to an MH folder using @code{rcvstore} from the MH
8675 library.  Uses the function in the @code{gnus-folder-save-name} variable
8676 to get a file name to save the article in.  The default is
8677 @code{gnus-folder-save-name}, but you can also use
8678 @code{gnus-Folder-save-name}, which creates capitalized names.
8679
8680 @item gnus-summary-save-in-vm
8681 @findex gnus-summary-save-in-vm
8682 Save the article in a VM folder.  You have to have the VM mail
8683 reader to use this setting.
8684
8685 @item gnus-summary-save-in-pipe
8686 @findex gnus-summary-save-in-pipe
8687 Pipe the article to a shell command.  This function takes optional two
8688 arguments COMMAND and RAW.  Valid values for COMMAND include:
8689
8690 @itemize @bullet
8691 @item a string@*
8692 The executable command name and possibly arguments.
8693 @item @code{nil}@*
8694 You will be prompted for the command in the minibuffer.
8695 @item the symbol @code{default}@*
8696 It will be replaced with the command which the variable
8697 @code{gnus-summary-pipe-output-default-command} holds or the command
8698 last used for saving.
8699 @end itemize
8700
8701 Non-@code{nil} value for RAW overrides @code{:decode} and
8702 @code{:headers} properties (see below) and the raw article including all
8703 headers will be piped.
8704 @end table
8705
8706 The symbol of each function may have the following properties:
8707
8708 @table @code
8709 @item :decode
8710 The value non-@code{nil} means save decoded articles.  This is
8711 meaningful only with @code{gnus-summary-save-in-file},
8712 @code{gnus-summary-save-body-in-file},
8713 @code{gnus-summary-write-to-file},
8714 @code{gnus-summary-write-body-to-file}, and
8715 @code{gnus-summary-save-in-pipe}.
8716
8717 @item :function
8718 The value specifies an alternative function which appends, not
8719 overwrites, articles to a file.  This implies that when saving many
8720 articles at a time, @code{gnus-prompt-before-saving} is bound to
8721 @code{t} and all articles are saved in a single file.  This is
8722 meaningful only with @code{gnus-summary-write-to-file} and
8723 @code{gnus-summary-write-body-to-file}.
8724
8725 @item :headers
8726 The value specifies the symbol of a variable of which the value
8727 specifies headers to be saved.  If it is omitted,
8728 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8729 headers should be saved.
8730 @end table
8731
8732 @vindex gnus-article-save-directory
8733 All of these functions, except for the last one, will save the article
8734 in the @code{gnus-article-save-directory}, which is initialized from the
8735 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8736 default.
8737
8738 As you can see above, the functions use different functions to find a
8739 suitable name of a file to save the article in.  Below is a list of
8740 available functions that generate names:
8741
8742 @table @code
8743
8744 @item gnus-Numeric-save-name
8745 @findex gnus-Numeric-save-name
8746 File names like @file{~/News/Alt.andrea-dworkin/45}.
8747
8748 @item gnus-numeric-save-name
8749 @findex gnus-numeric-save-name
8750 File names like @file{~/News/alt.andrea-dworkin/45}.
8751
8752 @item gnus-Plain-save-name
8753 @findex gnus-Plain-save-name
8754 File names like @file{~/News/Alt.andrea-dworkin}.
8755
8756 @item gnus-plain-save-name
8757 @findex gnus-plain-save-name
8758 File names like @file{~/News/alt.andrea-dworkin}.
8759
8760 @item gnus-sender-save-name
8761 @findex gnus-sender-save-name
8762 File names like @file{~/News/larsi}.
8763 @end table
8764
8765 @vindex gnus-split-methods
8766 You can have Gnus suggest where to save articles by plonking a regexp into
8767 the @code{gnus-split-methods} alist.  For instance, if you would like to
8768 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8769 related to VM in @file{vm-stuff}, you could set this variable to something
8770 like:
8771
8772 @lisp
8773 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8774  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8775  (my-choosing-function "../other-dir/my-stuff")
8776  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8777 @end lisp
8778
8779 We see that this is a list where each element is a list that has two
8780 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8781 a string (in which case it is used as a regexp to match on the article
8782 head); it can be a symbol (which will be called as a function with the
8783 group name as a parameter); or it can be a list (which will be
8784 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8785 the @dfn{file} will be used as a default prompt.  In addition, the
8786 result of the operation itself will be used if the function or form
8787 called returns a string or a list of strings.
8788
8789 You basically end up with a list of file names that might be used when
8790 saving the current article.  (All ``matches'' will be used.)  You will
8791 then be prompted for what you really want to use as a name, with file
8792 name completion over the results from applying this variable.
8793
8794 This variable is @code{((gnus-article-archive-name))} by default, which
8795 means that Gnus will look at the articles it saves for an
8796 @code{Archive-name} line and use that as a suggestion for the file
8797 name.
8798
8799 Here's an example function to clean up file names somewhat.  If you have
8800 lots of mail groups called things like
8801 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8802 these group names before creating the file name to save to.  The
8803 following will do just that:
8804
8805 @lisp
8806 (defun my-save-name (group)
8807   (when (string-match "^nnml:mail." group)
8808     (substring group (match-end 0))))
8809
8810 (setq gnus-split-methods
8811       '((gnus-article-archive-name)
8812         (my-save-name)))
8813 @end lisp
8814
8815
8816 @vindex gnus-use-long-file-name
8817 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8818 @code{nil}, all the preceding functions will replace all periods
8819 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8820 the functions will generate hierarchies of directories instead of having
8821 all the files in the top level directory
8822 (@file{~/News/alt/andrea-dworkin} instead of
8823 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8824 on most systems.  However, for historical reasons, this is @code{nil} on
8825 Xenix and usg-unix-v machines by default.
8826
8827 This function also affects kill and score file names.  If this variable
8828 is a list, and the list contains the element @code{not-score}, long file
8829 names will not be used for score files, if it contains the element
8830 @code{not-save}, long file names will not be used for saving, and if it
8831 contains the element @code{not-kill}, long file names will not be used
8832 for kill files.
8833
8834 If you'd like to save articles in a hierarchy that looks something like
8835 a spool, you could
8836
8837 @lisp
8838 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8839 (setq gnus-default-article-saver
8840       'gnus-summary-save-in-file)          ; @r{no encoding}
8841 @end lisp
8842
8843 Then just save with @kbd{o}.  You'd then read this hierarchy with
8844 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8845 the top level directory as the argument (@file{~/News/}).  Then just walk
8846 around to the groups/directories with @code{nneething}.
8847
8848
8849 @node Decoding Articles
8850 @section Decoding Articles
8851 @cindex decoding articles
8852
8853 Sometime users post articles (or series of articles) that have been
8854 encoded in some way or other.  Gnus can decode them for you.
8855
8856 @menu
8857 * Uuencoded Articles::          Uudecode articles.
8858 * Shell Archives::              Unshar articles.
8859 * PostScript Files::            Split PostScript.
8860 * Other Files::                 Plain save and binhex.
8861 * Decoding Variables::          Variables for a happy decoding.
8862 * Viewing Files::               You want to look at the result of the decoding?
8863 @end menu
8864
8865 @cindex series
8866 @cindex article series
8867 All these functions use the process/prefix convention
8868 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8869 the extension that a ``single article'' means ``a single series''.  Gnus
8870 can find out by itself what articles belong to a series, decode all the
8871 articles and unpack/view/save the resulting file(s).
8872
8873 Gnus guesses what articles are in the series according to the following
8874 simplish rule: The subjects must be (nearly) identical, except for the
8875 last two numbers of the line.  (Spaces are largely ignored, however.)
8876
8877 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8878 will find all the articles that match the regexp @samp{^cat.gif
8879 ([0-9]+/[0-9]+).*$}.
8880
8881 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8882 series}, will not be properly recognized by any of the automatic viewing
8883 commands, and you have to mark the articles manually with @kbd{#}.
8884
8885
8886 @node Uuencoded Articles
8887 @subsection Uuencoded Articles
8888 @cindex uudecode
8889 @cindex uuencoded articles
8890
8891 @table @kbd
8892
8893 @item X u
8894 @kindex X u (Summary)
8895 @findex gnus-uu-decode-uu
8896 @c @icon{gnus-uu-decode-uu}
8897 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8898
8899 @item X U
8900 @kindex X U (Summary)
8901 @findex gnus-uu-decode-uu-and-save
8902 Uudecodes and saves the current series
8903 (@code{gnus-uu-decode-uu-and-save}).
8904
8905 @item X v u
8906 @kindex X v u (Summary)
8907 @findex gnus-uu-decode-uu-view
8908 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8909
8910 @item X v U
8911 @kindex X v U (Summary)
8912 @findex gnus-uu-decode-uu-and-save-view
8913 Uudecodes, views and saves the current series
8914 (@code{gnus-uu-decode-uu-and-save-view}).
8915
8916 @end table
8917
8918 Remember that these all react to the presence of articles marked with
8919 the process mark.  If, for instance, you'd like to decode and save an
8920 entire newsgroup, you'd typically do @kbd{M P a}
8921 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8922 (@code{gnus-uu-decode-uu-and-save}).
8923
8924 All this is very much different from how @code{gnus-uu} worked with
8925 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8926 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8927 articles in some way (@pxref{Setting Process Marks}) and then press
8928 @kbd{X u}.
8929
8930 @vindex gnus-uu-notify-files
8931 Note: When trying to decode articles that have names matching
8932 @code{gnus-uu-notify-files}, which is hard-coded to
8933 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8934 automatically post an article on @samp{comp.unix.wizards} saying that
8935 you have just viewed the file in question.  This feature can't be turned
8936 off.
8937
8938
8939 @node Shell Archives
8940 @subsection Shell Archives
8941 @cindex unshar
8942 @cindex shell archives
8943 @cindex shared articles
8944
8945 Shell archives (``shar files'') used to be a popular way to distribute
8946 sources, but it isn't used all that much today.  In any case, we have
8947 some commands to deal with these:
8948
8949 @table @kbd
8950
8951 @item X s
8952 @kindex X s (Summary)
8953 @findex gnus-uu-decode-unshar
8954 Unshars the current series (@code{gnus-uu-decode-unshar}).
8955
8956 @item X S
8957 @kindex X S (Summary)
8958 @findex gnus-uu-decode-unshar-and-save
8959 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8960
8961 @item X v s
8962 @kindex X v s (Summary)
8963 @findex gnus-uu-decode-unshar-view
8964 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8965
8966 @item X v S
8967 @kindex X v S (Summary)
8968 @findex gnus-uu-decode-unshar-and-save-view
8969 Unshars, views and saves the current series
8970 (@code{gnus-uu-decode-unshar-and-save-view}).
8971 @end table
8972
8973
8974 @node PostScript Files
8975 @subsection PostScript Files
8976 @cindex PostScript
8977
8978 @table @kbd
8979
8980 @item X p
8981 @kindex X p (Summary)
8982 @findex gnus-uu-decode-postscript
8983 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8984
8985 @item X P
8986 @kindex X P (Summary)
8987 @findex gnus-uu-decode-postscript-and-save
8988 Unpack and save the current PostScript series
8989 (@code{gnus-uu-decode-postscript-and-save}).
8990
8991 @item X v p
8992 @kindex X v p (Summary)
8993 @findex gnus-uu-decode-postscript-view
8994 View the current PostScript series
8995 (@code{gnus-uu-decode-postscript-view}).
8996
8997 @item X v P
8998 @kindex X v P (Summary)
8999 @findex gnus-uu-decode-postscript-and-save-view
9000 View and save the current PostScript series
9001 (@code{gnus-uu-decode-postscript-and-save-view}).
9002 @end table
9003
9004
9005 @node Other Files
9006 @subsection Other Files
9007
9008 @table @kbd
9009 @item X o
9010 @kindex X o (Summary)
9011 @findex gnus-uu-decode-save
9012 Save the current series
9013 (@code{gnus-uu-decode-save}).
9014
9015 @item X b
9016 @kindex X b (Summary)
9017 @findex gnus-uu-decode-binhex
9018 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
9019 doesn't really work yet.
9020
9021 @item X Y
9022 @kindex X Y (Summary)
9023 @findex gnus-uu-decode-yenc
9024 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
9025 @end table
9026
9027
9028 @node Decoding Variables
9029 @subsection Decoding Variables
9030
9031 Adjective, not verb.
9032
9033 @menu
9034 * Rule Variables::              Variables that say how a file is to be viewed.
9035 * Other Decode Variables::      Other decode variables.
9036 * Uuencoding and Posting::      Variables for customizing uuencoding.
9037 @end menu
9038
9039
9040 @node Rule Variables
9041 @subsubsection Rule Variables
9042 @cindex rule variables
9043
9044 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
9045 variables are of the form
9046
9047 @lisp
9048       (list '(regexp1 command2)
9049             '(regexp2 command2)
9050             ...)
9051 @end lisp
9052
9053 @table @code
9054
9055 @item gnus-uu-user-view-rules
9056 @vindex gnus-uu-user-view-rules
9057 @cindex sox
9058 This variable is consulted first when viewing files.  If you wish to use,
9059 for instance, @code{sox} to convert an @file{.au} sound file, you could
9060 say something like:
9061 @lisp
9062 (setq gnus-uu-user-view-rules
9063       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
9064 @end lisp
9065
9066 @item gnus-uu-user-view-rules-end
9067 @vindex gnus-uu-user-view-rules-end
9068 This variable is consulted if Gnus couldn't make any matches from the
9069 user and default view rules.
9070
9071 @item gnus-uu-user-archive-rules
9072 @vindex gnus-uu-user-archive-rules
9073 This variable can be used to say what commands should be used to unpack
9074 archives.
9075 @end table
9076
9077
9078 @node Other Decode Variables
9079 @subsubsection Other Decode Variables
9080
9081 @table @code
9082 @vindex gnus-uu-grabbed-file-functions
9083
9084 @item gnus-uu-grabbed-file-functions
9085 All functions in this list will be called right after each file has been
9086 successfully decoded---so that you can move or view files right away,
9087 and don't have to wait for all files to be decoded before you can do
9088 anything.  Ready-made functions you can put in this list are:
9089
9090 @table @code
9091
9092 @item gnus-uu-grab-view
9093 @findex gnus-uu-grab-view
9094 View the file.
9095
9096 @item gnus-uu-grab-move
9097 @findex gnus-uu-grab-move
9098 Move the file (if you're using a saving function.)
9099 @end table
9100
9101 @item gnus-uu-be-dangerous
9102 @vindex gnus-uu-be-dangerous
9103 Specifies what to do if unusual situations arise during decoding.  If
9104 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
9105 that didn't work, and overwrite existing files.  Otherwise, ask each
9106 time.
9107
9108 @item gnus-uu-ignore-files-by-name
9109 @vindex gnus-uu-ignore-files-by-name
9110 Files with name matching this regular expression won't be viewed.
9111
9112 @item gnus-uu-ignore-files-by-type
9113 @vindex gnus-uu-ignore-files-by-type
9114 Files with a @acronym{MIME} type matching this variable won't be viewed.
9115 Note that Gnus tries to guess what type the file is based on the name.
9116 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
9117 kludgey.
9118
9119 @item gnus-uu-tmp-dir
9120 @vindex gnus-uu-tmp-dir
9121 Where @code{gnus-uu} does its work.
9122
9123 @item gnus-uu-do-not-unpack-archives
9124 @vindex gnus-uu-do-not-unpack-archives
9125 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
9126 looking for files to display.
9127
9128 @item gnus-uu-view-and-save
9129 @vindex gnus-uu-view-and-save
9130 Non-@code{nil} means that the user will always be asked to save a file
9131 after viewing it.
9132
9133 @item gnus-uu-ignore-default-view-rules
9134 @vindex gnus-uu-ignore-default-view-rules
9135 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
9136 rules.
9137
9138 @item gnus-uu-ignore-default-archive-rules
9139 @vindex gnus-uu-ignore-default-archive-rules
9140 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
9141 unpacking commands.
9142
9143 @item gnus-uu-kill-carriage-return
9144 @vindex gnus-uu-kill-carriage-return
9145 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
9146 from articles.
9147
9148 @item gnus-uu-unmark-articles-not-decoded
9149 @vindex gnus-uu-unmark-articles-not-decoded
9150 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
9151 decoded articles as unread.
9152
9153 @item gnus-uu-correct-stripped-uucode
9154 @vindex gnus-uu-correct-stripped-uucode
9155 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
9156 uuencoded files that have had trailing spaces deleted.
9157
9158 @item gnus-uu-pre-uudecode-hook
9159 @vindex gnus-uu-pre-uudecode-hook
9160 Hook run before sending a message to @code{uudecode}.
9161
9162 @item gnus-uu-view-with-metamail
9163 @vindex gnus-uu-view-with-metamail
9164 @cindex metamail
9165 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
9166 commands defined by the rule variables and just fudge a @acronym{MIME}
9167 content type based on the file name.  The result will be fed to
9168 @code{metamail} for viewing.
9169
9170 @item gnus-uu-save-in-digest
9171 @vindex gnus-uu-save-in-digest
9172 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
9173 decoding, will save in digests.  If this variable is @code{nil},
9174 @code{gnus-uu} will just save everything in a file without any
9175 embellishments.  The digesting almost conforms to RFC 1153---no easy way
9176 to specify any meaningful volume and issue numbers were found, so I
9177 simply dropped them.
9178
9179 @end table
9180
9181
9182 @node Uuencoding and Posting
9183 @subsubsection Uuencoding and Posting
9184
9185 @table @code
9186
9187 @item gnus-uu-post-include-before-composing
9188 @vindex gnus-uu-post-include-before-composing
9189 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
9190 before you compose the article.  If this variable is @code{t}, you can
9191 either include an encoded file with @kbd{C-c C-i} or have one included
9192 for you when you post the article.
9193
9194 @item gnus-uu-post-length
9195 @vindex gnus-uu-post-length
9196 Maximum length of an article.  The encoded file will be split into how
9197 many articles it takes to post the entire file.
9198
9199 @item gnus-uu-post-threaded
9200 @vindex gnus-uu-post-threaded
9201 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
9202 thread.  This may not be smart, as no other decoder I have seen is able
9203 to follow threads when collecting uuencoded articles.  (Well, I have
9204 seen one package that does that---@code{gnus-uu}, but somehow, I don't
9205 think that counts@dots{}) Default is @code{nil}.
9206
9207 @item gnus-uu-post-separate-description
9208 @vindex gnus-uu-post-separate-description
9209 Non-@code{nil} means that the description will be posted in a separate
9210 article.  The first article will typically be numbered (0/x).  If this
9211 variable is @code{nil}, the description the user enters will be included
9212 at the beginning of the first article, which will be numbered (1/x).
9213 Default is @code{t}.
9214
9215 @end table
9216
9217
9218 @node Viewing Files
9219 @subsection Viewing Files
9220 @cindex viewing files
9221 @cindex pseudo-articles
9222
9223 After decoding, if the file is some sort of archive, Gnus will attempt
9224 to unpack the archive and see if any of the files in the archive can be
9225 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
9226 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
9227 uncompress and de-tar the main file, and then view the two pictures.
9228 This unpacking process is recursive, so if the archive contains archives
9229 of archives, it'll all be unpacked.
9230
9231 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
9232 extracted file into the summary buffer.  If you go to these
9233 ``articles'', you will be prompted for a command to run (usually Gnus
9234 will make a suggestion), and then the command will be run.
9235
9236 @vindex gnus-view-pseudo-asynchronously
9237 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
9238 until the viewing is done before proceeding.
9239
9240 @vindex gnus-view-pseudos
9241 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
9242 the pseudo-articles into the summary buffer, but view them
9243 immediately.  If this variable is @code{not-confirm}, the user won't even
9244 be asked for a confirmation before viewing is done.
9245
9246 @vindex gnus-view-pseudos-separately
9247 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
9248 pseudo-article will be created for each file to be viewed.  If
9249 @code{nil}, all files that use the same viewing command will be given as
9250 a list of parameters to that command.
9251
9252 @vindex gnus-insert-pseudo-articles
9253 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
9254 pseudo-articles when decoding.  It is @code{t} by default.
9255
9256 So; there you are, reading your @emph{pseudo-articles} in your
9257 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
9258 Why isn't anything real anymore? How did we get here?
9259
9260
9261 @node Article Treatment
9262 @section Article Treatment
9263
9264 Reading through this huge manual, you may have quite forgotten that the
9265 object of newsreaders is to actually, like, read what people have
9266 written.  Reading articles.  Unfortunately, people are quite bad at
9267 writing, so there are tons of functions and variables to make reading
9268 these articles easier.
9269
9270 @menu
9271 * Article Highlighting::        You want to make the article look like fruit salad.
9272 * Article Fontisizing::         Making emphasized text look nice.
9273 * Article Hiding::              You also want to make certain info go away.
9274 * Article Washing::             Lots of way-neat functions to make life better.
9275 * Article Header::              Doing various header transformations.
9276 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
9277 * Article Button Levels::       Controlling appearance of buttons.
9278 * Article Date::                Grumble, UT!
9279 * Article Display::             Display various stuff---X-Face, Picons, Smileys
9280 * Article Signature::           What is a signature?
9281 * Article Miscellanea::         Various other stuff.
9282 @end menu
9283
9284
9285 @node Article Highlighting
9286 @subsection Article Highlighting
9287 @cindex highlighting
9288
9289 Not only do you want your article buffer to look like fruit salad, but
9290 you want it to look like technicolor fruit salad.
9291
9292 @table @kbd
9293
9294 @item W H a
9295 @kindex W H a (Summary)
9296 @findex gnus-article-highlight
9297 @findex gnus-article-maybe-highlight
9298 Do much highlighting of the current article
9299 (@code{gnus-article-highlight}).  This function highlights header, cited
9300 text, the signature, and adds buttons to the body and the head.
9301
9302 @item W H h
9303 @kindex W H h (Summary)
9304 @findex gnus-article-highlight-headers
9305 @vindex gnus-header-face-alist
9306 Highlight the headers (@code{gnus-article-highlight-headers}).  The
9307 highlighting will be done according to the @code{gnus-header-face-alist}
9308 variable, which is a list where each element has the form
9309 @code{(@var{regexp} @var{name} @var{content})}.
9310 @var{regexp} is a regular expression for matching the
9311 header, @var{name} is the face used for highlighting the header name
9312 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
9313 the header value.  The first match made will be used.  Note that
9314 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
9315
9316 @item W H c
9317 @kindex W H c (Summary)
9318 @findex gnus-article-highlight-citation
9319 Highlight cited text (@code{gnus-article-highlight-citation}).
9320
9321 Some variables to customize the citation highlights:
9322
9323 @table @code
9324 @vindex gnus-cite-parse-max-size
9325
9326 @item gnus-cite-parse-max-size
9327 If the article size in bytes is bigger than this variable (which is
9328 25000 by default), no citation highlighting will be performed.
9329
9330 @item gnus-cite-max-prefix
9331 @vindex gnus-cite-max-prefix
9332 Maximum possible length for a citation prefix (default 20).
9333
9334 @item gnus-cite-face-list
9335 @vindex gnus-cite-face-list
9336 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
9337 When there are citations from multiple articles in the same message,
9338 Gnus will try to give each citation from each article its own face.
9339 This should make it easier to see who wrote what.
9340
9341 @item gnus-supercite-regexp
9342 @vindex gnus-supercite-regexp
9343 Regexp matching normal Supercite attribution lines.
9344
9345 @item gnus-supercite-secondary-regexp
9346 @vindex gnus-supercite-secondary-regexp
9347 Regexp matching mangled Supercite attribution lines.
9348
9349 @item gnus-cite-minimum-match-count
9350 @vindex gnus-cite-minimum-match-count
9351 Minimum number of identical prefixes we have to see before we believe
9352 that it's a citation.
9353
9354 @item gnus-cite-attribution-prefix
9355 @vindex gnus-cite-attribution-prefix
9356 Regexp matching the beginning of an attribution line.
9357
9358 @item gnus-cite-attribution-suffix
9359 @vindex gnus-cite-attribution-suffix
9360 Regexp matching the end of an attribution line.
9361
9362 @item gnus-cite-attribution-face
9363 @vindex gnus-cite-attribution-face
9364 Face used for attribution lines.  It is merged with the face for the
9365 cited text belonging to the attribution.
9366
9367 @item gnus-cite-ignore-quoted-from
9368 @vindex gnus-cite-ignore-quoted-from
9369 If non-@code{nil}, no citation highlighting will be performed on lines
9370 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
9371 in order not to mix up with the envelope From line.  The default value
9372 is @code{t}.
9373
9374 @end table
9375
9376
9377 @item W H s
9378 @kindex W H s (Summary)
9379 @vindex gnus-signature-separator
9380 @vindex gnus-signature-face
9381 @findex gnus-article-highlight-signature
9382 Highlight the signature (@code{gnus-article-highlight-signature}).
9383 Everything after @code{gnus-signature-separator} (@pxref{Article
9384 Signature}) in an article will be considered a signature and will be
9385 highlighted with @code{gnus-signature-face}, which is @code{italic} by
9386 default.
9387
9388 @end table
9389
9390 @xref{Customizing Articles}, for how to highlight articles automatically.
9391
9392
9393 @node Article Fontisizing
9394 @subsection Article Fontisizing
9395 @cindex emphasis
9396 @cindex article emphasis
9397
9398 @findex gnus-article-emphasize
9399 @kindex W e (Summary)
9400 People commonly add emphasis to words in news articles by writing things
9401 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
9402 this look nicer by running the article through the @kbd{W e}
9403 (@code{gnus-article-emphasize}) command.
9404
9405 @vindex gnus-emphasis-alist
9406 How the emphasis is computed is controlled by the
9407 @code{gnus-emphasis-alist} variable.  This is an alist where the first
9408 element is a regular expression to be matched.  The second is a number
9409 that says what regular expression grouping is used to find the entire
9410 emphasized word.  The third is a number that says what regexp grouping
9411 should be displayed and highlighted.  (The text between these two
9412 groupings will be hidden.)  The fourth is the face used for
9413 highlighting.
9414
9415 @lisp
9416 (setq gnus-emphasis-alist
9417       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
9418         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
9419 @end lisp
9420
9421 @cindex slash
9422 @cindex asterisk
9423 @cindex underline
9424 @cindex /
9425 @cindex *
9426
9427 @vindex gnus-emphasis-underline
9428 @vindex gnus-emphasis-bold
9429 @vindex gnus-emphasis-italic
9430 @vindex gnus-emphasis-underline-bold
9431 @vindex gnus-emphasis-underline-italic
9432 @vindex gnus-emphasis-bold-italic
9433 @vindex gnus-emphasis-underline-bold-italic
9434 By default, there are seven rules, and they use the following faces:
9435 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
9436 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
9437 @code{gnus-emphasis-underline-italic},
9438 @code{gnus-emphasis-underline-bold}, and
9439 @code{gnus-emphasis-underline-bold-italic}.
9440
9441 If you want to change these faces, you can either use @kbd{M-x
9442 customize}, or you can use @code{copy-face}.  For instance, if you want
9443 to make @code{gnus-emphasis-italic} use a red face instead, you could
9444 say something like:
9445
9446 @lisp
9447 (copy-face 'red 'gnus-emphasis-italic)
9448 @end lisp
9449
9450 @vindex gnus-group-highlight-words-alist
9451
9452 If you want to highlight arbitrary words, you can use the
9453 @code{gnus-group-highlight-words-alist} variable, which uses the same
9454 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
9455 parameter (@pxref{Group Parameters}) can also be used.
9456
9457 @xref{Customizing Articles}, for how to fontize articles automatically.
9458
9459
9460 @node Article Hiding
9461 @subsection Article Hiding
9462 @cindex article hiding
9463
9464 Or rather, hiding certain things in each article.  There usually is much
9465 too much cruft in most articles.
9466
9467 @table @kbd
9468
9469 @item W W a
9470 @kindex W W a (Summary)
9471 @findex gnus-article-hide
9472 Do quite a lot of hiding on the article buffer
9473 (@kbd{gnus-article-hide}).  In particular, this function will hide
9474 headers, @acronym{PGP}, cited text and the signature.
9475
9476 @item W W h
9477 @kindex W W h (Summary)
9478 @findex gnus-article-hide-headers
9479 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
9480 Headers}.
9481
9482 @item W W b
9483 @kindex W W b (Summary)
9484 @findex gnus-article-hide-boring-headers
9485 Hide headers that aren't particularly interesting
9486 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
9487
9488 @item W W s
9489 @kindex W W s (Summary)
9490 @findex gnus-article-hide-signature
9491 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
9492 Signature}.
9493
9494 @item W W l
9495 @kindex W W l (Summary)
9496 @findex gnus-article-hide-list-identifiers
9497 @vindex gnus-list-identifiers
9498 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
9499 are strings some mailing list servers add to the beginning of all
9500 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
9501 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
9502 may not contain @code{\\(..\\)}.
9503
9504 @table @code
9505
9506 @item gnus-list-identifiers
9507 @vindex gnus-list-identifiers
9508 A regular expression that matches list identifiers to be removed from
9509 subject.  This can also be a list of regular expressions.
9510
9511 @end table
9512
9513 @item W W P
9514 @kindex W W P (Summary)
9515 @findex gnus-article-hide-pem
9516 Hide @acronym{PEM} (privacy enhanced messages) cruft
9517 (@code{gnus-article-hide-pem}).
9518
9519 @item W W B
9520 @kindex W W B (Summary)
9521 @findex gnus-article-strip-banner
9522 @vindex gnus-article-banner-alist
9523 @vindex gnus-article-address-banner-alist
9524 @cindex banner
9525 @cindex OneList
9526 @cindex stripping advertisements
9527 @cindex advertisements
9528 Strip the banner specified by the @code{banner} group parameter
9529 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
9530 annoying banners and/or signatures that some mailing lists and moderated
9531 groups adds to all the messages.  The way to use this function is to add
9532 the @code{banner} group parameter (@pxref{Group Parameters}) to the
9533 group you want banners stripped from.  The parameter either be a string,
9534 which will be interpreted as a regular expression matching text to be
9535 removed, or the symbol @code{signature}, meaning that the (last)
9536 signature should be removed, or other symbol, meaning that the
9537 corresponding regular expression in @code{gnus-article-banner-alist} is
9538 used.
9539
9540 Regardless of a group, you can hide things like advertisements only when
9541 the sender of an article has a certain mail address specified in
9542 @code{gnus-article-address-banner-alist}.
9543
9544 @table @code
9545
9546 @item gnus-article-address-banner-alist
9547 @vindex gnus-article-address-banner-alist
9548 Alist of mail addresses and banners.  Each element has the form
9549 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
9550 matching a mail address in the From header, @var{banner} is one of a
9551 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
9552 a regexp and @code{nil}.  If @var{address} matches author's mail
9553 address, it will remove things like advertisements.  For example, if a
9554 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
9555 banner something like @samp{Do You Yoo-hoo!?} in all articles he
9556 sends, you can use the following element to remove them:
9557
9558 @lisp
9559 ("@@yoo-hoo\\.co\\.jp\\'" .
9560  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
9561 @end lisp
9562
9563 @end table
9564
9565 @item W W c
9566 @kindex W W c (Summary)
9567 @findex gnus-article-hide-citation
9568 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
9569 customizing the hiding:
9570
9571 @table @code
9572
9573 @item gnus-cited-opened-text-button-line-format
9574 @itemx gnus-cited-closed-text-button-line-format
9575 @vindex gnus-cited-closed-text-button-line-format
9576 @vindex gnus-cited-opened-text-button-line-format
9577 Gnus adds buttons to show where the cited text has been hidden, and to
9578 allow toggle hiding the text.  The format of the variable is specified
9579 by these format-like variable (@pxref{Formatting Variables}).  These
9580 specs are valid:
9581
9582 @table @samp
9583 @item b
9584 Starting point of the hidden text.
9585 @item e
9586 Ending point of the hidden text.
9587 @item l
9588 Number of characters in the hidden region.
9589 @item n
9590 Number of lines of hidden text.
9591 @end table
9592
9593 @item gnus-cited-lines-visible
9594 @vindex gnus-cited-lines-visible
9595 The number of lines at the beginning of the cited text to leave
9596 shown.  This can also be a cons cell with the number of lines at the top
9597 and bottom of the text, respectively, to remain visible.
9598
9599 @end table
9600
9601 @item W W C-c
9602 @kindex W W C-c (Summary)
9603 @findex gnus-article-hide-citation-maybe
9604
9605 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
9606 following two variables:
9607
9608 @table @code
9609 @item gnus-cite-hide-percentage
9610 @vindex gnus-cite-hide-percentage
9611 If the cited text is of a bigger percentage than this variable (default
9612 50), hide the cited text.
9613
9614 @item gnus-cite-hide-absolute
9615 @vindex gnus-cite-hide-absolute
9616 The cited text must have at least this length (default 10) before it
9617 is hidden.
9618 @end table
9619
9620 @item W W C
9621 @kindex W W C (Summary)
9622 @findex gnus-article-hide-citation-in-followups
9623 Hide cited text in articles that aren't roots
9624 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
9625 useful as an interactive command, but might be a handy function to stick
9626 have happen automatically (@pxref{Customizing Articles}).
9627
9628 @end table
9629
9630 All these ``hiding'' commands are toggles, but if you give a negative
9631 prefix to these commands, they will show what they have previously
9632 hidden.  If you give a positive prefix, they will always hide.
9633
9634 Also @pxref{Article Highlighting} for further variables for
9635 citation customization.
9636
9637 @xref{Customizing Articles}, for how to hide article elements
9638 automatically.
9639
9640
9641 @node Article Washing
9642 @subsection Article Washing
9643 @cindex washing
9644 @cindex article washing
9645
9646 We call this ``article washing'' for a really good reason.  Namely, the
9647 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
9648
9649 @dfn{Washing} is defined by us as ``changing something from something to
9650 something else'', but normally results in something looking better.
9651 Cleaner, perhaps.
9652
9653 @xref{Customizing Articles}, if you want to change how Gnus displays
9654 articles by default.
9655
9656 @table @kbd
9657
9658 @item C-u g
9659 This is not really washing, it's sort of the opposite of washing.  If
9660 you type this, you see the article exactly as it exists on disk or on
9661 the server.
9662
9663 @item g
9664 Force redisplaying of the current article
9665 (@code{gnus-summary-show-article}).  This is also not really washing.
9666 If you type this, you see the article without any previously applied
9667 interactive Washing functions but with all default treatments
9668 (@pxref{Customizing Articles}).
9669
9670 @item W l
9671 @kindex W l (Summary)
9672 @findex gnus-summary-stop-page-breaking
9673 Remove page breaks from the current article
9674 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
9675 delimiters.
9676
9677 @item W r
9678 @kindex W r (Summary)
9679 @findex gnus-summary-caesar-message
9680 @c @icon{gnus-summary-caesar-message}
9681 Do a Caesar rotate (rot13) on the article buffer
9682 (@code{gnus-summary-caesar-message}).
9683 Unreadable articles that tell you to read them with Caesar rotate or rot13.
9684 (Typically offensive jokes and such.)
9685
9686 It's commonly called ``rot13'' because each letter is rotated 13
9687 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
9688 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
9689 is rumored to have employed this form of, uh, somewhat weak encryption.
9690
9691 @item W m
9692 @kindex W m (Summary)
9693 @findex gnus-summary-morse-message
9694 Morse decode the article buffer (@code{gnus-summary-morse-message}).
9695
9696 @item W i
9697 @kindex W i (Summary)
9698 @findex gnus-summary-idna-message
9699 Decode IDNA encoded domain names in the current articles.  IDNA
9700 encoded domain names looks like @samp{xn--bar}.  If a string remain
9701 unencoded after running invoking this, it is likely an invalid IDNA
9702 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
9703 (@url{http://www.gnu.org/software/libidn/}) installed for this command
9704 to work.
9705
9706 @item W t
9707 @item t
9708 @kindex W t (Summary)
9709 @kindex t (Summary)
9710 @findex gnus-summary-toggle-header
9711 Toggle whether to display all headers in the article buffer
9712 (@code{gnus-summary-toggle-header}).
9713
9714 @item W v
9715 @kindex W v (Summary)
9716 @findex gnus-summary-verbose-headers
9717 Toggle whether to display all headers in the article buffer permanently
9718 (@code{gnus-summary-verbose-headers}).
9719
9720 @item W o
9721 @kindex W o (Summary)
9722 @findex gnus-article-treat-overstrike
9723 Treat overstrike (@code{gnus-article-treat-overstrike}).
9724
9725 @item W d
9726 @kindex W d (Summary)
9727 @findex gnus-article-treat-dumbquotes
9728 @vindex gnus-article-dumbquotes-map
9729 @cindex Smartquotes
9730 @cindex M****s*** sm*rtq**t*s
9731 @cindex Latin 1
9732 Treat M****s*** sm*rtq**t*s according to
9733 @code{gnus-article-dumbquotes-map}
9734 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9735 whether a character is a sm*rtq**t* or not, so it should only be used
9736 interactively.
9737
9738 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9739 an attempt to provide more quoting characters.  If you see something
9740 like @code{\222} or @code{\264} where you're expecting some kind of
9741 apostrophe or quotation mark, then try this wash.
9742
9743 @item W Y f
9744 @kindex W Y f (Summary)
9745 @findex gnus-article-outlook-deuglify-article
9746 @cindex Outlook Express
9747 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9748 unwrap lines, repair attribution and rearrange citation.
9749 (@code{gnus-article-outlook-deuglify-article}).
9750
9751 @item W Y u
9752 @kindex W Y u (Summary)
9753 @findex gnus-article-outlook-unwrap-lines
9754 @vindex gnus-outlook-deuglify-unwrap-min
9755 @vindex gnus-outlook-deuglify-unwrap-max
9756 Unwrap lines that appear to be wrapped citation lines.  You can control
9757 what lines will be unwrapped by frobbing
9758 @code{gnus-outlook-deuglify-unwrap-min} and
9759 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9760 maximum length of an unwrapped citation line.
9761 (@code{gnus-article-outlook-unwrap-lines}).
9762
9763 @item W Y a
9764 @kindex W Y a (Summary)
9765 @findex gnus-article-outlook-repair-attribution
9766 Repair a broken attribution line.@*
9767 (@code{gnus-article-outlook-repair-attribution}).
9768
9769 @item W Y c
9770 @kindex W Y c (Summary)
9771 @findex gnus-article-outlook-rearrange-citation
9772 Repair broken citations by rearranging the text.
9773 (@code{gnus-article-outlook-rearrange-citation}).
9774
9775 @item W w
9776 @kindex W w (Summary)
9777 @findex gnus-article-fill-cited-article
9778 Do word wrap (@code{gnus-article-fill-cited-article}).
9779
9780 You can give the command a numerical prefix to specify the width to use
9781 when filling.
9782
9783 @item W Q
9784 @kindex W Q (Summary)
9785 @findex gnus-article-fill-long-lines
9786 Fill long lines (@code{gnus-article-fill-long-lines}).
9787
9788 @item W C
9789 @kindex W C (Summary)
9790 @findex gnus-article-capitalize-sentences
9791 Capitalize the first word in each sentence
9792 (@code{gnus-article-capitalize-sentences}).
9793
9794 @item W c
9795 @kindex W c (Summary)
9796 @findex gnus-article-remove-cr
9797 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9798 (this takes care of DOS line endings), and then translate any remaining
9799 CRs into LF (this takes care of Mac line endings)
9800 (@code{gnus-article-remove-cr}).
9801
9802 @item W q
9803 @kindex W q (Summary)
9804 @findex gnus-article-de-quoted-unreadable
9805 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9806 Quoted-Printable is one common @acronym{MIME} encoding employed when
9807 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9808 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9809 which doesn't look very readable to me.  Note that this is usually
9810 done automatically by Gnus if the message in question has a
9811 @code{Content-Transfer-Encoding} header that says that this encoding
9812 has been done.  If a prefix is given, a charset will be asked for.
9813
9814 @item W 6
9815 @kindex W 6 (Summary)
9816 @findex gnus-article-de-base64-unreadable
9817 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9818 one common @acronym{MIME} encoding employed when sending
9819 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9820 usually done automatically by Gnus if the message in question has a
9821 @code{Content-Transfer-Encoding} header that says that this encoding
9822 has been done.  If a prefix is given, a charset will be asked for.
9823
9824 @item W Z
9825 @kindex W Z (Summary)
9826 @findex gnus-article-decode-HZ
9827 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9828 common encoding employed when sending Chinese articles.  It typically
9829 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9830
9831 @item W A
9832 @kindex W A (Summary)
9833 @findex gnus-article-treat-ansi-sequences
9834 @cindex @acronym{ANSI} control sequences
9835 Translate @acronym{ANSI} SGR control sequences into overlays or
9836 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9837 sequences are used in some Chinese hierarchies for highlighting.
9838
9839 @item W u
9840 @kindex W u (Summary)
9841 @findex gnus-article-unsplit-urls
9842 Remove newlines from within URLs.  Some mailers insert newlines into
9843 outgoing email messages to keep lines short.  This reformatting can
9844 split long URLs onto multiple lines.  Repair those URLs by removing
9845 the newlines (@code{gnus-article-unsplit-urls}).
9846
9847 @item W h
9848 @kindex W h (Summary)
9849 @findex gnus-article-wash-html
9850 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9851 usually done automatically by Gnus if the message in question has a
9852 @code{Content-Type} header that says that the message is @acronym{HTML}.
9853
9854 If a prefix is given, a charset will be asked for.  If it is a number,
9855 the charset defined in @code{gnus-summary-show-article-charset-alist}
9856 (@pxref{Paging the Article}) will be used.
9857
9858 @vindex gnus-article-wash-function
9859 The default is to use the function specified by
9860 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9861 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9862 @acronym{HTML}, but this is controlled by the
9863 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9864 can use include:
9865
9866 @table @code
9867 @item w3
9868 Use Emacs/W3.
9869
9870 @item w3m
9871 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9872
9873 @item w3m-standalone
9874 Use @uref{http://w3m.sourceforge.net/, w3m}.
9875
9876 @item links
9877 Use @uref{http://links.sf.net/, Links}.
9878
9879 @item lynx
9880 Use @uref{http://lynx.isc.org/, Lynx}.
9881
9882 @item html2text
9883 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9884
9885 @end table
9886
9887 @item W b
9888 @kindex W b (Summary)
9889 @findex gnus-article-add-buttons
9890 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9891 @xref{Article Buttons}.
9892
9893 @item W B
9894 @kindex W B (Summary)
9895 @findex gnus-article-add-buttons-to-head
9896 Add clickable buttons to the article headers
9897 (@code{gnus-article-add-buttons-to-head}).
9898
9899 @item W p
9900 @kindex W p (Summary)
9901 @findex gnus-article-verify-x-pgp-sig
9902 Verify a signed control message
9903 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9904 @code{newgroup} and @code{checkgroups} are usually signed by the
9905 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9906 the maintainer to your keyring to verify the
9907 message.@footnote{@acronym{PGP} keys for many hierarchies are
9908 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9909
9910 @item W s
9911 @kindex W s (Summary)
9912 @findex gnus-summary-force-verify-and-decrypt
9913 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9914 @acronym{S/MIME}) message
9915 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9916
9917 @item W a
9918 @kindex W a (Summary)
9919 @findex gnus-article-strip-headers-in-body
9920 Strip headers like the @code{X-No-Archive} header from the beginning of
9921 article bodies (@code{gnus-article-strip-headers-in-body}).
9922
9923 @item W E l
9924 @kindex W E l (Summary)
9925 @findex gnus-article-strip-leading-blank-lines
9926 Remove all blank lines from the beginning of the article
9927 (@code{gnus-article-strip-leading-blank-lines}).
9928
9929 @item W E m
9930 @kindex W E m (Summary)
9931 @findex gnus-article-strip-multiple-blank-lines
9932 Replace all blank lines with empty lines and then all multiple empty
9933 lines with a single empty line.
9934 (@code{gnus-article-strip-multiple-blank-lines}).
9935
9936 @item W E t
9937 @kindex W E t (Summary)
9938 @findex gnus-article-remove-trailing-blank-lines
9939 Remove all blank lines at the end of the article
9940 (@code{gnus-article-remove-trailing-blank-lines}).
9941
9942 @item W E a
9943 @kindex W E a (Summary)
9944 @findex gnus-article-strip-blank-lines
9945 Do all the three commands above
9946 (@code{gnus-article-strip-blank-lines}).
9947
9948 @item W E A
9949 @kindex W E A (Summary)
9950 @findex gnus-article-strip-all-blank-lines
9951 Remove all blank lines
9952 (@code{gnus-article-strip-all-blank-lines}).
9953
9954 @item W E s
9955 @kindex W E s (Summary)
9956 @findex gnus-article-strip-leading-space
9957 Remove all white space from the beginning of all lines of the article
9958 body (@code{gnus-article-strip-leading-space}).
9959
9960 @item W E e
9961 @kindex W E e (Summary)
9962 @findex gnus-article-strip-trailing-space
9963 Remove all white space from the end of all lines of the article
9964 body (@code{gnus-article-strip-trailing-space}).
9965
9966 @end table
9967
9968 @xref{Customizing Articles}, for how to wash articles automatically.
9969
9970
9971 @node Article Header
9972 @subsection Article Header
9973
9974 These commands perform various transformations of article header.
9975
9976 @table @kbd
9977
9978 @item W G u
9979 @kindex W G u (Summary)
9980 @findex gnus-article-treat-unfold-headers
9981 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9982
9983 @item W G n
9984 @kindex W G n (Summary)
9985 @findex gnus-article-treat-fold-newsgroups
9986 Fold the @code{Newsgroups} and @code{Followup-To} headers
9987 (@code{gnus-article-treat-fold-newsgroups}).
9988
9989 @item W G f
9990 @kindex W G f (Summary)
9991 @findex gnus-article-treat-fold-headers
9992 Fold all the message headers
9993 (@code{gnus-article-treat-fold-headers}).
9994
9995 @item W E w
9996 @kindex W E w (Summary)
9997 @findex gnus-article-remove-leading-whitespace
9998 Remove excessive whitespace from all headers
9999 (@code{gnus-article-remove-leading-whitespace}).
10000
10001 @end table
10002
10003
10004 @node Article Buttons
10005 @subsection Article Buttons
10006 @cindex buttons
10007
10008 People often include references to other stuff in articles, and it would
10009 be nice if Gnus could just fetch whatever it is that people talk about
10010 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
10011 button on these references.
10012
10013 @vindex gnus-button-man-handler
10014 Gnus adds @dfn{buttons} to certain standard references by default:
10015 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
10016 Emacs or Gnus related references.  This is controlled by two variables,
10017 one that handles article bodies and one that handles article heads:
10018
10019 @table @code
10020
10021 @item gnus-button-alist
10022 @vindex gnus-button-alist
10023 This is an alist where each entry has this form:
10024
10025 @lisp
10026 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10027 @end lisp
10028
10029 @table @var
10030
10031 @item regexp
10032 All text that match this regular expression (case insensitive) will be
10033 considered an external reference.  Here's a typical regexp that matches
10034 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
10035 variable containing a regexp, useful variables to use include
10036 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
10037
10038 @item button-par
10039 Gnus has to know which parts of the matches is to be highlighted.  This
10040 is a number that says what sub-expression of the regexp is to be
10041 highlighted.  If you want it all highlighted, you use 0 here.
10042
10043 @item use-p
10044 This form will be @code{eval}ed, and if the result is non-@code{nil},
10045 this is considered a match.  This is useful if you want extra sifting to
10046 avoid false matches.  Often variables named
10047 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
10048 Levels}, but any other form may be used too.
10049
10050 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
10051
10052 @item function
10053 This function will be called when you click on this button.
10054
10055 @item data-par
10056 As with @var{button-par}, this is a sub-expression number, but this one
10057 says which part of the match is to be sent as data to @var{function}.
10058
10059 @end table
10060
10061 So the full entry for buttonizing URLs is then
10062
10063 @lisp
10064 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
10065 @end lisp
10066
10067 @item gnus-header-button-alist
10068 @vindex gnus-header-button-alist
10069 This is just like the other alist, except that it is applied to the
10070 article head only, and that each entry has an additional element that is
10071 used to say what headers to apply the buttonize coding to:
10072
10073 @lisp
10074 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10075 @end lisp
10076
10077 @var{header} is a regular expression.
10078 @end table
10079
10080 @subsubsection Related variables and functions
10081
10082 @table @code
10083 @item gnus-button-@var{*}-level
10084 @xref{Article Button Levels}.
10085
10086 @c Stuff related to gnus-button-browse-level
10087
10088 @item gnus-button-url-regexp
10089 @vindex gnus-button-url-regexp
10090 A regular expression that matches embedded URLs.  It is used in the
10091 default values of the variables above.
10092
10093 @c Stuff related to gnus-button-man-level
10094
10095 @item gnus-button-man-handler
10096 @vindex gnus-button-man-handler
10097 The function to use for displaying man pages.  It must take at least one
10098 argument with a string naming the man page.
10099
10100 @c Stuff related to gnus-button-message-level
10101
10102 @item gnus-button-mid-or-mail-regexp
10103 @vindex gnus-button-mid-or-mail-regexp
10104 Regular expression that matches a message ID or a mail address.
10105
10106 @item gnus-button-prefer-mid-or-mail
10107 @vindex gnus-button-prefer-mid-or-mail
10108 This variable determines what to do when the button on a string as
10109 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
10110 message ID or a mail address.  If it is one of the symbols @code{mid} or
10111 @code{mail}, Gnus will always assume that the string is a message ID or
10112 a mail address, respectively.  If this variable is set to the symbol
10113 @code{ask}, always query the user what to do.  If it is a function, this
10114 function will be called with the string as its only argument.  The
10115 function must return @code{mid}, @code{mail}, @code{invalid} or
10116 @code{ask}.  The default value is the function
10117 @code{gnus-button-mid-or-mail-heuristic}.
10118
10119 @item gnus-button-mid-or-mail-heuristic
10120 @findex gnus-button-mid-or-mail-heuristic
10121 Function that guesses whether its argument is a message ID or a mail
10122 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
10123 it's a mail address, @code{ask} if unsure and @code{invalid} if the
10124 string is invalid.
10125
10126 @item gnus-button-mid-or-mail-heuristic-alist
10127 @vindex gnus-button-mid-or-mail-heuristic-alist
10128 An alist of @code{(RATE . REGEXP)} pairs used by the function
10129 @code{gnus-button-mid-or-mail-heuristic}.
10130
10131 @c Stuff related to gnus-button-tex-level
10132
10133 @item gnus-button-ctan-handler
10134 @findex gnus-button-ctan-handler
10135 The function to use for displaying CTAN links.  It must take one
10136 argument, the string naming the URL.
10137
10138 @item gnus-ctan-url
10139 @vindex gnus-ctan-url
10140 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
10141 by @code{gnus-button-ctan-handler}.
10142
10143 @c Misc stuff
10144
10145 @item gnus-article-button-face
10146 @vindex gnus-article-button-face
10147 Face used on buttons.
10148
10149 @item gnus-article-mouse-face
10150 @vindex gnus-article-mouse-face
10151 Face used when the mouse cursor is over a button.
10152
10153 @end table
10154
10155 @xref{Customizing Articles}, for how to buttonize articles automatically.
10156
10157
10158 @node Article Button Levels
10159 @subsection Article button levels
10160 @cindex button levels
10161 The higher the value of the variables @code{gnus-button-@var{*}-level},
10162 the more buttons will appear.  If the level is zero, no corresponding
10163 buttons are displayed.  With the default value (which is 5) you should
10164 already see quite a lot of buttons.  With higher levels, you will see
10165 more buttons, but you may also get more false positives.  To avoid them,
10166 you can set the variables @code{gnus-button-@var{*}-level} local to
10167 specific groups (@pxref{Group Parameters}).  Here's an example for the
10168 variable @code{gnus-parameters}:
10169
10170 @lisp
10171 ;; @r{increase @code{gnus-button-*-level} in some groups:}
10172 (setq gnus-parameters
10173       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
10174         ("\\<unix\\>"               (gnus-button-man-level 10))
10175         ("\\<tex\\>"                (gnus-button-tex-level 10))))
10176 @end lisp
10177
10178 @table @code
10179
10180 @item gnus-button-browse-level
10181 @vindex gnus-button-browse-level
10182 Controls the display of references to message IDs, mail addresses and
10183 news URLs.  Related variables and functions include
10184 @code{gnus-button-url-regexp}, @code{browse-url}, and
10185 @code{browse-url-browser-function}.
10186
10187 @item gnus-button-emacs-level
10188 @vindex gnus-button-emacs-level
10189 Controls the display of Emacs or Gnus references.  Related functions are
10190 @code{gnus-button-handle-custom},
10191 @code{gnus-button-handle-describe-function},
10192 @code{gnus-button-handle-describe-variable},
10193 @code{gnus-button-handle-symbol},
10194 @code{gnus-button-handle-describe-key},
10195 @code{gnus-button-handle-apropos},
10196 @code{gnus-button-handle-apropos-command},
10197 @code{gnus-button-handle-apropos-variable},
10198 @code{gnus-button-handle-apropos-documentation}, and
10199 @code{gnus-button-handle-library}.
10200
10201 @item gnus-button-man-level
10202 @vindex gnus-button-man-level
10203 Controls the display of references to (Unix) man pages.
10204 See @code{gnus-button-man-handler}.
10205
10206 @item gnus-button-message-level
10207 @vindex gnus-button-message-level
10208 Controls the display of message IDs, mail addresses and news URLs.
10209 Related variables and functions include
10210 @code{gnus-button-mid-or-mail-regexp},
10211 @code{gnus-button-prefer-mid-or-mail},
10212 @code{gnus-button-mid-or-mail-heuristic}, and
10213 @code{gnus-button-mid-or-mail-heuristic-alist}.
10214
10215 @item gnus-button-tex-level
10216 @vindex gnus-button-tex-level
10217 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
10218 URLs.  See the variables @code{gnus-ctan-url},
10219 @code{gnus-button-ctan-handler},
10220 @code{gnus-button-ctan-directory-regexp}, and
10221 @code{gnus-button-handle-ctan-bogus-regexp}.
10222
10223 @end table
10224
10225
10226 @node Article Date
10227 @subsection Article Date
10228
10229 The date is most likely generated in some obscure timezone you've never
10230 heard of, so it's quite nice to be able to find out what the time was
10231 when the article was sent.
10232
10233 @table @kbd
10234
10235 @item W T u
10236 @kindex W T u (Summary)
10237 @findex gnus-article-date-ut
10238 Display the date in UT (aka. GMT, aka ZULU)
10239 (@code{gnus-article-date-ut}).
10240
10241 @item W T i
10242 @kindex W T i (Summary)
10243 @findex gnus-article-date-iso8601
10244 @cindex ISO 8601
10245 Display the date in international format, aka. ISO 8601
10246 (@code{gnus-article-date-iso8601}).
10247
10248 @item W T l
10249 @kindex W T l (Summary)
10250 @findex gnus-article-date-local
10251 Display the date in the local timezone (@code{gnus-article-date-local}).
10252
10253 @item W T p
10254 @kindex W T p (Summary)
10255 @findex gnus-article-date-english
10256 Display the date in a format that's easily pronounceable in English
10257 (@code{gnus-article-date-english}).
10258
10259 @item W T s
10260 @kindex W T s (Summary)
10261 @vindex gnus-article-time-format
10262 @findex gnus-article-date-user
10263 @findex format-time-string
10264 Display the date using a user-defined format
10265 (@code{gnus-article-date-user}).  The format is specified by the
10266 @code{gnus-article-time-format} variable, and is a string that's passed
10267 to @code{format-time-string}.  See the documentation of that variable
10268 for a list of possible format specs.
10269
10270 @item W T e
10271 @kindex W T e (Summary)
10272 @findex gnus-article-date-lapsed
10273 @findex gnus-start-date-timer
10274 @findex gnus-stop-date-timer
10275 Say how much time has elapsed between the article was posted and now
10276 (@code{gnus-article-date-lapsed}).  It looks something like:
10277
10278 @example
10279 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
10280 @end example
10281
10282 @vindex gnus-article-date-lapsed-new-header
10283 The value of @code{gnus-article-date-lapsed-new-header} determines
10284 whether this header will just be added below the old Date one, or will
10285 replace it.
10286
10287 An advantage of using Gnus to read mail is that it converts simple bugs
10288 into wonderful absurdities.
10289
10290 If you want to have this line updated continually, you can put
10291
10292 @lisp
10293 (gnus-start-date-timer)
10294 @end lisp
10295
10296 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
10297 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
10298 command.
10299
10300 @item W T o
10301 @kindex W T o (Summary)
10302 @findex gnus-article-date-original
10303 Display the original date (@code{gnus-article-date-original}).  This can
10304 be useful if you normally use some other conversion function and are
10305 worried that it might be doing something totally wrong.  Say, claiming
10306 that the article was posted in 1854.  Although something like that is
10307 @emph{totally} impossible.  Don't you trust me? *titter*
10308
10309 @end table
10310
10311 @xref{Customizing Articles}, for how to display the date in your
10312 preferred format automatically.
10313
10314
10315 @node Article Display
10316 @subsection Article Display
10317 @cindex picons
10318 @cindex x-face
10319 @cindex smileys
10320
10321 These commands add various frivolous display gimmicks to the article
10322 buffer in Emacs versions that support them.
10323
10324 @code{X-Face} headers are small black-and-white images supplied by the
10325 message headers (@pxref{X-Face}).
10326
10327 @code{Face} headers are small colored images supplied by the message
10328 headers (@pxref{Face}).
10329
10330 Smileys are those little @samp{:-)} symbols that people like to litter
10331 their messages with (@pxref{Smileys}).
10332
10333 Picons, on the other hand, reside on your own system, and Gnus will
10334 try to match the headers to what you have (@pxref{Picons}).
10335
10336 All these functions are toggles---if the elements already exist,
10337 they'll be removed.
10338
10339 @table @kbd
10340 @item W D x
10341 @kindex W D x (Summary)
10342 @findex gnus-article-display-x-face
10343 Display an @code{X-Face} in the @code{From} header.
10344 (@code{gnus-article-display-x-face}).
10345
10346 @item W D d
10347 @kindex W D d (Summary)
10348 @findex gnus-article-display-face
10349 Display a @code{Face} in the @code{From} header.
10350 (@code{gnus-article-display-face}).
10351
10352 @item W D s
10353 @kindex W D s (Summary)
10354 @findex gnus-treat-smiley
10355 Display smileys (@code{gnus-treat-smiley}).
10356
10357 @item W D f
10358 @kindex W D f (Summary)
10359 @findex gnus-treat-from-picon
10360 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
10361
10362 @item W D m
10363 @kindex W D m (Summary)
10364 @findex gnus-treat-mail-picon
10365 Piconify all mail headers (i. e., @code{Cc}, @code{To})
10366 (@code{gnus-treat-mail-picon}).
10367
10368 @item W D n
10369 @kindex W D n (Summary)
10370 @findex gnus-treat-newsgroups-picon
10371 Piconify all news headers (i. e., @code{Newsgroups} and
10372 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
10373
10374 @item W D D
10375 @kindex W D D (Summary)
10376 @findex gnus-article-remove-images
10377 Remove all images from the article buffer
10378 (@code{gnus-article-remove-images}).
10379
10380 @end table
10381
10382
10383
10384 @node Article Signature
10385 @subsection Article Signature
10386 @cindex signatures
10387 @cindex article signature
10388
10389 @vindex gnus-signature-separator
10390 Each article is divided into two parts---the head and the body.  The
10391 body can be divided into a signature part and a text part.  The variable
10392 that says what is to be considered a signature is
10393 @code{gnus-signature-separator}.  This is normally the standard
10394 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
10395 non-standard signature separators, so this variable can also be a list
10396 of regular expressions to be tested, one by one.  (Searches are done
10397 from the end of the body towards the beginning.)  One likely value is:
10398
10399 @lisp
10400 (setq gnus-signature-separator
10401       '("^-- $"         ; @r{The standard}
10402         "^-- *$"        ; @r{A common mangling}
10403         "^-------*$"    ; @r{Many people just use a looong}
10404                         ; @r{line of dashes.  Shame!}
10405         "^ *--------*$" ; @r{Double-shame!}
10406         "^________*$"   ; @r{Underscores are also popular}
10407         "^========*$")) ; @r{Pervert!}
10408 @end lisp
10409
10410 The more permissive you are, the more likely it is that you'll get false
10411 positives.
10412
10413 @vindex gnus-signature-limit
10414 @code{gnus-signature-limit} provides a limit to what is considered a
10415 signature when displaying articles.
10416
10417 @enumerate
10418 @item
10419 If it is an integer, no signature may be longer (in characters) than
10420 that integer.
10421 @item
10422 If it is a floating point number, no signature may be longer (in lines)
10423 than that number.
10424 @item
10425 If it is a function, the function will be called without any parameters,
10426 and if it returns @code{nil}, there is no signature in the buffer.
10427 @item
10428 If it is a string, it will be used as a regexp.  If it matches, the text
10429 in question is not a signature.
10430 @end enumerate
10431
10432 This variable can also be a list where the elements may be of the types
10433 listed above.  Here's an example:
10434
10435 @lisp
10436 (setq gnus-signature-limit
10437       '(200.0 "^---*Forwarded article"))
10438 @end lisp
10439
10440 This means that if there are more than 200 lines after the signature
10441 separator, or the text after the signature separator is matched by
10442 the regular expression @samp{^---*Forwarded article}, then it isn't a
10443 signature after all.
10444
10445
10446 @node Article Miscellanea
10447 @subsection Article Miscellanea
10448
10449 @table @kbd
10450 @item A t
10451 @kindex A t (Summary)
10452 @findex gnus-article-babel
10453 Translate the article from one language to another
10454 (@code{gnus-article-babel}).
10455
10456 @end table
10457
10458
10459 @node MIME Commands
10460 @section MIME Commands
10461 @cindex MIME decoding
10462 @cindex attachments
10463 @cindex viewing attachments
10464
10465 The following commands all understand the numerical prefix.  For
10466 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
10467
10468 @table @kbd
10469 @item b
10470 @itemx K v
10471 @kindex b (Summary)
10472 @kindex K v (Summary)
10473 View the @acronym{MIME} part.
10474
10475 @item K o
10476 @kindex K o (Summary)
10477 Save the @acronym{MIME} part.
10478
10479 @item K O
10480 @kindex K O (Summary)
10481 Prompt for a file name, then save the @acronym{MIME} part and strip it
10482 from the article.  The stripped @acronym{MIME} object will be referred
10483 via the message/external-body @acronym{MIME} type.
10484
10485 @item K r
10486 @kindex K r (Summary)
10487 Replace the @acronym{MIME} part with an external body.
10488
10489 @item K d
10490 @kindex K d (Summary)
10491 Delete the @acronym{MIME} part and add some information about the
10492 removed part.
10493
10494 @item K c
10495 @kindex K c (Summary)
10496 Copy the @acronym{MIME} part.
10497
10498 @item K e
10499 @kindex K e (Summary)
10500 View the @acronym{MIME} part externally.
10501
10502 @item K i
10503 @kindex K i (Summary)
10504 View the @acronym{MIME} part internally.
10505
10506 @item K |
10507 @kindex K | (Summary)
10508 Pipe the @acronym{MIME} part to an external command.
10509 @end table
10510
10511 The rest of these @acronym{MIME} commands do not use the numerical prefix in
10512 the same manner:
10513
10514 @table @kbd
10515 @item K H
10516 @kindex K H (Summary)
10517 @findex gnus-article-browse-html-article
10518 View @samp{text/html} parts of the current article with a WWW browser.
10519 Inline images embedded in a message using the @code{cid} scheme, as they
10520 are generally considered to be safe, will be processed properly.  The
10521 message header is added to the beginning of every @acronym{HTML} part
10522 unless the prefix argument is given.
10523
10524 Warning: Spammers use links to images (using the @code{http} scheme) in
10525 @acronym{HTML} articles to verify whether you have read the message.  As
10526 this command passes the @acronym{HTML} content to the browser without
10527 eliminating these ``web bugs'' you should only use it for mails from
10528 trusted senders.
10529
10530 If you always want to display @acronym{HTML} parts in the browser, set
10531 @code{mm-text-html-renderer} to @code{nil}.
10532
10533 This command creates temporary files to pass @acronym{HTML} contents
10534 including images if any to the browser, and deletes them when exiting
10535 the group (if you want).
10536
10537 @item K b
10538 @kindex K b (Summary)
10539 Make all the @acronym{MIME} parts have buttons in front of them.  This is
10540 mostly useful if you wish to save (or perform other actions) on inlined
10541 parts.
10542
10543 @item K m
10544 @kindex K m (Summary)
10545 @findex gnus-summary-repair-multipart
10546 Some multipart messages are transmitted with missing or faulty headers.
10547 This command will attempt to ``repair'' these messages so that they can
10548 be viewed in a more pleasant manner
10549 (@code{gnus-summary-repair-multipart}).
10550
10551 @item X m
10552 @kindex X m (Summary)
10553 @findex gnus-summary-save-parts
10554 Save all parts matching a @acronym{MIME} type to a directory
10555 (@code{gnus-summary-save-parts}).  Understands the process/prefix
10556 convention (@pxref{Process/Prefix}).
10557
10558 @item M-t
10559 @kindex M-t (Summary)
10560 @findex gnus-summary-toggle-display-buttonized
10561 Toggle the buttonized display of the article buffer
10562 (@code{gnus-summary-toggle-display-buttonized}).
10563
10564 @item W M w
10565 @kindex W M w (Summary)
10566 @findex gnus-article-decode-mime-words
10567 Decode RFC 2047-encoded words in the article headers
10568 (@code{gnus-article-decode-mime-words}).
10569
10570 @item W M c
10571 @kindex W M c (Summary)
10572 @findex gnus-article-decode-charset
10573 Decode encoded article bodies as well as charsets
10574 (@code{gnus-article-decode-charset}).
10575
10576 This command looks in the @code{Content-Type} header to determine the
10577 charset.  If there is no such header in the article, you can give it a
10578 prefix, which will prompt for the charset to decode as.  In regional
10579 groups where people post using some common encoding (but do not
10580 include @acronym{MIME} headers), you can set the @code{charset} group/topic
10581 parameter to the required charset (@pxref{Group Parameters}).
10582
10583 @item W M v
10584 @kindex W M v (Summary)
10585 @findex gnus-mime-view-all-parts
10586 View all the @acronym{MIME} parts in the current article
10587 (@code{gnus-mime-view-all-parts}).
10588
10589 @end table
10590
10591 Relevant variables:
10592
10593 @table @code
10594 @item gnus-ignored-mime-types
10595 @vindex gnus-ignored-mime-types
10596 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10597 this list will be completely ignored by Gnus.  The default value is
10598 @code{nil}.
10599
10600 To have all Vcards be ignored, you'd say something like this:
10601
10602 @lisp
10603 (setq gnus-ignored-mime-types
10604       '("text/x-vcard"))
10605 @end lisp
10606
10607 @item gnus-article-loose-mime
10608 @vindex gnus-article-loose-mime
10609 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
10610 before interpreting the message as a @acronym{MIME} message.  This helps
10611 when reading messages from certain broken mail user agents.  The
10612 default is @code{t}.
10613
10614 @item gnus-article-emulate-mime
10615 @vindex gnus-article-emulate-mime
10616 @cindex uuencode
10617 @cindex yEnc
10618 There are other, non-@acronym{MIME} encoding methods used.  The most common
10619 is @samp{uuencode}, but yEncode is also getting to be popular.  If
10620 this variable is non-@code{nil}, Gnus will look in message bodies to
10621 see if it finds these encodings, and if so, it'll run them through the
10622 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
10623 single-part yEnc encoded attachments can be decoded.  There's no support
10624 for encoding in Gnus.
10625
10626 @item gnus-unbuttonized-mime-types
10627 @vindex gnus-unbuttonized-mime-types
10628 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10629 this list won't have @acronym{MIME} buttons inserted unless they aren't
10630 displayed or this variable is overridden by
10631 @code{gnus-buttonized-mime-types}.  The default value is
10632 @code{(".*/.*")}.  This variable is only used when
10633 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
10634
10635 @item gnus-buttonized-mime-types
10636 @vindex gnus-buttonized-mime-types
10637 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10638 this list will have @acronym{MIME} buttons inserted unless they aren't
10639 displayed.  This variable overrides
10640 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
10641 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
10642 is @code{nil}.
10643
10644 To see e.g. security buttons but no other buttons, you could set this
10645 variable to @code{("multipart/signed")} and leave
10646 @code{gnus-unbuttonized-mime-types} at the default value.
10647
10648 You could also add @code{"multipart/alternative"} to this list to
10649 display radio buttons that allow you to choose one of two media types
10650 those mails include.  See also @code{mm-discouraged-alternatives}
10651 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
10652 Emacs MIME Manual}).
10653
10654 @item gnus-inhibit-mime-unbuttonizing
10655 @vindex gnus-inhibit-mime-unbuttonizing
10656 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
10657 default value is @code{nil}.
10658
10659 @item gnus-article-mime-part-function
10660 @vindex gnus-article-mime-part-function
10661 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
10662 handle as the parameter.  The function is meant to be used to allow
10663 users to gather information from the article (e. g., add Vcard info to
10664 the bbdb database) or to do actions based on parts (e. g., automatically
10665 save all jpegs into some directory).
10666
10667 Here's an example function the does the latter:
10668
10669 @lisp
10670 (defun my-save-all-jpeg-parts (handle)
10671   (when (equal (car (mm-handle-type handle)) "image/jpeg")
10672     (with-temp-buffer
10673       (insert (mm-get-part handle))
10674       (write-region (point-min) (point-max)
10675                     (read-file-name "Save jpeg to: ")))))
10676 (setq gnus-article-mime-part-function
10677       'my-save-all-jpeg-parts)
10678 @end lisp
10679
10680 @vindex gnus-mime-multipart-functions
10681 @item gnus-mime-multipart-functions
10682 Alist of @acronym{MIME} multipart types and functions to handle them.
10683
10684 @vindex gnus-mime-display-multipart-alternative-as-mixed
10685 @item gnus-mime-display-multipart-alternative-as-mixed
10686 Display "multipart/alternative" parts as "multipart/mixed".
10687
10688 @vindex gnus-mime-display-multipart-related-as-mixed
10689 @item gnus-mime-display-multipart-related-as-mixed
10690 Display "multipart/related" parts as "multipart/mixed".
10691
10692 If displaying @samp{text/html} is discouraged, see
10693 @code{mm-discouraged-alternatives}, images or other material inside a
10694 "multipart/related" part might be overlooked when this variable is
10695 @code{nil}.  @ref{Display Customization, Display Customization, ,
10696 emacs-mime, Emacs-Mime Manual}.
10697
10698 @vindex gnus-mime-display-multipart-as-mixed
10699 @item gnus-mime-display-multipart-as-mixed
10700 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
10701 overrides @code{nil} values of
10702 @code{gnus-mime-display-multipart-alternative-as-mixed} and
10703 @code{gnus-mime-display-multipart-related-as-mixed}.
10704
10705 @vindex mm-file-name-rewrite-functions
10706 @item mm-file-name-rewrite-functions
10707 List of functions used for rewriting file names of @acronym{MIME} parts.
10708 Each function takes a file name as input and returns a file name.
10709
10710 Ready-made functions include@*
10711 @code{mm-file-name-delete-whitespace},
10712 @code{mm-file-name-trim-whitespace},
10713 @code{mm-file-name-collapse-whitespace}, and
10714 @code{mm-file-name-replace-whitespace}.  The later uses the value of
10715 the variable @code{mm-file-name-replace-whitespace} to replace each
10716 whitespace character in a file name with that string; default value
10717 is @code{"_"} (a single underscore).
10718 @findex mm-file-name-delete-whitespace
10719 @findex mm-file-name-trim-whitespace
10720 @findex mm-file-name-collapse-whitespace
10721 @findex mm-file-name-replace-whitespace
10722 @vindex mm-file-name-replace-whitespace
10723
10724 The standard functions @code{capitalize}, @code{downcase},
10725 @code{upcase}, and @code{upcase-initials} may be useful, too.
10726
10727 Everybody knows that whitespace characters in file names are evil,
10728 except those who don't know.  If you receive lots of attachments from
10729 such unenlightened users, you can make live easier by adding
10730
10731 @lisp
10732 (setq mm-file-name-rewrite-functions
10733       '(mm-file-name-trim-whitespace
10734         mm-file-name-collapse-whitespace
10735         mm-file-name-replace-whitespace))
10736 @end lisp
10737
10738 @noindent
10739 to your @file{~/.gnus.el} file.
10740
10741 @end table
10742
10743
10744 @node Charsets
10745 @section Charsets
10746 @cindex charsets
10747
10748 People use different charsets, and we have @acronym{MIME} to let us know what
10749 charsets they use.  Or rather, we wish we had.  Many people use
10750 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10751 just send out messages without saying what character sets they use.  To
10752 help a bit with this, some local news hierarchies have policies that say
10753 what character set is the default.  For instance, the @samp{fj}
10754 hierarchy uses @code{iso-2022-jp}.
10755
10756 @vindex gnus-group-charset-alist
10757 This knowledge is encoded in the @code{gnus-group-charset-alist}
10758 variable, which is an alist of regexps (use the first item to match full
10759 group names) and default charsets to be used when reading these groups.
10760
10761 @vindex gnus-newsgroup-ignored-charsets
10762 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10763 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10764 even if they really are in @code{koi-8}.  To help here, the
10765 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10766 charsets that are listed here will be ignored.  The variable can be
10767 set on a group-by-group basis using the group parameters (@pxref{Group
10768 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10769 which includes values some agents insist on having in there.
10770
10771 @vindex gnus-group-posting-charset-alist
10772 When posting, @code{gnus-group-posting-charset-alist} is used to
10773 determine which charsets should not be encoded using the @acronym{MIME}
10774 encodings.  For instance, some hierarchies discourage using
10775 quoted-printable header encoding.
10776
10777 This variable is an alist of regexps and permitted unencoded charsets
10778 for posting.  Each element of the alist has the form @code{(}@var{test
10779 header body-list}@code{)}, where:
10780
10781 @table @var
10782 @item test
10783 is either a regular expression matching the newsgroup header or a
10784 variable to query,
10785 @item header
10786 is the charset which may be left unencoded in the header (@code{nil}
10787 means encode all charsets),
10788 @item body-list
10789 is a list of charsets which may be encoded using 8bit content-transfer
10790 encoding in the body, or one of the special values @code{nil} (always
10791 encode using quoted-printable) or @code{t} (always use 8bit).
10792 @end table
10793
10794 @cindex Russian
10795 @cindex koi8-r
10796 @cindex koi8-u
10797 @cindex iso-8859-5
10798 @cindex coding system aliases
10799 @cindex preferred charset
10800
10801 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10802 The Emacs MIME Manual}, for additional variables that control which
10803 MIME charsets are used when sending messages.
10804
10805 Other charset tricks that may be useful, although not Gnus-specific:
10806
10807 If there are several @acronym{MIME} charsets that encode the same Emacs
10808 charset, you can choose what charset to use by saying the following:
10809
10810 @lisp
10811 (put-charset-property 'cyrillic-iso8859-5
10812                       'preferred-coding-system 'koi8-r)
10813 @end lisp
10814
10815 This means that Russian will be encoded using @code{koi8-r} instead of
10816 the default @code{iso-8859-5} @acronym{MIME} charset.
10817
10818 If you want to read messages in @code{koi8-u}, you can cheat and say
10819
10820 @lisp
10821 (define-coding-system-alias 'koi8-u 'koi8-r)
10822 @end lisp
10823
10824 This will almost do the right thing.
10825
10826 And finally, to read charsets like @code{windows-1251}, you can say
10827 something like
10828
10829 @lisp
10830 (codepage-setup 1251)
10831 (define-coding-system-alias 'windows-1251 'cp1251)
10832 @end lisp
10833
10834
10835 @node Article Commands
10836 @section Article Commands
10837
10838 @table @kbd
10839
10840 @item A P
10841 @cindex PostScript
10842 @cindex printing
10843 @kindex A P (Summary)
10844 @vindex gnus-ps-print-hook
10845 @findex gnus-summary-print-article
10846 Generate and print a PostScript image of the article buffer
10847 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10848 be run just before printing the buffer.  An alternative way to print
10849 article is to use Muttprint (@pxref{Saving Articles}).
10850
10851 @end table
10852
10853
10854 @node Summary Sorting
10855 @section Summary Sorting
10856 @cindex summary sorting
10857
10858 You can have the summary buffer sorted in various ways, even though I
10859 can't really see why you'd want that.
10860
10861 @table @kbd
10862
10863 @item C-c C-s C-n
10864 @kindex C-c C-s C-n (Summary)
10865 @findex gnus-summary-sort-by-number
10866 Sort by article number (@code{gnus-summary-sort-by-number}).
10867
10868 @item C-c C-s C-m C-n
10869 @kindex C-c C-s C-n (Summary)
10870 @findex gnus-summary-sort-by-most-recent-number
10871 Sort by most recent article number
10872 (@code{gnus-summary-sort-by-most-recent-number}).
10873
10874 @item C-c C-s C-a
10875 @kindex C-c C-s C-a (Summary)
10876 @findex gnus-summary-sort-by-author
10877 Sort by author (@code{gnus-summary-sort-by-author}).
10878
10879 @item C-c C-s C-t
10880 @kindex C-c C-s C-t (Summary)
10881 @findex gnus-summary-sort-by-recipient
10882 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10883
10884 @item C-c C-s C-s
10885 @kindex C-c C-s C-s (Summary)
10886 @findex gnus-summary-sort-by-subject
10887 Sort by subject (@code{gnus-summary-sort-by-subject}).
10888
10889 @item C-c C-s C-d
10890 @kindex C-c C-s C-d (Summary)
10891 @findex gnus-summary-sort-by-date
10892 Sort by date (@code{gnus-summary-sort-by-date}).
10893
10894 @item C-c C-s C-m C-d
10895 @kindex C-c C-s C-m C-d (Summary)
10896 @findex gnus-summary-sort-by-most-recent-date
10897 Sort by most recent date (@code{gnus-summary-sort-by-most-recent-date}).
10898
10899 @item C-c C-s C-l
10900 @kindex C-c C-s C-l (Summary)
10901 @findex gnus-summary-sort-by-lines
10902 Sort by lines (@code{gnus-summary-sort-by-lines}).
10903
10904 @item C-c C-s C-c
10905 @kindex C-c C-s C-c (Summary)
10906 @findex gnus-summary-sort-by-chars
10907 Sort by article length (@code{gnus-summary-sort-by-chars}).
10908
10909 @item C-c C-s C-i
10910 @kindex C-c C-s C-i (Summary)
10911 @findex gnus-summary-sort-by-score
10912 Sort by score (@code{gnus-summary-sort-by-score}).
10913
10914 @item C-c C-s C-r
10915 @kindex C-c C-s C-r (Summary)
10916 @findex gnus-summary-sort-by-random
10917 Randomize (@code{gnus-summary-sort-by-random}).
10918
10919 @item C-c C-s C-o
10920 @kindex C-c C-s C-o (Summary)
10921 @findex gnus-summary-sort-by-original
10922 Sort using the default sorting method
10923 (@code{gnus-summary-sort-by-original}).
10924 @end table
10925
10926 These functions will work both when you use threading and when you don't
10927 use threading.  In the latter case, all summary lines will be sorted,
10928 line by line.  In the former case, sorting will be done on a
10929 root-by-root basis, which might not be what you were looking for.  To
10930 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10931 Commands}).
10932
10933 If a prefix argument if given, the sort order is reversed.
10934
10935
10936 @node Finding the Parent
10937 @section Finding the Parent
10938 @cindex parent articles
10939 @cindex referring articles
10940
10941 @table @kbd
10942 @item ^
10943 @kindex ^ (Summary)
10944 @findex gnus-summary-refer-parent-article
10945 If you'd like to read the parent of the current article, and it is not
10946 displayed in the summary buffer, you might still be able to.  That is,
10947 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10948 and the @code{References} in the current article are not mangled, you
10949 can just press @kbd{^} or @kbd{A r}
10950 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10951 you'll get the parent.  If the parent is already displayed in the
10952 summary buffer, point will just move to this article.
10953
10954 If given a positive numerical prefix, fetch that many articles back into
10955 the ancestry.  If given a negative numerical prefix, fetch just that
10956 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10957 grandparent and the grandgrandparent of the current article.  If you say
10958 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10959 article.
10960
10961 @item A R (Summary)
10962 @findex gnus-summary-refer-references
10963 @kindex A R (Summary)
10964 Fetch all articles mentioned in the @code{References} header of the
10965 article (@code{gnus-summary-refer-references}).
10966
10967 @item A T (Summary)
10968 @findex gnus-summary-refer-thread
10969 @kindex A T (Summary)
10970 Display the full thread where the current article appears
10971 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10972 headers in the current group to work, so it usually takes a while.  If
10973 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10974 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10975 visible effects normally, but it'll make this command work a whole lot
10976 faster.  Of course, it'll make group entry somewhat slow.
10977
10978 @vindex gnus-refer-thread-limit
10979 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10980 articles before the first displayed in the current group) headers to
10981 fetch when doing this command.  The default is 200.  If @code{t}, all
10982 the available headers will be fetched.  This variable can be overridden
10983 by giving the @kbd{A T} command a numerical prefix.
10984
10985 @item M-^ (Summary)
10986 @findex gnus-summary-refer-article
10987 @kindex M-^ (Summary)
10988 @cindex Message-ID
10989 @cindex fetching by Message-ID
10990 You can also ask Gnus for an arbitrary article, no matter what group it
10991 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10992 for a @code{Message-ID}, which is one of those long, hard-to-read
10993 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10994 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10995
10996 Gnus looks for the @code{Message-ID} in the headers that have already
10997 been fetched, but also tries all the select methods specified by
10998 @code{gnus-refer-article-method} if it is not found.
10999 @end table
11000
11001 @vindex gnus-refer-article-method
11002 If the group you are reading is located on a back end that does not
11003 support fetching by @code{Message-ID} very well (like @code{nnspool}),
11004 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
11005 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
11006 updating the spool you are reading from, but that's not really
11007 necessary.
11008
11009 It can also be a list of select methods, as well as the special symbol
11010 @code{current}, which means to use the current select method.  If it
11011 is a list, Gnus will try all the methods in the list until it finds a
11012 match.
11013
11014 Here's an example setting that will first try the current method, and
11015 then ask Google if that fails:
11016
11017 @lisp
11018 (setq gnus-refer-article-method
11019       '(current
11020         (nnweb "google" (nnweb-type google))))
11021 @end lisp
11022
11023 Most of the mail back ends support fetching by @code{Message-ID}, but
11024 do not do a particularly excellent job at it.  That is, @code{nnmbox},
11025 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
11026 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
11027 only able to locate articles that have been posted to the current
11028 group.  (Anything else would be too time consuming.)  @code{nnmh} does
11029 not support this at all.
11030
11031
11032 @node Alternative Approaches
11033 @section Alternative Approaches
11034
11035 Different people like to read news using different methods.  This being
11036 Gnus, we offer a small selection of minor modes for the summary buffers.
11037
11038 @menu
11039 * Pick and Read::               First mark articles and then read them.
11040 * Binary Groups::               Auto-decode all articles.
11041 @end menu
11042
11043
11044 @node Pick and Read
11045 @subsection Pick and Read
11046 @cindex pick and read
11047
11048 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
11049 a two-phased reading interface.  The user first marks in a summary
11050 buffer the articles she wants to read.  Then she starts reading the
11051 articles with just an article buffer displayed.
11052
11053 @findex gnus-pick-mode
11054 @kindex M-x gnus-pick-mode
11055 Gnus provides a summary buffer minor mode that allows
11056 this---@code{gnus-pick-mode}.  This basically means that a few process
11057 mark commands become one-keystroke commands to allow easy marking, and
11058 it provides one additional command for switching to the summary buffer.
11059
11060 Here are the available keystrokes when using pick mode:
11061
11062 @table @kbd
11063 @item .
11064 @kindex . (Pick)
11065 @findex gnus-pick-article-or-thread
11066 Pick the article or thread on the current line
11067 (@code{gnus-pick-article-or-thread}).  If the variable
11068 @code{gnus-thread-hide-subtree} is true, then this key selects the
11069 entire thread when used at the first article of the thread.  Otherwise,
11070 it selects just the article.  If given a numerical prefix, go to that
11071 thread or article and pick it.  (The line number is normally displayed
11072 at the beginning of the summary pick lines.)
11073
11074 @item SPACE
11075 @kindex SPACE (Pick)
11076 @findex gnus-pick-next-page
11077 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
11078 at the end of the buffer, start reading the picked articles.
11079
11080 @item u
11081 @kindex u (Pick)
11082 @findex gnus-pick-unmark-article-or-thread.
11083 Unpick the thread or article
11084 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
11085 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
11086 thread if used at the first article of the thread.  Otherwise it unpicks
11087 just the article.  You can give this key a numerical prefix to unpick
11088 the thread or article at that line.
11089
11090 @item RET
11091 @kindex RET (Pick)
11092 @findex gnus-pick-start-reading
11093 @vindex gnus-pick-display-summary
11094 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
11095 given a prefix, mark all unpicked articles as read first.  If
11096 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
11097 will still be visible when you are reading.
11098
11099 @end table
11100
11101 All the normal summary mode commands are still available in the
11102 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
11103 which is mapped to the same function
11104 @code{gnus-summary-tick-article-forward}.
11105
11106 If this sounds like a good idea to you, you could say:
11107
11108 @lisp
11109 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
11110 @end lisp
11111
11112 @vindex gnus-pick-mode-hook
11113 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
11114
11115 @vindex gnus-mark-unpicked-articles-as-read
11116 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
11117 all unpicked articles as read.  The default is @code{nil}.
11118
11119 @vindex gnus-summary-pick-line-format
11120 The summary line format in pick mode is slightly different from the
11121 standard format.  At the beginning of each line the line number is
11122 displayed.  The pick mode line format is controlled by the
11123 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
11124 Variables}).  It accepts the same format specs that
11125 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
11126
11127
11128 @node Binary Groups
11129 @subsection Binary Groups
11130 @cindex binary groups
11131
11132 @findex gnus-binary-mode
11133 @kindex M-x gnus-binary-mode
11134 If you spend much time in binary groups, you may grow tired of hitting
11135 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
11136 is a minor mode for summary buffers that makes all ordinary Gnus article
11137 selection functions uudecode series of articles and display the result
11138 instead of just displaying the articles the normal way.
11139
11140 @kindex g (Binary)
11141 @findex gnus-binary-show-article
11142 The only way, in fact, to see the actual articles is the @kbd{g}
11143 command, when you have turned on this mode
11144 (@code{gnus-binary-show-article}).
11145
11146 @vindex gnus-binary-mode-hook
11147 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
11148
11149
11150 @node Tree Display
11151 @section Tree Display
11152 @cindex trees
11153
11154 @vindex gnus-use-trees
11155 If you don't like the normal Gnus summary display, you might try setting
11156 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
11157 additional @dfn{tree buffer}.  You can execute all summary mode commands
11158 in the tree buffer.
11159
11160 There are a few variables to customize the tree display, of course:
11161
11162 @table @code
11163 @item gnus-tree-mode-hook
11164 @vindex gnus-tree-mode-hook
11165 A hook called in all tree mode buffers.
11166
11167 @item gnus-tree-mode-line-format
11168 @vindex gnus-tree-mode-line-format
11169 A format string for the mode bar in the tree mode buffers (@pxref{Mode
11170 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
11171 of valid specs, @pxref{Summary Buffer Mode Line}.
11172
11173 @item gnus-selected-tree-face
11174 @vindex gnus-selected-tree-face
11175 Face used for highlighting the selected article in the tree buffer.  The
11176 default is @code{modeline}.
11177
11178 @item gnus-tree-line-format
11179 @vindex gnus-tree-line-format
11180 A format string for the tree nodes.  The name is a bit of a misnomer,
11181 though---it doesn't define a line, but just the node.  The default value
11182 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
11183 the name of the poster.  It is vital that all nodes are of the same
11184 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
11185
11186 Valid specs are:
11187
11188 @table @samp
11189 @item n
11190 The name of the poster.
11191 @item f
11192 The @code{From} header.
11193 @item N
11194 The number of the article.
11195 @item [
11196 The opening bracket.
11197 @item ]
11198 The closing bracket.
11199 @item s
11200 The subject.
11201 @end table
11202
11203 @xref{Formatting Variables}.
11204
11205 Variables related to the display are:
11206
11207 @table @code
11208 @item gnus-tree-brackets
11209 @vindex gnus-tree-brackets
11210 This is used for differentiating between ``real'' articles and
11211 ``sparse'' articles.  The format is
11212 @example
11213 ((@var{real-open} . @var{real-close})
11214  (@var{sparse-open} . @var{sparse-close})
11215  (@var{dummy-open} . @var{dummy-close}))
11216 @end example
11217 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
11218
11219 @item gnus-tree-parent-child-edges
11220 @vindex gnus-tree-parent-child-edges
11221 This is a list that contains the characters used for connecting parent
11222 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
11223
11224 @end table
11225
11226 @item gnus-tree-minimize-window
11227 @vindex gnus-tree-minimize-window
11228 If this variable is non-@code{nil}, Gnus will try to keep the tree
11229 buffer as small as possible to allow more room for the other Gnus
11230 windows.  If this variable is a number, the tree buffer will never be
11231 higher than that number.  The default is @code{t}.  Note that if you
11232 have several windows displayed side-by-side in a frame and the tree
11233 buffer is one of these, minimizing the tree window will also resize all
11234 other windows displayed next to it.
11235
11236 You may also wish to add the following hook to keep the window minimized
11237 at all times:
11238
11239 @lisp
11240 (add-hook 'gnus-configure-windows-hook
11241           'gnus-tree-perhaps-minimize)
11242 @end lisp
11243
11244 @item gnus-generate-tree-function
11245 @vindex gnus-generate-tree-function
11246 @findex gnus-generate-horizontal-tree
11247 @findex gnus-generate-vertical-tree
11248 The function that actually generates the thread tree.  Two predefined
11249 functions are available: @code{gnus-generate-horizontal-tree} and
11250 @code{gnus-generate-vertical-tree} (which is the default).
11251
11252 @end table
11253
11254 Here's an example from a horizontal tree buffer:
11255
11256 @example
11257 @{***@}-(***)-[odd]-[Gun]
11258      |      \[Jan]
11259      |      \[odd]-[Eri]
11260      |      \(***)-[Eri]
11261      |            \[odd]-[Paa]
11262      \[Bjo]
11263      \[Gun]
11264      \[Gun]-[Jor]
11265 @end example
11266
11267 Here's the same thread displayed in a vertical tree buffer:
11268
11269 @example
11270 @group
11271 @{***@}
11272   |--------------------------\-----\-----\
11273 (***)                         [Bjo] [Gun] [Gun]
11274   |--\-----\-----\                          |
11275 [odd] [Jan] [odd] (***)                   [Jor]
11276   |           |     |--\
11277 [Gun]       [Eri] [Eri] [odd]
11278                           |
11279                         [Paa]
11280 @end group
11281 @end example
11282
11283 If you're using horizontal trees, it might be nice to display the trees
11284 side-by-side with the summary buffer.  You could add something like the
11285 following to your @file{~/.gnus.el} file:
11286
11287 @lisp
11288 (setq gnus-use-trees t
11289       gnus-generate-tree-function 'gnus-generate-horizontal-tree
11290       gnus-tree-minimize-window nil)
11291 (gnus-add-configuration
11292  '(article
11293    (vertical 1.0
11294              (horizontal 0.25
11295                          (summary 0.75 point)
11296                          (tree 1.0))
11297              (article 1.0))))
11298 @end lisp
11299
11300 @xref{Window Layout}.
11301
11302
11303 @node Mail Group Commands
11304 @section Mail Group Commands
11305 @cindex mail group commands
11306
11307 Some commands only make sense in mail groups.  If these commands are
11308 invalid in the current group, they will raise a hell and let you know.
11309
11310 All these commands (except the expiry and edit commands) use the
11311 process/prefix convention (@pxref{Process/Prefix}).
11312
11313 @table @kbd
11314
11315 @item B e
11316 @kindex B e (Summary)
11317 @findex gnus-summary-expire-articles
11318 @cindex expiring mail
11319 Run all expirable articles in the current group through the expiry
11320 process (@code{gnus-summary-expire-articles}).  That is, delete all
11321 expirable articles in the group that have been around for a while.
11322 (@pxref{Expiring Mail}).
11323
11324 @item B C-M-e
11325 @kindex B C-M-e (Summary)
11326 @findex gnus-summary-expire-articles-now
11327 @cindex expiring mail
11328 Delete all the expirable articles in the group
11329 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
11330 articles eligible for expiry in the current group will
11331 disappear forever into that big @file{/dev/null} in the sky.
11332
11333 @item B DEL
11334 @kindex B DEL (Summary)
11335 @cindex deleting mail
11336 @findex gnus-summary-delete-article
11337 @c @icon{gnus-summary-mail-delete}
11338 Delete the mail article.  This is ``delete'' as in ``delete it from your
11339 disk forever and ever, never to return again.'' Use with caution.
11340 (@code{gnus-summary-delete-article}).
11341
11342 @item B m
11343 @kindex B m (Summary)
11344 @cindex move mail
11345 @findex gnus-summary-move-article
11346 @vindex gnus-preserve-marks
11347 Move the article from one mail group to another
11348 (@code{gnus-summary-move-article}).  Marks will be preserved if
11349 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11350
11351 @item B c
11352 @kindex B c (Summary)
11353 @cindex copy mail
11354 @findex gnus-summary-copy-article
11355 @c @icon{gnus-summary-mail-copy}
11356 Copy the article from one group (mail group or not) to a mail group
11357 (@code{gnus-summary-copy-article}).  Marks will be preserved if
11358 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11359
11360 @item B B
11361 @kindex B B (Summary)
11362 @cindex crosspost mail
11363 @findex gnus-summary-crosspost-article
11364 Crosspost the current article to some other group
11365 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
11366 the article in the other group, and the Xref headers of the article will
11367 be properly updated.
11368
11369 @item B i
11370 @kindex B i (Summary)
11371 @findex gnus-summary-import-article
11372 Import an arbitrary file into the current mail newsgroup
11373 (@code{gnus-summary-import-article}).  You will be prompted for a file
11374 name, a @code{From} header and a @code{Subject} header.
11375
11376 @item B I
11377 @kindex B I (Summary)
11378 @findex gnus-summary-create-article
11379 Create an empty article in the current mail newsgroups
11380 (@code{gnus-summary-create-article}).  You will be prompted for a
11381 @code{From} header and a @code{Subject} header.
11382
11383 @item B r
11384 @kindex B r (Summary)
11385 @findex gnus-summary-respool-article
11386 @vindex gnus-summary-respool-default-method
11387 Respool the mail article (@code{gnus-summary-respool-article}).
11388 @code{gnus-summary-respool-default-method} will be used as the default
11389 select method when respooling.  This variable is @code{nil} by default,
11390 which means that the current group select method will be used instead.
11391 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
11392 (which is the default).
11393
11394 @item B w
11395 @itemx e
11396 @kindex B w (Summary)
11397 @kindex e (Summary)
11398 @findex gnus-summary-edit-article
11399 @kindex C-c C-c (Article)
11400 @findex gnus-summary-edit-article-done
11401 Edit the current article (@code{gnus-summary-edit-article}).  To finish
11402 editing and make the changes permanent, type @kbd{C-c C-c}
11403 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
11404 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
11405
11406 @item B q
11407 @kindex B q (Summary)
11408 @findex gnus-summary-respool-query
11409 If you want to re-spool an article, you might be curious as to what group
11410 the article will end up in before you do the re-spooling.  This command
11411 will tell you (@code{gnus-summary-respool-query}).
11412
11413 @item B t
11414 @kindex B t (Summary)
11415 @findex gnus-summary-respool-trace
11416 Similarly, this command will display all fancy splitting patterns used
11417 when respooling, if any (@code{gnus-summary-respool-trace}).
11418
11419 @item B p
11420 @kindex B p (Summary)
11421 @findex gnus-summary-article-posted-p
11422 Some people have a tendency to send you ``courtesy'' copies when they
11423 follow up to articles you have posted.  These usually have a
11424 @code{Newsgroups} header in them, but not always.  This command
11425 (@code{gnus-summary-article-posted-p}) will try to fetch the current
11426 article from your news server (or rather, from
11427 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
11428 report back whether it found the article or not.  Even if it says that
11429 it didn't find the article, it may have been posted anyway---mail
11430 propagation is much faster than news propagation, and the news copy may
11431 just not have arrived yet.
11432
11433 @item K E
11434 @kindex K E (Summary)
11435 @findex gnus-article-encrypt-body
11436 @vindex gnus-article-encrypt-protocol
11437 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
11438 The body is encrypted with the encryption protocol specified by the
11439 variable @code{gnus-article-encrypt-protocol}.
11440
11441 @end table
11442
11443 @vindex gnus-move-split-methods
11444 @cindex moving articles
11445 If you move (or copy) articles regularly, you might wish to have Gnus
11446 suggest where to put the articles.  @code{gnus-move-split-methods} is a
11447 variable that uses the same syntax as @code{gnus-split-methods}
11448 (@pxref{Saving Articles}).  You may customize that variable to create
11449 suggestions you find reasonable.  (Note that
11450 @code{gnus-move-split-methods} uses group names where
11451 @code{gnus-split-methods} uses file names.)
11452
11453 @lisp
11454 (setq gnus-move-split-methods
11455       '(("^From:.*Lars Magne" "nnml:junk")
11456         ("^Subject:.*gnus" "nnfolder:important")
11457         (".*" "nnml:misc")))
11458 @end lisp
11459
11460
11461 @node Various Summary Stuff
11462 @section Various Summary Stuff
11463
11464 @menu
11465 * Summary Group Information::   Information oriented commands.
11466 * Searching for Articles::      Multiple article commands.
11467 * Summary Generation Commands::
11468 * Really Various Summary Commands::  Those pesky non-conformant commands.
11469 @end menu
11470
11471 @table @code
11472 @vindex gnus-summary-display-while-building
11473 @item gnus-summary-display-while-building
11474 If non-@code{nil}, show and update the summary buffer as it's being
11475 built.  If @code{t}, update the buffer after every line is inserted.
11476 If the value is an integer, @var{n}, update the display every @var{n}
11477 lines.  The default is @code{nil}.
11478
11479 @vindex gnus-summary-display-arrow
11480 @item gnus-summary-display-arrow
11481 If non-@code{nil}, display an arrow in the fringe to indicate the
11482 current article.
11483
11484 @vindex gnus-summary-mode-hook
11485 @item gnus-summary-mode-hook
11486 This hook is called when creating a summary mode buffer.
11487
11488 @vindex gnus-summary-generate-hook
11489 @item gnus-summary-generate-hook
11490 This is called as the last thing before doing the threading and the
11491 generation of the summary buffer.  It's quite convenient for customizing
11492 the threading variables based on what data the newsgroup has.  This hook
11493 is called from the summary buffer after most summary buffer variables
11494 have been set.
11495
11496 @vindex gnus-summary-prepare-hook
11497 @item gnus-summary-prepare-hook
11498 It is called after the summary buffer has been generated.  You might use
11499 it to, for instance, highlight lines or modify the look of the buffer in
11500 some other ungodly manner.  I don't care.
11501
11502 @vindex gnus-summary-prepared-hook
11503 @item gnus-summary-prepared-hook
11504 A hook called as the very last thing after the summary buffer has been
11505 generated.
11506
11507 @vindex gnus-summary-ignore-duplicates
11508 @item gnus-summary-ignore-duplicates
11509 When Gnus discovers two articles that have the same @code{Message-ID},
11510 it has to do something drastic.  No articles are allowed to have the
11511 same @code{Message-ID}, but this may happen when reading mail from some
11512 sources.  Gnus allows you to customize what happens with this variable.
11513 If it is @code{nil} (which is the default), Gnus will rename the
11514 @code{Message-ID} (for display purposes only) and display the article as
11515 any other article.  If this variable is @code{t}, it won't display the
11516 article---it'll be as if it never existed.
11517
11518 @vindex gnus-alter-articles-to-read-function
11519 @item gnus-alter-articles-to-read-function
11520 This function, which takes two parameters (the group name and the list
11521 of articles to be selected), is called to allow the user to alter the
11522 list of articles to be selected.
11523
11524 For instance, the following function adds the list of cached articles to
11525 the list in one particular group:
11526
11527 @lisp
11528 (defun my-add-cached-articles (group articles)
11529   (if (string= group "some.group")
11530       (append gnus-newsgroup-cached articles)
11531     articles))
11532 @end lisp
11533
11534 @vindex gnus-newsgroup-variables
11535 @item gnus-newsgroup-variables
11536 A list of newsgroup (summary buffer) local variables, or cons of
11537 variables and their default expressions to be evalled (when the default
11538 values are not @code{nil}), that should be made global while the summary
11539 buffer is active.
11540
11541 Note: The default expressions will be evaluated (using function
11542 @code{eval}) before assignment to the local variable rather than just
11543 assigned to it.  If the default expression is the symbol @code{global},
11544 that symbol will not be evaluated but the global value of the local
11545 variable will be used instead.
11546
11547 These variables can be used to set variables in the group parameters
11548 while still allowing them to affect operations done in other
11549 buffers.  For example:
11550
11551 @lisp
11552 (setq gnus-newsgroup-variables
11553       '(message-use-followup-to
11554         (gnus-visible-headers .
11555  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
11556 @end lisp
11557
11558 Also @pxref{Group Parameters}.
11559
11560 @vindex gnus-propagate-marks
11561 @item gnus-propagate-marks
11562 If non-@code{nil}, propagate marks to the backends for possible
11563 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
11564 sieve.
11565
11566 @end table
11567
11568
11569 @node Summary Group Information
11570 @subsection Summary Group Information
11571
11572 @table @kbd
11573
11574 @item H f
11575 @kindex H f (Summary)
11576 @findex gnus-summary-fetch-faq
11577 @vindex gnus-group-faq-directory
11578 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
11579 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
11580 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
11581 is usually a directory on a remote machine.  This variable can also be
11582 a list of directories.  In that case, giving a prefix to this command
11583 will allow you to choose between the various sites.  @code{ange-ftp}
11584 or @code{efs} will probably be used for fetching the file.
11585
11586 @item H d
11587 @kindex H d (Summary)
11588 @findex gnus-summary-describe-group
11589 Give a brief description of the current group
11590 (@code{gnus-summary-describe-group}).  If given a prefix, force
11591 rereading the description from the server.
11592
11593 @item H h
11594 @kindex H h (Summary)
11595 @findex gnus-summary-describe-briefly
11596 Give an extremely brief description of the most important summary
11597 keystrokes (@code{gnus-summary-describe-briefly}).
11598
11599 @item H i
11600 @kindex H i (Summary)
11601 @findex gnus-info-find-node
11602 Go to the Gnus info node (@code{gnus-info-find-node}).
11603 @end table
11604
11605
11606 @node Searching for Articles
11607 @subsection Searching for Articles
11608
11609 @table @kbd
11610
11611 @item M-s
11612 @kindex M-s (Summary)
11613 @findex gnus-summary-search-article-forward
11614 Search through all subsequent (raw) articles for a regexp
11615 (@code{gnus-summary-search-article-forward}).
11616
11617 @item M-r
11618 @kindex M-r (Summary)
11619 @findex gnus-summary-search-article-backward
11620 Search through all previous (raw) articles for a regexp
11621 (@code{gnus-summary-search-article-backward}).
11622
11623 @item M-S
11624 @kindex M-S (Summary)
11625 @findex gnus-summary-repeat-search-article-forward
11626 Repeat the previous search forwards
11627 (@code{gnus-summary-repeat-search-article-forward}).
11628
11629 @item M-R
11630 @kindex M-R (Summary)
11631 @findex gnus-summary-repeat-search-article-backward
11632 Repeat the previous search backwards
11633 (@code{gnus-summary-repeat-search-article-backward}).
11634
11635 @item &
11636 @kindex & (Summary)
11637 @findex gnus-summary-execute-command
11638 This command will prompt you for a header, a regular expression to match
11639 on this field, and a command to be executed if the match is made
11640 (@code{gnus-summary-execute-command}).  If the header is an empty
11641 string, the match is done on the entire article.  If given a prefix,
11642 search backward instead.
11643
11644 For instance, @kbd{& RET some.*string RET #} will put the process mark on
11645 all articles that have heads or bodies that match @samp{some.*string}.
11646
11647 @item M-&
11648 @kindex M-& (Summary)
11649 @findex gnus-summary-universal-argument
11650 Perform any operation on all articles that have been marked with
11651 the process mark (@code{gnus-summary-universal-argument}).
11652 @end table
11653
11654 @node Summary Generation Commands
11655 @subsection Summary Generation Commands
11656
11657 @table @kbd
11658
11659 @item Y g
11660 @kindex Y g (Summary)
11661 @findex gnus-summary-prepare
11662 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
11663
11664 @item Y c
11665 @kindex Y c (Summary)
11666 @findex gnus-summary-insert-cached-articles
11667 Pull all cached articles (for the current group) into the summary buffer
11668 (@code{gnus-summary-insert-cached-articles}).
11669
11670 @item Y d
11671 @kindex Y d (Summary)
11672 @findex gnus-summary-insert-dormant-articles
11673 Pull all dormant articles (for the current group) into the summary buffer
11674 (@code{gnus-summary-insert-dormant-articles}).
11675
11676 @item Y t
11677 @kindex Y t (Summary)
11678 @findex gnus-summary-insert-ticked-articles
11679 Pull all ticked articles (for the current group) into the summary buffer
11680 (@code{gnus-summary-insert-ticked-articles}).
11681
11682 @end table
11683
11684
11685 @node Really Various Summary Commands
11686 @subsection Really Various Summary Commands
11687
11688 @table @kbd
11689
11690 @item A D
11691 @itemx C-d
11692 @kindex C-d (Summary)
11693 @kindex A D (Summary)
11694 @findex gnus-summary-enter-digest-group
11695 If the current article is a collection of other articles (for instance,
11696 a digest), you might use this command to enter a group based on the that
11697 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
11698 guess what article type is currently displayed unless you give a prefix
11699 to this command, which forces a ``digest'' interpretation.  Basically,
11700 whenever you see a message that is a collection of other messages of
11701 some format, you @kbd{C-d} and read these messages in a more convenient
11702 fashion.
11703
11704 @vindex gnus-auto-select-on-ephemeral-exit
11705 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
11706 article should be selected after exiting a digest group.  Valid values
11707 include:
11708
11709 @table @code
11710 @item next
11711 Select the next article.
11712
11713 @item next-unread
11714 Select the next unread article.
11715
11716 @item next-noselect
11717 Move the cursor to the next article.  This is the default.
11718
11719 @item next-unread-noselect
11720 Move the cursor to the next unread article.
11721 @end table
11722
11723 If it has any other value or there is no next (unread) article, the
11724 article selected before entering to the digest group will appear.
11725
11726 @item C-M-d
11727 @kindex C-M-d (Summary)
11728 @findex gnus-summary-read-document
11729 This command is very similar to the one above, but lets you gather
11730 several documents into one biiig group
11731 (@code{gnus-summary-read-document}).  It does this by opening several
11732 @code{nndoc} groups for each document, and then opening an
11733 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
11734 command understands the process/prefix convention
11735 (@pxref{Process/Prefix}).
11736
11737 @item C-t
11738 @kindex C-t (Summary)
11739 @findex gnus-summary-toggle-truncation
11740 Toggle truncation of summary lines
11741 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
11742 line centering function in the summary buffer, so it's not a good idea
11743 to have truncation switched off while reading articles.
11744
11745 @item =
11746 @kindex = (Summary)
11747 @findex gnus-summary-expand-window
11748 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11749 If given a prefix, force an @code{article} window configuration.
11750
11751 @item C-M-e
11752 @kindex C-M-e (Summary)
11753 @findex gnus-summary-edit-parameters
11754 Edit the group parameters (@pxref{Group Parameters}) of the current
11755 group (@code{gnus-summary-edit-parameters}).
11756
11757 @item C-M-a
11758 @kindex C-M-a (Summary)
11759 @findex gnus-summary-customize-parameters
11760 Customize the group parameters (@pxref{Group Parameters}) of the current
11761 group (@code{gnus-summary-customize-parameters}).
11762
11763 @end table
11764
11765
11766 @node Exiting the Summary Buffer
11767 @section Exiting the Summary Buffer
11768 @cindex summary exit
11769 @cindex exiting groups
11770
11771 Exiting from the summary buffer will normally update all info on the
11772 group and return you to the group buffer.
11773
11774 @table @kbd
11775
11776 @item Z Z
11777 @itemx Z Q
11778 @itemx q
11779 @kindex Z Z (Summary)
11780 @kindex Z Q (Summary)
11781 @kindex q (Summary)
11782 @findex gnus-summary-exit
11783 @vindex gnus-summary-exit-hook
11784 @vindex gnus-summary-prepare-exit-hook
11785 @vindex gnus-group-no-more-groups-hook
11786 @c @icon{gnus-summary-exit}
11787 Exit the current group and update all information on the group
11788 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11789 called before doing much of the exiting, which calls
11790 @code{gnus-summary-expire-articles} by default.
11791 @code{gnus-summary-exit-hook} is called after finishing the exit
11792 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11793 group mode having no more (unread) groups.
11794
11795 @item Z E
11796 @itemx Q
11797 @kindex Z E (Summary)
11798 @kindex Q (Summary)
11799 @findex gnus-summary-exit-no-update
11800 Exit the current group without updating any information on the group
11801 (@code{gnus-summary-exit-no-update}).
11802
11803 @item Z c
11804 @itemx c
11805 @kindex Z c (Summary)
11806 @kindex c (Summary)
11807 @findex gnus-summary-catchup-and-exit
11808 @c @icon{gnus-summary-catchup-and-exit}
11809 Mark all unticked articles in the group as read and then exit
11810 (@code{gnus-summary-catchup-and-exit}).
11811
11812 @item Z C
11813 @kindex Z C (Summary)
11814 @findex gnus-summary-catchup-all-and-exit
11815 Mark all articles, even the ticked ones, as read and then exit
11816 (@code{gnus-summary-catchup-all-and-exit}).
11817
11818 @item Z n
11819 @kindex Z n (Summary)
11820 @findex gnus-summary-catchup-and-goto-next-group
11821 Mark all articles as read and go to the next group
11822 (@code{gnus-summary-catchup-and-goto-next-group}).
11823
11824 @item Z p
11825 @kindex Z p (Summary)
11826 @findex gnus-summary-catchup-and-goto-prev-group
11827 Mark all articles as read and go to the previous group
11828 (@code{gnus-summary-catchup-and-goto-prev-group}).
11829
11830 @item Z R
11831 @itemx C-x C-s
11832 @kindex Z R (Summary)
11833 @kindex C-x C-s (Summary)
11834 @findex gnus-summary-reselect-current-group
11835 Exit this group, and then enter it again
11836 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11837 all articles, both read and unread.
11838
11839 @item Z G
11840 @itemx M-g
11841 @kindex Z G (Summary)
11842 @kindex M-g (Summary)
11843 @findex gnus-summary-rescan-group
11844 @c @icon{gnus-summary-mail-get}
11845 Exit the group, check for new articles in the group, and select the
11846 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11847 articles, both read and unread.
11848
11849 @item Z N
11850 @kindex Z N (Summary)
11851 @findex gnus-summary-next-group
11852 Exit the group and go to the next group
11853 (@code{gnus-summary-next-group}).
11854
11855 @item Z P
11856 @kindex Z P (Summary)
11857 @findex gnus-summary-prev-group
11858 Exit the group and go to the previous group
11859 (@code{gnus-summary-prev-group}).
11860
11861 @item Z s
11862 @kindex Z s (Summary)
11863 @findex gnus-summary-save-newsrc
11864 Save the current number of read/marked articles in the dribble buffer
11865 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11866 given a prefix, also save the @file{.newsrc} file(s).  Using this
11867 command will make exit without updating (the @kbd{Q} command) worthless.
11868 @end table
11869
11870 @vindex gnus-exit-group-hook
11871 @code{gnus-exit-group-hook} is called when you exit the current group
11872 with an ``updating'' exit.  For instance @kbd{Q}
11873 (@code{gnus-summary-exit-no-update}) does not call this hook.
11874
11875 @findex gnus-summary-wake-up-the-dead
11876 @findex gnus-dead-summary-mode
11877 @vindex gnus-kill-summary-on-exit
11878 If you're in the habit of exiting groups, and then changing your mind
11879 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11880 If you do that, Gnus won't kill the summary buffer when you exit it.
11881 (Quelle surprise!)  Instead it will change the name of the buffer to
11882 something like @samp{*Dead Summary ... *} and install a minor mode
11883 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11884 buffer, you'll find that all keys are mapped to a function called
11885 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11886 summary buffer will result in a live, normal summary buffer.
11887
11888 There will never be more than one dead summary buffer at any one time.
11889
11890 @vindex gnus-use-cross-reference
11891 The data on the current group will be updated (which articles you have
11892 read, which articles you have replied to, etc.) when you exit the
11893 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11894 @code{t} (which is the default), articles that are cross-referenced to
11895 this group and are marked as read, will also be marked as read in the
11896 other subscribed groups they were cross-posted to.  If this variable is
11897 neither @code{nil} nor @code{t}, the article will be marked as read in
11898 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11899
11900
11901 @node Crosspost Handling
11902 @section Crosspost Handling
11903
11904 @cindex velveeta
11905 @cindex spamming
11906 Marking cross-posted articles as read ensures that you'll never have to
11907 read the same article more than once.  Unless, of course, somebody has
11908 posted it to several groups separately.  Posting the same article to
11909 several groups (not cross-posting) is called @dfn{spamming}, and you are
11910 by law required to send nasty-grams to anyone who perpetrates such a
11911 heinous crime.  You may want to try NoCeM handling to filter out spam
11912 (@pxref{NoCeM}).
11913
11914 Remember: Cross-posting is kinda ok, but posting the same article
11915 separately to several groups is not.  Massive cross-posting (aka.
11916 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11917 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11918 excessive crossposting (@pxref{Summary Mail Commands}).
11919
11920 @cindex cross-posting
11921 @cindex Xref
11922 @cindex @acronym{NOV}
11923 One thing that may cause Gnus to not do the cross-posting thing
11924 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11925 (which is very nice, because it speeds things up considerably) which
11926 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11927 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11928 even with @sc{xover} by registering the @code{Xref} lines of all
11929 articles you actually read, but if you kill the articles, or just mark
11930 them as read without reading them, Gnus will not get a chance to snoop
11931 the @code{Xref} lines out of these articles, and will be unable to use
11932 the cross reference mechanism.
11933
11934 @cindex LIST overview.fmt
11935 @cindex overview.fmt
11936 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11937 in its overview files, try @samp{telnet your.nntp.server nntp},
11938 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11939 overview.fmt}.  This may not work, but if it does, and the last line you
11940 get does not read @samp{Xref:full}, then you should shout and whine at
11941 your news admin until she includes the @code{Xref} header in the
11942 overview files.
11943
11944 If you want Gnus to get the @code{Xref}s right all the time, you have to
11945 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11946 considerably.  Also @pxref{Slow/Expensive Connection}.
11947
11948 C'est la vie.
11949
11950 For an alternative approach, @pxref{Duplicate Suppression}.
11951
11952
11953 @node Duplicate Suppression
11954 @section Duplicate Suppression
11955
11956 By default, Gnus tries to make sure that you don't have to read the same
11957 article more than once by utilizing the crossposting mechanism
11958 (@pxref{Crosspost Handling}).  However, that simple and efficient
11959 approach may not work satisfactory for some users for various
11960 reasons.
11961
11962 @enumerate
11963 @item
11964 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11965 is evil and not very common.
11966
11967 @item
11968 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11969 @file{.overview} data bases.  This is evil and all too common, alas.
11970
11971 @item
11972 You may be reading the same group (or several related groups) from
11973 different @acronym{NNTP} servers.
11974
11975 @item
11976 You may be getting mail that duplicates articles posted to groups.
11977 @end enumerate
11978
11979 I'm sure there are other situations where @code{Xref} handling fails as
11980 well, but these four are the most common situations.
11981
11982 If, and only if, @code{Xref} handling fails for you, then you may
11983 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11984 will remember the @code{Message-ID}s of all articles you have read or
11985 otherwise marked as read, and then, as if by magic, mark them as read
11986 all subsequent times you see them---in @emph{all} groups.  Using this
11987 mechanism is quite likely to be somewhat inefficient, but not overly
11988 so.  It's certainly preferable to reading the same articles more than
11989 once.
11990
11991 Duplicate suppression is not a very subtle instrument.  It's more like a
11992 sledge hammer than anything else.  It works in a very simple
11993 fashion---if you have marked an article as read, it adds this Message-ID
11994 to a cache.  The next time it sees this Message-ID, it will mark the
11995 article as read with the @samp{M} mark.  It doesn't care what group it
11996 saw the article in.
11997
11998 @table @code
11999 @item gnus-suppress-duplicates
12000 @vindex gnus-suppress-duplicates
12001 If non-@code{nil}, suppress duplicates.
12002
12003 @item gnus-save-duplicate-list
12004 @vindex gnus-save-duplicate-list
12005 If non-@code{nil}, save the list of duplicates to a file.  This will
12006 make startup and shutdown take longer, so the default is @code{nil}.
12007 However, this means that only duplicate articles read in a single Gnus
12008 session are suppressed.
12009
12010 @item gnus-duplicate-list-length
12011 @vindex gnus-duplicate-list-length
12012 This variable says how many @code{Message-ID}s to keep in the duplicate
12013 suppression list.  The default is 10000.
12014
12015 @item gnus-duplicate-file
12016 @vindex gnus-duplicate-file
12017 The name of the file to store the duplicate suppression list in.  The
12018 default is @file{~/News/suppression}.
12019 @end table
12020
12021 If you have a tendency to stop and start Gnus often, setting
12022 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
12023 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
12024 the other hand, saving the list makes startup and shutdown much slower,
12025 so that means that if you stop and start Gnus often, you should set
12026 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
12027 to you to figure out, I think.
12028
12029 @node Security
12030 @section Security
12031
12032 Gnus is able to verify signed messages or decrypt encrypted messages.
12033 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
12034 and @acronym{S/MIME}, however you need some external programs to get
12035 things to work:
12036
12037 @enumerate
12038 @item
12039 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
12040 install an OpenPGP implementation such as GnuPG.  The Lisp interface
12041 to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG,
12042 epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg,
12043 PGG Manual}), Mailcrypt, and gpg.el are also supported.
12044
12045 @item
12046 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
12047 or newer is recommended.
12048
12049 @end enumerate
12050
12051 The variables that control security functionality on reading/composing
12052 messages include:
12053
12054 @table @code
12055 @item mm-verify-option
12056 @vindex mm-verify-option
12057 Option of verifying signed parts.  @code{never}, not verify;
12058 @code{always}, always verify; @code{known}, only verify known
12059 protocols.  Otherwise, ask user.
12060
12061 @item mm-decrypt-option
12062 @vindex mm-decrypt-option
12063 Option of decrypting encrypted parts.  @code{never}, no decryption;
12064 @code{always}, always decrypt; @code{known}, only decrypt known
12065 protocols.  Otherwise, ask user.
12066
12067 @item mm-sign-option
12068 @vindex mm-sign-option
12069 Option of creating signed parts.  @code{nil}, use default signing
12070 keys; @code{guided}, ask user to select signing keys from the menu.
12071
12072 @item mm-encrypt-option
12073 @vindex mm-encrypt-option
12074 Option of creating encrypted parts.  @code{nil}, use the first
12075 public-key matching the @samp{From:} header as the recipient;
12076 @code{guided}, ask user to select recipient keys from the menu.
12077
12078 @item mml1991-use
12079 @vindex mml1991-use
12080 Symbol indicating elisp interface to OpenPGP implementation for
12081 @acronym{PGP} messages.  The default is @code{epg}, but @code{pgg},
12082 @code{mailcrypt}, and @code{gpg} are also supported although
12083 deprecated.  By default, Gnus uses the first available interface in
12084 this order.
12085
12086 @item mml2015-use
12087 @vindex mml2015-use
12088 Symbol indicating elisp interface to OpenPGP implementation for
12089 @acronym{PGP/MIME} messages.  The default is @code{epg}, but
12090 @code{pgg}, @code{mailcrypt}, and @code{gpg} are also supported
12091 although deprecated.  By default, Gnus uses the first available
12092 interface in this order.
12093
12094 @end table
12095
12096 By default the buttons that display security information are not
12097 shown, because they clutter reading the actual e-mail.  You can type
12098 @kbd{K b} manually to display the information.  Use the
12099 @code{gnus-buttonized-mime-types} and
12100 @code{gnus-unbuttonized-mime-types} variables to control this
12101 permanently.  @ref{MIME Commands} for further details, and hints on
12102 how to customize these variables to always display security
12103 information.
12104
12105 @cindex snarfing keys
12106 @cindex importing PGP keys
12107 @cindex PGP key ring import
12108 Snarfing OpenPGP keys (i.e., importing keys from articles into your
12109 key ring) is not supported explicitly through a menu item or command,
12110 rather Gnus do detect and label keys as @samp{application/pgp-keys},
12111 allowing you to specify whatever action you think is appropriate
12112 through the usual @acronym{MIME} infrastructure.  You can use a
12113 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
12114 Emacs MIME Manual}) such as the following to import keys using GNU
12115 Privacy Guard when you click on the @acronym{MIME} button
12116 (@pxref{Using MIME}).
12117
12118 @example
12119 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
12120 @end example
12121 @noindent
12122 This happens to also be the default action defined in
12123 @code{mailcap-mime-data}.
12124
12125 More information on how to set things for sending outgoing signed and
12126 encrypted messages up can be found in the message manual
12127 (@pxref{Security, ,Security, message, Message Manual}).
12128
12129 @node Mailing List
12130 @section Mailing List
12131 @cindex mailing list
12132 @cindex RFC 2396
12133
12134 @kindex A M (summary)
12135 @findex gnus-mailing-list-insinuate
12136 Gnus understands some mailing list fields of RFC 2369.  To enable it,
12137 add a @code{to-list} group parameter (@pxref{Group Parameters}),
12138 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
12139 summary buffer.
12140
12141 That enables the following commands to the summary buffer:
12142
12143 @table @kbd
12144
12145 @item C-c C-n h
12146 @kindex C-c C-n h (Summary)
12147 @findex gnus-mailing-list-help
12148 Send a message to fetch mailing list help, if List-Help field exists.
12149
12150 @item C-c C-n s
12151 @kindex C-c C-n s (Summary)
12152 @findex gnus-mailing-list-subscribe
12153 Send a message to subscribe the mailing list, if List-Subscribe field exists.
12154
12155 @item C-c C-n u
12156 @kindex C-c C-n u (Summary)
12157 @findex gnus-mailing-list-unsubscribe
12158 Send a message to unsubscribe the mailing list, if List-Unsubscribe
12159 field exists.
12160
12161 @item C-c C-n p
12162 @kindex C-c C-n p (Summary)
12163 @findex gnus-mailing-list-post
12164 Post to the mailing list, if List-Post field exists.
12165
12166 @item C-c C-n o
12167 @kindex C-c C-n o (Summary)
12168 @findex gnus-mailing-list-owner
12169 Send a message to the mailing list owner, if List-Owner field exists.
12170
12171 @item C-c C-n a
12172 @kindex C-c C-n a (Summary)
12173 @findex gnus-mailing-list-archive
12174 Browse the mailing list archive, if List-Archive field exists.
12175
12176 @end table
12177
12178
12179 @node Article Buffer
12180 @chapter Article Buffer
12181 @cindex article buffer
12182
12183 The articles are displayed in the article buffer, of which there is only
12184 one.  All the summary buffers share the same article buffer unless you
12185 tell Gnus otherwise.
12186
12187 @menu
12188 * Hiding Headers::              Deciding what headers should be displayed.
12189 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
12190 * HTML::                        Reading @acronym{HTML} messages.
12191 * Customizing Articles::        Tailoring the look of the articles.
12192 * Article Keymap::              Keystrokes available in the article buffer.
12193 * Misc Article::                Other stuff.
12194 @end menu
12195
12196
12197 @node Hiding Headers
12198 @section Hiding Headers
12199 @cindex hiding headers
12200 @cindex deleting headers
12201
12202 The top section of each article is the @dfn{head}.  (The rest is the
12203 @dfn{body}, but you may have guessed that already.)
12204
12205 @vindex gnus-show-all-headers
12206 There is a lot of useful information in the head: the name of the person
12207 who wrote the article, the date it was written and the subject of the
12208 article.  That's well and nice, but there's also lots of information
12209 most people do not want to see---what systems the article has passed
12210 through before reaching you, the @code{Message-ID}, the
12211 @code{References}, etc. ad nauseam---and you'll probably want to get rid
12212 of some of those lines.  If you want to keep all those lines in the
12213 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
12214
12215 Gnus provides you with two variables for sifting headers:
12216
12217 @table @code
12218
12219 @item gnus-visible-headers
12220 @vindex gnus-visible-headers
12221 If this variable is non-@code{nil}, it should be a regular expression
12222 that says what headers you wish to keep in the article buffer.  All
12223 headers that do not match this variable will be hidden.
12224
12225 For instance, if you only want to see the name of the person who wrote
12226 the article and the subject, you'd say:
12227
12228 @lisp
12229 (setq gnus-visible-headers "^From:\\|^Subject:")
12230 @end lisp
12231
12232 This variable can also be a list of regexps to match headers to
12233 remain visible.
12234
12235 @item gnus-ignored-headers
12236 @vindex gnus-ignored-headers
12237 This variable is the reverse of @code{gnus-visible-headers}.  If this
12238 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
12239 should be a regular expression that matches all lines that you want to
12240 hide.  All lines that do not match this variable will remain visible.
12241
12242 For instance, if you just want to get rid of the @code{References} line
12243 and the @code{Xref} line, you might say:
12244
12245 @lisp
12246 (setq gnus-ignored-headers "^References:\\|^Xref:")
12247 @end lisp
12248
12249 This variable can also be a list of regexps to match headers to
12250 be removed.
12251
12252 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
12253 variable will have no effect.
12254
12255 @end table
12256
12257 @vindex gnus-sorted-header-list
12258 Gnus can also sort the headers for you.  (It does this by default.)  You
12259 can control the sorting by setting the @code{gnus-sorted-header-list}
12260 variable.  It is a list of regular expressions that says in what order
12261 the headers are to be displayed.
12262
12263 For instance, if you want the name of the author of the article first,
12264 and then the subject, you might say something like:
12265
12266 @lisp
12267 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
12268 @end lisp
12269
12270 Any headers that are to remain visible, but are not listed in this
12271 variable, will be displayed in random order after all the headers listed in this variable.
12272
12273 @findex gnus-article-hide-boring-headers
12274 @vindex gnus-boring-article-headers
12275 You can hide further boring headers by setting
12276 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
12277 does depends on the @code{gnus-boring-article-headers} variable.  It's a
12278 list, but this list doesn't actually contain header names.  Instead it
12279 lists various @dfn{boring conditions} that Gnus can check and remove
12280 from sight.
12281
12282 These conditions are:
12283 @table @code
12284 @item empty
12285 Remove all empty headers.
12286 @item followup-to
12287 Remove the @code{Followup-To} header if it is identical to the
12288 @code{Newsgroups} header.
12289 @item reply-to
12290 Remove the @code{Reply-To} header if it lists the same addresses as
12291 the @code{From} header, or if the @code{broken-reply-to} group
12292 parameter is set.
12293 @item newsgroups
12294 Remove the @code{Newsgroups} header if it only contains the current group
12295 name.
12296 @item to-address
12297 Remove the @code{To} header if it only contains the address identical to
12298 the current group's @code{to-address} parameter.
12299 @item to-list
12300 Remove the @code{To} header if it only contains the address identical to
12301 the current group's @code{to-list} parameter.
12302 @item cc-list
12303 Remove the @code{Cc} header if it only contains the address identical to
12304 the current group's @code{to-list} parameter.
12305 @item date
12306 Remove the @code{Date} header if the article is less than three days
12307 old.
12308 @item long-to
12309 Remove the @code{To} and/or @code{Cc} header if it is very long.
12310 @item many-to
12311 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
12312 @end table
12313
12314 To include these three elements, you could say something like:
12315
12316 @lisp
12317 (setq gnus-boring-article-headers
12318       '(empty followup-to reply-to))
12319 @end lisp
12320
12321 This is also the default value for this variable.
12322
12323
12324 @node Using MIME
12325 @section Using MIME
12326 @cindex @acronym{MIME}
12327
12328 Mime is a standard for waving your hands through the air, aimlessly,
12329 while people stand around yawning.
12330
12331 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
12332 while all newsreaders die of fear.
12333
12334 @acronym{MIME} may specify what character set the article uses, the encoding
12335 of the characters, and it also makes it possible to embed pictures and
12336 other naughty stuff in innocent-looking articles.
12337
12338 @vindex gnus-display-mime-function
12339 @findex gnus-display-mime
12340 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
12341 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
12342 default, which creates a bundle of clickable buttons that can be used to
12343 display, save and manipulate the @acronym{MIME} objects.
12344
12345 The following commands are available when you have placed point over a
12346 @acronym{MIME} button:
12347
12348 @table @kbd
12349 @findex gnus-article-press-button
12350 @item RET (Article)
12351 @kindex RET (Article)
12352 @itemx BUTTON-2 (Article)
12353 Toggle displaying of the @acronym{MIME} object
12354 (@code{gnus-article-press-button}).  If built-in viewers can not display
12355 the object, Gnus resorts to external viewers in the @file{mailcap}
12356 files.  If a viewer has the @samp{copiousoutput} specification, the
12357 object is displayed inline.
12358
12359 @findex gnus-mime-view-part
12360 @item M-RET (Article)
12361 @kindex M-RET (Article)
12362 @itemx v (Article)
12363 Prompt for a method, and then view the @acronym{MIME} object using this
12364 method (@code{gnus-mime-view-part}).
12365
12366 @findex gnus-mime-view-part-as-type
12367 @item t (Article)
12368 @kindex t (Article)
12369 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
12370 (@code{gnus-mime-view-part-as-type}).
12371
12372 @findex gnus-mime-view-part-as-charset
12373 @item C (Article)
12374 @kindex C (Article)
12375 Prompt for a charset, and then view the @acronym{MIME} object using this
12376 charset (@code{gnus-mime-view-part-as-charset}).
12377
12378 @findex gnus-mime-save-part
12379 @item o (Article)
12380 @kindex o (Article)
12381 Prompt for a file name, and then save the @acronym{MIME} object
12382 (@code{gnus-mime-save-part}).
12383
12384 @findex gnus-mime-save-part-and-strip
12385 @item C-o (Article)
12386 @kindex C-o (Article)
12387 Prompt for a file name, then save the @acronym{MIME} object and strip it from
12388 the article.  Then proceed to article editing, where a reasonable
12389 suggestion is being made on how the altered article should look
12390 like.  The stripped @acronym{MIME} object will be referred via the
12391 message/external-body @acronym{MIME} type.
12392 (@code{gnus-mime-save-part-and-strip}).
12393
12394 @findex gnus-mime-replace-part
12395 @item r (Article)
12396 @kindex r (Article)
12397 Prompt for a file name, replace the @acronym{MIME} object with an
12398 external body refering to the file via the message/external-body
12399 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
12400
12401 @findex gnus-mime-delete-part
12402 @item d (Article)
12403 @kindex d (Article)
12404 Delete the @acronym{MIME} object from the article and replace it with some
12405 information about the removed @acronym{MIME} object
12406 (@code{gnus-mime-delete-part}).
12407
12408 @c FIXME: gnus-auto-select-part should be documented here
12409
12410 @findex gnus-mime-copy-part
12411 @item c (Article)
12412 @kindex c (Article)
12413 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
12414 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
12415 without decoding.  If given a numerical prefix, you can do semi-manual
12416 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
12417 @ref{Paging the Article}).  Compressed files like @file{.gz} and
12418 @file{.bz2} are automatically decompressed if
12419 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
12420 Accessing Compressed Files, emacs, The Emacs Editor}).
12421
12422 @findex gnus-mime-print-part
12423 @item p (Article)
12424 @kindex p (Article)
12425 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
12426 command respects the @samp{print=} specifications in the
12427 @file{.mailcap} file.
12428
12429 @findex gnus-mime-inline-part
12430 @item i (Article)
12431 @kindex i (Article)
12432 Insert the contents of the @acronym{MIME} object into the buffer
12433 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
12434 the raw contents without decoding.  If given a numerical prefix, you can
12435 do semi-manual charset stuff (see
12436 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
12437 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
12438 automatically decompressed depending on @code{jka-compr} regardless of
12439 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
12440 Compressed Files, emacs, The Emacs Editor}).
12441
12442 @findex gnus-mime-view-part-internally
12443 @item E (Article)
12444 @kindex E (Article)
12445 View the @acronym{MIME} object with an internal viewer.  If no internal
12446 viewer is available, use an external viewer
12447 (@code{gnus-mime-view-part-internally}).
12448
12449 @findex gnus-mime-view-part-externally
12450 @item e (Article)
12451 @kindex e (Article)
12452 View the @acronym{MIME} object with an external viewer.
12453 (@code{gnus-mime-view-part-externally}).
12454
12455 @findex gnus-mime-pipe-part
12456 @item | (Article)
12457 @kindex | (Article)
12458 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
12459
12460 @findex gnus-mime-action-on-part
12461 @item . (Article)
12462 @kindex . (Article)
12463 Interactively run an action on the @acronym{MIME} object
12464 (@code{gnus-mime-action-on-part}).
12465
12466 @end table
12467
12468 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
12469 determines which parts to do this with is described in the Emacs
12470 @acronym{MIME} manual.
12471
12472 It might be best to just use the toggling functions from the article
12473 buffer to avoid getting nasty surprises.  (For instance, you enter the
12474 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
12475 decoded the sound file in the article and some horrible sing-a-long song
12476 comes screaming out your speakers, and you can't find the volume button,
12477 because there isn't one, and people are starting to look at you, and you
12478 try to stop the program, but you can't, and you can't find the program
12479 to control the volume, and everybody else in the room suddenly decides
12480 to look at you disdainfully, and you'll feel rather stupid.)
12481
12482 Any similarity to real events and people is purely coincidental.  Ahem.
12483
12484 Also @pxref{MIME Commands}.
12485
12486
12487 @node HTML
12488 @section @acronym{HTML}
12489 @cindex @acronym{HTML}
12490
12491 If you have @code{w3m} installed on your system, Gnus can display
12492 @acronym{HTML} articles in the article buffer.  There are many Gnus
12493 add-ons for doing this, using various approaches, but there's one
12494 (sort of) built-in method that's used by default.
12495
12496 For a complete overview, consult @xref{Display Customization,
12497 ,Display Customization, emacs-mime, The Emacs MIME Manual}.  This
12498 section only describes the default method.
12499
12500 @table @code
12501 @item mm-text-html-renderer
12502 @vindex mm-text-html-renderer
12503 If set to @code{gnus-article-html}, Gnus will use the built-in method,
12504 that's based on @code{curl} and @code{w3m}.
12505
12506 @item gnus-html-cache-directory
12507 @vindex gnus-html-cache-directory
12508 Gnus will download and cache images according to how
12509 @code{mm-w3m-safe-url-regexp} is set.  These images will be stored in
12510 this directory.
12511
12512 @item gnus-html-cache-size
12513 @vindex gnus-html-cache-size
12514 When @code{gnus-html-cache-size} bytes have been used in that
12515 directory, the oldest files will be deleted.  The default is 500MB.
12516
12517 @item gnus-html-frame-width
12518 @vindex gnus-html-frame-width
12519 The width to use when rendering HTML.  The default is 70.
12520
12521 @end table
12522
12523 To use this, make sure that you have @code{w3m} and @code{curl}
12524 installed.  If you have, then Gnus should display @acronym{HTML}
12525 automatically. 
12526
12527
12528
12529 @node Customizing Articles
12530 @section Customizing Articles
12531 @cindex article customization
12532
12533 A slew of functions for customizing how the articles are to look like
12534 exist.  You can call these functions interactively
12535 (@pxref{Article Washing}), or you can have them
12536 called automatically when you select the articles.
12537
12538 To have them called automatically, you should set the corresponding
12539 ``treatment'' variable.  For instance, to have headers hidden, you'd set
12540 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
12541 be set, but first we discuss the values these variables can have.
12542
12543 Note: Some values, while valid, make little sense.  Check the list below
12544 for sensible values.
12545
12546 @enumerate
12547 @item
12548 @code{nil}: Don't do this treatment.
12549
12550 @item
12551 @code{t}: Do this treatment on all body parts.
12552
12553 @item
12554 @code{head}: Do the treatment on the headers.
12555
12556 @item
12557 @code{first}: Do this treatment on the first body part.
12558
12559 @item
12560 @code{last}: Do this treatment on the last body part.
12561
12562 @item
12563 An integer: Do this treatment on all body parts that have a length less
12564 than this number.
12565
12566 @item
12567 A list of strings: Do this treatment on all body parts that are in
12568 articles that are read in groups that have names that match one of the
12569 regexps in the list.
12570
12571 @item
12572 A list where the first element is not a string:
12573
12574 The list is evaluated recursively.  The first element of the list is a
12575 predicate.  The following predicates are recognized: @code{or},
12576 @code{and}, @code{not} and @code{typep}.  Here's an example:
12577
12578 @lisp
12579 (or last
12580     (typep "text/x-vcard"))
12581 @end lisp
12582
12583 @end enumerate
12584
12585 You may have noticed that the word @dfn{part} is used here.  This refers
12586 to the fact that some messages are @acronym{MIME} multipart articles that may
12587 be divided into several parts.  Articles that are not multiparts are
12588 considered to contain just a single part.
12589
12590 @vindex gnus-article-treat-types
12591 Are the treatments applied to all sorts of multipart parts?  Yes, if you
12592 want to, but by default, only @samp{text/plain} parts are given the
12593 treatment.  This is controlled by the @code{gnus-article-treat-types}
12594 variable, which is a list of regular expressions that are matched to the
12595 type of the part.  This variable is ignored if the value of the
12596 controlling variable is a predicate list, as described above.
12597
12598 @ifinfo
12599 @c Avoid sort of redundant entries in the same section for the printed
12600 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
12601 @c `i foo-bar'.
12602 @vindex gnus-treat-buttonize
12603 @vindex gnus-treat-buttonize-head
12604 @vindex gnus-treat-capitalize-sentences
12605 @vindex gnus-treat-overstrike
12606 @vindex gnus-treat-strip-cr
12607 @vindex gnus-treat-strip-headers-in-body
12608 @vindex gnus-treat-strip-leading-blank-lines
12609 @vindex gnus-treat-strip-multiple-blank-lines
12610 @vindex gnus-treat-strip-pem
12611 @vindex gnus-treat-strip-trailing-blank-lines
12612 @vindex gnus-treat-unsplit-urls
12613 @vindex gnus-treat-wash-html
12614 @vindex gnus-treat-date-english
12615 @vindex gnus-treat-date-iso8601
12616 @vindex gnus-treat-date-lapsed
12617 @vindex gnus-treat-date-local
12618 @vindex gnus-treat-date-original
12619 @vindex gnus-treat-date-user-defined
12620 @vindex gnus-treat-date-ut
12621 @vindex gnus-treat-from-picon
12622 @vindex gnus-treat-mail-picon
12623 @vindex gnus-treat-newsgroups-picon
12624 @vindex gnus-treat-display-smileys
12625 @vindex gnus-treat-body-boundary
12626 @vindex gnus-treat-display-x-face
12627 @vindex gnus-treat-display-face
12628 @vindex gnus-treat-emphasize
12629 @vindex gnus-treat-fill-article
12630 @vindex gnus-treat-fill-long-lines
12631 @vindex gnus-treat-hide-boring-headers
12632 @vindex gnus-treat-hide-citation
12633 @vindex gnus-treat-hide-citation-maybe
12634 @vindex gnus-treat-hide-headers
12635 @vindex gnus-treat-hide-signature
12636 @vindex gnus-treat-strip-banner
12637 @vindex gnus-treat-strip-list-identifiers
12638 @vindex gnus-treat-highlight-citation
12639 @vindex gnus-treat-highlight-headers
12640 @vindex gnus-treat-highlight-signature
12641 @vindex gnus-treat-play-sounds
12642 @vindex gnus-treat-translate
12643 @vindex gnus-treat-x-pgp-sig
12644 @vindex gnus-treat-unfold-headers
12645 @vindex gnus-treat-fold-headers
12646 @vindex gnus-treat-fold-newsgroups
12647 @vindex gnus-treat-leading-whitespace
12648 @end ifinfo
12649
12650 The following treatment options are available.  The easiest way to
12651 customize this is to examine the @code{gnus-article-treat} customization
12652 group.  Values in parenthesis are suggested sensible values.  Others are
12653 possible but those listed are probably sufficient for most people.
12654
12655 @table @code
12656 @item gnus-treat-buttonize (t, integer)
12657 @item gnus-treat-buttonize-head (head)
12658
12659 @xref{Article Buttons}.
12660
12661 @item gnus-treat-capitalize-sentences (t, integer)
12662 @item gnus-treat-overstrike (t, integer)
12663 @item gnus-treat-strip-cr (t, integer)
12664 @item gnus-treat-strip-headers-in-body (t, integer)
12665 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
12666 @item gnus-treat-strip-multiple-blank-lines (t, integer)
12667 @item gnus-treat-strip-pem (t, last, integer)
12668 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
12669 @item gnus-treat-unsplit-urls (t, integer)
12670 @item gnus-treat-wash-html (t, integer)
12671
12672 @xref{Article Washing}.
12673
12674 @item gnus-treat-date-english (head)
12675 @item gnus-treat-date-iso8601 (head)
12676 @item gnus-treat-date-lapsed (head)
12677 @item gnus-treat-date-local (head)
12678 @item gnus-treat-date-original (head)
12679 @item gnus-treat-date-user-defined (head)
12680 @item gnus-treat-date-ut (head)
12681
12682 @xref{Article Date}.
12683
12684 @item gnus-treat-from-picon (head)
12685 @item gnus-treat-mail-picon (head)
12686 @item gnus-treat-newsgroups-picon (head)
12687
12688 @xref{Picons}.
12689
12690 @item gnus-treat-display-smileys (t, integer)
12691
12692 @item gnus-treat-body-boundary (head)
12693
12694 @vindex gnus-body-boundary-delimiter
12695 Adds a delimiter between header and body, the string used as delimiter
12696 is controlled by @code{gnus-body-boundary-delimiter}.
12697
12698 @xref{Smileys}.
12699
12700 @vindex gnus-treat-display-x-face
12701 @item gnus-treat-display-x-face (head)
12702
12703 @xref{X-Face}.
12704
12705 @vindex gnus-treat-display-face
12706 @item gnus-treat-display-face (head)
12707
12708 @xref{Face}.
12709
12710 @vindex gnus-treat-emphasize
12711 @item gnus-treat-emphasize (t, head, integer)
12712 @vindex gnus-treat-fill-article
12713 @item gnus-treat-fill-article (t, integer)
12714 @vindex gnus-treat-fill-long-lines
12715 @item gnus-treat-fill-long-lines (t, integer)
12716 @vindex gnus-treat-hide-boring-headers
12717 @item gnus-treat-hide-boring-headers (head)
12718 @vindex gnus-treat-hide-citation
12719 @item gnus-treat-hide-citation (t, integer)
12720 @vindex gnus-treat-hide-citation-maybe
12721 @item gnus-treat-hide-citation-maybe (t, integer)
12722 @vindex gnus-treat-hide-headers
12723 @item gnus-treat-hide-headers (head)
12724 @vindex gnus-treat-hide-signature
12725 @item gnus-treat-hide-signature (t, last)
12726 @vindex gnus-treat-strip-banner
12727 @item gnus-treat-strip-banner (t, last)
12728 @vindex gnus-treat-strip-list-identifiers
12729 @item gnus-treat-strip-list-identifiers (head)
12730
12731 @xref{Article Hiding}.
12732
12733 @vindex gnus-treat-highlight-citation
12734 @item gnus-treat-highlight-citation (t, integer)
12735 @vindex gnus-treat-highlight-headers
12736 @item gnus-treat-highlight-headers (head)
12737 @vindex gnus-treat-highlight-signature
12738 @item gnus-treat-highlight-signature (t, last, integer)
12739
12740 @xref{Article Highlighting}.
12741
12742 @vindex gnus-treat-play-sounds
12743 @item gnus-treat-play-sounds
12744 @vindex gnus-treat-translate
12745 @item gnus-treat-translate
12746 @item gnus-treat-ansi-sequences (t)
12747 @vindex gnus-treat-x-pgp-sig
12748 @item gnus-treat-x-pgp-sig (head)
12749
12750 @vindex gnus-treat-unfold-headers
12751 @item gnus-treat-unfold-headers (head)
12752 @vindex gnus-treat-fold-headers
12753 @item gnus-treat-fold-headers (head)
12754 @vindex gnus-treat-fold-newsgroups
12755 @item gnus-treat-fold-newsgroups (head)
12756 @vindex gnus-treat-leading-whitespace
12757 @item gnus-treat-leading-whitespace (head)
12758
12759 @xref{Article Header}.
12760
12761
12762 @end table
12763
12764 @vindex gnus-part-display-hook
12765 You can, of course, write your own functions to be called from
12766 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12767 part, and you can do anything you like, pretty much.  There is no
12768 information that you have to keep in the buffer---you can change
12769 everything.
12770
12771
12772 @node Article Keymap
12773 @section Article Keymap
12774
12775 Most of the keystrokes in the summary buffer can also be used in the
12776 article buffer.  They should behave as if you typed them in the summary
12777 buffer, which means that you don't actually have to have a summary
12778 buffer displayed while reading.  You can do it all from the article
12779 buffer.
12780
12781 @kindex v (Article)
12782 @cindex keys, reserved for users (Article)
12783 The key @kbd{v} is reserved for users.  You can bind it to some
12784 command or better use it as a prefix key.
12785
12786 A few additional keystrokes are available:
12787
12788 @table @kbd
12789
12790 @item SPACE
12791 @kindex SPACE (Article)
12792 @findex gnus-article-next-page
12793 Scroll forwards one page (@code{gnus-article-next-page}).
12794 This is exactly the same as @kbd{h SPACE h}.
12795
12796 @item DEL
12797 @kindex DEL (Article)
12798 @findex gnus-article-prev-page
12799 Scroll backwards one page (@code{gnus-article-prev-page}).
12800 This is exactly the same as @kbd{h DEL h}.
12801
12802 @item C-c ^
12803 @kindex C-c ^ (Article)
12804 @findex gnus-article-refer-article
12805 If point is in the neighborhood of a @code{Message-ID} and you press
12806 @kbd{C-c ^}, Gnus will try to get that article from the server
12807 (@code{gnus-article-refer-article}).
12808
12809 @item C-c C-m
12810 @kindex C-c C-m (Article)
12811 @findex gnus-article-mail
12812 Send a reply to the address near point (@code{gnus-article-mail}).  If
12813 given a prefix, include the mail.
12814
12815 @item s
12816 @kindex s (Article)
12817 @findex gnus-article-show-summary
12818 Reconfigure the buffers so that the summary buffer becomes visible
12819 (@code{gnus-article-show-summary}).
12820
12821 @item ?
12822 @kindex ? (Article)
12823 @findex gnus-article-describe-briefly
12824 Give a very brief description of the available keystrokes
12825 (@code{gnus-article-describe-briefly}).
12826
12827 @item TAB
12828 @kindex TAB (Article)
12829 @findex gnus-article-next-button
12830 Go to the next button, if any (@code{gnus-article-next-button}).  This
12831 only makes sense if you have buttonizing turned on.
12832
12833 @item M-TAB
12834 @kindex M-TAB (Article)
12835 @findex gnus-article-prev-button
12836 Go to the previous button, if any (@code{gnus-article-prev-button}).
12837
12838 @item R
12839 @kindex R (Article)
12840 @findex gnus-article-reply-with-original
12841 Send a reply to the current article and yank the current article
12842 (@code{gnus-article-reply-with-original}).  If the region is active,
12843 only yank the text in the region.
12844
12845 @item S W
12846 @kindex S W (Article)
12847 @findex gnus-article-wide-reply-with-original
12848 Send a wide reply to the current article and yank the current article
12849 (@code{gnus-article-wide-reply-with-original}).  If the region is
12850 active, only yank the text in the region.
12851
12852 @item F
12853 @kindex F (Article)
12854 @findex gnus-article-followup-with-original
12855 Send a followup to the current article and yank the current article
12856 (@code{gnus-article-followup-with-original}).  If the region is active,
12857 only yank the text in the region.
12858
12859
12860 @end table
12861
12862
12863 @node Misc Article
12864 @section Misc Article
12865
12866 @table @code
12867
12868 @item gnus-single-article-buffer
12869 @vindex gnus-single-article-buffer
12870 @cindex article buffers, several
12871 If non-@code{nil}, use the same article buffer for all the groups.
12872 (This is the default.)  If @code{nil}, each group will have its own
12873 article buffer.
12874
12875 @vindex gnus-article-decode-hook
12876 @item gnus-article-decode-hook
12877 @cindex @acronym{MIME}
12878 Hook used to decode @acronym{MIME} articles.  The default value is
12879 @code{(article-decode-charset article-decode-encoded-words)}
12880
12881 @vindex gnus-article-prepare-hook
12882 @item gnus-article-prepare-hook
12883 This hook is called right after the article has been inserted into the
12884 article buffer.  It is mainly intended for functions that do something
12885 depending on the contents; it should probably not be used for changing
12886 the contents of the article buffer.
12887
12888 @item gnus-article-mode-hook
12889 @vindex gnus-article-mode-hook
12890 Hook called in article mode buffers.
12891
12892 @item gnus-article-mode-syntax-table
12893 @vindex gnus-article-mode-syntax-table
12894 Syntax table used in article buffers.  It is initialized from
12895 @code{text-mode-syntax-table}.
12896
12897 @vindex gnus-article-over-scroll
12898 @item gnus-article-over-scroll
12899 If non-@code{nil}, allow scrolling the article buffer even when there
12900 no more new text to scroll in.  The default is @code{nil}.
12901
12902 @vindex gnus-article-mode-line-format
12903 @item gnus-article-mode-line-format
12904 This variable is a format string along the same lines as
12905 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12906 Line}).  It accepts the same format specifications as that variable,
12907 with two extensions:
12908
12909 @table @samp
12910
12911 @item w
12912 The @dfn{wash status} of the article.  This is a short string with one
12913 character for each possible article wash operation that may have been
12914 performed.  The characters and their meaning:
12915
12916 @table @samp
12917
12918 @item c
12919 Displayed when cited text may be hidden in the article buffer.
12920
12921 @item h
12922 Displayed when headers are hidden in the article buffer.
12923
12924 @item p
12925 Displayed when article is digitally signed or encrypted, and Gnus has
12926 hidden the security headers.  (N.B. does not tell anything about
12927 security status, i.e. good or bad signature.)
12928
12929 @item s
12930 Displayed when the signature has been hidden in the Article buffer.
12931
12932 @item o
12933 Displayed when Gnus has treated overstrike characters in the article buffer.
12934
12935 @item e
12936 Displayed when Gnus has treated emphasized strings in the article buffer.
12937
12938 @end table
12939
12940 @item m
12941 The number of @acronym{MIME} parts in the article.
12942
12943 @end table
12944
12945 @vindex gnus-break-pages
12946
12947 @item gnus-break-pages
12948 Controls whether @dfn{page breaking} is to take place.  If this variable
12949 is non-@code{nil}, the articles will be divided into pages whenever a
12950 page delimiter appears in the article.  If this variable is @code{nil},
12951 paging will not be done.
12952
12953 @item gnus-page-delimiter
12954 @vindex gnus-page-delimiter
12955 This is the delimiter mentioned above.  By default, it is @samp{^L}
12956 (formfeed).
12957
12958 @cindex IDNA
12959 @cindex internationalized domain names
12960 @vindex gnus-use-idna
12961 @item gnus-use-idna
12962 This variable controls whether Gnus performs IDNA decoding of
12963 internationalized domain names inside @samp{From}, @samp{To} and
12964 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12965 for how to compose such messages.  This requires
12966 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12967 variable is only enabled if you have installed it.
12968
12969 @end table
12970
12971
12972 @node Composing Messages
12973 @chapter Composing Messages
12974 @cindex composing messages
12975 @cindex messages
12976 @cindex mail
12977 @cindex sending mail
12978 @cindex reply
12979 @cindex followup
12980 @cindex post
12981 @cindex using gpg
12982 @cindex using s/mime
12983 @cindex using smime
12984
12985 @kindex C-c C-c (Post)
12986 All commands for posting and mailing will put you in a message buffer
12987 where you can edit the article all you like, before you send the
12988 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12989 Message Manual}.  Where the message will be posted/mailed to depends
12990 on your setup (@pxref{Posting Server}).
12991
12992 @menu
12993 * Mail::                        Mailing and replying.
12994 * Posting Server::              What server should you post and mail via?
12995 * POP before SMTP::             You cannot send a mail unless you read a mail.
12996 * Mail and Post::               Mailing and posting at the same time.
12997 * Archived Messages::           Where Gnus stores the messages you've sent.
12998 * Posting Styles::              An easier way to specify who you are.
12999 * Drafts::                      Postponing messages and rejected messages.
13000 * Rejected Articles::           What happens if the server doesn't like your article?
13001 * Signing and encrypting::      How to compose secure messages.
13002 @end menu
13003
13004 Also @pxref{Canceling and Superseding} for information on how to
13005 remove articles you shouldn't have posted.
13006
13007
13008 @node Mail
13009 @section Mail
13010
13011 Variables for customizing outgoing mail:
13012
13013 @table @code
13014 @item gnus-uu-digest-headers
13015 @vindex gnus-uu-digest-headers
13016 List of regexps to match headers included in digested messages.  The
13017 headers will be included in the sequence they are matched.  If
13018 @code{nil} include all headers.
13019
13020 @item gnus-add-to-list
13021 @vindex gnus-add-to-list
13022 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
13023 that have none when you do a @kbd{a}.
13024
13025 @item gnus-confirm-mail-reply-to-news
13026 @vindex gnus-confirm-mail-reply-to-news
13027 If non-@code{nil}, Gnus will ask you for a confirmation when you are
13028 about to reply to news articles by mail.  If it is @code{nil}, nothing
13029 interferes in what you want to do.  This can also be a function
13030 receiving the group name as the only parameter which should return
13031 non-@code{nil} if a confirmation is needed, or a regular expression
13032 matching group names, where confirmation should be asked for.
13033
13034 If you find yourself never wanting to reply to mail, but occasionally
13035 press @kbd{R} anyway, this variable might be for you.
13036
13037 @item gnus-confirm-treat-mail-like-news
13038 @vindex gnus-confirm-treat-mail-like-news
13039 If non-@code{nil}, Gnus also requests confirmation according to
13040 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
13041 useful for treating mailing lists like newsgroups.
13042
13043 @end table
13044
13045
13046 @node Posting Server
13047 @section Posting Server
13048
13049 When you press those magical @kbd{C-c C-c} keys to ship off your latest
13050 (extremely intelligent, of course) article, where does it go?
13051
13052 Thank you for asking.  I hate you.
13053
13054 It can be quite complicated.
13055
13056 @vindex gnus-post-method
13057 When posting news, Message usually invokes @code{message-send-news}
13058 (@pxref{News Variables, , News Variables, message, Message Manual}).
13059 Normally, Gnus will post using the same select method as you're
13060 reading from (which might be convenient if you're reading lots of
13061 groups from different private servers).  However.  If the server
13062 you're reading from doesn't allow posting, just reading, you probably
13063 want to use some other server to post your (extremely intelligent and
13064 fabulously interesting) articles.  You can then set the
13065 @code{gnus-post-method} to some other method:
13066
13067 @lisp
13068 (setq gnus-post-method '(nnspool ""))
13069 @end lisp
13070
13071 Now, if you've done this, and then this server rejects your article, or
13072 this server is down, what do you do then?  To override this variable you
13073 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
13074 the ``current'' server, to get back the default behavior, for posting.
13075
13076 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
13077 Gnus will prompt you for what method to use for posting.
13078
13079 You can also set @code{gnus-post-method} to a list of select methods.
13080 If that's the case, Gnus will always prompt you for what method to use
13081 for posting.
13082
13083 Finally, if you want to always post using the native select method,
13084 you can set this variable to @code{native}.
13085
13086 @vindex message-send-mail-function
13087 When sending mail, Message invokes the function specified by the
13088 variable @code{message-send-mail-function}.  Gnus tries to set it to a
13089 value suitable for your system.
13090 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
13091 information.
13092
13093 @node POP before SMTP
13094 @section POP before SMTP
13095 @cindex pop before smtp
13096 @findex message-smtpmail-send-it
13097 @findex mail-source-touch-pop
13098
13099 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
13100 authentication?  It is whether you need to connect to the @acronym{POP}
13101 mail server within a certain time before sending mails.  If so, there is
13102 a convenient way.  To do that, put the following lines in your
13103 @file{~/.gnus.el} file:
13104
13105 @lisp
13106 (setq message-send-mail-function 'message-smtpmail-send-it)
13107 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
13108 @end lisp
13109
13110 @noindent
13111 It means to let Gnus connect to the @acronym{POP} mail server in advance
13112 whenever you send a mail.  The @code{mail-source-touch-pop} function
13113 does only a @acronym{POP} authentication according to the value of
13114 @code{mail-sources} without fetching mails, just before sending a mail.
13115 Note that you have to use @code{message-smtpmail-send-it} which runs
13116 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
13117 set the value of @code{mail-sources} for a @acronym{POP} connection
13118 correctly.  @xref{Mail Sources}.
13119
13120 If you have two or more @acronym{POP} mail servers set in
13121 @code{mail-sources}, you may want to specify one of them to
13122 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
13123 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
13124 is your primary @acronym{POP} mail server (i.e., you are fetching mails
13125 mainly from that server), you can set it permanently as follows:
13126
13127 @lisp
13128 (setq mail-source-primary-source
13129       '(pop :server "pop3.mail.server"
13130             :password "secret"))
13131 @end lisp
13132
13133 @noindent
13134 Otherwise, bind it dynamically only when performing the
13135 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
13136
13137 @lisp
13138 (add-hook 'message-send-mail-hook
13139           (lambda ()
13140             (let ((mail-source-primary-source
13141                    '(pop :server "pop3.mail.server"
13142                          :password "secret")))
13143               (mail-source-touch-pop))))
13144 @end lisp
13145
13146 @node Mail and Post
13147 @section Mail and Post
13148
13149 Here's a list of variables relevant to both mailing and
13150 posting:
13151
13152 @table @code
13153 @item gnus-mailing-list-groups
13154 @findex gnus-mailing-list-groups
13155 @cindex mailing lists
13156
13157 If your news server offers groups that are really mailing lists
13158 gatewayed to the @acronym{NNTP} server, you can read those groups without
13159 problems, but you can't post/followup to them without some difficulty.
13160 One solution is to add a @code{to-address} to the group parameters
13161 (@pxref{Group Parameters}).  An easier thing to do is set the
13162 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
13163 really are mailing lists.  Then, at least, followups to the mailing
13164 lists will work most of the time.  Posting to these groups (@kbd{a}) is
13165 still a pain, though.
13166
13167 @item gnus-user-agent
13168 @vindex gnus-user-agent
13169 @cindex User-Agent
13170
13171 This variable controls which information should be exposed in the
13172 User-Agent header.  It can be a list of symbols or a string.  Valid
13173 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
13174 version).  In addition to the Emacs version, you can add @code{codename}
13175 (show (S)XEmacs codename) or either @code{config} (show system
13176 configuration) or @code{type} (show system type).  If you set it to a
13177 string, be sure to use a valid format, see RFC 2616.
13178
13179 @end table
13180
13181 You may want to do spell-checking on messages that you send out.  Or, if
13182 you don't want to spell-check by hand, you could add automatic
13183 spell-checking via the @code{ispell} package:
13184
13185 @cindex ispell
13186 @findex ispell-message
13187 @lisp
13188 (add-hook 'message-send-hook 'ispell-message)
13189 @end lisp
13190
13191 If you want to change the @code{ispell} dictionary based on what group
13192 you're in, you could say something like the following:
13193
13194 @lisp
13195 (add-hook 'gnus-select-group-hook
13196           (lambda ()
13197             (cond
13198              ((string-match
13199                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
13200               (ispell-change-dictionary "deutsch"))
13201              (t
13202               (ispell-change-dictionary "english")))))
13203 @end lisp
13204
13205 Modify to suit your needs.
13206
13207 @vindex gnus-message-highlight-citation
13208 If @code{gnus-message-highlight-citation} is t, different levels of
13209 citations are highlighted like in Gnus article buffers also in message
13210 mode buffers.
13211
13212 @node Archived Messages
13213 @section Archived Messages
13214 @cindex archived messages
13215 @cindex sent messages
13216
13217 Gnus provides a few different methods for storing the mail and news you
13218 send.  The default method is to use the @dfn{archive virtual server} to
13219 store the messages.  If you want to disable this completely, the
13220 @code{gnus-message-archive-group} variable should be @code{nil}, which
13221 is the default.
13222
13223 For archiving interesting messages in a group you read, see the
13224 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
13225 Group Commands}).
13226
13227 @vindex gnus-message-archive-method
13228 @code{gnus-message-archive-method} says what virtual server Gnus is to
13229 use to store sent messages.  The default is @code{"archive"}, and when
13230 actually being used it is expanded into:
13231
13232 @lisp
13233 (nnfolder "archive"
13234           (nnfolder-directory   "~/Mail/archive")
13235           (nnfolder-active-file "~/Mail/archive/active")
13236           (nnfolder-get-new-mail nil)
13237           (nnfolder-inhibit-expiry t))
13238 @end lisp
13239
13240 @quotation
13241 @vindex gnus-update-message-archive-method
13242 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
13243 so that it may be used as a real method of the server which is named
13244 @code{"archive"} (that is, for the case where
13245 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
13246 since.  If it once has been saved, it will never be updated by default
13247 even if you change the value of @code{gnus-message-archive-method}
13248 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
13249 mean the @code{nnfolder} server like this at all times.  If you want the
13250 saved method to reflect always the value of
13251 @code{gnus-message-archive-method}, set the
13252 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
13253 value.  The default value of this variable is @code{nil}.
13254 @end quotation
13255
13256 You can, however, use any mail select method (@code{nnml},
13257 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
13258 for doing this sort of thing, though.  If you don't like the default
13259 directory chosen, you could say something like:
13260
13261 @lisp
13262 (setq gnus-message-archive-method
13263       '(nnfolder "archive"
13264                  (nnfolder-inhibit-expiry t)
13265                  (nnfolder-active-file "~/News/sent-mail/active")
13266                  (nnfolder-directory "~/News/sent-mail/")))
13267 @end lisp
13268
13269 @vindex gnus-message-archive-group
13270 @cindex Gcc
13271 Gnus will insert @code{Gcc} headers in all outgoing messages that point
13272 to one or more group(s) on that server.  Which group to use is
13273 determined by the @code{gnus-message-archive-group} variable.
13274
13275 This variable can be used to do the following:
13276
13277 @table @asis
13278 @item a string
13279 Messages will be saved in that group.
13280
13281 Note that you can include a select method in the group name, then the
13282 message will not be stored in the select method given by
13283 @code{gnus-message-archive-method}, but in the select method specified
13284 by the group name, instead.  Suppose @code{gnus-message-archive-method}
13285 has the default value shown above.  Then setting
13286 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
13287 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
13288 value @code{"nnml:foo"}, then outgoing messages will be stored in
13289 @samp{nnml:foo}.
13290
13291 @item a list of strings
13292 Messages will be saved in all those groups.
13293
13294 @item an alist of regexps, functions and forms
13295 When a key ``matches'', the result is used.
13296
13297 @item @code{nil}
13298 No message archiving will take place.  This is the default.
13299 @end table
13300
13301 Let's illustrate:
13302
13303 Just saving to a single group called @samp{MisK}:
13304 @lisp
13305 (setq gnus-message-archive-group "MisK")
13306 @end lisp
13307
13308 Saving to two groups, @samp{MisK} and @samp{safe}:
13309 @lisp
13310 (setq gnus-message-archive-group '("MisK" "safe"))
13311 @end lisp
13312
13313 Save to different groups based on what group you are in:
13314 @lisp
13315 (setq gnus-message-archive-group
13316       '(("^alt" "sent-to-alt")
13317         ("mail" "sent-to-mail")
13318         (".*" "sent-to-misc")))
13319 @end lisp
13320
13321 More complex stuff:
13322 @lisp
13323 (setq gnus-message-archive-group
13324       '((if (message-news-p)
13325             "misc-news"
13326           "misc-mail")))
13327 @end lisp
13328
13329 How about storing all news messages in one file, but storing all mail
13330 messages in one file per month:
13331
13332 @lisp
13333 (setq gnus-message-archive-group
13334       '((if (message-news-p)
13335             "misc-news"
13336           (concat "mail." (format-time-string "%Y-%m")))))
13337 @end lisp
13338
13339 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
13340 @c use a different value for @code{gnus-message-archive-group} there.)
13341
13342 Now, when you send a message off, it will be stored in the appropriate
13343 group.  (If you want to disable storing for just one particular message,
13344 you can just remove the @code{Gcc} header that has been inserted.)  The
13345 archive group will appear in the group buffer the next time you start
13346 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
13347 enter it and read the articles in it just like you'd read any other
13348 group.  If the group gets really big and annoying, you can simply rename
13349 if (using @kbd{G r} in the group buffer) to something
13350 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
13351 continue to be stored in the old (now empty) group.
13352
13353 That's the default method of archiving sent messages.  Gnus offers a
13354 different way for the people who don't like the default method.  In that
13355 case you should set @code{gnus-message-archive-group} to @code{nil};
13356 this will disable archiving.
13357
13358 @table @code
13359 @item gnus-outgoing-message-group
13360 @vindex gnus-outgoing-message-group
13361 All outgoing messages will be put in this group.  If you want to store
13362 all your outgoing mail and articles in the group @samp{nnml:archive},
13363 you set this variable to that value.  This variable can also be a list of
13364 group names.
13365
13366 If you want to have greater control over what group to put each
13367 message in, you can set this variable to a function that checks the
13368 current newsgroup name and then returns a suitable group name (or list
13369 of names).
13370
13371 This variable can be used instead of @code{gnus-message-archive-group},
13372 but the latter is the preferred method.
13373
13374 @item gnus-gcc-mark-as-read
13375 @vindex gnus-gcc-mark-as-read
13376 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
13377
13378 @item gnus-gcc-externalize-attachments
13379 @vindex gnus-gcc-externalize-attachments
13380 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
13381 and matches the Gcc group name, attach files as external parts; if it is
13382 @code{all}, attach local files as external parts; if it is other
13383 non-@code{nil}, the behavior is the same as @code{all}, but it may be
13384 changed in the future.
13385
13386 @end table
13387
13388
13389 @node Posting Styles
13390 @section Posting Styles
13391 @cindex posting styles
13392 @cindex styles
13393
13394 All them variables, they make my head swim.
13395
13396 So what if you want a different @code{Organization} and signature based
13397 on what groups you post to?  And you post both from your home machine
13398 and your work machine, and you want different @code{From} lines, and so
13399 on?
13400
13401 @vindex gnus-posting-styles
13402 One way to do stuff like that is to write clever hooks that change the
13403 variables you need to have changed.  That's a bit boring, so somebody
13404 came up with the bright idea of letting the user specify these things in
13405 a handy alist.  Here's an example of a @code{gnus-posting-styles}
13406 variable:
13407
13408 @lisp
13409 ((".*"
13410   (signature "Peace and happiness")
13411   (organization "What me?"))
13412  ("^comp"
13413   (signature "Death to everybody"))
13414  ("comp.emacs.i-love-it"
13415   (organization "Emacs is it")))
13416 @end lisp
13417
13418 As you might surmise from this example, this alist consists of several
13419 @dfn{styles}.  Each style will be applicable if the first element
13420 ``matches'', in some form or other.  The entire alist will be iterated
13421 over, from the beginning towards the end, and each match will be
13422 applied, which means that attributes in later styles that match override
13423 the same attributes in earlier matching styles.  So
13424 @samp{comp.programming.literate} will have the @samp{Death to everybody}
13425 signature and the @samp{What me?} @code{Organization} header.
13426
13427 The first element in each style is called the @code{match}.  If it's a
13428 string, then Gnus will try to regexp match it against the group name.
13429 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
13430 will look in the original article for a header whose name is
13431 @var{match} and compare that @var{regexp}.  @var{match} and
13432 @var{regexp} are strings.  (The original article is the one you are
13433 replying or following up to.  If you are not composing a reply or a
13434 followup, then there is nothing to match against.)  If the
13435 @code{match} is a function symbol, that function will be called with
13436 no arguments.  If it's a variable symbol, then the variable will be
13437 referenced.  If it's a list, then that list will be @code{eval}ed.  In
13438 any case, if this returns a non-@code{nil} value, then the style is
13439 said to @dfn{match}.
13440
13441 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
13442 attribute consists of a @code{(@var{name} @var{value})} pair.  In
13443 addition, you can also use the @code{(@var{name} :file @var{value})}
13444 form or the @code{(@var{name} :value @var{value})} form.  Where
13445 @code{:file} signifies @var{value} represents a file name and its
13446 contents should be used as the attribute value, @code{:value} signifies
13447 @var{value} does not represent a file name explicitly.  The attribute
13448 name can be one of:
13449
13450 @itemize @bullet
13451 @item @code{signature}
13452 @item @code{signature-file}
13453 @item @code{x-face-file}
13454 @item @code{address}, overriding @code{user-mail-address}
13455 @item @code{name}, overriding @code{(user-full-name)}
13456 @item @code{body}
13457 @end itemize
13458
13459 Note that the @code{signature-file} attribute honors the variable
13460 @code{message-signature-directory}.
13461
13462 The attribute name can also be a string or a symbol.  In that case,
13463 this will be used as a header name, and the value will be inserted in
13464 the headers of the article; if the value is @code{nil}, the header
13465 name will be removed.  If the attribute name is @code{eval}, the form
13466 is evaluated, and the result is thrown away.
13467
13468 The attribute value can be a string (used verbatim), a function with
13469 zero arguments (the return value will be used), a variable (its value
13470 will be used) or a list (it will be @code{eval}ed and the return value
13471 will be used).  The functions and sexps are called/@code{eval}ed in the
13472 message buffer that is being set up.  The headers of the current article
13473 are available through the @code{message-reply-headers} variable, which
13474 is a vector of the following headers: number subject from date id
13475 references chars lines xref extra.
13476
13477 @vindex message-reply-headers
13478
13479 If you wish to check whether the message you are about to compose is
13480 meant to be a news article or a mail message, you can check the values
13481 of the @code{message-news-p} and @code{message-mail-p} functions.
13482
13483 @findex message-mail-p
13484 @findex message-news-p
13485
13486 So here's a new example:
13487
13488 @lisp
13489 (setq gnus-posting-styles
13490       '((".*"
13491          (signature-file "~/.signature")
13492          (name "User Name")
13493          (x-face-file "~/.xface")
13494          (x-url (getenv "WWW_HOME"))
13495          (organization "People's Front Against MWM"))
13496         ("^rec.humor"
13497          (signature my-funny-signature-randomizer))
13498         ((equal (system-name) "gnarly")  ;; @r{A form}
13499          (signature my-quote-randomizer))
13500         (message-news-p        ;; @r{A function symbol}
13501          (signature my-news-signature))
13502         (window-system         ;; @r{A value symbol}
13503          ("X-Window-System" (format "%s" window-system)))
13504         ;; @r{If I'm replying to Larsi, set the Organization header.}
13505         ((header "from" "larsi.*org")
13506          (Organization "Somewhere, Inc."))
13507         ((posting-from-work-p) ;; @r{A user defined function}
13508          (signature-file "~/.work-signature")
13509          (address "user@@bar.foo")
13510          (body "You are fired.\n\nSincerely, your boss.")
13511          (organization "Important Work, Inc"))
13512         ("nnml:.*"
13513          (From (with-current-buffer gnus-article-buffer
13514                  (message-fetch-field "to"))))
13515         ("^nn.+:"
13516          (signature-file "~/.mail-signature"))))
13517 @end lisp
13518
13519 The @samp{nnml:.*} rule means that you use the @code{To} address as the
13520 @code{From} address in all your outgoing replies, which might be handy
13521 if you fill many roles.
13522 You may also use @code{message-alternative-emails} instead.
13523 @xref{Message Headers, ,Message Headers, message, Message Manual}.
13524
13525 @node Drafts
13526 @section Drafts
13527 @cindex drafts
13528
13529 If you are writing a message (mail or news) and suddenly remember that
13530 you have a steak in the oven (or some pesto in the food processor, you
13531 craaazy vegetarians), you'll probably wish there was a method to save
13532 the message you are writing so that you can continue editing it some
13533 other day, and send it when you feel its finished.
13534
13535 Well, don't worry about it.  Whenever you start composing a message of
13536 some sort using the Gnus mail and post commands, the buffer you get will
13537 automatically associate to an article in a special @dfn{draft} group.
13538 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
13539 article will be saved there.  (Auto-save files also go to the draft
13540 group.)
13541
13542 @cindex nndraft
13543 @vindex nndraft-directory
13544 The draft group is a special group (which is implemented as an
13545 @code{nndraft} group, if you absolutely have to know) called
13546 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
13547 @code{nndraft} is to store its files.  What makes this group special is
13548 that you can't tick any articles in it or mark any articles as
13549 read---all articles in the group are permanently unread.
13550
13551 If the group doesn't exist, it will be created and you'll be subscribed
13552 to it.  The only way to make it disappear from the Group buffer is to
13553 unsubscribe it.  The special properties of the draft group comes from
13554 a group property (@pxref{Group Parameters}), and if lost the group
13555 behaves like any other group.  This means the commands below will not
13556 be available.  To restore the special properties of the group, the
13557 simplest way is to kill the group, using @kbd{C-k}, and restart
13558 Gnus.  The group is automatically created again with the
13559 correct parameters.  The content of the group is not lost.
13560
13561 @c @findex gnus-dissociate-buffer-from-draft
13562 @c @kindex C-c M-d (Mail)
13563 @c @kindex C-c M-d (Post)
13564 @c @findex gnus-associate-buffer-with-draft
13565 @c @kindex C-c C-d (Mail)
13566 @c @kindex C-c C-d (Post)
13567 @c If you're writing some super-secret message that you later want to
13568 @c encode with PGP before sending, you may wish to turn the auto-saving
13569 @c (and association with the draft group) off.  You never know who might be
13570 @c interested in reading all your extremely valuable and terribly horrible
13571 @c and interesting secrets.  The @kbd{C-c M-d}
13572 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
13573 @c If you change your mind and want to turn the auto-saving back on again,
13574 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
13575 @c
13576 @c @vindex gnus-use-draft
13577 @c To leave association with the draft group off by default, set
13578 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
13579
13580 @findex gnus-draft-edit-message
13581 @kindex D e (Draft)
13582 When you want to continue editing the article, you simply enter the
13583 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
13584 that.  You will be placed in a buffer where you left off.
13585
13586 Rejected articles will also be put in this draft group (@pxref{Rejected
13587 Articles}).
13588
13589 @findex gnus-draft-send-all-messages
13590 @kindex D s (Draft)
13591 @findex gnus-draft-send-message
13592 @kindex D S (Draft)
13593 If you have lots of rejected messages you want to post (or mail) without
13594 doing further editing, you can use the @kbd{D s} command
13595 (@code{gnus-draft-send-message}).  This command understands the
13596 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
13597 command (@code{gnus-draft-send-all-messages}) will ship off all messages
13598 in the buffer.
13599
13600 @findex gnus-draft-toggle-sending
13601 @kindex D t (Draft)
13602 If you have some messages that you wish not to send, you can use the
13603 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
13604 as unsendable.  This is a toggling command.
13605
13606 Finally, if you want to delete a draft, use the normal @kbd{B DEL}
13607 command (@pxref{Mail Group Commands}).
13608
13609
13610 @node Rejected Articles
13611 @section Rejected Articles
13612 @cindex rejected articles
13613
13614 Sometimes a news server will reject an article.  Perhaps the server
13615 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
13616 @emph{there be demons}.  Perhaps you have included too much cited text.
13617 Perhaps the disk is full.  Perhaps the server is down.
13618
13619 These situations are, of course, totally beyond the control of Gnus.
13620 (Gnus, of course, loves the way you look, always feels great, has angels
13621 fluttering around inside of it, doesn't care about how much cited text
13622 you include, never runs full and never goes down.)  So Gnus saves these
13623 articles until some later time when the server feels better.
13624
13625 The rejected articles will automatically be put in a special draft group
13626 (@pxref{Drafts}).  When the server comes back up again, you'd then
13627 typically enter that group and send all the articles off.
13628
13629 @node Signing and encrypting
13630 @section Signing and encrypting
13631 @cindex using gpg
13632 @cindex using s/mime
13633 @cindex using smime
13634
13635 Gnus can digitally sign and encrypt your messages, using vanilla
13636 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
13637 decoding such messages, see the @code{mm-verify-option} and
13638 @code{mm-decrypt-option} options (@pxref{Security}).
13639
13640 @vindex gnus-message-replysign
13641 @vindex gnus-message-replyencrypt
13642 @vindex gnus-message-replysignencrypted
13643 Often, you would like to sign replies to people who send you signed
13644 messages.  Even more often, you might want to encrypt messages which
13645 are in reply to encrypted messages.  Gnus offers
13646 @code{gnus-message-replysign} to enable the former, and
13647 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
13648 @code{gnus-message-replysignencrypted} (on by default) will sign
13649 automatically encrypted messages.
13650
13651 Instructing @acronym{MML} to perform security operations on a
13652 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
13653 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
13654
13655 @table @kbd
13656
13657 @item C-c C-m s s
13658 @kindex C-c C-m s s (Message)
13659 @findex mml-secure-message-sign-smime
13660
13661 Digitally sign current message using @acronym{S/MIME}.
13662
13663 @item C-c C-m s o
13664 @kindex C-c C-m s o (Message)
13665 @findex mml-secure-message-sign-pgp
13666
13667 Digitally sign current message using @acronym{PGP}.
13668
13669 @item C-c C-m s p
13670 @kindex C-c C-m s p (Message)
13671 @findex mml-secure-message-sign-pgp
13672
13673 Digitally sign current message using @acronym{PGP/MIME}.
13674
13675 @item C-c C-m c s
13676 @kindex C-c C-m c s (Message)
13677 @findex mml-secure-message-encrypt-smime
13678
13679 Digitally encrypt current message using @acronym{S/MIME}.
13680
13681 @item C-c C-m c o
13682 @kindex C-c C-m c o (Message)
13683 @findex mml-secure-message-encrypt-pgp
13684
13685 Digitally encrypt current message using @acronym{PGP}.
13686
13687 @item C-c C-m c p
13688 @kindex C-c C-m c p (Message)
13689 @findex mml-secure-message-encrypt-pgpmime
13690
13691 Digitally encrypt current message using @acronym{PGP/MIME}.
13692
13693 @item C-c C-m C-n
13694 @kindex C-c C-m C-n (Message)
13695 @findex mml-unsecure-message
13696 Remove security related @acronym{MML} tags from message.
13697
13698 @end table
13699
13700 @xref{Security, ,Security, message, Message Manual}, for more information.
13701
13702 @node Select Methods
13703 @chapter Select Methods
13704 @cindex foreign groups
13705 @cindex select methods
13706
13707 A @dfn{foreign group} is a group not read by the usual (or
13708 default) means.  It could be, for instance, a group from a different
13709 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13710 personal mail group.
13711
13712 A foreign group (or any group, really) is specified by a @dfn{name} and
13713 a @dfn{select method}.  To take the latter first, a select method is a
13714 list where the first element says what back end to use (e.g. @code{nntp},
13715 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13716 name}.  There may be additional elements in the select method, where the
13717 value may have special meaning for the back end in question.
13718
13719 One could say that a select method defines a @dfn{virtual server}---so
13720 we do just that (@pxref{Server Buffer}).
13721
13722 The @dfn{name} of the group is the name the back end will recognize the
13723 group as.
13724
13725 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13726 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13727 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13728 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13729 back end just knows this group as @samp{soc.motss}.
13730
13731 The different methods all have their peculiarities, of course.
13732
13733 @menu
13734 * Server Buffer::               Making and editing virtual servers.
13735 * Getting News::                Reading USENET news with Gnus.
13736 * Getting Mail::                Reading your personal mail with Gnus.
13737 * Browsing the Web::            Getting messages from a plethora of Web sources.
13738 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
13739 * Other Sources::               Reading directories, files, SOUP packets.
13740 * Combined Groups::             Combining groups into one group.
13741 * Email Based Diary::           Using mails to manage diary events in Gnus.
13742 * Gnus Unplugged::              Reading news and mail offline.
13743 @end menu
13744
13745
13746 @node Server Buffer
13747 @section Server Buffer
13748
13749 Traditionally, a @dfn{server} is a machine or a piece of software that
13750 one connects to, and then requests information from.  Gnus does not
13751 connect directly to any real servers, but does all transactions through
13752 one back end or other.  But that's just putting one layer more between
13753 the actual media and Gnus, so we might just as well say that each
13754 back end represents a virtual server.
13755
13756 For instance, the @code{nntp} back end may be used to connect to several
13757 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13758 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13759 use, and what parameters to set by specifying a @dfn{select method}.
13760
13761 These select method specifications can sometimes become quite
13762 complicated---say, for instance, that you want to read from the
13763 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13764 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13765 Anyway, if you had to specify that for each group that used this
13766 server, that would be too much work, so Gnus offers a way of naming
13767 select methods, which is what you do in the server buffer.
13768
13769 To enter the server buffer, use the @kbd{^}
13770 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13771
13772 @menu
13773 * Server Buffer Format::        You can customize the look of this buffer.
13774 * Server Commands::             Commands to manipulate servers.
13775 * Example Methods::             Examples server specifications.
13776 * Creating a Virtual Server::   An example session.
13777 * Server Variables::            Which variables to set.
13778 * Servers and Methods::         You can use server names as select methods.
13779 * Unavailable Servers::         Some servers you try to contact may be down.
13780 @end menu
13781
13782 @vindex gnus-server-mode-hook
13783 @code{gnus-server-mode-hook} is run when creating the server buffer.
13784
13785
13786 @node Server Buffer Format
13787 @subsection Server Buffer Format
13788 @cindex server buffer format
13789
13790 @vindex gnus-server-line-format
13791 You can change the look of the server buffer lines by changing the
13792 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13793 variable, with some simple extensions:
13794
13795 @table @samp
13796
13797 @item h
13798 How the news is fetched---the back end name.
13799
13800 @item n
13801 The name of this server.
13802
13803 @item w
13804 Where the news is to be fetched from---the address.
13805
13806 @item s
13807 The opened/closed/denied status of the server.
13808
13809 @item a
13810 Whether this server is agentized.
13811 @end table
13812
13813 @vindex gnus-server-mode-line-format
13814 The mode line can also be customized by using the
13815 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13816 Formatting}).  The following specs are understood:
13817
13818 @table @samp
13819 @item S
13820 Server name.
13821
13822 @item M
13823 Server method.
13824 @end table
13825
13826 Also @pxref{Formatting Variables}.
13827
13828
13829 @node Server Commands
13830 @subsection Server Commands
13831 @cindex server commands
13832
13833 @table @kbd
13834
13835 @item v
13836 @kindex v (Server)
13837 @cindex keys, reserved for users (Server)
13838 The key @kbd{v} is reserved for users.  You can bind it to some
13839 command or better use it as a prefix key.
13840
13841 @item a
13842 @kindex a (Server)
13843 @findex gnus-server-add-server
13844 Add a new server (@code{gnus-server-add-server}).
13845
13846 @item e
13847 @kindex e (Server)
13848 @findex gnus-server-edit-server
13849 Edit a server (@code{gnus-server-edit-server}).
13850
13851 @item SPACE
13852 @kindex SPACE (Server)
13853 @findex gnus-server-read-server
13854 Browse the current server (@code{gnus-server-read-server}).
13855
13856 @item q
13857 @kindex q (Server)
13858 @findex gnus-server-exit
13859 Return to the group buffer (@code{gnus-server-exit}).
13860
13861 @item k
13862 @kindex k (Server)
13863 @findex gnus-server-kill-server
13864 Kill the current server (@code{gnus-server-kill-server}).
13865
13866 @item y
13867 @kindex y (Server)
13868 @findex gnus-server-yank-server
13869 Yank the previously killed server (@code{gnus-server-yank-server}).
13870
13871 @item c
13872 @kindex c (Server)
13873 @findex gnus-server-copy-server
13874 Copy the current server (@code{gnus-server-copy-server}).
13875
13876 @item l
13877 @kindex l (Server)
13878 @findex gnus-server-list-servers
13879 List all servers (@code{gnus-server-list-servers}).
13880
13881 @item s
13882 @kindex s (Server)
13883 @findex gnus-server-scan-server
13884 Request that the server scan its sources for new articles
13885 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13886 servers.
13887
13888 @item g
13889 @kindex g (Server)
13890 @findex gnus-server-regenerate-server
13891 Request that the server regenerate all its data structures
13892 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13893 a mail back end that has gotten out of sync.
13894
13895 @item z
13896 @kindex z (Server)
13897 @findex gnus-server-compact-server
13898
13899 Compact all groups in the server under point
13900 (@code{gnus-server-compact-server}).  Currently implemented only in
13901 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13902 hence getting a correct total article count.
13903
13904 @end table
13905
13906
13907 @node Example Methods
13908 @subsection Example Methods
13909
13910 Most select methods are pretty simple and self-explanatory:
13911
13912 @lisp
13913 (nntp "news.funet.fi")
13914 @end lisp
13915
13916 Reading directly from the spool is even simpler:
13917
13918 @lisp
13919 (nnspool "")
13920 @end lisp
13921
13922 As you can see, the first element in a select method is the name of the
13923 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13924 will.
13925
13926 After these two elements, there may be an arbitrary number of
13927 @code{(@var{variable} @var{form})} pairs.
13928
13929 To go back to the first example---imagine that you want to read from
13930 port 15 on that machine.  This is what the select method should
13931 look like then:
13932
13933 @lisp
13934 (nntp "news.funet.fi" (nntp-port-number 15))
13935 @end lisp
13936
13937 You should read the documentation to each back end to find out what
13938 variables are relevant, but here's an @code{nnmh} example:
13939
13940 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13941 you have two structures that you wish to access: One is your private
13942 mail spool, and the other is a public one.  Here's the possible spec for
13943 your private mail:
13944
13945 @lisp
13946 (nnmh "private" (nnmh-directory "~/private/mail/"))
13947 @end lisp
13948
13949 (This server is then called @samp{private}, but you may have guessed
13950 that.)
13951
13952 Here's the method for a public spool:
13953
13954 @lisp
13955 (nnmh "public"
13956       (nnmh-directory "/usr/information/spool/")
13957       (nnmh-get-new-mail nil))
13958 @end lisp
13959
13960 @cindex proxy
13961 @cindex firewall
13962
13963 If you are behind a firewall and only have access to the @acronym{NNTP}
13964 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13965 on the firewall machine and connect with
13966 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13967 @acronym{NNTP} server.
13968 Doing this can be rather fiddly, but your virtual server definition
13969 should probably look something like this:
13970
13971 @lisp
13972 (nntp "firewall"
13973       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13974       (nntp-via-address "the.firewall.machine")
13975       (nntp-address "the.real.nntp.host"))
13976 @end lisp
13977
13978 If you want to use the wonderful @code{ssh} program to provide a
13979 compressed connection over the modem line, you could add the following
13980 configuration to the example above:
13981
13982 @lisp
13983       (nntp-via-rlogin-command "ssh")
13984 @end lisp
13985
13986 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13987 an indirect connection:
13988
13989 @lisp
13990 (setq gnus-select-method
13991       '(nntp "indirect"
13992              (nntp-address "news.server.example")
13993              (nntp-via-user-name "intermediate_user_name")
13994              (nntp-via-address "intermediate.host.example")
13995              (nntp-via-rlogin-command "ssh")
13996              (nntp-via-rlogin-command-switches ("-C"))
13997              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
13998 @end lisp
13999
14000 This means that you have to have set up @code{ssh-agent} correctly to
14001 provide automatic authorization, of course.
14002
14003 If you're behind a firewall, but have direct access to the outside world
14004 through a wrapper command like "runsocks", you could open a socksified
14005 netcat connection to the news server as follows:
14006
14007 @lisp
14008 (nntp "outside"
14009       (nntp-pre-command "runsocks")
14010       (nntp-open-connection-function nntp-open-netcat-stream)
14011       (nntp-address "the.news.server"))
14012 @end lisp
14013
14014
14015 @node Creating a Virtual Server
14016 @subsection Creating a Virtual Server
14017
14018 If you're saving lots of articles in the cache by using persistent
14019 articles, you may want to create a virtual server to read the cache.
14020
14021 First you need to add a new server.  The @kbd{a} command does that.  It
14022 would probably be best to use @code{nnml} to read the cache.  You
14023 could also use @code{nnspool} or @code{nnmh}, though.
14024
14025 Type @kbd{a nnml RET cache RET}.
14026
14027 You should now have a brand new @code{nnml} virtual server called
14028 @samp{cache}.  You now need to edit it to have the right definitions.
14029 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
14030 will contain the following:
14031
14032 @lisp
14033 (nnml "cache")
14034 @end lisp
14035
14036 Change that to:
14037
14038 @lisp
14039 (nnml "cache"
14040          (nnml-directory "~/News/cache/")
14041          (nnml-active-file "~/News/cache/active"))
14042 @end lisp
14043
14044 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
14045 @kbd{RET} over this virtual server, you should be entered into a browse
14046 buffer, and you should be able to enter any of the groups displayed.
14047
14048
14049 @node Server Variables
14050 @subsection Server Variables
14051 @cindex server variables
14052 @cindex server parameters
14053
14054 One sticky point when defining variables (both on back ends and in Emacs
14055 in general) is that some variables are typically initialized from other
14056 variables when the definition of the variables is being loaded.  If you
14057 change the ``base'' variable after the variables have been loaded, you
14058 won't change the ``derived'' variables.
14059
14060 This typically affects directory and file variables.  For instance,
14061 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
14062 directory variables are initialized from that variable, so
14063 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
14064 new virtual @code{nnml} server, it will @emph{not} suffice to set just
14065 @code{nnml-directory}---you have to explicitly set all the file
14066 variables to be what you want them to be.  For a complete list of
14067 variables for each back end, see each back end's section later in this
14068 manual, but here's an example @code{nnml} definition:
14069
14070 @lisp
14071 (nnml "public"
14072       (nnml-directory "~/my-mail/")
14073       (nnml-active-file "~/my-mail/active")
14074       (nnml-newsgroups-file "~/my-mail/newsgroups"))
14075 @end lisp
14076
14077 Server variables are often called @dfn{server parameters}.
14078
14079 @node Servers and Methods
14080 @subsection Servers and Methods
14081
14082 Wherever you would normally use a select method
14083 (e.g. @code{gnus-secondary-select-method}, in the group select method,
14084 when browsing a foreign server) you can use a virtual server name
14085 instead.  This could potentially save lots of typing.  And it's nice all
14086 over.
14087
14088
14089 @node Unavailable Servers
14090 @subsection Unavailable Servers
14091
14092 If a server seems to be unreachable, Gnus will mark that server as
14093 @code{denied}.  That means that any subsequent attempt to make contact
14094 with that server will just be ignored.  ``It can't be opened,'' Gnus
14095 will tell you, without making the least effort to see whether that is
14096 actually the case or not.
14097
14098 That might seem quite naughty, but it does make sense most of the time.
14099 Let's say you have 10 groups subscribed to on server
14100 @samp{nephelococcygia.com}.  This server is located somewhere quite far
14101 away from you and the machine is quite slow, so it takes 1 minute just
14102 to find out that it refuses connection to you today.  If Gnus were to
14103 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
14104 attempt to do that.  Once it has gotten a single ``connection refused'',
14105 it will regard that server as ``down''.
14106
14107 So, what happens if the machine was only feeling unwell temporarily?
14108 How do you test to see whether the machine has come up again?
14109
14110 You jump to the server buffer (@pxref{Server Buffer}) and poke it
14111 with the following commands:
14112
14113 @table @kbd
14114
14115 @item O
14116 @kindex O (Server)
14117 @findex gnus-server-open-server
14118 Try to establish connection to the server on the current line
14119 (@code{gnus-server-open-server}).
14120
14121 @item C
14122 @kindex C (Server)
14123 @findex gnus-server-close-server
14124 Close the connection (if any) to the server
14125 (@code{gnus-server-close-server}).
14126
14127 @item D
14128 @kindex D (Server)
14129 @findex gnus-server-deny-server
14130 Mark the current server as unreachable
14131 (@code{gnus-server-deny-server}).
14132
14133 @item M-o
14134 @kindex M-o (Server)
14135 @findex gnus-server-open-all-servers
14136 Open the connections to all servers in the buffer
14137 (@code{gnus-server-open-all-servers}).
14138
14139 @item M-c
14140 @kindex M-c (Server)
14141 @findex gnus-server-close-all-servers
14142 Close the connections to all servers in the buffer
14143 (@code{gnus-server-close-all-servers}).
14144
14145 @item R
14146 @kindex R (Server)
14147 @findex gnus-server-remove-denials
14148 Remove all marks to whether Gnus was denied connection from any servers
14149 (@code{gnus-server-remove-denials}).
14150
14151 @item L
14152 @kindex L (Server)
14153 @findex gnus-server-offline-server
14154 Set server status to offline (@code{gnus-server-offline-server}).
14155
14156 @end table
14157
14158
14159 @node Getting News
14160 @section Getting News
14161 @cindex reading news
14162 @cindex news back ends
14163
14164 A newsreader is normally used for reading news.  Gnus currently provides
14165 only two methods of getting news---it can read from an @acronym{NNTP} server,
14166 or it can read from a local spool.
14167
14168 @menu
14169 * NNTP::                        Reading news from an @acronym{NNTP} server.
14170 * News Spool::                  Reading news from the local spool.
14171 @end menu
14172
14173
14174 @node NNTP
14175 @subsection NNTP
14176 @cindex nntp
14177
14178 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
14179 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
14180 server as the, uhm, address.
14181
14182 If the @acronym{NNTP} server is located at a non-standard port, setting the
14183 third element of the select method to this port number should allow you
14184 to connect to the right port.  You'll have to edit the group info for
14185 that (@pxref{Foreign Groups}).
14186
14187 The name of the foreign group can be the same as a native group.  In
14188 fact, you can subscribe to the same group from as many different servers
14189 you feel like.  There will be no name collisions.
14190
14191 The following variables can be used to create a virtual @code{nntp}
14192 server:
14193
14194 @table @code
14195
14196 @item nntp-server-opened-hook
14197 @vindex nntp-server-opened-hook
14198 @cindex @sc{mode reader}
14199 @cindex authinfo
14200 @cindex authentication
14201 @cindex nntp authentication
14202 @findex nntp-send-authinfo
14203 @findex nntp-send-mode-reader
14204 is run after a connection has been made.  It can be used to send
14205 commands to the @acronym{NNTP} server after it has been contacted.  By
14206 default it sends the command @code{MODE READER} to the server with the
14207 @code{nntp-send-mode-reader} function.  This function should always be
14208 present in this hook.
14209
14210 @item nntp-authinfo-function
14211 @vindex nntp-authinfo-function
14212 @findex nntp-send-authinfo
14213 @vindex nntp-authinfo-file
14214 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
14215 server.  The default function is @code{nntp-send-authinfo}, which looks
14216 through your @file{~/.authinfo} (or whatever you've set the
14217 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
14218 are found, it will prompt you for a login name and a password.  The
14219 format of the @file{~/.authinfo} file is (almost) the same as the
14220 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
14221 manual page, but here are the salient facts:
14222
14223 @enumerate
14224 @item
14225 The file contains one or more line, each of which define one server.
14226
14227 @item
14228 Each line may contain an arbitrary number of token/value pairs.
14229
14230 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
14231 @samp{default}.  In addition Gnus introduces two new tokens, not present
14232 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
14233 @samp{force}.  (This is the only way the @file{.authinfo} file format
14234 deviates from the @file{.netrc} file format.)  @samp{port} is used to
14235 indicate what port on the server the credentials apply to and
14236 @samp{force} is explained below.
14237
14238 @end enumerate
14239
14240 Here's an example file:
14241
14242 @example
14243 machine news.uio.no login larsi password geheimnis
14244 machine nntp.ifi.uio.no login larsi force yes
14245 @end example
14246
14247 The token/value pairs may appear in any order; @samp{machine} doesn't
14248 have to be first, for instance.
14249
14250 In this example, both login name and password have been supplied for the
14251 former server, while the latter has only the login name listed, and the
14252 user will be prompted for the password.  The latter also has the
14253 @samp{force} tag, which means that the authinfo will be sent to the
14254 @var{nntp} server upon connection; the default (i.e., when there is not
14255 @samp{force} tag) is to not send authinfo to the @var{nntp} server
14256 until the @var{nntp} server asks for it.
14257
14258 You can also add @samp{default} lines that will apply to all servers
14259 that don't have matching @samp{machine} lines.
14260
14261 @example
14262 default force yes
14263 @end example
14264
14265 This will force sending @samp{AUTHINFO} commands to all servers not
14266 previously mentioned.
14267
14268 Remember to not leave the @file{~/.authinfo} file world-readable.
14269
14270 @item nntp-server-action-alist
14271 @vindex nntp-server-action-alist
14272 This is a list of regexps to match on server types and actions to be
14273 taken when matches are made.  For instance, if you want Gnus to beep
14274 every time you connect to innd, you could say something like:
14275
14276 @lisp
14277 (setq nntp-server-action-alist
14278       '(("innd" (ding))))
14279 @end lisp
14280
14281 You probably don't want to do that, though.
14282
14283 The default value is
14284
14285 @lisp
14286 '(("nntpd 1\\.5\\.11t"
14287    (remove-hook 'nntp-server-opened-hook
14288                 'nntp-send-mode-reader)))
14289 @end lisp
14290
14291 This ensures that Gnus doesn't send the @code{MODE READER} command to
14292 nntpd 1.5.11t, since that command chokes that server, I've been told.
14293
14294 @item nntp-maximum-request
14295 @vindex nntp-maximum-request
14296 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
14297 will collect headers by sending a series of @code{head} commands.  To
14298 speed things up, the back end sends lots of these commands without
14299 waiting for reply, and then reads all the replies.  This is controlled
14300 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
14301 your network is buggy, you should set this to 1.
14302
14303 @item nntp-connection-timeout
14304 @vindex nntp-connection-timeout
14305 If you have lots of foreign @code{nntp} groups that you connect to
14306 regularly, you're sure to have problems with @acronym{NNTP} servers not
14307 responding properly, or being too loaded to reply within reasonable
14308 time.  This is can lead to awkward problems, which can be helped
14309 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
14310 that says how many seconds the @code{nntp} back end should wait for a
14311 connection before giving up.  If it is @code{nil}, which is the default,
14312 no timeouts are done.
14313
14314 @item nntp-nov-is-evil
14315 @vindex nntp-nov-is-evil
14316 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
14317 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
14318 can be used.
14319
14320 @item nntp-xover-commands
14321 @vindex nntp-xover-commands
14322 @cindex @acronym{NOV}
14323 @cindex XOVER
14324 List of strings used as commands to fetch @acronym{NOV} lines from a
14325 server.  The default value of this variable is @code{("XOVER"
14326 "XOVERVIEW")}.
14327
14328 @item nntp-nov-gap
14329 @vindex nntp-nov-gap
14330 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
14331 the server.  The server responds with one huge list of lines.  However,
14332 if you have read articles 2-5000 in the group, and only want to read
14333 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
14334 lines that you will not need.  This variable says how
14335 big a gap between two consecutive articles is allowed to be before the
14336 @code{XOVER} request is split into several request.  Note that if your
14337 network is fast, setting this variable to a really small number means
14338 that fetching will probably be slower.  If this variable is @code{nil},
14339 @code{nntp} will never split requests.  The default is 5.
14340
14341 @item nntp-xref-number-is-evil
14342 @vindex nntp-xref-number-is-evil
14343 When Gnus refers to an article having the @code{Message-ID} that a user
14344 specifies or having the @code{Message-ID} of the parent article of the
14345 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
14346 command to the @acronym{NNTP} server to know where it is, and the server
14347 returns the data containing the pairs of a group and an article number
14348 in the @code{Xref} header.  Gnus normally uses the article number to
14349 refer to the article if the data shows that that article is in the
14350 current group, while it uses the @code{Message-ID} otherwise.  However,
14351 some news servers, e.g., ones running Diablo, run multiple engines
14352 having the same articles but article numbers are not kept synchronized
14353 between them.  In that case, the article number that appears in the
14354 @code{Xref} header varies by which engine is chosen, so you cannot refer
14355 to the parent article that is in the current group, for instance.  If
14356 you connect to such a server, set this variable to a non-@code{nil}
14357 value, and Gnus never uses article numbers.  For example:
14358
14359 @lisp
14360 (setq gnus-select-method
14361       '(nntp "newszilla"
14362              (nntp-address "newszilla.example.com")
14363              (nntp-xref-number-is-evil t)
14364              @dots{}))
14365 @end lisp
14366
14367 The default value of this server variable is @code{nil}.
14368
14369 @item nntp-prepare-server-hook
14370 @vindex nntp-prepare-server-hook
14371 A hook run before attempting to connect to an @acronym{NNTP} server.
14372
14373 @item nntp-record-commands
14374 @vindex nntp-record-commands
14375 If non-@code{nil}, @code{nntp} will log all commands it sends to the
14376 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
14377 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
14378 that doesn't seem to work.
14379
14380 @item nntp-open-connection-function
14381 @vindex nntp-open-connection-function
14382 It is possible to customize how the connection to the nntp server will
14383 be opened.  If you specify an @code{nntp-open-connection-function}
14384 parameter, Gnus will use that function to establish the connection.
14385 Seven pre-made functions are supplied.  These functions can be grouped
14386 in two categories: direct connection functions (four pre-made), and
14387 indirect ones (three pre-made).
14388
14389 @item nntp-never-echoes-commands
14390 @vindex nntp-never-echoes-commands
14391 Non-@code{nil} means the nntp server never echoes commands.  It is
14392 reported that some nntps server doesn't echo commands.  So, you may want
14393 to set this to non-@code{nil} in the method for such a server setting
14394 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
14395 example.  The default value is @code{nil}.  Note that the
14396 @code{nntp-open-connection-functions-never-echo-commands} variable
14397 overrides the @code{nil} value of this variable.
14398
14399 @item nntp-open-connection-functions-never-echo-commands
14400 @vindex nntp-open-connection-functions-never-echo-commands
14401 List of functions that never echo commands.  Add or set a function which
14402 you set to @code{nntp-open-connection-function} to this list if it does
14403 not echo commands.  Note that a non-@code{nil} value of the
14404 @code{nntp-never-echoes-commands} variable overrides this variable.  The
14405 default value is @code{(nntp-open-network-stream)}.
14406
14407 @item nntp-prepare-post-hook
14408 @vindex nntp-prepare-post-hook
14409 A hook run just before posting an article.  If there is no
14410 @code{Message-ID} header in the article and the news server provides the
14411 recommended ID, it will be added to the article before running this
14412 hook.  It is useful to make @code{Cancel-Lock} headers even if you
14413 inhibit Gnus to add a @code{Message-ID} header, you could say:
14414
14415 @lisp
14416 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
14417 @end lisp
14418
14419 Note that not all servers support the recommended ID.  This works for
14420 INN versions 2.3.0 and later, for instance.
14421
14422 @end table
14423
14424 @menu
14425 * Direct Functions::            Connecting directly to the server.
14426 * Indirect Functions::          Connecting indirectly to the server.
14427 * Common Variables::            Understood by several connection functions.
14428 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
14429 @end menu
14430
14431
14432 @node Direct Functions
14433 @subsubsection Direct Functions
14434 @cindex direct connection functions
14435
14436 These functions are called direct because they open a direct connection
14437 between your machine and the @acronym{NNTP} server.  The behavior of these
14438 functions is also affected by commonly understood variables
14439 (@pxref{Common Variables}).
14440
14441 @table @code
14442 @findex nntp-open-network-stream
14443 @item nntp-open-network-stream
14444 This is the default, and simply connects to some port or other on the
14445 remote system.
14446
14447 @findex nntp-open-tls-stream
14448 @item nntp-open-tls-stream
14449 Opens a connection to a server over a @dfn{secure} channel.  To use
14450 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
14451 installed.  You then define a server as follows:
14452
14453 @lisp
14454 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
14455 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
14456 ;;
14457 (nntp "snews.bar.com"
14458       (nntp-open-connection-function nntp-open-tls-stream)
14459       (nntp-port-number 563)
14460       (nntp-address "snews.bar.com"))
14461 @end lisp
14462
14463 @findex nntp-open-ssl-stream
14464 @item nntp-open-ssl-stream
14465 Opens a connection to a server over a @dfn{secure} channel.  To use
14466 this you must have @uref{http://www.openssl.org, OpenSSL} or
14467 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
14468 then define a server as follows:
14469
14470 @lisp
14471 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
14472 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
14473 ;;
14474 (nntp "snews.bar.com"
14475       (nntp-open-connection-function nntp-open-ssl-stream)
14476       (nntp-port-number 563)
14477       (nntp-address "snews.bar.com"))
14478 @end lisp
14479
14480 @findex nntp-open-netcat-stream
14481 @item nntp-open-netcat-stream
14482 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
14483 program.  You might wonder why this function exists, since we have
14484 the default @code{nntp-open-network-stream} which would do the job.  (One
14485 of) the reason(s) is that if you are behind a firewall but have direct
14486 connections to the outside world thanks to a command wrapper like
14487 @code{runsocks}, you can use it like this:
14488
14489 @lisp
14490 (nntp "socksified"
14491       (nntp-pre-command "runsocks")
14492       (nntp-open-connection-function nntp-open-netcat-stream)
14493       (nntp-address "the.news.server"))
14494 @end lisp
14495
14496 With the default method, you would need to wrap your whole Emacs
14497 session, which is not a good idea.
14498
14499 @findex nntp-open-telnet-stream
14500 @item nntp-open-telnet-stream
14501 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
14502 @code{netcat}.  @code{telnet} is a bit less robust because of things
14503 like line-end-conversion, but sometimes netcat is simply
14504 not available.  The previous example would turn into:
14505
14506 @lisp
14507 (nntp "socksified"
14508       (nntp-pre-command "runsocks")
14509       (nntp-open-connection-function nntp-open-telnet-stream)
14510       (nntp-address "the.news.server")
14511       (nntp-end-of-line "\n"))
14512 @end lisp
14513 @end table
14514
14515
14516 @node Indirect Functions
14517 @subsubsection Indirect Functions
14518 @cindex indirect connection functions
14519
14520 These functions are called indirect because they connect to an
14521 intermediate host before actually connecting to the @acronym{NNTP} server.
14522 All of these functions and related variables are also said to belong to
14523 the ``via'' family of connection: they're all prefixed with ``via'' to make
14524 things cleaner.  The behavior of these functions is also affected by
14525 commonly understood variables (@pxref{Common Variables}).
14526
14527 @table @code
14528 @item nntp-open-via-rlogin-and-netcat
14529 @findex nntp-open-via-rlogin-and-netcat
14530 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
14531 to the real @acronym{NNTP} server from there.  This is useful for instance if
14532 you need to connect to a firewall machine first.
14533
14534 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
14535
14536 @table @code
14537 @item nntp-via-rlogin-command
14538 @vindex nntp-via-rlogin-command
14539 Command used to log in on the intermediate host.  The default is
14540 @samp{rsh}, but @samp{ssh} is a popular alternative.
14541
14542 @item nntp-via-rlogin-command-switches
14543 @vindex nntp-via-rlogin-command-switches
14544 List of strings to be used as the switches to
14545 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
14546 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
14547 @samp{("-C")} in order to compress all data connections.
14548 @end table
14549
14550 @item nntp-open-via-rlogin-and-telnet
14551 @findex nntp-open-via-rlogin-and-telnet
14552 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
14553 to connect to the real @acronym{NNTP} server from the intermediate host.
14554 @code{telnet} is a bit less robust because of things like
14555 line-end-conversion, but sometimes @code{netcat} is simply not available.
14556
14557 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
14558
14559 @table @code
14560 @item nntp-telnet-command
14561 @vindex nntp-telnet-command
14562 Command used to connect to the real @acronym{NNTP} server from the
14563 intermediate host.  The default is @samp{telnet}.
14564
14565 @item nntp-telnet-switches
14566 @vindex nntp-telnet-switches
14567 List of strings to be used as the switches to the
14568 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
14569
14570 @item nntp-via-rlogin-command
14571 @vindex nntp-via-rlogin-command
14572 Command used to log in on the intermediate host.  The default is
14573 @samp{rsh}, but @samp{ssh} is a popular alternative.
14574
14575 @item nntp-via-rlogin-command-switches
14576 @vindex nntp-via-rlogin-command-switches
14577 List of strings to be used as the switches to
14578 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
14579 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
14580 the telnet command requires a pseudo-tty allocation on an intermediate
14581 host.  The default is @code{nil}.
14582 @end table
14583
14584 Note that you may want to change the value for @code{nntp-end-of-line}
14585 to @samp{\n} (@pxref{Common Variables}).
14586
14587 @item nntp-open-via-telnet-and-telnet
14588 @findex nntp-open-via-telnet-and-telnet
14589 Does essentially the same, but uses @samp{telnet} instead of
14590 @samp{rlogin} to connect to the intermediate host.
14591
14592 @code{nntp-open-via-telnet-and-telnet}-specific variables:
14593
14594 @table @code
14595 @item nntp-via-telnet-command
14596 @vindex nntp-via-telnet-command
14597 Command used to @code{telnet} the intermediate host.  The default is
14598 @samp{telnet}.
14599
14600 @item nntp-via-telnet-switches
14601 @vindex nntp-via-telnet-switches
14602 List of strings to be used as the switches to the
14603 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
14604
14605 @item nntp-via-user-password
14606 @vindex nntp-via-user-password
14607 Password to use when logging in on the intermediate host.
14608
14609 @item nntp-via-envuser
14610 @vindex nntp-via-envuser
14611 If non-@code{nil}, the intermediate @code{telnet} session (client and
14612 server both) will support the @code{ENVIRON} option and not prompt for
14613 login name.  This works for Solaris @code{telnet}, for instance.
14614
14615 @item nntp-via-shell-prompt
14616 @vindex nntp-via-shell-prompt
14617 Regexp matching the shell prompt on the intermediate host.  The default
14618 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
14619
14620 @end table
14621
14622 Note that you may want to change the value for @code{nntp-end-of-line}
14623 to @samp{\n} (@pxref{Common Variables}).
14624 @end table
14625
14626
14627 Here are some additional variables that are understood by all the above
14628 functions:
14629
14630 @table @code
14631
14632 @item nntp-via-user-name
14633 @vindex nntp-via-user-name
14634 User name to use when connecting to the intermediate host.
14635
14636 @item nntp-via-address
14637 @vindex nntp-via-address
14638 Address of the intermediate host to connect to.
14639
14640 @end table
14641
14642
14643 @node Common Variables
14644 @subsubsection Common Variables
14645
14646 The following variables affect the behavior of all, or several of the
14647 pre-made connection functions.  When not specified, all functions are
14648 affected (the values of the following variables will be used as the
14649 default if each virtual @code{nntp} server doesn't specify those server
14650 variables individually).
14651
14652 @table @code
14653
14654 @item nntp-pre-command
14655 @vindex nntp-pre-command
14656 A command wrapper to use when connecting through a non native
14657 connection function (all except @code{nntp-open-network-stream},
14658 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14659 where you would put a @samp{SOCKS} wrapper for instance.
14660
14661 @item nntp-address
14662 @vindex nntp-address
14663 The address of the @acronym{NNTP} server.
14664
14665 @item nntp-port-number
14666 @vindex nntp-port-number
14667 Port number to connect to the @acronym{NNTP} server.  The default is
14668 @samp{nntp}.  If you use @acronym{NNTP} over
14669 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14670 than named ports (i.e, use @samp{563} instead of @samp{snews} or
14671 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14672 not work with named ports.
14673
14674 @item nntp-end-of-line
14675 @vindex nntp-end-of-line
14676 String to use as end-of-line marker when talking to the @acronym{NNTP}
14677 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14678 using a non native telnet connection function.
14679
14680 @item nntp-netcat-command
14681 @vindex nntp-netcat-command
14682 Command to use when connecting to the @acronym{NNTP} server through
14683 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14684 just for the real @acronym{NNTP} server.  The default is
14685 @samp{nc}.
14686
14687 @item nntp-netcat-switches
14688 @vindex nntp-netcat-switches
14689 A list of switches to pass to @code{nntp-netcat-command}.  The default
14690 is @samp{()}.
14691
14692 @end table
14693
14694 @node NNTP marks
14695 @subsubsection NNTP marks
14696 @cindex storing NNTP marks
14697
14698 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
14699 servers in marks files.  A marks file records what marks you have set
14700 in a group and each file is specific to the corresponding server.
14701 Marks files are stored in @file{~/News/marks}
14702 (@code{nntp-marks-directory}) under a classic hierarchy resembling
14703 that of a news server, for example marks for the group
14704 @samp{gmane.discuss} on the news.gmane.org server will be stored in
14705 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
14706
14707 Marks files are useful because you can copy the @file{~/News/marks}
14708 directory (using rsync, scp or whatever) to another Gnus installation,
14709 and it will realize what articles you have read and marked.  The data
14710 in @file{~/News/marks} has priority over the same data in
14711 @file{~/.newsrc.eld}.
14712
14713 Note that marks files are very much server-specific: Gnus remembers
14714 the article numbers so if you don't use the same servers on both
14715 installations things are most likely to break (most @acronym{NNTP}
14716 servers do not use the same article numbers as any other server).
14717 However, if you use servers A, B, C on one installation and servers A,
14718 D, E on the other, you can sync the marks files for A and then you'll
14719 get synchronization for that server between the two installations.
14720
14721 Using @acronym{NNTP} marks can possibly incur a performance penalty so
14722 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
14723 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
14724
14725 Related variables:
14726
14727 @table @code
14728
14729 @item nntp-marks-is-evil
14730 @vindex nntp-marks-is-evil
14731 If non-@code{nil}, this back end will ignore any marks files.  The
14732 default is @code{nil}.
14733
14734 @item nntp-marks-directory
14735 @vindex nntp-marks-directory
14736 The directory where marks for nntp groups will be stored.
14737
14738 @end table
14739
14740
14741 @node News Spool
14742 @subsection News Spool
14743 @cindex nnspool
14744 @cindex news spool
14745
14746 Subscribing to a foreign group from the local spool is extremely easy,
14747 and might be useful, for instance, to speed up reading groups that
14748 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14749 instance.
14750
14751 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14752 anything else) as the address.
14753
14754 If you have access to a local spool, you should probably use that as the
14755 native select method (@pxref{Finding the News}).  It is normally faster
14756 than using an @code{nntp} select method, but might not be.  It depends.
14757 You just have to try to find out what's best at your site.
14758
14759 @table @code
14760
14761 @item nnspool-inews-program
14762 @vindex nnspool-inews-program
14763 Program used to post an article.
14764
14765 @item nnspool-inews-switches
14766 @vindex nnspool-inews-switches
14767 Parameters given to the inews program when posting an article.
14768
14769 @item nnspool-spool-directory
14770 @vindex nnspool-spool-directory
14771 Where @code{nnspool} looks for the articles.  This is normally
14772 @file{/usr/spool/news/}.
14773
14774 @item nnspool-nov-directory
14775 @vindex nnspool-nov-directory
14776 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14777 @file{/usr/spool/news/over.view/}.
14778
14779 @item nnspool-lib-dir
14780 @vindex nnspool-lib-dir
14781 Where the news lib dir is (@file{/usr/lib/news/} by default).
14782
14783 @item nnspool-active-file
14784 @vindex nnspool-active-file
14785 The name of the active file.
14786
14787 @item nnspool-newsgroups-file
14788 @vindex nnspool-newsgroups-file
14789 The name of the group descriptions file.
14790
14791 @item nnspool-history-file
14792 @vindex nnspool-history-file
14793 The name of the news history file.
14794
14795 @item nnspool-active-times-file
14796 @vindex nnspool-active-times-file
14797 The name of the active date file.
14798
14799 @item nnspool-nov-is-evil
14800 @vindex nnspool-nov-is-evil
14801 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14802 that it finds.
14803
14804 @item nnspool-sift-nov-with-sed
14805 @vindex nnspool-sift-nov-with-sed
14806 @cindex sed
14807 If non-@code{nil}, which is the default, use @code{sed} to get the
14808 relevant portion from the overview file.  If @code{nil},
14809 @code{nnspool} will load the entire file into a buffer and process it
14810 there.
14811
14812 @end table
14813
14814
14815 @node Getting Mail
14816 @section Getting Mail
14817 @cindex reading mail
14818 @cindex mail
14819
14820 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14821 course.
14822
14823 @menu
14824 * Mail in a Newsreader::        Important introductory notes.
14825 * Getting Started Reading Mail::  A simple cookbook example.
14826 * Splitting Mail::              How to create mail groups.
14827 * Mail Sources::                How to tell Gnus where to get mail from.
14828 * Mail Back End Variables::     Variables for customizing mail handling.
14829 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14830 * Group Mail Splitting::        Use group customize to drive mail splitting.
14831 * Incorporating Old Mail::      What about the old mail you have?
14832 * Expiring Mail::               Getting rid of unwanted mail.
14833 * Washing Mail::                Removing cruft from the mail you get.
14834 * Duplicates::                  Dealing with duplicated mail.
14835 * Not Reading Mail::            Using mail back ends for reading other files.
14836 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14837 @end menu
14838
14839
14840 @node Mail in a Newsreader
14841 @subsection Mail in a Newsreader
14842
14843 If you are used to traditional mail readers, but have decided to switch
14844 to reading mail with Gnus, you may find yourself experiencing something
14845 of a culture shock.
14846
14847 Gnus does not behave like traditional mail readers.  If you want to make
14848 it behave that way, you can, but it's an uphill battle.
14849
14850 Gnus, by default, handles all its groups using the same approach.  This
14851 approach is very newsreaderly---you enter a group, see the new/unread
14852 messages, and when you read the messages, they get marked as read, and
14853 you don't see them any more.  (Unless you explicitly ask for them.)
14854
14855 In particular, you do not do anything explicitly to delete messages.
14856
14857 Does this mean that all the messages that have been marked as read are
14858 deleted?  How awful!
14859
14860 But, no, it means that old messages are @dfn{expired} according to some
14861 scheme or other.  For news messages, the expire process is controlled by
14862 the news administrator; for mail, the expire process is controlled by
14863 you.  The expire process for mail is covered in depth in @ref{Expiring
14864 Mail}.
14865
14866 What many Gnus users find, after using it a while for both news and
14867 mail, is that the transport mechanism has very little to do with how
14868 they want to treat a message.
14869
14870 Many people subscribe to several mailing lists.  These are transported
14871 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14872 answering, or even reading these messages very carefully.  We may not
14873 need to save them because if we should need to read one again, they are
14874 archived somewhere else.
14875
14876 Some people have local news groups which have only a handful of readers.
14877 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14878 to read and answer a large fraction of the messages very carefully in
14879 order to do our work.  And there may not be an archive, so we may need
14880 to save the interesting messages the same way we would personal mail.
14881
14882 The important distinction turns out to be not the transport mechanism,
14883 but other factors such as how interested we are in the subject matter,
14884 or how easy it is to retrieve the message if we need to read it again.
14885
14886 Gnus provides many options for sorting mail into ``groups'' which behave
14887 like newsgroups, and for treating each group (whether mail or news)
14888 differently.
14889
14890 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14891 that Gnus should grow up and be a male, er, mail reader.  It is possible
14892 to whip Gnus into a more mailreaderly being, but, as said before, it's
14893 not easy.  People who prefer proper mail readers should try @sc{vm}
14894 instead, which is an excellent, and proper, mail reader.
14895
14896 I don't mean to scare anybody off, but I want to make it clear that you
14897 may be required to learn a new way of thinking about messages.  After
14898 you've been subjected to The Gnus Way, you will come to love it.  I can
14899 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14900 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14901 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14902 You Do.)
14903
14904
14905 @node Getting Started Reading Mail
14906 @subsection Getting Started Reading Mail
14907
14908 It's quite easy to use Gnus to read your new mail.  You just plonk the
14909 mail back end of your choice into @code{gnus-secondary-select-methods},
14910 and things will happen automatically.
14911
14912 For instance, if you want to use @code{nnml} (which is a ``one file per
14913 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14914
14915 @lisp
14916 (setq gnus-secondary-select-methods '((nnml "")))
14917 @end lisp
14918
14919 Now, the next time you start Gnus, this back end will be queried for new
14920 articles, and it will move all the messages in your spool file to its
14921 directory, which is @file{~/Mail/} by default.  The new group that will
14922 be created (@samp{mail.misc}) will be subscribed, and you can read it
14923 like any other group.
14924
14925 You will probably want to split the mail into several groups, though:
14926
14927 @lisp
14928 (setq nnmail-split-methods
14929       '(("junk" "^From:.*Lars Ingebrigtsen")
14930         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14931         ("other" "")))
14932 @end lisp
14933
14934 This will result in three new @code{nnml} mail groups being created:
14935 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14936 mail that doesn't fit into the first two groups will be placed in the
14937 last group.
14938
14939 This should be sufficient for reading mail with Gnus.  You might want to
14940 give the other sections in this part of the manual a perusal, though.
14941 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14942
14943
14944 @node Splitting Mail
14945 @subsection Splitting Mail
14946 @cindex splitting mail
14947 @cindex mail splitting
14948 @cindex mail filtering (splitting)
14949
14950 @vindex nnmail-split-methods
14951 The @code{nnmail-split-methods} variable says how the incoming mail is
14952 to be split into groups.
14953
14954 @lisp
14955 (setq nnmail-split-methods
14956   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14957     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14958     ("mail.other" "")))
14959 @end lisp
14960
14961 This variable is a list of lists, where the first element of each of
14962 these lists is the name of the mail group (they do not have to be called
14963 something beginning with @samp{mail}, by the way), and the second
14964 element is a regular expression used on the header of each mail to
14965 determine if it belongs in this mail group.  The first string may
14966 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14967 insert sub-expressions from the matched text.  For instance:
14968
14969 @lisp
14970 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14971 @end lisp
14972
14973 @noindent
14974 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14975 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14976
14977 The second element can also be a function.  In that case, it will be
14978 called narrowed to the headers with the first element of the rule as the
14979 argument.  It should return a non-@code{nil} value if it thinks that the
14980 mail belongs in that group.
14981
14982 @cindex @samp{bogus} group
14983 The last of these groups should always be a general one, and the regular
14984 expression should @emph{always} be @samp{""} so that it matches any mails
14985 that haven't been matched by any of the other regexps.  (These rules are
14986 processed from the beginning of the alist toward the end.  The first rule
14987 to make a match will ``win'', unless you have crossposting enabled.  In
14988 that case, all matching rules will ``win''.)  If no rule matched, the mail
14989 will end up in the @samp{bogus} group.  When new groups are created by
14990 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14991 see the new groups.  This also applies to the @samp{bogus} group.
14992
14993 If you like to tinker with this yourself, you can set this variable to a
14994 function of your choice.  This function will be called without any
14995 arguments in a buffer narrowed to the headers of an incoming mail
14996 message.  The function should return a list of group names that it
14997 thinks should carry this mail message.
14998
14999 Note that the mail back ends are free to maul the poor, innocent,
15000 incoming headers all they want to.  They all add @code{Lines} headers;
15001 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
15002 @code{From<SPACE>} line to something else.
15003
15004 @vindex nnmail-crosspost
15005 The mail back ends all support cross-posting.  If several regexps match,
15006 the mail will be ``cross-posted'' to all those groups.
15007 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
15008 that no articles are crossposted to the general (@samp{""}) group.
15009
15010 @vindex nnmail-crosspost-link-function
15011 @cindex crosspost
15012 @cindex links
15013 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
15014 the crossposted articles.  However, not all file systems support hard
15015 links.  If that's the case for you, set
15016 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
15017 variable is @code{add-name-to-file} by default.)
15018
15019 @kindex M-x nnmail-split-history
15020 @findex nnmail-split-history
15021 If you wish to see where the previous mail split put the messages, you
15022 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
15023 where re-spooling messages would put the messages, you can use
15024 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
15025 Group Commands}).
15026
15027 @vindex nnmail-split-header-length-limit
15028 Header lines longer than the value of
15029 @code{nnmail-split-header-length-limit} are excluded from the split
15030 function.
15031
15032 @vindex nnmail-mail-splitting-decodes
15033 @vindex nnmail-mail-splitting-charset
15034 By default, splitting does not decode headers, so you can not match on
15035 non-@acronym{ASCII} strings.  But it is useful if you want to match
15036 articles based on the raw header data.  To enable it, set the
15037 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
15038 In addition, the value of the @code{nnmail-mail-splitting-charset}
15039 variable is used for decoding non-@acronym{MIME} encoded string when
15040 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
15041 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
15042 string.  A suitable value for you will be @code{undecided} or be the
15043 charset used normally in mails you are interested in.
15044
15045 @vindex nnmail-resplit-incoming
15046 By default, splitting is performed on all incoming messages.  If you
15047 specify a @code{directory} entry for the variable @code{mail-sources}
15048 (@pxref{Mail Source Specifiers}), however, then splitting does
15049 @emph{not} happen by default.  You can set the variable
15050 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
15051 splitting happen even in this case.  (This variable has no effect on
15052 other kinds of entries.)
15053
15054 Gnus gives you all the opportunity you could possibly want for shooting
15055 yourself in the foot.  Let's say you create a group that will contain
15056 all the mail you get from your boss.  And then you accidentally
15057 unsubscribe from the group.  Gnus will still put all the mail from your
15058 boss in the unsubscribed group, and so, when your boss mails you ``Have
15059 that report ready by Monday or you're fired!'', you'll never see it and,
15060 come Tuesday, you'll still believe that you're gainfully employed while
15061 you really should be out collecting empty bottles to save up for next
15062 month's rent money.
15063
15064
15065 @node Mail Sources
15066 @subsection Mail Sources
15067
15068 Mail can be gotten from many different sources---the mail spool, from
15069 a @acronym{POP} mail server, from a procmail directory, or from a
15070 maildir, for instance.
15071
15072 @menu
15073 * Mail Source Specifiers::      How to specify what a mail source is.
15074 * Mail Source Customization::   Some variables that influence things.
15075 * Fetching Mail::               Using the mail source specifiers.
15076 @end menu
15077
15078
15079 @node Mail Source Specifiers
15080 @subsubsection Mail Source Specifiers
15081 @cindex POP
15082 @cindex mail server
15083 @cindex procmail
15084 @cindex mail spool
15085 @cindex mail source
15086
15087 You tell Gnus how to fetch mail by setting @code{mail-sources}
15088 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
15089
15090 Here's an example:
15091
15092 @lisp
15093 (pop :server "pop3.mailserver.com" :user "myname")
15094 @end lisp
15095
15096 As can be observed, a mail source specifier is a list where the first
15097 element is a @dfn{mail source type}, followed by an arbitrary number of
15098 @dfn{keywords}.  Keywords that are not explicitly specified are given
15099 default values.
15100
15101 The @code{mail-sources} is global for all mail groups.  You can specify
15102 an additional mail source for a particular group by including the
15103 @code{group} mail specifier in @code{mail-sources}, and setting a
15104 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
15105 a single mail source.  When this is used, @code{mail-sources} is
15106 typically just @code{(group)}; the @code{mail-source} parameter for a
15107 group might look like this:
15108
15109 @lisp
15110 (mail-source . (file :path "home/user/spools/foo.spool"))
15111 @end lisp
15112
15113 This means that the group's (and only this group's) messages will be
15114 fetched from the spool file @samp{/user/spools/foo.spool}.
15115
15116 The following mail source types are available:
15117
15118 @table @code
15119 @item file
15120 Get mail from a single file; typically from the mail spool.
15121
15122 Keywords:
15123
15124 @table @code
15125 @item :path
15126 The file name.  Defaults to the value of the @env{MAIL}
15127 environment variable or the value of @code{rmail-spool-directory}
15128 (usually something like @file{/usr/mail/spool/user-name}).
15129
15130 @item :prescript
15131 @itemx :postscript
15132 Script run before/after fetching mail.
15133 @end table
15134
15135 An example file mail source:
15136
15137 @lisp
15138 (file :path "/usr/spool/mail/user-name")
15139 @end lisp
15140
15141 Or using the default file name:
15142
15143 @lisp
15144 (file)
15145 @end lisp
15146
15147 If the mail spool file is not located on the local machine, it's best
15148 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
15149 You can not use ange-ftp file names here---it has no way to lock the
15150 mail spool while moving the mail.
15151
15152 If it's impossible to set up a proper server, you can use ssh instead.
15153
15154 @lisp
15155 (setq mail-sources
15156       '((file :prescript "ssh host bin/getmail >%t")))
15157 @end lisp
15158
15159 The @samp{getmail} script would look something like the following:
15160
15161 @example
15162 #!/bin/sh
15163 #  getmail - move mail from spool to stdout
15164 #  flu@@iki.fi
15165
15166 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
15167 TMP=$HOME/Mail/tmp
15168 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
15169 @end example
15170
15171 Alter this script to fit the @samp{movemail} and temporary
15172 file you want to use.
15173
15174
15175 @item directory
15176 @vindex nnmail-scan-directory-mail-source-once
15177 Get mail from several files in a directory.  This is typically used
15178 when you have procmail split the incoming mail into several files.
15179 That is, there is a one-to-one correspondence between files in that
15180 directory and groups, so that mail from the file @file{foo.bar.spool}
15181 will be put in the group @code{foo.bar}.  (You can change the suffix
15182 to be used instead of @code{.spool}.)  Setting
15183 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
15184 Gnus to scan the mail source only once.  This is particularly useful
15185 if you want to scan mail groups at a specified level.
15186
15187 @vindex nnmail-resplit-incoming
15188 There is also the variable @code{nnmail-resplit-incoming}, if you set
15189 that to a non-@code{nil} value, then the normal splitting process is
15190 applied to all the files from the directory, @ref{Splitting Mail}.
15191
15192 Keywords:
15193
15194 @table @code
15195 @item :path
15196 The name of the directory where the files are.  There is no default
15197 value.
15198
15199 @item :suffix
15200 Only files ending with this suffix are used.  The default is
15201 @samp{.spool}.
15202
15203 @item :predicate
15204 Only files that have this predicate return non-@code{nil} are returned.
15205 The default is @code{identity}.  This is used as an additional
15206 filter---only files that have the right suffix @emph{and} satisfy this
15207 predicate are considered.
15208
15209 @item :prescript
15210 @itemx :postscript
15211 Script run before/after fetching mail.
15212
15213 @end table
15214
15215 An example directory mail source:
15216
15217 @lisp
15218 (directory :path "/home/user-name/procmail-dir/"
15219            :suffix ".prcml")
15220 @end lisp
15221
15222 @item pop
15223 Get mail from a @acronym{POP} server.
15224
15225 Keywords:
15226
15227 @table @code
15228 @item :server
15229 The name of the @acronym{POP} server.  The default is taken from the
15230 @env{MAILHOST} environment variable.
15231
15232 @item :port
15233 The port number of the @acronym{POP} server.  This can be a number (eg,
15234 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
15235 string, it should be a service name as listed in @file{/etc/services} on
15236 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
15237 need to specify it as @samp{"pop-3"} instead.
15238
15239 @item :user
15240 The user name to give to the @acronym{POP} server.  The default is the login
15241 name.
15242
15243 @item :password
15244 The password to give to the @acronym{POP} server.  If not specified,
15245 the user is prompted.
15246
15247 @item :program
15248 The program to use to fetch mail from the @acronym{POP} server.  This
15249 should be a @code{format}-like string.  Here's an example:
15250
15251 @example
15252 fetchmail %u@@%s -P %p %t
15253 @end example
15254
15255 The valid format specifier characters are:
15256
15257 @table @samp
15258 @item t
15259 The name of the file the mail is to be moved to.  This must always be
15260 included in this string.
15261
15262 @item s
15263 The name of the server.
15264
15265 @item P
15266 The port number of the server.
15267
15268 @item u
15269 The user name to use.
15270
15271 @item p
15272 The password to use.
15273 @end table
15274
15275 The values used for these specs are taken from the values you give the
15276 corresponding keywords.
15277
15278 @item :prescript
15279 A script to be run before fetching the mail.  The syntax is the same as
15280 the @code{:program} keyword.  This can also be a function to be run.
15281
15282 @item :postscript
15283 A script to be run after fetching the mail.  The syntax is the same as
15284 the @code{:program} keyword.  This can also be a function to be run.
15285
15286 @item :function
15287 The function to use to fetch mail from the @acronym{POP} server.  The
15288 function is called with one parameter---the name of the file where the
15289 mail should be moved to.
15290
15291 @item :authentication
15292 This can be either the symbol @code{password} or the symbol @code{apop}
15293 and says what authentication scheme to use.  The default is
15294 @code{password}.
15295
15296 @end table
15297
15298 @vindex pop3-movemail
15299 @vindex pop3-leave-mail-on-server
15300 If the @code{:program} and @code{:function} keywords aren't specified,
15301 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
15302 is non-@code{nil} the mail is to be left on the @acronym{POP} server
15303 after fetching when using @code{pop3-movemail}.  Note that POP servers
15304 maintain no state information between sessions, so what the client
15305 believes is there and what is actually there may not match up.  If they
15306 do not, then you may get duplicate mails or the whole thing can fall
15307 apart and leave you with a corrupt mailbox.
15308
15309 Here are some examples for getting mail from a @acronym{POP} server.
15310 Fetch from the default @acronym{POP} server, using the default user
15311 name, and default fetcher:
15312
15313 @lisp
15314 (pop)
15315 @end lisp
15316
15317 Fetch from a named server with a named user and password:
15318
15319 @lisp
15320 (pop :server "my.pop.server"
15321      :user "user-name" :password "secret")
15322 @end lisp
15323
15324 Use @samp{movemail} to move the mail:
15325
15326 @lisp
15327 (pop :program "movemail po:%u %t %p")
15328 @end lisp
15329
15330 @item maildir
15331 Get mail from a maildir.  This is a type of mailbox that is supported by
15332 at least qmail and postfix, where each file in a special directory
15333 contains exactly one mail.
15334
15335 Keywords:
15336
15337 @table @code
15338 @item :path
15339 The name of the directory where the mails are stored.  The default is
15340 taken from the @env{MAILDIR} environment variable or
15341 @file{~/Maildir/}.
15342 @item :subdirs
15343 The subdirectories of the Maildir.  The default is
15344 @samp{("new" "cur")}.
15345
15346 @c If you sometimes look at your mail through a pop3 daemon before fetching
15347 @c them with Gnus, you may also have to fetch your mails from the
15348 @c @code{cur} directory inside the maildir, like in the first example
15349 @c below.
15350
15351 You can also get mails from remote hosts (because maildirs don't suffer
15352 from locking problems).
15353
15354 @end table
15355
15356 Two example maildir mail sources:
15357
15358 @lisp
15359 (maildir :path "/home/user-name/Maildir/"
15360          :subdirs ("cur" "new"))
15361 @end lisp
15362
15363 @lisp
15364 (maildir :path "/user@@remotehost.org:~/Maildir/"
15365          :subdirs ("new"))
15366 @end lisp
15367
15368 @item imap
15369 Get mail from a @acronym{IMAP} server.  If you don't want to use
15370 @acronym{IMAP} as intended, as a network mail reading protocol (ie
15371 with nnimap), for some reason or other, Gnus let you treat it similar
15372 to a @acronym{POP} server and fetches articles from a given
15373 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
15374
15375 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
15376 may need external programs and libraries, @xref{IMAP}.
15377
15378 Keywords:
15379
15380 @table @code
15381 @item :server
15382 The name of the @acronym{IMAP} server.  The default is taken from the
15383 @env{MAILHOST} environment variable.
15384
15385 @item :port
15386 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
15387 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
15388
15389 @item :user
15390 The user name to give to the @acronym{IMAP} server.  The default is the login
15391 name.
15392
15393 @item :password
15394 The password to give to the @acronym{IMAP} server.  If not specified, the user is
15395 prompted.
15396
15397 @item :stream
15398 What stream to use for connecting to the server, this is one of the
15399 symbols in @code{imap-stream-alist}.  Right now, this means
15400 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
15401 @samp{ssl}, @samp{shell} or the default @samp{network}.
15402
15403 @item :authentication
15404 Which authenticator to use for authenticating to the server, this is
15405 one of the symbols in @code{imap-authenticator-alist}.  Right now,
15406 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
15407 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
15408
15409 @item :program
15410 When using the `shell' :stream, the contents of this variable is
15411 mapped into the @code{imap-shell-program} variable.  This should be a
15412 @code{format}-like string (or list of strings).  Here's an example:
15413
15414 @example
15415 ssh %s imapd
15416 @end example
15417
15418 Make sure nothing is interfering with the output of the program, e.g.,
15419 don't forget to redirect the error output to the void.  The valid format
15420 specifier characters are:
15421
15422 @table @samp
15423 @item s
15424 The name of the server.
15425
15426 @item l
15427 User name from @code{imap-default-user}.
15428
15429 @item p
15430 The port number of the server.
15431 @end table
15432
15433 The values used for these specs are taken from the values you give the
15434 corresponding keywords.
15435
15436 @item :mailbox
15437 The name of the mailbox to get mail from.  The default is @samp{INBOX}
15438 which normally is the mailbox which receives incoming mail.
15439
15440 @item :predicate
15441 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
15442 UNDELETED}, is probably the best choice for most people, but if you
15443 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
15444 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
15445 Then all articles in the mailbox is fetched, no matter what.  For a
15446 complete list of predicates, see RFC 2060 section 6.4.4.
15447
15448 @item :fetchflag
15449 How to flag fetched articles on the server, the default @samp{\Deleted}
15450 will mark them as deleted, an alternative would be @samp{\Seen} which
15451 would simply mark them as read.  These are the two most likely choices,
15452 but more flags are defined in RFC 2060 section 2.3.2.
15453
15454 @item :dontexpunge
15455 If non-@code{nil}, don't remove all articles marked as deleted in the
15456 mailbox after finishing the fetch.
15457
15458 @end table
15459
15460 An example @acronym{IMAP} mail source:
15461
15462 @lisp
15463 (imap :server "mail.mycorp.com"
15464       :stream kerberos4
15465       :fetchflag "\\Seen")
15466 @end lisp
15467
15468 @item webmail
15469 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
15470 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
15471 @uref{http://mail.yahoo.com/}.
15472
15473 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
15474 required for url "4.0pre.46".
15475
15476 WARNING: Mails may be lost.  NO WARRANTY.
15477
15478 Keywords:
15479
15480 @table @code
15481 @item :subtype
15482 The type of the webmail server.  The default is @code{hotmail}.  The
15483 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
15484
15485 @item :user
15486 The user name to give to the webmail server.  The default is the login
15487 name.
15488
15489 @item :password
15490 The password to give to the webmail server.  If not specified, the user is
15491 prompted.
15492
15493 @item :dontexpunge
15494 If non-@code{nil}, only fetch unread articles and don't move them to
15495 trash folder after finishing the fetch.
15496
15497 @end table
15498
15499 An example webmail source:
15500
15501 @lisp
15502 (webmail :subtype 'hotmail
15503          :user "user-name"
15504          :password "secret")
15505 @end lisp
15506
15507 @item group
15508 Get the actual mail source from the @code{mail-source} group parameter,
15509 @xref{Group Parameters}.
15510
15511 @end table
15512
15513 @table @dfn
15514 @item Common Keywords
15515 Common keywords can be used in any type of mail source.
15516
15517 Keywords:
15518
15519 @table @code
15520 @item :plugged
15521 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
15522 use directory source to get mail, you can specify it as in this
15523 example:
15524
15525 @lisp
15526 (setq mail-sources
15527       '((directory :path "/home/pavel/.Spool/"
15528                    :suffix ""
15529                    :plugged t)))
15530 @end lisp
15531
15532 Gnus will then fetch your mail even when you are unplugged.  This is
15533 useful when you use local mail and news.
15534
15535 @end table
15536 @end table
15537
15538 @subsubsection Function Interface
15539
15540 Some of the above keywords specify a Lisp function to be executed.
15541 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15542 the value of the keyword while the function is executing.  For example,
15543 consider the following mail-source setting:
15544
15545 @lisp
15546 (setq mail-sources '((pop :user "jrl"
15547                           :server "pophost" :function fetchfunc)))
15548 @end lisp
15549
15550 While the function @code{fetchfunc} is executing, the symbol @code{user}
15551 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15552 @code{"pophost"}.  The symbols @code{port}, @code{password},
15553 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15554 and @code{authentication} are also bound (to their default values).
15555
15556 See above for a list of keywords for each type of mail source.
15557
15558
15559 @node Mail Source Customization
15560 @subsubsection Mail Source Customization
15561
15562 The following is a list of variables that influence how the mail is
15563 fetched.  You would normally not need to set or change any of these
15564 variables.
15565
15566 @table @code
15567 @item mail-source-crash-box
15568 @vindex mail-source-crash-box
15569 File where mail will be stored while processing it.  The default is@*
15570 @file{~/.emacs-mail-crash-box}.
15571
15572 @cindex Incoming*
15573 @item mail-source-delete-incoming
15574 @vindex mail-source-delete-incoming
15575 If non-@code{nil}, delete incoming files after handling them.  If
15576 @code{t}, delete the files immediately, if @code{nil}, never delete any
15577 files.  If a positive number, delete files older than number of days
15578 (the deletion will only happen when receiving new mail).  You may also
15579 set @code{mail-source-delete-incoming} to @code{nil} and call
15580 @code{mail-source-delete-old-incoming} from a hook or interactively.
15581 @code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15582 and @code{2} in released Gnusae.  @xref{Gnus Development}.
15583
15584 @item mail-source-delete-old-incoming-confirm
15585 @vindex mail-source-delete-old-incoming-confirm
15586 If non-@code{nil}, ask for confirmation before deleting old incoming
15587 files.  This variable only applies when
15588 @code{mail-source-delete-incoming} is a positive number.
15589
15590 @item mail-source-ignore-errors
15591 @vindex mail-source-ignore-errors
15592 If non-@code{nil}, ignore errors when reading mail from a mail source.
15593
15594 @item mail-source-directory
15595 @vindex mail-source-directory
15596 Directory where incoming mail source files (if any) will be stored.  The
15597 default is @file{~/Mail/}.  At present, the only thing this is used for
15598 is to say where the incoming files will be stored if the variable
15599 @code{mail-source-delete-incoming} is @code{nil} or a number.
15600
15601 @item mail-source-incoming-file-prefix
15602 @vindex mail-source-incoming-file-prefix
15603 Prefix for file name for storing incoming mail.  The default is
15604 @file{Incoming}, in which case files will end up with names like
15605 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15606 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15607 number.
15608
15609 @item mail-source-default-file-modes
15610 @vindex mail-source-default-file-modes
15611 All new mail files will get this file mode.  The default is 384.
15612
15613 @item mail-source-movemail-program
15614 @vindex mail-source-movemail-program
15615 If non-@code{nil}, name of program for fetching new mail.  If
15616 @code{nil}, @code{movemail} in @var{exec-directory}.
15617
15618 @end table
15619
15620
15621 @node Fetching Mail
15622 @subsubsection Fetching Mail
15623
15624 @vindex mail-sources
15625 The way to actually tell Gnus where to get new mail from is to set
15626 @code{mail-sources} to a list of mail source specifiers
15627 (@pxref{Mail Source Specifiers}).
15628
15629 If this variable is @code{nil}, the mail back ends will never attempt to
15630 fetch mail by themselves.
15631
15632 If you want to fetch mail both from your local spool as well as a
15633 @acronym{POP} mail server, you'd say something like:
15634
15635 @lisp
15636 (setq mail-sources
15637       '((file)
15638         (pop :server "pop3.mail.server"
15639              :password "secret")))
15640 @end lisp
15641
15642 Or, if you don't want to use any of the keyword defaults:
15643
15644 @lisp
15645 (setq mail-sources
15646       '((file :path "/var/spool/mail/user-name")
15647         (pop :server "pop3.mail.server"
15648              :user "user-name"
15649              :port "pop3"
15650              :password "secret")))
15651 @end lisp
15652
15653
15654 When you use a mail back end, Gnus will slurp all your mail from your
15655 inbox and plonk it down in your home directory.  Gnus doesn't move any
15656 mail if you're not using a mail back end---you have to do a lot of magic
15657 invocations first.  At the time when you have finished drawing the
15658 pentagram, lightened the candles, and sacrificed the goat, you really
15659 shouldn't be too surprised when Gnus moves your mail.
15660
15661
15662
15663 @node Mail Back End Variables
15664 @subsection Mail Back End Variables
15665
15666 These variables are (for the most part) pertinent to all the various
15667 mail back ends.
15668
15669 @table @code
15670 @vindex nnmail-read-incoming-hook
15671 @item nnmail-read-incoming-hook
15672 The mail back ends all call this hook after reading new mail.  You can
15673 use this hook to notify any mail watch programs, if you want to.
15674
15675 @vindex nnmail-split-hook
15676 @item nnmail-split-hook
15677 @findex gnus-article-decode-encoded-words
15678 @cindex RFC 1522 decoding
15679 @cindex RFC 2047 decoding
15680 Hook run in the buffer where the mail headers of each message is kept
15681 just before the splitting based on these headers is done.  The hook is
15682 free to modify the buffer contents in any way it sees fit---the buffer
15683 is discarded after the splitting has been done, and no changes performed
15684 in the buffer will show up in any files.
15685 @code{gnus-article-decode-encoded-words} is one likely function to add
15686 to this hook.
15687
15688 @vindex nnmail-pre-get-new-mail-hook
15689 @vindex nnmail-post-get-new-mail-hook
15690 @item nnmail-pre-get-new-mail-hook
15691 @itemx nnmail-post-get-new-mail-hook
15692 These are two useful hooks executed when treating new incoming
15693 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15694 starting to handle the new mail) and
15695 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15696 is done).  Here's and example of using these two hooks to change the
15697 default file modes the new mail files get:
15698
15699 @lisp
15700 (add-hook 'nnmail-pre-get-new-mail-hook
15701           (lambda () (set-default-file-modes 511)))
15702
15703 (add-hook 'nnmail-post-get-new-mail-hook
15704           (lambda () (set-default-file-modes 551)))
15705 @end lisp
15706
15707 @item nnmail-use-long-file-names
15708 @vindex nnmail-use-long-file-names
15709 If non-@code{nil}, the mail back ends will use long file and directory
15710 names.  Groups like @samp{mail.misc} will end up in directories
15711 (assuming use of @code{nnml} back end) or files (assuming use of
15712 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15713 the same group will end up in @file{mail/misc}.
15714
15715 @item nnmail-delete-file-function
15716 @vindex nnmail-delete-file-function
15717 @findex delete-file
15718 Function called to delete files.  It is @code{delete-file} by default.
15719
15720 @item nnmail-cache-accepted-message-ids
15721 @vindex nnmail-cache-accepted-message-ids
15722 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15723 the back end (via @code{Gcc}, for instance) into the mail duplication
15724 discovery cache.  The default is @code{nil}.
15725
15726 @item nnmail-cache-ignore-groups
15727 @vindex nnmail-cache-ignore-groups
15728 This can be a regular expression or a list of regular expressions.
15729 Group names that match any of the regular expressions will never be
15730 recorded in the @code{Message-ID} cache.
15731
15732 This can be useful, for example, when using Fancy Splitting
15733 (@pxref{Fancy Mail Splitting}) together with the function
15734 @code{nnmail-split-fancy-with-parent}.
15735
15736 @end table
15737
15738
15739 @node Fancy Mail Splitting
15740 @subsection Fancy Mail Splitting
15741 @cindex mail splitting
15742 @cindex fancy mail splitting
15743
15744 @vindex nnmail-split-fancy
15745 @findex nnmail-split-fancy
15746 If the rather simple, standard method for specifying how to split mail
15747 doesn't allow you to do what you want, you can set
15748 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15749 play with the @code{nnmail-split-fancy} variable.
15750
15751 Let's look at an example value of this variable first:
15752
15753 @lisp
15754 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15755 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15756 ;; @r{from real errors.}
15757 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15758                    "mail.misc"))
15759    ;; @r{Non-error messages are crossposted to all relevant}
15760    ;; @r{groups, but we don't crosspost between the group for the}
15761    ;; @r{(ding) list and the group for other (ding) related mail.}
15762    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15763          ("subject" "ding" "ding.misc"))
15764       ;; @r{Other mailing lists@dots{}}
15765       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15766       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15767       ;; @r{Both lists below have the same suffix, so prevent}
15768       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15769       ;; @r{the bugs- list, but allow cross-posting when the}
15770       ;; @r{message was really cross-posted.}
15771       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15772       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15773       ;; @r{People@dots{}}
15774       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15775    ;; @r{Unmatched mail goes to the catch all group.}
15776    "misc.misc")
15777 @end lisp
15778
15779 This variable has the format of a @dfn{split}.  A split is a
15780 (possibly) recursive structure where each split may contain other
15781 splits.  Here are the possible split syntaxes:
15782
15783 @table @code
15784
15785 @item group
15786 If the split is a string, that will be taken as a group name.  Normal
15787 regexp match expansion will be done.  See below for examples.
15788
15789 @c Don't fold this line.
15790 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15791 The split can be a list containing at least three elements.  If the
15792 first element @var{field} (a regexp matching a header) contains
15793 @var{value} (also a regexp) then store the message as specified by
15794 @var{split}.
15795
15796 If @var{restrict} (yet another regexp) matches some string after
15797 @var{field} and before the end of the matched @var{value}, the
15798 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15799 @var{split} is processed.
15800
15801 The last element @var{invert-partial} is optional.  If it is
15802 non-@code{nil}, the match-partial-words behavior controlled by the
15803 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15804 be inverted.  (New in Gnus 5.10.7)
15805
15806 @item (| @var{split} @dots{})
15807 If the split is a list, and the first element is @code{|} (vertical
15808 bar), then process each @var{split} until one of them matches.  A
15809 @var{split} is said to match if it will cause the mail message to be
15810 stored in one or more groups.
15811
15812 @item (& @var{split} @dots{})
15813 If the split is a list, and the first element is @code{&}, then
15814 process all @var{split}s in the list.
15815
15816 @item junk
15817 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15818 this message.  Use with extreme caution.
15819
15820 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15821 If the split is a list, and the first element is @samp{:}, then the
15822 second element will be called as a function with @var{args} given as
15823 arguments.  The function should return a @var{split}.
15824
15825 @cindex body split
15826 For instance, the following function could be used to split based on the
15827 body of the messages:
15828
15829 @lisp
15830 (defun split-on-body ()
15831   (save-excursion
15832     (save-restriction
15833       (widen)
15834       (goto-char (point-min))
15835       (when (re-search-forward "Some.*string" nil t)
15836         "string.group"))))
15837 @end lisp
15838
15839 The buffer is narrowed to the header of the message in question when
15840 @var{function} is run.  That's why @code{(widen)} needs to be called
15841 after @code{save-excursion} and @code{save-restriction} in the example
15842 above.  Also note that with the nnimap backend, message bodies will
15843 not be downloaded by default.  You need to set
15844 @code{nnimap-split-download-body} to @code{t} to do that
15845 (@pxref{Splitting in IMAP}).
15846
15847 @item (! @var{func} @var{split})
15848 If the split is a list, and the first element is @code{!}, then
15849 @var{split} will be processed, and @var{func} will be called as a
15850 function with the result of @var{split} as argument.  @var{func}
15851 should return a split.
15852
15853 @item nil
15854 If the split is @code{nil}, it is ignored.
15855
15856 @end table
15857
15858 In these splits, @var{field} must match a complete field name.
15859
15860 Normally, @var{value} in these splits must match a complete @emph{word}
15861 according to the fundamental mode syntax table.  In other words, all
15862 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15863 which are word delimiters.  Therefore, if you use the following split,
15864 for example,
15865
15866 @example
15867 (any "joe" "joemail")
15868 @end example
15869
15870 @noindent
15871 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15872 in @samp{joemail}.  If you want to alter this behavior, you can use any
15873 of the following three ways:
15874
15875 @enumerate
15876 @item
15877 @vindex nnmail-split-fancy-match-partial-words
15878 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15879 to non-@code{nil} in order to ignore word boundaries and instead the
15880 match becomes more like a grep.  This variable controls whether partial
15881 words are matched during fancy splitting.  The default value is
15882 @code{nil}.
15883
15884 Note that it influences all @var{value}'s in your split rules.
15885
15886 @item
15887 @var{value} beginning with @code{.*} ignores word boundaries in front of
15888 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15889 in the rear of a word will be ignored.  For example, the @var{value}
15890 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15891 @code{".*@@example\\.com"} does.
15892
15893 @item
15894 You can set the @var{invert-partial} flag in your split rules of the
15895 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15896 section.  If the flag is set, word boundaries on both sides of a word
15897 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15898 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15899 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15900 non-@code{nil}.  (New in Gnus 5.10.7)
15901 @end enumerate
15902
15903 @vindex nnmail-split-abbrev-alist
15904 @var{field} and @var{value} can also be Lisp symbols, in that case
15905 they are expanded as specified by the variable
15906 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15907 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15908 contains the associated value.  Predefined entries in
15909 @code{nnmail-split-abbrev-alist} include:
15910
15911 @table @code
15912 @item from
15913 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15914 @item to
15915 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15916 @samp{Resent-To} and @samp{Resent-Cc} fields.
15917 @item any
15918 Is the union of the @code{from} and @code{to} entries.
15919 @end table
15920
15921 @vindex nnmail-split-fancy-syntax-table
15922 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15923 when all this splitting is performed.
15924
15925 If you want to have Gnus create groups dynamically based on some
15926 information in the headers (i.e., do @code{replace-match}-like
15927 substitutions in the group names), you can say things like:
15928
15929 @example
15930 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15931 @end example
15932
15933 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15934 will be filed in @samp{mail.debian.foo}.
15935
15936 If the string contains the element @samp{\&}, then the previously
15937 matched string will be substituted.  Similarly, the elements @samp{\\1}
15938 up to @samp{\\9} will be substituted with the text matched by the
15939 groupings 1 through 9.
15940
15941 @vindex nnmail-split-lowercase-expanded
15942 Where @code{nnmail-split-lowercase-expanded} controls whether the
15943 lowercase of the matched string should be used for the substitution.
15944 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15945 groups when users send to an address using different case
15946 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15947 is @code{t}.
15948
15949 @findex nnmail-split-fancy-with-parent
15950 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15951 split followups into the same groups their parents are in.  Sometimes
15952 you can't make splitting rules for all your mail.  For example, your
15953 boss might send you personal mail regarding different projects you are
15954 working on, and as you can't tell your boss to put a distinguishing
15955 string into the subject line, you have to resort to manually moving the
15956 messages into the right group.  With this function, you only have to do
15957 it once per thread.
15958
15959 To use this feature, you have to set @code{nnmail-treat-duplicates}
15960 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15961 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15962 using the colon feature, like so:
15963 @lisp
15964 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15965       nnmail-cache-accepted-message-ids t
15966       nnmail-split-fancy
15967       '(| (: nnmail-split-fancy-with-parent)
15968           ;; @r{other splits go here}
15969         ))
15970 @end lisp
15971
15972 This feature works as follows: when @code{nnmail-treat-duplicates} is
15973 non-@code{nil}, Gnus records the message id of every message it sees
15974 in the file specified by the variable
15975 @code{nnmail-message-id-cache-file}, together with the group it is in
15976 (the group is omitted for non-mail messages).  When mail splitting is
15977 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15978 at the References (and In-Reply-To) header of each message to split
15979 and searches the file specified by @code{nnmail-message-id-cache-file}
15980 for the message ids.  When it has found a parent, it returns the
15981 corresponding group name unless the group name matches the regexp
15982 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15983 recommended that you set @code{nnmail-message-id-cache-length} to a
15984 somewhat higher number than the default so that the message ids are
15985 still in the cache.  (A value of 5000 appears to create a file some
15986 300 kBytes in size.)
15987 @vindex nnmail-cache-accepted-message-ids
15988 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15989 also records the message ids of moved articles, so that the followup
15990 messages goes into the new group.
15991
15992 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15993 want certain groups to be recorded in the cache.  For example, if all
15994 outgoing messages are written to an ``outgoing'' group, you could set
15995 @code{nnmail-cache-ignore-groups} to match that group name.
15996 Otherwise, answers to all your messages would end up in the
15997 ``outgoing'' group.
15998
15999
16000 @node Group Mail Splitting
16001 @subsection Group Mail Splitting
16002 @cindex mail splitting
16003 @cindex group mail splitting
16004
16005 @findex gnus-group-split
16006 If you subscribe to dozens of mailing lists but you don't want to
16007 maintain mail splitting rules manually, group mail splitting is for you.
16008 You just have to set @code{to-list} and/or @code{to-address} in group
16009 parameters or group customization and set @code{nnmail-split-methods} to
16010 @code{gnus-group-split}.  This splitting function will scan all groups
16011 for those parameters and split mail accordingly, i.e., messages posted
16012 from or to the addresses specified in the parameters @code{to-list} or
16013 @code{to-address} of a mail group will be stored in that group.
16014
16015 Sometimes, mailing lists have multiple addresses, and you may want mail
16016 splitting to recognize them all: just set the @code{extra-aliases} group
16017 parameter to the list of additional addresses and it's done.  If you'd
16018 rather use a regular expression, set @code{split-regexp}.
16019
16020 All these parameters in a group will be used to create an
16021 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
16022 the @var{value} is a single regular expression that matches
16023 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
16024 matches of @code{split-regexp}, and the @var{split} is the name of the
16025 group.  @var{restrict}s are also supported: just set the
16026 @code{split-exclude} parameter to a list of regular expressions.
16027
16028 If you can't get the right split to be generated using all these
16029 parameters, or you just need something fancier, you can set the
16030 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
16031 this case, all other aforementioned parameters will be ignored by
16032 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
16033 @code{nil}, in which case the group will be ignored by
16034 @code{gnus-group-split}.
16035
16036 @vindex gnus-group-split-default-catch-all-group
16037 @code{gnus-group-split} will do cross-posting on all groups that match,
16038 by defining a single @code{&} fancy split containing one split for each
16039 group.  If a message doesn't match any split, it will be stored in the
16040 group named in @code{gnus-group-split-default-catch-all-group}, unless
16041 some group has @code{split-spec} set to @code{catch-all}, in which case
16042 that group is used as the catch-all group.  Even though this variable is
16043 often used just to name a group, it may also be set to an arbitrarily
16044 complex fancy split (after all, a group name is a fancy split), and this
16045 may be useful to split mail that doesn't go to any mailing list to
16046 personal mail folders.  Note that this fancy split is added as the last
16047 element of a @code{|} split list that also contains a @code{&} split
16048 with the rules extracted from group parameters.
16049
16050 It's time for an example.  Assume the following group parameters have
16051 been defined:
16052
16053 @example
16054 nnml:mail.bar:
16055 ((to-address . "bar@@femail.com")
16056  (split-regexp . ".*@@femail\\.com"))
16057 nnml:mail.foo:
16058 ((to-list . "foo@@nowhere.gov")
16059  (extra-aliases "foo@@localhost" "foo-redist@@home")
16060  (split-exclude "bugs-foo" "rambling-foo")
16061  (admin-address . "foo-request@@nowhere.gov"))
16062 nnml:mail.others:
16063 ((split-spec . catch-all))
16064 @end example
16065
16066 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
16067 behave as if @code{nnmail-split-fancy} had been selected and variable
16068 @code{nnmail-split-fancy} had been set as follows:
16069
16070 @lisp
16071 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
16072       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
16073            - "bugs-foo" - "rambling-foo" "mail.foo"))
16074    "mail.others")
16075 @end lisp
16076
16077 @findex gnus-group-split-fancy
16078 If you'd rather not use group splitting for all your mail groups, you
16079 may use it for only some of them, by using @code{nnmail-split-fancy}
16080 splits like this:
16081
16082 @lisp
16083 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
16084 @end lisp
16085
16086 @var{groups} may be a regular expression or a list of group names whose
16087 parameters will be scanned to generate the output split.
16088 @var{no-crosspost} can be used to disable cross-posting; in this case, a
16089 single @code{|} split will be output.  @var{catch-all} is the fall back
16090 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
16091 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
16092 empty string in any selected group, no catch-all split will be issued.
16093 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
16094 this group will override the value of the @var{catch-all} argument.
16095
16096 @findex gnus-group-split-setup
16097 Unfortunately, scanning all groups and their parameters can be quite
16098 slow, especially considering that it has to be done for every message.
16099 But don't despair!  The function @code{gnus-group-split-setup} can be
16100 used to enable @code{gnus-group-split} in a much more efficient way.  It
16101 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
16102 @code{nnmail-split-fancy} to the split produced by
16103 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
16104 scanned once, no matter how many messages are split.
16105
16106 @findex gnus-group-split-update
16107 However, if you change group parameters, you'd have to update
16108 @code{nnmail-split-fancy} manually.  You can do it by running
16109 @code{gnus-group-split-update}.  If you'd rather have it updated
16110 automatically, just tell @code{gnus-group-split-setup} to do it for
16111 you.  For example, add to your @file{~/.gnus.el}:
16112
16113 @lisp
16114 (gnus-group-split-setup @var{auto-update} @var{catch-all})
16115 @end lisp
16116
16117 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
16118 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
16119 have to worry about updating @code{nnmail-split-fancy} again.  If you
16120 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
16121 @code{gnus-group-split-default-catch-all-group} will be set to its
16122 value.
16123
16124 @vindex gnus-group-split-updated-hook
16125 Because you may want to change @code{nnmail-split-fancy} after it is set
16126 by @code{gnus-group-split-update}, this function will run
16127 @code{gnus-group-split-updated-hook} just before finishing.
16128
16129 @node Incorporating Old Mail
16130 @subsection Incorporating Old Mail
16131 @cindex incorporating old mail
16132 @cindex import old mail
16133
16134 Most people have lots of old mail stored in various file formats.  If
16135 you have set up Gnus to read mail using one of the spiffy Gnus mail
16136 back ends, you'll probably wish to have that old mail incorporated into
16137 your mail groups.
16138
16139 Doing so can be quite easy.
16140
16141 To take an example: You're reading mail using @code{nnml}
16142 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
16143 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
16144 file filled with important, but old, mail.  You want to move it into
16145 your @code{nnml} groups.
16146
16147 Here's how:
16148
16149 @enumerate
16150 @item
16151 Go to the group buffer.
16152
16153 @item
16154 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
16155 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
16156
16157 @item
16158 Type @kbd{SPACE} to enter the newly created group.
16159
16160 @item
16161 Type @kbd{M P b} to process-mark all articles in this group's buffer
16162 (@pxref{Setting Process Marks}).
16163
16164 @item
16165 Type @kbd{B r} to respool all the process-marked articles, and answer
16166 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
16167 @end enumerate
16168
16169 All the mail messages in the mbox file will now also be spread out over
16170 all your @code{nnml} groups.  Try entering them and check whether things
16171 have gone without a glitch.  If things look ok, you may consider
16172 deleting the mbox file, but I wouldn't do that unless I was absolutely
16173 sure that all the mail has ended up where it should be.
16174
16175 Respooling is also a handy thing to do if you're switching from one mail
16176 back end to another.  Just respool all the mail in the old mail groups
16177 using the new mail back end.
16178
16179
16180 @node Expiring Mail
16181 @subsection Expiring Mail
16182 @cindex article expiry
16183 @cindex expiring mail
16184
16185 Traditional mail readers have a tendency to remove mail articles when
16186 you mark them as read, in some way.  Gnus takes a fundamentally
16187 different approach to mail reading.
16188
16189 Gnus basically considers mail just to be news that has been received in
16190 a rather peculiar manner.  It does not think that it has the power to
16191 actually change the mail, or delete any mail messages.  If you enter a
16192 mail group, and mark articles as ``read'', or kill them in some other
16193 fashion, the mail articles will still exist on the system.  I repeat:
16194 Gnus will not delete your old, read mail.  Unless you ask it to, of
16195 course.
16196
16197 To make Gnus get rid of your unwanted mail, you have to mark the
16198 articles as @dfn{expirable}.  (With the default key bindings, this means
16199 that you have to type @kbd{E}.)  This does not mean that the articles
16200 will disappear right away, however.  In general, a mail article will be
16201 deleted from your system if, 1) it is marked as expirable, AND 2) it is
16202 more than one week old.  If you do not mark an article as expirable, it
16203 will remain on your system until hell freezes over.  This bears
16204 repeating one more time, with some spurious capitalizations: IF you do
16205 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
16206
16207 You do not have to mark articles as expirable by hand.  Gnus provides
16208 two features, called ``auto-expire'' and ``total-expire'', that can help you
16209 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
16210 for you when you select an article.  And ``total-expire'' means that Gnus
16211 considers all articles as expirable that are read.  So, in addition to
16212 the articles marked @samp{E}, also the articles marked @samp{r},
16213 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
16214 expirable.
16215
16216 When should either auto-expire or total-expire be used?  Most people
16217 who are subscribed to mailing lists split each list into its own group
16218 and then turn on auto-expire or total-expire for those groups.
16219 (@xref{Splitting Mail}, for more information on splitting each list
16220 into its own group.)
16221
16222 Which one is better, auto-expire or total-expire?  It's not easy to
16223 answer.  Generally speaking, auto-expire is probably faster.  Another
16224 advantage of auto-expire is that you get more marks to work with: for
16225 the articles that are supposed to stick around, you can still choose
16226 between tick and dormant and read marks.  But with total-expire, you
16227 only have dormant and ticked to choose from.  The advantage of
16228 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
16229 Scoring}).  Auto-expire works with normal scoring but not with adaptive
16230 scoring.
16231
16232 @vindex gnus-auto-expirable-newsgroups
16233 Groups that match the regular expression
16234 @code{gnus-auto-expirable-newsgroups} will have all articles that you
16235 read marked as expirable automatically.  All articles marked as
16236 expirable have an @samp{E} in the first column in the summary buffer.
16237
16238 By default, if you have auto expiry switched on, Gnus will mark all the
16239 articles you read as expirable, no matter if they were read or unread
16240 before.  To avoid having articles marked as read marked as expirable
16241 automatically, you can put something like the following in your
16242 @file{~/.gnus.el} file:
16243
16244 @vindex gnus-mark-article-hook
16245 @lisp
16246 (remove-hook 'gnus-mark-article-hook
16247              'gnus-summary-mark-read-and-unread-as-read)
16248 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
16249 @end lisp
16250
16251 Note that making a group auto-expirable doesn't mean that all read
16252 articles are expired---only the articles marked as expirable
16253 will be expired.  Also note that using the @kbd{d} command won't make
16254 articles expirable---only semi-automatic marking of articles as read will
16255 mark the articles as expirable in auto-expirable groups.
16256
16257 Let's say you subscribe to a couple of mailing lists, and you want the
16258 articles you have read to disappear after a while:
16259
16260 @lisp
16261 (setq gnus-auto-expirable-newsgroups
16262       "mail.nonsense-list\\|mail.nice-list")
16263 @end lisp
16264
16265 Another way to have auto-expiry happen is to have the element
16266 @code{auto-expire} in the group parameters of the group.
16267
16268 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
16269 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
16270 don't really mix very well.
16271
16272 @vindex nnmail-expiry-wait
16273 The @code{nnmail-expiry-wait} variable supplies the default time an
16274 expirable article has to live.  Gnus starts counting days from when the
16275 message @emph{arrived}, not from when it was sent.  The default is seven
16276 days.
16277
16278 Gnus also supplies a function that lets you fine-tune how long articles
16279 are to live, based on what group they are in.  Let's say you want to
16280 have one month expiry period in the @samp{mail.private} group, a one day
16281 expiry period in the @samp{mail.junk} group, and a six day expiry period
16282 everywhere else:
16283
16284 @vindex nnmail-expiry-wait-function
16285 @lisp
16286 (setq nnmail-expiry-wait-function
16287       (lambda (group)
16288        (cond ((string= group "mail.private")
16289                31)
16290              ((string= group "mail.junk")
16291                1)
16292              ((string= group "important")
16293                'never)
16294              (t
16295                6))))
16296 @end lisp
16297
16298 The group names this function is fed are ``unadorned'' group
16299 names---no @samp{nnml:} prefixes and the like.
16300
16301 The @code{nnmail-expiry-wait} variable and
16302 @code{nnmail-expiry-wait-function} function can either be a number (not
16303 necessarily an integer) or one of the symbols @code{immediate} or
16304 @code{never}.
16305
16306 You can also use the @code{expiry-wait} group parameter to selectively
16307 change the expiry period (@pxref{Group Parameters}).
16308
16309 @vindex nnmail-expiry-target
16310 The normal action taken when expiring articles is to delete them.
16311 However, in some circumstances it might make more sense to move them
16312 to other groups instead of deleting them.  The variable
16313 @code{nnmail-expiry-target} (and the @code{expiry-target} group
16314 parameter) controls this.  The variable supplies a default value for
16315 all groups, which can be overridden for specific groups by the group
16316 parameter.  default value is @code{delete}, but this can also be a
16317 string (which should be the name of the group the message should be
16318 moved to), or a function (which will be called in a buffer narrowed to
16319 the message in question, and with the name of the group being moved
16320 from as its parameter) which should return a target---either a group
16321 name or @code{delete}.
16322
16323 Here's an example for specifying a group name:
16324 @lisp
16325 (setq nnmail-expiry-target "nnml:expired")
16326 @end lisp
16327
16328 @findex nnmail-fancy-expiry-target
16329 @vindex nnmail-fancy-expiry-targets
16330 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
16331 expire mail to groups according to the variable
16332 @code{nnmail-fancy-expiry-targets}.  Here's an example:
16333
16334 @lisp
16335  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
16336        nnmail-fancy-expiry-targets
16337        '((to-from "boss" "nnfolder:Work")
16338          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
16339          ("from" ".*" "nnfolder:Archive-%Y")))
16340 @end lisp
16341
16342 With this setup, any mail that has @code{IMPORTANT} in its Subject
16343 header and was sent in the year @code{YYYY} and month @code{MMM}, will
16344 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
16345 From or To header contains the string @code{boss}, it will get expired
16346 to @code{nnfolder:Work}.  All other mail will get expired to
16347 @code{nnfolder:Archive-YYYY}.
16348
16349 @vindex nnmail-keep-last-article
16350 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
16351 expire the final article in a mail newsgroup.  This is to make life
16352 easier for procmail users.
16353
16354 @vindex gnus-total-expirable-newsgroups
16355 By the way: That line up there, about Gnus never expiring non-expirable
16356 articles, is a lie.  If you put @code{total-expire} in the group
16357 parameters, articles will not be marked as expirable, but all read
16358 articles will be put through the expiry process.  Use with extreme
16359 caution.  Even more dangerous is the
16360 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
16361 this regexp will have all read articles put through the expiry process,
16362 which means that @emph{all} old mail articles in the groups in question
16363 will be deleted after a while.  Use with extreme caution, and don't come
16364 crying to me when you discover that the regexp you used matched the
16365 wrong group and all your important mail has disappeared.  Be a
16366 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
16367 with!  So there!
16368
16369 Most people make most of their mail groups total-expirable, though.
16370
16371 @vindex gnus-inhibit-user-auto-expire
16372 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
16373 commands will not mark an article as expirable, even if the group has
16374 auto-expire turned on.
16375
16376 @vindex gnus-mark-copied-or-moved-articles-as-expirable
16377 The expirable marks of articles will be removed when copying or moving
16378 them to a group in which auto-expire is not turned on.  This is for
16379 preventing articles from being expired unintentionally.  On the other
16380 hand, to a group that has turned auto-expire on, the expirable marks of
16381 articles that are copied or moved will not be changed by default.  I.e.,
16382 when copying or moving to such a group, articles that were expirable
16383 will be left expirable and ones that were not expirable will not be
16384 marked as expirable.  So, even though in auto-expire groups, some
16385 articles will never get expired (unless you read them again).  If you
16386 don't side with that behavior that unexpirable articles may be mixed
16387 into auto-expire groups, you can set
16388 @code{gnus-mark-copied-or-moved-articles-as-expirable} to a
16389 non-@code{nil} value.  In that case, articles that have been read will
16390 be marked as expirable automatically when being copied or moved to a
16391 group that has auto-expire turned on.  The default value is @code{nil}.
16392
16393
16394 @node Washing Mail
16395 @subsection Washing Mail
16396 @cindex mail washing
16397 @cindex list server brain damage
16398 @cindex incoming mail treatment
16399
16400 Mailers and list servers are notorious for doing all sorts of really,
16401 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
16402 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
16403 end of all lines passing through our server, so let's do that!!!!1!''
16404 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
16405 considered to be self-evident were not discussed.  So.  Here we are.
16406
16407 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
16408 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
16409 be shocked and dismayed by this, but I haven't got the energy.  It is to
16410 laugh.
16411
16412 Gnus provides a plethora of functions for washing articles while
16413 displaying them, but it might be nicer to do the filtering before
16414 storing the mail to disk.  For that purpose, we have three hooks and
16415 various functions that can be put in these hooks.
16416
16417 @table @code
16418 @item nnmail-prepare-incoming-hook
16419 @vindex nnmail-prepare-incoming-hook
16420 This hook is called before doing anything with the mail and is meant for
16421 grand, sweeping gestures.  It is called in a buffer that contains all
16422 the new, incoming mail.  Functions to be used include:
16423
16424 @table @code
16425 @item nnheader-ms-strip-cr
16426 @findex nnheader-ms-strip-cr
16427 Remove trailing carriage returns from each line.  This is default on
16428 Emacs running on MS machines.
16429
16430 @end table
16431
16432 @item nnmail-prepare-incoming-header-hook
16433 @vindex nnmail-prepare-incoming-header-hook
16434 This hook is called narrowed to each header.  It can be used when
16435 cleaning up the headers.  Functions that can be used include:
16436
16437 @table @code
16438 @item nnmail-remove-leading-whitespace
16439 @findex nnmail-remove-leading-whitespace
16440 Clear leading white space that ``helpful'' listservs have added to the
16441 headers to make them look nice.  Aaah.
16442
16443 (Note that this function works on both the header on the body of all
16444 messages, so it is a potentially dangerous function to use (if a body
16445 of a message contains something that looks like a header line).  So
16446 rather than fix the bug, it is of course the right solution to make it
16447 into a feature by documenting it.)
16448
16449 @item nnmail-remove-list-identifiers
16450 @findex nnmail-remove-list-identifiers
16451 Some list servers add an identifier---for example, @samp{(idm)}---to the
16452 beginning of all @code{Subject} headers.  I'm sure that's nice for
16453 people who use stone age mail readers.  This function will remove
16454 strings that match the @code{nnmail-list-identifiers} regexp, which can
16455 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
16456 @code{\\(..\\)}.
16457
16458 For instance, if you want to remove the @samp{(idm)} and the
16459 @samp{nagnagnag} identifiers:
16460
16461 @lisp
16462 (setq nnmail-list-identifiers
16463       '("(idm)" "nagnagnag"))
16464 @end lisp
16465
16466 This can also be done non-destructively with
16467 @code{gnus-list-identifiers}, @xref{Article Hiding}.
16468
16469 @item nnmail-remove-tabs
16470 @findex nnmail-remove-tabs
16471 Translate all @samp{TAB} characters into @samp{SPACE} characters.
16472
16473 @item nnmail-ignore-broken-references
16474 @findex nnmail-ignore-broken-references
16475 @c @findex nnmail-fix-eudora-headers
16476 @cindex Eudora
16477 @cindex Pegasus
16478 Some mail user agents (e.g. Eudora and Pegasus) produce broken
16479 @code{References} headers, but correct @code{In-Reply-To} headers.  This
16480 function will get rid of the @code{References} header if the headers
16481 contain a line matching the regular expression
16482 @code{nnmail-broken-references-mailers}.
16483
16484 @end table
16485
16486 @item nnmail-prepare-incoming-message-hook
16487 @vindex nnmail-prepare-incoming-message-hook
16488 This hook is called narrowed to each message.  Functions to be used
16489 include:
16490
16491 @table @code
16492 @item article-de-quoted-unreadable
16493 @findex article-de-quoted-unreadable
16494 Decode Quoted Readable encoding.
16495
16496 @end table
16497 @end table
16498
16499
16500 @node Duplicates
16501 @subsection Duplicates
16502
16503 @vindex nnmail-treat-duplicates
16504 @vindex nnmail-message-id-cache-length
16505 @vindex nnmail-message-id-cache-file
16506 @cindex duplicate mails
16507 If you are a member of a couple of mailing lists, you will sometimes
16508 receive two copies of the same mail.  This can be quite annoying, so
16509 @code{nnmail} checks for and treats any duplicates it might find.  To do
16510 this, it keeps a cache of old @code{Message-ID}s---
16511 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
16512 default.  The approximate maximum number of @code{Message-ID}s stored
16513 there is controlled by the @code{nnmail-message-id-cache-length}
16514 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
16515 stored.) If all this sounds scary to you, you can set
16516 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
16517 default), and @code{nnmail} won't delete duplicate mails.  Instead it
16518 will insert a warning into the head of the mail saying that it thinks
16519 that this is a duplicate of a different message.
16520
16521 This variable can also be a function.  If that's the case, the function
16522 will be called from a buffer narrowed to the message in question with
16523 the @code{Message-ID} as a parameter.  The function must return either
16524 @code{nil}, @code{warn}, or @code{delete}.
16525
16526 You can turn this feature off completely by setting the variable to
16527 @code{nil}.
16528
16529 If you want all the duplicate mails to be put into a special
16530 @dfn{duplicates} group, you could do that using the normal mail split
16531 methods:
16532
16533 @lisp
16534 (setq nnmail-split-fancy
16535       '(| ;; @r{Messages duplicates go to a separate group.}
16536         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16537         ;; @r{Message from daemons, postmaster, and the like to another.}
16538         (any mail "mail.misc")
16539         ;; @r{Other rules.}
16540         [...] ))
16541 @end lisp
16542 @noindent
16543 Or something like:
16544 @lisp
16545 (setq nnmail-split-methods
16546       '(("duplicates" "^Gnus-Warning:.*duplicate")
16547         ;; @r{Other rules.}
16548         [...]))
16549 @end lisp
16550
16551 Here's a neat feature: If you know that the recipient reads her mail
16552 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16553 @code{delete}, you can send her as many insults as you like, just by
16554 using a @code{Message-ID} of a mail that you know that she's already
16555 received.  Think of all the fun!  She'll never see any of it!  Whee!
16556
16557
16558 @node Not Reading Mail
16559 @subsection Not Reading Mail
16560
16561 If you start using any of the mail back ends, they have the annoying
16562 habit of assuming that you want to read mail with them.  This might not
16563 be unreasonable, but it might not be what you want.
16564
16565 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16566 @code{nil}, none of the back ends will ever attempt to read incoming
16567 mail, which should help.
16568
16569 @vindex nnbabyl-get-new-mail
16570 @vindex nnmbox-get-new-mail
16571 @vindex nnml-get-new-mail
16572 @vindex nnmh-get-new-mail
16573 @vindex nnfolder-get-new-mail
16574 This might be too much, if, for instance, you are reading mail quite
16575 happily with @code{nnml} and just want to peek at some old (pre-Emacs
16576 23) Rmail file you have stashed away with @code{nnbabyl}.  All back ends have
16577 variables called back-end-@code{get-new-mail}.  If you want to disable
16578 the @code{nnbabyl} mail reading, you edit the virtual server for the
16579 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16580
16581 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16582 narrowed to the article to be saved before saving it when reading
16583 incoming mail.
16584
16585
16586 @node Choosing a Mail Back End
16587 @subsection Choosing a Mail Back End
16588
16589 Gnus will read the mail spool when you activate a mail group.  The mail
16590 file is first copied to your home directory.  What happens after that
16591 depends on what format you want to store your mail in.
16592
16593 There are six different mail back ends in the standard Gnus, and more
16594 back ends are available separately.  The mail back end most people use
16595 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16596 Spool}).
16597
16598 @menu
16599 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16600 * Babyl::                       Babyl was used by older versions of Rmail.
16601 * Mail Spool::                  Store your mail in a private spool?
16602 * MH Spool::                    An mhspool-like back end.
16603 * Maildir::                     Another one-file-per-message format.
16604 * Mail Folders::                Having one file for each group.
16605 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16606 @end menu
16607
16608
16609 @node Unix Mail Box
16610 @subsubsection Unix Mail Box
16611 @cindex nnmbox
16612 @cindex unix mail box
16613
16614 @vindex nnmbox-active-file
16615 @vindex nnmbox-mbox-file
16616 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16617 mail.  @code{nnmbox} will add extra headers to each mail article to say
16618 which group it belongs in.
16619
16620 Virtual server settings:
16621
16622 @table @code
16623 @item nnmbox-mbox-file
16624 @vindex nnmbox-mbox-file
16625 The name of the mail box in the user's home directory.  Default is
16626 @file{~/mbox}.
16627
16628 @item nnmbox-active-file
16629 @vindex nnmbox-active-file
16630 The name of the active file for the mail box.  Default is
16631 @file{~/.mbox-active}.
16632
16633 @item nnmbox-get-new-mail
16634 @vindex nnmbox-get-new-mail
16635 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16636 into groups.  Default is @code{t}.
16637 @end table
16638
16639
16640 @node Babyl
16641 @subsubsection Babyl
16642 @cindex nnbabyl
16643
16644 @vindex nnbabyl-active-file
16645 @vindex nnbabyl-mbox-file
16646 The @dfn{nnbabyl} back end will use a Babyl mail box to store mail.
16647 @code{nnbabyl} will add extra headers to each mail article to say which
16648 group it belongs in.
16649
16650 Virtual server settings:
16651
16652 @table @code
16653 @item nnbabyl-mbox-file
16654 @vindex nnbabyl-mbox-file
16655 The name of the Babyl file.  The default is @file{~/RMAIL}
16656
16657 @item nnbabyl-active-file
16658 @vindex nnbabyl-active-file
16659 The name of the active file for the Babyl file.  The default is
16660 @file{~/.rmail-active}
16661
16662 @item nnbabyl-get-new-mail
16663 @vindex nnbabyl-get-new-mail
16664 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16665 @code{t}
16666 @end table
16667
16668
16669 @node Mail Spool
16670 @subsubsection Mail Spool
16671 @cindex nnml
16672 @cindex mail @acronym{NOV} spool
16673
16674 The @dfn{nnml} spool mail format isn't compatible with any other known
16675 format.  It should be used with some caution.
16676
16677 @vindex nnml-directory
16678 If you use this back end, Gnus will split all incoming mail into files,
16679 one file for each mail, and put the articles into the corresponding
16680 directories under the directory specified by the @code{nnml-directory}
16681 variable.  The default value is @file{~/Mail/}.
16682
16683 You do not have to create any directories beforehand; Gnus will take
16684 care of all that.
16685
16686 If you have a strict limit as to how many files you are allowed to store
16687 in your account, you should not use this back end.  As each mail gets its
16688 own file, you might very well occupy thousands of inodes within a few
16689 weeks.  If this is no problem for you, and it isn't a problem for you
16690 having your friendly systems administrator walking around, madly,
16691 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16692 know that this is probably the fastest format to use.  You do not have
16693 to trudge through a big mbox file just to read your new mail.
16694
16695 @code{nnml} is probably the slowest back end when it comes to article
16696 splitting.  It has to create lots of files, and it also generates
16697 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16698 fastest back end when it comes to reading mail.
16699
16700 @cindex self contained nnml servers
16701 @cindex marks
16702 When the marks file is used (which it is by default), @code{nnml}
16703 servers have the property that you may backup them using @code{tar} or
16704 similar, and later be able to restore them into Gnus (by adding the
16705 proper @code{nnml} server) and have all your marks be preserved.  Marks
16706 for a group are usually stored in the @code{.marks} file (but see
16707 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
16708 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
16709 to restore the group (after restoring the backup into the nnml
16710 directory).
16711
16712 If for some reason you believe your @file{.marks} files are screwed
16713 up, you can just delete them all.  Gnus will then correctly regenerate
16714 them next time it starts.
16715
16716 Virtual server settings:
16717
16718 @table @code
16719 @item nnml-directory
16720 @vindex nnml-directory
16721 All @code{nnml} directories will be placed under this directory.  The
16722 default is the value of @code{message-directory} (whose default value
16723 is @file{~/Mail}).
16724
16725 @item nnml-active-file
16726 @vindex nnml-active-file
16727 The active file for the @code{nnml} server.  The default is
16728 @file{~/Mail/active}.
16729
16730 @item nnml-newsgroups-file
16731 @vindex nnml-newsgroups-file
16732 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16733 Format}.  The default is @file{~/Mail/newsgroups}.
16734
16735 @item nnml-get-new-mail
16736 @vindex nnml-get-new-mail
16737 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16738 @code{t}.
16739
16740 @item nnml-nov-is-evil
16741 @vindex nnml-nov-is-evil
16742 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16743 default is @code{nil}.
16744
16745 @item nnml-nov-file-name
16746 @vindex nnml-nov-file-name
16747 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16748
16749 @item nnml-prepare-save-mail-hook
16750 @vindex nnml-prepare-save-mail-hook
16751 Hook run narrowed to an article before saving.
16752
16753 @item nnml-marks-is-evil
16754 @vindex nnml-marks-is-evil
16755 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16756 default is @code{nil}.
16757
16758 @item nnml-marks-file-name
16759 @vindex nnml-marks-file-name
16760 The name of the @dfn{marks} files.  The default is @file{.marks}.
16761
16762 @item nnml-use-compressed-files
16763 @vindex nnml-use-compressed-files
16764 If non-@code{nil}, @code{nnml} will allow using compressed message
16765 files.  This requires @code{auto-compression-mode} to be enabled
16766 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16767 If the value of @code{nnml-use-compressed-files} is a string, it is used
16768 as the file extension specifying the compression program.  You can set it
16769 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16770 equivalent to @samp{.gz}.
16771
16772 @item nnml-compressed-files-size-threshold
16773 @vindex nnml-compressed-files-size-threshold
16774 Default size threshold for compressed message files.  Message files with
16775 bodies larger than that many characters will be automatically compressed
16776 if @code{nnml-use-compressed-files} is non-@code{nil}.
16777
16778 @end table
16779
16780 @findex nnml-generate-nov-databases
16781 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16782 whack, you can do a complete update by typing @kbd{M-x
16783 nnml-generate-nov-databases}.  This command will trawl through the
16784 entire @code{nnml} hierarchy, looking at each and every article, so it
16785 might take a while to complete.  A better interface to this
16786 functionality can be found in the server buffer (@pxref{Server
16787 Commands}).
16788
16789
16790 @node MH Spool
16791 @subsubsection MH Spool
16792 @cindex nnmh
16793 @cindex mh-e mail spool
16794
16795 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16796 @acronym{NOV} databases and it doesn't keep an active file or marks
16797 file.  This makes @code{nnmh} a @emph{much} slower back end than
16798 @code{nnml}, but it also makes it easier to write procmail scripts
16799 for.
16800
16801 Virtual server settings:
16802
16803 @table @code
16804 @item nnmh-directory
16805 @vindex nnmh-directory
16806 All @code{nnmh} directories will be located under this directory.  The
16807 default is the value of @code{message-directory} (whose default is
16808 @file{~/Mail})
16809
16810 @item nnmh-get-new-mail
16811 @vindex nnmh-get-new-mail
16812 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16813 @code{t}.
16814
16815 @item nnmh-be-safe
16816 @vindex nnmh-be-safe
16817 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16818 sure that the articles in the folder are actually what Gnus thinks
16819 they are.  It will check date stamps and stat everything in sight, so
16820 setting this to @code{t} will mean a serious slow-down.  If you never
16821 use anything but Gnus to read the @code{nnmh} articles, you do not
16822 have to set this variable to @code{t}.  The default is @code{nil}.
16823 @end table
16824
16825
16826 @node Maildir
16827 @subsubsection Maildir
16828 @cindex nnmaildir
16829 @cindex maildir
16830
16831 @code{nnmaildir} stores mail in the maildir format, with each maildir
16832 corresponding to a group in Gnus.  This format is documented here:
16833 @uref{http://cr.yp.to/proto/maildir.html} and here:
16834 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16835 also stores extra information in the @file{.nnmaildir/} directory
16836 within a maildir.
16837
16838 Maildir format was designed to allow concurrent deliveries and
16839 reading, without needing locks.  With other back ends, you would have
16840 your mail delivered to a spool of some kind, and then you would
16841 configure Gnus to split mail from that spool into your groups.  You
16842 can still do that with @code{nnmaildir}, but the more common
16843 configuration is to have your mail delivered directly to the maildirs
16844 that appear as group in Gnus.
16845
16846 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16847 never corrupt its data in memory, and @code{SIGKILL} will never
16848 corrupt its data in the filesystem.
16849
16850 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16851 maildir.  So you can copy a whole maildir from one Gnus setup to
16852 another, and you will keep your marks.
16853
16854 Virtual server settings:
16855
16856 @table @code
16857 @item directory
16858 For each of your @code{nnmaildir} servers (it's very unlikely that
16859 you'd need more than one), you need to create a directory and populate
16860 it with maildirs or symlinks to maildirs (and nothing else; do not
16861 choose a directory already used for other purposes).  Each maildir
16862 will be represented in Gnus as a newsgroup on that server; the
16863 filename of the symlink will be the name of the group.  Any filenames
16864 in the directory starting with @samp{.} are ignored.  The directory is
16865 scanned when you first start Gnus, and each time you type @kbd{g} in
16866 the group buffer; if any maildirs have been removed or added,
16867 @code{nnmaildir} notices at these times.
16868
16869 The value of the @code{directory} parameter should be a Lisp form
16870 which is processed by @code{eval} and @code{expand-file-name} to get
16871 the path of the directory for this server.  The form is @code{eval}ed
16872 only when the server is opened; the resulting string is used until the
16873 server is closed.  (If you don't know about forms and @code{eval},
16874 don't worry---a simple string will work.)  This parameter is not
16875 optional; you must specify it.  I don't recommend using
16876 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16877 use that directory by default for various things, and may get confused
16878 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16879 value.
16880
16881 @item target-prefix
16882 This should be a Lisp form which is processed by @code{eval} and
16883 @code{expand-file-name}.  The form is @code{eval}ed only when the
16884 server is opened; the resulting string is used until the server is
16885 closed.
16886
16887 When you create a group on an @code{nnmaildir} server, the maildir is
16888 created with @code{target-prefix} prepended to its name, and a symlink
16889 pointing to that maildir is created, named with the plain group name.
16890 So if @code{directory} is @code{"~/.nnmaildir"} and
16891 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16892 the group @code{foo}, @code{nnmaildir} will create
16893 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16894 @file{~/.nnmaildir/foo} as a symlink pointing to
16895 @file{../maildirs/foo}.
16896
16897 You can set @code{target-prefix} to a string without any slashes to
16898 create both maildirs and symlinks in the same @code{directory}; in
16899 this case, any maildirs found in @code{directory} whose names start
16900 with @code{target-prefix} will not be listed as groups (but the
16901 symlinks pointing to them will be).
16902
16903 As a special case, if @code{target-prefix} is @code{""} (the default),
16904 then when you create a group, the maildir will be created in
16905 @code{directory} without a corresponding symlink.  Beware that you
16906 cannot use @code{gnus-group-delete-group} on such groups without the
16907 @code{force} argument.
16908
16909 @item directory-files
16910 This should be a function with the same interface as
16911 @code{directory-files} (such as @code{directory-files} itself).  It is
16912 used to scan the server's @code{directory} for maildirs.  This
16913 parameter is optional; the default is
16914 @code{nnheader-directory-files-safe} if
16915 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16916 @code{directory-files} otherwise.
16917 (@code{nnheader-directory-files-is-safe} is checked only once when the
16918 server is opened; if you want to check it each time the directory is
16919 scanned, you'll have to provide your own function that does that.)
16920
16921 @item get-new-mail
16922 If non-@code{nil}, then after scanning for new mail in the group
16923 maildirs themselves as usual, this server will also incorporate mail
16924 the conventional Gnus way, from @code{mail-sources} according to
16925 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16926 value is @code{nil}.
16927
16928 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16929 an @code{nnmaildir} group.  The results might happen to be useful, but
16930 that would be by chance, not by design, and the results might be
16931 different in the future.  If your split rules create new groups,
16932 remember to supply a @code{create-directory} server parameter.
16933 @end table
16934
16935 @subsubsection Group parameters
16936
16937 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16938 all this; the default behavior for @code{nnmaildir} is the same as the
16939 default behavior for other mail back ends: articles are deleted after
16940 one week, etc.  Except for the expiry parameters, all this
16941 functionality is unique to @code{nnmaildir}, so you can ignore it if
16942 you're just trying to duplicate the behavior you already have with
16943 another back end.
16944
16945 If the value of any of these parameters is a vector, the first element
16946 is evaluated as a Lisp form and the result is used, rather than the
16947 original value.  If the value is not a vector, the value itself is
16948 evaluated as a Lisp form.  (This is why these parameters use names
16949 different from those of other, similar parameters supported by other
16950 back ends: they have different, though similar, meanings.)  (For
16951 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16952 @code{eval} business again; for other values, remember to use an extra
16953 quote and wrap the value in a vector when appropriate.)
16954
16955 @table @code
16956 @item expire-age
16957 An integer specifying the minimum age, in seconds, of an article
16958 before it will be expired, or the symbol @code{never} to specify that
16959 articles should never be expired.  If this parameter is not set,
16960 @code{nnmaildir} falls back to the usual
16961 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16962 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16963 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16964 wanted a value of 3 days, you could use something like @code{[(* 3 24
16965 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16966 An article's age is measured starting from the article file's
16967 modification time.  Normally, this is the same as the article's
16968 delivery time, but editing an article makes it younger.  Moving an
16969 article (other than via expiry) may also make an article younger.
16970
16971 @item expire-group
16972 If this is set to a string such as a full Gnus group name, like
16973 @example
16974 "backend+server.address.string:group.name"
16975 @end example
16976 and if it is not the name of the same group that the parameter belongs
16977 to, then articles will be moved to the specified group during expiry
16978 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16979 group, the article will be just as old in the destination group as it
16980 was in the source group.}  So be careful with @code{expire-age} in the
16981 destination group.  If this is set to the name of the same group that
16982 the parameter belongs to, then the article is not expired at all.  If
16983 you use the vector form, the first element is evaluated once for each
16984 article.  So that form can refer to
16985 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16986 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16987 does not fall back to the @code{expiry-target} group parameter or the
16988 @code{nnmail-expiry-target} variable.}
16989
16990 @item read-only
16991 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16992 in this maildir as read-only.  This means: articles are not renamed
16993 from @file{new/} into @file{cur/}; articles are only found in
16994 @file{new/}, not @file{cur/}; articles are never deleted; articles
16995 cannot be edited.  @file{new/} is expected to be a symlink to the
16996 @file{new/} directory of another maildir---e.g., a system-wide mailbox
16997 containing a mailing list of common interest.  Everything in the
16998 maildir outside @file{new/} is @emph{not} treated as read-only, so for
16999 a shared mailbox, you do still need to set up your own maildir (or
17000 have write permission to the shared mailbox); your maildir just won't
17001 contain extra copies of the articles.
17002
17003 @item directory-files
17004 A function with the same interface as @code{directory-files}.  It is
17005 used to scan the directories in the maildir corresponding to this
17006 group to find articles.  The default is the function specified by the
17007 server's @code{directory-files} parameter.
17008
17009 @item distrust-Lines:
17010 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
17011 article, rather than use the @code{Lines:} header field.  If
17012 @code{nil}, the header field will be used if present.
17013
17014 @item always-marks
17015 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
17016 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17017 say that all articles have these marks, regardless of whether the
17018 marks stored in the filesystem say so.  This is a proof-of-concept
17019 feature that will probably be removed eventually; it ought to be done
17020 in Gnus proper, or abandoned if it's not worthwhile.
17021
17022 @item never-marks
17023 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
17024 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17025 say that no articles have these marks, regardless of whether the marks
17026 stored in the filesystem say so.  @code{never-marks} overrides
17027 @code{always-marks}.  This is a proof-of-concept feature that will
17028 probably be removed eventually; it ought to be done in Gnus proper, or
17029 abandoned if it's not worthwhile.
17030
17031 @item nov-cache-size
17032 An integer specifying the size of the @acronym{NOV} memory cache.  To
17033 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
17034 for a limited number of articles in each group.  (This is probably not
17035 worthwhile, and will probably be removed in the future.)  This
17036 parameter's value is noticed only the first time a group is seen after
17037 the server is opened---i.e., when you first start Gnus, typically.
17038 The @acronym{NOV} cache is never resized until the server is closed
17039 and reopened.  The default is an estimate of the number of articles
17040 that would be displayed in the summary buffer: a count of articles
17041 that are either marked with @code{tick} or not marked with
17042 @code{read}, plus a little extra.
17043 @end table
17044
17045 @subsubsection Article identification
17046 Articles are stored in the @file{cur/} subdirectory of each maildir.
17047 Each article file is named like @code{uniq:info}, where @code{uniq}
17048 contains no colons.  @code{nnmaildir} ignores, but preserves, the
17049 @code{:info} part.  (Other maildir readers typically use this part of
17050 the filename to store marks.)  The @code{uniq} part uniquely
17051 identifies the article, and is used in various places in the
17052 @file{.nnmaildir/} subdirectory of the maildir to store information
17053 about the corresponding article.  The full pathname of an article is
17054 available in the variable @code{nnmaildir-article-file-name} after you
17055 request the article in the summary buffer.
17056
17057 @subsubsection NOV data
17058 An article identified by @code{uniq} has its @acronym{NOV} data (used
17059 to generate lines in the summary buffer) stored in
17060 @code{.nnmaildir/nov/uniq}.  There is no
17061 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
17062 need for it---an article's @acronym{NOV} data is updated automatically
17063 when the article or @code{nnmail-extra-headers} has changed.)  You can
17064 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
17065 single article simply by deleting the corresponding @acronym{NOV}
17066 file, but @emph{beware}: this will also cause @code{nnmaildir} to
17067 assign a new article number for this article, which may cause trouble
17068 with @code{seen} marks, the Agent, and the cache.
17069
17070 @subsubsection Article marks
17071 An article identified by @code{uniq} is considered to have the mark
17072 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
17073 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
17074 looks for such files and reports the set of marks it finds.  When Gnus
17075 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
17076 creates and deletes the corresponding files as needed.  (Actually,
17077 rather than create a new file for each mark, it just creates hard
17078 links to @file{.nnmaildir/markfile}, to save inodes.)
17079
17080 You can invent new marks by creating a new directory in
17081 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
17082 your server, untar it later, and keep your marks.  You can add and
17083 remove marks yourself by creating and deleting mark files.  If you do
17084 this while Gnus is running and your @code{nnmaildir} server is open,
17085 it's best to exit all summary buffers for @code{nnmaildir} groups and
17086 type @kbd{s} in the group buffer first, and to type @kbd{g} or
17087 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
17088 pick up the changes, and might undo them.
17089
17090
17091 @node Mail Folders
17092 @subsubsection Mail Folders
17093 @cindex nnfolder
17094 @cindex mbox folders
17095 @cindex mail folders
17096
17097 @code{nnfolder} is a back end for storing each mail group in a
17098 separate file.  Each file is in the standard Un*x mbox format.
17099 @code{nnfolder} will add extra headers to keep track of article
17100 numbers and arrival dates.
17101
17102 @cindex self contained nnfolder servers
17103 @cindex marks
17104 When the marks file is used (which it is by default), @code{nnfolder}
17105 servers have the property that you may backup them using @code{tar} or
17106 similar, and later be able to restore them into Gnus (by adding the
17107 proper @code{nnfolder} server) and have all your marks be preserved.
17108 Marks for a group are usually stored in a file named as the mbox file
17109 with @code{.mrk} concatenated to it (but see
17110 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
17111 directory.  Individual @code{nnfolder} groups are also possible to
17112 backup, use @kbd{G m} to restore the group (after restoring the backup
17113 into the @code{nnfolder} directory).
17114
17115 Virtual server settings:
17116
17117 @table @code
17118 @item nnfolder-directory
17119 @vindex nnfolder-directory
17120 All the @code{nnfolder} mail boxes will be stored under this
17121 directory.  The default is the value of @code{message-directory}
17122 (whose default is @file{~/Mail})
17123
17124 @item nnfolder-active-file
17125 @vindex nnfolder-active-file
17126 The name of the active file.  The default is @file{~/Mail/active}.
17127
17128 @item nnfolder-newsgroups-file
17129 @vindex nnfolder-newsgroups-file
17130 The name of the group descriptions file.  @xref{Newsgroups File
17131 Format}.  The default is @file{~/Mail/newsgroups}
17132
17133 @item nnfolder-get-new-mail
17134 @vindex nnfolder-get-new-mail
17135 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
17136 default is @code{t}
17137
17138 @item nnfolder-save-buffer-hook
17139 @vindex nnfolder-save-buffer-hook
17140 @cindex backup files
17141 Hook run before saving the folders.  Note that Emacs does the normal
17142 backup renaming of files even with the @code{nnfolder} buffers.  If
17143 you wish to switch this off, you could say something like the
17144 following in your @file{.emacs} file:
17145
17146 @lisp
17147 (defun turn-off-backup ()
17148   (set (make-local-variable 'backup-inhibited) t))
17149
17150 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
17151 @end lisp
17152
17153 @item nnfolder-delete-mail-hook
17154 @vindex nnfolder-delete-mail-hook
17155 Hook run in a buffer narrowed to the message that is to be deleted.
17156 This function can be used to copy the message to somewhere else, or to
17157 extract some information from it before removing it.
17158
17159 @item nnfolder-nov-is-evil
17160 @vindex nnfolder-nov-is-evil
17161 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
17162 default is @code{nil}.
17163
17164 @item nnfolder-nov-file-suffix
17165 @vindex nnfolder-nov-file-suffix
17166 The extension for @acronym{NOV} files.  The default is @file{.nov}.
17167
17168 @item nnfolder-nov-directory
17169 @vindex nnfolder-nov-directory
17170 The directory where the @acronym{NOV} files should be stored.  If
17171 @code{nil}, @code{nnfolder-directory} is used.
17172
17173 @item nnfolder-marks-is-evil
17174 @vindex nnfolder-marks-is-evil
17175 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
17176 default is @code{nil}.
17177
17178 @item nnfolder-marks-file-suffix
17179 @vindex nnfolder-marks-file-suffix
17180 The extension for @sc{marks} files.  The default is @file{.mrk}.
17181
17182 @item nnfolder-marks-directory
17183 @vindex nnfolder-marks-directory
17184 The directory where the @sc{marks} files should be stored.  If
17185 @code{nil}, @code{nnfolder-directory} is used.
17186
17187 @end table
17188
17189
17190 @findex nnfolder-generate-active-file
17191 @kindex M-x nnfolder-generate-active-file
17192 If you have lots of @code{nnfolder}-like files you'd like to read with
17193 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
17194 command to make @code{nnfolder} aware of all likely files in
17195 @code{nnfolder-directory}.  This only works if you use long file names,
17196 though.
17197
17198 @node Comparing Mail Back Ends
17199 @subsubsection Comparing Mail Back Ends
17200
17201 First, just for terminology, the @dfn{back end} is the common word for a
17202 low-level access method---a transport, if you will, by which something
17203 is acquired.  The sense is that one's mail has to come from somewhere,
17204 and so selection of a suitable back end is required in order to get that
17205 mail within spitting distance of Gnus.
17206
17207 The same concept exists for Usenet itself: Though access to articles is
17208 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
17209 in the world got at Usenet by running a reader on the machine where the
17210 articles lay (the machine which today we call an @acronym{NNTP} server), and
17211 access was by the reader stepping into the articles' directory spool
17212 area directly.  One can still select between either the @code{nntp} or
17213 @code{nnspool} back ends, to select between these methods, if one happens
17214 actually to live on the server (or can see its spool directly, anyway,
17215 via NFS).
17216
17217 The goal in selecting a mail back end is to pick one which
17218 simultaneously represents a suitable way of dealing with the original
17219 format plus leaving mail in a form that is convenient to use in the
17220 future.  Here are some high and low points on each:
17221
17222 @table @code
17223 @item nnmbox
17224
17225 UNIX systems have historically had a single, very common, and well-
17226 defined format.  All messages arrive in a single @dfn{spool file}, and
17227 they are delineated by a line whose regular expression matches
17228 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
17229 to make it clear in this instance that this is not the RFC-specified
17230 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
17231 historically from the Unix environment, it is simplest if one does not
17232 mess a great deal with the original mailbox format, so if one chooses
17233 this back end, Gnus' primary activity in getting mail from the real spool
17234 area to Gnus' preferred directory is simply to copy it, with no
17235 (appreciable) format change in the process.  It is the ``dumbest'' way
17236 to move mail into availability in the Gnus environment.  This makes it
17237 fast to move into place, but slow to parse, when Gnus has to look at
17238 what's where.
17239
17240 @item nnbabyl
17241
17242 Once upon a time, there was the DEC-10 and DEC-20, running operating
17243 systems called TOPS and related things, and the usual (only?) mail
17244 reading environment was a thing called Babyl.  I don't know what format
17245 was used for mail landing on the system, but Babyl had its own internal
17246 format to which mail was converted, primarily involving creating a
17247 spool-file-like entity with a scheme for inserting Babyl-specific
17248 headers and status bits above the top of each message in the file.
17249 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
17250 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
17251 to understand the mail files folks already had in existence.  Gnus (and
17252 VM, for that matter) continue to support this format because it's
17253 perceived as having some good qualities in those mailer-specific
17254 headers/status bits stuff.  Rmail itself still exists as well, of
17255 course, and is still maintained within Emacs.  Since Emacs 23, it
17256 uses standard mbox format rather than Babyl.
17257
17258 Both of the above forms leave your mail in a single file on your
17259 file system, and they must parse that entire file each time you take a
17260 look at your mail.
17261
17262 @item nnml
17263
17264 @code{nnml} is the back end which smells the most as though you were
17265 actually operating with an @code{nnspool}-accessed Usenet system.  (In
17266 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
17267 lo these years ago.)  One's mail is taken from the original spool file,
17268 and is then cut up into individual message files, 1:1.  It maintains a
17269 Usenet-style active file (analogous to what one finds in an INN- or
17270 CNews-based news system in (for instance) @file{/var/lib/news/active},
17271 or what is returned via the @samp{NNTP LIST} verb) and also creates
17272 @dfn{overview} files for efficient group entry, as has been defined for
17273 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
17274 due to the creation of lots of files, updates to the @code{nnml} active
17275 file, and additions to overview files on a per-message basis, but it is
17276 extremely fast on access because of what amounts to the indexing support
17277 provided by the active file and overviews.
17278
17279 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
17280 resource which defines available places in the file system to put new
17281 files.  Sysadmins take a dim view of heavy inode occupation within
17282 tight, shared file systems.  But if you live on a personal machine where
17283 the file system is your own and space is not at a premium, @code{nnml}
17284 wins big.
17285
17286 It is also problematic using this back end if you are living in a
17287 FAT16-based Windows world, since much space will be wasted on all these
17288 tiny files.
17289
17290 @item nnmh
17291
17292 The Rand MH mail-reading system has been around UNIX systems for a very
17293 long time; it operates by splitting one's spool file of messages into
17294 individual files, but with little or no indexing support---@code{nnmh}
17295 is considered to be semantically equivalent to ``@code{nnml} without
17296 active file or overviews''.  This is arguably the worst choice, because
17297 one gets the slowness of individual file creation married to the
17298 slowness of access parsing when learning what's new in one's groups.
17299
17300 @item nnfolder
17301
17302 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
17303 method described above) on a per-group basis.  That is, @code{nnmbox}
17304 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
17305 little bit of optimization to this so that each of one's mail groups has
17306 a Unix mail box file.  It's faster than @code{nnmbox} because each group
17307 can be parsed separately, and still provides the simple Unix mail box
17308 format requiring minimal effort in moving the mail around.  In addition,
17309 it maintains an ``active'' file making it much faster for Gnus to figure
17310 out how many messages there are in each separate group.
17311
17312 If you have groups that are expected to have a massive amount of
17313 messages, @code{nnfolder} is not the best choice, but if you receive
17314 only a moderate amount of mail, @code{nnfolder} is probably the most
17315 friendly mail back end all over.
17316
17317 @item nnmaildir
17318
17319 For configuring expiry and other things, @code{nnmaildir} uses
17320 incompatible group parameters, slightly different from those of other
17321 mail back ends.
17322
17323 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
17324 differences.  Each message is stored in a separate file, but the
17325 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
17326 also stores the equivalent of @code{nnml}'s overview files in one file
17327 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
17328 @code{df -i} to see how plentiful your inode supply is.)  If this slows
17329 you down or takes up very much space, consider switching to
17330 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
17331 file system.
17332
17333 Since maildirs don't require locking for delivery, the maildirs you use
17334 as groups can also be the maildirs your mail is directly delivered to.
17335 This means you can skip Gnus' mail splitting if your mail is already
17336 organized into different mailboxes during delivery.  A @code{directory}
17337 entry in @code{mail-sources} would have a similar effect, but would
17338 require one set of mailboxes for spooling deliveries (in mbox format,
17339 thus damaging message bodies), and another set to be used as groups (in
17340 whatever format you like).  A maildir has a built-in spool, in the
17341 @code{new/} subdirectory.  Beware that currently, mail moved from
17342 @code{new/} to @code{cur/} instead of via mail splitting will not
17343 undergo treatment such as duplicate checking.
17344
17345 @code{nnmaildir} stores article marks for a given group in the
17346 corresponding maildir, in a way designed so that it's easy to manipulate
17347 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
17348 else, and still have your marks.  @code{nnml} also stores marks, but
17349 it's not as easy to work with them from outside Gnus as with
17350 @code{nnmaildir}.
17351
17352 @code{nnmaildir} uses a significant amount of memory to speed things up.
17353 (It keeps in memory some of the things that @code{nnml} stores in files
17354 and that @code{nnmh} repeatedly parses out of message files.)  If this
17355 is a problem for you, you can set the @code{nov-cache-size} group
17356 parameter to something small (0 would probably not work, but 1 probably
17357 would) to make it use less memory.  This caching will probably be
17358 removed in the future.
17359
17360 Startup is likely to be slower with @code{nnmaildir} than with other
17361 back ends.  Everything else is likely to be faster, depending in part
17362 on your file system.
17363
17364 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
17365 to write an @code{nnmaildir}-derived back end.
17366
17367 @end table
17368
17369
17370 @node Browsing the Web
17371 @section Browsing the Web
17372 @cindex web
17373 @cindex browsing the web
17374 @cindex www
17375 @cindex http
17376
17377 Web-based discussion forums are getting more and more popular.  On many
17378 subjects, the web-based forums have become the most important forums,
17379 eclipsing the importance of mailing lists and news groups.  The reason
17380 is easy to understand---they are friendly to new users; you just point
17381 and click, and there's the discussion.  With mailing lists, you have to
17382 go through a cumbersome subscription procedure, and most people don't
17383 even know what a news group is.
17384
17385 The problem with this scenario is that web browsers are not very good at
17386 being newsreaders.  They do not keep track of what articles you've read;
17387 they do not allow you to score on subjects you're interested in; they do
17388 not allow off-line browsing; they require you to click around and drive
17389 you mad in the end.
17390
17391 So---if web browsers suck at reading discussion forums, why not use Gnus
17392 to do it instead?
17393
17394 Gnus has been getting a bit of a collection of back ends for providing
17395 interfaces to these sources.
17396
17397 @menu
17398 * Archiving Mail::
17399 * Web Searches::                Creating groups from articles that match a string.
17400 * Ultimate::                    The Ultimate Bulletin Board systems.
17401 * Web Archive::                 Reading mailing list archived on web.
17402 * RSS::                         Reading RDF site summary.
17403 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
17404 @end menu
17405
17406 All the web sources require Emacs/W3 and the url library or those
17407 alternatives to work.
17408
17409 The main caveat with all these web sources is that they probably won't
17410 work for a very long time.  Gleaning information from the @acronym{HTML} data
17411 is guesswork at best, and when the layout is altered, the Gnus back end
17412 will fail.  If you have reasonably new versions of these back ends,
17413 though, you should be ok.
17414
17415 One thing all these Web methods have in common is that the Web sources
17416 are often down, unavailable or just plain too slow to be fun.  In those
17417 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
17418 Unplugged}) handle downloading articles, and then you can read them at
17419 leisure from your local disk.  No more World Wide Wait for you.
17420
17421 @node Archiving Mail
17422 @subsection Archiving Mail
17423 @cindex archiving mail
17424 @cindex backup of mail
17425
17426 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
17427 @code{nnmaildir}, now actually store the article marks with each group.
17428 For these servers, archiving and restoring a group while preserving
17429 marks is fairly simple.
17430
17431 (Preserving the group level and group parameters as well still
17432 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
17433 though.)
17434
17435 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
17436 server, take a recursive copy of the server directory.  There is no need
17437 to shut down Gnus, so archiving may be invoked by @code{cron} or
17438 similar.  You restore the data by restoring the directory tree, and
17439 adding a server definition pointing to that directory in Gnus.  The
17440 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
17441 might interfere with overwriting data, so you may want to shut down Gnus
17442 before you restore the data.
17443
17444 It is also possible to archive individual @code{nnml},
17445 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
17446 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
17447 directory.  For @code{nnfolder} you need to copy both the base folder
17448 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
17449 this example).  Restoring the group is done with @kbd{G m} from the Group
17450 buffer.  The last step makes Gnus notice the new directory.
17451 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
17452 is unnecessary in that case.
17453
17454 @node Web Searches
17455 @subsection Web Searches
17456 @cindex nnweb
17457 @cindex Google
17458 @cindex dejanews
17459 @cindex gmane
17460 @cindex Usenet searches
17461 @cindex searching the Usenet
17462
17463 It's, like, too neat to search the Usenet for articles that match a
17464 string, but it, like, totally @emph{sucks}, like, totally, to use one of
17465 those, like, Web browsers, and you, like, have to, rilly, like, look at
17466 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
17467 searches without having to use a browser.
17468
17469 The @code{nnweb} back end allows an easy interface to the mighty search
17470 engine.  You create an @code{nnweb} group, enter a search pattern, and
17471 then enter the group and read the articles like you would any normal
17472 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
17473 Groups}) will do this in an easy-to-use fashion.
17474
17475 @code{nnweb} groups don't really lend themselves to being solid
17476 groups---they have a very fleeting idea of article numbers.  In fact,
17477 each time you enter an @code{nnweb} group (not even changing the search
17478 pattern), you are likely to get the articles ordered in a different
17479 manner.  Not even using duplicate suppression (@pxref{Duplicate
17480 Suppression}) will help, since @code{nnweb} doesn't even know the
17481 @code{Message-ID} of the articles before reading them using some search
17482 engines (Google, for instance).  The only possible way to keep track
17483 of which articles you've read is by scoring on the @code{Date}
17484 header---mark all articles posted before the last date you read the
17485 group as read.
17486
17487 If the search engine changes its output substantially, @code{nnweb}
17488 won't be able to parse it and will fail.  One could hardly fault the Web
17489 providers if they were to do this---their @emph{raison d'@^etre} is to
17490 make money off of advertisements, not to provide services to the
17491 community.  Since @code{nnweb} washes the ads off all the articles, one
17492 might think that the providers might be somewhat miffed.  We'll see.
17493
17494 You must have the @code{url} and @code{W3} package or those alternatives
17495 (try @code{customize-group} on the @samp{mm-url} variable group)
17496 installed to be able to use @code{nnweb}.
17497
17498 Virtual server variables:
17499
17500 @table @code
17501 @item nnweb-type
17502 @vindex nnweb-type
17503 What search engine type is being used.  The currently supported types
17504 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
17505 @code{dejanews} is an alias to @code{google}.
17506
17507 @item nnweb-search
17508 @vindex nnweb-search
17509 The search string to feed to the search engine.
17510
17511 @item nnweb-max-hits
17512 @vindex nnweb-max-hits
17513 Advisory maximum number of hits per search to display.  The default is
17514 999.
17515
17516 @item nnweb-type-definition
17517 @vindex nnweb-type-definition
17518 Type-to-definition alist.  This alist says what @code{nnweb} should do
17519 with the various search engine types.  The following elements must be
17520 present:
17521
17522 @table @code
17523 @item article
17524 Function to decode the article and provide something that Gnus
17525 understands.
17526
17527 @item map
17528 Function to create an article number to message header and URL alist.
17529
17530 @item search
17531 Function to send the search string to the search engine.
17532
17533 @item address
17534 The address the aforementioned function should send the search string
17535 to.
17536
17537 @item id
17538 Format string URL to fetch an article by @code{Message-ID}.
17539 @end table
17540
17541 @end table
17542
17543
17544 @node Ultimate
17545 @subsection Ultimate
17546 @cindex nnultimate
17547 @cindex Ultimate Bulletin Board
17548
17549 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
17550 probably the most popular Web bulletin board system used.  It has a
17551 quite regular and nice interface, and it's possible to get the
17552 information Gnus needs to keep groups updated.
17553
17554 The easiest way to get started with @code{nnultimate} is to say
17555 something like the following in the group buffer:  @kbd{B nnultimate RET
17556 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
17557 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
17558 you're interested in; there's quite a list of them on the Ultimate web
17559 site.)  Then subscribe to the groups you're interested in from the
17560 server buffer, and read them from the group buffer.
17561
17562 The following @code{nnultimate} variables can be altered:
17563
17564 @table @code
17565 @item nnultimate-directory
17566 @vindex nnultimate-directory
17567 The directory where @code{nnultimate} stores its files.  The default is@*
17568 @file{~/News/ultimate/}.
17569 @end table
17570
17571
17572 @node Web Archive
17573 @subsection Web Archive
17574 @cindex nnwarchive
17575 @cindex Web Archive
17576
17577 Some mailing lists only have archives on Web servers, such as
17578 @uref{http://www.egroups.com/} and
17579 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
17580 interface, and it's possible to get the information Gnus needs to keep
17581 groups updated.
17582
17583 @findex gnus-group-make-warchive-group
17584 The easiest way to get started with @code{nnwarchive} is to say
17585 something like the following in the group buffer: @kbd{M-x
17586 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
17587 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
17588 @var{an_egroup} with the mailing list you subscribed, the
17589 @var{your@@email.address} with your email address.), or to browse the
17590 back end by @kbd{B nnwarchive RET mail-archive RET}.
17591
17592 The following @code{nnwarchive} variables can be altered:
17593
17594 @table @code
17595 @item nnwarchive-directory
17596 @vindex nnwarchive-directory
17597 The directory where @code{nnwarchive} stores its files.  The default is@*
17598 @file{~/News/warchive/}.
17599
17600 @item nnwarchive-login
17601 @vindex nnwarchive-login
17602 The account name on the web server.
17603
17604 @item nnwarchive-passwd
17605 @vindex nnwarchive-passwd
17606 The password for your account on the web server.
17607 @end table
17608
17609 @node RSS
17610 @subsection RSS
17611 @cindex nnrss
17612 @cindex RSS
17613
17614 Some web sites have an RDF Site Summary (@acronym{RSS}).
17615 @acronym{RSS} is a format for summarizing headlines from news related
17616 sites (such as BBC or CNN).  But basically anything list-like can be
17617 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
17618 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
17619
17620 @acronym{RSS} has a quite regular and nice interface, and it's
17621 possible to get the information Gnus needs to keep groups updated.
17622
17623 Note: you had better use Emacs which supports the @code{utf-8} coding
17624 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
17625 text by default.  It is also used by default for non-@acronym{ASCII}
17626 group names.
17627
17628 @kindex G R (Group)
17629 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
17630 prompted for the location, the title and the description of the feed.
17631 The title, which allows any characters, will be used for the group name
17632 and the name of the group data file.  The description can be omitted.
17633
17634 An easy way to get started with @code{nnrss} is to say something like
17635 the following in the group buffer: @kbd{B nnrss RET RET y}, then
17636 subscribe to groups.
17637
17638 The @code{nnrss} back end saves the group data file in
17639 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
17640 names containing non-@acronym{ASCII} characters will be encoded by the
17641 coding system specified with the @code{nnmail-pathname-coding-system}
17642 variable or other.  Also @xref{Non-ASCII Group Names}, for more
17643 information.
17644
17645 The @code{nnrss} back end generates @samp{multipart/alternative}
17646 @acronym{MIME} articles in which each contains a @samp{text/plain} part
17647 and a @samp{text/html} part.
17648
17649 @cindex OPML
17650 You can also use the following commands to import and export your
17651 subscriptions from a file in @acronym{OPML} format (Outline Processor
17652 Markup Language).
17653
17654 @defun nnrss-opml-import file
17655 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17656 file.
17657 @end defun
17658
17659 @defun nnrss-opml-export
17660 Write your current @acronym{RSS} subscriptions to a buffer in
17661 @acronym{OPML} format.
17662 @end defun
17663
17664 The following @code{nnrss} variables can be altered:
17665
17666 @table @code
17667 @item nnrss-directory
17668 @vindex nnrss-directory
17669 The directory where @code{nnrss} stores its files.  The default is
17670 @file{~/News/rss/}.
17671
17672 @item nnrss-file-coding-system
17673 @vindex nnrss-file-coding-system
17674 The coding system used when reading and writing the @code{nnrss} groups
17675 data files.  The default is the value of
17676 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17677 in Emacs or @code{escape-quoted} in XEmacs).
17678
17679 @item nnrss-ignore-article-fields
17680 @vindex nnrss-ignore-article-fields
17681 Some feeds update constantly article fields during their publications,
17682 e.g. to indicate the number of comments.  However, if there is
17683 a difference between the local article and the distant one, the latter
17684 is considered to be new.  To avoid this and discard some fields, set this
17685 variable to the list of fields to be ignored.  The default is
17686 @code{'(slash:comments)}.
17687
17688 @item nnrss-use-local
17689 @vindex nnrss-use-local
17690 @findex nnrss-generate-download-script
17691 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17692 the feeds from local files in @code{nnrss-directory}.  You can use
17693 the command @code{nnrss-generate-download-script} to generate a
17694 download script using @command{wget}.
17695
17696 @item nnrss-wash-html-in-text-plain-parts
17697 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
17698 parts as @acronym{HTML}.  The function specified by the
17699 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
17700 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
17701 to render text.  If it is @code{nil}, which is the default, text will
17702 simply be folded.  Leave it @code{nil} if you prefer to see
17703 @samp{text/html} parts.
17704 @end table
17705
17706 The following code may be helpful, if you want to show the description in
17707 the summary buffer.
17708
17709 @lisp
17710 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17711 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17712
17713 (defun gnus-user-format-function-X (header)
17714   (let ((descr
17715          (assq nnrss-description-field (mail-header-extra header))))
17716     (if descr (concat "\n\t" (cdr descr)) "")))
17717 @end lisp
17718
17719 The following code may be useful to open an nnrss url directly from the
17720 summary buffer.
17721
17722 @lisp
17723 (require 'browse-url)
17724
17725 (defun browse-nnrss-url (arg)
17726   (interactive "p")
17727   (let ((url (assq nnrss-url-field
17728                    (mail-header-extra
17729                     (gnus-data-header
17730                      (assq (gnus-summary-article-number)
17731                            gnus-newsgroup-data))))))
17732     (if url
17733         (progn
17734           (browse-url (cdr url))
17735           (gnus-summary-mark-as-read-forward 1))
17736       (gnus-summary-scroll-up arg))))
17737
17738 (eval-after-load "gnus"
17739   #'(define-key gnus-summary-mode-map
17740       (kbd "<RET>") 'browse-nnrss-url))
17741 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17742 @end lisp
17743
17744 Even if you have added @samp{text/html} to the
17745 @code{mm-discouraged-alternatives} variable (@pxref{Display
17746 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17747 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17748 more useful especially in @code{nnrss} groups to display
17749 @samp{text/html} parts.  Here's an example of setting
17750 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17751 Parameters}) in order to display @samp{text/html} parts only in
17752 @code{nnrss} groups:
17753
17754 @lisp
17755 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17756 (eval-after-load "gnus-sum"
17757   '(add-to-list
17758     'gnus-newsgroup-variables
17759     '(mm-discouraged-alternatives
17760       . '("text/html" "image/.*"))))
17761
17762 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17763 (add-to-list
17764  'gnus-parameters
17765  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17766 @end lisp
17767
17768
17769 @node Customizing W3
17770 @subsection Customizing W3
17771 @cindex W3
17772 @cindex html
17773 @cindex url
17774 @cindex Netscape
17775
17776 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17777 alternatives) to display web pages.  Emacs/W3 is documented in its own
17778 manual, but there are some things that may be more relevant for Gnus
17779 users.
17780
17781 For instance, a common question is how to make Emacs/W3 follow links
17782 using the @code{browse-url} functions (which will call some external web
17783 browser like Netscape).  Here's one way:
17784
17785 @lisp
17786 (eval-after-load "w3"
17787   '(progn
17788     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17789     (defun w3-fetch (&optional url target)
17790       (interactive (list (w3-read-url-with-default)))
17791       (if (eq major-mode 'gnus-article-mode)
17792           (browse-url url)
17793         (w3-fetch-orig url target)))))
17794 @end lisp
17795
17796 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17797 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17798 follow the link.
17799
17800
17801 @node IMAP
17802 @section IMAP
17803 @cindex nnimap
17804 @cindex @acronym{IMAP}
17805
17806 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17807 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17808 server is much similar to connecting to a news server, you just
17809 specify the network address of the server.
17810
17811 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17812 everything that @acronym{POP} can, it can hence be viewed as a
17813 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17814 similar to @acronym{NNTP} being a news storage protocol---however,
17815 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17816 is more or less read-only whereas mail is read-write.
17817
17818 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17819 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17820 the @acronym{IMAP} server and store them on the local disk.  This is
17821 not the usage described in this section---@xref{Mail Sources}.
17822
17823 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17824 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17825 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17826 usage explained in this section.
17827
17828 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17829 servers might look something like the following.  (Note that for
17830 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17831 see below.)
17832
17833 @lisp
17834 (setq gnus-secondary-select-methods
17835       '((nnimap "simpleserver") ; @r{no special configuration}
17836         ; @r{perhaps a ssh port forwarded server:}
17837         (nnimap "dolk"
17838                 (nnimap-address "localhost")
17839                 (nnimap-server-port 1430))
17840         ; @r{a UW server running on localhost}
17841         (nnimap "barbar"
17842                 (nnimap-server-port 143)
17843                 (nnimap-address "localhost")
17844                 (nnimap-list-pattern ("INBOX" "mail/*")))
17845         ; @r{anonymous public cyrus server:}
17846         (nnimap "cyrus.andrew.cmu.edu"
17847                 (nnimap-authenticator anonymous)
17848                 (nnimap-list-pattern "archive.*")
17849                 (nnimap-stream network))
17850         ; @r{a ssl server on a non-standard port:}
17851         (nnimap "vic20"
17852                 (nnimap-address "vic20.somewhere.com")
17853                 (nnimap-server-port 9930)
17854                 (nnimap-stream ssl))))
17855 @end lisp
17856
17857 After defining the new server, you can subscribe to groups on the
17858 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17859 (@pxref{Subscription Commands}) or via the Server Buffer
17860 (@pxref{Server Buffer}).
17861
17862 The following variables can be used to create a virtual @code{nnimap}
17863 server:
17864
17865 @table @code
17866
17867 @item nnimap-address
17868 @vindex nnimap-address
17869
17870 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17871 server name if not specified.
17872
17873 @item nnimap-server-port
17874 @vindex nnimap-server-port
17875 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17876
17877 Note that this should be an integer, example server specification:
17878
17879 @lisp
17880 (nnimap "mail.server.com"
17881         (nnimap-server-port 4711))
17882 @end lisp
17883
17884 @item nnimap-list-pattern
17885 @vindex nnimap-list-pattern
17886 String or list of strings of mailboxes to limit available groups to.
17887 This is used when the server has very many mailboxes and you're only
17888 interested in a few---some servers export your home directory via
17889 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17890 @file{~/Mail/*} then.
17891
17892 The string can also be a cons of REFERENCE and the string as above, what
17893 REFERENCE is used for is server specific, but on the University of
17894 Washington server it's a directory that will be concatenated with the
17895 mailbox.
17896
17897 Example server specification:
17898
17899 @lisp
17900 (nnimap "mail.server.com"
17901         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17902                                ("~friend/Mail/" . "list/*"))))
17903 @end lisp
17904
17905 @item nnimap-stream
17906 @vindex nnimap-stream
17907 The type of stream used to connect to your server.  By default, nnimap
17908 will detect and automatically use all of the below, with the exception
17909 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17910 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17911 be automatically detected, but it's not widely deployed yet.)
17912
17913 Example server specification:
17914
17915 @lisp
17916 (nnimap "mail.server.com"
17917         (nnimap-stream ssl))
17918 @end lisp
17919
17920 Please note that the value of @code{nnimap-stream} is a symbol!
17921
17922 @itemize @bullet
17923 @item
17924 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17925 @samp{gsasl} or @samp{imtest} program.
17926 @item
17927 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17928 @item
17929 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17930 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17931 @samp{starttls}.
17932 @item
17933 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17934 @samp{gnutls-cli}).
17935 @item
17936 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17937 @samp{openssl}) or SSLeay (@samp{s_client}).
17938 @item
17939 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17940 @item
17941 @dfn{network:} Plain, TCP/IP network connection.
17942 @end itemize
17943
17944 @vindex imap-kerberos4-program
17945 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17946 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17947 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17948 to make @code{imap.el} use a pty instead of a pipe when communicating
17949 with @samp{imtest}.  You will then suffer from a line length
17950 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17951 indefinitely if you have many articles in a mailbox.  The variable
17952 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17953 program.
17954
17955 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17956 needed.  It is available from
17957 @uref{http://www.gnu.org/software/gnutls/}.
17958
17959 @vindex imap-gssapi-program
17960 This parameter specifies a list of command lines that invoke a GSSAPI
17961 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17962 sequentially until a connection is made, or the list has been
17963 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17964 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17965 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17966 tried.
17967
17968 @vindex imap-ssl-program
17969 For @acronym{SSL} connections, the OpenSSL program is available from
17970 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17971 and nnimap support it too---although the most recent versions of
17972 SSLeay, 0.9.x, are known to have serious bugs making it
17973 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17974 work.  The variable @code{imap-ssl-program} contain parameters to pass
17975 to OpenSSL/SSLeay.
17976
17977 @vindex imap-shell-program
17978 @vindex imap-shell-host
17979 For @acronym{IMAP} connections using the @code{shell} stream, the
17980 variable @code{imap-shell-program} specify what program to call.  Make
17981 sure nothing is interfering with the output of the program, e.g., don't
17982 forget to redirect the error output to the void.
17983
17984 @item nnimap-authenticator
17985 @vindex nnimap-authenticator
17986
17987 The authenticator used to connect to the server.  By default, nnimap
17988 will use the most secure authenticator your server is capable of.
17989
17990 Example server specification:
17991
17992 @lisp
17993 (nnimap "mail.server.com"
17994         (nnimap-authenticator anonymous))
17995 @end lisp
17996
17997 Please note that the value of @code{nnimap-authenticator} is a symbol!
17998
17999 @itemize @bullet
18000 @item
18001 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
18002 external program @code{gsasl} or @code{imtest}.
18003 @item
18004 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
18005 @code{imtest}.
18006 @item
18007 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
18008 external library @code{digest-md5.el}.
18009 @item
18010 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
18011 @item
18012 @dfn{login:} Plain-text username/password via LOGIN.
18013 @item
18014 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
18015 @end itemize
18016
18017 @item nnimap-expunge-on-close
18018 @cindex expunging
18019 @vindex nnimap-expunge-on-close
18020 Unlike Parmenides the @acronym{IMAP} designers have decided things that
18021 don't exist actually do exist.  More specifically, @acronym{IMAP} has
18022 this concept of marking articles @code{Deleted} which doesn't actually
18023 delete them, and this (marking them @code{Deleted}, that is) is what
18024 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
18025 similar).
18026
18027 Since the articles aren't really removed when we mark them with the
18028 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
18029 running in circles yet?
18030
18031 Traditionally, nnimap has removed all articles marked as @code{Deleted}
18032 when closing a mailbox but this is now configurable by this server
18033 variable.
18034
18035 The possible options are:
18036
18037 @table @code
18038
18039 @item always
18040 The default behavior, delete all articles marked as ``Deleted'' when
18041 closing a mailbox.
18042 @item never
18043 Never actually delete articles.  Currently there is no way of showing
18044 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
18045 may allow you to do this.  If you ever want to run the EXPUNGE command
18046 manually, @xref{Expunging mailboxes}.
18047 @item ask
18048 When closing mailboxes, nnimap will ask if you wish to expunge deleted
18049 articles or not.
18050
18051 @end table
18052
18053 @item nnimap-importantize-dormant
18054 @vindex nnimap-importantize-dormant
18055
18056 If non-@code{nil} (the default), marks dormant articles as ticked (as
18057 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
18058 naturally still (only) be marked as dormant.  This is to make dormant
18059 articles stand out, just like ticked articles, in other @acronym{IMAP}
18060 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
18061 has only one.)
18062
18063 Probably the only reason for frobbing this would be if you're trying
18064 enable per-user persistent dormant flags, using something like:
18065
18066 @lisp
18067 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
18068         (format "gnus-dormant-%s" (user-login-name)))
18069 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
18070         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
18071 @end lisp
18072
18073 In this case, you would not want the per-user dormant flag showing up
18074 as ticked for other users.
18075
18076 @item nnimap-expunge-search-string
18077 @cindex expunging
18078 @vindex nnimap-expunge-search-string
18079 @cindex expiring @acronym{IMAP} mail
18080
18081 This variable contain the @acronym{IMAP} search command sent to server when
18082 searching for articles eligible for expiring.  The default is
18083 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
18084 UID set and the second @code{%s} is replaced by a date.
18085
18086 Probably the only useful value to change this to is
18087 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
18088 messages instead of the internal article date.  See section 6.4.4 of
18089 RFC 2060 for more information on valid strings.
18090
18091 However, if @code{nnimap-search-uids-not-since-is-evil}
18092 is true, this variable has no effect since the search logic
18093 is reversed, as described below.
18094
18095 @item nnimap-authinfo-file
18096 @vindex nnimap-authinfo-file
18097
18098 A file containing credentials used to log in on servers.  The format is
18099 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
18100 variable @code{nntp-authinfo-file} for exact syntax; also see
18101 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
18102
18103 @example
18104 machine students.uio.no login larsi password geheimnis port imap
18105 @end example
18106
18107 Note that it should be @code{port imap}, or @code{port 143}, if you
18108 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
18109 actual port number used is port 993 for secured IMAP.  For
18110 convenience, Gnus will accept @code{port imaps} as a synonym of
18111 @code{port imap}.
18112
18113 @item nnimap-need-unselect-to-notice-new-mail
18114 @vindex nnimap-need-unselect-to-notice-new-mail
18115
18116 Unselect mailboxes before looking for new mail in them.  Some servers
18117 seem to need this under some circumstances; it was reported that
18118 Courier 1.7.1 did.
18119
18120 @item nnimap-nov-is-evil
18121 @vindex nnimap-nov-is-evil
18122 @cindex Courier @acronym{IMAP} server
18123 @cindex @acronym{NOV}
18124
18125 Never generate or use a local @acronym{NOV} database. Defaults to the
18126 value of @code{gnus-agent}.
18127
18128 Using a @acronym{NOV} database usually makes header fetching much
18129 faster, but it uses the @code{UID SEARCH UID} command, which is very
18130 slow on some servers (notably some versions of Courier). Since the Gnus
18131 Agent caches the information in the @acronym{NOV} database without using
18132 the slow command, this variable defaults to true if the Agent is in use,
18133 and false otherwise.
18134
18135 @item nnimap-search-uids-not-since-is-evil
18136 @vindex nnimap-search-uids-not-since-is-evil
18137 @cindex Courier @acronym{IMAP} server
18138 @cindex expiring @acronym{IMAP} mail
18139
18140 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
18141 @var{date}} command, which is slow on some @acronym{IMAP} servers
18142 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
18143 @var{date}} and prune the list of expirable articles within Gnus.
18144
18145 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
18146 list of expirable articles and asks the IMAP server questions like ``Of
18147 these articles, which ones are older than a week?'' While this seems
18148 like a perfectly reasonable question, some IMAP servers take a long time
18149 to answer it, since they seemingly go looking into every old article to
18150 see if it is one of the expirable ones. Curiously, the question ``Of
18151 @emph{all} articles, which ones are newer than a week?'' seems to be
18152 much faster to answer, so setting this variable causes Gnus to ask this
18153 question and figure out the answer to the real question itself.
18154
18155 This problem can really sneak up on you: when you first configure Gnus,
18156 everything works fine, but once you accumulate a couple thousand
18157 messages, you start cursing Gnus for being so slow. On the other hand,
18158 if you get a lot of email within a week, setting this variable will
18159 cause a lot of network traffic between Gnus and the IMAP server.
18160
18161 @item nnimap-logout-timeout
18162 @vindex nnimap-logout-timeout
18163
18164 There is a case where a connection to a @acronym{IMAP} server is unable
18165 to close, when connecting to the server via a certain kind of network,
18166 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
18167 between Emacs and the local network looks alive even if the server has
18168 closed a connection for some reason (typically, a timeout).
18169 Consequently, Emacs continues waiting for a response from the server for
18170 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
18171 you are in such a network, setting this variable to a number of seconds
18172 will be helpful.  If it is set, a hung connection will be closed
18173 forcibly, after this number of seconds from the time Emacs sends the
18174 @code{LOGOUT} command.  It should not be too small value but too large
18175 value will be inconvenient too.  Perhaps the value 1.0 will be a good
18176 candidate but it might be worth trying some other values.
18177
18178 Example server specification:
18179
18180 @lisp
18181 (nnimap "mail.server.com"
18182         (nnimap-logout-timeout 1.0))
18183 @end lisp
18184
18185 @end table
18186
18187 @menu
18188 * Splitting in IMAP::           Splitting mail with nnimap.
18189 * Expiring in IMAP::            Expiring mail with nnimap.
18190 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
18191 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
18192 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
18193 * Debugging IMAP::              What to do when things don't work.
18194 @end menu
18195
18196
18197
18198 @node Splitting in IMAP
18199 @subsection Splitting in IMAP
18200 @cindex splitting imap mail
18201
18202 Splitting is something Gnus users have loved and used for years, and now
18203 the rest of the world is catching up.  Yeah, dream on, not many
18204 @acronym{IMAP} servers have server side splitting and those that have
18205 splitting seem to use some non-standard protocol.  This means that
18206 @acronym{IMAP} support for Gnus has to do its own splitting.
18207
18208 And it does.
18209
18210 (Incidentally, people seem to have been dreaming on, and Sieve has
18211 gaining a market share and is supported by several IMAP servers.
18212 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
18213
18214 Here are the variables of interest:
18215
18216 @table @code
18217
18218 @item nnimap-split-crosspost
18219 @cindex splitting, crosspost
18220 @cindex crosspost
18221 @vindex nnimap-split-crosspost
18222
18223 If non-@code{nil}, do crossposting if several split methods match the
18224 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
18225 found will be used.
18226
18227 Nnmail equivalent: @code{nnmail-crosspost}.
18228
18229 @item nnimap-split-inbox
18230 @cindex splitting, inbox
18231 @cindex inbox
18232 @vindex nnimap-split-inbox
18233
18234 A string or a list of strings that gives the name(s) of @acronym{IMAP}
18235 mailboxes to split from.  Defaults to @code{nil}, which means that
18236 splitting is disabled!
18237
18238 @lisp
18239 (setq nnimap-split-inbox
18240       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
18241 @end lisp
18242
18243 No nnmail equivalent.
18244
18245 @item nnimap-split-rule
18246 @cindex splitting, rules
18247 @vindex nnimap-split-rule
18248
18249 New mail found in @code{nnimap-split-inbox} will be split according to
18250 this variable.
18251
18252 This variable contains a list of lists, where the first element in the
18253 sublist gives the name of the @acronym{IMAP} mailbox to move articles
18254 matching the regexp in the second element in the sublist.  Got that?
18255 Neither did I, we need examples.
18256
18257 @lisp
18258 (setq nnimap-split-rule
18259       '(("INBOX.nnimap"
18260          "^Sender: owner-nnimap@@vic20.globalcom.se")
18261         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
18262         ("INBOX.private" "")))
18263 @end lisp
18264
18265 This will put all articles from the nnimap mailing list into mailbox
18266 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
18267 into INBOX.junk and everything else in INBOX.private.
18268
18269 The first string may contain @samp{\\1} forms, like the ones used by
18270 replace-match to insert sub-expressions from the matched text.  For
18271 instance:
18272
18273 @lisp
18274 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
18275 @end lisp
18276
18277 The first element can also be the symbol @code{junk} to indicate that
18278 matching messages should simply be deleted.  Use with care.
18279
18280 The second element can also be a function.  In that case, it will be
18281 called with the first element of the rule as the argument, in a buffer
18282 containing the headers of the article.  It should return a
18283 non-@code{nil} value if it thinks that the mail belongs in that group.
18284
18285 Nnmail users might recollect that the last regexp had to be empty to
18286 match all articles (like in the example above).  This is not required in
18287 nnimap.  Articles not matching any of the regexps will not be moved out
18288 of your inbox.  (This might affect performance if you keep lots of
18289 unread articles in your inbox, since the splitting code would go over
18290 them every time you fetch new mail.)
18291
18292 These rules are processed from the beginning of the alist toward the
18293 end.  The first rule to make a match will ``win'', unless you have
18294 crossposting enabled.  In that case, all matching rules will ``win''.
18295
18296 This variable can also have a function as its value, the function will
18297 be called with the headers narrowed and should return a group where it
18298 thinks the article should be split to.  See @code{nnimap-split-fancy}.
18299
18300 The splitting code tries to create mailboxes if it needs to.
18301
18302 To allow for different split rules on different virtual servers, and
18303 even different split rules in different inboxes on the same server,
18304 the syntax of this variable have been extended along the lines of:
18305
18306 @lisp
18307 (setq nnimap-split-rule
18308       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
18309                                ("junk"    "From:.*Simon"))))
18310         ("my2server"    ("INBOX" nnimap-split-fancy))
18311         ("my[34]server" (".*" (("private" "To:.*Simon")
18312                                ("junk"    my-junk-func))))))
18313 @end lisp
18314
18315 The virtual server name is in fact a regexp, so that the same rules
18316 may apply to several servers.  In the example, the servers
18317 @code{my3server} and @code{my4server} both use the same rules.
18318 Similarly, the inbox string is also a regexp.  The actual splitting
18319 rules are as before, either a function, or a list with group/regexp or
18320 group/function elements.
18321
18322 Nnmail equivalent: @code{nnmail-split-methods}.
18323
18324 @item nnimap-split-predicate
18325 @cindex splitting
18326 @vindex nnimap-split-predicate
18327
18328 Mail matching this predicate in @code{nnimap-split-inbox} will be
18329 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
18330
18331 This might be useful if you use another @acronym{IMAP} client to read mail in
18332 your inbox but would like Gnus to split all articles in the inbox
18333 regardless of readedness.  Then you might change this to
18334 @samp{UNDELETED}.
18335
18336 @item nnimap-split-fancy
18337 @cindex splitting, fancy
18338 @findex nnimap-split-fancy
18339 @vindex nnimap-split-fancy
18340
18341 It's possible to set @code{nnimap-split-rule} to
18342 @code{nnmail-split-fancy} if you want to use fancy
18343 splitting.  @xref{Fancy Mail Splitting}.
18344
18345 However, to be able to have different fancy split rules for nnmail and
18346 nnimap back ends you can set @code{nnimap-split-rule} to
18347 @code{nnimap-split-fancy} and define the nnimap specific fancy split
18348 rule in @code{nnimap-split-fancy}.
18349
18350 Example:
18351
18352 @lisp
18353 (setq nnimap-split-rule 'nnimap-split-fancy
18354       nnimap-split-fancy ...)
18355 @end lisp
18356
18357 Nnmail equivalent: @code{nnmail-split-fancy}.
18358
18359 @item nnimap-split-download-body
18360 @findex nnimap-split-download-body
18361 @vindex nnimap-split-download-body
18362
18363 Set to non-@code{nil} to download entire articles during splitting.
18364 This is generally not required, and will slow things down
18365 considerably.  You may need it if you want to use an advanced
18366 splitting function that analyzes the body to split the article.
18367
18368 @end table
18369
18370 @node Expiring in IMAP
18371 @subsection Expiring in IMAP
18372 @cindex expiring @acronym{IMAP} mail
18373
18374 Even though @code{nnimap} is not a proper @code{nnmail} derived back
18375 end, it supports most features in regular expiring (@pxref{Expiring
18376 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
18377 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
18378 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
18379 follows below are the variables used by the @code{nnimap} expiry
18380 process.
18381
18382 A note on how the expire mark is stored on the @acronym{IMAP} server is
18383 appropriate here as well.  The expire mark is translated into a
18384 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
18385 message.  This means that likely only Gnus will understand and treat
18386 the @code{gnus-expire} mark properly, although other clients may allow
18387 you to view client specific flags on the message.  It also means that
18388 your server must support permanent storage of client specific flags on
18389 messages.  Most do, fortunately.
18390
18391 If expiring @acronym{IMAP} mail seems very slow, try setting the server
18392 variable @code{nnimap-search-uids-not-since-is-evil}.
18393
18394 @table @code
18395
18396 @item nnmail-expiry-wait
18397 @item nnmail-expiry-wait-function
18398
18399 These variables are fully supported.  The expire value can be a
18400 number, the symbol @code{immediate} or @code{never}.
18401
18402 @item nnmail-expiry-target
18403
18404 This variable is supported, and internally implemented by calling the
18405 @code{nnmail} functions that handle this.  It contains an optimization
18406 that if the destination is a @acronym{IMAP} group on the same server, the
18407 article is copied instead of appended (that is, uploaded again).
18408
18409 @end table
18410
18411 @node Editing IMAP ACLs
18412 @subsection Editing IMAP ACLs
18413 @cindex editing imap acls
18414 @cindex Access Control Lists
18415 @cindex Editing @acronym{IMAP} ACLs
18416 @kindex G l (Group)
18417 @findex gnus-group-nnimap-edit-acl
18418
18419 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
18420 limiting (or enabling) other users access to your mail boxes.  Not all
18421 @acronym{IMAP} servers support this, this function will give an error if it
18422 doesn't.
18423
18424 To edit an ACL for a mailbox, type @kbd{G l}
18425 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
18426 editing window with detailed instructions.
18427
18428 Some possible uses:
18429
18430 @itemize @bullet
18431 @item
18432 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
18433 on your mailing list mailboxes enables other users on the same server to
18434 follow the list without subscribing to it.
18435 @item
18436 At least with the Cyrus server, you are required to give the user
18437 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
18438 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
18439 INBOX.mailbox).
18440 @end itemize
18441
18442 @node Expunging mailboxes
18443 @subsection Expunging mailboxes
18444 @cindex expunging
18445
18446 @cindex expunge
18447 @cindex manual expunging
18448 @kindex G x (Group)
18449 @findex gnus-group-nnimap-expunge
18450
18451 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
18452 you may want the option of expunging all deleted articles in a mailbox
18453 manually.  This is exactly what @kbd{G x} does.
18454
18455 Currently there is no way of showing deleted articles, you can just
18456 delete them.
18457
18458 @node A note on namespaces
18459 @subsection A note on namespaces
18460 @cindex IMAP namespace
18461 @cindex namespaces
18462
18463 The @acronym{IMAP} protocol has a concept called namespaces, described
18464 by the following text in the RFC2060:
18465
18466 @display
18467 5.1.2.  Mailbox Namespace Naming Convention
18468
18469    By convention, the first hierarchical element of any mailbox name
18470    which begins with "#" identifies the "namespace" of the remainder of
18471    the name.  This makes it possible to disambiguate between different
18472    types of mailbox stores, each of which have their own namespaces.
18473
18474       For example, implementations which offer access to USENET
18475       newsgroups MAY use the "#news" namespace to partition the USENET
18476       newsgroup namespace from that of other mailboxes.  Thus, the
18477       comp.mail.misc newsgroup would have an mailbox name of
18478       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
18479       to a different object (e.g. a user's private mailbox).
18480 @end display
18481
18482 While there is nothing in this text that warrants concern for the
18483 @acronym{IMAP} implementation in Gnus, some servers use namespace
18484 prefixes in a way that does not work with how Gnus uses mailbox names.
18485
18486 Specifically, University of Washington's @acronym{IMAP} server uses
18487 mailbox names like @code{#driver.mbx/read-mail} which are valid only
18488 in the @sc{create} and @sc{append} commands.  After the mailbox is
18489 created (or a messages is appended to a mailbox), it must be accessed
18490 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
18491 not make it possible for the user to guarantee that user entered
18492 mailbox names will only be used with the CREATE and APPEND commands,
18493 you should simply not use the namespace prefixed mailbox names in
18494 Gnus.
18495
18496 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
18497 for more information on how to use the prefixes.  They are a power
18498 tool and should be used only if you are sure what the effects are.
18499
18500 @node Debugging IMAP
18501 @subsection Debugging IMAP
18502 @cindex IMAP debugging
18503 @cindex protocol dump (IMAP)
18504
18505 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
18506 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
18507 best to fix them right away.  If you encounter odd behavior, chances
18508 are that either the server or Gnus is buggy.
18509
18510 If you are familiar with network protocols in general, you will
18511 probably be able to extract some clues from the protocol dump of the
18512 exchanges between Gnus and the server.  Even if you are not familiar
18513 with network protocols, when you include the protocol dump in
18514 @acronym{IMAP}-related bug reports you are helping us with data
18515 critical to solving the problem.  Therefore, we strongly encourage you
18516 to include the protocol dump when reporting IMAP bugs in Gnus.
18517
18518
18519 @vindex imap-log
18520 Because the protocol dump, when enabled, generates lots of data, it is
18521 disabled by default.  You can enable it by setting @code{imap-log} as
18522 follows:
18523
18524 @lisp
18525 (setq imap-log t)
18526 @end lisp
18527
18528 This instructs the @code{imap.el} package to log any exchanges with
18529 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
18530 for error messages, which sometimes are tagged with the keyword
18531 @code{BAD}---but when submitting a bug, make sure to include all the
18532 data.
18533
18534 @node Other Sources
18535 @section Other Sources
18536
18537 Gnus can do more than just read news or mail.  The methods described
18538 below allow Gnus to view directories and files as if they were
18539 newsgroups.
18540
18541 @menu
18542 * Directory Groups::            You can read a directory as if it was a newsgroup.
18543 * Anything Groups::             Dired?  Who needs dired?
18544 * Document Groups::             Single files can be the basis of a group.
18545 * SOUP::                        Reading @sc{soup} packets ``offline''.
18546 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
18547 @end menu
18548
18549
18550 @node Directory Groups
18551 @subsection Directory Groups
18552 @cindex nndir
18553 @cindex directory groups
18554
18555 If you have a directory that has lots of articles in separate files in
18556 it, you might treat it as a newsgroup.  The files have to have numerical
18557 names, of course.
18558
18559 This might be an opportune moment to mention @code{ange-ftp} (and its
18560 successor @code{efs}), that most wonderful of all wonderful Emacs
18561 packages.  When I wrote @code{nndir}, I didn't think much about it---a
18562 back end to read directories.  Big deal.
18563
18564 @code{ange-ftp} changes that picture dramatically.  For instance, if you
18565 enter the @code{ange-ftp} file name
18566 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
18567 @code{ange-ftp} or @code{efs} will actually allow you to read this
18568 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
18569
18570 @code{nndir} will use @acronym{NOV} files if they are present.
18571
18572 @code{nndir} is a ``read-only'' back end---you can't delete or expire
18573 articles with this method.  You can use @code{nnmh} or @code{nnml} for
18574 whatever you use @code{nndir} for, so you could switch to any of those
18575 methods if you feel the need to have a non-read-only @code{nndir}.
18576
18577
18578 @node Anything Groups
18579 @subsection Anything Groups
18580 @cindex nneething
18581
18582 From the @code{nndir} back end (which reads a single spool-like
18583 directory), it's just a hop and a skip to @code{nneething}, which
18584 pretends that any arbitrary directory is a newsgroup.  Strange, but
18585 true.
18586
18587 When @code{nneething} is presented with a directory, it will scan this
18588 directory and assign article numbers to each file.  When you enter such
18589 a group, @code{nneething} must create ``headers'' that Gnus can use.
18590 After all, Gnus is a newsreader, in case you're forgetting.
18591 @code{nneething} does this in a two-step process.  First, it snoops each
18592 file in question.  If the file looks like an article (i.e., the first
18593 few lines look like headers), it will use this as the head.  If this is
18594 just some arbitrary file without a head (e.g. a C source file),
18595 @code{nneething} will cobble up a header out of thin air.  It will use
18596 file ownership, name and date and do whatever it can with these
18597 elements.
18598
18599 All this should happen automatically for you, and you will be presented
18600 with something that looks very much like a newsgroup.  Totally like a
18601 newsgroup, to be precise.  If you select an article, it will be displayed
18602 in the article buffer, just as usual.
18603
18604 If you select a line that represents a directory, Gnus will pop you into
18605 a new summary buffer for this @code{nneething} group.  And so on.  You can
18606 traverse the entire disk this way, if you feel like, but remember that
18607 Gnus is not dired, really, and does not intend to be, either.
18608
18609 There are two overall modes to this action---ephemeral or solid.  When
18610 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
18611 will not store information on what files you have read, and what files
18612 are new, and so on.  If you create a solid @code{nneething} group the
18613 normal way with @kbd{G m}, Gnus will store a mapping table between
18614 article numbers and file names, and you can treat this group like any
18615 other groups.  When you activate a solid @code{nneething} group, you will
18616 be told how many unread articles it contains, etc., etc.
18617
18618 Some variables:
18619
18620 @table @code
18621 @item nneething-map-file-directory
18622 @vindex nneething-map-file-directory
18623 All the mapping files for solid @code{nneething} groups will be stored
18624 in this directory, which defaults to @file{~/.nneething/}.
18625
18626 @item nneething-exclude-files
18627 @vindex nneething-exclude-files
18628 All files that match this regexp will be ignored.  Nice to use to exclude
18629 auto-save files and the like, which is what it does by default.
18630
18631 @item nneething-include-files
18632 @vindex nneething-include-files
18633 Regexp saying what files to include in the group.  If this variable is
18634 non-@code{nil}, only files matching this regexp will be included.
18635
18636 @item nneething-map-file
18637 @vindex nneething-map-file
18638 Name of the map files.
18639 @end table
18640
18641
18642 @node Document Groups
18643 @subsection Document Groups
18644 @cindex nndoc
18645 @cindex documentation group
18646 @cindex help group
18647
18648 @code{nndoc} is a cute little thing that will let you read a single file
18649 as a newsgroup.  Several files types are supported:
18650
18651 @table @code
18652 @cindex Babyl
18653 @item babyl
18654 The Babyl format.
18655
18656 @cindex mbox
18657 @cindex Unix mbox
18658 @item mbox
18659 The standard Unix mbox file.
18660
18661 @cindex MMDF mail box
18662 @item mmdf
18663 The MMDF mail box format.
18664
18665 @item news
18666 Several news articles appended into a file.
18667
18668 @cindex rnews batch files
18669 @item rnews
18670 The rnews batch transport format.
18671
18672 @item nsmail
18673 Netscape mail boxes.
18674
18675 @item mime-parts
18676 @acronym{MIME} multipart messages.
18677
18678 @item standard-digest
18679 The standard (RFC 1153) digest format.
18680
18681 @item mime-digest
18682 A @acronym{MIME} digest of messages.
18683
18684 @item lanl-gov-announce
18685 Announcement messages from LANL Gov Announce.
18686
18687 @cindex forwarded messages
18688 @item rfc822-forward
18689 A message forwarded according to RFC822.
18690
18691 @item outlook
18692 The Outlook mail box.
18693
18694 @item oe-dbx
18695 The Outlook Express dbx mail box.
18696
18697 @item exim-bounce
18698 A bounce message from the Exim MTA.
18699
18700 @item forward
18701 A message forwarded according to informal rules.
18702
18703 @item rfc934
18704 An RFC934-forwarded message.
18705
18706 @item mailman
18707 A mailman digest.
18708
18709 @item clari-briefs
18710 A digest of Clarinet brief news items.
18711
18712 @item slack-digest
18713 Non-standard digest format---matches most things, but does it badly.
18714
18715 @item mail-in-mail
18716 The last resort.
18717 @end table
18718
18719 You can also use the special ``file type'' @code{guess}, which means
18720 that @code{nndoc} will try to guess what file type it is looking at.
18721 @code{digest} means that @code{nndoc} should guess what digest type the
18722 file is.
18723
18724 @code{nndoc} will not try to change the file or insert any extra headers into
18725 it---it will simply, like, let you use the file as the basis for a
18726 group.  And that's it.
18727
18728 If you have some old archived articles that you want to insert into your
18729 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
18730 that.  Say you have an old @file{RMAIL} file with mail that you now want
18731 to split into your new @code{nnml} groups.  You look at that file using
18732 @code{nndoc} (using the @kbd{G f} command in the group buffer
18733 (@pxref{Foreign Groups})), set the process mark on all the articles in
18734 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18735 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18736 file is now also stored in lots of @code{nnml} directories, and you can
18737 delete that pesky @file{RMAIL} file.  If you have the guts!
18738
18739 Virtual server variables:
18740
18741 @table @code
18742 @item nndoc-article-type
18743 @vindex nndoc-article-type
18744 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18745 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18746 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18747 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18748 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18749
18750 @item nndoc-post-type
18751 @vindex nndoc-post-type
18752 This variable says whether Gnus is to consider the group a news group or
18753 a mail group.  There are two valid values:  @code{mail} (the default)
18754 and @code{news}.
18755 @end table
18756
18757 @menu
18758 * Document Server Internals::   How to add your own document types.
18759 @end menu
18760
18761
18762 @node Document Server Internals
18763 @subsubsection Document Server Internals
18764
18765 Adding new document types to be recognized by @code{nndoc} isn't
18766 difficult.  You just have to whip up a definition of what the document
18767 looks like, write a predicate function to recognize that document type,
18768 and then hook into @code{nndoc}.
18769
18770 First, here's an example document type definition:
18771
18772 @example
18773 (mmdf
18774  (article-begin .  "^\^A\^A\^A\^A\n")
18775  (body-end .  "^\^A\^A\^A\^A\n"))
18776 @end example
18777
18778 The definition is simply a unique @dfn{name} followed by a series of
18779 regexp pseudo-variable settings.  Below are the possible
18780 variables---don't be daunted by the number of variables; most document
18781 types can be defined with very few settings:
18782
18783 @table @code
18784 @item first-article
18785 If present, @code{nndoc} will skip past all text until it finds
18786 something that match this regexp.  All text before this will be
18787 totally ignored.
18788
18789 @item article-begin
18790 This setting has to be present in all document type definitions.  It
18791 says what the beginning of each article looks like.  To do more
18792 complicated things that cannot be dealt with a simple regexp, you can
18793 use @code{article-begin-function} instead of this.
18794
18795 @item article-begin-function
18796 If present, this should be a function that moves point to the beginning
18797 of each article.  This setting overrides @code{article-begin}.
18798
18799 @item head-begin
18800 If present, this should be a regexp that matches the head of the
18801 article.  To do more complicated things that cannot be dealt with a
18802 simple regexp, you can use @code{head-begin-function} instead of this.
18803
18804 @item head-begin-function
18805 If present, this should be a function that moves point to the head of
18806 the article.  This setting overrides @code{head-begin}.
18807
18808 @item head-end
18809 This should match the end of the head of the article.  It defaults to
18810 @samp{^$}---the empty line.
18811
18812 @item body-begin
18813 This should match the beginning of the body of the article.  It defaults
18814 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18815 a simple regexp, you can use @code{body-begin-function} instead of this.
18816
18817 @item body-begin-function
18818 If present, this function should move point to the beginning of the body
18819 of the article.  This setting overrides @code{body-begin}.
18820
18821 @item body-end
18822 If present, this should match the end of the body of the article.  To do
18823 more complicated things that cannot be dealt with a simple regexp, you
18824 can use @code{body-end-function} instead of this.
18825
18826 @item body-end-function
18827 If present, this function should move point to the end of the body of
18828 the article.  This setting overrides @code{body-end}.
18829
18830 @item file-begin
18831 If present, this should match the beginning of the file.  All text
18832 before this regexp will be totally ignored.
18833
18834 @item file-end
18835 If present, this should match the end of the file.  All text after this
18836 regexp will be totally ignored.
18837
18838 @end table
18839
18840 So, using these variables @code{nndoc} is able to dissect a document
18841 file into a series of articles, each with a head and a body.  However, a
18842 few more variables are needed since not all document types are all that
18843 news-like---variables needed to transform the head or the body into
18844 something that's palatable for Gnus:
18845
18846 @table @code
18847 @item prepare-body-function
18848 If present, this function will be called when requesting an article.  It
18849 will be called with point at the start of the body, and is useful if the
18850 document has encoded some parts of its contents.
18851
18852 @item article-transform-function
18853 If present, this function is called when requesting an article.  It's
18854 meant to be used for more wide-ranging transformation of both head and
18855 body of the article.
18856
18857 @item generate-head-function
18858 If present, this function is called to generate a head that Gnus can
18859 understand.  It is called with the article number as a parameter, and is
18860 expected to generate a nice head for the article in question.  It is
18861 called when requesting the headers of all articles.
18862
18863 @item generate-article-function
18864 If present, this function is called to generate an entire article that
18865 Gnus can understand.  It is called with the article number as a
18866 parameter when requesting all articles.
18867
18868 @item dissection-function
18869 If present, this function is called to dissect a document by itself,
18870 overriding @code{first-article}, @code{article-begin},
18871 @code{article-begin-function}, @code{head-begin},
18872 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18873 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18874 @code{file-begin}, and @code{file-end}.
18875
18876 @end table
18877
18878 Let's look at the most complicated example I can come up with---standard
18879 digests:
18880
18881 @example
18882 (standard-digest
18883  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18884  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18885  (prepare-body-function . nndoc-unquote-dashes)
18886  (body-end-function . nndoc-digest-body-end)
18887  (head-end . "^ ?$")
18888  (body-begin . "^ ?\n")
18889  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18890  (subtype digest guess))
18891 @end example
18892
18893 We see that all text before a 70-width line of dashes is ignored; all
18894 text after a line that starts with that @samp{^End of} is also ignored;
18895 each article begins with a 30-width line of dashes; the line separating
18896 the head from the body may contain a single space; and that the body is
18897 run through @code{nndoc-unquote-dashes} before being delivered.
18898
18899 To hook your own document definition into @code{nndoc}, use the
18900 @code{nndoc-add-type} function.  It takes two parameters---the first
18901 is the definition itself and the second (optional) parameter says
18902 where in the document type definition alist to put this definition.
18903 The alist is traversed sequentially, and
18904 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18905 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18906 @code{mmdf} type, and so on.  These type predicates should return
18907 @code{nil} if the document is not of the correct type; @code{t} if it
18908 is of the correct type; and a number if the document might be of the
18909 correct type.  A high number means high probability; a low number
18910 means low probability with @samp{0} being the lowest valid number.
18911
18912
18913 @node SOUP
18914 @subsection SOUP
18915 @cindex SOUP
18916 @cindex offline
18917
18918 In the PC world people often talk about ``offline'' newsreaders.  These
18919 are thingies that are combined reader/news transport monstrosities.
18920 With built-in modem programs.  Yecchh!
18921
18922 Of course, us Unix Weenie types of human beans use things like
18923 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
18924 transport things like Ghod intended.  And then we just use normal
18925 newsreaders.
18926
18927 However, it can sometimes be convenient to do something that's a bit
18928 easier on the brain if you have a very slow modem, and you're not really
18929 that interested in doing things properly.
18930
18931 A file format called @sc{soup} has been developed for transporting news
18932 and mail from servers to home machines and back again.  It can be a bit
18933 fiddly.
18934
18935 First some terminology:
18936
18937 @table @dfn
18938
18939 @item server
18940 This is the machine that is connected to the outside world and where you
18941 get news and/or mail from.
18942
18943 @item home machine
18944 This is the machine that you want to do the actual reading and responding
18945 on.  It is typically not connected to the rest of the world in any way.
18946
18947 @item packet
18948 Something that contains messages and/or commands.  There are two kinds
18949 of packets:
18950
18951 @table @dfn
18952 @item message packets
18953 These are packets made at the server, and typically contain lots of
18954 messages for you to read.  These are called @file{SoupoutX.tgz} by
18955 default, where @var{x} is a number.
18956
18957 @item response packets
18958 These are packets made at the home machine, and typically contains
18959 replies that you've written.  These are called @file{SoupinX.tgz} by
18960 default, where @var{x} is a number.
18961
18962 @end table
18963
18964 @end table
18965
18966
18967 @enumerate
18968
18969 @item
18970 You log in on the server and create a @sc{soup} packet.  You can either
18971 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
18972 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
18973 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
18974
18975 @item
18976 You transfer the packet home.  Rail, boat, car or modem will do fine.
18977
18978 @item
18979 You put the packet in your home directory.
18980
18981 @item
18982 You fire up Gnus on your home machine using the @code{nnsoup} back end as
18983 the native or secondary server.
18984
18985 @item
18986 You read articles and mail and answer and followup to the things you
18987 want (@pxref{SOUP Replies}).
18988
18989 @item
18990 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
18991 packet.
18992
18993 @item
18994 You transfer this packet to the server.
18995
18996 @item
18997 You use Gnus to mail this packet out with the @kbd{G s s} command.
18998
18999 @item
19000 You then repeat until you die.
19001
19002 @end enumerate
19003
19004 So you basically have a bipartite system---you use @code{nnsoup} for
19005 reading and Gnus for packing/sending these @sc{soup} packets.
19006
19007 @menu
19008 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
19009 * SOUP Groups::                 A back end for reading @sc{soup} packets.
19010 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
19011 @end menu
19012
19013
19014 @node SOUP Commands
19015 @subsubsection SOUP Commands
19016
19017 These are commands for creating and manipulating @sc{soup} packets.
19018
19019 @table @kbd
19020 @item G s b
19021 @kindex G s b (Group)
19022 @findex gnus-group-brew-soup
19023 Pack all unread articles in the current group
19024 (@code{gnus-group-brew-soup}).  This command understands the
19025 process/prefix convention.
19026
19027 @item G s w
19028 @kindex G s w (Group)
19029 @findex gnus-soup-save-areas
19030 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
19031
19032 @item G s s
19033 @kindex G s s (Group)
19034 @findex gnus-soup-send-replies
19035 Send all replies from the replies packet
19036 (@code{gnus-soup-send-replies}).
19037
19038 @item G s p
19039 @kindex G s p (Group)
19040 @findex gnus-soup-pack-packet
19041 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
19042
19043 @item G s r
19044 @kindex G s r (Group)
19045 @findex nnsoup-pack-replies
19046 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
19047
19048 @item O s
19049 @kindex O s (Summary)
19050 @findex gnus-soup-add-article
19051 This summary-mode command adds the current article to a @sc{soup} packet
19052 (@code{gnus-soup-add-article}).  It understands the process/prefix
19053 convention (@pxref{Process/Prefix}).
19054
19055 @end table
19056
19057
19058 There are a few variables to customize where Gnus will put all these
19059 thingies:
19060
19061 @table @code
19062
19063 @item gnus-soup-directory
19064 @vindex gnus-soup-directory
19065 Directory where Gnus will save intermediate files while composing
19066 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
19067
19068 @item gnus-soup-replies-directory
19069 @vindex gnus-soup-replies-directory
19070 This is what Gnus will use as a temporary directory while sending our
19071 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
19072
19073 @item gnus-soup-prefix-file
19074 @vindex gnus-soup-prefix-file
19075 Name of the file where Gnus stores the last used prefix.  The default is
19076 @samp{gnus-prefix}.
19077
19078 @item gnus-soup-packer
19079 @vindex gnus-soup-packer
19080 A format string command for packing a @sc{soup} packet.  The default is
19081 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
19082
19083 @item gnus-soup-unpacker
19084 @vindex gnus-soup-unpacker
19085 Format string command for unpacking a @sc{soup} packet.  The default is
19086 @samp{gunzip -c %s | tar xvf -}.
19087
19088 @item gnus-soup-packet-directory
19089 @vindex gnus-soup-packet-directory
19090 Where Gnus will look for reply packets.  The default is @file{~/}.
19091
19092 @item gnus-soup-packet-regexp
19093 @vindex gnus-soup-packet-regexp
19094 Regular expression matching @sc{soup} reply packets in
19095 @code{gnus-soup-packet-directory}.
19096
19097 @end table
19098
19099
19100 @node SOUP Groups
19101 @subsubsection SOUP Groups
19102 @cindex nnsoup
19103
19104 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
19105 read incoming packets, unpack them, and put them in a directory where
19106 you can read them at leisure.
19107
19108 These are the variables you can use to customize its behavior:
19109
19110 @table @code
19111
19112 @item nnsoup-tmp-directory
19113 @vindex nnsoup-tmp-directory
19114 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
19115 directory.  (@file{/tmp/} by default.)
19116
19117 @item nnsoup-directory
19118 @vindex nnsoup-directory
19119 @code{nnsoup} then moves each message and index file to this directory.
19120 The default is @file{~/SOUP/}.
19121
19122 @item nnsoup-replies-directory
19123 @vindex nnsoup-replies-directory
19124 All replies will be stored in this directory before being packed into a
19125 reply packet.  The default is @file{~/SOUP/replies/}.
19126
19127 @item nnsoup-replies-format-type
19128 @vindex nnsoup-replies-format-type
19129 The @sc{soup} format of the replies packets.  The default is @samp{?n}
19130 (rnews), and I don't think you should touch that variable.  I probably
19131 shouldn't even have documented it.  Drats!  Too late!
19132
19133 @item nnsoup-replies-index-type
19134 @vindex nnsoup-replies-index-type
19135 The index type of the replies packet.  The default is @samp{?n}, which
19136 means ``none''.  Don't fiddle with this one either!
19137
19138 @item nnsoup-active-file
19139 @vindex nnsoup-active-file
19140 Where @code{nnsoup} stores lots of information.  This is not an ``active
19141 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
19142 this file or mess it up in any way, you're dead.  The default is
19143 @file{~/SOUP/active}.
19144
19145 @item nnsoup-packer
19146 @vindex nnsoup-packer
19147 Format string command for packing a reply @sc{soup} packet.  The default
19148 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
19149
19150 @item nnsoup-unpacker
19151 @vindex nnsoup-unpacker
19152 Format string command for unpacking incoming @sc{soup} packets.  The
19153 default is @samp{gunzip -c %s | tar xvf -}.
19154
19155 @item nnsoup-packet-directory
19156 @vindex nnsoup-packet-directory
19157 Where @code{nnsoup} will look for incoming packets.  The default is
19158 @file{~/}.
19159
19160 @item nnsoup-packet-regexp
19161 @vindex nnsoup-packet-regexp
19162 Regular expression matching incoming @sc{soup} packets.  The default is
19163 @samp{Soupout}.
19164
19165 @item nnsoup-always-save
19166 @vindex nnsoup-always-save
19167 If non-@code{nil}, save the replies buffer after each posted message.
19168
19169 @end table
19170
19171
19172 @node SOUP Replies
19173 @subsubsection SOUP Replies
19174
19175 Just using @code{nnsoup} won't mean that your postings and mailings end
19176 up in @sc{soup} reply packets automagically.  You have to work a bit
19177 more for that to happen.
19178
19179 @findex nnsoup-set-variables
19180 The @code{nnsoup-set-variables} command will set the appropriate
19181 variables to ensure that all your followups and replies end up in the
19182 @sc{soup} system.
19183
19184 In specific, this is what it does:
19185
19186 @lisp
19187 (setq message-send-news-function 'nnsoup-request-post)
19188 (setq message-send-mail-function 'nnsoup-request-mail)
19189 @end lisp
19190
19191 And that's it, really.  If you only want news to go into the @sc{soup}
19192 system you just use the first line.  If you only want mail to be
19193 @sc{soup}ed you use the second.
19194
19195
19196 @node Mail-To-News Gateways
19197 @subsection Mail-To-News Gateways
19198 @cindex mail-to-news gateways
19199 @cindex gateways
19200
19201 If your local @code{nntp} server doesn't allow posting, for some reason
19202 or other, you can post using one of the numerous mail-to-news gateways.
19203 The @code{nngateway} back end provides the interface.
19204
19205 Note that you can't read anything from this back end---it can only be
19206 used to post with.
19207
19208 Server variables:
19209
19210 @table @code
19211 @item nngateway-address
19212 @vindex nngateway-address
19213 This is the address of the mail-to-news gateway.
19214
19215 @item nngateway-header-transformation
19216 @vindex nngateway-header-transformation
19217 News headers often have to be transformed in some odd way or other
19218 for the mail-to-news gateway to accept it.  This variable says what
19219 transformation should be called, and defaults to
19220 @code{nngateway-simple-header-transformation}.  The function is called
19221 narrowed to the headers to be transformed and with one parameter---the
19222 gateway address.
19223
19224 This default function just inserts a new @code{To} header based on the
19225 @code{Newsgroups} header and the gateway address.
19226 For instance, an article with this @code{Newsgroups} header:
19227
19228 @example
19229 Newsgroups: alt.religion.emacs
19230 @end example
19231
19232 will get this @code{To} header inserted:
19233
19234 @example
19235 To: alt-religion-emacs@@GATEWAY
19236 @end example
19237
19238 The following pre-defined functions exist:
19239
19240 @findex nngateway-simple-header-transformation
19241 @table @code
19242
19243 @item nngateway-simple-header-transformation
19244 Creates a @code{To} header that looks like
19245 @var{newsgroup}@@@code{nngateway-address}.
19246
19247 @findex nngateway-mail2news-header-transformation
19248
19249 @item nngateway-mail2news-header-transformation
19250 Creates a @code{To} header that looks like
19251 @code{nngateway-address}.
19252 @end table
19253
19254 @end table
19255
19256 Here's an example:
19257
19258 @lisp
19259 (setq gnus-post-method
19260       '(nngateway
19261         "mail2news@@replay.com"
19262         (nngateway-header-transformation
19263          nngateway-mail2news-header-transformation)))
19264 @end lisp
19265
19266 So, to use this, simply say something like:
19267
19268 @lisp
19269 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
19270 @end lisp
19271
19272
19273
19274 @node Combined Groups
19275 @section Combined Groups
19276
19277 Gnus allows combining a mixture of all the other group types into bigger
19278 groups.
19279
19280 @menu
19281 * Virtual Groups::              Combining articles from many groups.
19282 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
19283 @end menu
19284
19285
19286 @node Virtual Groups
19287 @subsection Virtual Groups
19288 @cindex nnvirtual
19289 @cindex virtual groups
19290 @cindex merging groups
19291
19292 An @dfn{nnvirtual group} is really nothing more than a collection of
19293 other groups.
19294
19295 For instance, if you are tired of reading many small groups, you can
19296 put them all in one big group, and then grow tired of reading one
19297 big, unwieldy group.  The joys of computing!
19298
19299 You specify @code{nnvirtual} as the method.  The address should be a
19300 regexp to match component groups.
19301
19302 All marks in the virtual group will stick to the articles in the
19303 component groups.  So if you tick an article in a virtual group, the
19304 article will also be ticked in the component group from whence it
19305 came.  (And vice versa---marks from the component groups will also be
19306 shown in the virtual group.).  To create an empty virtual group, run
19307 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
19308 and edit the method regexp with @kbd{M-e}
19309 (@code{gnus-group-edit-group-method})
19310
19311 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
19312 newsgroups into one, big, happy newsgroup:
19313
19314 @lisp
19315 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
19316 @end lisp
19317
19318 The component groups can be native or foreign; everything should work
19319 smoothly, but if your computer explodes, it was probably my fault.
19320
19321 Collecting the same group from several servers might actually be a good
19322 idea if users have set the Distribution header to limit distribution.
19323 If you would like to read @samp{soc.motss} both from a server in Japan
19324 and a server in Norway, you could use the following as the group regexp:
19325
19326 @example
19327 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
19328 @end example
19329
19330 (Remember, though, that if you're creating the group with @kbd{G m}, you
19331 shouldn't double the backslashes, and you should leave off the quote
19332 characters at the beginning and the end of the string.)
19333
19334 This should work kinda smoothly---all articles from both groups should
19335 end up in this one, and there should be no duplicates.  Threading (and
19336 the rest) will still work as usual, but there might be problems with the
19337 sequence of articles.  Sorting on date might be an option here
19338 (@pxref{Selecting a Group}).
19339
19340 One limitation, however---all groups included in a virtual
19341 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
19342 zombie groups can't be component groups for @code{nnvirtual} groups.
19343
19344 @vindex nnvirtual-always-rescan
19345 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
19346 is the default), @code{nnvirtual} will always scan groups for unread
19347 articles when entering a virtual group.  If this variable is @code{nil}
19348 and you read articles in a component group after the virtual group has
19349 been activated, the read articles from the component group will show up
19350 when you enter the virtual group.  You'll also see this effect if you
19351 have two virtual groups that have a component group in common.  If
19352 that's the case, you should set this variable to @code{t}.  Or you can
19353 just tap @code{M-g} on the virtual group every time before you enter
19354 it---it'll have much the same effect.
19355
19356 @code{nnvirtual} can have both mail and news groups as component groups.
19357 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
19358 has to ask the back end of the component group the article comes from
19359 whether it is a news or mail back end.  However, when you do a @kbd{^},
19360 there is typically no sure way for the component back end to know this,
19361 and in that case @code{nnvirtual} tells Gnus that the article came from a
19362 not-news back end.  (Just to be on the safe side.)
19363
19364 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
19365 line from the article you respond to in these cases.
19366
19367 @code{nnvirtual} groups do not inherit anything but articles and marks
19368 from component groups---group parameters, for instance, are not
19369 inherited.
19370
19371
19372 @node Kibozed Groups
19373 @subsection Kibozed Groups
19374 @cindex nnkiboze
19375 @cindex kibozing
19376
19377 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
19378 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
19379 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
19380 down to a halt with useless requests!  Oh happiness!
19381
19382 @kindex G k (Group)
19383 To create a kibozed group, use the @kbd{G k} command in the group
19384 buffer.
19385
19386 The address field of the @code{nnkiboze} method is, as with
19387 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
19388 @code{nnkiboze} group.  That's where most similarities between
19389 @code{nnkiboze} and @code{nnvirtual} end.
19390
19391 In addition to this regexp detailing component groups, an
19392 @code{nnkiboze} group must have a score file to say what articles are
19393 to be included in the group (@pxref{Scoring}).
19394
19395 @kindex M-x nnkiboze-generate-groups
19396 @findex nnkiboze-generate-groups
19397 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
19398 @code{nnkiboze} groups you want to have.  This command will take time.
19399 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
19400 headers from all the articles in all the component groups and run them
19401 through the scoring process to determine if there are any articles in
19402 the groups that are to be part of the @code{nnkiboze} groups.
19403
19404 Please limit the number of component groups by using restrictive
19405 regexps.  Otherwise your sysadmin may become annoyed with you, and the
19406 @acronym{NNTP} site may throw you off and never let you back in again.
19407 Stranger things have happened.
19408
19409 @code{nnkiboze} component groups do not have to be alive---they can be dead,
19410 and they can be foreign.  No restrictions.
19411
19412 @vindex nnkiboze-directory
19413 The generation of an @code{nnkiboze} group means writing two files in
19414 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
19415 One contains the @acronym{NOV} header lines for all the articles in
19416 the group, and the other is an additional @file{.newsrc} file to store
19417 information on what groups have been searched through to find
19418 component articles.
19419
19420 Articles marked as read in the @code{nnkiboze} group will have
19421 their @acronym{NOV} lines removed from the @acronym{NOV} file.
19422
19423
19424 @node Email Based Diary
19425 @section Email Based Diary
19426 @cindex diary
19427 @cindex email based diary
19428 @cindex calendar
19429
19430 This section describes a special mail back end called @code{nndiary},
19431 and its companion library @code{gnus-diary}.  It is ``special'' in the
19432 sense that it is not meant to be one of the standard alternatives for
19433 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
19434 Instead, it is used to treat @emph{some} of your mails in a special way,
19435 namely, as event reminders.
19436
19437 Here is a typical scenario:
19438
19439 @itemize @bullet
19440 @item
19441 You've got a date with Andy Mc Dowell or Bruce Willis (select according
19442 to your sexual preference) in one month.  You don't want to forget it.
19443 @item
19444 So you send a ``reminder'' message (actually, a diary one) to yourself.
19445 @item
19446 You forget all about it and keep on getting and reading new mail, as usual.
19447 @item
19448 From time to time, as you type `g' in the group buffer and as the date
19449 is getting closer, the message will pop up again to remind you of your
19450 appointment, just as if it were new and unread.
19451 @item
19452 Read your ``new'' messages, this one included, and start dreaming again
19453 of the night you're gonna have.
19454 @item
19455 Once the date is over (you actually fell asleep just after dinner), the
19456 message will be automatically deleted if it is marked as expirable.
19457 @end itemize
19458
19459 The Gnus Diary back end has the ability to handle regular appointments
19460 (that wouldn't ever be deleted) as well as punctual ones, operates as a
19461 real mail back end and is configurable in many ways.  All of this is
19462 explained in the sections below.
19463
19464 @menu
19465 * The NNDiary Back End::        Basic setup and usage.
19466 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
19467 * Sending or Not Sending::      A final note on sending diary messages.
19468 @end menu
19469
19470
19471 @node The NNDiary Back End
19472 @subsection The NNDiary Back End
19473 @cindex nndiary
19474 @cindex the nndiary back end
19475
19476 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
19477 Spool}).  Actually, it could appear as a mix of @code{nnml} and
19478 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
19479 the message storing scheme of @code{nndiary}: one file per message, one
19480 directory per group.
19481
19482   Before anything, there is one requirement to be able to run
19483 @code{nndiary} properly: you @emph{must} use the group timestamp feature
19484 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
19485 Timestamp} to see how it's done.
19486
19487 @menu
19488 * Diary Messages::              What makes a message valid for nndiary.
19489 * Running NNDiary::             NNDiary has two modes of operation.
19490 * Customizing NNDiary::         Bells and whistles.
19491 @end menu
19492
19493 @node Diary Messages
19494 @subsubsection Diary Messages
19495 @cindex nndiary messages
19496 @cindex nndiary mails
19497
19498 @code{nndiary} messages are just normal ones, except for the mandatory
19499 presence of 7 special headers.  These headers are of the form
19500 @code{X-Diary-<something>}, @code{<something>} being one of
19501 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
19502 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
19503 @code{dow} means ``Day of Week''.  These headers actually behave like
19504 crontab specifications and define the event date(s):
19505
19506 @itemize @bullet
19507 @item
19508 For all headers except the @code{Time-Zone} one, a header value is
19509 either a star (meaning all possible values), or a list of fields
19510 (separated by a comma).
19511 @item
19512 A field is either an integer, or a range.
19513 @item
19514 A range is two integers separated by a dash.
19515 @item
19516 Possible integer values are 0--59 for @code{Minute}, 0--23 for
19517 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
19518 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
19519 @item
19520 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
19521 mean ``all possible values'', but ``use only the other field''.  Note
19522 that if both are star'ed, the use of either one gives the same result.
19523 @item
19524 The @code{Time-Zone} header is special in that it can only have one
19525 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
19526 values'' (because it makes no sense), but ``the current local time
19527 zone''.  Most of the time, you'll be using a star here.  However, for a
19528 list of available time zone values, see the variable
19529 @code{nndiary-headers}.
19530 @end itemize
19531
19532 As a concrete example, here are the diary headers to add to your message
19533 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
19534 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
19535 what to do then):
19536
19537 @example
19538 X-Diary-Minute: 0
19539 X-Diary-Hour: 12, 20-24
19540 X-Diary-Dom: 1
19541 X-Diary-Month: *
19542 X-Diary-Year: 1999-2010
19543 X-Diary-Dow: 1
19544 X-Diary-Time-Zone: *
19545 @end example
19546
19547 @node Running NNDiary
19548 @subsubsection Running NNDiary
19549 @cindex running nndiary
19550 @cindex nndiary operation modes
19551
19552 @code{nndiary} has two modes of operation: ``traditional'' (the default)
19553 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
19554 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
19555 from your primary mail back end to nndiary groups in order to handle them
19556 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
19557 mail and handles it independently from your primary mail back end.
19558
19559 One should note that Gnus is not inherently designed to allow several
19560 ``master'' mail back ends at the same time.  However, this does make
19561 sense with @code{nndiary}: you really want to send and receive diary
19562 messages to your diary groups directly.  So, @code{nndiary} supports
19563 being sort of a ``second primary mail back end'' (to my knowledge, it is
19564 the only back end offering this feature).  However, there is a limitation
19565 (which I hope to fix some day): respooling doesn't work in autonomous
19566 mode.
19567
19568 In order to use @code{nndiary} in autonomous mode, you have several
19569 things to do:
19570
19571 @itemize @bullet
19572 @item
19573 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
19574 line in your @file{~/.gnus.el} file:
19575
19576 @lisp
19577 (setq nndiary-get-new-mail t)
19578 @end lisp
19579 @item
19580 You must arrange for diary messages (those containing @code{X-Diary-*}
19581 headers) to be split in a private folder @emph{before} Gnus treat them.
19582 Again, this is needed because Gnus cannot (yet ?) properly handle
19583 multiple primary mail back ends.  Getting those messages from a separate
19584 source will compensate this misfeature to some extent.
19585
19586 As an example, here's my procmailrc entry to store diary files in
19587 @file{~/.nndiary} (the default @code{nndiary} mail source file):
19588
19589 @example
19590 :0 HD :
19591 * ^X-Diary
19592 .nndiary
19593 @end example
19594 @end itemize
19595
19596 Once this is done, you might want to customize the following two options
19597 that affect the diary mail retrieval and splitting processes:
19598
19599 @defvar nndiary-mail-sources
19600 This is the diary-specific replacement for the standard
19601 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
19602 @code{(file :path "~/.nndiary")}.
19603 @end defvar
19604
19605 @defvar nndiary-split-methods
19606 This is the diary-specific replacement for the standard
19607 @code{nnmail-split-methods} variable.  It obeys the same syntax.
19608 @end defvar
19609
19610   Finally, you may add a permanent @code{nndiary} virtual server
19611 (something like @code{(nndiary "diary")} should do) to your
19612 @code{gnus-secondary-select-methods}.
19613
19614   Hopefully, almost everything (see the TODO section in
19615 @file{nndiary.el}) will work as expected when you restart Gnus: in
19616 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
19617 also get your new diary mails and split them according to your
19618 diary-specific rules, @kbd{F} will find your new diary groups etc.
19619
19620 @node Customizing NNDiary
19621 @subsubsection Customizing NNDiary
19622 @cindex customizing nndiary
19623 @cindex nndiary customization
19624
19625 Now that @code{nndiary} is up and running, it's time to customize it.
19626 The custom group is called @code{nndiary} (no, really ?!).  You should
19627 browse it to figure out which options you'd like to tweak.  The following
19628 two variables are probably the only ones you will want to change:
19629
19630 @defvar nndiary-reminders
19631 This is the list of times when you want to be reminded of your
19632 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
19633 before and that's it).  Remember that ``being reminded'' means that the
19634 diary message will pop up as brand new and unread again when you get new
19635 mail.
19636 @end defvar
19637
19638 @defvar nndiary-week-starts-on-monday
19639 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
19640 default).
19641 @end defvar
19642
19643
19644 @node The Gnus Diary Library
19645 @subsection The Gnus Diary Library
19646 @cindex gnus-diary
19647 @cindex the gnus diary library
19648
19649 Using @code{nndiary} manually (I mean, writing the headers by hand and
19650 so on) would be rather boring.  Fortunately, there is a library called
19651 @code{gnus-diary} written on top of @code{nndiary}, that does many
19652 useful things for you.
19653
19654   In order to use it, add the following line to your @file{~/.gnus.el} file:
19655
19656 @lisp
19657 (require 'gnus-diary)
19658 @end lisp
19659
19660   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
19661 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
19662 (sorry if you used them before).
19663
19664
19665 @menu
19666 * Diary Summary Line Format::           A nicer summary buffer line format.
19667 * Diary Articles Sorting::              A nicer way to sort messages.
19668 * Diary Headers Generation::            Not doing it manually.
19669 * Diary Group Parameters::              Not handling them manually.
19670 @end menu
19671
19672 @node Diary Summary Line Format
19673 @subsubsection Diary Summary Line Format
19674 @cindex diary summary buffer line
19675 @cindex diary summary line format
19676
19677 Displaying diary messages in standard summary line format (usually
19678 something like @samp{From Joe: Subject}) is pretty useless.  Most of
19679 the time, you're the one who wrote the message, and you mostly want to
19680 see the event's date.
19681
19682   @code{gnus-diary} provides two supplemental user formats to be used in
19683 summary line formats.  @code{D} corresponds to a formatted time string
19684 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
19685 while @code{d} corresponds to an approximative remaining time until the
19686 next occurrence of the event (e.g. ``in 6 months, 1 week'').
19687
19688   For example, here's how Joe's birthday is displayed in my
19689 @code{nndiary+diary:birthdays} summary buffer (note that the message is
19690 expirable, but will never be deleted, as it specifies a periodic event):
19691
19692 @example
19693    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
19694 @end example
19695
19696 In order to get something like the above, you would normally add the
19697 following line to your diary groups'parameters:
19698
19699 @lisp
19700 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
19701 @end lisp
19702
19703 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
19704 Parameters}).  You can however customize the provided summary line format
19705 with the following user options:
19706
19707 @defvar gnus-diary-summary-line-format
19708 Defines the summary line format used for diary groups (@pxref{Summary
19709 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
19710 diary groups'parameters.
19711 @end defvar
19712
19713 @defvar gnus-diary-time-format
19714 Defines the format to display dates in diary summary buffers.  This is
19715 used by the @code{D} user format.  See the docstring for details.
19716 @end defvar
19717
19718 @defvar gnus-diary-delay-format-function
19719 Defines the format function to use for displaying delays (remaining
19720 times) in diary summary buffers.  This is used by the @code{d} user
19721 format.  There are currently built-in functions for English and French;
19722 you can also define your own.  See the docstring for details.
19723 @end defvar
19724
19725 @node Diary Articles Sorting
19726 @subsubsection Diary Articles Sorting
19727 @cindex diary articles sorting
19728 @cindex diary summary lines sorting
19729 @findex gnus-summary-sort-by-schedule
19730 @findex gnus-thread-sort-by-schedule
19731 @findex gnus-article-sort-by-schedule
19732
19733 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19734 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19735 @code{gnus-thread-sort-by-schedule} and
19736 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19737 your diary summary buffers from the closest event to the farthest one.
19738
19739 @code{gnus-diary} automatically installs
19740 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19741 buffer's ``sort'' menu, and the two others as the primary (hence
19742 default) sorting functions in the group parameters (@pxref{Diary Group
19743 Parameters}).
19744
19745 @node Diary Headers Generation
19746 @subsubsection Diary Headers Generation
19747 @cindex diary headers generation
19748 @findex gnus-diary-check-message
19749
19750 @code{gnus-diary} provides a function called
19751 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19752 headers.  This function ensures that the current message contains all the
19753 required diary headers, and prompts you for values or corrections if
19754 needed.
19755
19756   This function is hooked into the @code{nndiary} back end, so that
19757 moving or copying an article to a diary group will trigger it
19758 automatically.  It is also bound to @kbd{C-c C-f d} in
19759 @code{message-mode} and @code{article-edit-mode} in order to ease the
19760 process of converting a usual mail to a diary one.
19761
19762   This function takes a prefix argument which will force prompting of
19763 all diary headers, regardless of their presence or validity.  That way,
19764 you can very easily reschedule an already valid diary message, for
19765 instance.
19766
19767 @node Diary Group Parameters
19768 @subsubsection Diary Group Parameters
19769 @cindex diary group parameters
19770
19771 When you create a new diary group, or visit one, @code{gnus-diary}
19772 automatically checks your group parameters and if needed, sets the
19773 summary line format to the diary-specific value, installs the
19774 diary-specific sorting functions, and also adds the different
19775 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19776 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19777 on a diary group to prepare a message, these headers will be inserted
19778 automatically (although not filled with proper values yet).
19779
19780 @node Sending or Not Sending
19781 @subsection Sending or Not Sending
19782
19783 Well, assuming you've read all of the above, here are two final notes on
19784 mail sending with @code{nndiary}:
19785
19786 @itemize @bullet
19787 @item
19788 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19789 messsages for real.  This means for instance that you can give
19790 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19791 sending the diary message to them as well.
19792 @item
19793 However, since @code{nndiary} also has a @code{request-post} method, you
19794 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19795 message won't actually be sent; just stored locally in the group. This
19796 comes in very handy for private appointments.
19797 @end itemize
19798
19799 @node Gnus Unplugged
19800 @section Gnus Unplugged
19801 @cindex offline
19802 @cindex unplugged
19803 @cindex agent
19804 @cindex Gnus agent
19805 @cindex Gnus unplugged
19806
19807 In olden times (ca. February '88), people used to run their newsreaders
19808 on big machines with permanent connections to the net.  News transport
19809 was dealt with by news servers, and all the newsreaders had to do was to
19810 read news.  Believe it or not.
19811
19812 Nowadays most people read news and mail at home, and use some sort of
19813 modem to connect to the net.  To avoid running up huge phone bills, it
19814 would be nice to have a way to slurp down all the news and mail, hang up
19815 the phone, read for several hours, and then upload any responses you
19816 have to make.  And then you repeat the procedure.
19817
19818 Of course, you can use news servers for doing this as well.  I've used
19819 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19820 for some years, but doing that's a bore.  Moving the news server
19821 functionality up to the newsreader makes sense if you're the only person
19822 reading news on a machine.
19823
19824 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19825 fact, you don't have to configure anything as the agent is now enabled
19826 by default (@pxref{Agent Variables, gnus-agent}).
19827
19828 Of course, to use it as such, you have to learn a few new commands.
19829
19830 @menu
19831 * Agent Basics::                How it all is supposed to work.
19832 * Agent Categories::            How to tell the Gnus Agent what to download.
19833 * Agent Commands::              New commands for all the buffers.
19834 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19835 * Agent as Cache::              The Agent is a big cache too.
19836 * Agent Expiry::                How to make old articles go away.
19837 * Agent Regeneration::          How to recover from lost connections and other accidents.
19838 * Agent and flags::             How the Agent maintains flags.
19839 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19840 * Outgoing Messages::           What happens when you post/mail something?
19841 * Agent Variables::             Customizing is fun.
19842 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19843 * Batching Agents::             How to fetch news from a @code{cron} job.
19844 * Agent Caveats::               What you think it'll do and what it does.
19845 @end menu
19846
19847
19848 @node Agent Basics
19849 @subsection Agent Basics
19850
19851 First, let's get some terminology out of the way.
19852
19853 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19854 connection to the net (and notified the Agent that this is the case).
19855 When the connection to the net is up again (and Gnus knows this), the
19856 Agent is @dfn{plugged}.
19857
19858 The @dfn{local} machine is the one you're running on, and which isn't
19859 connected to the net continuously.
19860
19861 @dfn{Downloading} means fetching things from the net to your local
19862 machine.  @dfn{Uploading} is doing the opposite.
19863
19864 You know that Gnus gives you all the opportunity you'd ever want for
19865 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19866 is also customizable to a great extent, which means that the user has a
19867 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19868 you in your foot, but with Gnus, you have a choice!
19869
19870 Gnus is never really in plugged or unplugged state.  Rather, it applies
19871 that state to each server individually.  This means that some servers
19872 can be plugged while others can be unplugged.  Additionally, some
19873 servers can be ignored by the Agent altogether (which means that
19874 they're kinda like plugged always).
19875
19876 So when you unplug the Agent and then wonder why is Gnus opening a
19877 connection to the Net, the next step to do is to look whether all
19878 servers are agentized.  If there is an unagentized server, you found
19879 the culprit.
19880
19881 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19882 reachable.  When Gnus notices this, it asks you whether you want the
19883 server to be switched to offline state.  If you say yes, then the
19884 server will behave somewhat as if it was unplugged, except that Gnus
19885 will ask you whether you want to switch it back online again.
19886
19887 Let's take a typical Gnus session using the Agent.
19888
19889 @itemize @bullet
19890
19891 @item
19892 @findex gnus-unplugged
19893 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19894 Agent in a disconnected state.  You can read all the news that you have
19895 already fetched while in this mode.
19896
19897 @item
19898 You then decide to see whether any new news has arrived.  You connect
19899 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19900 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19901 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19902 Source Specifiers}).
19903
19904 @item
19905 You can then read the new news immediately, or you can download the
19906 news onto your local machine.  If you want to do the latter, you press
19907 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19908 all the eligible articles in all the groups.  (To let Gnus know which
19909 articles you want to download, @pxref{Agent Categories}).
19910
19911 @item
19912 After fetching the articles, you press @kbd{J j} to make Gnus become
19913 unplugged again, and you shut down the PPP thing (or whatever).  And
19914 then you read the news offline.
19915
19916 @item
19917 And then you go to step 2.
19918 @end itemize
19919
19920 Here are some things you should do the first time (or so) that you use
19921 the Agent.
19922
19923 @itemize @bullet
19924
19925 @item
19926 Decide which servers should be covered by the Agent.  If you have a mail
19927 back end, it would probably be nonsensical to have it covered by the
19928 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19929 @kbd{J a} on the server (or servers) that you wish to have covered by the
19930 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19931 added servers you do not wish to have covered by the Agent.  By default,
19932 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19933 @code{gnus-secondary-select-methods} are agentized.
19934
19935 @item
19936 Decide on download policy.  It's fairly simple once you decide whether
19937 you are going to use agent categories, topic parameters, and/or group
19938 parameters to implement your policy.  If you're new to gnus, it
19939 is probably best to start with a category, @xref{Agent Categories}.
19940
19941 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19942 (@pxref{Agent Categories}) provide for setting a policy that applies
19943 to multiple groups.  Which you use is entirely up to you.  Topic
19944 parameters do override categories so, if you mix the two, you'll have
19945 to take that into account.  If you have a few groups that deviate from
19946 your policy, you can use group parameters (@pxref{Group Parameters}) to
19947 configure them.
19948
19949 @item
19950 Uhm@dots{} that's it.
19951 @end itemize
19952
19953
19954 @node Agent Categories
19955 @subsection Agent Categories
19956
19957 One of the main reasons to integrate the news transport layer into the
19958 newsreader is to allow greater control over what articles to download.
19959 There's not much point in downloading huge amounts of articles, just to
19960 find out that you're not interested in reading any of them.  It's better
19961 to be somewhat more conservative in choosing what to download, and then
19962 mark the articles for downloading manually if it should turn out that
19963 you're interested in the articles anyway.
19964
19965 One of the more effective methods for controlling what is to be
19966 downloaded is to create a @dfn{category} and then assign some (or all)
19967 groups to this category.  Groups that do not belong in any other
19968 category belong to the @code{default} category.  Gnus has its own
19969 buffer for creating and managing categories.
19970
19971 If you prefer, you can also use group parameters (@pxref{Group
19972 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19973 alternative approach to controlling the agent.  The only real
19974 difference is that categories are specific to the agent (so there is
19975 less to learn) while group and topic parameters include the kitchen
19976 sink.
19977
19978 Since you can set agent parameters in several different places we have
19979 a rule to decide which source to believe.  This rule specifies that
19980 the parameter sources are checked in the following order: group
19981 parameters, topic parameters, agent category, and finally customizable
19982 variables.  So you can mix all of these sources to produce a wide range
19983 of behavior, just don't blame me if you don't remember where you put
19984 your settings.
19985
19986 @menu
19987 * Category Syntax::             What a category looks like.
19988 * Category Buffer::             A buffer for maintaining categories.
19989 * Category Variables::          Customize'r'Us.
19990 @end menu
19991
19992
19993 @node Category Syntax
19994 @subsubsection Category Syntax
19995
19996 A category consists of a name, the list of groups belonging to the
19997 category, and a number of optional parameters that override the
19998 customizable variables.  The complete list of agent parameters are
19999 listed below.
20000
20001 @cindex Agent Parameters
20002 @table @code
20003 @item agent-groups
20004 The list of groups that are in this category.
20005
20006 @item agent-predicate
20007 A predicate which (generally) gives a rough outline of which articles
20008 are eligible for downloading; and
20009
20010 @item agent-score
20011 a score rule which (generally) gives you a finer granularity when
20012 deciding what articles to download.  (Note that this @dfn{download
20013 score} is not necessarily related to normal scores.)
20014
20015 @item agent-enable-expiration
20016 a boolean indicating whether the agent should expire old articles in
20017 this group.  Most groups should be expired to conserve disk space.  In
20018 fact, its probably safe to say that the gnus.* hierarchy contains the
20019 only groups that should not be expired.
20020
20021 @item agent-days-until-old
20022 an integer indicating the number of days that the agent should wait
20023 before deciding that a read article is safe to expire.
20024
20025 @item agent-low-score
20026 an integer that overrides the value of @code{gnus-agent-low-score}.
20027
20028 @item agent-high-score
20029 an integer that overrides the value of @code{gnus-agent-high-score}.
20030
20031 @item agent-short-article
20032 an integer that overrides the value of
20033 @code{gnus-agent-short-article}.
20034
20035 @item agent-long-article
20036 an integer that overrides the value of @code{gnus-agent-long-article}.
20037
20038 @item agent-enable-undownloaded-faces
20039 a symbol indicating whether the summary buffer should display
20040 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
20041 faces.  Any symbol other than @code{nil} will enable the use of
20042 undownloaded faces.
20043 @end table
20044
20045 The name of a category can not be changed once the category has been
20046 created.
20047
20048 Each category maintains a list of groups that are exclusive members of
20049 that category.  The exclusivity rule is automatically enforced, add a
20050 group to a new category and it is automatically removed from its old
20051 category.
20052
20053 A predicate in its simplest form can be a single predicate such as
20054 @code{true} or @code{false}.  These two will download every available
20055 article or nothing respectively.  In the case of these two special
20056 predicates an additional score rule is superfluous.
20057
20058 Predicates of @code{high} or @code{low} download articles in respect of
20059 their scores in relationship to @code{gnus-agent-high-score} and
20060 @code{gnus-agent-low-score} as described below.
20061
20062 To gain even finer control of what is to be regarded eligible for
20063 download a predicate can consist of a number of predicates with logical
20064 operators sprinkled in between.
20065
20066 Perhaps some examples are in order.
20067
20068 Here's a simple predicate.  (It's the default predicate, in fact, used
20069 for all groups that don't belong to any other category.)
20070
20071 @lisp
20072 short
20073 @end lisp
20074
20075 Quite simple, eh?  This predicate is true if and only if the article is
20076 short (for some value of ``short'').
20077
20078 Here's a more complex predicate:
20079
20080 @lisp
20081 (or high
20082     (and
20083      (not low)
20084      (not long)))
20085 @end lisp
20086
20087 This means that an article should be downloaded if it has a high score,
20088 or if the score is not low and the article is not long.  You get the
20089 drift.
20090
20091 The available logical operators are @code{or}, @code{and} and
20092 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
20093 @samp{|}, @code{&} and @code{!} instead.)
20094
20095 The following predicates are pre-defined, but if none of these fit what
20096 you want to do, you can write your own.
20097
20098 When evaluating each of these predicates, the named constant will be
20099 bound to the value determined by calling
20100 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
20101 example, gnus-agent-short-article will be bound to
20102 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
20103 means that you can specify a predicate in your category then tune that
20104 predicate to individual groups.
20105
20106 @table @code
20107 @item short
20108 True if the article is shorter than @code{gnus-agent-short-article}
20109 lines; default 100.
20110
20111 @item long
20112 True if the article is longer than @code{gnus-agent-long-article}
20113 lines; default 200.
20114
20115 @item low
20116 True if the article has a download score less than
20117 @code{gnus-agent-low-score}; default 0.
20118
20119 @item high
20120 True if the article has a download score greater than
20121 @code{gnus-agent-high-score}; default 0.
20122
20123 @item spam
20124 True if the Gnus Agent guesses that the article is spam.  The
20125 heuristics may change over time, but at present it just computes a
20126 checksum and sees whether articles match.
20127
20128 @item true
20129 Always true.
20130
20131 @item false
20132 Always false.
20133 @end table
20134
20135 If you want to create your own predicate function, here's what you have
20136 to know:  The functions are called with no parameters, but the
20137 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
20138 useful values.
20139
20140 For example, you could decide that you don't want to download articles
20141 that were posted more than a certain number of days ago (e.g. posted
20142 more than @code{gnus-agent-expire-days} ago) you might write a function
20143 something along the lines of the following:
20144
20145 @lisp
20146 (defun my-article-old-p ()
20147   "Say whether an article is old."
20148   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
20149      (- (time-to-days (current-time)) gnus-agent-expire-days)))
20150 @end lisp
20151
20152 with the predicate then defined as:
20153
20154 @lisp
20155 (not my-article-old-p)
20156 @end lisp
20157
20158 or you could append your predicate to the predefined
20159 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
20160 wherever.
20161
20162 @lisp
20163 (require 'gnus-agent)
20164 (setq  gnus-category-predicate-alist
20165   (append gnus-category-predicate-alist
20166          '((old . my-article-old-p))))
20167 @end lisp
20168
20169 and simply specify your predicate as:
20170
20171 @lisp
20172 (not old)
20173 @end lisp
20174
20175 If/when using something like the above, be aware that there are many
20176 misconfigured systems/mailers out there and so an article's date is not
20177 always a reliable indication of when it was posted.  Hell, some people
20178 just don't give a damn.
20179
20180 The above predicates apply to @emph{all} the groups which belong to the
20181 category.  However, if you wish to have a specific predicate for an
20182 individual group within a category, or you're just too lazy to set up a
20183 new category, you can enter a group's individual predicate in its group
20184 parameters like so:
20185
20186 @lisp
20187 (agent-predicate . short)
20188 @end lisp
20189
20190 This is the group/topic parameter equivalent of the agent category default.
20191 Note that when specifying a single word predicate like this, the
20192 @code{agent-predicate} specification must be in dotted pair notation.
20193
20194 The equivalent of the longer example from above would be:
20195
20196 @lisp
20197 (agent-predicate or high (and (not low) (not long)))
20198 @end lisp
20199
20200 The outer parenthesis required in the category specification are not
20201 entered here as, not being in dotted pair notation, the value of the
20202 predicate is assumed to be a list.
20203
20204
20205 Now, the syntax of the download score is the same as the syntax of
20206 normal score files, except that all elements that require actually
20207 seeing the article itself are verboten.  This means that only the
20208 following headers can be scored on: @code{Subject}, @code{From},
20209 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
20210 @code{Lines}, and @code{Xref}.
20211
20212 As with predicates, the specification of the @code{download score rule}
20213 to use in respect of a group can be in either the category definition if
20214 it's to be applicable to all groups in therein, or a group's parameters
20215 if it's to be specific to that group.
20216
20217 In both of these places the @code{download score rule} can take one of
20218 three forms:
20219
20220 @enumerate
20221 @item
20222 Score rule
20223
20224 This has the same syntax as a normal Gnus score file except only a
20225 subset of scoring keywords are available as mentioned above.
20226
20227 example:
20228
20229 @itemize @bullet
20230 @item
20231 Category specification
20232
20233 @lisp
20234 (("from"
20235        ("Lars Ingebrigtsen" 1000000 nil s))
20236 ("lines"
20237        (500 -100 nil <)))
20238 @end lisp
20239
20240 @item
20241 Group/Topic Parameter specification
20242
20243 @lisp
20244 (agent-score ("from"
20245                    ("Lars Ingebrigtsen" 1000000 nil s))
20246              ("lines"
20247                    (500 -100 nil <)))
20248 @end lisp
20249
20250 Again, note the omission of the outermost parenthesis here.
20251 @end itemize
20252
20253 @item
20254 Agent score file
20255
20256 These score files must @emph{only} contain the permitted scoring
20257 keywords stated above.
20258
20259 example:
20260
20261 @itemize @bullet
20262 @item
20263 Category specification
20264
20265 @lisp
20266 ("~/News/agent.SCORE")
20267 @end lisp
20268
20269 or perhaps
20270
20271 @lisp
20272 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
20273 @end lisp
20274
20275 @item
20276 Group Parameter specification
20277
20278 @lisp
20279 (agent-score "~/News/agent.SCORE")
20280 @end lisp
20281
20282 Additional score files can be specified as above.  Need I say anything
20283 about parenthesis?
20284 @end itemize
20285
20286 @item
20287 Use @code{normal} score files
20288
20289 If you don't want to maintain two sets of scoring rules for a group, and
20290 your desired @code{downloading} criteria for a group are the same as your
20291 @code{reading} criteria then you can tell the agent to refer to your
20292 @code{normal} score files when deciding what to download.
20293
20294 These directives in either the category definition or a group's
20295 parameters will cause the agent to read in all the applicable score
20296 files for a group, @emph{filtering out} those sections that do not
20297 relate to one of the permitted subset of scoring keywords.
20298
20299 @itemize @bullet
20300 @item
20301 Category Specification
20302
20303 @lisp
20304 file
20305 @end lisp
20306
20307 @item
20308 Group Parameter specification
20309
20310 @lisp
20311 (agent-score . file)
20312 @end lisp
20313 @end itemize
20314 @end enumerate
20315
20316 @node Category Buffer
20317 @subsubsection Category Buffer
20318
20319 You'd normally do all category maintenance from the category buffer.
20320 When you enter it for the first time (with the @kbd{J c} command from
20321 the group buffer), you'll only see the @code{default} category.
20322
20323 The following commands are available in this buffer:
20324
20325 @table @kbd
20326 @item q
20327 @kindex q (Category)
20328 @findex gnus-category-exit
20329 Return to the group buffer (@code{gnus-category-exit}).
20330
20331 @item e
20332 @kindex e (Category)
20333 @findex gnus-category-customize-category
20334 Use a customization buffer to set all of the selected category's
20335 parameters at one time (@code{gnus-category-customize-category}).
20336
20337 @item k
20338 @kindex k (Category)
20339 @findex gnus-category-kill
20340 Kill the current category (@code{gnus-category-kill}).
20341
20342 @item c
20343 @kindex c (Category)
20344 @findex gnus-category-copy
20345 Copy the current category (@code{gnus-category-copy}).
20346
20347 @item a
20348 @kindex a (Category)
20349 @findex gnus-category-add
20350 Add a new category (@code{gnus-category-add}).
20351
20352 @item p
20353 @kindex p (Category)
20354 @findex gnus-category-edit-predicate
20355 Edit the predicate of the current category
20356 (@code{gnus-category-edit-predicate}).
20357
20358 @item g
20359 @kindex g (Category)
20360 @findex gnus-category-edit-groups
20361 Edit the list of groups belonging to the current category
20362 (@code{gnus-category-edit-groups}).
20363
20364 @item s
20365 @kindex s (Category)
20366 @findex gnus-category-edit-score
20367 Edit the download score rule of the current category
20368 (@code{gnus-category-edit-score}).
20369
20370 @item l
20371 @kindex l (Category)
20372 @findex gnus-category-list
20373 List all the categories (@code{gnus-category-list}).
20374 @end table
20375
20376
20377 @node Category Variables
20378 @subsubsection Category Variables
20379
20380 @table @code
20381 @item gnus-category-mode-hook
20382 @vindex gnus-category-mode-hook
20383 Hook run in category buffers.
20384
20385 @item gnus-category-line-format
20386 @vindex gnus-category-line-format
20387 Format of the lines in the category buffer (@pxref{Formatting
20388 Variables}).  Valid elements are:
20389
20390 @table @samp
20391 @item c
20392 The name of the category.
20393
20394 @item g
20395 The number of groups in the category.
20396 @end table
20397
20398 @item gnus-category-mode-line-format
20399 @vindex gnus-category-mode-line-format
20400 Format of the category mode line (@pxref{Mode Line Formatting}).
20401
20402 @item gnus-agent-short-article
20403 @vindex gnus-agent-short-article
20404 Articles that have fewer lines than this are short.  Default 100.
20405
20406 @item gnus-agent-long-article
20407 @vindex gnus-agent-long-article
20408 Articles that have more lines than this are long.  Default 200.
20409
20410 @item gnus-agent-low-score
20411 @vindex gnus-agent-low-score
20412 Articles that have a score lower than this have a low score.  Default
20413 0.
20414
20415 @item gnus-agent-high-score
20416 @vindex gnus-agent-high-score
20417 Articles that have a score higher than this have a high score.  Default
20418 0.
20419
20420 @item gnus-agent-expire-days
20421 @vindex gnus-agent-expire-days
20422 The number of days that a @samp{read} article must stay in the agent's
20423 local disk before becoming eligible for expiration (While the name is
20424 the same, this doesn't mean expiring the article on the server.  It
20425 just means deleting the local copy of the article).  What is also
20426 important to understand is that the counter starts with the time the
20427 article was written to the local disk and not the time the article was
20428 read.
20429 Default 7.
20430
20431 @item gnus-agent-enable-expiration
20432 @vindex gnus-agent-enable-expiration
20433 Determines whether articles in a group are, by default, expired or
20434 retained indefinitely.  The default is @code{ENABLE} which means that
20435 you'll have to disable expiration when desired.  On the other hand,
20436 you could set this to @code{DISABLE}.  In that case, you would then
20437 have to enable expiration in selected groups.
20438
20439 @end table
20440
20441
20442 @node Agent Commands
20443 @subsection Agent Commands
20444 @findex gnus-agent-toggle-plugged
20445 @kindex J j (Agent)
20446
20447 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
20448 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
20449 toggles the plugged/unplugged state of the Gnus Agent.
20450
20451
20452 @menu
20453 * Group Agent Commands::        Configure groups and fetch their contents.
20454 * Summary Agent Commands::      Manually select then fetch specific articles.
20455 * Server Agent Commands::       Select the servers that are supported by the agent.
20456 @end menu
20457
20458
20459
20460
20461 @node Group Agent Commands
20462 @subsubsection Group Agent Commands
20463
20464 @table @kbd
20465 @item J u
20466 @kindex J u (Agent Group)
20467 @findex gnus-agent-fetch-groups
20468 Fetch all eligible articles in the current group
20469 (@code{gnus-agent-fetch-groups}).
20470
20471 @item J c
20472 @kindex J c (Agent Group)
20473 @findex gnus-enter-category-buffer
20474 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
20475
20476 @item J s
20477 @kindex J s (Agent Group)
20478 @findex gnus-agent-fetch-session
20479 Fetch all eligible articles in all groups
20480 (@code{gnus-agent-fetch-session}).
20481
20482 @item J S
20483 @kindex J S (Agent Group)
20484 @findex gnus-group-send-queue
20485 Send all sendable messages in the queue group
20486 (@code{gnus-group-send-queue}).  @xref{Drafts}.
20487
20488 @item J a
20489 @kindex J a (Agent Group)
20490 @findex gnus-agent-add-group
20491 Add the current group to an Agent category
20492 (@code{gnus-agent-add-group}).  This command understands the
20493 process/prefix convention (@pxref{Process/Prefix}).
20494
20495 @item J r
20496 @kindex J r (Agent Group)
20497 @findex gnus-agent-remove-group
20498 Remove the current group from its category, if any
20499 (@code{gnus-agent-remove-group}).  This command understands the
20500 process/prefix convention (@pxref{Process/Prefix}).
20501
20502 @item J Y
20503 @kindex J Y (Agent Group)
20504 @findex gnus-agent-synchronize-flags
20505 Synchronize flags changed while unplugged with remote server, if any.
20506
20507
20508 @end table
20509
20510
20511 @node Summary Agent Commands
20512 @subsubsection Summary Agent Commands
20513
20514 @table @kbd
20515 @item J #
20516 @kindex J # (Agent Summary)
20517 @findex gnus-agent-mark-article
20518 Mark the article for downloading (@code{gnus-agent-mark-article}).
20519
20520 @item J M-#
20521 @kindex J M-# (Agent Summary)
20522 @findex gnus-agent-unmark-article
20523 Remove the downloading mark from the article
20524 (@code{gnus-agent-unmark-article}).
20525
20526 @cindex %
20527 @item @@
20528 @kindex @@ (Agent Summary)
20529 @findex gnus-agent-toggle-mark
20530 Toggle whether to download the article
20531 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
20532 default.
20533
20534 @item J c
20535 @kindex J c (Agent Summary)
20536 @findex gnus-agent-catchup
20537 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
20538
20539 @item J S
20540 @kindex J S (Agent Summary)
20541 @findex gnus-agent-fetch-group
20542 Download all eligible (@pxref{Agent Categories}) articles in this group.
20543 (@code{gnus-agent-fetch-group}).
20544
20545 @item J s
20546 @kindex J s (Agent Summary)
20547 @findex gnus-agent-summary-fetch-series
20548 Download all processable articles in this group.
20549 (@code{gnus-agent-summary-fetch-series}).
20550
20551 @item J u
20552 @kindex J u (Agent Summary)
20553 @findex gnus-agent-summary-fetch-group
20554 Download all downloadable articles in the current group
20555 (@code{gnus-agent-summary-fetch-group}).
20556
20557 @end table
20558
20559
20560 @node Server Agent Commands
20561 @subsubsection Server Agent Commands
20562
20563 @table @kbd
20564 @item J a
20565 @kindex J a (Agent Server)
20566 @findex gnus-agent-add-server
20567 Add the current server to the list of servers covered by the Gnus Agent
20568 (@code{gnus-agent-add-server}).
20569
20570 @item J r
20571 @kindex J r (Agent Server)
20572 @findex gnus-agent-remove-server
20573 Remove the current server from the list of servers covered by the Gnus
20574 Agent (@code{gnus-agent-remove-server}).
20575
20576 @end table
20577
20578
20579 @node Agent Visuals
20580 @subsection Agent Visuals
20581
20582 If you open a summary while unplugged and, Gnus knows from the group's
20583 active range that there are more articles than the headers currently
20584 stored in the Agent, you may see some articles whose subject looks
20585 something like @samp{[Undownloaded article #####]}.  These are
20586 placeholders for the missing headers.  Aside from setting a mark,
20587 there is not much that can be done with one of these placeholders.
20588 When Gnus finally gets a chance to fetch the group's headers, the
20589 placeholders will automatically be replaced by the actual headers.
20590 You can configure the summary buffer's maneuvering to skip over the
20591 placeholders if you care (See @code{gnus-auto-goto-ignores}).
20592
20593 While it may be obvious to all, the only headers and articles
20594 available while unplugged are those headers and articles that were
20595 fetched into the Agent while previously plugged.  To put it another
20596 way, ``If you forget to fetch something while plugged, you might have a
20597 less than satisfying unplugged session''.  For this reason, the Agent
20598 adds two visual effects to your summary buffer.  These effects display
20599 the download status of each article so that you always know which
20600 articles will be available when unplugged.
20601
20602 The first visual effect is the @samp{%O} spec.  If you customize
20603 @code{gnus-summary-line-format} to include this specifier, you will add
20604 a single character field that indicates an article's download status.
20605 Articles that have been fetched into either the Agent or the Cache,
20606 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
20607 other articles will display @code{gnus-undownloaded-mark} (defaults to
20608 @samp{-}).  If you open a group that has not been agentized, a space
20609 (@samp{ }) will be displayed.
20610
20611 The second visual effect are the undownloaded faces.  The faces, there
20612 are three indicating the article's score (low, normal, high), seem to
20613 result in a love/hate response from many Gnus users.  The problem is
20614 that the face selection is controlled by a list of condition tests and
20615 face names (See @code{gnus-summary-highlight}).  Each condition is
20616 tested in the order in which it appears in the list so early
20617 conditions have precedence over later conditions.  All of this means
20618 that, if you tick an undownloaded article, the article will continue
20619 to be displayed in the undownloaded face rather than the ticked face.
20620
20621 If you use the Agent as a cache (to avoid downloading the same article
20622 each time you visit it or to minimize your connection time), the
20623 undownloaded face will probably seem like a good idea.  The reason
20624 being that you do all of our work (marking, reading, deleting) with
20625 downloaded articles so the normal faces always appear.  For those
20626 users using the agent to improve online performance by caching the NOV
20627 database (most users since 5.10.2), the undownloaded faces may appear
20628 to be an absolutely horrible idea.  The issue being that, since none
20629 of their articles have been fetched into the Agent, all of the
20630 normal faces will be obscured by the undownloaded faces.
20631
20632 If you would like to use the undownloaded faces, you must enable the
20633 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
20634 group parameter to @code{t}.  This parameter, like all other agent
20635 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
20636 a Group Topic (@pxref{Topic Parameters}), or an individual group
20637 (@pxref{Group Parameters}).
20638
20639 The one problem common to all users using the agent is how quickly it
20640 can consume disk space.  If you using the agent on many groups, it is
20641 even more difficult to effectively recover disk space.  One solution
20642 is the @samp{%F} format available in @code{gnus-group-line-format}.
20643 This format will display the actual disk space used by articles
20644 fetched into both the agent and cache.  By knowing which groups use
20645 the most space, users know where to focus their efforts when ``agent
20646 expiring'' articles.
20647
20648 @node Agent as Cache
20649 @subsection Agent as Cache
20650
20651 When Gnus is plugged, it is not efficient to download headers or
20652 articles from the server again, if they are already stored in the
20653 Agent.  So, Gnus normally only downloads headers once, and stores them
20654 in the Agent.  These headers are later used when generating the summary
20655 buffer, regardless of whether you are plugged or unplugged.  Articles
20656 are not cached in the Agent by default though (that would potentially
20657 consume lots of disk space), but if you have already downloaded an
20658 article into the Agent, Gnus will not download the article from the
20659 server again but use the locally stored copy instead.
20660
20661 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
20662 @pxref{Agent Variables}) to always download headers and articles while
20663 plugged.  Gnus will almost certainly be slower, but it will be kept
20664 synchronized with the server.  That last point probably won't make any
20665 sense if you are using a nntp or nnimap back end.
20666
20667 @node Agent Expiry
20668 @subsection Agent Expiry
20669
20670 @vindex gnus-agent-expire-days
20671 @findex gnus-agent-expire
20672 @kindex M-x gnus-agent-expire
20673 @kindex M-x gnus-agent-expire-group
20674 @findex gnus-agent-expire-group
20675 @cindex agent expiry
20676 @cindex Gnus agent expiry
20677 @cindex expiry, in Gnus agent
20678
20679 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
20680 least it doesn't handle it like other back ends.  Instead, there are
20681 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
20682 commands that will expire all read articles that are older than
20683 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
20684 that you're running out of space.  Neither are particularly fast or
20685 efficient, and it's not a particularly good idea to interrupt them (with
20686 @kbd{C-g} or anything else) once you've started one of them.
20687
20688 Note that other functions, e.g. @code{gnus-request-expire-articles},
20689 might run @code{gnus-agent-expire} for you to keep the agent
20690 synchronized with the group.
20691
20692 The agent parameter @code{agent-enable-expiration} may be used to
20693 prevent expiration in selected groups.
20694
20695 @vindex gnus-agent-expire-all
20696 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
20697 expiration commands will expire all articles---unread, read, ticked
20698 and dormant.  If @code{nil} (which is the default), only read articles
20699 are eligible for expiry, and unread, ticked and dormant articles will
20700 be kept indefinitely.
20701
20702 If you find that some articles eligible for expiry are never expired,
20703 perhaps some Gnus Agent files are corrupted.  There's are special
20704 commands, @code{gnus-agent-regenerate} and
20705 @code{gnus-agent-regenerate-group}, to fix possible problems.
20706
20707 @node Agent Regeneration
20708 @subsection Agent Regeneration
20709
20710 @cindex agent regeneration
20711 @cindex Gnus agent regeneration
20712 @cindex regeneration
20713
20714 The local data structures used by @code{nnagent} may become corrupted
20715 due to certain exceptional conditions.  When this happens,
20716 @code{nnagent} functionality may degrade or even fail.  The solution
20717 to this problem is to repair the local data structures by removing all
20718 internal inconsistencies.
20719
20720 For example, if your connection to your server is lost while
20721 downloaded articles into the agent, the local data structures will not
20722 know about articles successfully downloaded prior to the connection
20723 failure.  Running @code{gnus-agent-regenerate} or
20724 @code{gnus-agent-regenerate-group} will update the data structures
20725 such that you don't need to download these articles a second time.
20726
20727 @findex gnus-agent-regenerate
20728 @kindex M-x gnus-agent-regenerate
20729 The command @code{gnus-agent-regenerate} will perform
20730 @code{gnus-agent-regenerate-group} on every agentized group.  While
20731 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
20732 recommended that you first close all summary buffers.
20733
20734 @findex gnus-agent-regenerate-group
20735 @kindex M-x gnus-agent-regenerate-group
20736 The command @code{gnus-agent-regenerate-group} uses the local copies
20737 of individual articles to repair the local @acronym{NOV}(header) database.  It
20738 then updates the internal data structures that document which articles
20739 are stored locally.  An optional argument will mark articles in the
20740 agent as unread.
20741
20742 @node Agent and flags
20743 @subsection Agent and flags
20744
20745 The Agent works with any Gnus back end including those, such as
20746 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20747 the Agent does not actually know which backends keep their flags in
20748 the backend server rather than in @file{.newsrc}.  This means that the
20749 Agent, while unplugged or disconnected, will always record all changes
20750 to the flags in its own files.
20751
20752 When you plug back in, Gnus will then check to see if you have any
20753 changed any flags and ask if you wish to synchronize these with the
20754 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20755
20756 @vindex gnus-agent-synchronize-flags
20757 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20758 never automatically synchronize flags.  If it is @code{ask}, which is
20759 the default, the Agent will check if you made any changes and if so
20760 ask if you wish to synchronize these when you re-connect.  If it has
20761 any other value, all flags will be synchronized automatically.
20762
20763 If you do not wish to synchronize flags automatically when you
20764 re-connect, you can do it manually with the
20765 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20766 in the group buffer.
20767
20768 Technical note: the synchronization algorithm does not work by ``pushing''
20769 all local flags to the server, but rather by incrementally updated the
20770 server view of flags by changing only those flags that were changed by
20771 the user.  Thus, if you set one flag on an article, quit the group then
20772 re-select the group and remove the flag; the flag will be set and
20773 removed from the server when you ``synchronize''.  The queued flag
20774 operations can be found in the per-server @code{flags} file in the Agent
20775 directory.  It's emptied when you synchronize flags.
20776
20777 @node Agent and IMAP
20778 @subsection Agent and IMAP
20779
20780 The Agent works with any Gnus back end, including nnimap.  However,
20781 since there are some conceptual differences between @acronym{NNTP} and
20782 @acronym{IMAP}, this section (should) provide you with some information to
20783 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20784
20785 Some things are currently not implemented in the Agent that you'd might
20786 expect from a disconnected @acronym{IMAP} client, including:
20787
20788 @itemize @bullet
20789
20790 @item
20791 Copying/moving articles into nnimap groups when unplugged.
20792
20793 @item
20794 Creating/deleting nnimap groups when unplugged.
20795
20796 @end itemize
20797
20798 @node Outgoing Messages
20799 @subsection Outgoing Messages
20800
20801 By default, when Gnus is unplugged, all outgoing messages (both mail
20802 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20803 You can view them there after posting, and edit them at will.
20804
20805 You can control the circumstances under which outgoing mail is queued
20806 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20807 news is always queued when Gnus is unplugged, and never otherwise.
20808
20809 You can send the messages either from the draft group with the special
20810 commands available there, or you can use the @kbd{J S} command in the
20811 group buffer to send all the sendable messages in the draft group.
20812 Posting news will only work when Gnus is plugged, but you can send
20813 mail at any time.
20814
20815 If sending mail while unplugged does not work for you and you worry
20816 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20817 ask you to confirm your action (see
20818 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20819
20820 @node Agent Variables
20821 @subsection Agent Variables
20822
20823 @table @code
20824 @item gnus-agent
20825 @vindex gnus-agent
20826 Is the agent enabled?  The default is @code{t}.  When first enabled,
20827 the agent will use @code{gnus-agent-auto-agentize-methods} to
20828 automatically mark some back ends as agentized.  You may change which
20829 back ends are agentized using the agent commands in the server buffer.
20830
20831 To enter the server buffer, use the @kbd{^}
20832 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20833
20834
20835 @item gnus-agent-directory
20836 @vindex gnus-agent-directory
20837 Where the Gnus Agent will store its files.  The default is
20838 @file{~/News/agent/}.
20839
20840 @item gnus-agent-handle-level
20841 @vindex gnus-agent-handle-level
20842 Groups on levels (@pxref{Group Levels}) higher than this variable will
20843 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20844 which means that only subscribed group will be considered by the Agent
20845 by default.
20846
20847 @item gnus-agent-plugged-hook
20848 @vindex gnus-agent-plugged-hook
20849 Hook run when connecting to the network.
20850
20851 @item gnus-agent-unplugged-hook
20852 @vindex gnus-agent-unplugged-hook
20853 Hook run when disconnecting from the network.
20854
20855 @item gnus-agent-fetched-hook
20856 @vindex gnus-agent-fetched-hook
20857 Hook run when finished fetching articles.
20858
20859 @item gnus-agent-cache
20860 @vindex gnus-agent-cache
20861 Variable to control whether use the locally stored @acronym{NOV} and
20862 articles when plugged, e.g. essentially using the Agent as a cache.
20863 The default is non-@code{nil}, which means to use the Agent as a cache.
20864
20865 @item gnus-agent-go-online
20866 @vindex gnus-agent-go-online
20867 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20868 automatically switch offline servers into online status.  If it is
20869 @code{ask}, the default, the Agent will ask if you wish to switch
20870 offline servers into online status when you re-connect.  If it has any
20871 other value, all offline servers will be automatically switched into
20872 online status.
20873
20874 @item gnus-agent-mark-unread-after-downloaded
20875 @vindex gnus-agent-mark-unread-after-downloaded
20876 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20877 mark articles as unread after downloading.  This is usually a safe
20878 thing to do as the newly downloaded article has obviously not been
20879 read.  The default is @code{t}.
20880
20881 @item gnus-agent-synchronize-flags
20882 @vindex gnus-agent-synchronize-flags
20883 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20884 never automatically synchronize flags.  If it is @code{ask}, which is
20885 the default, the Agent will check if you made any changes and if so
20886 ask if you wish to synchronize these when you re-connect.  If it has
20887 any other value, all flags will be synchronized automatically.
20888
20889 @item gnus-agent-consider-all-articles
20890 @vindex gnus-agent-consider-all-articles
20891 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20892 agent will let the agent predicate decide whether articles need to be
20893 downloaded or not, for all articles.  When @code{nil}, the default,
20894 the agent will only let the predicate decide whether unread articles
20895 are downloaded or not.  If you enable this, you may also want to look
20896 into the agent expiry settings (@pxref{Category Variables}), so that
20897 the agent doesn't download articles which the agent will later expire,
20898 over and over again.
20899
20900 @item gnus-agent-max-fetch-size
20901 @vindex gnus-agent-max-fetch-size
20902 The agent fetches articles into a temporary buffer prior to parsing
20903 them into individual files.  To avoid exceeding the max. buffer size,
20904 the agent alternates between fetching and parsing until all articles
20905 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20906 limit to control how often the cycling occurs.  A large value improves
20907 performance.  A small value minimizes the time lost should the
20908 connection be lost while fetching (You may need to run
20909 @code{gnus-agent-regenerate-group} to update the group's state.
20910 However, all articles parsed prior to loosing the connection will be
20911 available while unplugged).  The default is 10M so it is unusual to
20912 see any cycling.
20913
20914 @item gnus-server-unopen-status
20915 @vindex gnus-server-unopen-status
20916 Perhaps not an Agent variable, but closely related to the Agent, this
20917 variable says what will happen if Gnus cannot open a server.  If the
20918 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20919 whether to deny the server or whether to unplug the agent.  If the
20920 Agent is disabled, Gnus always simply deny the server.  Other choices
20921 for this variable include @code{denied} and @code{offline} the latter
20922 is only valid if the Agent is used.
20923
20924 @item gnus-auto-goto-ignores
20925 @vindex gnus-auto-goto-ignores
20926 Another variable that isn't an Agent variable, yet so closely related
20927 that most will look for it here, this variable tells the summary
20928 buffer how to maneuver around undownloaded (only headers stored in the
20929 agent) and unfetched (neither article nor headers stored) articles.
20930
20931 The valid values are @code{nil} (maneuver to any article),
20932 @code{undownloaded} (maneuvering while unplugged ignores articles that
20933 have not been fetched), @code{always-undownloaded} (maneuvering always
20934 ignores articles that have not been fetched), @code{unfetched}
20935 (maneuvering ignores articles whose headers have not been fetched).
20936
20937 @item gnus-agent-queue-mail
20938 @vindex gnus-agent-queue-mail
20939 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20940 queue mail rather than sending it straight away.  When @code{t}, Gnus
20941 will queue mail when unplugged only.  When @code{nil}, never queue
20942 mail.  The default is @code{t}.
20943
20944 @item gnus-agent-prompt-send-queue
20945 @vindex gnus-agent-prompt-send-queue
20946 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20947 prompt you to confirm that you really wish to proceed if you hit
20948 @kbd{J S} while unplugged.  The default is @code{nil}.
20949
20950 @item gnus-agent-auto-agentize-methods
20951 @vindex gnus-agent-auto-agentize-methods
20952 If you have never used the Agent before (or more technically, if
20953 @file{~/News/agent/lib/servers} does not exist), Gnus will
20954 automatically agentize a few servers for you.  This variable control
20955 which back ends should be auto-agentized.  It is typically only useful
20956 to agentize remote back ends.  The auto-agentizing has the same effect
20957 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20958 If the file exist, you must manage the servers manually by adding or
20959 removing them, this variable is only applicable the first time you
20960 start Gnus.  The default is @samp{(nntp nnimap)}.
20961
20962 @end table
20963
20964
20965 @node Example Setup
20966 @subsection Example Setup
20967
20968 If you don't want to read this manual, and you have a fairly standard
20969 setup, you may be able to use something like the following as your
20970 @file{~/.gnus.el} file to get started.
20971
20972 @lisp
20973 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20974 ;; @r{from your ISP's server.}
20975 (setq gnus-select-method '(nntp "news.your-isp.com"))
20976
20977 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20978 ;; @r{your ISP's @acronym{POP} server.}
20979 (setq mail-sources '((pop :server "pop.your-isp.com")))
20980
20981 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
20982 (setq gnus-secondary-select-methods '((nnml "")))
20983
20984 ;; @r{Make Gnus into an offline newsreader.}
20985 ;; (gnus-agentize) ; @r{The obsolete setting.}
20986 ;; (setq gnus-agent t) ; @r{Now the default.}
20987 @end lisp
20988
20989 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
20990 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
20991 gnus}.
20992
20993 If this is the first time you've run Gnus, you will be subscribed
20994 automatically to a few default newsgroups.  You'll probably want to
20995 subscribe to more groups, and to do that, you have to query the
20996 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
20997 command.  This usually takes quite a while, but you only have to do it
20998 once.
20999
21000 After reading and parsing a while, you'll be presented with a list of
21001 groups.  Subscribe to the ones you want to read with the @kbd{u}
21002 command.  @kbd{l} to make all the killed groups disappear after you've
21003 subscribe to all the groups you want to read.  (@kbd{A k} will bring
21004 back all the killed groups.)
21005
21006 You can now read the groups at once, or you can download the articles
21007 with the @kbd{J s} command.  And then read the rest of this manual to
21008 find out which of the other gazillion things you want to customize.
21009
21010
21011 @node Batching Agents
21012 @subsection Batching Agents
21013 @findex gnus-agent-batch
21014
21015 Having the Gnus Agent fetch articles (and post whatever messages you've
21016 written) is quite easy once you've gotten things set up properly.  The
21017 following shell script will do everything that is necessary:
21018
21019 You can run a complete batch command from the command line with the
21020 following incantation:
21021
21022 @example
21023 #!/bin/sh
21024 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
21025 @end example
21026
21027
21028 @node Agent Caveats
21029 @subsection Agent Caveats
21030
21031 The Gnus Agent doesn't seem to work like most other offline
21032 newsreaders.  Here are some common questions that some imaginary people
21033 may ask:
21034
21035 @table @dfn
21036 @item If I read an article while plugged, do they get entered into the Agent?
21037
21038 @strong{No}.  If you want this behavior, add
21039 @code{gnus-agent-fetch-selected-article} to
21040 @code{gnus-select-article-hook}.
21041
21042 @item If I read an article while plugged, and the article already exists in
21043 the Agent, will it get downloaded once more?
21044
21045 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
21046
21047 @end table
21048
21049 In short, when Gnus is unplugged, it only looks into the locally stored
21050 articles; when it's plugged, it talks to your ISP and may also use the
21051 locally stored articles.
21052
21053
21054 @node Scoring
21055 @chapter Scoring
21056 @cindex scoring
21057
21058 Other people use @dfn{kill files}, but we here at Gnus Towers like
21059 scoring better than killing, so we'd rather switch than fight.  They do
21060 something completely different as well, so sit up straight and pay
21061 attention!
21062
21063 @vindex gnus-summary-mark-below
21064 All articles have a default score (@code{gnus-summary-default-score}),
21065 which is 0 by default.  This score may be raised or lowered either
21066 interactively or by score files.  Articles that have a score lower than
21067 @code{gnus-summary-mark-below} are marked as read.
21068
21069 Gnus will read any @dfn{score files} that apply to the current group
21070 before generating the summary buffer.
21071
21072 There are several commands in the summary buffer that insert score
21073 entries based on the current article.  You can, for instance, ask Gnus to
21074 lower or increase the score of all articles with a certain subject.
21075
21076 There are two sorts of scoring entries: Permanent and temporary.
21077 Temporary score entries are self-expiring entries.  Any entries that are
21078 temporary and have not been used for, say, a week, will be removed
21079 silently to help keep the sizes of the score files down.
21080
21081 @menu
21082 * Summary Score Commands::      Adding score entries for the current group.
21083 * Group Score Commands::        General score commands.
21084 * Score Variables::             Customize your scoring.  (My, what terminology).
21085 * Score File Format::           What a score file may contain.
21086 * Score File Editing::          You can edit score files by hand as well.
21087 * Adaptive Scoring::            Big Sister Gnus knows what you read.
21088 * Home Score File::             How to say where new score entries are to go.
21089 * Followups To Yourself::       Having Gnus notice when people answer you.
21090 * Scoring On Other Headers::    Scoring on non-standard headers.
21091 * Scoring Tips::                How to score effectively.
21092 * Reverse Scoring::             That problem child of old is not problem.
21093 * Global Score Files::          Earth-spanning, ear-splitting score files.
21094 * Kill Files::                  They are still here, but they can be ignored.
21095 * Converting Kill Files::       Translating kill files to score files.
21096 * Advanced Scoring::            Using logical expressions to build score rules.
21097 * Score Decays::                It can be useful to let scores wither away.
21098 @end menu
21099
21100
21101 @node Summary Score Commands
21102 @section Summary Score Commands
21103 @cindex score commands
21104
21105 The score commands that alter score entries do not actually modify real
21106 score files.  That would be too inefficient.  Gnus maintains a cache of
21107 previously loaded score files, one of which is considered the
21108 @dfn{current score file alist}.  The score commands simply insert
21109 entries into this list, and upon group exit, this list is saved.
21110
21111 The current score file is by default the group's local score file, even
21112 if no such score file actually exists.  To insert score commands into
21113 some other score file (e.g. @file{all.SCORE}), you must first make this
21114 score file the current one.
21115
21116 General score commands that don't actually change the score file:
21117
21118 @table @kbd
21119
21120 @item V s
21121 @kindex V s (Summary)
21122 @findex gnus-summary-set-score
21123 Set the score of the current article (@code{gnus-summary-set-score}).
21124
21125 @item V S
21126 @kindex V S (Summary)
21127 @findex gnus-summary-current-score
21128 Display the score of the current article
21129 (@code{gnus-summary-current-score}).
21130
21131 @item V t
21132 @kindex V t (Summary)
21133 @findex gnus-score-find-trace
21134 Display all score rules that have been used on the current article
21135 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
21136 may type @kbd{e} to edit score file corresponding to the score rule on
21137 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
21138 score file and edit it.
21139
21140 @item V w
21141 @kindex V w (Summary)
21142 @findex gnus-score-find-favourite-words
21143 List words used in scoring (@code{gnus-score-find-favourite-words}).
21144
21145 @item V R
21146 @kindex V R (Summary)
21147 @findex gnus-summary-rescore
21148 Run the current summary through the scoring process
21149 (@code{gnus-summary-rescore}).  This might be useful if you're playing
21150 around with your score files behind Gnus' back and want to see the
21151 effect you're having.
21152
21153 @item V c
21154 @kindex V c (Summary)
21155 @findex gnus-score-change-score-file
21156 Make a different score file the current
21157 (@code{gnus-score-change-score-file}).
21158
21159 @item V e
21160 @kindex V e (Summary)
21161 @findex gnus-score-edit-current-scores
21162 Edit the current score file (@code{gnus-score-edit-current-scores}).
21163 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
21164 File Editing}).
21165
21166 @item V f
21167 @kindex V f (Summary)
21168 @findex gnus-score-edit-file
21169 Edit a score file and make this score file the current one
21170 (@code{gnus-score-edit-file}).
21171
21172 @item V F
21173 @kindex V F (Summary)
21174 @findex gnus-score-flush-cache
21175 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
21176 after editing score files.
21177
21178 @item V C
21179 @kindex V C (Summary)
21180 @findex gnus-score-customize
21181 Customize a score file in a visually pleasing manner
21182 (@code{gnus-score-customize}).
21183
21184 @end table
21185
21186 The rest of these commands modify the local score file.
21187
21188 @table @kbd
21189
21190 @item V m
21191 @kindex V m (Summary)
21192 @findex gnus-score-set-mark-below
21193 Prompt for a score, and mark all articles with a score below this as
21194 read (@code{gnus-score-set-mark-below}).
21195
21196 @item V x
21197 @kindex V x (Summary)
21198 @findex gnus-score-set-expunge-below
21199 Prompt for a score, and add a score rule to the current score file to
21200 expunge all articles below this score
21201 (@code{gnus-score-set-expunge-below}).
21202 @end table
21203
21204 The keystrokes for actually making score entries follow a very regular
21205 pattern, so there's no need to list all the commands.  (Hundreds of
21206 them.)
21207
21208 @findex gnus-summary-increase-score
21209 @findex gnus-summary-lower-score
21210
21211 @enumerate
21212 @item
21213 The first key is either @kbd{I} (upper case i) for increasing the score
21214 or @kbd{L} for lowering the score.
21215 @item
21216 The second key says what header you want to score on.  The following
21217 keys are available:
21218 @table @kbd
21219
21220 @item a
21221 Score on the author name.
21222
21223 @item s
21224 Score on the subject line.
21225
21226 @item x
21227 Score on the @code{Xref} line---i.e., the cross-posting line.
21228
21229 @item r
21230 Score on the @code{References} line.
21231
21232 @item d
21233 Score on the date.
21234
21235 @item l
21236 Score on the number of lines.
21237
21238 @item i
21239 Score on the @code{Message-ID} header.
21240
21241 @item e
21242 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
21243 if your @acronym{NNTP} server tracks additional header data in overviews.
21244
21245 @item f
21246 Score on followups---this matches the author name, and adds scores to
21247 the followups to this author.  (Using this key leads to the creation of
21248 @file{ADAPT} files.)
21249
21250 @item b
21251 Score on the body.
21252
21253 @item h
21254 Score on the head.
21255
21256 @item t
21257 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
21258 files.)
21259
21260 @end table
21261
21262 @item
21263 The third key is the match type.  Which match types are valid depends on
21264 what headers you are scoring on.
21265
21266 @table @code
21267
21268 @item strings
21269
21270 @table @kbd
21271
21272 @item e
21273 Exact matching.
21274
21275 @item s
21276 Substring matching.
21277
21278 @item f
21279 Fuzzy matching (@pxref{Fuzzy Matching}).
21280
21281 @item r
21282 Regexp matching
21283 @end table
21284
21285 @item date
21286 @table @kbd
21287
21288 @item b
21289 Before date.
21290
21291 @item a
21292 After date.
21293
21294 @item n
21295 This date.
21296 @end table
21297
21298 @item number
21299 @table @kbd
21300
21301 @item <
21302 Less than number.
21303
21304 @item =
21305 Equal to number.
21306
21307 @item >
21308 Greater than number.
21309 @end table
21310 @end table
21311
21312 @item
21313 The fourth and usually final key says whether this is a temporary (i.e.,
21314 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
21315 or whether it is to be done immediately, without adding to the score
21316 file.
21317 @table @kbd
21318
21319 @item t
21320 Temporary score entry.
21321
21322 @item p
21323 Permanent score entry.
21324
21325 @item i
21326 Immediately scoring.
21327 @end table
21328
21329 @item
21330 If you are scoring on `e' (extra) headers, you will then be prompted for
21331 the header name on which you wish to score.  This must be a header named
21332 in gnus-extra-headers, and @samp{TAB} completion is available.
21333
21334 @end enumerate
21335
21336 So, let's say you want to increase the score on the current author with
21337 exact matching permanently: @kbd{I a e p}.  If you want to lower the
21338 score based on the subject line, using substring matching, and make a
21339 temporary score entry: @kbd{L s s t}.  Pretty easy.
21340
21341 To make things a bit more complicated, there are shortcuts.  If you use
21342 a capital letter on either the second or third keys, Gnus will use
21343 defaults for the remaining one or two keystrokes.  The defaults are
21344 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
21345 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
21346
21347 These functions take both the numerical prefix and the symbolic prefix
21348 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
21349 (or increase) the score of the article.  A symbolic prefix of @code{a}
21350 says to use the @file{all.SCORE} file for the command instead of the
21351 current score file.
21352
21353 @vindex gnus-score-mimic-keymap
21354 The @code{gnus-score-mimic-keymap} says whether these commands will
21355 pretend they are keymaps or not.
21356
21357
21358 @node Group Score Commands
21359 @section Group Score Commands
21360 @cindex group score commands
21361
21362 There aren't many of these as yet, I'm afraid.
21363
21364 @table @kbd
21365
21366 @item W e
21367 @kindex W e (Group)
21368 @findex gnus-score-edit-all-score
21369 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
21370 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
21371
21372 @item W f
21373 @kindex W f (Group)
21374 @findex gnus-score-flush-cache
21375 Gnus maintains a cache of score alists to avoid having to reload them
21376 all the time.  This command will flush the cache
21377 (@code{gnus-score-flush-cache}).
21378
21379 @end table
21380
21381 You can do scoring from the command line by saying something like:
21382
21383 @findex gnus-batch-score
21384 @cindex batch scoring
21385 @example
21386 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
21387 @end example
21388
21389
21390 @node Score Variables
21391 @section Score Variables
21392 @cindex score variables
21393
21394 @table @code
21395
21396 @item gnus-use-scoring
21397 @vindex gnus-use-scoring
21398 If @code{nil}, Gnus will not check for score files, and will not, in
21399 general, do any score-related work.  This is @code{t} by default.
21400
21401 @item gnus-kill-killed
21402 @vindex gnus-kill-killed
21403 If this variable is @code{nil}, Gnus will never apply score files to
21404 articles that have already been through the kill process.  While this
21405 may save you lots of time, it also means that if you apply a kill file
21406 to a group, and then change the kill file and want to run it over you
21407 group again to kill more articles, it won't work.  You have to set this
21408 variable to @code{t} to do that.  (It is @code{t} by default.)
21409
21410 @item gnus-kill-files-directory
21411 @vindex gnus-kill-files-directory
21412 All kill and score files will be stored in this directory, which is
21413 initialized from the @env{SAVEDIR} environment variable by default.
21414 This is @file{~/News/} by default.
21415
21416 @item gnus-score-file-suffix
21417 @vindex gnus-score-file-suffix
21418 Suffix to add to the group name to arrive at the score file name
21419 (@file{SCORE} by default.)
21420
21421 @item gnus-score-uncacheable-files
21422 @vindex gnus-score-uncacheable-files
21423 @cindex score cache
21424 All score files are normally cached to avoid excessive re-loading of
21425 score files.  However, this might make your Emacs grow big and
21426 bloated, so this regexp can be used to weed out score files unlikely
21427 to be needed again.  It would be a bad idea to deny caching of
21428 @file{all.SCORE}, while it might be a good idea to not cache
21429 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
21430 variable is @samp{ADAPT$} by default, so no adaptive score files will
21431 be cached.
21432
21433 @item gnus-save-score
21434 @vindex gnus-save-score
21435 If you have really complicated score files, and do lots of batch
21436 scoring, then you might set this variable to @code{t}.  This will make
21437 Gnus save the scores into the @file{.newsrc.eld} file.
21438
21439 If you do not set this to @code{t}, then manual scores (like those set
21440 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
21441 across group visits.
21442
21443 @item gnus-score-interactive-default-score
21444 @vindex gnus-score-interactive-default-score
21445 Score used by all the interactive raise/lower commands to raise/lower
21446 score with.  Default is 1000, which may seem excessive, but this is to
21447 ensure that the adaptive scoring scheme gets enough room to play with.
21448 We don't want the small changes from the adaptive scoring to overwrite
21449 manually entered data.
21450
21451 @item gnus-summary-default-score
21452 @vindex gnus-summary-default-score
21453 Default score of an article, which is 0 by default.
21454
21455 @item gnus-summary-expunge-below
21456 @vindex gnus-summary-expunge-below
21457 Don't display the summary lines of articles that have scores lower than
21458 this variable.  This is @code{nil} by default, which means that no
21459 articles will be hidden.  This variable is local to the summary buffers,
21460 and has to be set from @code{gnus-summary-mode-hook}.
21461
21462 @item gnus-score-over-mark
21463 @vindex gnus-score-over-mark
21464 Mark (in the third column) used for articles with a score over the
21465 default.  Default is @samp{+}.
21466
21467 @item gnus-score-below-mark
21468 @vindex gnus-score-below-mark
21469 Mark (in the third column) used for articles with a score below the
21470 default.  Default is @samp{-}.
21471
21472 @item gnus-score-find-score-files-function
21473 @vindex gnus-score-find-score-files-function
21474 Function used to find score files for the current group.  This function
21475 is called with the name of the group as the argument.
21476
21477 Predefined functions available are:
21478 @table @code
21479
21480 @item gnus-score-find-single
21481 @findex gnus-score-find-single
21482 Only apply the group's own score file.
21483
21484 @item gnus-score-find-bnews
21485 @findex gnus-score-find-bnews
21486 Apply all score files that match, using bnews syntax.  This is the
21487 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
21488 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
21489 @file{gnu.all.SCORE} would all apply.  In short, the instances of
21490 @samp{all} in the score file names are translated into @samp{.*}, and
21491 then a regexp match is done.
21492
21493 This means that if you have some score entries that you want to apply to
21494 all groups, then you put those entries in the @file{all.SCORE} file.
21495
21496 The score files are applied in a semi-random order, although Gnus will
21497 try to apply the more general score files before the more specific score
21498 files.  It does this by looking at the number of elements in the score
21499 file names---discarding the @samp{all} elements.
21500
21501 @item gnus-score-find-hierarchical
21502 @findex gnus-score-find-hierarchical
21503 Apply all score files from all the parent groups.  This means that you
21504 can't have score files like @file{all.SCORE}, but you can have
21505 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
21506 server.
21507
21508 @end table
21509 This variable can also be a list of functions.  In that case, all
21510 these functions will be called with the group name as argument, and
21511 all the returned lists of score files will be applied.  These
21512 functions can also return lists of lists of score alists directly.  In
21513 that case, the functions that return these non-file score alists
21514 should probably be placed before the ``real'' score file functions, to
21515 ensure that the last score file returned is the local score file.
21516 Phu.
21517
21518 For example, to do hierarchical scoring but use a non-server-specific
21519 overall score file, you could use the value
21520 @example
21521 (list (lambda (group) ("all.SCORE"))
21522       'gnus-score-find-hierarchical)
21523 @end example
21524
21525 @item gnus-score-expiry-days
21526 @vindex gnus-score-expiry-days
21527 This variable says how many days should pass before an unused score file
21528 entry is expired.  If this variable is @code{nil}, no score file entries
21529 are expired.  It's 7 by default.
21530
21531 @item gnus-update-score-entry-dates
21532 @vindex gnus-update-score-entry-dates
21533 If this variable is non-@code{nil}, temporary score entries that have
21534 been triggered (matched) will have their dates updated.  (This is how Gnus
21535 controls expiry---all non-matched-entries will become too old while
21536 matched entries will stay fresh and young.)  However, if you set this
21537 variable to @code{nil}, even matched entries will grow old and will
21538 have to face that oh-so grim reaper.
21539
21540 @item gnus-score-after-write-file-function
21541 @vindex gnus-score-after-write-file-function
21542 Function called with the name of the score file just written.
21543
21544 @item gnus-score-thread-simplify
21545 @vindex gnus-score-thread-simplify
21546 If this variable is non-@code{nil}, article subjects will be
21547 simplified for subject scoring purposes in the same manner as with
21548 threading---according to the current value of
21549 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
21550 @code{substring} or @code{exact} matching, the match will also be
21551 simplified in this manner.
21552
21553 @end table
21554
21555
21556 @node Score File Format
21557 @section Score File Format
21558 @cindex score file format
21559
21560 A score file is an @code{emacs-lisp} file that normally contains just a
21561 single form.  Casual users are not expected to edit these files;
21562 everything can be changed from the summary buffer.
21563
21564 Anyway, if you'd like to dig into it yourself, here's an example:
21565
21566 @lisp
21567 (("from"
21568   ("Lars Ingebrigtsen" -10000)
21569   ("Per Abrahamsen")
21570   ("larsi\\|lmi" -50000 nil R))
21571  ("subject"
21572   ("Ding is Badd" nil 728373))
21573  ("xref"
21574   ("alt.politics" -1000 728372 s))
21575  ("lines"
21576   (2 -100 nil <))
21577  (mark 0)
21578  (expunge -1000)
21579  (mark-and-expunge -10)
21580  (read-only nil)
21581  (orphan -10)
21582  (adapt t)
21583  (files "/hom/larsi/News/gnu.SCORE")
21584  (exclude-files "all.SCORE")
21585  (local (gnus-newsgroup-auto-expire t)
21586         (gnus-summary-make-false-root empty))
21587  (eval (ding)))
21588 @end lisp
21589
21590 This example demonstrates most score file elements.  @xref{Advanced
21591 Scoring}, for a different approach.
21592
21593 Even though this looks much like Lisp code, nothing here is actually
21594 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
21595 has to be valid syntactically, if not semantically.
21596
21597 Six keys are supported by this alist:
21598
21599 @table @code
21600
21601 @item STRING
21602 If the key is a string, it is the name of the header to perform the
21603 match on.  Scoring can only be performed on these eight headers:
21604 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
21605 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
21606 these headers, there are three strings to tell Gnus to fetch the entire
21607 article and do the match on larger parts of the article: @code{Body}
21608 will perform the match on the body of the article, @code{Head} will
21609 perform the match on the head of the article, and @code{All} will
21610 perform the match on the entire article.  Note that using any of these
21611 last three keys will slow down group entry @emph{considerably}.  The
21612 final ``header'' you can score on is @code{Followup}.  These score
21613 entries will result in new score entries being added for all follow-ups
21614 to articles that matches these score entries.
21615
21616 Following this key is an arbitrary number of score entries, where each
21617 score entry has one to four elements.
21618 @enumerate
21619
21620 @item
21621 The first element is the @dfn{match element}.  On most headers this will
21622 be a string, but on the Lines and Chars headers, this must be an
21623 integer.
21624
21625 @item
21626 If the second element is present, it should be a number---the @dfn{score
21627 element}.  This number should be an integer in the neginf to posinf
21628 interval.  This number is added to the score of the article if the match
21629 is successful.  If this element is not present, the
21630 @code{gnus-score-interactive-default-score} number will be used
21631 instead.  This is 1000 by default.
21632
21633 @item
21634 If the third element is present, it should be a number---the @dfn{date
21635 element}.  This date says when the last time this score entry matched,
21636 which provides a mechanism for expiring the score entries.  It this
21637 element is not present, the score entry is permanent.  The date is
21638 represented by the number of days since December 31, 1 BCE.
21639
21640 @item
21641 If the fourth element is present, it should be a symbol---the @dfn{type
21642 element}.  This element specifies what function should be used to see
21643 whether this score entry matches the article.  What match types that can
21644 be used depends on what header you wish to perform the match on.
21645 @table @dfn
21646
21647 @item From, Subject, References, Xref, Message-ID
21648 For most header types, there are the @code{r} and @code{R} (regexp), as
21649 well as @code{s} and @code{S} (substring) types, and @code{e} and
21650 @code{E} (exact match), and @code{w} (word match) types.  If this
21651 element is not present, Gnus will assume that substring matching should
21652 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
21653 that the matches will be done in a case-sensitive manner.  All these
21654 one-letter types are really just abbreviations for the @code{regexp},
21655 @code{string}, @code{exact}, and @code{word} types, which you can use
21656 instead, if you feel like.
21657
21658 @item Extra
21659 Just as for the standard string overview headers, if you are using
21660 gnus-extra-headers, you can score on these headers' values.  In this
21661 case, there is a 5th element in the score entry, being the name of the
21662 header to be scored.  The following entry is useful in your
21663 @file{all.SCORE} file in case of spam attacks from a single origin
21664 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
21665 overviews:
21666
21667 @lisp
21668 ("111.222.333.444" -1000 nil s
21669  "NNTP-Posting-Host")
21670 @end lisp
21671
21672 @item Lines, Chars
21673 These two headers use different match types: @code{<}, @code{>},
21674 @code{=}, @code{>=} and @code{<=}.
21675
21676 These predicates are true if
21677
21678 @example
21679 (PREDICATE HEADER MATCH)
21680 @end example
21681
21682 evaluates to non-@code{nil}.  For instance, the advanced match
21683 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
21684 following form:
21685
21686 @lisp
21687 (< header-value 4)
21688 @end lisp
21689
21690 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
21691 the match, we get the score added if the article has less than 4 lines.
21692 (It's easy to get confused and think it's the other way around.  But
21693 it's not.  I think.)
21694
21695 When matching on @code{Lines}, be careful because some back ends (like
21696 @code{nndir}) do not generate @code{Lines} header, so every article ends
21697 up being marked as having 0 lines.  This can lead to strange results if
21698 you happen to lower score of the articles with few lines.
21699
21700 @item Date
21701 For the Date header we have three kinda silly match types:
21702 @code{before}, @code{at} and @code{after}.  I can't really imagine this
21703 ever being useful, but, like, it would feel kinda silly not to provide
21704 this function.  Just in case.  You never know.  Better safe than sorry.
21705 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
21706 sex on a first date.  (I have been told that at least one person, and I
21707 quote, ``found this function indispensable'', however.)
21708
21709 @cindex ISO8601
21710 @cindex date
21711 A more useful match type is @code{regexp}.  With it, you can match the
21712 date string using a regular expression.  The date is normalized to
21713 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
21714 you want to match all articles that have been posted on April 1st in
21715 every year, you could use @samp{....0401.........} as a match string,
21716 for instance.  (Note that the date is kept in its original time zone, so
21717 this will match articles that were posted when it was April 1st where
21718 the article was posted from.  Time zones are such wholesome fun for the
21719 whole family, eh?)
21720
21721 @item Head, Body, All
21722 These three match keys use the same match types as the @code{From} (etc)
21723 header uses.
21724
21725 @item Followup
21726 This match key is somewhat special, in that it will match the
21727 @code{From} header, and affect the score of not only the matching
21728 articles, but also all followups to the matching articles.  This allows
21729 you e.g. increase the score of followups to your own articles, or
21730 decrease the score of followups to the articles of some known
21731 trouble-maker.  Uses the same match types as the @code{From} header
21732 uses.  (Using this match key will lead to creation of @file{ADAPT}
21733 files.)
21734
21735 @item Thread
21736 This match key works along the same lines as the @code{Followup} match
21737 key.  If you say that you want to score on a (sub-)thread started by an
21738 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21739 match.  This will add a new @samp{thread} match for each article that
21740 has @var{x} in its @code{References} header.  (These new @samp{thread}
21741 matches will use the @code{Message-ID}s of these matching articles.)
21742 This will ensure that you can raise/lower the score of an entire thread,
21743 even though some articles in the thread may not have complete
21744 @code{References} headers.  Note that using this may lead to
21745 undeterministic scores of the articles in the thread.  (Using this match
21746 key will lead to creation of @file{ADAPT} files.)
21747 @end table
21748 @end enumerate
21749
21750 @cindex score file atoms
21751 @item mark
21752 The value of this entry should be a number.  Any articles with a score
21753 lower than this number will be marked as read.
21754
21755 @item expunge
21756 The value of this entry should be a number.  Any articles with a score
21757 lower than this number will be removed from the summary buffer.
21758
21759 @item mark-and-expunge
21760 The value of this entry should be a number.  Any articles with a score
21761 lower than this number will be marked as read and removed from the
21762 summary buffer.
21763
21764 @item thread-mark-and-expunge
21765 The value of this entry should be a number.  All articles that belong to
21766 a thread that has a total score below this number will be marked as read
21767 and removed from the summary buffer.  @code{gnus-thread-score-function}
21768 says how to compute the total score for a thread.
21769
21770 @item files
21771 The value of this entry should be any number of file names.  These files
21772 are assumed to be score files as well, and will be loaded the same way
21773 this one was.
21774
21775 @item exclude-files
21776 The clue of this entry should be any number of files.  These files will
21777 not be loaded, even though they would normally be so, for some reason or
21778 other.
21779
21780 @item eval
21781 The value of this entry will be @code{eval}ed.  This element will be
21782 ignored when handling global score files.
21783
21784 @item read-only
21785 Read-only score files will not be updated or saved.  Global score files
21786 should feature this atom (@pxref{Global Score Files}).  (Note:
21787 @dfn{Global} here really means @dfn{global}; not your personal
21788 apply-to-all-groups score files.)
21789
21790 @item orphan
21791 The value of this entry should be a number.  Articles that do not have
21792 parents will get this number added to their scores.  Imagine you follow
21793 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21794 will only follow a few of the threads, also want to see any new threads.
21795
21796 You can do this with the following two score file entries:
21797
21798 @example
21799         (orphan -500)
21800         (mark-and-expunge -100)
21801 @end example
21802
21803 When you enter the group the first time, you will only see the new
21804 threads.  You then raise the score of the threads that you find
21805 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{c y}) the
21806 rest.  Next time you enter the group, you will see new articles in the
21807 interesting threads, plus any new threads.
21808
21809 I.e.---the orphan score atom is for high-volume groups where a few
21810 interesting threads which can't be found automatically by ordinary
21811 scoring rules exist.
21812
21813 @item adapt
21814 This entry controls the adaptive scoring.  If it is @code{t}, the
21815 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21816 adaptive scoring will be performed on this group.  If it is a list, this
21817 list will be used as the adaptive scoring rules.  If it isn't present,
21818 or is something other than @code{t} or @code{ignore}, the default
21819 adaptive scoring rules will be used.  If you want to use adaptive
21820 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21821 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21822 not want adaptive scoring.  If you only want adaptive scoring in a few
21823 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21824 insert @code{(adapt t)} in the score files of the groups where you want
21825 it.
21826
21827 @item adapt-file
21828 All adaptive score entries will go to the file named by this entry.  It
21829 will also be applied when entering the group.  This atom might be handy
21830 if you want to adapt on several groups at once, using the same adaptive
21831 file for a number of groups.
21832
21833 @item local
21834 @cindex local variables
21835 The value of this entry should be a list of @code{(@var{var}
21836 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21837 current summary buffer, and set to the value specified.  This is a
21838 convenient, if somewhat strange, way of setting variables in some
21839 groups if you don't like hooks much.  Note that the @var{value} won't
21840 be evaluated.
21841 @end table
21842
21843
21844 @node Score File Editing
21845 @section Score File Editing
21846
21847 You normally enter all scoring commands from the summary buffer, but you
21848 might feel the urge to edit them by hand as well, so we've supplied you
21849 with a mode for that.
21850
21851 It's simply a slightly customized @code{emacs-lisp} mode, with these
21852 additional commands:
21853
21854 @table @kbd
21855
21856 @item C-c C-c
21857 @kindex C-c C-c (Score)
21858 @findex gnus-score-edit-exit
21859 Save the changes you have made and return to the summary buffer
21860 (@code{gnus-score-edit-exit}).
21861
21862 @item C-c C-d
21863 @kindex C-c C-d (Score)
21864 @findex gnus-score-edit-insert-date
21865 Insert the current date in numerical format
21866 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21867 you were wondering.
21868
21869 @item C-c C-p
21870 @kindex C-c C-p (Score)
21871 @findex gnus-score-pretty-print
21872 The adaptive score files are saved in an unformatted fashion.  If you
21873 intend to read one of these files, you want to @dfn{pretty print} it
21874 first.  This command (@code{gnus-score-pretty-print}) does that for
21875 you.
21876
21877 @end table
21878
21879 Type @kbd{M-x gnus-score-mode} to use this mode.
21880
21881 @vindex gnus-score-mode-hook
21882 @code{gnus-score-menu-hook} is run in score mode buffers.
21883
21884 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21885 @kbd{V t} to begin editing score files.
21886
21887
21888 @node Adaptive Scoring
21889 @section Adaptive Scoring
21890 @cindex adaptive scoring
21891
21892 If all this scoring is getting you down, Gnus has a way of making it all
21893 happen automatically---as if by magic.  Or rather, as if by artificial
21894 stupidity, to be precise.
21895
21896 @vindex gnus-use-adaptive-scoring
21897 When you read an article, or mark an article as read, or kill an
21898 article, you leave marks behind.  On exit from the group, Gnus can sniff
21899 these marks and add score elements depending on what marks it finds.
21900 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21901 @code{t} or @code{(line)}.  If you want score adaptively on separate
21902 words appearing in the subjects, you should set this variable to
21903 @code{(word)}.  If you want to use both adaptive methods, set this
21904 variable to @code{(word line)}.
21905
21906 @vindex gnus-default-adaptive-score-alist
21907 To give you complete control over the scoring process, you can customize
21908 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21909 might look something like this:
21910
21911 @lisp
21912 (setq gnus-default-adaptive-score-alist
21913   '((gnus-unread-mark)
21914     (gnus-ticked-mark (from 4))
21915     (gnus-dormant-mark (from 5))
21916     (gnus-del-mark (from -4) (subject -1))
21917     (gnus-read-mark (from 4) (subject 2))
21918     (gnus-expirable-mark (from -1) (subject -1))
21919     (gnus-killed-mark (from -1) (subject -3))
21920     (gnus-kill-file-mark)
21921     (gnus-ancient-mark)
21922     (gnus-low-score-mark)
21923     (gnus-catchup-mark (from -1) (subject -1))))
21924 @end lisp
21925
21926 As you see, each element in this alist has a mark as a key (either a
21927 variable name or a ``real'' mark---a character).  Following this key is
21928 a arbitrary number of header/score pairs.  If there are no header/score
21929 pairs following the key, no adaptive scoring will be done on articles
21930 that have that key as the article mark.  For instance, articles with
21931 @code{gnus-unread-mark} in the example above will not get adaptive score
21932 entries.
21933
21934 Each article can have only one mark, so just a single of these rules
21935 will be applied to each article.
21936
21937 To take @code{gnus-del-mark} as an example---this alist says that all
21938 articles that have that mark (i.e., are marked with @samp{e}) will have a
21939 score entry added to lower based on the @code{From} header by -4, and
21940 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21941
21942 If you have marked 10 articles with the same subject with
21943 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21944 That means that that subject will get a score of ten times -1, which
21945 should be, unless I'm much mistaken, -10.
21946
21947 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21948 the read articles will be marked with the @samp{E} mark.  This'll
21949 probably make adaptive scoring slightly impossible, so auto-expiring and
21950 adaptive scoring doesn't really mix very well.
21951
21952 The headers you can score on are @code{from}, @code{subject},
21953 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21954 @code{chars} and @code{date}.  In addition, you can score on
21955 @code{followup}, which will create an adaptive score entry that matches
21956 on the @code{References} header using the @code{Message-ID} of the
21957 current article, thereby matching the following thread.
21958
21959 If you use this scheme, you should set the score file atom @code{mark}
21960 to something small---like -300, perhaps, to avoid having small random
21961 changes result in articles getting marked as read.
21962
21963 After using adaptive scoring for a week or so, Gnus should start to
21964 become properly trained and enhance the authors you like best, and kill
21965 the authors you like least, without you having to say so explicitly.
21966
21967 You can control what groups the adaptive scoring is to be performed on
21968 by using the score files (@pxref{Score File Format}).  This will also
21969 let you use different rules in different groups.
21970
21971 @vindex gnus-adaptive-file-suffix
21972 The adaptive score entries will be put into a file where the name is the
21973 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21974 is @file{ADAPT}.
21975
21976 @vindex gnus-adaptive-pretty-print
21977 Adaptive score files can get huge and are not meant to be edited by
21978 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21979 deafult) those files will not be written in a human readable way.
21980
21981 @vindex gnus-score-exact-adapt-limit
21982 When doing adaptive scoring, substring or fuzzy matching would probably
21983 give you the best results in most cases.  However, if the header one
21984 matches is short, the possibility for false positives is great, so if
21985 the length of the match is less than
21986 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
21987 this variable is @code{nil}, exact matching will always be used to avoid
21988 this problem.
21989
21990 @vindex gnus-default-adaptive-word-score-alist
21991 As mentioned above, you can adapt either on individual words or entire
21992 headers.  If you adapt on words, the
21993 @code{gnus-default-adaptive-word-score-alist} variable says what score
21994 each instance of a word should add given a mark.
21995
21996 @lisp
21997 (setq gnus-default-adaptive-word-score-alist
21998       `((,gnus-read-mark . 30)
21999         (,gnus-catchup-mark . -10)
22000         (,gnus-killed-mark . -20)
22001         (,gnus-del-mark . -15)))
22002 @end lisp
22003
22004 This is the default value.  If you have adaption on words enabled, every
22005 word that appears in subjects of articles marked with
22006 @code{gnus-read-mark} will result in a score rule that increase the
22007 score with 30 points.
22008
22009 @vindex gnus-default-ignored-adaptive-words
22010 @vindex gnus-ignored-adaptive-words
22011 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
22012 will be ignored.  If you wish to add more words to be ignored, use the
22013 @code{gnus-ignored-adaptive-words} list instead.
22014
22015 @vindex gnus-adaptive-word-length-limit
22016 Some may feel that short words shouldn't count when doing adaptive
22017 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
22018 an integer.  Words shorter than this number will be ignored.  This
22019 variable defaults to @code{nil}.
22020
22021 @vindex gnus-adaptive-word-syntax-table
22022 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
22023 syntax table in effect.  It is similar to the standard syntax table, but
22024 it considers numbers to be non-word-constituent characters.
22025
22026 @vindex gnus-adaptive-word-minimum
22027 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
22028 word scoring process will never bring down the score of an article to
22029 below this number.  The default is @code{nil}.
22030
22031 @vindex gnus-adaptive-word-no-group-words
22032 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
22033 won't adaptively word score any of the words in the group name.  Useful
22034 for groups like @samp{comp.editors.emacs}, where most of the subject
22035 lines contain the word @samp{emacs}.
22036
22037 After using this scheme for a while, it might be nice to write a
22038 @code{gnus-psychoanalyze-user} command to go through the rules and see
22039 what words you like and what words you don't like.  Or perhaps not.
22040
22041 Note that the adaptive word scoring thing is highly experimental and is
22042 likely to change in the future.  Initial impressions seem to indicate
22043 that it's totally useless as it stands.  Some more work (involving more
22044 rigorous statistical methods) will have to be done to make this useful.
22045
22046
22047 @node Home Score File
22048 @section Home Score File
22049
22050 The score file where new score file entries will go is called the
22051 @dfn{home score file}.  This is normally (and by default) the score file
22052 for the group itself.  For instance, the home score file for
22053 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
22054
22055 However, this may not be what you want.  It is often convenient to share
22056 a common home score file among many groups---all @samp{emacs} groups
22057 could perhaps use the same home score file.
22058
22059 @vindex gnus-home-score-file
22060 The variable that controls this is @code{gnus-home-score-file}.  It can
22061 be:
22062
22063 @enumerate
22064 @item
22065 A string.  Then this file will be used as the home score file for all
22066 groups.
22067
22068 @item
22069 A function.  The result of this function will be used as the home score
22070 file.  The function will be called with the name of the group as the
22071 parameter.
22072
22073 @item
22074 A list.  The elements in this list can be:
22075
22076 @enumerate
22077 @item
22078 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
22079 group name, the @var{file-name} will be used as the home score file.
22080
22081 @item
22082 A function.  If the function returns non-@code{nil}, the result will
22083 be used as the home score file.  The function will be called with the
22084 name of the group as the parameter.
22085
22086 @item
22087 A string.  Use the string as the home score file.
22088 @end enumerate
22089
22090 The list will be traversed from the beginning towards the end looking
22091 for matches.
22092
22093 @end enumerate
22094
22095 So, if you want to use just a single score file, you could say:
22096
22097 @lisp
22098 (setq gnus-home-score-file
22099       "my-total-score-file.SCORE")
22100 @end lisp
22101
22102 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
22103 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
22104
22105 @findex gnus-hierarchial-home-score-file
22106 @lisp
22107 (setq gnus-home-score-file
22108       'gnus-hierarchial-home-score-file)
22109 @end lisp
22110
22111 This is a ready-made function provided for your convenience.
22112 Other functions include
22113
22114 @table @code
22115 @item gnus-current-home-score-file
22116 @findex gnus-current-home-score-file
22117 Return the ``current'' regular score file.  This will make scoring
22118 commands add entry to the ``innermost'' matching score file.
22119
22120 @end table
22121
22122 If you want to have one score file for the @samp{emacs} groups and
22123 another for the @samp{comp} groups, while letting all other groups use
22124 their own home score files:
22125
22126 @lisp
22127 (setq gnus-home-score-file
22128       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
22129       '(("\\.emacs" "emacs.SCORE")
22130         ;; @r{All the comp groups in one score file}
22131         ("^comp" "comp.SCORE")))
22132 @end lisp
22133
22134 @vindex gnus-home-adapt-file
22135 @code{gnus-home-adapt-file} works exactly the same way as
22136 @code{gnus-home-score-file}, but says what the home adaptive score file
22137 is instead.  All new adaptive file entries will go into the file
22138 specified by this variable, and the same syntax is allowed.
22139
22140 In addition to using @code{gnus-home-score-file} and
22141 @code{gnus-home-adapt-file}, you can also use group parameters
22142 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
22143 Parameters}) to achieve much the same.  Group and topic parameters take
22144 precedence over this variable.
22145
22146
22147 @node Followups To Yourself
22148 @section Followups To Yourself
22149
22150 Gnus offers two commands for picking out the @code{Message-ID} header in
22151 the current buffer.  Gnus will then add a score rule that scores using
22152 this @code{Message-ID} on the @code{References} header of other
22153 articles.  This will, in effect, increase the score of all articles that
22154 respond to the article in the current buffer.  Quite useful if you want
22155 to easily note when people answer what you've said.
22156
22157 @table @code
22158
22159 @item gnus-score-followup-article
22160 @findex gnus-score-followup-article
22161 This will add a score to articles that directly follow up your own
22162 article.
22163
22164 @item gnus-score-followup-thread
22165 @findex gnus-score-followup-thread
22166 This will add a score to all articles that appear in a thread ``below''
22167 your own article.
22168 @end table
22169
22170 @vindex message-sent-hook
22171 These two functions are both primarily meant to be used in hooks like
22172 @code{message-sent-hook}, like this:
22173 @lisp
22174 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
22175 @end lisp
22176
22177
22178 If you look closely at your own @code{Message-ID}, you'll notice that
22179 the first two or three characters are always the same.  Here's two of
22180 mine:
22181
22182 @example
22183 <x6u3u47icf.fsf@@eyesore.no>
22184 <x6sp9o7ibw.fsf@@eyesore.no>
22185 @end example
22186
22187 So ``my'' ident on this machine is @samp{x6}.  This can be
22188 exploited---the following rule will raise the score on all followups to
22189 myself:
22190
22191 @lisp
22192 ("references"
22193  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
22194   1000 nil r))
22195 @end lisp
22196
22197 Whether it's the first two or first three characters that are ``yours''
22198 is system-dependent.
22199
22200
22201 @node Scoring On Other Headers
22202 @section Scoring On Other Headers
22203 @cindex scoring on other headers
22204
22205 Gnus is quite fast when scoring the ``traditional''
22206 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
22207 other headers requires writing a @code{head} scoring rule, which means
22208 that Gnus has to request every single article from the back end to find
22209 matches.  This takes a long time in big groups.
22210
22211 @vindex gnus-inhibit-slow-scoring
22212 You can inhibit this slow scoring on headers or body by setting the
22213 variable @code{gnus-inhibit-slow-scoring}.  If
22214 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
22215 the group matches the regexp.  If it is t, slow scoring on it is
22216 inhibited for all groups.
22217
22218 Now, there's not much you can do about the slowness for news groups, but for
22219 mail groups, you have greater control.  In @ref{To From Newsgroups},
22220 it's explained in greater detail what this mechanism does, but here's
22221 a cookbook example for @code{nnml} on how to allow scoring on the
22222 @samp{To} and @samp{Cc} headers.
22223
22224 Put the following in your @file{~/.gnus.el} file.
22225
22226 @lisp
22227 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
22228       nnmail-extra-headers gnus-extra-headers)
22229 @end lisp
22230
22231 Restart Gnus and rebuild your @code{nnml} overview files with the
22232 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
22233 time if you have much mail.
22234
22235 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
22236 so: @kbd{I e s p To RET <your name> RET}.
22237
22238 See?  Simple.
22239
22240
22241 @node Scoring Tips
22242 @section Scoring Tips
22243 @cindex scoring tips
22244
22245 @table @dfn
22246
22247 @item Crossposts
22248 @cindex crossposts
22249 @cindex scoring crossposts
22250 If you want to lower the score of crossposts, the line to match on is
22251 the @code{Xref} header.
22252 @lisp
22253 ("xref" (" talk.politics.misc:" -1000))
22254 @end lisp
22255
22256 @item Multiple crossposts
22257 If you want to lower the score of articles that have been crossposted to
22258 more than, say, 3 groups:
22259 @lisp
22260 ("xref"
22261   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
22262    -1000 nil r))
22263 @end lisp
22264
22265 @item Matching on the body
22266 This is generally not a very good idea---it takes a very long time.
22267 Gnus actually has to fetch each individual article from the server.  But
22268 you might want to anyway, I guess.  Even though there are three match
22269 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
22270 and stick with it in each score file.  If you use any two, each article
22271 will be fetched @emph{twice}.  If you want to match a bit on the
22272 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
22273 the matches.
22274
22275 @item Marking as read
22276 You will probably want to mark articles that have scores below a certain
22277 number as read.  This is most easily achieved by putting the following
22278 in your @file{all.SCORE} file:
22279 @lisp
22280 ((mark -100))
22281 @end lisp
22282 You may also consider doing something similar with @code{expunge}.
22283
22284 @item Negated character classes
22285 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
22286 That will match newlines, which might lead to, well, The Unknown.  Say
22287 @code{[^abcd\n]*} instead.
22288 @end table
22289
22290
22291 @node Reverse Scoring
22292 @section Reverse Scoring
22293 @cindex reverse scoring
22294
22295 If you want to keep just articles that have @samp{Sex with Emacs} in the
22296 subject header, and expunge all other articles, you could put something
22297 like this in your score file:
22298
22299 @lisp
22300 (("subject"
22301   ("Sex with Emacs" 2))
22302  (mark 1)
22303  (expunge 1))
22304 @end lisp
22305
22306 So, you raise all articles that match @samp{Sex with Emacs} and mark the
22307 rest as read, and expunge them to boot.
22308
22309
22310 @node Global Score Files
22311 @section Global Score Files
22312 @cindex global score files
22313
22314 Sure, other newsreaders have ``global kill files''.  These are usually
22315 nothing more than a single kill file that applies to all groups, stored
22316 in the user's home directory.  Bah!  Puny, weak newsreaders!
22317
22318 What I'm talking about here are Global Score Files.  Score files from
22319 all over the world, from users everywhere, uniting all nations in one
22320 big, happy score file union!  Ange-score!  New and untested!
22321
22322 @vindex gnus-global-score-files
22323 All you have to do to use other people's score files is to set the
22324 @code{gnus-global-score-files} variable.  One entry for each score file,
22325 or each score file directory.  Gnus will decide by itself what score
22326 files are applicable to which group.
22327
22328 To use the score file
22329 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
22330 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
22331 say this:
22332
22333 @lisp
22334 (setq gnus-global-score-files
22335       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
22336         "/ftp@@ftp.some-where:/pub/score/"))
22337 @end lisp
22338
22339 @findex gnus-score-search-global-directories
22340 @noindent
22341 Simple, eh?  Directory names must end with a @samp{/}.  These
22342 directories are typically scanned only once during each Gnus session.
22343 If you feel the need to manually re-scan the remote directories, you can
22344 use the @code{gnus-score-search-global-directories} command.
22345
22346 Note that, at present, using this option will slow down group entry
22347 somewhat.  (That is---a lot.)
22348
22349 If you want to start maintaining score files for other people to use,
22350 just put your score file up for anonymous ftp and announce it to the
22351 world.  Become a retro-moderator!  Participate in the retro-moderator
22352 wars sure to ensue, where retro-moderators battle it out for the
22353 sympathy of the people, luring them to use their score files on false
22354 premises!  Yay!  The net is saved!
22355
22356 Here are some tips for the would-be retro-moderator, off the top of my
22357 head:
22358
22359 @itemize @bullet
22360
22361 @item
22362 Articles heavily crossposted are probably junk.
22363 @item
22364 To lower a single inappropriate article, lower by @code{Message-ID}.
22365 @item
22366 Particularly brilliant authors can be raised on a permanent basis.
22367 @item
22368 Authors that repeatedly post off-charter for the group can safely be
22369 lowered out of existence.
22370 @item
22371 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
22372 articles completely.
22373
22374 @item
22375 Use expiring score entries to keep the size of the file down.  You
22376 should probably have a long expiry period, though, as some sites keep
22377 old articles for a long time.
22378 @end itemize
22379
22380 @dots{} I wonder whether other newsreaders will support global score files
22381 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
22382 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
22383 holding our breath yet?
22384
22385
22386 @node Kill Files
22387 @section Kill Files
22388 @cindex kill files
22389
22390 Gnus still supports those pesky old kill files.  In fact, the kill file
22391 entries can now be expiring, which is something I wrote before Daniel
22392 Quinlan thought of doing score files, so I've left the code in there.
22393
22394 In short, kill processing is a lot slower (and I do mean @emph{a lot})
22395 than score processing, so it might be a good idea to rewrite your kill
22396 files into score files.
22397
22398 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
22399 forms into this file, which means that you can use kill files as some
22400 sort of primitive hook function to be run on group entry, even though
22401 that isn't a very good idea.
22402
22403 Normal kill files look like this:
22404
22405 @lisp
22406 (gnus-kill "From" "Lars Ingebrigtsen")
22407 (gnus-kill "Subject" "ding")
22408 (gnus-expunge "X")
22409 @end lisp
22410
22411 This will mark every article written by me as read, and remove the
22412 marked articles from the summary buffer.  Very useful, you'll agree.
22413
22414 Other programs use a totally different kill file syntax.  If Gnus
22415 encounters what looks like a @code{rn} kill file, it will take a stab at
22416 interpreting it.
22417
22418 Two summary functions for editing a @sc{gnus} kill file:
22419
22420 @table @kbd
22421
22422 @item M-k
22423 @kindex M-k (Summary)
22424 @findex gnus-summary-edit-local-kill
22425 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
22426
22427 @item M-K
22428 @kindex M-K (Summary)
22429 @findex gnus-summary-edit-global-kill
22430 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
22431 @end table
22432
22433 Two group mode functions for editing the kill files:
22434
22435 @table @kbd
22436
22437 @item M-k
22438 @kindex M-k (Group)
22439 @findex gnus-group-edit-local-kill
22440 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
22441
22442 @item M-K
22443 @kindex M-K (Group)
22444 @findex gnus-group-edit-global-kill
22445 Edit the general kill file (@code{gnus-group-edit-global-kill}).
22446 @end table
22447
22448 Kill file variables:
22449
22450 @table @code
22451 @item gnus-kill-file-name
22452 @vindex gnus-kill-file-name
22453 A kill file for the group @samp{soc.motss} is normally called
22454 @file{soc.motss.KILL}.  The suffix appended to the group name to get
22455 this file name is detailed by the @code{gnus-kill-file-name} variable.
22456 The ``global'' kill file (not in the score file sense of ``global'', of
22457 course) is just called @file{KILL}.
22458
22459 @vindex gnus-kill-save-kill-file
22460 @item gnus-kill-save-kill-file
22461 If this variable is non-@code{nil}, Gnus will save the
22462 kill file after processing, which is necessary if you use expiring
22463 kills.
22464
22465 @item gnus-apply-kill-hook
22466 @vindex gnus-apply-kill-hook
22467 @findex gnus-apply-kill-file-unless-scored
22468 @findex gnus-apply-kill-file
22469 A hook called to apply kill files to a group.  It is
22470 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
22471 kill file if you have a score file for the same group, you can set this
22472 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
22473 kill files to be processed, you should set this variable to @code{nil}.
22474
22475 @item gnus-kill-file-mode-hook
22476 @vindex gnus-kill-file-mode-hook
22477 A hook called in kill-file mode buffers.
22478
22479 @end table
22480
22481
22482 @node Converting Kill Files
22483 @section Converting Kill Files
22484 @cindex kill files
22485 @cindex converting kill files
22486
22487 If you have loads of old kill files, you may want to convert them into
22488 score files.  If they are ``regular'', you can use
22489 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
22490 by hand.
22491
22492 The kill to score conversion package isn't included in Emacs by default.
22493 You can fetch it from the contrib directory of the Gnus distribution or
22494 from
22495 @uref{http://heim.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
22496
22497 If your old kill files are very complex---if they contain more
22498 non-@code{gnus-kill} forms than not, you'll have to convert them by
22499 hand.  Or just let them be as they are.  Gnus will still use them as
22500 before.
22501
22502
22503 @node Advanced Scoring
22504 @section Advanced Scoring
22505
22506 Scoring on Subjects and From headers is nice enough, but what if you're
22507 really interested in what a person has to say only when she's talking
22508 about a particular subject?  Or what if you really don't want to
22509 read what person A has to say when she's following up to person B, but
22510 want to read what she says when she's following up to person C?
22511
22512 By using advanced scoring rules you may create arbitrarily complex
22513 scoring patterns.
22514
22515 @menu
22516 * Advanced Scoring Syntax::     A definition.
22517 * Advanced Scoring Examples::   What they look like.
22518 * Advanced Scoring Tips::       Getting the most out of it.
22519 @end menu
22520
22521
22522 @node Advanced Scoring Syntax
22523 @subsection Advanced Scoring Syntax
22524
22525 Ordinary scoring rules have a string as the first element in the rule.
22526 Advanced scoring rules have a list as the first element.  The second
22527 element is the score to be applied if the first element evaluated to a
22528 non-@code{nil} value.
22529
22530 These lists may consist of three logical operators, one redirection
22531 operator, and various match operators.
22532
22533 Logical operators:
22534
22535 @table @code
22536 @item &
22537 @itemx and
22538 This logical operator will evaluate each of its arguments until it finds
22539 one that evaluates to @code{false}, and then it'll stop.  If all arguments
22540 evaluate to @code{true} values, then this operator will return
22541 @code{true}.
22542
22543 @item |
22544 @itemx or
22545 This logical operator will evaluate each of its arguments until it finds
22546 one that evaluates to @code{true}.  If no arguments are @code{true},
22547 then this operator will return @code{false}.
22548
22549 @item !
22550 @itemx not
22551 @itemx Â¬
22552 This logical operator only takes a single argument.  It returns the
22553 logical negation of the value of its argument.
22554
22555 @end table
22556
22557 There is an @dfn{indirection operator} that will make its arguments
22558 apply to the ancestors of the current article being scored.  For
22559 instance, @code{1-} will make score rules apply to the parent of the
22560 current article.  @code{2-} will make score rules apply to the
22561 grandparent of the current article.  Alternatively, you can write
22562 @code{^^}, where the number of @code{^}s (carets) says how far back into
22563 the ancestry you want to go.
22564
22565 Finally, we have the match operators.  These are the ones that do the
22566 real work.  Match operators are header name strings followed by a match
22567 and a match type.  A typical match operator looks like @samp{("from"
22568 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
22569 simple scoring, and the match types are also the same.
22570
22571
22572 @node Advanced Scoring Examples
22573 @subsection Advanced Scoring Examples
22574
22575 Please note that the following examples are score file rules.  To
22576 make a complete score file from them, surround them with another pair
22577 of parentheses.
22578
22579 Let's say you want to increase the score of articles written by Lars
22580 when he's talking about Gnus:
22581
22582 @example
22583 @group
22584 ((&
22585   ("from" "Lars Ingebrigtsen")
22586   ("subject" "Gnus"))
22587  1000)
22588 @end group
22589 @end example
22590
22591 Quite simple, huh?
22592
22593 When he writes long articles, he sometimes has something nice to say:
22594
22595 @example
22596 ((&
22597   ("from" "Lars Ingebrigtsen")
22598   (|
22599    ("subject" "Gnus")
22600    ("lines" 100 >)))
22601  1000)
22602 @end example
22603
22604 However, when he responds to things written by Reig Eigil Logge, you
22605 really don't want to read what he's written:
22606
22607 @example
22608 ((&
22609   ("from" "Lars Ingebrigtsen")
22610   (1- ("from" "Reig Eigil Logge")))
22611  -100000)
22612 @end example
22613
22614 Everybody that follows up Redmondo when he writes about disappearing
22615 socks should have their scores raised, but only when they talk about
22616 white socks.  However, when Lars talks about socks, it's usually not
22617 very interesting:
22618
22619 @example
22620 ((&
22621   (1-
22622    (&
22623     ("from" "redmondo@@.*no" r)
22624     ("body" "disappearing.*socks" t)))
22625   (! ("from" "Lars Ingebrigtsen"))
22626   ("body" "white.*socks"))
22627  1000)
22628 @end example
22629
22630 Suppose you're reading a high volume group and you're only interested
22631 in replies. The plan is to score down all articles that don't have
22632 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
22633 parents of articles that have subjects that begin with reply marks.
22634
22635 @example
22636 ((! ("subject" "re:\\|fwd?:" r))
22637   -200)
22638 ((1- ("subject" "re:\\|fwd?:" r))
22639   200)
22640 @end example
22641
22642 The possibilities are endless.
22643
22644 @node Advanced Scoring Tips
22645 @subsection Advanced Scoring Tips
22646
22647 The @code{&} and @code{|} logical operators do short-circuit logic.
22648 That is, they stop processing their arguments when it's clear what the
22649 result of the operation will be.  For instance, if one of the arguments
22650 of an @code{&} evaluates to @code{false}, there's no point in evaluating
22651 the rest of the arguments.  This means that you should put slow matches
22652 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
22653 @samp{subject}) first.
22654
22655 The indirection arguments (@code{1-} and so on) will make their
22656 arguments work on previous generations of the thread.  If you say
22657 something like:
22658
22659 @example
22660 ...
22661 (1-
22662  (1-
22663   ("from" "lars")))
22664 ...
22665 @end example
22666
22667 Then that means ``score on the from header of the grandparent of the
22668 current article''.  An indirection is quite fast, but it's better to say:
22669
22670 @example
22671 (1-
22672  (&
22673   ("from" "Lars")
22674   ("subject" "Gnus")))
22675 @end example
22676
22677 than it is to say:
22678
22679 @example
22680 (&
22681  (1- ("from" "Lars"))
22682  (1- ("subject" "Gnus")))
22683 @end example
22684
22685
22686 @node Score Decays
22687 @section Score Decays
22688 @cindex score decays
22689 @cindex decays
22690
22691 You may find that your scores have a tendency to grow without
22692 bounds, especially if you're using adaptive scoring.  If scores get too
22693 big, they lose all meaning---they simply max out and it's difficult to
22694 use them in any sensible way.
22695
22696 @vindex gnus-decay-scores
22697 @findex gnus-decay-score
22698 @vindex gnus-decay-score-function
22699 Gnus provides a mechanism for decaying scores to help with this problem.
22700 When score files are loaded and @code{gnus-decay-scores} is
22701 non-@code{nil}, Gnus will run the score files through the decaying
22702 mechanism thereby lowering the scores of all non-permanent score rules.
22703 If @code{gnus-decay-scores} is a regexp, only score files matching this
22704 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
22705 @emph{adaptive} score files should be decayed.  The decay itself if
22706 performed by the @code{gnus-decay-score-function} function, which is
22707 @code{gnus-decay-score} by default.  Here's the definition of that
22708 function:
22709
22710 @lisp
22711 (defun gnus-decay-score (score)
22712   "Decay SCORE according to `gnus-score-decay-constant'
22713 and `gnus-score-decay-scale'."
22714   (let ((n (- score
22715               (* (if (< score 0) -1 1)
22716                  (min (abs score)
22717                       (max gnus-score-decay-constant
22718                            (* (abs score)
22719                               gnus-score-decay-scale)))))))
22720     (if (and (featurep 'xemacs)
22721              ;; XEmacs' floor can handle only the floating point
22722              ;; number below the half of the maximum integer.
22723              (> (abs n) (lsh -1 -2)))
22724         (string-to-number
22725          (car (split-string (number-to-string n) "\\.")))
22726       (floor n))))
22727 @end lisp
22728
22729 @vindex gnus-score-decay-scale
22730 @vindex gnus-score-decay-constant
22731 @code{gnus-score-decay-constant} is 3 by default and
22732 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
22733
22734 @enumerate
22735 @item
22736 Scores between -3 and 3 will be set to 0 when this function is called.
22737
22738 @item
22739 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22740
22741 @item
22742 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22743 score.
22744 @end enumerate
22745
22746 If you don't like this decay function, write your own.  It is called
22747 with the score to be decayed as its only parameter, and it should return
22748 the new score, which should be an integer.
22749
22750 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22751 four days, Gnus will decay the scores four times, for instance.
22752
22753 @iftex
22754 @iflatex
22755 @chapter Message
22756 @include message.texi
22757 @chapter Emacs MIME
22758 @include emacs-mime.texi
22759 @chapter Sieve
22760 @include sieve.texi
22761 @chapter PGG
22762 @include pgg.texi
22763 @chapter SASL
22764 @include sasl.texi
22765 @end iflatex
22766 @end iftex
22767
22768 @node Various
22769 @chapter Various
22770
22771 @menu
22772 * Process/Prefix::              A convention used by many treatment commands.
22773 * Interactive::                 Making Gnus ask you many questions.
22774 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22775 * Formatting Variables::        You can specify what buffers should look like.
22776 * Window Layout::               Configuring the Gnus buffer windows.
22777 * Faces and Fonts::             How to change how faces look.
22778 * Compilation::                 How to speed Gnus up.
22779 * Mode Lines::                  Displaying information in the mode lines.
22780 * Highlighting and Menus::      Making buffers look all nice and cozy.
22781 * Buttons::                     Get tendinitis in ten easy steps!
22782 * Daemons::                     Gnus can do things behind your back.
22783 * NoCeM::                       How to avoid spam and other fatty foods.
22784 * Undo::                        Some actions can be undone.
22785 * Predicate Specifiers::        Specifying predicates.
22786 * Moderation::                  What to do if you're a moderator.
22787 * Fetching a Group::            Starting Gnus just to read a group.
22788 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22789 * Fuzzy Matching::              What's the big fuzz?
22790 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22791 * Spam Package::                A package for filtering and processing spam.
22792 * The Gnus Registry::           A package for tracking messages by Message-ID.
22793 * Other modes::                 Interaction with other modes.
22794 * Various Various::             Things that are really various.
22795 @end menu
22796
22797
22798 @node Process/Prefix
22799 @section Process/Prefix
22800 @cindex process/prefix convention
22801
22802 Many functions, among them functions for moving, decoding and saving
22803 articles, use what is known as the @dfn{Process/Prefix convention}.
22804
22805 This is a method for figuring out what articles the user wants the
22806 command to be performed on.
22807
22808 It goes like this:
22809
22810 If the numeric prefix is N, perform the operation on the next N
22811 articles, starting with the current one.  If the numeric prefix is
22812 negative, perform the operation on the previous N articles, starting
22813 with the current one.
22814
22815 @vindex transient-mark-mode
22816 If @code{transient-mark-mode} in non-@code{nil} and the region is
22817 active, all articles in the region will be worked upon.
22818
22819 If there is no numeric prefix, but some articles are marked with the
22820 process mark, perform the operation on the articles marked with
22821 the process mark.
22822
22823 If there is neither a numeric prefix nor any articles marked with the
22824 process mark, just perform the operation on the current article.
22825
22826 Quite simple, really, but it needs to be made clear so that surprises
22827 are avoided.
22828
22829 Commands that react to the process mark will push the current list of
22830 process marked articles onto a stack and will then clear all process
22831 marked articles.  You can restore the previous configuration with the
22832 @kbd{M P y} command (@pxref{Setting Process Marks}).
22833
22834 @vindex gnus-summary-goto-unread
22835 One thing that seems to shock & horrify lots of people is that, for
22836 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22837 Since each @kbd{d} (which marks the current article as read) by default
22838 goes to the next unread article after marking, this means that @kbd{3 d}
22839 will mark the next three unread articles as read, no matter what the
22840 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22841 @code{nil} for a more straightforward action.
22842
22843 Many commands do not use the process/prefix convention.  All commands
22844 that do explicitly say so in this manual.  To apply the process/prefix
22845 convention to commands that do not use it, you can use the @kbd{M-&}
22846 command.  For instance, to mark all the articles in the group as
22847 expirable, you could say @kbd{M P b M-& E}.
22848
22849
22850 @node Interactive
22851 @section Interactive
22852 @cindex interaction
22853
22854 @table @code
22855
22856 @item gnus-novice-user
22857 @vindex gnus-novice-user
22858 If this variable is non-@code{nil}, you are either a newcomer to the
22859 World of Usenet, or you are very cautious, which is a nice thing to be,
22860 really.  You will be given questions of the type ``Are you sure you want
22861 to do this?'' before doing anything dangerous.  This is @code{t} by
22862 default.
22863
22864 @item gnus-expert-user
22865 @vindex gnus-expert-user
22866 If this variable is non-@code{nil}, you will seldom be asked any
22867 questions by Gnus.  It will simply assume you know what you're doing,
22868 no matter how strange.  For example, quitting Gnus, exiting a group
22869 without an update, catching up with a group, deleting expired
22870 articles, and replying by mail to a news message will not require
22871 confirmation.
22872
22873 @item gnus-interactive-catchup
22874 @vindex gnus-interactive-catchup
22875 Require confirmation before catching up a group if non-@code{nil}.  It
22876 is @code{t} by default.
22877
22878 @item gnus-interactive-exit
22879 @vindex gnus-interactive-exit
22880 Require confirmation before exiting Gnus.  This variable is @code{t} by
22881 default.
22882 @end table
22883
22884
22885 @node Symbolic Prefixes
22886 @section Symbolic Prefixes
22887 @cindex symbolic prefixes
22888
22889 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22890 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22891 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22892 rule of 900 to the current article.
22893
22894 This is all nice and well, but what if you want to give a command some
22895 additional information?  Well, what most commands do is interpret the
22896 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22897 doesn't want a backup file to be created when saving the current buffer,
22898 for instance.  But what if you want to save without making a backup
22899 file, and you want Emacs to flash lights and play a nice tune at the
22900 same time?  You can't, and you're probably perfectly happy that way.
22901
22902 @kindex M-i (Summary)
22903 @findex gnus-symbolic-argument
22904 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22905 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22906 character typed in is the value.  You can stack as many @kbd{M-i}
22907 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22908 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22909 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22910 @code{b}''.  You get the drift.
22911
22912 Typing in symbolic prefixes to commands that don't accept them doesn't
22913 hurt, but it doesn't do any good either.  Currently not many Gnus
22914 functions make use of the symbolic prefix.
22915
22916 If you're interested in how Gnus implements this, @pxref{Extended
22917 Interactive}.
22918
22919
22920 @node Formatting Variables
22921 @section Formatting Variables
22922 @cindex formatting variables
22923
22924 Throughout this manual you've probably noticed lots of variables called
22925 things like @code{gnus-group-line-format} and
22926 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22927 output lines in the various buffers.  There's quite a lot of them.
22928 Fortunately, they all use the same syntax, so there's not that much to
22929 be annoyed by.
22930
22931 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22932 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22933 lots of percentages everywhere.
22934
22935 @menu
22936 * Formatting Basics::           A formatting variable is basically a format string.
22937 * Mode Line Formatting::        Some rules about mode line formatting variables.
22938 * Advanced Formatting::         Modifying output in various ways.
22939 * User-Defined Specs::          Having Gnus call your own functions.
22940 * Formatting Fonts::            Making the formatting look colorful and nice.
22941 * Positioning Point::           Moving point to a position after an operation.
22942 * Tabulation::                  Tabulating your output.
22943 * Wide Characters::             Dealing with wide characters.
22944 @end menu
22945
22946 Currently Gnus uses the following formatting variables:
22947 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22948 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22949 @code{gnus-group-mode-line-format},
22950 @code{gnus-summary-mode-line-format},
22951 @code{gnus-article-mode-line-format},
22952 @code{gnus-server-mode-line-format}, and
22953 @code{gnus-summary-pick-line-format}.
22954
22955 All these format variables can also be arbitrary elisp forms.  In that
22956 case, they will be @code{eval}ed to insert the required lines.
22957
22958 @kindex M-x gnus-update-format
22959 @findex gnus-update-format
22960 Gnus includes a command to help you while creating your own format
22961 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22962 update the spec in question and pop you to a buffer where you can
22963 examine the resulting Lisp code to be run to generate the line.
22964
22965
22966
22967 @node Formatting Basics
22968 @subsection Formatting Basics
22969
22970 Each @samp{%} element will be replaced by some string or other when the
22971 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22972 spec, and pad with spaces to get a 5-character field''.
22973
22974 As with normal C and Emacs Lisp formatting strings, the numerical
22975 modifier between the @samp{%} and the formatting type character will
22976 @dfn{pad} the output so that it is always at least that long.
22977 @samp{%5y} will make the field always (at least) five characters wide by
22978 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22979 the right instead.
22980
22981 You may also wish to limit the length of the field to protect against
22982 particularly wide values.  For that you can say @samp{%4,6y}, which
22983 means that the field will never be more than 6 characters wide and never
22984 less than 4 characters wide.
22985
22986 Also Gnus supports some extended format specifications, such as
22987 @samp{%&user-date;}.
22988
22989
22990 @node Mode Line Formatting
22991 @subsection Mode Line Formatting
22992
22993 Mode line formatting variables (e.g.,
22994 @code{gnus-summary-mode-line-format}) follow the same rules as other,
22995 buffer line oriented formatting variables (@pxref{Formatting Basics})
22996 with the following two differences:
22997
22998 @enumerate
22999
23000 @item
23001 There must be no newline (@samp{\n}) at the end.
23002
23003 @item
23004 The special @samp{%%b} spec can be used to display the buffer name.
23005 Well, it's no spec at all, really---@samp{%%} is just a way to quote
23006 @samp{%} to allow it to pass through the formatting machinery unmangled,
23007 so that Emacs receives @samp{%b}, which is something the Emacs mode line
23008 display interprets to mean ``show the buffer name''.  For a full list of
23009 mode line specs Emacs understands, see the documentation of the
23010 @code{mode-line-format} variable.
23011
23012 @end enumerate
23013
23014
23015 @node Advanced Formatting
23016 @subsection Advanced Formatting
23017
23018 It is frequently useful to post-process the fields in some way.
23019 Padding, limiting, cutting off parts and suppressing certain values can
23020 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
23021 look like @samp{%~(cut 3)~(ignore "0")y}.
23022
23023 These are the valid modifiers:
23024
23025 @table @code
23026 @item pad
23027 @itemx pad-left
23028 Pad the field to the left with spaces until it reaches the required
23029 length.
23030
23031 @item pad-right
23032 Pad the field to the right with spaces until it reaches the required
23033 length.
23034
23035 @item max
23036 @itemx max-left
23037 Cut off characters from the left until it reaches the specified length.
23038
23039 @item max-right
23040 Cut off characters from the right until it reaches the specified
23041 length.
23042
23043 @item cut
23044 @itemx cut-left
23045 Cut off the specified number of characters from the left.
23046
23047 @item cut-right
23048 Cut off the specified number of characters from the right.
23049
23050 @item ignore
23051 Return an empty string if the field is equal to the specified value.
23052
23053 @item form
23054 Use the specified form as the field value when the @samp{@@} spec is
23055 used.
23056
23057 Here's an example:
23058
23059 @lisp
23060 "~(form (current-time-string))@@"
23061 @end lisp
23062
23063 @end table
23064
23065 Let's take an example.  The @samp{%o} spec in the summary mode lines
23066 will return a date in compact ISO8601 format---@samp{19960809T230410}.
23067 This is quite a mouthful, so we want to shave off the century number and
23068 the time, leaving us with a six-character date.  That would be
23069 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
23070 maxing, and we need the padding to ensure that the date is never less
23071 than 6 characters to make it look nice in columns.)
23072
23073 Ignoring is done first; then cutting; then maxing; and then as the very
23074 last operation, padding.
23075
23076 If you use lots of these advanced thingies, you'll find that Gnus gets
23077 quite slow.  This can be helped enormously by running @kbd{M-x
23078 gnus-compile} when you are satisfied with the look of your lines.
23079 @xref{Compilation}.
23080
23081
23082 @node User-Defined Specs
23083 @subsection User-Defined Specs
23084
23085 All the specs allow for inserting user defined specifiers---@samp{u}.
23086 The next character in the format string should be a letter.  Gnus
23087 will call the function @code{gnus-user-format-function-}@samp{X}, where
23088 @samp{X} is the letter following @samp{%u}.  The function will be passed
23089 a single parameter---what the parameter means depends on what buffer
23090 it's being called from.  The function should return a string, which will
23091 be inserted into the buffer just like information from any other
23092 specifier.  This function may also be called with dummy values, so it
23093 should protect against that.
23094
23095 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
23096 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
23097
23098 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
23099 much the same without defining new functions.  Here's an example:
23100 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
23101 given here will be evaluated to yield the current line number, and then
23102 inserted.
23103
23104
23105 @node Formatting Fonts
23106 @subsection Formatting Fonts
23107
23108 @cindex %(, %)
23109 @vindex gnus-mouse-face
23110 There are specs for highlighting, and these are shared by all the format
23111 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
23112 the special @code{mouse-face} property set, which means that it will be
23113 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
23114 over it.
23115
23116 @cindex %@{, %@}
23117 @vindex gnus-face-0
23118 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
23119 normal faces set using @code{gnus-face-0}, which is @code{bold} by
23120 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
23121 and so on.  Create as many faces as you wish.  The same goes for the
23122 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
23123 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
23124
23125 @cindex %<<, %>>, guillemets
23126 @c @cindex %<<, %>>, %«, %», guillemets
23127 @vindex gnus-balloon-face-0
23128 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
23129 special @code{balloon-help} property set to
23130 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
23131 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
23132 variables should be either strings or symbols naming functions that
23133 return a string.  When the mouse passes over text with this property
23134 set, a balloon window will appear and display the string.  Please
23135 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
23136 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
23137 XEmacs) for more information on this.  (For technical reasons, the
23138 guillemets have been approximated as @samp{<<} and @samp{>>} in this
23139 paragraph.)
23140
23141 Here's an alternative recipe for the group buffer:
23142
23143 @lisp
23144 ;; @r{Create three face types.}
23145 (setq gnus-face-1 'bold)
23146 (setq gnus-face-3 'italic)
23147
23148 ;; @r{We want the article count to be in}
23149 ;; @r{a bold and green face.  So we create}
23150 ;; @r{a new face called @code{my-green-bold}.}
23151 (copy-face 'bold 'my-green-bold)
23152 ;; @r{Set the color.}
23153 (set-face-foreground 'my-green-bold "ForestGreen")
23154 (setq gnus-face-2 'my-green-bold)
23155
23156 ;; @r{Set the new & fancy format.}
23157 (setq gnus-group-line-format
23158       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
23159 @end lisp
23160
23161 I'm sure you'll be able to use this scheme to create totally unreadable
23162 and extremely vulgar displays.  Have fun!
23163
23164 Note that the @samp{%(} specs (and friends) do not make any sense on the
23165 mode-line variables.
23166
23167 @node Positioning Point
23168 @subsection Positioning Point
23169
23170 Gnus usually moves point to a pre-defined place on each line in most
23171 buffers.  By default, point move to the first colon character on the
23172 line.  You can customize this behavior in three different ways.
23173
23174 You can move the colon character to somewhere else on the line.
23175
23176 @findex gnus-goto-colon
23177 You can redefine the function that moves the point to the colon.  The
23178 function is called @code{gnus-goto-colon}.
23179
23180 But perhaps the most convenient way to deal with this, if you don't want
23181 to have a colon in your line, is to use the @samp{%*} specifier.  If you
23182 put a @samp{%*} somewhere in your format line definition, Gnus will
23183 place point there.
23184
23185
23186 @node Tabulation
23187 @subsection Tabulation
23188
23189 You can usually line up your displays by padding and cutting your
23190 strings.  However, when combining various strings of different size, it
23191 can often be more convenient to just output the strings, and then worry
23192 about lining up the following text afterwards.
23193
23194 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
23195 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
23196
23197 @samp{%50=} will insert space characters to pad the line up to column
23198 50.  If the text is already past column 50, nothing will be inserted.
23199 This is the soft tabulator.
23200
23201 @samp{%-50=} will insert space characters to pad the line up to column
23202 50.  If the text is already past column 50, the excess text past column
23203 50 will be removed.  This is the hard tabulator.
23204
23205
23206 @node Wide Characters
23207 @subsection Wide Characters
23208
23209 Fixed width fonts in most countries have characters of the same width.
23210 Some countries, however, use Latin characters mixed with wider
23211 characters---most notable East Asian countries.
23212
23213 The problem is that when formatting, Gnus assumes that if a string is 10
23214 characters wide, it'll be 10 Latin characters wide on the screen.  In
23215 these countries, that's not true.
23216
23217 @vindex gnus-use-correct-string-widths
23218 To help fix this, you can set @code{gnus-use-correct-string-widths} to
23219 @code{t}.  This makes buffer generation slower, but the results will be
23220 prettier.  The default value under XEmacs is @code{t} but @code{nil}
23221 for Emacs.
23222
23223
23224 @node Window Layout
23225 @section Window Layout
23226 @cindex window layout
23227
23228 No, there's nothing here about X, so be quiet.
23229
23230 @vindex gnus-use-full-window
23231 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
23232 other windows and occupy the entire Emacs screen by itself.  It is
23233 @code{t} by default.
23234
23235 Setting this variable to @code{nil} kinda works, but there are
23236 glitches.  Use at your own peril.
23237
23238 @vindex gnus-buffer-configuration
23239 @code{gnus-buffer-configuration} describes how much space each Gnus
23240 buffer should be given.  Here's an excerpt of this variable:
23241
23242 @lisp
23243 ((group (vertical 1.0 (group 1.0 point)
23244                       (if gnus-carpal (group-carpal 4))))
23245  (article (vertical 1.0 (summary 0.25 point)
23246                         (article 1.0))))
23247 @end lisp
23248
23249 This is an alist.  The @dfn{key} is a symbol that names some action or
23250 other.  For instance, when displaying the group buffer, the window
23251 configuration function will use @code{group} as the key.  A full list of
23252 possible names is listed below.
23253
23254 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
23255 should occupy.  To take the @code{article} split as an example -
23256
23257 @lisp
23258 (article (vertical 1.0 (summary 0.25 point)
23259                        (article 1.0)))
23260 @end lisp
23261
23262 This @dfn{split} says that the summary buffer should occupy 25% of upper
23263 half of the screen, and that it is placed over the article buffer.  As
23264 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
23265 reaching for that calculator there).  However, the special number
23266 @code{1.0} is used to signal that this buffer should soak up all the
23267 rest of the space available after the rest of the buffers have taken
23268 whatever they need.  There should be only one buffer with the @code{1.0}
23269 size spec per split.
23270
23271 Point will be put in the buffer that has the optional third element
23272 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
23273 split where the tag @code{frame-focus} is a member (i.e. is the third or
23274 fourth element in the list, depending on whether the @code{point} tag is
23275 present) gets focus.
23276
23277 Here's a more complicated example:
23278
23279 @lisp
23280 (article (vertical 1.0 (group 4)
23281                        (summary 0.25 point)
23282                        (if gnus-carpal (summary-carpal 4))
23283                        (article 1.0)))
23284 @end lisp
23285
23286 If the size spec is an integer instead of a floating point number,
23287 then that number will be used to say how many lines a buffer should
23288 occupy, not a percentage.
23289
23290 If the @dfn{split} looks like something that can be @code{eval}ed (to be
23291 precise---if the @code{car} of the split is a function or a subr), this
23292 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
23293 be used as a split.  This means that there will be three buffers if
23294 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
23295 is non-@code{nil}.
23296
23297 Not complicated enough for you?  Well, try this on for size:
23298
23299 @lisp
23300 (article (horizontal 1.0
23301              (vertical 0.5
23302                  (group 1.0)
23303                  (gnus-carpal 4))
23304              (vertical 1.0
23305                  (summary 0.25 point)
23306                  (summary-carpal 4)
23307                  (article 1.0))))
23308 @end lisp
23309
23310 Whoops.  Two buffers with the mystery 100% tag.  And what's that
23311 @code{horizontal} thingie?
23312
23313 If the first element in one of the split is @code{horizontal}, Gnus will
23314 split the window horizontally, giving you two windows side-by-side.
23315 Inside each of these strips you may carry on all you like in the normal
23316 fashion.  The number following @code{horizontal} says what percentage of
23317 the screen is to be given to this strip.
23318
23319 For each split, there @emph{must} be one element that has the 100% tag.
23320 The splitting is never accurate, and this buffer will eat any leftover
23321 lines from the splits.
23322
23323 To be slightly more formal, here's a definition of what a valid split
23324 may look like:
23325
23326 @example
23327 @group
23328 split      = frame | horizontal | vertical | buffer | form
23329 frame      = "(frame " size *split ")"
23330 horizontal = "(horizontal " size *split ")"
23331 vertical   = "(vertical " size *split ")"
23332 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
23333 size       = number | frame-params
23334 buf-name   = group | article | summary ...
23335 @end group
23336 @end example
23337
23338 The limitations are that the @code{frame} split can only appear as the
23339 top-level split.  @var{form} should be an Emacs Lisp form that should
23340 return a valid split.  We see that each split is fully recursive, and
23341 may contain any number of @code{vertical} and @code{horizontal} splits.
23342
23343 @vindex gnus-window-min-width
23344 @vindex gnus-window-min-height
23345 @cindex window height
23346 @cindex window width
23347 Finding the right sizes can be a bit complicated.  No window may be less
23348 than @code{gnus-window-min-height} (default 1) characters high, and all
23349 windows must be at least @code{gnus-window-min-width} (default 1)
23350 characters wide.  Gnus will try to enforce this before applying the
23351 splits.  If you want to use the normal Emacs window width/height limit,
23352 you can just set these two variables to @code{nil}.
23353
23354 If you're not familiar with Emacs terminology, @code{horizontal} and
23355 @code{vertical} splits may work the opposite way of what you'd expect.
23356 Windows inside a @code{horizontal} split are shown side-by-side, and
23357 windows within a @code{vertical} split are shown above each other.
23358
23359 @findex gnus-configure-frame
23360 If you want to experiment with window placement, a good tip is to call
23361 @code{gnus-configure-frame} directly with a split.  This is the function
23362 that does all the real work when splitting buffers.  Below is a pretty
23363 nonsensical configuration with 5 windows; two for the group buffer and
23364 three for the article buffer.  (I said it was nonsensical.)  If you
23365 @code{eval} the statement below, you can get an idea of how that would
23366 look straight away, without going through the normal Gnus channels.
23367 Play with it until you're satisfied, and then use
23368 @code{gnus-add-configuration} to add your new creation to the buffer
23369 configuration list.
23370
23371 @lisp
23372 (gnus-configure-frame
23373  '(horizontal 1.0
23374     (vertical 10
23375       (group 1.0)
23376       (article 0.3 point))
23377     (vertical 1.0
23378       (article 1.0)
23379       (horizontal 4
23380         (group 1.0)
23381         (article 10)))))
23382 @end lisp
23383
23384 You might want to have several frames as well.  No prob---just use the
23385 @code{frame} split:
23386
23387 @lisp
23388 (gnus-configure-frame
23389  '(frame 1.0
23390          (vertical 1.0
23391                    (summary 0.25 point frame-focus)
23392                    (article 1.0))
23393          (vertical ((height . 5) (width . 15)
23394                     (user-position . t)
23395                     (left . -1) (top . 1))
23396                    (picon 1.0))))
23397
23398 @end lisp
23399
23400 This split will result in the familiar summary/article window
23401 configuration in the first (or ``main'') frame, while a small additional
23402 frame will be created where picons will be shown.  As you can see,
23403 instead of the normal @code{1.0} top-level spec, each additional split
23404 should have a frame parameter alist as the size spec.
23405 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
23406 Reference Manual}.  Under XEmacs, a frame property list will be
23407 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
23408 is such a plist.
23409 The list of all possible keys for @code{gnus-buffer-configuration} can
23410 be found in its default value.
23411
23412 Note that the @code{message} key is used for both
23413 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
23414 it is desirable to distinguish between the two, something like this
23415 might be used:
23416
23417 @lisp
23418 (message (horizontal 1.0
23419                      (vertical 1.0 (message 1.0 point))
23420                      (vertical 0.24
23421                                (if (buffer-live-p gnus-summary-buffer)
23422                                    '(summary 0.5))
23423                                (group 1.0))))
23424 @end lisp
23425
23426 One common desire for a multiple frame split is to have a separate frame
23427 for composing mail and news while leaving the original frame intact.  To
23428 accomplish that, something like the following can be done:
23429
23430 @lisp
23431 (message
23432   (frame 1.0
23433          (if (not (buffer-live-p gnus-summary-buffer))
23434              (car (cdr (assoc 'group gnus-buffer-configuration)))
23435            (car (cdr (assoc 'summary gnus-buffer-configuration))))
23436          (vertical ((user-position . t) (top . 1) (left . 1)
23437                     (name . "Message"))
23438                    (message 1.0 point))))
23439 @end lisp
23440
23441 @findex gnus-add-configuration
23442 Since the @code{gnus-buffer-configuration} variable is so long and
23443 complicated, there's a function you can use to ease changing the config
23444 of a single setting: @code{gnus-add-configuration}.  If, for instance,
23445 you want to change the @code{article} setting, you could say:
23446
23447 @lisp
23448 (gnus-add-configuration
23449  '(article (vertical 1.0
23450                (group 4)
23451                (summary .25 point)
23452                (article 1.0))))
23453 @end lisp
23454
23455 You'd typically stick these @code{gnus-add-configuration} calls in your
23456 @file{~/.gnus.el} file or in some startup hook---they should be run after
23457 Gnus has been loaded.
23458
23459 @vindex gnus-always-force-window-configuration
23460 If all windows mentioned in the configuration are already visible, Gnus
23461 won't change the window configuration.  If you always want to force the
23462 ``right'' window configuration, you can set
23463 @code{gnus-always-force-window-configuration} to non-@code{nil}.
23464
23465 If you're using tree displays (@pxref{Tree Display}), and the tree
23466 window is displayed vertically next to another window, you may also want
23467 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
23468 windows resized.
23469
23470 @subsection Example Window Configurations
23471
23472 @itemize @bullet
23473 @item
23474 Narrow left hand side occupied by group buffer.  Right hand side split
23475 between summary buffer (top one-sixth) and article buffer (bottom).
23476
23477 @ifinfo
23478 @example
23479 +---+---------+
23480 | G | Summary |
23481 | r +---------+
23482 | o |         |
23483 | u | Article |
23484 | p |         |
23485 +---+---------+
23486 @end example
23487 @end ifinfo
23488
23489 @lisp
23490 (gnus-add-configuration
23491  '(article
23492    (horizontal 1.0
23493                (vertical 25 (group 1.0))
23494                (vertical 1.0
23495                          (summary 0.16 point)
23496                          (article 1.0)))))
23497
23498 (gnus-add-configuration
23499  '(summary
23500    (horizontal 1.0
23501                (vertical 25 (group 1.0))
23502                (vertical 1.0 (summary 1.0 point)))))
23503 @end lisp
23504
23505 @end itemize
23506
23507
23508 @node Faces and Fonts
23509 @section Faces and Fonts
23510 @cindex faces
23511 @cindex fonts
23512 @cindex colors
23513
23514 Fiddling with fonts and faces used to be very difficult, but these days
23515 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
23516 the face you want to alter, and alter it via the standard Customize
23517 interface.
23518
23519
23520 @node Compilation
23521 @section Compilation
23522 @cindex compilation
23523 @cindex byte-compilation
23524
23525 @findex gnus-compile
23526
23527 Remember all those line format specification variables?
23528 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
23529 on.  Now, Gnus will of course heed whatever these variables are, but,
23530 unfortunately, changing them will mean a quite significant slow-down.
23531 (The default values of these variables have byte-compiled functions
23532 associated with them, while the user-generated versions do not, of
23533 course.)
23534
23535 To help with this, you can run @kbd{M-x gnus-compile} after you've
23536 fiddled around with the variables and feel that you're (kind of)
23537 satisfied.  This will result in the new specs being byte-compiled, and
23538 you'll get top speed again.  Gnus will save these compiled specs in the
23539 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
23540 this function, though---you should compile them yourself by sticking
23541 them into the @file{~/.gnus.el} file and byte-compiling that file.)
23542
23543
23544 @node Mode Lines
23545 @section Mode Lines
23546 @cindex mode lines
23547
23548 @vindex gnus-updated-mode-lines
23549 @code{gnus-updated-mode-lines} says what buffers should keep their mode
23550 lines updated.  It is a list of symbols.  Supported symbols include
23551 @code{group}, @code{article}, @code{summary}, @code{server},
23552 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
23553 Gnus will keep that mode line updated with information that may be
23554 pertinent.  If this variable is @code{nil}, screen refresh may be
23555 quicker.
23556
23557 @cindex display-time
23558
23559 @vindex gnus-mode-non-string-length
23560 By default, Gnus displays information on the current article in the mode
23561 lines of the summary and article buffers.  The information Gnus wishes
23562 to display (e.g. the subject of the article) is often longer than the
23563 mode lines, and therefore have to be cut off at some point.  The
23564 @code{gnus-mode-non-string-length} variable says how long the other
23565 elements on the line is (i.e., the non-info part).  If you put
23566 additional elements on the mode line (e.g. a clock), you should modify
23567 this variable:
23568
23569 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
23570 @lisp
23571 (add-hook 'display-time-hook
23572           (lambda () (setq gnus-mode-non-string-length
23573                            (+ 21
23574                               (if line-number-mode 5 0)
23575                               (if column-number-mode 4 0)
23576                               (length display-time-string)))))
23577 @end lisp
23578
23579 If this variable is @code{nil} (which is the default), the mode line
23580 strings won't be chopped off, and they won't be padded either.  Note
23581 that the default is unlikely to be desirable, as even the percentage
23582 complete in the buffer may be crowded off the mode line; the user should
23583 configure this variable appropriately for her configuration.
23584
23585
23586 @node Highlighting and Menus
23587 @section Highlighting and Menus
23588 @cindex visual
23589 @cindex highlighting
23590 @cindex menus
23591
23592 @vindex gnus-visual
23593 The @code{gnus-visual} variable controls most of the Gnus-prettifying
23594 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
23595 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
23596 file.
23597
23598 This variable can be a list of visual properties that are enabled.  The
23599 following elements are valid, and are all included by default:
23600
23601 @table @code
23602 @item group-highlight
23603 Do highlights in the group buffer.
23604 @item summary-highlight
23605 Do highlights in the summary buffer.
23606 @item article-highlight
23607 Do highlights in the article buffer.
23608 @item highlight
23609 Turn on highlighting in all buffers.
23610 @item group-menu
23611 Create menus in the group buffer.
23612 @item summary-menu
23613 Create menus in the summary buffers.
23614 @item article-menu
23615 Create menus in the article buffer.
23616 @item browse-menu
23617 Create menus in the browse buffer.
23618 @item server-menu
23619 Create menus in the server buffer.
23620 @item score-menu
23621 Create menus in the score buffers.
23622 @item menu
23623 Create menus in all buffers.
23624 @end table
23625
23626 So if you only want highlighting in the article buffer and menus in all
23627 buffers, you could say something like:
23628
23629 @lisp
23630 (setq gnus-visual '(article-highlight menu))
23631 @end lisp
23632
23633 If you want highlighting only and no menus whatsoever, you'd say:
23634
23635 @lisp
23636 (setq gnus-visual '(highlight))
23637 @end lisp
23638
23639 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
23640 in all Gnus buffers.
23641
23642 Other general variables that influence the look of all buffers include:
23643
23644 @table @code
23645 @item gnus-mouse-face
23646 @vindex gnus-mouse-face
23647 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
23648 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
23649
23650 @end table
23651
23652 There are hooks associated with the creation of all the different menus:
23653
23654 @table @code
23655
23656 @item gnus-article-menu-hook
23657 @vindex gnus-article-menu-hook
23658 Hook called after creating the article mode menu.
23659
23660 @item gnus-group-menu-hook
23661 @vindex gnus-group-menu-hook
23662 Hook called after creating the group mode menu.
23663
23664 @item gnus-summary-menu-hook
23665 @vindex gnus-summary-menu-hook
23666 Hook called after creating the summary mode menu.
23667
23668 @item gnus-server-menu-hook
23669 @vindex gnus-server-menu-hook
23670 Hook called after creating the server mode menu.
23671
23672 @item gnus-browse-menu-hook
23673 @vindex gnus-browse-menu-hook
23674 Hook called after creating the browse mode menu.
23675
23676 @item gnus-score-menu-hook
23677 @vindex gnus-score-menu-hook
23678 Hook called after creating the score mode menu.
23679
23680 @end table
23681
23682
23683 @node Buttons
23684 @section Buttons
23685 @cindex buttons
23686 @cindex mouse
23687 @cindex click
23688
23689 Those new-fangled @dfn{mouse} contraptions is very popular with the
23690 young, hep kids who don't want to learn the proper way to do things
23691 these days.  Why, I remember way back in the summer of '89, when I was
23692 using Emacs on a Tops 20 system.  Three hundred users on one single
23693 machine, and every user was running Simula compilers.  Bah!
23694
23695 Right.
23696
23697 @vindex gnus-carpal
23698 Well, you can make Gnus display bufferfuls of buttons you can click to
23699 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
23700 really.  Tell the chiropractor I sent you.
23701
23702
23703 @table @code
23704
23705 @item gnus-carpal-mode-hook
23706 @vindex gnus-carpal-mode-hook
23707 Hook run in all carpal mode buffers.
23708
23709 @item gnus-carpal-button-face
23710 @vindex gnus-carpal-button-face
23711 Face used on buttons.
23712
23713 @item gnus-carpal-header-face
23714 @vindex gnus-carpal-header-face
23715 Face used on carpal buffer headers.
23716
23717 @item gnus-carpal-group-buffer-buttons
23718 @vindex gnus-carpal-group-buffer-buttons
23719 Buttons in the group buffer.
23720
23721 @item gnus-carpal-summary-buffer-buttons
23722 @vindex gnus-carpal-summary-buffer-buttons
23723 Buttons in the summary buffer.
23724
23725 @item gnus-carpal-server-buffer-buttons
23726 @vindex gnus-carpal-server-buffer-buttons
23727 Buttons in the server buffer.
23728
23729 @item gnus-carpal-browse-buffer-buttons
23730 @vindex gnus-carpal-browse-buffer-buttons
23731 Buttons in the browse buffer.
23732 @end table
23733
23734 All the @code{buttons} variables are lists.  The elements in these list
23735 are either cons cells where the @code{car} contains a text to be displayed and
23736 the @code{cdr} contains a function symbol, or a simple string.
23737
23738
23739 @node Daemons
23740 @section Daemons
23741 @cindex demons
23742 @cindex daemons
23743
23744 Gnus, being larger than any program ever written (allegedly), does lots
23745 of strange stuff that you may wish to have done while you're not
23746 present.  For instance, you may want it to check for new mail once in a
23747 while.  Or you may want it to close down all connections to all servers
23748 when you leave Emacs idle.  And stuff like that.
23749
23750 Gnus will let you do stuff like that by defining various
23751 @dfn{handlers}.  Each handler consists of three elements:  A
23752 @var{function}, a @var{time}, and an @var{idle} parameter.
23753
23754 Here's an example of a handler that closes connections when Emacs has
23755 been idle for thirty minutes:
23756
23757 @lisp
23758 (gnus-demon-close-connections nil 30)
23759 @end lisp
23760
23761 Here's a handler that scans for @acronym{PGP} headers every hour when
23762 Emacs is idle:
23763
23764 @lisp
23765 (gnus-demon-scan-pgp 60 t)
23766 @end lisp
23767
23768 This @var{time} parameter and that @var{idle} parameter work together
23769 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23770 @code{nil}, then the function will be called every @var{time} minutes.
23771
23772 If @var{idle} is @code{t}, then the function will be called after
23773 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23774 the function will never be called.  But once Emacs goes idle, the
23775 function will be called every @var{time} minutes.
23776
23777 If @var{idle} is a number and @var{time} is a number, the function will
23778 be called every @var{time} minutes only when Emacs has been idle for
23779 @var{idle} minutes.
23780
23781 If @var{idle} is a number and @var{time} is @code{nil}, the function
23782 will be called once every time Emacs has been idle for @var{idle}
23783 minutes.
23784
23785 And if @var{time} is a string, it should look like @samp{07:31}, and
23786 the function will then be called once every day somewhere near that
23787 time.  Modified by the @var{idle} parameter, of course.
23788
23789 @vindex gnus-demon-timestep
23790 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23791 seconds.  This is 60 by default.  If you change that variable,
23792 all the timings in the handlers will be affected.)
23793
23794 So, if you want to add a handler, you could put something like this in
23795 your @file{~/.gnus.el} file:
23796
23797 @findex gnus-demon-add-handler
23798 @lisp
23799 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23800 @end lisp
23801
23802 @findex gnus-demon-add-nocem
23803 @findex gnus-demon-add-scanmail
23804 @findex gnus-demon-add-rescan
23805 @findex gnus-demon-add-scan-timestamps
23806 @findex gnus-demon-add-disconnection
23807 Some ready-made functions to do this have been created:
23808 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23809 @code{gnus-demon-add-nntp-close-connection},
23810 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23811 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23812 @file{~/.gnus.el} if you want those abilities.
23813
23814 @findex gnus-demon-init
23815 @findex gnus-demon-cancel
23816 @vindex gnus-demon-handlers
23817 If you add handlers to @code{gnus-demon-handlers} directly, you should
23818 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23819 daemons, you can use the @code{gnus-demon-cancel} function.
23820
23821 Note that adding daemons can be pretty naughty if you over do it.  Adding
23822 functions that scan all news and mail from all servers every two seconds
23823 is a sure-fire way of getting booted off any respectable system.  So
23824 behave.
23825
23826
23827 @node NoCeM
23828 @section NoCeM
23829 @cindex nocem
23830 @cindex spam
23831
23832 @dfn{Spamming} is posting the same article lots and lots of times.
23833 Spamming is bad.  Spamming is evil.
23834
23835 Spamming is usually canceled within a day or so by various anti-spamming
23836 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23837 NoCeM is pronounced ``no see-'em'', and means what the name
23838 implies---these are messages that make the offending articles, like, go
23839 away.
23840
23841 What use are these NoCeM messages if the articles are canceled anyway?
23842 Some sites do not honor cancel messages and some sites just honor cancels
23843 from a select few people.  Then you may wish to make use of the NoCeM
23844 messages, which are distributed in the newsgroups
23845 @samp{news.lists.filters}, @samp{alt.nocem.misc}, etc.
23846
23847 Gnus can read and parse the messages in this group automatically, and
23848 this will make spam disappear.
23849
23850 There are some variables to customize, of course:
23851
23852 @table @code
23853 @item gnus-use-nocem
23854 @vindex gnus-use-nocem
23855 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23856 by default.
23857
23858 You can also set this variable to a positive number as a group level.
23859 In that case, Gnus scans NoCeM messages when checking new news if this
23860 value is not exceeding a group level that you specify as the prefix
23861 argument to some commands, e.g. @code{gnus},
23862 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23863 NoCeM messages if you specify a group level that is smaller than this
23864 value to those commands.  For example, if you use 1 or 2 on the mail
23865 groups and the levels on the news groups remain the default, 3 is the
23866 best choice.
23867
23868 @item gnus-nocem-groups
23869 @vindex gnus-nocem-groups
23870 Gnus will look for NoCeM messages in the groups in this list.  The
23871 default is
23872 @lisp
23873 ("news.lists.filters" "alt.nocem.misc")
23874 @end lisp
23875
23876 @item gnus-nocem-issuers
23877 @vindex gnus-nocem-issuers
23878 There are many people issuing NoCeM messages.  This list says what
23879 people you want to listen to.  The default is:
23880
23881 @lisp
23882 ("Adri Verhoef"
23883  "alba-nocem@@albasani.net"
23884  "bleachbot@@httrack.com"
23885  "news@@arcor-online.net"
23886  "news@@uni-berlin.de"
23887  "nocem@@arcor.de"
23888  "pgpmoose@@killfile.org"
23889  "xjsppl@@gmx.de")
23890 @end lisp
23891
23892 Known despammers that you can put in this list are listed at@*
23893 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23894
23895 You do not have to heed NoCeM messages from all these people---just the
23896 ones you want to listen to.  You also don't have to accept all NoCeM
23897 messages from the people you like.  Each NoCeM message has a @dfn{type}
23898 header that gives the message a (more or less, usually less) rigorous
23899 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23900 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23901 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23902 Each condition is either a string (which is a regexp that matches types
23903 you want to use) or a list on the form @code{(not @var{string})}, where
23904 @var{string} is a regexp that matches types you don't want to use.
23905
23906 For instance, if you want all NoCeM messages from Chris Lewis except his
23907 @samp{troll} messages, you'd say:
23908
23909 @lisp
23910 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23911 @end lisp
23912
23913 On the other hand, if you just want nothing but his @samp{spam} and
23914 @samp{spew} messages, you'd say:
23915
23916 @lisp
23917 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23918 @end lisp
23919
23920 The specs are applied left-to-right.
23921
23922
23923 @item gnus-nocem-verifyer
23924 @vindex gnus-nocem-verifyer
23925 @findex gnus-nocem-epg-verify
23926 @findex pgg-verify
23927 This should be a function for verifying that the NoCeM issuer is who she
23928 says she is.  This variable defaults to @code{gnus-nocem-epg-verify} if
23929 EasyPG is available, otherwise defaults to @code{pgg-verify}.  The
23930 function should return non-@code{nil} if the verification is successful,
23931 otherwise (including the case the NoCeM message was not signed) should
23932 return @code{nil}.  If this is too slow and you don't care for
23933 verification (which may be dangerous), you can set this variable to
23934 @code{nil}.
23935
23936 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23937 function.  While you can still use it, you can change it into
23938 @code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if
23939 you are willing to add the @acronym{PGP} public keys to GnuPG's keyring.
23940
23941 @item gnus-nocem-directory
23942 @vindex gnus-nocem-directory
23943 This is where Gnus will store its NoCeM cache files.  The default is@*
23944 @file{~/News/NoCeM/}.
23945
23946 @item gnus-nocem-expiry-wait
23947 @vindex gnus-nocem-expiry-wait
23948 The number of days before removing old NoCeM entries from the cache.
23949 The default is 15.  If you make it shorter Gnus will be faster, but you
23950 might then see old spam.
23951
23952 @item gnus-nocem-check-from
23953 @vindex gnus-nocem-check-from
23954 Non-@code{nil} means check for valid issuers in message bodies.
23955 Otherwise don't bother fetching articles unless their author matches a
23956 valid issuer; that is much faster if you are selective about the
23957 issuers.
23958
23959 @item gnus-nocem-check-article-limit
23960 @vindex gnus-nocem-check-article-limit
23961 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23962 group.  @code{nil} means no restriction.  NoCeM groups can be huge and
23963 very slow to process.
23964
23965 @end table
23966
23967 Using NoCeM could potentially be a memory hog.  If you have many living
23968 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23969 big.  If this is a problem, you should kill off all (or most) of your
23970 unsubscribed groups (@pxref{Subscription Commands}).
23971
23972
23973 @node Undo
23974 @section Undo
23975 @cindex undo
23976
23977 It is very useful to be able to undo actions one has done.  In normal
23978 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23979 In Gnus buffers, however, it isn't that simple.
23980
23981 The things Gnus displays in its buffer is of no value whatsoever to
23982 Gnus---it's all just data designed to look nice to the user.
23983 Killing a group in the group buffer with @kbd{C-k} makes the line
23984 disappear, but that's just a side-effect of the real action---the
23985 removal of the group in question from the internal Gnus structures.
23986 Undoing something like that can't be done by the normal Emacs
23987 @code{undo} function.
23988
23989 Gnus tries to remedy this somewhat by keeping track of what the user
23990 does and coming up with actions that would reverse the actions the user
23991 takes.  When the user then presses the @code{undo} key, Gnus will run
23992 the code to reverse the previous action, or the previous actions.
23993 However, not all actions are easily reversible, so Gnus currently offers
23994 a few key functions to be undoable.  These include killing groups,
23995 yanking groups, and changing the list of read articles of groups.
23996 That's it, really.  More functions may be added in the future, but each
23997 added function means an increase in data to be stored, so Gnus will
23998 never be totally undoable.
23999
24000 @findex gnus-undo-mode
24001 @vindex gnus-use-undo
24002 @findex gnus-undo
24003 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
24004 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
24005 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
24006 command, which should feel kinda like the normal Emacs @code{undo}
24007 command.
24008
24009
24010 @node Predicate Specifiers
24011 @section Predicate Specifiers
24012 @cindex predicate specifiers
24013
24014 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
24015 form that allows flexible specification of predicates without having
24016 to type all that much.
24017
24018 These specifiers are lists consisting of functions, symbols and lists.
24019
24020 Here's an example:
24021
24022 @lisp
24023 (or gnus-article-unseen-p
24024     gnus-article-unread-p)
24025 @end lisp
24026
24027 The available symbols are @code{or}, @code{and} and @code{not}.  The
24028 functions all take one parameter.
24029
24030 @findex gnus-make-predicate
24031 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
24032 to create a function that can be called.  This input parameter to this
24033 function will be passed along to all the functions in the predicate
24034 specifier.
24035
24036
24037 @node Moderation
24038 @section Moderation
24039 @cindex moderation
24040
24041 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
24042 It is not included in the standard Gnus package.  Write a mail to
24043 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
24044 get a copy.
24045
24046 The moderation package is implemented as a minor mode for summary
24047 buffers.  Put
24048
24049 @lisp
24050 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
24051 @end lisp
24052
24053 in your @file{~/.gnus.el} file.
24054
24055 If you are the moderator of @samp{rec.zoofle}, this is how it's
24056 supposed to work:
24057
24058 @enumerate
24059 @item
24060 You split your incoming mail by matching on
24061 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
24062 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
24063
24064 @item
24065 You enter that group once in a while and post articles using the @kbd{e}
24066 (edit-and-post) or @kbd{s} (just send unedited) commands.
24067
24068 @item
24069 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
24070 articles that weren't approved by you, you can cancel them with the
24071 @kbd{c} command.
24072 @end enumerate
24073
24074 To use moderation mode in these two groups, say:
24075
24076 @lisp
24077 (setq gnus-moderated-list
24078       "^nnml:rec.zoofle$\\|^rec.zoofle$")
24079 @end lisp
24080
24081
24082 @node Fetching a Group
24083 @section Fetching a Group
24084 @cindex fetching a group
24085
24086 @findex gnus-fetch-group
24087 It is sometimes convenient to be able to just say ``I want to read this
24088 group and I don't care whether Gnus has been started or not''.  This is
24089 perhaps more useful for people who write code than for users, but the
24090 command @code{gnus-fetch-group} provides this functionality in any case.
24091 It takes the group name as a parameter.
24092
24093
24094 @node Image Enhancements
24095 @section Image Enhancements
24096
24097 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
24098 support images, Emacs 22 does.} and up, are able to display pictures and
24099 stuff, so Gnus has taken advantage of that.
24100
24101 @menu
24102 * X-Face::                      Display a funky, teensy black-and-white image.
24103 * Face::                        Display a funkier, teensier colored image.
24104 * Smileys::                     Show all those happy faces the way they were meant to be shown.
24105 * Picons::                      How to display pictures of what you're reading.
24106 * XVarious::                    Other XEmacsy Gnusey variables.
24107 @end menu
24108
24109
24110 @node X-Face
24111 @subsection X-Face
24112 @cindex x-face
24113
24114 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
24115 depth) image that's supposed to represent the author of the message.
24116 It seems to be supported by an ever-growing number of mail and news
24117 readers.
24118
24119 @cindex x-face
24120 @findex gnus-article-display-x-face
24121 @vindex gnus-article-x-face-command
24122 @vindex gnus-article-x-face-too-ugly
24123 @iftex
24124 @iflatex
24125 \include{xface}
24126 @end iflatex
24127 @end iftex
24128 @c @anchor{X-Face}
24129
24130 Viewing an @code{X-Face} header either requires an Emacs that has
24131 @samp{compface} support (which most XEmacs versions have), or that you
24132 have suitable conversion or display programs installed.  If your Emacs
24133 has image support the default action is to display the face before the
24134 @code{From} header.  If there's no native @code{X-Face} support, Gnus
24135 will try to convert the @code{X-Face} header using external programs
24136 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
24137 faster if XEmacs has been compiled with @code{X-Face} support.  The
24138 default action under Emacs without image support is to fork off the
24139 @code{display} program.
24140
24141 On a GNU/Linux system, the @code{display} program is included in the
24142 ImageMagick package.  For external conversion programs look for packages
24143 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
24144 On Windows, you may use the packages @code{netpbm} and @code{compface}
24145 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
24146 @code{bin} directory to your @code{PATH} environment variable.
24147 @c In fact only the following DLLs and binaries seem to be required:
24148 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
24149
24150 The variable @code{gnus-article-x-face-command} controls which programs
24151 are used to display the @code{X-Face} header.  If this variable is a
24152 string, this string will be executed in a sub-shell.  If it is a
24153 function, this function will be called with the face as the argument.
24154 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
24155 @code{From} header, the face will not be shown.
24156
24157 (Note: @code{x-face} is used in the variable/function names, not
24158 @code{xface}).
24159
24160 @noindent
24161 Face and variable:
24162
24163 @table @code
24164 @item gnus-x-face
24165 @vindex gnus-x-face
24166 Face to show X-Face.  The colors from this face are used as the
24167 foreground and background colors of the displayed X-Faces.  The
24168 default colors are black and white.
24169
24170 @item gnus-face-properties-alist
24171 @vindex gnus-face-properties-alist
24172 Alist of image types and properties applied to Face (@pxref{Face}) and
24173 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
24174 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
24175 XEmacs.  Here are examples:
24176
24177 @lisp
24178 ;; Specify the altitude of Face and X-Face images in the From header.
24179 (setq gnus-face-properties-alist
24180       '((pbm . (:face gnus-x-face :ascent 80))
24181         (png . (:ascent 80))))
24182
24183 ;; Show Face and X-Face images as pressed buttons.
24184 (setq gnus-face-properties-alist
24185       '((pbm . (:face gnus-x-face :relief -2))
24186         (png . (:relief -2))))
24187 @end lisp
24188
24189 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
24190 Reference Manual} for the valid properties for various image types.
24191 Currently, @code{pbm} is used for X-Face images and @code{png} is used
24192 for Face images in Emacs.  Only the @code{:face} property is effective
24193 on the @code{xface} image type in XEmacs if it is built with the
24194 @samp{libcompface} library.
24195 @end table
24196
24197 If you use posting styles, you can use an @code{x-face-file} entry in
24198 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
24199 provides a few convenience functions and variables to allow easier
24200 insertion of X-Face headers in outgoing messages.  You also need the
24201 above mentioned ImageMagick, netpbm or other image conversion packages
24202 (depending the values of the variables below) for these functions.
24203
24204 @findex gnus-random-x-face
24205 @vindex gnus-convert-pbm-to-x-face-command
24206 @vindex gnus-x-face-directory
24207 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
24208 @code{gnus-x-face-directory} and picks one at random, and then
24209 converts it to the X-Face format by using the
24210 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
24211 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
24212 header data as a string.
24213
24214 @findex gnus-insert-random-x-face-header
24215 @code{gnus-insert-random-x-face-header} calls
24216 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
24217 randomly generated data.
24218
24219 @findex gnus-x-face-from-file
24220 @vindex gnus-convert-image-to-x-face-command
24221 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
24222 converts the file to X-Face format by using the
24223 @code{gnus-convert-image-to-x-face-command} shell command.
24224
24225 Here's how you would typically use the first function.  Put something
24226 like the following in your @file{~/.gnus.el} file:
24227
24228 @lisp
24229 (setq message-required-news-headers
24230       (nconc message-required-news-headers
24231              (list '(X-Face . gnus-random-x-face))))
24232 @end lisp
24233
24234 Using the last function would be something like this:
24235
24236 @lisp
24237 (setq message-required-news-headers
24238       (nconc message-required-news-headers
24239              (list '(X-Face . (lambda ()
24240                                 (gnus-x-face-from-file
24241                                  "~/My-face.gif"))))))
24242 @end lisp
24243
24244
24245 @node Face
24246 @subsection Face
24247 @cindex face
24248
24249 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
24250
24251 @code{Face} headers are essentially a funkier version of @code{X-Face}
24252 ones. They describe a 48x48 pixel colored image that's supposed to
24253 represent the author of the message.
24254
24255 @cindex face
24256 @findex gnus-article-display-face
24257 The contents of a @code{Face} header must be a base64 encoded PNG image.
24258 See @uref{http://quimby.gnus.org/circus/face/} for the precise
24259 specifications.
24260
24261 The @code{gnus-face-properties-alist} variable affects the appearance of
24262 displayed Face images.  @xref{X-Face}.
24263
24264 Viewing an @code{Face} header requires an Emacs that is able to display
24265 PNG images.
24266 @c Maybe add this:
24267 @c (if (featurep 'xemacs)
24268 @c     (featurep 'png)
24269 @c   (image-type-available-p 'png))
24270
24271 Gnus provides a few convenience functions and variables to allow
24272 easier insertion of Face headers in outgoing messages.
24273
24274 @findex gnus-convert-png-to-face
24275 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
24276 726 bytes long, and converts it to a face.
24277
24278 @findex gnus-face-from-file
24279 @vindex gnus-convert-image-to-face-command
24280 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
24281 converts the file to Face format by using the
24282 @code{gnus-convert-image-to-face-command} shell command.
24283
24284 Here's how you would typically use this function. Put something like the
24285 following in your @file{~/.gnus.el} file:
24286
24287 @lisp
24288 (setq message-required-news-headers
24289       (nconc message-required-news-headers
24290              (list '(Face . (lambda ()
24291                               (gnus-face-from-file "~/face.jpg"))))))
24292 @end lisp
24293
24294
24295 @node Smileys
24296 @subsection Smileys
24297 @cindex smileys
24298
24299 @iftex
24300 @iflatex
24301 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
24302 \input{smiley}
24303 @end iflatex
24304 @end iftex
24305
24306 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
24307 currently the only package that uses Smiley, it is documented here.
24308
24309 In short---to use Smiley in Gnus, put the following in your
24310 @file{~/.gnus.el} file:
24311
24312 @lisp
24313 (setq gnus-treat-display-smileys t)
24314 @end lisp
24315
24316 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
24317 the like---to pictures and displays those instead of the text smiley
24318 faces.  The conversion is controlled by a list of regexps that matches
24319 text and maps that to file names.
24320
24321 @vindex smiley-regexp-alist
24322 The alist used is specified by the @code{smiley-regexp-alist}
24323 variable.  The first item in each element is the regexp to be matched;
24324 the second element is the regexp match group that is to be replaced by
24325 the picture; and the third element is the name of the file to be
24326 displayed.
24327
24328 The following variables customize the appearance of the smileys:
24329
24330 @table @code
24331
24332 @item smiley-style
24333 @vindex smiley-style
24334 Specifies the smiley style.  Predefined smiley styles include
24335 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
24336 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
24337 images, 14x14 pixel).  The default depends on the height of the default
24338 face.
24339
24340 @item smiley-data-directory
24341 @vindex smiley-data-directory
24342 Where Smiley will look for smiley faces files.  You shouldn't set this
24343 variable anymore.  Customize @code{smiley-style} instead.
24344
24345 @item gnus-smiley-file-types
24346 @vindex gnus-smiley-file-types
24347 List of suffixes on smiley file names to try.
24348
24349 @end table
24350
24351
24352 @node Picons
24353 @subsection Picons
24354
24355 @iftex
24356 @iflatex
24357 \include{picons}
24358 @end iflatex
24359 @end iftex
24360
24361 So@dots{}  You want to slow down your news reader even more!  This is a
24362 good way to do so.  It's also a great way to impress people staring
24363 over your shoulder as you read news.
24364
24365 What are Picons?  To quote directly from the Picons Web site:
24366
24367 @iftex
24368 @iflatex
24369 \margindex{}
24370 @end iflatex
24371 @end iftex
24372
24373 @quotation
24374 @dfn{Picons} is short for ``personal icons''.  They're small,
24375 constrained images used to represent users and domains on the net,
24376 organized into databases so that the appropriate image for a given
24377 e-mail address can be found.  Besides users and domains, there are picon
24378 databases for Usenet newsgroups and weather forecasts.  The picons are
24379 in either monochrome @code{XBM} format or color @code{XPM} and
24380 @code{GIF} formats.
24381 @end quotation
24382
24383 @vindex gnus-picon-databases
24384 For instructions on obtaining and installing the picons databases,
24385 point your Web browser at
24386 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
24387
24388 If you are using Debian GNU/Linux, saying @samp{apt-get install
24389 picons.*} will install the picons where Gnus can find them.
24390
24391 To enable displaying picons, simply make sure that
24392 @code{gnus-picon-databases} points to the directory containing the
24393 Picons databases.
24394
24395 @vindex gnus-picon-style
24396 The variable @code{gnus-picon-style} controls how picons are displayed.
24397 If @code{inline}, the textual representation is replaced.  If
24398 @code{right}, picons are added right to the textual representation.
24399
24400 The following variables offer control over where things are located.
24401
24402 @table @code
24403
24404 @item gnus-picon-databases
24405 @vindex gnus-picon-databases
24406 The location of the picons database.  This is a list of directories
24407 containing the @file{news}, @file{domains}, @file{users} (and so on)
24408 subdirectories.  Defaults to @code{("/usr/lib/picon"
24409 "/usr/local/faces")}.
24410
24411 @item gnus-picon-news-directories
24412 @vindex gnus-picon-news-directories
24413 List of subdirectories to search in @code{gnus-picon-databases} for
24414 newsgroups faces.  @code{("news")} is the default.
24415
24416 @item gnus-picon-user-directories
24417 @vindex gnus-picon-user-directories
24418 List of subdirectories to search in @code{gnus-picon-databases} for user
24419 faces.  @code{("users" "usenix" "local" "misc")} is the default.
24420
24421 @item gnus-picon-domain-directories
24422 @vindex gnus-picon-domain-directories
24423 List of subdirectories to search in @code{gnus-picon-databases} for
24424 domain name faces.  Defaults to @code{("domains")}.  Some people may
24425 want to add @samp{"unknown"} to this list.
24426
24427 @item gnus-picon-file-types
24428 @vindex gnus-picon-file-types
24429 Ordered list of suffixes on picon file names to try.  Defaults to
24430 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
24431
24432 @end table
24433
24434
24435 @node XVarious
24436 @subsection Various XEmacs Variables
24437
24438 @table @code
24439 @item gnus-xmas-glyph-directory
24440 @vindex gnus-xmas-glyph-directory
24441 This is where Gnus will look for pictures.  Gnus will normally
24442 auto-detect this directory, but you may set it manually if you have an
24443 unusual directory structure.
24444
24445 @item gnus-xmas-modeline-glyph
24446 @vindex gnus-xmas-modeline-glyph
24447 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
24448 default.
24449
24450 @end table
24451
24452 @subsubsection Toolbar
24453
24454 @table @code
24455
24456 @item gnus-use-toolbar
24457 @vindex gnus-use-toolbar
24458 This variable specifies the position to display the toolbar.  If
24459 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
24460 be one of the symbols @code{default}, @code{top}, @code{bottom},
24461 @code{right}, and @code{left}.  @code{default} means to use the default
24462 toolbar, the rest mean to display the toolbar on the place which those
24463 names show.  The default is @code{default}.
24464
24465 @item gnus-toolbar-thickness
24466 @vindex gnus-toolbar-thickness
24467 Cons of the height and the width specifying the thickness of a toolbar.
24468 The height is used for the toolbar displayed on the top or the bottom,
24469 the width is used for the toolbar displayed on the right or the left.
24470 The default is that of the default toolbar.
24471
24472 @item gnus-group-toolbar
24473 @vindex gnus-group-toolbar
24474 The toolbar in the group buffer.
24475
24476 @item gnus-summary-toolbar
24477 @vindex gnus-summary-toolbar
24478 The toolbar in the summary buffer.
24479
24480 @item gnus-summary-mail-toolbar
24481 @vindex gnus-summary-mail-toolbar
24482 The toolbar in the summary buffer of mail groups.
24483
24484 @end table
24485
24486 @iftex
24487 @iflatex
24488 \margindex{}
24489 @end iflatex
24490 @end iftex
24491
24492
24493 @node Fuzzy Matching
24494 @section Fuzzy Matching
24495 @cindex fuzzy matching
24496
24497 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
24498 things like scoring, thread gathering and thread comparison.
24499
24500 As opposed to regular expression matching, fuzzy matching is very fuzzy.
24501 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
24502 means, and the implementation has changed over time.
24503
24504 Basically, it tries to remove all noise from lines before comparing.
24505 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
24506 out of the strings before comparing the results.  This often leads to
24507 adequate results---even when faced with strings generated by text
24508 manglers masquerading as newsreaders.
24509
24510
24511 @node Thwarting Email Spam
24512 @section Thwarting Email Spam
24513 @cindex email spam
24514 @cindex spam
24515 @cindex UCE
24516 @cindex unsolicited commercial email
24517
24518 In these last days of the Usenet, commercial vultures are hanging about
24519 and grepping through news like crazy to find email addresses they can
24520 foist off their scams and products to.  As a reaction to this, many
24521 people have started putting nonsense addresses into their @code{From}
24522 lines.  I think this is counterproductive---it makes it difficult for
24523 people to send you legitimate mail in response to things you write, as
24524 well as making it difficult to see who wrote what.  This rewriting may
24525 perhaps be a bigger menace than the unsolicited commercial email itself
24526 in the end.
24527
24528 The biggest problem I have with email spam is that it comes in under
24529 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
24530 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
24531 mail group, only to find two pyramid schemes, seven advertisements
24532 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
24533 and one mail asking me to repent and find some god.
24534
24535 This is annoying.  Here's what you can do about it.
24536
24537 @menu
24538 * The problem of spam::         Some background, and some solutions
24539 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
24540 * SpamAssassin::                How to use external anti-spam tools.
24541 * Hashcash::                    Reduce spam by burning CPU time.
24542 @end menu
24543
24544 @node The problem of spam
24545 @subsection The problem of spam
24546 @cindex email spam
24547 @cindex spam filtering approaches
24548 @cindex filtering approaches, spam
24549 @cindex UCE
24550 @cindex unsolicited commercial email
24551
24552 First, some background on spam.
24553
24554 If you have access to e-mail, you are familiar with spam (technically
24555 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
24556 exists because e-mail delivery is very cheap compared to paper mail,
24557 so only a very small percentage of people need to respond to an UCE to
24558 make it worthwhile to the advertiser.  Ironically, one of the most
24559 common spams is the one offering a database of e-mail addresses for
24560 further spamming.  Senders of spam are usually called @emph{spammers},
24561 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
24562 @emph{morons} are in common use as well.
24563
24564 Spam comes from a wide variety of sources.  It is simply impossible to
24565 dispose of all spam without discarding useful messages.  A good
24566 example is the TMDA system, which requires senders
24567 unknown to you to confirm themselves as legitimate senders before
24568 their e-mail can reach you.  Without getting into the technical side
24569 of TMDA, a downside is clearly that e-mail from legitimate sources may
24570 be discarded if those sources can't or won't confirm themselves
24571 through the TMDA system.  Another problem with TMDA is that it
24572 requires its users to have a basic understanding of e-mail delivery
24573 and processing.
24574
24575 The simplest approach to filtering spam is filtering, at the mail
24576 server or when you sort through incoming mail.  If you get 200 spam
24577 messages per day from @samp{random-address@@vmadmin.com}, you block
24578 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
24579 discard all messages with @samp{VIAGRA} in the message.  If you get
24580 lots of spam from Bulgaria, for example, you try to filter all mail
24581 from Bulgarian IPs.
24582
24583 This, unfortunately, is a great way to discard legitimate e-mail.  The
24584 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
24585 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
24586 you should be obvious, so don't do it if you have the choice.
24587
24588 In another instance, the very informative and useful RISKS digest has
24589 been blocked by overzealous mail filters because it @strong{contained}
24590 words that were common in spam messages.  Nevertheless, in isolated
24591 cases, with great care, direct filtering of mail can be useful.
24592
24593 Another approach to filtering e-mail is the distributed spam
24594 processing, for instance DCC implements such a system.  In essence,
24595 @var{N} systems around the world agree that a machine @var{X} in
24596 Ghana, Estonia, or California is sending out spam e-mail, and these
24597 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
24598 database.  The criteria for spam detection vary---it may be the number
24599 of messages sent, the content of the messages, and so on.  When a user
24600 of the distributed processing system wants to find out if a message is
24601 spam, he consults one of those @var{N} systems.
24602
24603 Distributed spam processing works very well against spammers that send
24604 a large number of messages at once, but it requires the user to set up
24605 fairly complicated checks.  There are commercial and free distributed
24606 spam processing systems.  Distributed spam processing has its risks as
24607 well.  For instance legitimate e-mail senders have been accused of
24608 sending spam, and their web sites and mailing lists have been shut
24609 down for some time because of the incident.
24610
24611 The statistical approach to spam filtering is also popular.  It is
24612 based on a statistical analysis of previous spam messages.  Usually
24613 the analysis is a simple word frequency count, with perhaps pairs of
24614 words or 3-word combinations thrown into the mix.  Statistical
24615 analysis of spam works very well in most of the cases, but it can
24616 classify legitimate e-mail as spam in some cases.  It takes time to
24617 run the analysis, the full message must be analyzed, and the user has
24618 to store the database of spam analysis.  Statistical analysis on the
24619 server is gaining popularity.  This has the advantage of letting the
24620 user Just Read Mail, but has the disadvantage that it's harder to tell
24621 the server that it has misclassified mail.
24622
24623 Fighting spam is not easy, no matter what anyone says.  There is no
24624 magic switch that will distinguish Viagra ads from Mom's e-mails.
24625 Even people are having a hard time telling spam apart from non-spam,
24626 because spammers are actively looking to fool us into thinking they
24627 are Mom, essentially.  Spamming is irritating, irresponsible, and
24628 idiotic behavior from a bunch of people who think the world owes them
24629 a favor.  We hope the following sections will help you in fighting the
24630 spam plague.
24631
24632 @node Anti-Spam Basics
24633 @subsection Anti-Spam Basics
24634 @cindex email spam
24635 @cindex spam
24636 @cindex UCE
24637 @cindex unsolicited commercial email
24638
24639 One way of dealing with spam is having Gnus split out all spam into a
24640 @samp{spam} mail group (@pxref{Splitting Mail}).
24641
24642 First, pick one (1) valid mail address that you can be reached at, and
24643 put it in your @code{From} header of all your news articles.  (I've
24644 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
24645 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
24646 sysadmin whether your sendmail installation accepts keywords in the local
24647 part of the mail address.)
24648
24649 @lisp
24650 (setq message-default-news-headers
24651       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
24652 @end lisp
24653
24654 Then put the following split rule in @code{nnmail-split-fancy}
24655 (@pxref{Fancy Mail Splitting}):
24656
24657 @lisp
24658 (...
24659  (to "larsi@@trym.ifi.uio.no"
24660      (| ("subject" "re:.*" "misc")
24661         ("references" ".*@@.*" "misc")
24662         "spam"))
24663  ...)
24664 @end lisp
24665
24666 This says that all mail to this address is suspect, but if it has a
24667 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
24668 header, it's probably ok.  All the rest goes to the @samp{spam} group.
24669 (This idea probably comes from Tim Pierce.)
24670
24671 In addition, many mail spammers talk directly to your @acronym{SMTP} server
24672 and do not include your email address explicitly in the @code{To}
24673 header.  Why they do this is unknown---perhaps it's to thwart this
24674 thwarting scheme?  In any case, this is trivial to deal with---you just
24675 put anything not addressed to you in the @samp{spam} group by ending
24676 your fancy split rule in this way:
24677
24678 @lisp
24679 (
24680  ...
24681  (to "larsi" "misc")
24682  "spam")
24683 @end lisp
24684
24685 In my experience, this will sort virtually everything into the right
24686 group.  You still have to check the @samp{spam} group from time to time to
24687 check for legitimate mail, though.  If you feel like being a good net
24688 citizen, you can even send off complaints to the proper authorities on
24689 each unsolicited commercial email---at your leisure.
24690
24691 This works for me.  It allows people an easy way to contact me (they can
24692 just press @kbd{r} in the usual way), and I'm not bothered at all with
24693 spam.  It's a win-win situation.  Forging @code{From} headers to point
24694 to non-existent domains is yucky, in my opinion.
24695
24696 Be careful with this approach.  Spammers are wise to it.
24697
24698
24699 @node SpamAssassin
24700 @subsection SpamAssassin, Vipul's Razor, DCC, etc
24701 @cindex SpamAssassin
24702 @cindex Vipul's Razor
24703 @cindex DCC
24704
24705 The days where the hints in the previous section were sufficient in
24706 avoiding spam are coming to an end.  There are many tools out there
24707 that claim to reduce the amount of spam you get.  This section could
24708 easily become outdated fast, as new products replace old, but
24709 fortunately most of these tools seem to have similar interfaces.  Even
24710 though this section will use SpamAssassin as an example, it should be
24711 easy to adapt it to most other tools.
24712
24713 Note that this section does not involve the @code{spam.el} package,
24714 which is discussed in the next section.  If you don't care for all
24715 the features of @code{spam.el}, you can make do with these simple
24716 recipes.
24717
24718 If the tool you are using is not installed on the mail server, you
24719 need to invoke it yourself.  Ideas on how to use the
24720 @code{:postscript} mail source parameter (@pxref{Mail Source
24721 Specifiers}) follow.
24722
24723 @lisp
24724 (setq mail-sources
24725       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
24726         (pop :user "jrl"
24727              :server "pophost"
24728              :postscript
24729              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
24730 @end lisp
24731
24732 Once you manage to process your incoming spool somehow, thus making
24733 the mail contain e.g.@: a header indicating it is spam, you are ready to
24734 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
24735
24736 @lisp
24737 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
24738                              ...))
24739 @end lisp
24740
24741 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
24742
24743 @lisp
24744 (setq nnmail-split-methods 'nnmail-split-fancy
24745       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
24746                              ...))
24747 @end lisp
24748
24749 Some people might not like the idea of piping the mail through various
24750 programs using a @code{:prescript} (if some program is buggy, you
24751 might lose all mail).  If you are one of them, another solution is to
24752 call the external tools during splitting.  Example fancy split method:
24753
24754 @lisp
24755 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24756                              ...))
24757 (defun kevin-spamassassin ()
24758   (save-excursion
24759     (save-restriction
24760       (widen)
24761       (if (eq 1 (call-process-region (point-min) (point-max)
24762                                      "spamc" nil nil nil "-c"))
24763           "spam"))))
24764 @end lisp
24765
24766 Note that with the nnimap back end, message bodies will not be
24767 downloaded by default.  You need to set
24768 @code{nnimap-split-download-body} to @code{t} to do that
24769 (@pxref{Splitting in IMAP}).
24770
24771 That is about it.  As some spam is likely to get through anyway, you
24772 might want to have a nifty function to call when you happen to read
24773 spam.  And here is the nifty function:
24774
24775 @lisp
24776 (defun my-gnus-raze-spam ()
24777   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24778   (interactive)
24779   (gnus-summary-save-in-pipe "razor-report -f -d" t)
24780   (gnus-summary-mark-as-expirable 1))
24781 @end lisp
24782
24783 @node Hashcash
24784 @subsection Hashcash
24785 @cindex hashcash
24786
24787 A novel technique to fight spam is to require senders to do something
24788 costly and demonstrably unique for each message they send.  This has
24789 the obvious drawback that you cannot rely on everyone in the world
24790 using this technique, since it is not part of the Internet standards,
24791 but it may be useful in smaller communities.
24792
24793 While the tools in the previous section work well in practice, they
24794 work only because the tools are constantly maintained and updated as
24795 new form of spam appears.  This means that a small percentage of spam
24796 will always get through.  It also means that somewhere, someone needs
24797 to read lots of spam to update these tools.  Hashcash avoids that, but
24798 instead prefers that everyone you contact through e-mail supports the
24799 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24800 The approaches have their own advantages and disadvantages, but as
24801 often in the real world, a combination of them is stronger than either
24802 one of them separately.
24803
24804 @cindex X-Hashcash
24805 The ``something costly'' is to burn CPU time, more specifically to
24806 compute a hash collision up to a certain number of bits.  The
24807 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24808 For more details, and for the external application @code{hashcash} you
24809 need to install to use this feature, see
24810 @uref{http://www.hashcash.org/}.  Even more information can be found
24811 at @uref{http://www.camram.org/}.
24812
24813 If you wish to generate hashcash for each message you send, you can
24814 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24815 Headers,message, The Message Manual}), as in:
24816
24817 @lisp
24818 (setq message-generate-hashcash t)
24819 @end lisp
24820
24821 You will need to set up some additional variables as well:
24822
24823 @table @code
24824
24825 @item hashcash-default-payment
24826 @vindex hashcash-default-payment
24827 This variable indicates the default number of bits the hash collision
24828 should consist of.  By default this is 20.  Suggested useful values
24829 include 17 to 29.
24830
24831 @item hashcash-payment-alist
24832 @vindex hashcash-payment-alist
24833 Some receivers may require you to spend burn more CPU time than the
24834 default.  This variable contains a list of @samp{(@var{addr}
24835 @var{amount})} cells, where @var{addr} is the receiver (email address
24836 or newsgroup) and @var{amount} is the number of bits in the collision
24837 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24838 @var{amount})} cells, where the @var{string} is the string to use
24839 (normally the email address or newsgroup name is used).
24840
24841 @item hashcash-path
24842 @vindex hashcash-path
24843 Where the @code{hashcash} binary is installed.  This variable should
24844 be automatically set by @code{executable-find}, but if it's @code{nil}
24845 (usually because the @code{hashcash} binary is not in your path)
24846 you'll get a warning when you check hashcash payments and an error
24847 when you generate hashcash payments.
24848
24849 @end table
24850
24851 Gnus can verify hashcash cookies, although this can also be done by
24852 hand customized mail filtering scripts.  To verify a hashcash cookie
24853 in a message, use the @code{mail-check-payment} function in the
24854 @code{hashcash.el} library.  You can also use the @code{spam.el}
24855 package with the @code{spam-use-hashcash} back end to validate hashcash
24856 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24857 Hashcash Payments}).
24858
24859 @node Spam Package
24860 @section Spam Package
24861 @cindex spam filtering
24862 @cindex spam
24863
24864 The Spam package provides Gnus with a centralized mechanism for
24865 detecting and filtering spam.  It filters new mail, and processes
24866 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24867 name used throughout this manual to indicate non-spam messages.)
24868
24869 @menu
24870 * Spam Package Introduction::
24871 * Filtering Incoming Mail::
24872 * Detecting Spam in Groups::
24873 * Spam and Ham Processors::
24874 * Spam Package Configuration Examples::
24875 * Spam Back Ends::
24876 * Extending the Spam package::
24877 * Spam Statistics Package::
24878 @end menu
24879
24880 @node Spam Package Introduction
24881 @subsection Spam Package Introduction
24882 @cindex spam filtering
24883 @cindex spam filtering sequence of events
24884 @cindex spam
24885
24886 You must read this section to understand how the Spam package works.
24887 Do not skip, speed-read, or glance through this section.
24888
24889 Make sure you read the section on the @code{spam.el} sequence of
24890 events.  See @xref{Extending the Spam package}.
24891
24892 @cindex spam-initialize
24893 @vindex spam-use-stat
24894 To use the Spam package, you @strong{must} first run the function
24895 @code{spam-initialize}:
24896
24897 @example
24898 (spam-initialize)
24899 @end example
24900
24901 This autoloads @code{spam.el} and installs the various hooks necessary
24902 to let the Spam package do its job.  In order to make use of the Spam
24903 package, you have to set up certain group parameters and variables,
24904 which we will describe below.  All of the variables controlling the
24905 Spam package can be found in the @samp{spam} customization group.
24906
24907 There are two ``contact points'' between the Spam package and the rest
24908 of Gnus: checking new mail for spam, and leaving a group.
24909
24910 Checking new mail for spam is done in one of two ways: while splitting
24911 incoming mail, or when you enter a group.
24912
24913 The first way, checking for spam while splitting incoming mail, is
24914 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24915 new mail appears in a single spool file.  The Spam package processes
24916 incoming mail, and sends mail considered to be spam to a designated
24917 ``spam'' group.  @xref{Filtering Incoming Mail}.
24918
24919 The second way is suited to back ends such as @code{nntp}, which have
24920 no incoming mail spool, or back ends where the server is in charge of
24921 splitting incoming mail.  In this case, when you enter a Gnus group,
24922 the unseen or unread messages in that group are checked for spam.
24923 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24924 Groups}.
24925
24926 @cindex spam back ends
24927 In either case, you have to tell the Spam package what method to use
24928 to detect spam messages.  There are several methods, or @dfn{spam back
24929 ends} (not to be confused with Gnus back ends!) to choose from: spam
24930 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24931 forth.  @xref{Spam Back Ends}.
24932
24933 In the Gnus summary buffer, messages that have been identified as spam
24934 always appear with a @samp{$} symbol.
24935
24936 The Spam package divides Gnus groups into three categories: ham
24937 groups, spam groups, and unclassified groups.  You should mark each of
24938 the groups you subscribe to as either a ham group or a spam group,
24939 using the @code{spam-contents} group parameter (@pxref{Group
24940 Parameters}).  Spam groups have a special property: when you enter a
24941 spam group, all unseen articles are marked as spam.  Thus, mail split
24942 into a spam group is automatically marked as spam.
24943
24944 Identifying spam messages is only half of the Spam package's job.  The
24945 second half comes into play whenever you exit a group buffer.  At this
24946 point, the Spam package does several things:
24947
24948 First, it calls @dfn{spam and ham processors} to process the articles
24949 according to whether they are spam or ham.  There is a pair of spam
24950 and ham processors associated with each spam back end, and what the
24951 processors do depends on the back end.  At present, the main role of
24952 spam and ham processors is for dictionary-based spam filters: they add
24953 the contents of the messages in the group to the filter's dictionary,
24954 to improve its ability to detect future spam.  The @code{spam-process}
24955 group parameter specifies what spam processors to use.  @xref{Spam and
24956 Ham Processors}.
24957
24958 If the spam filter failed to mark a spam message, you can mark it
24959 yourself, so that the message is processed as spam when you exit the
24960 group:
24961
24962 @table @kbd
24963 @item M-d
24964 @itemx M s x
24965 @itemx S x
24966 @kindex M-d
24967 @kindex S x
24968 @kindex M s x
24969 @findex gnus-summary-mark-as-spam
24970 @findex gnus-summary-mark-as-spam
24971 Mark current article as spam, showing it with the @samp{$} mark
24972 (@code{gnus-summary-mark-as-spam}).
24973 @end table
24974
24975 @noindent
24976 Similarly, you can unmark an article if it has been erroneously marked
24977 as spam.  @xref{Setting Marks}.
24978
24979 Normally, a ham message found in a non-ham group is not processed as
24980 ham---the rationale is that it should be moved into a ham group for
24981 further processing (see below).  However, you can force these articles
24982 to be processed as ham by setting
24983 @code{spam-process-ham-in-spam-groups} and
24984 @code{spam-process-ham-in-nonham-groups}.
24985
24986 @vindex gnus-ham-process-destinations
24987 @vindex gnus-spam-process-destinations
24988 The second thing that the Spam package does when you exit a group is
24989 to move ham articles out of spam groups, and spam articles out of ham
24990 groups.  Ham in a spam group is moved to the group specified by the
24991 variable @code{gnus-ham-process-destinations}, or the group parameter
24992 @code{ham-process-destination}.  Spam in a ham group is moved to the
24993 group specified by the variable @code{gnus-spam-process-destinations},
24994 or the group parameter @code{spam-process-destination}.  If these
24995 variables are not set, the articles are left in their current group.
24996 If an article cannot be moved (e.g., with a read-only backend such
24997 as @acronym{NNTP}), it is copied.
24998
24999 If an article is moved to another group, it is processed again when
25000 you visit the new group.  Normally, this is not a problem, but if you
25001 want each article to be processed only once, load the
25002 @code{gnus-registry.el} package and set the variable
25003 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
25004 Configuration Examples}.
25005
25006 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
25007 However, if you set @code{spam-move-spam-nonspam-groups-only} to
25008 @code{nil}, spam will also be moved out of spam groups, depending on
25009 the @code{spam-process-destination} parameter.
25010
25011 The final thing the Spam package does is to mark spam articles as
25012 expired, which is usually the right thing to do.
25013
25014 If all this seems confusing, don't worry.  Soon it will be as natural
25015 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
25016 50 years in the future yet.  Just trust us, it's not so bad.
25017
25018 @node Filtering Incoming Mail
25019 @subsection Filtering Incoming Mail
25020 @cindex spam filtering
25021 @cindex spam filtering incoming mail
25022 @cindex spam
25023
25024 To use the Spam package to filter incoming mail, you must first set up
25025 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
25026 defines a special splitting function that you can add to your fancy
25027 split variable (either @code{nnmail-split-fancy} or
25028 @code{nnimap-split-fancy}, depending on your mail back end):
25029
25030 @example
25031 (: spam-split)
25032 @end example
25033
25034 @vindex spam-split-group
25035 @noindent
25036 The @code{spam-split} function scans incoming mail according to your
25037 chosen spam back end(s), and sends messages identified as spam to a
25038 spam group.  By default, the spam group is a group named @samp{spam},
25039 but you can change this by customizing @code{spam-split-group}.  Make
25040 sure the contents of @code{spam-split-group} are an unqualified group
25041 name.  For instance, in an @code{nnimap} server @samp{your-server},
25042 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
25043 @samp{nnimap+server:spam} is therefore wrong---it gives the group
25044 @samp{nnimap+your-server:nnimap+server:spam}.
25045
25046 @code{spam-split} does not modify the contents of messages in any way.
25047
25048 @vindex nnimap-split-download-body
25049 Note for IMAP users: if you use the @code{spam-check-bogofilter},
25050 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
25051 you should also set the variable @code{nnimap-split-download-body}
25052 to @code{t}.  These spam back ends are most useful when they can
25053 ``scan'' the full message body.  By default, the nnimap back end only
25054 retrieves the message headers; @code{nnimap-split-download-body} tells
25055 it to retrieve the message bodies as well.  We don't set this by
25056 default because it will slow @acronym{IMAP} down, and that is not an
25057 appropriate decision to make on behalf of the user.  @xref{Splitting
25058 in IMAP}.
25059
25060 You have to specify one or more spam back ends for @code{spam-split}
25061 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
25062 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
25063 you enabled in this way.  However, you can tell @code{spam-split} to
25064 use only some of them.  Why this is useful?  Suppose you are using the
25065 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
25066 ends, and the following split rule:
25067
25068 @example
25069  nnimap-split-fancy '(|
25070                       (any "ding" "ding")
25071                       (: spam-split)
25072                       ;; @r{default mailbox}
25073                       "mail")
25074 @end example
25075
25076 @noindent
25077 The problem is that you want all ding messages to make it to the ding
25078 folder.  But that will let obvious spam (for example, spam detected by
25079 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
25080 sent to the ding list.  On the other hand, some messages to the ding
25081 list are from a mail server in the blackhole list, so the invocation
25082 of @code{spam-split} can't be before the ding rule.
25083
25084 The solution is to let SpamAssassin headers supersede ding rules, and
25085 perform the other @code{spam-split} rules (including a second
25086 invocation of the regex-headers check) after the ding rule.  This is
25087 done by passing a parameter to @code{spam-split}:
25088
25089 @example
25090 nnimap-split-fancy
25091       '(|
25092         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
25093         (: spam-split "regex-spam" 'spam-use-regex-headers)
25094         (any "ding" "ding")
25095         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
25096         (: spam-split)
25097         ;; @r{default mailbox}
25098         "mail")
25099 @end example
25100
25101 @noindent
25102 This lets you invoke specific @code{spam-split} checks depending on
25103 your particular needs, and target the results of those checks to a
25104 particular spam group.  You don't have to throw all mail into all the
25105 spam tests.  Another reason why this is nice is that messages to
25106 mailing lists you have rules for don't have to have resource-intensive
25107 blackhole checks performed on them.  You could also specify different
25108 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
25109
25110 You should set the @code{spam-use-*} variables for whatever spam back
25111 ends you intend to use.  The reason is that when loading
25112 @file{spam.el}, some conditional loading is done depending on what
25113 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
25114
25115 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
25116 @c statistical databases.  Some have that functionality built-in, others
25117 @c don't.}
25118
25119 @node Detecting Spam in Groups
25120 @subsection Detecting Spam in Groups
25121
25122 To detect spam when visiting a group, set the group's
25123 @code{spam-autodetect} and @code{spam-autodetect-methods} group
25124 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
25125 usual (@pxref{Group Parameters}).
25126
25127 You should set the @code{spam-use-*} variables for whatever spam back
25128 ends you intend to use.  The reason is that when loading
25129 @file{spam.el}, some conditional loading is done depending on what
25130 @code{spam-use-xyz} variables you have set.
25131
25132 By default, only unseen articles are processed for spam.  You can
25133 force Gnus to recheck all messages in the group by setting the
25134 variable @code{spam-autodetect-recheck-messages} to @code{t}.
25135
25136 If you use the @code{spam-autodetect} method of checking for spam, you
25137 can specify different spam detection methods for different groups.
25138 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
25139 the autodetection method, while the @samp{suspect} group may have the
25140 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
25141 enabled.  Unlike with @code{spam-split}, you don't have any control
25142 over the @emph{sequence} of checks, but this is probably unimportant.
25143
25144 @node Spam and Ham Processors
25145 @subsection Spam and Ham Processors
25146 @cindex spam filtering
25147 @cindex spam filtering variables
25148 @cindex spam variables
25149 @cindex spam
25150
25151 @vindex gnus-spam-process-newsgroups
25152 Spam and ham processors specify special actions to take when you exit
25153 a group buffer.  Spam processors act on spam messages, and ham
25154 processors on ham messages.  At present, the main role of these
25155 processors is to update the dictionaries of dictionary-based spam back
25156 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
25157 package (@pxref{Spam Statistics Filtering}).
25158
25159 The spam and ham processors that apply to each group are determined by
25160 the group's@code{spam-process} group parameter.  If this group
25161 parameter is not defined, they are determined by the variable
25162 @code{gnus-spam-process-newsgroups}.
25163
25164 @vindex gnus-spam-newsgroup-contents
25165 Gnus learns from the spam you get.  You have to collect your spam in
25166 one or more spam groups, and set or customize the variable
25167 @code{spam-junk-mailgroups} as appropriate.  You can also declare
25168 groups to contain spam by setting their group parameter
25169 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
25170 by customizing the corresponding variable
25171 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
25172 parameter and the @code{gnus-spam-newsgroup-contents} variable can
25173 also be used to declare groups as @emph{ham} groups if you set their
25174 classification to @code{gnus-group-spam-classification-ham}.  If
25175 groups are not classified by means of @code{spam-junk-mailgroups},
25176 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
25177 considered @emph{unclassified}.  All groups are unclassified by
25178 default.
25179
25180 @vindex gnus-spam-mark
25181 @cindex $
25182 In spam groups, all messages are considered to be spam by default:
25183 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
25184 group.  If you have seen a message, had it marked as spam, then
25185 unmarked it, it won't be marked as spam when you enter the group
25186 thereafter.  You can disable that behavior, so all unread messages
25187 will get the @samp{$} mark, if you set the
25188 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
25189 should remove the @samp{$} mark when you are in the group summary
25190 buffer for every message that is not spam after all.  To remove the
25191 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
25192 @kbd{d} for declaring it read the non-spam way.  When you leave a
25193 group, all spam-marked (@samp{$}) articles are sent to a spam
25194 processor which will study them as spam samples.
25195
25196 Messages may also be deleted in various other ways, and unless
25197 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
25198 and @samp{r} for default read or explicit delete, marks @samp{X} and
25199 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
25200 low scores, are all considered to be associated with articles which
25201 are not spam.  This assumption might be false, in particular if you
25202 use kill files or score files as means for detecting genuine spam, you
25203 should then adjust the @code{ham-marks} group parameter.
25204
25205 @defvar ham-marks
25206 You can customize this group or topic parameter to be the list of
25207 marks you want to consider ham.  By default, the list contains the
25208 deleted, read, killed, kill-filed, and low-score marks (the idea is
25209 that these articles have been read, but are not spam).  It can be
25210 useful to also include the tick mark in the ham marks.  It is not
25211 recommended to make the unread mark a ham mark, because it normally
25212 indicates a lack of classification.  But you can do it, and we'll be
25213 happy for you.
25214 @end defvar
25215
25216 @defvar spam-marks
25217 You can customize this group or topic parameter to be the list of
25218 marks you want to consider spam.  By default, the list contains only
25219 the spam mark.  It is not recommended to change that, but you can if
25220 you really want to.
25221 @end defvar
25222
25223 When you leave @emph{any} group, regardless of its
25224 @code{spam-contents} classification, all spam-marked articles are sent
25225 to a spam processor, which will study these as spam samples.  If you
25226 explicit kill a lot, you might sometimes end up with articles marked
25227 @samp{K} which you never saw, and which might accidentally contain
25228 spam.  Best is to make sure that real spam is marked with @samp{$},
25229 and nothing else.
25230
25231 @vindex gnus-ham-process-destinations
25232 When you leave a @emph{spam} group, all spam-marked articles are
25233 marked as expired after processing with the spam processor.  This is
25234 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
25235 @strong{ham} articles in a spam group will be moved to a location
25236 determined by either the @code{ham-process-destination} group
25237 parameter or a match in the @code{gnus-ham-process-destinations}
25238 variable, which is a list of regular expressions matched with group
25239 names (it's easiest to customize this variable with @kbd{M-x
25240 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
25241 group name list is a standard Lisp list, if you prefer to customize
25242 the variable manually.  If the @code{ham-process-destination}
25243 parameter is not set, ham articles are left in place.  If the
25244 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
25245 set, the ham articles are marked as unread before being moved.
25246
25247 If ham can not be moved---because of a read-only back end such as
25248 @acronym{NNTP}, for example, it will be copied.
25249
25250 Note that you can use multiples destinations per group or regular
25251 expression!  This enables you to send your ham to a regular mail
25252 group and to a @emph{ham training} group.
25253
25254 When you leave a @emph{ham} group, all ham-marked articles are sent to
25255 a ham processor, which will study these as non-spam samples.
25256
25257 @vindex spam-process-ham-in-spam-groups
25258 By default the variable @code{spam-process-ham-in-spam-groups} is
25259 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
25260 to be processed.  Normally this is not done, you are expected instead
25261 to send your ham to a ham group and process it there.
25262
25263 @vindex spam-process-ham-in-nonham-groups
25264 By default the variable @code{spam-process-ham-in-nonham-groups} is
25265 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
25266 or unclassified) groups to be processed.  Normally this is not done,
25267 you are expected instead to send your ham to a ham group and process
25268 it there.
25269
25270 @vindex gnus-spam-process-destinations
25271 When you leave a @emph{ham} or @emph{unclassified} group, all
25272 @strong{spam} articles are moved to a location determined by either
25273 the @code{spam-process-destination} group parameter or a match in the
25274 @code{gnus-spam-process-destinations} variable, which is a list of
25275 regular expressions matched with group names (it's easiest to
25276 customize this variable with @kbd{M-x customize-variable @key{RET}
25277 gnus-spam-process-destinations}).  Each group name list is a standard
25278 Lisp list, if you prefer to customize the variable manually.  If the
25279 @code{spam-process-destination} parameter is not set, the spam
25280 articles are only expired.  The group name is fully qualified, meaning
25281 that if you see @samp{nntp:servername} before the group name in the
25282 group buffer then you need it here as well.
25283
25284 If spam can not be moved---because of a read-only back end such as
25285 @acronym{NNTP}, for example, it will be copied.
25286
25287 Note that you can use multiples destinations per group or regular
25288 expression!  This enables you to send your spam to multiple @emph{spam
25289 training} groups.
25290
25291 @vindex spam-log-to-registry
25292 The problem with processing ham and spam is that Gnus doesn't track
25293 this processing by default.  Enable the @code{spam-log-to-registry}
25294 variable so @code{spam.el} will use @code{gnus-registry.el} to track
25295 what articles have been processed, and avoid processing articles
25296 multiple times.  Keep in mind that if you limit the number of registry
25297 entries, this won't work as well as it does without a limit.
25298
25299 @vindex spam-mark-only-unseen-as-spam
25300 Set this variable if you want only unseen articles in spam groups to
25301 be marked as spam.  By default, it is set.  If you set it to
25302 @code{nil}, unread articles will also be marked as spam.
25303
25304 @vindex spam-mark-ham-unread-before-move-from-spam-group
25305 Set this variable if you want ham to be unmarked before it is moved
25306 out of the spam group.  This is very useful when you use something
25307 like the tick mark @samp{!} to mark ham---the article will be placed
25308 in your @code{ham-process-destination}, unmarked as if it came fresh
25309 from the mail server.
25310
25311 @vindex spam-autodetect-recheck-messages
25312 When autodetecting spam, this variable tells @code{spam.el} whether
25313 only unseen articles or all unread articles should be checked for
25314 spam.  It is recommended that you leave it off.
25315
25316 @node Spam Package Configuration Examples
25317 @subsection Spam Package Configuration Examples
25318 @cindex spam filtering
25319 @cindex spam filtering configuration examples
25320 @cindex spam configuration examples
25321 @cindex spam
25322
25323 @subsubheading Ted's setup
25324
25325 From Ted Zlatanov <tzz@@lifelogs.com>.
25326 @example
25327 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
25328 ;; @r{see @file{gnus-registry.el} for more information}
25329 (gnus-registry-initialize)
25330 (spam-initialize)
25331
25332 (setq
25333  spam-log-to-registry t     ; @r{for spam autodetection}
25334  spam-use-BBDB t
25335  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
25336  ;; @r{all groups with @samp{spam} in the name contain spam}
25337  gnus-spam-newsgroup-contents
25338   '(("spam" gnus-group-spam-classification-spam))
25339  ;; @r{see documentation for these}
25340  spam-move-spam-nonspam-groups-only nil
25341  spam-mark-only-unseen-as-spam t
25342  spam-mark-ham-unread-before-move-from-spam-group t
25343  nnimap-split-rule 'nnimap-split-fancy
25344  ;; @r{understand what this does before you copy it to your own setup!}
25345  nnimap-split-fancy '(|
25346                       ;; @r{trace references to parents and put in their group}
25347                       (: gnus-registry-split-fancy-with-parent)
25348                       ;; @r{this will catch server-side SpamAssassin tags}
25349                       (: spam-split 'spam-use-regex-headers)
25350                       (any "ding" "ding")
25351                       ;; @r{note that spam by default will go to @samp{spam}}
25352                       (: spam-split)
25353                       ;; @r{default mailbox}
25354                       "mail"))
25355
25356 ;; @r{my parameters, set with @kbd{G p}}
25357
25358 ;; @r{all nnml groups, and all nnimap groups except}
25359 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
25360 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
25361 ;; @r{because it must have been detected manually}
25362
25363 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25364
25365 ;; @r{all @acronym{NNTP} groups}
25366 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
25367 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
25368 ;; @r{send all spam to the training group}
25369  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25370
25371 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
25372 ((spam-autodetect . t))
25373
25374 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
25375
25376 ;; @r{this is a spam group}
25377 ((spam-contents gnus-group-spam-classification-spam)
25378
25379  ;; @r{any spam (which happens when I enter for all unseen messages,}
25380  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
25381  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
25382
25383  (spam-process-destination "nnimap+mail.lifelogs.com:train")
25384
25385  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
25386  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
25387
25388  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
25389                           "nnimap+mail.lifelogs.com:trainham")
25390  ;; @r{in this group, only @samp{!} marks are ham}
25391  (ham-marks
25392   (gnus-ticked-mark))
25393  ;; @r{remembers senders in the blacklist on the way out---this is}
25394  ;; @r{definitely not needed, it just makes me feel better}
25395  (spam-process (gnus-group-spam-exit-processor-blacklist)))
25396
25397 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
25398 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
25399 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
25400
25401 @end example
25402
25403 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
25404 From Reiner Steib <reiner.steib@@gmx.de>.
25405
25406 My provider has set up bogofilter (in combination with @acronym{DCC}) on
25407 the mail server (@acronym{IMAP}).  Recognized spam goes to
25408 @samp{spam.detected}, the rest goes through the normal filter rules,
25409 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
25410 positives or negatives is done by copying or moving the article to
25411 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
25412 the server feeds those to bogofilter with the suitable ham or spam
25413 options and deletes them from the @samp{training.ham} and
25414 @samp{training.spam} folders.
25415
25416 With the following entries in @code{gnus-parameters}, @code{spam.el}
25417 does most of the job for me:
25418
25419 @lisp
25420    ("nnimap:spam\\.detected"
25421     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
25422     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
25423     (spam-contents gnus-group-spam-classification-spam))
25424    ("nnimap:\\(INBOX\\|other-folders\\)"
25425     (spam-process-destination . "nnimap:training.spam")
25426     (spam-contents gnus-group-spam-classification-ham))
25427 @end lisp
25428
25429 @itemize
25430
25431 @item @b{The Spam folder:}
25432
25433 In the folder @samp{spam.detected}, I have to check for false positives
25434 (i.e. legitimate mails, that were wrongly judged as spam by
25435 bogofilter or DCC).
25436
25437 Because of the @code{gnus-group-spam-classification-spam} entry, all
25438 messages are marked as spam (with @code{$}).  When I find a false
25439 positive, I mark the message with some other ham mark
25440 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
25441 those messages are copied to both groups, @samp{INBOX} (where I want
25442 to have the article) and @samp{training.ham} (for training bogofilter)
25443 and deleted from the @samp{spam.detected} folder.
25444
25445 The @code{gnus-article-sort-by-chars} entry simplifies detection of
25446 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
25447 have a similar size.  Grouping them by size (i.e. chars) makes finding
25448 other false positives easier.  (Of course worms aren't @i{spam}
25449 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
25450 an excellent tool for filtering those unwanted mails for me.)
25451
25452 @item @b{Ham folders:}
25453
25454 In my ham folders, I just hit @kbd{S x}
25455 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
25456 mail (false negative).  On group exit, those messages are moved to
25457 @samp{training.spam}.
25458 @end itemize
25459
25460 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
25461
25462 From Reiner Steib <reiner.steib@@gmx.de>.
25463
25464 With following entry in @code{gnus-parameters}, @kbd{S x}
25465 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
25466 groups as spam and reports the to Gmane at group exit:
25467
25468 @lisp
25469    ("^gmane\\."
25470     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
25471 @end lisp
25472
25473 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
25474 because I don't read the groups directly from news.gmane.org, but
25475 through my local news server (leafnode).  I.e. the article numbers are
25476 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
25477 the @code{X-Report-Spam} header to find the correct number.
25478
25479 @node Spam Back Ends
25480 @subsection Spam Back Ends
25481 @cindex spam back ends
25482
25483 The spam package offers a variety of back ends for detecting spam.
25484 Each back end defines a set of methods for detecting spam
25485 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
25486 and a pair of spam and ham processors (@pxref{Spam and Ham
25487 Processors}).
25488
25489 @menu
25490 * Blacklists and Whitelists::
25491 * BBDB Whitelists::
25492 * Gmane Spam Reporting::
25493 * Anti-spam Hashcash Payments::
25494 * Blackholes::
25495 * Regular Expressions Header Matching::
25496 * Bogofilter::
25497 * SpamAssassin back end::
25498 * ifile spam filtering::
25499 * Spam Statistics Filtering::
25500 * SpamOracle::
25501 @end menu
25502
25503 @node Blacklists and Whitelists
25504 @subsubsection Blacklists and Whitelists
25505 @cindex spam filtering
25506 @cindex whitelists, spam filtering
25507 @cindex blacklists, spam filtering
25508 @cindex spam
25509
25510 @defvar spam-use-blacklist
25511
25512 Set this variable to @code{t} if you want to use blacklists when
25513 splitting incoming mail.  Messages whose senders are in the blacklist
25514 will be sent to the @code{spam-split-group}.  This is an explicit
25515 filter, meaning that it acts only on mail senders @emph{declared} to
25516 be spammers.
25517
25518 @end defvar
25519
25520 @defvar spam-use-whitelist
25521
25522 Set this variable to @code{t} if you want to use whitelists when
25523 splitting incoming mail.  Messages whose senders are not in the
25524 whitelist will be sent to the next spam-split rule.  This is an
25525 explicit filter, meaning that unless someone is in the whitelist, their
25526 messages are not assumed to be spam or ham.
25527
25528 @end defvar
25529
25530 @defvar spam-use-whitelist-exclusive
25531
25532 Set this variable to @code{t} if you want to use whitelists as an
25533 implicit filter, meaning that every message will be considered spam
25534 unless the sender is in the whitelist.  Use with care.
25535
25536 @end defvar
25537
25538 @defvar gnus-group-spam-exit-processor-blacklist
25539
25540 Add this symbol to a group's @code{spam-process} parameter by
25541 customizing the group parameters or the
25542 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25543 added to a group's @code{spam-process} parameter, the senders of
25544 spam-marked articles will be added to the blacklist.
25545
25546 @emph{WARNING}
25547
25548 Instead of the obsolete
25549 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
25550 that you use @code{(spam spam-use-blacklist)}.  Everything will work
25551 the same way, we promise.
25552
25553 @end defvar
25554
25555 @defvar gnus-group-ham-exit-processor-whitelist
25556
25557 Add this symbol to a group's @code{spam-process} parameter by
25558 customizing the group parameters or the
25559 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25560 added to a group's @code{spam-process} parameter, the senders of
25561 ham-marked articles in @emph{ham} groups will be added to the
25562 whitelist.
25563
25564 @emph{WARNING}
25565
25566 Instead of the obsolete
25567 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
25568 that you use @code{(ham spam-use-whitelist)}.  Everything will work
25569 the same way, we promise.
25570
25571 @end defvar
25572
25573 Blacklists are lists of regular expressions matching addresses you
25574 consider to be spam senders.  For instance, to block mail from any
25575 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
25576 blacklist.  You start out with an empty blacklist.  Blacklist entries
25577 use the Emacs regular expression syntax.
25578
25579 Conversely, whitelists tell Gnus what addresses are considered
25580 legitimate.  All messages from whitelisted addresses are considered
25581 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
25582 Emacs regular expression syntax.
25583
25584 The blacklist and whitelist file locations can be customized with the
25585 @code{spam-directory} variable (@file{~/News/spam} by default), or
25586 the @code{spam-whitelist} and @code{spam-blacklist} variables
25587 directly.  The whitelist and blacklist files will by default be in the
25588 @code{spam-directory} directory, named @file{whitelist} and
25589 @file{blacklist} respectively.
25590
25591 @node BBDB Whitelists
25592 @subsubsection BBDB Whitelists
25593 @cindex spam filtering
25594 @cindex BBDB whitelists, spam filtering
25595 @cindex BBDB, spam filtering
25596 @cindex spam
25597
25598 @defvar spam-use-BBDB
25599
25600 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
25601 Whitelists}), but uses the BBDB as the source of whitelisted
25602 addresses, without regular expressions.  You must have the BBDB loaded
25603 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
25604 not in the BBDB will be sent to the next spam-split rule.  This is an
25605 explicit filter, meaning that unless someone is in the BBDB, their
25606 messages are not assumed to be spam or ham.
25607
25608 @end defvar
25609
25610 @defvar spam-use-BBDB-exclusive
25611
25612 Set this variable to @code{t} if you want to use the BBDB as an
25613 implicit filter, meaning that every message will be considered spam
25614 unless the sender is in the BBDB.  Use with care.  Only sender
25615 addresses in the BBDB will be allowed through; all others will be
25616 classified as spammers.
25617
25618 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
25619 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
25620 @emph{not} a separate back end.  If you set
25621 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
25622 will be exclusive.
25623
25624 @end defvar
25625
25626 @defvar gnus-group-ham-exit-processor-BBDB
25627
25628 Add this symbol to a group's @code{spam-process} parameter by
25629 customizing the group parameters or the
25630 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25631 added to a group's @code{spam-process} parameter, the senders of
25632 ham-marked articles in @emph{ham} groups will be added to the
25633 BBDB.
25634
25635 @emph{WARNING}
25636
25637 Instead of the obsolete
25638 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
25639 that you use @code{(ham spam-use-BBDB)}.  Everything will work
25640 the same way, we promise.
25641
25642 @end defvar
25643
25644 @node Gmane Spam Reporting
25645 @subsubsection Gmane Spam Reporting
25646 @cindex spam reporting
25647 @cindex Gmane, spam reporting
25648 @cindex Gmane, spam reporting
25649 @cindex spam
25650
25651 @defvar gnus-group-spam-exit-processor-report-gmane
25652
25653 Add this symbol to a group's @code{spam-process} parameter by
25654 customizing the group parameters or the
25655 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25656 added to a group's @code{spam-process} parameter, the spam-marked
25657 articles groups will be reported to the Gmane administrators via a
25658 HTTP request.
25659
25660 Gmane can be found at @uref{http://gmane.org}.
25661
25662 @emph{WARNING}
25663
25664 Instead of the obsolete
25665 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
25666 that you use @code{(spam spam-use-gmane)}.  Everything will work the
25667 same way, we promise.
25668
25669 @end defvar
25670
25671 @defvar spam-report-gmane-use-article-number
25672
25673 This variable is @code{t} by default.  Set it to @code{nil} if you are
25674 running your own news server, for instance, and the local article
25675 numbers don't correspond to the Gmane article numbers.  When
25676 @code{spam-report-gmane-use-article-number} is @code{nil},
25677 @code{spam-report.el} will fetch the number from the article headers.
25678
25679 @end defvar
25680
25681 @defvar spam-report-user-mail-address
25682
25683 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
25684 the Gmane administrators to contact you in case of misreports.  The
25685 default is @code{user-mail-address}.
25686
25687 @end defvar
25688
25689 @node Anti-spam Hashcash Payments
25690 @subsubsection Anti-spam Hashcash Payments
25691 @cindex spam filtering
25692 @cindex hashcash, spam filtering
25693 @cindex spam
25694
25695 @defvar spam-use-hashcash
25696
25697 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
25698 Whitelists}), but uses hashcash tokens for whitelisting messages
25699 instead of the sender address.  Messages without a hashcash payment
25700 token will be sent to the next spam-split rule.  This is an explicit
25701 filter, meaning that unless a hashcash token is found, the messages
25702 are not assumed to be spam or ham.
25703
25704 @end defvar
25705
25706 @node Blackholes
25707 @subsubsection Blackholes
25708 @cindex spam filtering
25709 @cindex blackholes, spam filtering
25710 @cindex spam
25711
25712 @defvar spam-use-blackholes
25713
25714 This option is disabled by default.  You can let Gnus consult the
25715 blackhole-type distributed spam processing systems (DCC, for instance)
25716 when you set this option.  The variable @code{spam-blackhole-servers}
25717 holds the list of blackhole servers Gnus will consult.  The current
25718 list is fairly comprehensive, but make sure to let us know if it
25719 contains outdated servers.
25720
25721 The blackhole check uses the @code{dig.el} package, but you can tell
25722 @code{spam.el} to use @code{dns.el} instead for better performance if
25723 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
25724 this time to set @code{spam-use-dig} to @code{nil} despite the
25725 possible performance improvements, because some users may be unable to
25726 use it, but you can try it and see if it works for you.
25727
25728 @end defvar
25729
25730 @defvar spam-blackhole-servers
25731
25732 The list of servers to consult for blackhole checks.
25733
25734 @end defvar
25735
25736 @defvar spam-blackhole-good-server-regex
25737
25738 A regular expression for IPs that should not be checked against the
25739 blackhole server list.  When set to @code{nil}, it has no effect.
25740
25741 @end defvar
25742
25743 @defvar spam-use-dig
25744
25745 Use the @code{dig.el} package instead of the @code{dns.el} package.
25746 The default setting of @code{t} is recommended.
25747
25748 @end defvar
25749
25750 Blackhole checks are done only on incoming mail.  There is no spam or
25751 ham processor for blackholes.
25752
25753 @node Regular Expressions Header Matching
25754 @subsubsection Regular Expressions Header Matching
25755 @cindex spam filtering
25756 @cindex regular expressions header matching, spam filtering
25757 @cindex spam
25758
25759 @defvar spam-use-regex-headers
25760
25761 This option is disabled by default.  You can let Gnus check the
25762 message headers against lists of regular expressions when you set this
25763 option.  The variables @code{spam-regex-headers-spam} and
25764 @code{spam-regex-headers-ham} hold the list of regular expressions.
25765 Gnus will check against the message headers to determine if the
25766 message is spam or ham, respectively.
25767
25768 @end defvar
25769
25770 @defvar spam-regex-headers-spam
25771
25772 The list of regular expressions that, when matched in the headers of
25773 the message, positively identify it as spam.
25774
25775 @end defvar
25776
25777 @defvar spam-regex-headers-ham
25778
25779 The list of regular expressions that, when matched in the headers of
25780 the message, positively identify it as ham.
25781
25782 @end defvar
25783
25784 Regular expression header checks are done only on incoming mail.
25785 There is no specific spam or ham processor for regular expressions.
25786
25787 @node Bogofilter
25788 @subsubsection Bogofilter
25789 @cindex spam filtering
25790 @cindex bogofilter, spam filtering
25791 @cindex spam
25792
25793 @defvar spam-use-bogofilter
25794
25795 Set this variable if you want @code{spam-split} to use Eric Raymond's
25796 speedy Bogofilter.
25797
25798 With a minimum of care for associating the @samp{$} mark for spam
25799 articles only, Bogofilter training all gets fairly automatic.  You
25800 should do this until you get a few hundreds of articles in each
25801 category, spam or not.  The command @kbd{S t} in summary mode, either
25802 for debugging or for curiosity, shows the @emph{spamicity} score of
25803 the current article (between 0.0 and 1.0).
25804
25805 Bogofilter determines if a message is spam based on a specific
25806 threshold.  That threshold can be customized, consult the Bogofilter
25807 documentation.
25808
25809 If the @code{bogofilter} executable is not in your path, Bogofilter
25810 processing will be turned off.
25811
25812 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25813
25814 @end defvar
25815
25816 @table @kbd
25817 @item M s t
25818 @itemx S t
25819 @kindex M s t
25820 @kindex S t
25821 @findex spam-bogofilter-score
25822 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25823 @end table
25824
25825 @defvar spam-use-bogofilter-headers
25826
25827 Set this variable if you want @code{spam-split} to use Eric Raymond's
25828 speedy Bogofilter, looking only at the message headers.  It works
25829 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25830 must be in the message already.  Normally you would do this with a
25831 procmail recipe or something similar; consult the Bogofilter
25832 installation documents for details.
25833
25834 You should not enable this if you use @code{spam-use-bogofilter}.
25835
25836 @end defvar
25837
25838 @defvar gnus-group-spam-exit-processor-bogofilter
25839 Add this symbol to a group's @code{spam-process} parameter by
25840 customizing the group parameters or the
25841 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25842 added to a group's @code{spam-process} parameter, spam-marked articles
25843 will be added to the Bogofilter spam database.
25844
25845 @emph{WARNING}
25846
25847 Instead of the obsolete
25848 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25849 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25850 the same way, we promise.
25851 @end defvar
25852
25853 @defvar gnus-group-ham-exit-processor-bogofilter
25854 Add this symbol to a group's @code{spam-process} parameter by
25855 customizing the group parameters or the
25856 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25857 added to a group's @code{spam-process} parameter, the ham-marked
25858 articles in @emph{ham} groups will be added to the Bogofilter database
25859 of non-spam messages.
25860
25861 @emph{WARNING}
25862
25863 Instead of the obsolete
25864 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25865 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25866 the same way, we promise.
25867 @end defvar
25868
25869 @defvar spam-bogofilter-database-directory
25870
25871 This is the directory where Bogofilter will store its databases.  It
25872 is not specified by default, so Bogofilter will use its own default
25873 database directory.
25874
25875 @end defvar
25876
25877 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25878 purpose.  A ham and a spam processor are provided, plus the
25879 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25880 variables to indicate to spam-split that Bogofilter should either be
25881 used, or has already been used on the article.  The 0.9.2.1 version of
25882 Bogofilter was used to test this functionality.
25883
25884 @node SpamAssassin back end
25885 @subsubsection SpamAssassin back end
25886 @cindex spam filtering
25887 @cindex spamassassin, spam filtering
25888 @cindex spam
25889
25890 @defvar spam-use-spamassassin
25891
25892 Set this variable if you want @code{spam-split} to use SpamAssassin.
25893
25894 SpamAssassin assigns a score to each article based on a set of rules
25895 and tests, including a Bayesian filter.  The Bayesian filter can be
25896 trained by associating the @samp{$} mark for spam articles.  The
25897 spam score can be viewed by using the command @kbd{S t} in summary
25898 mode.
25899
25900 If you set this variable, each article will be processed by
25901 SpamAssassin when @code{spam-split} is called.  If your mail is
25902 preprocessed by SpamAssassin, and you want to just use the
25903 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25904 instead.
25905
25906 You should not enable this if you use
25907 @code{spam-use-spamassassin-headers}.
25908
25909 @end defvar
25910
25911 @defvar spam-use-spamassassin-headers
25912
25913 Set this variable if your mail is preprocessed by SpamAssassin and
25914 want @code{spam-split} to split based on the SpamAssassin headers.
25915
25916 You should not enable this if you use @code{spam-use-spamassassin}.
25917
25918 @end defvar
25919
25920 @defvar spam-spamassassin-program
25921
25922 This variable points to the SpamAssassin executable.  If you have
25923 @code{spamd} running, you can set this variable to the @code{spamc}
25924 executable for faster processing.  See the SpamAssassin documentation
25925 for more information on @code{spamd}/@code{spamc}.
25926
25927 @end defvar
25928
25929 SpamAssassin is a powerful and flexible spam filter that uses a wide
25930 variety of tests to identify spam.  A ham and a spam processors are
25931 provided, plus the @code{spam-use-spamassassin} and
25932 @code{spam-use-spamassassin-headers} variables to indicate to
25933 spam-split that SpamAssassin should be either used, or has already
25934 been used on the article.  The 2.63 version of SpamAssassin was used
25935 to test this functionality.
25936
25937 @node ifile spam filtering
25938 @subsubsection ifile spam filtering
25939 @cindex spam filtering
25940 @cindex ifile, spam filtering
25941 @cindex spam
25942
25943 @defvar spam-use-ifile
25944
25945 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25946 statistical analyzer similar to Bogofilter.
25947
25948 @end defvar
25949
25950 @defvar spam-ifile-all-categories
25951
25952 Enable this variable if you want @code{spam-use-ifile} to give you all
25953 the ifile categories, not just spam/non-spam.  If you use this, make
25954 sure you train ifile as described in its documentation.
25955
25956 @end defvar
25957
25958 @defvar spam-ifile-spam-category
25959
25960 This is the category of spam messages as far as ifile is concerned.
25961 The actual string used is irrelevant, but you probably want to leave
25962 the default value of @samp{spam}.
25963 @end defvar
25964
25965 @defvar spam-ifile-database
25966
25967 This is the filename for the ifile database.  It is not specified by
25968 default, so ifile will use its own default database name.
25969
25970 @end defvar
25971
25972 The ifile mail classifier is similar to Bogofilter in intent and
25973 purpose.  A ham and a spam processor are provided, plus the
25974 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25975 should be used.  The 1.2.1 version of ifile was used to test this
25976 functionality.
25977
25978 @node Spam Statistics Filtering
25979 @subsubsection Spam Statistics Filtering
25980 @cindex spam filtering
25981 @cindex spam-stat, spam filtering
25982 @cindex spam-stat
25983 @cindex spam
25984
25985 This back end uses the Spam Statistics Emacs Lisp package to perform
25986 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
25987 using this, you may want to perform some additional steps to
25988 initialize your Spam Statistics dictionary.  @xref{Creating a
25989 spam-stat dictionary}.
25990
25991 @defvar spam-use-stat
25992
25993 @end defvar
25994
25995 @defvar gnus-group-spam-exit-processor-stat
25996 Add this symbol to a group's @code{spam-process} parameter by
25997 customizing the group parameters or the
25998 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25999 added to a group's @code{spam-process} parameter, the spam-marked
26000 articles will be added to the spam-stat database of spam messages.
26001
26002 @emph{WARNING}
26003
26004 Instead of the obsolete
26005 @code{gnus-group-spam-exit-processor-stat}, it is recommended
26006 that you use @code{(spam spam-use-stat)}.  Everything will work
26007 the same way, we promise.
26008 @end defvar
26009
26010 @defvar gnus-group-ham-exit-processor-stat
26011 Add this symbol to a group's @code{spam-process} parameter by
26012 customizing the group parameters or the
26013 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
26014 added to a group's @code{spam-process} parameter, the ham-marked
26015 articles in @emph{ham} groups will be added to the spam-stat database
26016 of non-spam messages.
26017
26018 @emph{WARNING}
26019
26020 Instead of the obsolete
26021 @code{gnus-group-ham-exit-processor-stat}, it is recommended
26022 that you use @code{(ham spam-use-stat)}.  Everything will work
26023 the same way, we promise.
26024 @end defvar
26025
26026 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
26027 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
26028 which unlike ifile or Bogofilter does not require external programs.
26029 A spam and a ham processor, and the @code{spam-use-stat} variable for
26030 @code{spam-split} are provided.
26031
26032 @node SpamOracle
26033 @subsubsection Using SpamOracle with Gnus
26034 @cindex spam filtering
26035 @cindex SpamOracle
26036 @cindex spam
26037
26038 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
26039 statistical mail filtering tool written by Xavier Leroy and needs to be
26040 installed separately.
26041
26042 There are several ways to use SpamOracle with Gnus.  In all cases, your
26043 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
26044 then enter an @samp{X-Spam} header indicating whether it regards the
26045 mail as a spam mail or not.
26046
26047 One possibility is to run SpamOracle as a @code{:prescript} from the
26048 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
26049 the advantage that the user can see the @emph{X-Spam} headers.
26050
26051 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
26052 call SpamOracle.
26053
26054 @vindex spam-use-spamoracle
26055 To enable SpamOracle usage by @code{spam.el}, set the variable
26056 @code{spam-use-spamoracle} to @code{t} and configure the
26057 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
26058 Package}.  In this example the @samp{INBOX} of an nnimap server is
26059 filtered using SpamOracle.  Mails recognized as spam mails will be
26060 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
26061 messages stay in @samp{INBOX}:
26062
26063 @example
26064 (setq spam-use-spamoracle t
26065       spam-split-group "Junk"
26066       nnimap-split-inbox '("INBOX")
26067       nnimap-split-rule 'nnimap-split-fancy
26068       nnimap-split-fancy '(| (: spam-split) "INBOX"))
26069 @end example
26070
26071 @defvar spam-use-spamoracle
26072 Set to @code{t} if you want Gnus to enable spam filtering using
26073 SpamOracle.
26074 @end defvar
26075
26076 @defvar spam-spamoracle-binary
26077 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
26078 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
26079 can be customized.
26080 @end defvar
26081
26082 @defvar spam-spamoracle-database
26083 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
26084 store its analysis.  This is controlled by the variable
26085 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
26086 the default SpamOracle database will be used.  In case you want your
26087 database to live somewhere special, set
26088 @code{spam-spamoracle-database} to this path.
26089 @end defvar
26090
26091 SpamOracle employs a statistical algorithm to determine whether a
26092 message is spam or ham.  In order to get good results, meaning few
26093 false hits or misses, SpamOracle needs training.  SpamOracle learns
26094 the characteristics of your spam mails.  Using the @emph{add} mode
26095 (training mode) one has to feed good (ham) and spam mails to
26096 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
26097 buffer and pipe the mail to a SpamOracle process or using
26098 @file{spam.el}'s spam- and ham-processors, which is much more
26099 convenient.  For a detailed description of spam- and ham-processors,
26100 @xref{Spam Package}.
26101
26102 @defvar gnus-group-spam-exit-processor-spamoracle
26103 Add this symbol to a group's @code{spam-process} parameter by
26104 customizing the group parameter or the
26105 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
26106 to a group's @code{spam-process} parameter, spam-marked articles will be
26107 sent to SpamOracle as spam samples.
26108
26109 @emph{WARNING}
26110
26111 Instead of the obsolete
26112 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
26113 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
26114 the same way, we promise.
26115 @end defvar
26116
26117 @defvar gnus-group-ham-exit-processor-spamoracle
26118 Add this symbol to a group's @code{spam-process} parameter by
26119 customizing the group parameter or the
26120 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
26121 to a group's @code{spam-process} parameter, the ham-marked articles in
26122 @emph{ham} groups will be sent to the SpamOracle as samples of ham
26123 messages.
26124
26125 @emph{WARNING}
26126
26127 Instead of the obsolete
26128 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
26129 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
26130 the same way, we promise.
26131 @end defvar
26132
26133 @emph{Example:} These are the Group Parameters of a group that has been
26134 classified as a ham group, meaning that it should only contain ham
26135 messages.
26136 @example
26137  ((spam-contents gnus-group-spam-classification-ham)
26138   (spam-process ((ham spam-use-spamoracle)
26139                  (spam spam-use-spamoracle))))
26140 @end example
26141 For this group the @code{spam-use-spamoracle} is installed for both
26142 ham and spam processing.  If the group contains spam message
26143 (e.g. because SpamOracle has not had enough sample messages yet) and
26144 the user marks some messages as spam messages, these messages will be
26145 processed by SpamOracle.  The processor sends the messages to
26146 SpamOracle as new samples for spam.
26147
26148 @node Extending the Spam package
26149 @subsection Extending the Spam package
26150 @cindex spam filtering
26151 @cindex spam elisp package, extending
26152 @cindex extending the spam elisp package
26153
26154 Say you want to add a new back end called blackbox.  For filtering
26155 incoming mail, provide the following:
26156
26157 @enumerate
26158
26159 @item
26160 Code
26161
26162 @lisp
26163 (defvar spam-use-blackbox nil
26164   "True if blackbox should be used.")
26165 @end lisp
26166
26167 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
26168
26169 Write @code{spam-blackbox-register-routine} and
26170 @code{spam-blackbox-unregister-routine} using the bogofilter
26171 register/unregister routines as a start, or other restister/unregister
26172 routines more appropriate to Blackbox, if Blackbox can
26173 register/unregister spam and ham.
26174
26175 @item
26176 Functionality
26177
26178 The @code{spam-check-blackbox} function should return @samp{nil} or
26179 @code{spam-split-group}, observing the other conventions.  See the
26180 existing @code{spam-check-*} functions for examples of what you can
26181 do, and stick to the template unless you fully understand the reasons
26182 why you aren't.
26183
26184 @end enumerate
26185
26186 For processing spam and ham messages, provide the following:
26187
26188 @enumerate
26189
26190 @item
26191 Code
26192
26193 Note you don't have to provide a spam or a ham processor.  Only
26194 provide them if Blackbox supports spam or ham processing.
26195
26196 Also, ham and spam processors are being phased out as single
26197 variables.  Instead the form @code{(spam spam-use-blackbox)} or
26198 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
26199 processor variables are still around but they won't be for long.
26200
26201 @lisp
26202 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
26203   "The Blackbox summary exit spam processor.
26204 Only applicable to spam groups.")
26205
26206 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
26207   "The whitelist summary exit ham processor.
26208 Only applicable to non-spam (unclassified and ham) groups.")
26209
26210 @end lisp
26211
26212 @item
26213 Gnus parameters
26214
26215 Add
26216 @lisp
26217 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
26218 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
26219 @end lisp
26220 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
26221 sure you do it twice, once for the parameter and once for the
26222 variable customization.
26223
26224 Add
26225 @lisp
26226 (variable-item spam-use-blackbox)
26227 @end lisp
26228 to the @code{spam-autodetect-methods} group parameter in
26229 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
26230
26231 Finally, use the appropriate @code{spam-install-*-backend} function in
26232 @code{spam.el}.  Here are the available functions.
26233
26234
26235 @enumerate
26236
26237 @item
26238 @code{spam-install-backend-alias}
26239
26240 This function will simply install an alias for a back end that does
26241 everything like the original back end.  It is currently only used to
26242 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
26243
26244 @item
26245 @code{spam-install-nocheck-backend}
26246
26247 This function installs a back end that has no check function, but can
26248 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
26249 such a back end.
26250
26251 @item
26252 @code{spam-install-checkonly-backend}
26253
26254 This function will install a back end that can only check incoming mail
26255 for spam contents.  It can't register or unregister messages.
26256 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
26257 back ends.
26258
26259 @item
26260 @code{spam-install-statistical-checkonly-backend}
26261
26262 This function installs a statistical back end (one which requires the
26263 full body of a message to check it) that can only check incoming mail
26264 for contents.  @code{spam-use-regex-body} is such a filter.
26265
26266 @item
26267 @code{spam-install-statistical-backend}
26268
26269 This function install a statistical back end with incoming checks and
26270 registration/unregistration routines.  @code{spam-use-bogofilter} is
26271 set up this way.
26272
26273 @item
26274 @code{spam-install-backend}
26275
26276 This is the most normal back end installation, where a back end that can
26277 check and register/unregister messages is set up without statistical
26278 abilities.  The @code{spam-use-BBDB} is such a back end.
26279
26280 @item
26281 @code{spam-install-mover-backend}
26282
26283 Mover back ends are internal to @code{spam.el} and specifically move
26284 articles around when the summary is exited.  You will very probably
26285 never install such a back end.
26286 @end enumerate
26287
26288 @end enumerate
26289
26290 @node Spam Statistics Package
26291 @subsection Spam Statistics Package
26292 @cindex Paul Graham
26293 @cindex Graham, Paul
26294 @cindex naive Bayesian spam filtering
26295 @cindex Bayesian spam filtering, naive
26296 @cindex spam filtering, naive Bayesian
26297
26298 Paul Graham has written an excellent essay about spam filtering using
26299 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
26300 Spam}.  In it he describes the inherent deficiency of rule-based
26301 filtering as used by SpamAssassin, for example: Somebody has to write
26302 the rules, and everybody else has to install these rules.  You are
26303 always late.  It would be much better, he argues, to filter mail based
26304 on whether it somehow resembles spam or non-spam.  One way to measure
26305 this is word distribution.  He then goes on to describe a solution
26306 that checks whether a new mail resembles any of your other spam mails
26307 or not.
26308
26309 The basic idea is this:  Create a two collections of your mail, one
26310 with spam, one with non-spam.  Count how often each word appears in
26311 either collection, weight this by the total number of mails in the
26312 collections, and store this information in a dictionary.  For every
26313 word in a new mail, determine its probability to belong to a spam or a
26314 non-spam mail.  Use the 15 most conspicuous words, compute the total
26315 probability of the mail being spam.  If this probability is higher
26316 than a certain threshold, the mail is considered to be spam.
26317
26318 The Spam Statistics package adds support to Gnus for this kind of
26319 filtering.  It can be used as one of the back ends of the Spam package
26320 (@pxref{Spam Package}), or by itself.
26321
26322 Before using the Spam Statistics package, you need to set it up.
26323 First, you need two collections of your mail, one with spam, one with
26324 non-spam.  Then you need to create a dictionary using these two
26325 collections, and save it.  And last but not least, you need to use
26326 this dictionary in your fancy mail splitting rules.
26327
26328 @menu
26329 * Creating a spam-stat dictionary::
26330 * Splitting mail using spam-stat::
26331 * Low-level interface to the spam-stat dictionary::
26332 @end menu
26333
26334 @node Creating a spam-stat dictionary
26335 @subsubsection Creating a spam-stat dictionary
26336
26337 Before you can begin to filter spam based on statistics, you must
26338 create these statistics based on two mail collections, one with spam,
26339 one with non-spam.  These statistics are then stored in a dictionary
26340 for later use.  In order for these statistics to be meaningful, you
26341 need several hundred emails in both collections.
26342
26343 Gnus currently supports only the nnml back end for automated dictionary
26344 creation.  The nnml back end stores all mails in a directory, one file
26345 per mail.  Use the following:
26346
26347 @defun spam-stat-process-spam-directory
26348 Create spam statistics for every file in this directory.  Every file
26349 is treated as one spam mail.
26350 @end defun
26351
26352 @defun spam-stat-process-non-spam-directory
26353 Create non-spam statistics for every file in this directory.  Every
26354 file is treated as one non-spam mail.
26355 @end defun
26356
26357 Usually you would call @code{spam-stat-process-spam-directory} on a
26358 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
26359 the group @samp{nnml:mail.spam}), and you would call
26360 @code{spam-stat-process-non-spam-directory} on a directory such as
26361 @file{~/Mail/mail/misc} (this usually corresponds to the group
26362 @samp{nnml:mail.misc}).
26363
26364 When you are using @acronym{IMAP}, you won't have the mails available
26365 locally, so that will not work.  One solution is to use the Gnus Agent
26366 to cache the articles.  Then you can use directories such as
26367 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
26368 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
26369
26370 @defvar spam-stat
26371 This variable holds the hash-table with all the statistics---the
26372 dictionary we have been talking about.  For every word in either
26373 collection, this hash-table stores a vector describing how often the
26374 word appeared in spam and often it appeared in non-spam mails.
26375 @end defvar
26376
26377 If you want to regenerate the statistics from scratch, you need to
26378 reset the dictionary.
26379
26380 @defun spam-stat-reset
26381 Reset the @code{spam-stat} hash-table, deleting all the statistics.
26382 @end defun
26383
26384 When you are done, you must save the dictionary.  The dictionary may
26385 be rather large.  If you will not update the dictionary incrementally
26386 (instead, you will recreate it once a month, for example), then you
26387 can reduce the size of the dictionary by deleting all words that did
26388 not appear often enough or that do not clearly belong to only spam or
26389 only non-spam mails.
26390
26391 @defun spam-stat-reduce-size
26392 Reduce the size of the dictionary.  Use this only if you do not want
26393 to update the dictionary incrementally.
26394 @end defun
26395
26396 @defun spam-stat-save
26397 Save the dictionary.
26398 @end defun
26399
26400 @defvar spam-stat-file
26401 The filename used to store the dictionary.  This defaults to
26402 @file{~/.spam-stat.el}.
26403 @end defvar
26404
26405 @node Splitting mail using spam-stat
26406 @subsubsection Splitting mail using spam-stat
26407
26408 This section describes how to use the Spam statistics
26409 @emph{independently} of the @xref{Spam Package}.
26410
26411 First, add the following to your @file{~/.gnus.el} file:
26412
26413 @lisp
26414 (require 'spam-stat)
26415 (spam-stat-load)
26416 @end lisp
26417
26418 This will load the necessary Gnus code, and the dictionary you
26419 created.
26420
26421 Next, you need to adapt your fancy splitting rules:  You need to
26422 determine how to use @code{spam-stat}.  The following examples are for
26423 the nnml back end.  Using the nnimap back end works just as well.  Just
26424 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
26425
26426 In the simplest case, you only have two groups, @samp{mail.misc} and
26427 @samp{mail.spam}.  The following expression says that mail is either
26428 spam or it should go into @samp{mail.misc}.  If it is spam, then
26429 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
26430
26431 @lisp
26432 (setq nnmail-split-fancy
26433       `(| (: spam-stat-split-fancy)
26434           "mail.misc"))
26435 @end lisp
26436
26437 @defvar spam-stat-split-fancy-spam-group
26438 The group to use for spam.  Default is @samp{mail.spam}.
26439 @end defvar
26440
26441 If you also filter mail with specific subjects into other groups, use
26442 the following expression.  Only mails not matching the regular
26443 expression are considered potential spam.
26444
26445 @lisp
26446 (setq nnmail-split-fancy
26447       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
26448           (: spam-stat-split-fancy)
26449           "mail.misc"))
26450 @end lisp
26451
26452 If you want to filter for spam first, then you must be careful when
26453 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
26454 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
26455 non-spam, therefore both should be in your collection of non-spam
26456 mails, when creating the dictionary!
26457
26458 @lisp
26459 (setq nnmail-split-fancy
26460       `(| (: spam-stat-split-fancy)
26461           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26462           "mail.misc"))
26463 @end lisp
26464
26465 You can combine this with traditional filtering.  Here, we move all
26466 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
26467 @code{spam-stat-split-fancy} will never see them, the mails in
26468 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
26469 nor in your collection of non-spam mails, when creating the
26470 dictionary!
26471
26472 @lisp
26473 (setq nnmail-split-fancy
26474       `(| ("Content-Type" "text/html" "mail.spam.filtered")
26475           (: spam-stat-split-fancy)
26476           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26477           "mail.misc"))
26478 @end lisp
26479
26480
26481 @node Low-level interface to the spam-stat dictionary
26482 @subsubsection Low-level interface to the spam-stat dictionary
26483
26484 The main interface to using @code{spam-stat}, are the following functions:
26485
26486 @defun spam-stat-buffer-is-spam
26487 Called in a buffer, that buffer is considered to be a new spam mail.
26488 Use this for new mail that has not been processed before.
26489 @end defun
26490
26491 @defun spam-stat-buffer-is-no-spam
26492 Called in a buffer, that buffer is considered to be a new non-spam
26493 mail.  Use this for new mail that has not been processed before.
26494 @end defun
26495
26496 @defun spam-stat-buffer-change-to-spam
26497 Called in a buffer, that buffer is no longer considered to be normal
26498 mail but spam.  Use this to change the status of a mail that has
26499 already been processed as non-spam.
26500 @end defun
26501
26502 @defun spam-stat-buffer-change-to-non-spam
26503 Called in a buffer, that buffer is no longer considered to be spam but
26504 normal mail.  Use this to change the status of a mail that has already
26505 been processed as spam.
26506 @end defun
26507
26508 @defun spam-stat-save
26509 Save the hash table to the file.  The filename used is stored in the
26510 variable @code{spam-stat-file}.
26511 @end defun
26512
26513 @defun spam-stat-load
26514 Load the hash table from a file.  The filename used is stored in the
26515 variable @code{spam-stat-file}.
26516 @end defun
26517
26518 @defun spam-stat-score-word
26519 Return the spam score for a word.
26520 @end defun
26521
26522 @defun spam-stat-score-buffer
26523 Return the spam score for a buffer.
26524 @end defun
26525
26526 @defun spam-stat-split-fancy
26527 Use this function for fancy mail splitting.  Add the rule @samp{(:
26528 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
26529 @end defun
26530
26531 Make sure you load the dictionary before using it.  This requires the
26532 following in your @file{~/.gnus.el} file:
26533
26534 @lisp
26535 (require 'spam-stat)
26536 (spam-stat-load)
26537 @end lisp
26538
26539 Typical test will involve calls to the following functions:
26540
26541 @smallexample
26542 Reset: (setq spam-stat (make-hash-table :test 'equal))
26543 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26544 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26545 Save table: (spam-stat-save)
26546 File size: (nth 7 (file-attributes spam-stat-file))
26547 Number of words: (hash-table-count spam-stat)
26548 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26549 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26550 Reduce table size: (spam-stat-reduce-size)
26551 Save table: (spam-stat-save)
26552 File size: (nth 7 (file-attributes spam-stat-file))
26553 Number of words: (hash-table-count spam-stat)
26554 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26555 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26556 @end smallexample
26557
26558 Here is how you would create your dictionary:
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 Repeat for any other non-spam group you need...
26565 Reduce table size: (spam-stat-reduce-size)
26566 Save table: (spam-stat-save)
26567 @end smallexample
26568
26569 @node The Gnus Registry
26570 @section The Gnus Registry
26571 @cindex registry
26572 @cindex split
26573 @cindex track
26574
26575 The Gnus registry is a package that tracks messages by their
26576 Message-ID across all backends.  This allows Gnus users to do several
26577 cool things, be the envy of the locals, get free haircuts, and be
26578 experts on world issues.  Well, maybe not all of those, but the
26579 features are pretty cool.
26580
26581 Although they will be explained in detail shortly, here's a quick list
26582 of said features in case your attention span is...  never mind.
26583
26584 @enumerate
26585 @item
26586 Split messages to their parent
26587
26588 This keeps discussions in the same group.  You can use the subject and
26589 the sender in addition to the Message-ID.  Several strategies are
26590 available.
26591
26592 @item
26593 Store custom flags and keywords
26594
26595 The registry can store custom flags and keywords for a message.  For
26596 instance, you can mark a message ``To-Do'' this way and the flag will
26597 persist whether the message is in the nnimap, nnml, nnmaildir,
26598 etc. backends.
26599
26600 @item
26601 Store arbitrary data
26602
26603 Through a simple ELisp API, the registry can remember any data for a
26604 message.  A built-in inverse map, when activated, allows quick lookups
26605 of all messages matching a particular set of criteria.
26606 @end enumerate
26607
26608 @menu
26609 * Setup::
26610 * Fancy splitting to parent::
26611 * Store custom flags and keywords::
26612 * Store arbitrary data::
26613 @end menu
26614
26615 @node Setup
26616 @subsection Setup
26617
26618 Fortunately, setting up the Gnus registry is pretty easy:
26619
26620 @lisp
26621 (setq gnus-registry-max-entries 2500
26622       gnus-registry-use-long-group-names t)
26623
26624 (gnus-registry-initialize)
26625 @end lisp
26626
26627 This adds registry saves to Gnus newsrc saves (which happen on exit
26628 and when you press @kbd{s} from the @code{*Group*} buffer.  It also
26629 adds registry calls to article actions in Gnus (copy, move, etc.)  so
26630 it's not easy to undo the initialization.  See
26631 @code{gnus-registry-initialize} for the gory details.
26632
26633 Here are other settings used by the author of the registry (understand
26634 what they do before you copy them blindly).
26635
26636 @lisp
26637 (setq
26638  gnus-registry-split-strategy 'majority
26639  gnus-registry-ignored-groups '(("nntp" t)
26640                                 ("nnrss" t)
26641                                 ("spam" t)
26642                                 ("train" t))
26643  gnus-registry-max-entries 500000
26644  gnus-registry-use-long-group-names t
26645  gnus-registry-track-extra '(sender subject))
26646 @end lisp
26647
26648 They say: keep a lot of messages around, use long group names, track
26649 messages by sender and subject (not just parent Message-ID), and when
26650 the registry splits incoming mail, use a majority rule to decide where
26651 messages should go if there's more than one possibility.  In addition,
26652 the registry should ignore messages in groups that match ``nntp'',
26653 ``nnrss'', ``spam'', or ``train.''
26654
26655 You are doubtless impressed by all this, but you ask: ``I am a Gnus
26656 user, I customize to live.  Give me more.''  Here you go, these are
26657 the general settings.
26658
26659 @defvar gnus-registry-unfollowed-groups
26660 The groups that will not be followed by
26661 @code{gnus-registry-split-fancy-with-parent}.  They will still be
26662 remembered by the registry.  This is a list of regular expressions.
26663 @end defvar
26664
26665 @defvar gnus-registry-ignored-groups
26666 The groups that will not be remembered by the registry.  This is a
26667 list of regular expressions, also available through Group/Topic
26668 customization (so you can ignore or keep a specific group or a whole
26669 topic).
26670 @end defvar
26671
26672 @defvar gnus-registry-use-long-group-names
26673 Whether the registry will use long group names.  It's recommended to
26674 set this to @code{t}, although everything works if you don't.  Future
26675 functionality will require it.
26676 @end defvar
26677
26678 @defvar gnus-registry-max-entries
26679 The number (an integer or @code{nil} for unlimited) of entries the
26680 registry will keep.
26681 @end defvar
26682
26683 @defvar gnus-registry-cache-file
26684 The file where the registry will be stored between Gnus sessions.
26685 @end defvar
26686
26687 @node Fancy splitting to parent
26688 @subsection Fancy splitting to parent
26689
26690 Simply put, this lets you put followup e-mail where it belongs.
26691
26692 Every message has a Message-ID, which is unique, and the registry
26693 remembers it.  When the message is moved or copied, the registry will
26694 notice this and offer the new group as a choice to the splitting
26695 strategy.
26696
26697 When a followup is made, usually it mentions the original message's
26698 Message-ID in the headers.  The registry knows this and uses that
26699 mention to find the group where the original message lives.  You only
26700 have to put a rule like this:
26701
26702 @lisp
26703 (setq nnimap-my-split-fancy '(|
26704
26705       ;; split to parent: you need this
26706       (: gnus-registry-split-fancy-with-parent)
26707
26708       ;; other rules, as an example
26709       (: spam-split)
26710       ;; default mailbox
26711       "mail")
26712 @end lisp
26713
26714 in your fancy split setup.  In addition, you may want to customize the
26715 following variables.
26716
26717 @defvar gnus-registry-track-extra
26718 This is a list of symbols, so it's best to change it from the
26719 Customize interface.  By default it's @code{nil}, but you may want to
26720 track @code{subject} and @code{sender} as well when splitting by parent.
26721 It may work for you.  It can be annoying if your mail flow is large and
26722 people don't stick to the same groups.
26723 @end defvar
26724
26725 @defvar gnus-registry-split-strategy
26726 This is a symbol, so it's best to change it from the Customize
26727 interface.  By default it's @code{nil}, but you may want to set it to
26728 @code{majority} or @code{first} to split by sender or subject based on
26729 the majority of matches or on the first found.
26730 @end defvar
26731
26732 @node Store custom flags and keywords
26733 @subsection Store custom flags and keywords
26734
26735 The registry lets you set custom flags and keywords per message.  You
26736 can use the Gnus->Registry Marks menu or the @kbd{M M x} keyboard
26737 shortcuts, where @code{x} is the first letter of the mark's name.
26738
26739 @defvar gnus-registry-marks
26740 The custom marks that the registry can use.  You can modify the
26741 default list, if you like.  If you do, you'll have to exit Emacs
26742 before they take effect (you can also unload the registry and reload
26743 it or evaluate the specific macros you'll need, but you probably don't
26744 want to bother).  Use the Customize interface to modify the list.
26745
26746 By default this list has the @code{Important}, @code{Work},
26747 @code{Personal}, @code{To-Do}, and @code{Later} marks.  They all have
26748 keyboard shortcuts like @kbd{M M i} for Important, using the first
26749 letter.
26750 @end defvar
26751
26752 @defun gnus-registry-mark-article
26753 Call this function to mark an article with a custom registry mark.  It
26754 will offer the available marks for completion.
26755 @end defun
26756
26757 @node Store arbitrary data
26758 @subsection Store arbitrary data
26759
26760 The registry has a simple API that uses a Message-ID as the key to
26761 store arbitrary data (as long as it can be converted to a list for
26762 storage).
26763
26764 @defun gnus-registry-store-extra-entry (id key value)
26765 Store @code{value} in the extra data key @code{key} for message
26766 @code{id}.
26767 @end defun
26768
26769 @defun gnus-registry-delete-extra-entry (id key)
26770 Delete the extra data key @code{key} for message @code{id}.
26771 @end defun
26772
26773 @defun gnus-registry-fetch-extra (id key)
26774 Get the extra data key @code{key} for message @code{id}.
26775 @end defun
26776
26777 @defvar gnus-registry-extra-entries-precious
26778 If any extra entries are precious, their presence will make the
26779 registry keep the whole entry forever, even if there are no groups for
26780 the Message-ID and if the size limit of the registry is reached.  By
26781 default this is just @code{(marks)} so the custom registry marks are
26782 precious.
26783 @end defvar
26784
26785 @node Other modes
26786 @section Interaction with other modes
26787
26788 @subsection Dired
26789 @cindex dired
26790
26791 @code{gnus-dired-minor-mode} provides some useful functions for dired
26792 buffers.  It is enabled with
26793 @lisp
26794 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
26795 @end lisp
26796
26797 @table @kbd
26798 @item C-c C-m C-a
26799 @findex gnus-dired-attach
26800 @cindex attachments, selection via dired
26801 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
26802 You will be prompted for a message buffer.
26803
26804 @item C-c C-m C-l
26805 @findex gnus-dired-find-file-mailcap
26806 Visit a file according to the appropriate mailcap entry
26807 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
26808 buffer.
26809
26810 @item C-c C-m C-p
26811 @findex gnus-dired-print
26812 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
26813 there is no print command, print in a PostScript image.
26814 @end table
26815
26816 @node Various Various
26817 @section Various Various
26818 @cindex mode lines
26819 @cindex highlights
26820
26821 @table @code
26822
26823 @item gnus-home-directory
26824 @vindex gnus-home-directory
26825 All Gnus file and directory variables will be initialized from this
26826 variable, which defaults to @file{~/}.
26827
26828 @item gnus-directory
26829 @vindex gnus-directory
26830 Most Gnus storage file and directory variables will be initialized from
26831 this variable, which defaults to the @env{SAVEDIR} environment
26832 variable, or @file{~/News/} if that variable isn't set.
26833
26834 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
26835 This means that other directory variables that are initialized from this
26836 variable won't be set properly if you set this variable in
26837 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
26838
26839 @item gnus-default-directory
26840 @vindex gnus-default-directory
26841 Not related to the above variable at all---this variable says what the
26842 default directory of all Gnus buffers should be.  If you issue commands
26843 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
26844 default directory.  If this variable is @code{nil} (which is the
26845 default), the default directory will be the default directory of the
26846 buffer you were in when you started Gnus.
26847
26848 @item gnus-verbose
26849 @vindex gnus-verbose
26850 This variable is an integer between zero and ten.  The higher the value,
26851 the more messages will be displayed.  If this variable is zero, Gnus
26852 will never flash any messages, if it is seven (which is the default),
26853 most important messages will be shown, and if it is ten, Gnus won't ever
26854 shut up, but will flash so many messages it will make your head swim.
26855
26856 @item gnus-verbose-backends
26857 @vindex gnus-verbose-backends
26858 This variable works the same way as @code{gnus-verbose}, but it applies
26859 to the Gnus back ends instead of Gnus proper.
26860
26861 @item gnus-add-timestamp-to-message
26862 @vindex gnus-add-timestamp-to-message
26863 This variable controls whether to add timestamps to messages that are
26864 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
26865 are issued.  The default value is @code{nil} which means never to add
26866 timestamp.  If it is @code{log}, add timestamps to only the messages
26867 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
26868 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
26869 @code{log}, add timestamps not only to log messages but also to the ones
26870 displayed in the echo area.
26871
26872 @item nnheader-max-head-length
26873 @vindex nnheader-max-head-length
26874 When the back ends read straight heads of articles, they all try to read
26875 as little as possible.  This variable (default 8192) specifies
26876 the absolute max length the back ends will try to read before giving up
26877 on finding a separator line between the head and the body.  If this
26878 variable is @code{nil}, there is no upper read bound.  If it is
26879 @code{t}, the back ends won't try to read the articles piece by piece,
26880 but read the entire articles.  This makes sense with some versions of
26881 @code{ange-ftp} or @code{efs}.
26882
26883 @item nnheader-head-chop-length
26884 @vindex nnheader-head-chop-length
26885 This variable (default 2048) says how big a piece of each article to
26886 read when doing the operation described above.
26887
26888 @item nnheader-file-name-translation-alist
26889 @vindex nnheader-file-name-translation-alist
26890 @cindex file names
26891 @cindex invalid characters in file names
26892 @cindex characters in file names
26893 This is an alist that says how to translate characters in file names.
26894 For instance, if @samp{:} is invalid as a file character in file names
26895 on your system (you OS/2 user you), you could say something like:
26896
26897 @lisp
26898 @group
26899 (setq nnheader-file-name-translation-alist
26900       '((?: . ?_)))
26901 @end group
26902 @end lisp
26903
26904 In fact, this is the default value for this variable on OS/2 and MS
26905 Windows (phooey) systems.
26906
26907 @item gnus-hidden-properties
26908 @vindex gnus-hidden-properties
26909 This is a list of properties to use to hide ``invisible'' text.  It is
26910 @code{(invisible t intangible t)} by default on most systems, which
26911 makes invisible text invisible and intangible.
26912
26913 @item gnus-parse-headers-hook
26914 @vindex gnus-parse-headers-hook
26915 A hook called before parsing headers.  It can be used, for instance, to
26916 gather statistics on the headers fetched, or perhaps you'd like to prune
26917 some headers.  I don't see why you'd want that, though.
26918
26919 @item gnus-shell-command-separator
26920 @vindex gnus-shell-command-separator
26921 String used to separate two shell commands.  The default is @samp{;}.
26922
26923 @item gnus-invalid-group-regexp
26924 @vindex gnus-invalid-group-regexp
26925
26926 Regexp to match ``invalid'' group names when querying user for a group
26927 name.  The default value catches some @strong{really} invalid group
26928 names who could possibly mess up Gnus internally (like allowing
26929 @samp{:} in a group name, which is normally used to delimit method and
26930 group).
26931
26932 @acronym{IMAP} users might want to allow @samp{/} in group names though.
26933
26934 @item gnus-safe-html-newsgroups
26935 @vindex gnus-safe-html-newsgroups
26936 Groups in which links in html articles are considered all safe.  The
26937 value may be a regexp matching those groups, a list of group names, or
26938 @code{nil}.  This overrides @code{mm-w3m-safe-url-regexp}.  The default
26939 value is @code{"\\`nnrss[+:]"}.  This is effective only when emacs-w3m
26940 renders html articles, i.e., in the case @code{mm-text-html-renderer} is
26941 set to @code{w3m}.  @xref{Display Customization, ,Display Customization,
26942 emacs-mime, The Emacs MIME Manual}.
26943
26944 @end table
26945
26946 @node The End
26947 @chapter The End
26948
26949 Well, that's the manual---you can get on with your life now.  Keep in
26950 touch.  Say hello to your cats from me.
26951
26952 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
26953
26954 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
26955
26956 @quotation
26957 @strong{Te Deum}
26958
26959 @sp 1
26960 Not because of victories @*
26961 I sing,@*
26962 having none,@*
26963 but for the common sunshine,@*
26964 the breeze,@*
26965 the largess of the spring.
26966
26967 @sp 1
26968 Not for victory@*
26969 but for the day's work done@*
26970 as well as I was able;@*
26971 not for a seat upon the dais@*
26972 but at the common table.@*
26973 @end quotation
26974
26975
26976 @node Appendices
26977 @chapter Appendices
26978
26979 @menu
26980 * XEmacs::                      Requirements for installing under XEmacs.
26981 * History::                     How Gnus got where it is today.
26982 * On Writing Manuals::          Why this is not a beginner's guide.
26983 * Terminology::                 We use really difficult, like, words here.
26984 * Customization::               Tailoring Gnus to your needs.
26985 * Troubleshooting::             What you might try if things do not work.
26986 * Gnus Reference Guide::        Rilly, rilly technical stuff.
26987 * Emacs for Heathens::          A short introduction to Emacsian terms.
26988 * Frequently Asked Questions::  The Gnus FAQ
26989 @end menu
26990
26991
26992 @node XEmacs
26993 @section XEmacs
26994 @cindex XEmacs
26995 @cindex installing under XEmacs
26996
26997 XEmacs is distributed as a collection of packages.  You should install
26998 whatever packages the Gnus XEmacs package requires.  The current
26999 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
27000 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
27001 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
27002 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
27003
27004
27005 @node History
27006 @section History
27007
27008 @cindex history
27009 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
27010 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
27011
27012 If you want to investigate the person responsible for this outrage,
27013 you can point your (feh!) web browser to
27014 @uref{http://quimby.gnus.org/}.  This is also the primary
27015 distribution point for the new and spiffy versions of Gnus, and is
27016 known as The Site That Destroys Newsrcs And Drives People Mad.
27017
27018 During the first extended alpha period of development, the new Gnus was
27019 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
27020 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
27021 (Besides, the ``Gnus'' in this abbreviation should probably be
27022 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
27023 appropriate name, don't you think?)
27024
27025 In any case, after spending all that energy on coming up with a new and
27026 spunky name, we decided that the name was @emph{too} spunky, so we
27027 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
27028 ``@sc{gnus}''.  New vs. old.
27029
27030 @menu
27031 * Gnus Versions::               What Gnus versions have been released.
27032 * Other Gnus Versions::         Other Gnus versions that also have been released.
27033 * Why?::                        What's the point of Gnus?
27034 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
27035 * Conformity::                  Gnus tries to conform to all standards.
27036 * Emacsen::                     Gnus can be run on a few modern Emacsen.
27037 * Gnus Development::            How Gnus is developed.
27038 * Contributors::                Oodles of people.
27039 * New Features::                Pointers to some of the new stuff in Gnus.
27040 @end menu
27041
27042
27043 @node Gnus Versions
27044 @subsection Gnus Versions
27045 @cindex ding Gnus
27046 @cindex September Gnus
27047 @cindex Red Gnus
27048 @cindex Quassia Gnus
27049 @cindex Pterodactyl Gnus
27050 @cindex Oort Gnus
27051 @cindex No Gnus
27052 @cindex Gnus versions
27053
27054 The first ``proper'' release of Gnus 5 was done in November 1995 when it
27055 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
27056 plus 15 Gnus 5.0 releases).
27057
27058 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
27059 releases)) was released under the name ``Gnus 5.2'' (40 releases).
27060
27061 On July 28th 1996 work on Red Gnus was begun, and it was released on
27062 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
27063
27064 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
27065 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
27066
27067 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
27068 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
27069 1999.
27070
27071 On the 26th of October 2000, Oort Gnus was begun and was released as
27072 Gnus 5.10 on May 1st 2003 (24 releases).
27073
27074 On the January 4th 2004, No Gnus was begun.
27075
27076 On April 19, 2010 Gnus development was moved to Git.  See
27077 http://git.gnus.org for details (http://www.gnus.org will be updated
27078 with the information when possible).
27079
27080 If you happen upon a version of Gnus that has a prefixed name --
27081 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
27082 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
27083 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
27084 you do, don't run.  Walk away, calmly, until you're out of its reach.
27085 Find a proper released version of Gnus and snuggle up to that instead.
27086
27087
27088 @node Other Gnus Versions
27089 @subsection Other Gnus Versions
27090 @cindex Semi-gnus
27091
27092 In addition to the versions of Gnus which have had their releases
27093 coordinated by Lars, one major development has been Semi-gnus from
27094 Japan.  It's based on a library called @acronym{SEMI}, which provides
27095 @acronym{MIME} capabilities.
27096
27097 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
27098 Collectively, they are called ``Semi-gnus'', and different strains are
27099 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
27100 @acronym{MIME} and multilingualization things, especially important for
27101 Japanese users.
27102
27103
27104 @node Why?
27105 @subsection Why?
27106
27107 What's the point of Gnus?
27108
27109 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
27110 newsreader, that lets you do anything you can think of.  That was my
27111 original motivation, but while working on Gnus, it has become clear to
27112 me that this generation of newsreaders really belong in the stone age.
27113 Newsreaders haven't developed much since the infancy of the net.  If the
27114 volume continues to rise with the current rate of increase, all current
27115 newsreaders will be pretty much useless.  How do you deal with
27116 newsgroups that have thousands of new articles each day?  How do you
27117 keep track of millions of people who post?
27118
27119 Gnus offers no real solutions to these questions, but I would very much
27120 like to see Gnus being used as a testing ground for new methods of
27121 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
27122 to separate the newsreader from the back ends, Gnus now offers a simple
27123 interface for anybody who wants to write new back ends for fetching mail
27124 and news from different sources.  I have added hooks for customizations
27125 everywhere I could imagine it being useful.  By doing so, I'm inviting
27126 every one of you to explore and invent.
27127
27128 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
27129 @kbd{C-u 100 M-x all-hail-xemacs}.
27130
27131
27132 @node Compatibility
27133 @subsection Compatibility
27134
27135 @cindex compatibility
27136 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
27137 bindings have been kept.  More key bindings have been added, of course,
27138 but only in one or two obscure cases have old bindings been changed.
27139
27140 Our motto is:
27141 @quotation
27142 @cartouche
27143 @center In a cloud bones of steel.
27144 @end cartouche
27145 @end quotation
27146
27147 All commands have kept their names.  Some internal functions have changed
27148 their names.
27149
27150 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
27151 Articles}.
27152
27153 One major compatibility question is the presence of several summary
27154 buffers.  All variables relevant while reading a group are
27155 buffer-local to the summary buffer they belong in.  Although many
27156 important variables have their values copied into their global
27157 counterparts whenever a command is executed in the summary buffer, this
27158 change might lead to incorrect values being used unless you are careful.
27159
27160 All code that relies on knowledge of @sc{gnus} internals will probably
27161 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
27162 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
27163 maintains a hash table that points to the entries in this alist (which
27164 speeds up many functions), and changing the alist directly will lead to
27165 peculiar results.
27166
27167 @cindex hilit19
27168 @cindex highlighting
27169 Old hilit19 code does not work at all.  In fact, you should probably
27170 remove all hilit code from all Gnus hooks
27171 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
27172 Gnus provides various integrated functions for highlighting.  These are
27173 faster and more accurate.  To make life easier for everybody, Gnus will
27174 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
27175 Away!
27176
27177 Packages like @code{expire-kill} will no longer work.  As a matter of
27178 fact, you should probably remove all old @sc{gnus} packages (and other
27179 code) when you start using Gnus.  More likely than not, Gnus already
27180 does what you have written code to make @sc{gnus} do.  (Snicker.)
27181
27182 Even though old methods of doing things are still supported, only the
27183 new methods are documented in this manual.  If you detect a new method of
27184 doing something while reading this manual, that does not mean you have
27185 to stop doing it the old way.
27186
27187 Gnus understands all @sc{gnus} startup files.
27188
27189 @kindex M-x gnus-bug
27190 @findex gnus-bug
27191 @cindex reporting bugs
27192 @cindex bugs
27193 Overall, a casual user who hasn't written much code that depends on
27194 @sc{gnus} internals should suffer no problems.  If problems occur,
27195 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
27196
27197 @vindex gnus-bug-create-help-buffer
27198 If you are in the habit of sending bug reports @emph{very} often, you
27199 may find the helpful help buffer annoying after a while.  If so, set
27200 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
27201 up at you.
27202
27203
27204 @node Conformity
27205 @subsection Conformity
27206
27207 No rebels without a clue here, ma'am.  We conform to all standards known
27208 to (wo)man.  Except for those standards and/or conventions we disagree
27209 with, of course.
27210
27211 @table @strong
27212
27213 @item RFC (2)822
27214 @cindex RFC 822
27215 @cindex RFC 2822
27216 There are no known breaches of this standard.
27217
27218 @item RFC 1036
27219 @cindex RFC 1036
27220 There are no known breaches of this standard, either.
27221
27222 @item Son-of-RFC 1036
27223 @cindex Son-of-RFC 1036
27224 We do have some breaches to this one.
27225
27226 @table @emph
27227
27228 @item X-Newsreader
27229 @itemx User-Agent
27230 These are considered to be ``vanity headers'', while I consider them
27231 to be consumer information.  After seeing so many badly formatted
27232 articles coming from @code{tin} and @code{Netscape} I know not to use
27233 either of those for posting articles.  I would not have known that if
27234 it wasn't for the @code{X-Newsreader} header.
27235 @end table
27236
27237 @item USEFOR
27238 @cindex USEFOR
27239 USEFOR is an IETF working group writing a successor to RFC 1036, based
27240 on Son-of-RFC 1036.  They have produced a number of drafts proposing
27241 various changes to the format of news articles.  The Gnus towers will
27242 look into implementing the changes when the draft is accepted as an RFC.
27243
27244 @item MIME - RFC 2045-2049 etc
27245 @cindex @acronym{MIME}
27246 All the various @acronym{MIME} RFCs are supported.
27247
27248 @item Disposition Notifications - RFC 2298
27249 Message Mode is able to request notifications from the receiver.
27250
27251 @item PGP - RFC 1991 and RFC 2440
27252 @cindex RFC 1991
27253 @cindex RFC 2440
27254 RFC 1991 is the original @acronym{PGP} message specification,
27255 published as an informational RFC.  RFC 2440 was the follow-up, now
27256 called Open PGP, and put on the Standards Track.  Both document a
27257 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
27258 encoding (signing and encryption) and decoding (verification and
27259 decryption).
27260
27261 @item PGP/MIME - RFC 2015/3156
27262 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
27263 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
27264 Gnus supports both encoding and decoding.
27265
27266 @item S/MIME - RFC 2633
27267 RFC 2633 describes the @acronym{S/MIME} format.
27268
27269 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
27270 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
27271 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
27272 authentication for @acronym{IMAP}.  RFC 2086 describes access control
27273 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
27274 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
27275 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
27276 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
27277
27278 @end table
27279
27280 If you ever notice Gnus acting non-compliant with regards to the texts
27281 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
27282 know.
27283
27284
27285 @node Emacsen
27286 @subsection Emacsen
27287 @cindex Emacsen
27288 @cindex XEmacs
27289 @cindex Mule
27290 @cindex Emacs
27291
27292 This version of Gnus should work on:
27293
27294 @itemize @bullet
27295
27296 @item
27297 Emacs 21.1 and up.
27298
27299 @item
27300 XEmacs 21.4 and up.
27301
27302 @end itemize
27303
27304 This Gnus version will absolutely not work on any Emacsen older than
27305 that.  Not reliably, at least.  Older versions of Gnus may work on older
27306 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
27307 20.7 and XEmacs 21.1.
27308
27309 @c No-merge comment: The paragraph added in v5-10 here must not be
27310 @c synced here!
27311
27312 @node Gnus Development
27313 @subsection Gnus Development
27314
27315 Gnus is developed in a two-phased cycle.  The first phase involves much
27316 discussion on the development mailing list @samp{ding@@gnus.org}, where people
27317 propose changes and new features, post patches and new back ends.  This
27318 phase is called the @dfn{alpha} phase, since the Gnusae released in this
27319 phase are @dfn{alpha releases}, or (perhaps more commonly in other
27320 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
27321 unstable and should not be used by casual users.  Gnus alpha releases
27322 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
27323
27324 After futzing around for 10-100 alpha releases, Gnus is declared
27325 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
27326 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
27327 supposed to be able to use these, and these are mostly discussed on the
27328 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
27329 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
27330 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
27331 in Emacs.
27332
27333 @cindex Incoming*
27334 @vindex mail-source-delete-incoming
27335 Some variable defaults differ between alpha Gnusae and released Gnusae,
27336 in particular, @code{mail-source-delete-incoming}.  This is to prevent
27337 lossage of mail if an alpha release hiccups while handling the mail.
27338 @xref{Mail Source Customization}.
27339
27340 The division of discussion between the ding mailing list and the Gnus
27341 newsgroup is not purely based on publicity concerns.  It's true that
27342 having people write about the horrible things that an alpha Gnus release
27343 can do (sometimes) in a public forum may scare people off, but more
27344 importantly, talking about new experimental features that have been
27345 introduced may confuse casual users.  New features are frequently
27346 introduced, fiddled with, and judged to be found wanting, and then
27347 either discarded or totally rewritten.  People reading the mailing list
27348 usually keep up with these rapid changes, while people on the newsgroup
27349 can't be assumed to do so.
27350
27351 So if you have problems with or questions about the alpha versions,
27352 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
27353 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
27354
27355 @cindex Incoming*
27356 @vindex mail-source-delete-incoming
27357 Some variable defaults differ between alpha Gnusae and released Gnusae,
27358 in particular, @code{mail-source-delete-incoming}.  This is to prevent
27359 lossage of mail if an alpha release hiccups while handling the mail.
27360 @xref{Mail Source Customization}.
27361
27362 @node Contributors
27363 @subsection Contributors
27364 @cindex contributors
27365
27366 The new Gnus version couldn't have been done without the help of all the
27367 people on the (ding) mailing list.  Every day for over a year I have
27368 gotten billions of nice bug reports from them, filling me with joy,
27369 every single one of them.  Smooches.  The people on the list have been
27370 tried beyond endurance, what with my ``oh, that's a neat idea <type
27371 type>, yup, I'll release it right away <ship off> no wait, that doesn't
27372 work at all <type type>, yup, I'll ship that one off right away <ship
27373 off> no, wait, that absolutely does not work'' policy for releases.
27374 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
27375 ``worser''? ``much worser''?  ``worsest''?)
27376
27377 I would like to take this opportunity to thank the Academy for@dots{}  oops,
27378 wrong show.
27379
27380 @itemize @bullet
27381
27382 @item
27383 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
27384
27385 @item
27386 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
27387 nnwarchive and many, many other things connected with @acronym{MIME} and
27388 other types of en/decoding, as well as general bug fixing, new
27389 functionality and stuff.
27390
27391 @item
27392 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
27393 well as numerous other things).
27394
27395 @item
27396 Luis Fernandes---design and graphics.
27397
27398 @item
27399 Joe Reiss---creator of the smiley faces.
27400
27401 @item
27402 Justin Sheehy---the @acronym{FAQ} maintainer.
27403
27404 @item
27405 Erik Naggum---help, ideas, support, code and stuff.
27406
27407 @item
27408 Wes Hardaker---@file{gnus-picon.el} and the manual section on
27409 @dfn{picons} (@pxref{Picons}).
27410
27411 @item
27412 Kim-Minh Kaplan---further work on the picon code.
27413
27414 @item
27415 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
27416
27417 @item
27418 Sudish Joseph---innumerable bug fixes.
27419
27420 @item
27421 Ilja Weis---@file{gnus-topic.el}.
27422
27423 @item
27424 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
27425
27426 @item
27427 Vladimir Alexiev---the refcard and reference booklets.
27428
27429 @item
27430 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
27431 distribution by Felix Lee and JWZ.
27432
27433 @item
27434 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
27435
27436 @item
27437 Peter Mutsaers---orphan article scoring code.
27438
27439 @item
27440 Ken Raeburn---POP mail support.
27441
27442 @item
27443 Hallvard B Furuseth---various bits and pieces, especially dealing with
27444 .newsrc files.
27445
27446 @item
27447 Brian Edmonds---@file{gnus-bbdb.el}.
27448
27449 @item
27450 David Moore---rewrite of @file{nnvirtual.el} and many other things.
27451
27452 @item
27453 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
27454
27455 @item
27456 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
27457 well as autoconf support.
27458
27459 @end itemize
27460
27461 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
27462 Borges, and Jost Krieger proof-reading parts of the manual.
27463
27464 The following people have contributed many patches and suggestions:
27465
27466 Christopher Davis,
27467 Andrew Eskilsson,
27468 Kai Grossjohann,
27469 Kevin Greiner,
27470 Jesper Harder,
27471 Paul Jarc,
27472 Simon Josefsson,
27473 David K@aa{}gedal,
27474 Richard Pieri,
27475 Fabrice Popineau,
27476 Daniel Quinlan,
27477 Michael Shields,
27478 Reiner Steib,
27479 Jason L. Tibbitts, III,
27480 Jack Vinson,
27481 Katsumi Yamaoka, @c Yamaoka
27482 and
27483 Teodor Zlatanov.
27484
27485 Also thanks to the following for patches and stuff:
27486
27487 Jari Aalto,
27488 Adrian Aichner,
27489 Vladimir Alexiev,
27490 Russ Allbery,
27491 Peter Arius,
27492 Matt Armstrong,
27493 Marc Auslander,
27494 Miles Bader,
27495 Alexei V. Barantsev,
27496 Frank Bennett,
27497 Robert Bihlmeyer,
27498 Chris Bone,
27499 Mark Borges,
27500 Mark Boyns,
27501 Lance A. Brown,
27502 Rob Browning,
27503 Kees de Bruin,
27504 Martin Buchholz,
27505 Joe Buehler,
27506 Kevin Buhr,
27507 Alastair Burt,
27508 Joao Cachopo,
27509 Zlatko Calusic,
27510 Massimo Campostrini,
27511 Castor,
27512 David Charlap,
27513 Dan Christensen,
27514 Kevin Christian,
27515 Jae-you Chung, @c ?
27516 James H. Cloos, Jr.,
27517 Laura Conrad,
27518 Michael R. Cook,
27519 Glenn Coombs,
27520 Andrew J. Cosgriff,
27521 Neil Crellin,
27522 Frank D. Cringle,
27523 Geoffrey T. Dairiki,
27524 Andre Deparade,
27525 Ulrik Dickow,
27526 Dave Disser,
27527 Rui-Tao Dong, @c ?
27528 Joev Dubach,
27529 Michael Welsh Duggan,
27530 Dave Edmondson,
27531 Paul Eggert,
27532 Mark W. Eichin,
27533 Karl Eichwalder,
27534 Enami Tsugutomo, @c Enami
27535 Michael Ernst,
27536 Luc Van Eycken,
27537 Sam Falkner,
27538 Nelson Jose dos Santos Ferreira,
27539 Sigbjorn Finne,
27540 Sven Fischer,
27541 Paul Fisher,
27542 Decklin Foster,
27543 Gary D. Foster,
27544 Paul Franklin,
27545 Guy Geens,
27546 Arne Georg Gleditsch,
27547 David S. Goldberg,
27548 Michelangelo Grigni,
27549 Dale Hagglund,
27550 D. Hall,
27551 Magnus Hammerin,
27552 Kenichi Handa, @c Handa
27553 Raja R. Harinath,
27554 Yoshiki Hayashi, @c Hayashi
27555 P. E. Jareth Hein,
27556 Hisashige Kenji, @c Hisashige
27557 Scott Hofmann,
27558 Tassilo Horn,
27559 Marc Horowitz,
27560 Gunnar Horrigmo,
27561 Richard Hoskins,
27562 Brad Howes,
27563 Miguel de Icaza,
27564 Fran@,{c}ois Felix Ingrand,
27565 Tatsuya Ichikawa, @c Ichikawa
27566 Ishikawa Ichiro, @c Ishikawa
27567 Lee Iverson,
27568 Iwamuro Motonori, @c Iwamuro
27569 Rajappa Iyer,
27570 Andreas Jaeger,
27571 Adam P. Jenkins,
27572 Randell Jesup,
27573 Fred Johansen,
27574 Gareth Jones,
27575 Greg Klanderman,
27576 Karl Kleinpaste,
27577 Michael Klingbeil,
27578 Peter Skov Knudsen,
27579 Shuhei Kobayashi, @c Kobayashi
27580 Petr Konecny,
27581 Koseki Yoshinori, @c Koseki
27582 Thor Kristoffersen,
27583 Jens Lautenbacher,
27584 Martin Larose,
27585 Seokchan Lee, @c Lee
27586 Joerg Lenneis,
27587 Carsten Leonhardt,
27588 James LewisMoss,
27589 Christian Limpach,
27590 Markus Linnala,
27591 Dave Love,
27592 Mike McEwan,
27593 Tonny Madsen,
27594 Shlomo Mahlab,
27595 Nat Makarevitch,
27596 Istvan Marko,
27597 David Martin,
27598 Jason R. Mastaler,
27599 Gordon Matzigkeit,
27600 Timo Metzemakers,
27601 Richard Mlynarik,
27602 Lantz Moore,
27603 Morioka Tomohiko, @c Morioka
27604 Erik Toubro Nielsen,
27605 Hrvoje Niksic,
27606 Andy Norman,
27607 Fred Oberhauser,
27608 C. R. Oldham,
27609 Alexandre Oliva,
27610 Ken Olstad,
27611 Masaharu Onishi, @c Onishi
27612 Hideki Ono, @c Ono
27613 Ettore Perazzoli,
27614 William Perry,
27615 Stephen Peters,
27616 Jens-Ulrik Holger Petersen,
27617 Ulrich Pfeifer,
27618 Matt Pharr,
27619 Andy Piper,
27620 John McClary Prevost,
27621 Bill Pringlemeir,
27622 Mike Pullen,
27623 Jim Radford,
27624 Colin Rafferty,
27625 Lasse Rasinen,
27626 Lars Balker Rasmussen,
27627 Joe Reiss,
27628 Renaud Rioboo,
27629 Roland B. Roberts,
27630 Bart Robinson,
27631 Christian von Roques,
27632 Markus Rost,
27633 Jason Rumney,
27634 Wolfgang Rupprecht,
27635 Jay Sachs,
27636 Dewey M. Sasser,
27637 Conrad Sauerwald,
27638 Loren Schall,
27639 Dan Schmidt,
27640 Ralph Schleicher,
27641 Philippe Schnoebelen,
27642 Andreas Schwab,
27643 Randal L. Schwartz,
27644 Danny Siu,
27645 Matt Simmons,
27646 Paul D. Smith,
27647 Jeff Sparkes,
27648 Toby Speight,
27649 Michael Sperber,
27650 Darren Stalder,
27651 Richard Stallman,
27652 Greg Stark,
27653 Sam Steingold,
27654 Paul Stevenson,
27655 Jonas Steverud,
27656 Paul Stodghill,
27657 Kiyokazu Suto, @c Suto
27658 Kurt Swanson,
27659 Samuel Tardieu,
27660 Teddy,
27661 Chuck Thompson,
27662 Tozawa Akihiko, @c Tozawa
27663 Philippe Troin,
27664 James Troup,
27665 Trung Tran-Duc,
27666 Jack Twilley,
27667 Aaron M. Ucko,
27668 Aki Vehtari,
27669 Didier Verna,
27670 Vladimir Volovich,
27671 Jan Vroonhof,
27672 Stefan Waldherr,
27673 Pete Ware,
27674 Barry A. Warsaw,
27675 Christoph Wedler,
27676 Joe Wells,
27677 Lee Willis,
27678 and
27679 Lloyd Zusman.
27680
27681
27682 For a full overview of what each person has done, the ChangeLogs
27683 included in the Gnus alpha distributions should give ample reading
27684 (550kB and counting).
27685
27686 Apologies to everybody that I've forgotten, of which there are many, I'm
27687 sure.
27688
27689 Gee, that's quite a list of people.  I guess that must mean that there
27690 actually are people who are using Gnus.  Who'd'a thunk it!
27691
27692
27693 @node New Features
27694 @subsection New Features
27695 @cindex new features
27696
27697 @menu
27698 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
27699 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
27700 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
27701 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
27702 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
27703 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
27704 * No Gnus::                     Very punny.
27705 @end menu
27706
27707 These lists are, of course, just @emph{short} overviews of the
27708 @emph{most} important new features.  No, really.  There are tons more.
27709 Yes, we have feeping creaturism in full effect.
27710
27711 @node ding Gnus
27712 @subsubsection (ding) Gnus
27713
27714 New features in Gnus 5.0/5.1:
27715
27716 @itemize @bullet
27717
27718 @item
27719 The look of all buffers can be changed by setting format-like variables
27720 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
27721
27722 @item
27723 Local spool and several @acronym{NNTP} servers can be used at once
27724 (@pxref{Select Methods}).
27725
27726 @item
27727 You can combine groups into virtual groups (@pxref{Virtual Groups}).
27728
27729 @item
27730 You can read a number of different mail formats (@pxref{Getting Mail}).
27731 All the mail back ends implement a convenient mail expiry scheme
27732 (@pxref{Expiring Mail}).
27733
27734 @item
27735 Gnus can use various strategies for gathering threads that have lost
27736 their roots (thereby gathering loose sub-threads into one thread) or it
27737 can go back and retrieve enough headers to build a complete thread
27738 (@pxref{Customizing Threading}).
27739
27740 @item
27741 Killed groups can be displayed in the group buffer, and you can read
27742 them as well (@pxref{Listing Groups}).
27743
27744 @item
27745 Gnus can do partial group updates---you do not have to retrieve the
27746 entire active file just to check for new articles in a few groups
27747 (@pxref{The Active File}).
27748
27749 @item
27750 Gnus implements a sliding scale of subscribedness to groups
27751 (@pxref{Group Levels}).
27752
27753 @item
27754 You can score articles according to any number of criteria
27755 (@pxref{Scoring}).  You can even get Gnus to find out how to score
27756 articles for you (@pxref{Adaptive Scoring}).
27757
27758 @item
27759 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
27760 manner, so it should be difficult to lose much data on what you have
27761 read if your machine should go down (@pxref{Auto Save}).
27762
27763 @item
27764 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
27765 cluttering up the @file{.emacs} file.
27766
27767 @item
27768 You can set the process mark on both groups and articles and perform
27769 operations on all the marked items (@pxref{Process/Prefix}).
27770
27771 @item
27772 You can grep through a subset of groups and create a group from the
27773 results (@pxref{Kibozed Groups}).
27774
27775 @item
27776 You can list subsets of groups according to, well, anything
27777 (@pxref{Listing Groups}).
27778
27779 @item
27780 You can browse foreign servers and subscribe to groups from those
27781 servers (@pxref{Browse Foreign Server}).
27782
27783 @item
27784 Gnus can fetch articles, asynchronously, on a second connection to the
27785 server (@pxref{Asynchronous Fetching}).
27786
27787 @item
27788 You can cache articles locally (@pxref{Article Caching}).
27789
27790 @item
27791 The uudecode functions have been expanded and generalized
27792 (@pxref{Decoding Articles}).
27793
27794 @item
27795 You can still post uuencoded articles, which was a little-known feature
27796 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
27797
27798 @item
27799 Fetching parents (and other articles) now actually works without
27800 glitches (@pxref{Finding the Parent}).
27801
27802 @item
27803 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
27804
27805 @item
27806 Digests (and other files) can be used as the basis for groups
27807 (@pxref{Document Groups}).
27808
27809 @item
27810 Articles can be highlighted and customized (@pxref{Customizing
27811 Articles}).
27812
27813 @item
27814 URLs and other external references can be buttonized (@pxref{Article
27815 Buttons}).
27816
27817 @item
27818 You can do lots of strange stuff with the Gnus window & frame
27819 configuration (@pxref{Window Layout}).
27820
27821 @item
27822 You can click on buttons instead of using the keyboard
27823 (@pxref{Buttons}).
27824
27825 @end itemize
27826
27827
27828 @node September Gnus
27829 @subsubsection September Gnus
27830
27831 @iftex
27832 @iflatex
27833 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
27834 @end iflatex
27835 @end iftex
27836
27837 New features in Gnus 5.2/5.3:
27838
27839 @itemize @bullet
27840
27841 @item
27842 A new message composition mode is used.  All old customization variables
27843 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
27844 now obsolete.
27845
27846 @item
27847 Gnus is now able to generate @dfn{sparse} threads---threads where
27848 missing articles are represented by empty nodes (@pxref{Customizing
27849 Threading}).
27850
27851 @lisp
27852 (setq gnus-build-sparse-threads 'some)
27853 @end lisp
27854
27855 @item
27856 Outgoing articles are stored on a special archive server
27857 (@pxref{Archived Messages}).
27858
27859 @item
27860 Partial thread regeneration now happens when articles are
27861 referred.
27862
27863 @item
27864 Gnus can make use of GroupLens predictions.
27865
27866 @item
27867 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
27868
27869 @item
27870 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
27871
27872 @lisp
27873 (setq gnus-use-trees t)
27874 @end lisp
27875
27876 @item
27877 An @code{nn}-like pick-and-read minor mode is available for the summary
27878 buffers (@pxref{Pick and Read}).
27879
27880 @lisp
27881 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
27882 @end lisp
27883
27884 @item
27885 In binary groups you can use a special binary minor mode (@pxref{Binary
27886 Groups}).
27887
27888 @item
27889 Groups can be grouped in a folding topic hierarchy (@pxref{Group
27890 Topics}).
27891
27892 @lisp
27893 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
27894 @end lisp
27895
27896 @item
27897 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
27898
27899 @item
27900 Groups can now have a score, and bubbling based on entry frequency
27901 is possible (@pxref{Group Score}).
27902
27903 @lisp
27904 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
27905 @end lisp
27906
27907 @item
27908 Groups can be process-marked, and commands can be performed on
27909 groups of groups (@pxref{Marking Groups}).
27910
27911 @item
27912 Caching is possible in virtual groups.
27913
27914 @item
27915 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
27916 news batches, ClariNet briefs collections, and just about everything
27917 else (@pxref{Document Groups}).
27918
27919 @item
27920 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
27921 (@pxref{SOUP}).
27922
27923 @item
27924 The Gnus cache is much faster.
27925
27926 @item
27927 Groups can be sorted according to many criteria (@pxref{Sorting
27928 Groups}).
27929
27930 @item
27931 New group parameters have been introduced to set list-addresses and
27932 expiry times (@pxref{Group Parameters}).
27933
27934 @item
27935 All formatting specs allow specifying faces to be used
27936 (@pxref{Formatting Fonts}).
27937
27938 @item
27939 There are several more commands for setting/removing/acting on process
27940 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
27941
27942 @item
27943 The summary buffer can be limited to show parts of the available
27944 articles based on a wide range of criteria.  These commands have been
27945 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
27946
27947 @item
27948 Articles can be made persistent with the @kbd{*} command
27949 (@pxref{Persistent Articles}).
27950
27951 @item
27952 All functions for hiding article elements are now toggles.
27953
27954 @item
27955 Article headers can be buttonized (@pxref{Article Washing}).
27956
27957 @item
27958 All mail back ends support fetching articles by @code{Message-ID}.
27959
27960 @item
27961 Duplicate mail can now be treated properly (@pxref{Duplicates}).
27962
27963 @item
27964 All summary mode commands are available directly from the article
27965 buffer (@pxref{Article Keymap}).
27966
27967 @item
27968 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
27969 Layout}).
27970
27971 @item
27972 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
27973 @iftex
27974 @iflatex
27975 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
27976 @end iflatex
27977 @end iftex
27978
27979 @item
27980 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
27981
27982 @lisp
27983 (setq gnus-use-nocem t)
27984 @end lisp
27985
27986 @item
27987 Groups can be made permanently visible (@pxref{Listing Groups}).
27988
27989 @lisp
27990 (setq gnus-permanently-visible-groups "^nnml:")
27991 @end lisp
27992
27993 @item
27994 Many new hooks have been introduced to make customizing easier.
27995
27996 @item
27997 Gnus respects the @code{Mail-Copies-To} header.
27998
27999 @item
28000 Threads can be gathered by looking at the @code{References} header
28001 (@pxref{Customizing Threading}).
28002
28003 @lisp
28004 (setq gnus-summary-thread-gathering-function
28005       'gnus-gather-threads-by-references)
28006 @end lisp
28007
28008 @item
28009 Read articles can be stored in a special backlog buffer to avoid
28010 refetching (@pxref{Article Backlog}).
28011
28012 @lisp
28013 (setq gnus-keep-backlog 50)
28014 @end lisp
28015
28016 @item
28017 A clean copy of the current article is always stored in a separate
28018 buffer to allow easier treatment.
28019
28020 @item
28021 Gnus can suggest where to save articles (@pxref{Saving Articles}).
28022
28023 @item
28024 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
28025 Articles}).
28026
28027 @lisp
28028 (setq gnus-prompt-before-saving t)
28029 @end lisp
28030
28031 @item
28032 @code{gnus-uu} can view decoded files asynchronously while fetching
28033 articles (@pxref{Other Decode Variables}).
28034
28035 @lisp
28036 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
28037 @end lisp
28038
28039 @item
28040 Filling in the article buffer now works properly on cited text
28041 (@pxref{Article Washing}).
28042
28043 @item
28044 Hiding cited text adds buttons to toggle hiding, and how much
28045 cited text to hide is now customizable (@pxref{Article Hiding}).
28046
28047 @lisp
28048 (setq gnus-cited-lines-visible 2)
28049 @end lisp
28050
28051 @item
28052 Boring headers can be hidden (@pxref{Article Hiding}).
28053
28054 @item
28055 Default scoring values can now be set from the menu bar.
28056
28057 @item
28058 Further syntax checking of outgoing articles have been added.
28059
28060 @end itemize
28061
28062
28063 @node Red Gnus
28064 @subsubsection Red Gnus
28065
28066 New features in Gnus 5.4/5.5:
28067
28068 @iftex
28069 @iflatex
28070 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
28071 @end iflatex
28072 @end iftex
28073
28074 @itemize @bullet
28075
28076 @item
28077 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
28078
28079 @item
28080 Article prefetching functionality has been moved up into
28081 Gnus (@pxref{Asynchronous Fetching}).
28082
28083 @item
28084 Scoring can now be performed with logical operators like @code{and},
28085 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
28086 Scoring}).
28087
28088 @item
28089 Article washing status can be displayed in the
28090 article mode line (@pxref{Misc Article}).
28091
28092 @item
28093 @file{gnus.el} has been split into many smaller files.
28094
28095 @item
28096 Suppression of duplicate articles based on Message-ID can be done
28097 (@pxref{Duplicate Suppression}).
28098
28099 @lisp
28100 (setq gnus-suppress-duplicates t)
28101 @end lisp
28102
28103 @item
28104 New variables for specifying what score and adapt files are to be
28105 considered home score and adapt files (@pxref{Home Score File}) have
28106 been added.
28107
28108 @item
28109 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
28110 Server Internals}).
28111
28112 @item
28113 Groups can inherit group parameters from parent topics (@pxref{Topic
28114 Parameters}).
28115
28116 @item
28117 Article editing has been revamped and is now actually usable.
28118
28119 @item
28120 Signatures can be recognized in more intelligent fashions
28121 (@pxref{Article Signature}).
28122
28123 @item
28124 Summary pick mode has been made to look more @code{nn}-like.  Line
28125 numbers are displayed and the @kbd{.} command can be used to pick
28126 articles (@code{Pick and Read}).
28127
28128 @item
28129 Commands for moving the @file{.newsrc.eld} from one server to
28130 another have been added (@pxref{Changing Servers}).
28131
28132 @item
28133 There's a way now to specify that ``uninteresting'' fields be suppressed
28134 when generating lines in buffers (@pxref{Advanced Formatting}).
28135
28136 @item
28137 Several commands in the group buffer can be undone with @kbd{C-M-_}
28138 (@pxref{Undo}).
28139
28140 @item
28141 Scoring can be done on words using the new score type @code{w}
28142 (@pxref{Score File Format}).
28143
28144 @item
28145 Adaptive scoring can be done on a Subject word-by-word basis
28146 (@pxref{Adaptive Scoring}).
28147
28148 @lisp
28149 (setq gnus-use-adaptive-scoring '(word))
28150 @end lisp
28151
28152 @item
28153 Scores can be decayed (@pxref{Score Decays}).
28154
28155 @lisp
28156 (setq gnus-decay-scores t)
28157 @end lisp
28158
28159 @item
28160 Scoring can be performed using a regexp on the Date header.  The Date is
28161 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
28162
28163 @item
28164 A new command has been added to remove all data on articles from
28165 the native server (@pxref{Changing Servers}).
28166
28167 @item
28168 A new command for reading collections of documents
28169 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
28170 (@pxref{Really Various Summary Commands}).
28171
28172 @item
28173 Process mark sets can be pushed and popped (@pxref{Setting Process
28174 Marks}).
28175
28176 @item
28177 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
28178 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
28179
28180 @item
28181 A new back end for reading searches from Web search engines
28182 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
28183 (@pxref{Web Searches}).
28184
28185 @item
28186 Groups inside topics can now be sorted using the standard sorting
28187 functions, and each topic can be sorted independently (@pxref{Topic
28188 Sorting}).
28189
28190 @item
28191 Subsets of the groups can be sorted independently (@code{Sorting
28192 Groups}).
28193
28194 @item
28195 Cached articles can be pulled into the groups (@pxref{Summary Generation
28196 Commands}).
28197 @iftex
28198 @iflatex
28199 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
28200 @end iflatex
28201 @end iftex
28202
28203 @item
28204 Score files are now applied in a more reliable order (@pxref{Score
28205 Variables}).
28206
28207 @item
28208 Reports on where mail messages end up can be generated (@pxref{Splitting
28209 Mail}).
28210
28211 @item
28212 More hooks and functions have been added to remove junk from incoming
28213 mail before saving the mail (@pxref{Washing Mail}).
28214
28215 @item
28216 Emphasized text can be properly fontisized:
28217
28218 @end itemize
28219
28220
28221 @node Quassia Gnus
28222 @subsubsection Quassia Gnus
28223
28224 New features in Gnus 5.6:
28225
28226 @itemize @bullet
28227
28228 @item
28229 New functionality for using Gnus as an offline newsreader has been
28230 added.  A plethora of new commands and modes have been added.
28231 @xref{Gnus Unplugged}, for the full story.
28232
28233 @item
28234 The @code{nndraft} back end has returned, but works differently than
28235 before.  All Message buffers are now also articles in the @code{nndraft}
28236 group, which is created automatically.
28237
28238 @item
28239 @code{gnus-alter-header-function} can now be used to alter header
28240 values.
28241
28242 @item
28243 @code{gnus-summary-goto-article} now accept Message-ID's.
28244
28245 @item
28246 A new Message command for deleting text in the body of a message
28247 outside the region: @kbd{C-c C-v}.
28248
28249 @item
28250 You can now post to component group in @code{nnvirtual} groups with
28251 @kbd{C-u C-c C-c}.
28252
28253 @item
28254  @code{nntp-rlogin-program}---new variable to ease customization.
28255
28256 @item
28257 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
28258 re-highlighting of the article buffer.
28259
28260 @item
28261 New element in @code{gnus-boring-article-headers}---@code{long-to}.
28262
28263 @item
28264 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
28265 details.
28266
28267 @item
28268 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
28269 @kbd{a} to add the score rule to the @file{all.SCORE} file.
28270
28271 @item
28272 @code{gnus-simplify-subject-functions} variable to allow greater
28273 control over simplification.
28274
28275 @item
28276 @kbd{A T}---new command for fetching the current thread.
28277
28278 @item
28279 @kbd{/ T}---new command for including the current thread in the
28280 limit.
28281
28282 @item
28283 @kbd{M-RET} is a new Message command for breaking cited text.
28284
28285 @item
28286 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
28287
28288 @item
28289 The @code{custom-face-lookup} function has been removed.
28290 If you used this function in your initialization files, you must
28291 rewrite them to use @code{face-spec-set} instead.
28292
28293 @item
28294 Canceling now uses the current select method.  Symbolic prefix
28295 @kbd{a} forces normal posting method.
28296
28297 @item
28298 New command to translate M******** sm*rtq**t*s into proper
28299 text---@kbd{W d}.
28300
28301 @item
28302 For easier debugging of @code{nntp}, you can set
28303 @code{nntp-record-commands} to a non-@code{nil} value.
28304
28305 @item
28306 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
28307 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
28308
28309 @item
28310 A command for editing group parameters from the summary buffer
28311 has been added.
28312
28313 @item
28314 A history of where mails have been split is available.
28315
28316 @item
28317 A new article date command has been added---@code{article-date-iso8601}.
28318
28319 @item
28320 Subjects can be simplified when threading by setting
28321 @code{gnus-score-thread-simplify}.
28322
28323 @item
28324 A new function for citing in Message has been
28325 added---@code{message-cite-original-without-signature}.
28326
28327 @item
28328 @code{article-strip-all-blank-lines}---new article command.
28329
28330 @item
28331 A new Message command to kill to the end of the article has
28332 been added.
28333
28334 @item
28335 A minimum adaptive score can be specified by using the
28336 @code{gnus-adaptive-word-minimum} variable.
28337
28338 @item
28339 The ``lapsed date'' article header can be kept continually
28340 updated by the @code{gnus-start-date-timer} command.
28341
28342 @item
28343 Web listserv archives can be read with the @code{nnlistserv} back end.
28344
28345 @item
28346 Old dejanews archives can now be read by @code{nnweb}.
28347
28348 @end itemize
28349
28350 @node Pterodactyl Gnus
28351 @subsubsection Pterodactyl Gnus
28352
28353 New features in Gnus 5.8:
28354
28355 @itemize @bullet
28356
28357 @item
28358 The mail-fetching functions have changed.  See the manual for the
28359 many details.  In particular, all procmail fetching variables are gone.
28360
28361 If you used procmail like in
28362
28363 @lisp
28364 (setq nnmail-use-procmail t)
28365 (setq nnmail-spool-file 'procmail)
28366 (setq nnmail-procmail-directory "~/mail/incoming/")
28367 (setq nnmail-procmail-suffix "\\.in")
28368 @end lisp
28369
28370 this now has changed to
28371
28372 @lisp
28373 (setq mail-sources
28374       '((directory :path "~/mail/incoming/"
28375                    :suffix ".in")))
28376 @end lisp
28377
28378 @xref{Mail Source Specifiers}.
28379
28380 @item
28381 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
28382 Gnus, and adds a slew of new commands.  See the manual for details.
28383
28384 @item
28385 Gnus has also been multilingualized.  This also affects too
28386 many parts of Gnus to summarize here, and adds many new variables.
28387
28388 @item
28389 @code{gnus-auto-select-first} can now be a function to be
28390 called to position point.
28391
28392 @item
28393 The user can now decide which extra headers should be included in
28394 summary buffers and @acronym{NOV} files.
28395
28396 @item
28397 @code{gnus-article-display-hook} has been removed.  Instead, a number
28398 of variables starting with @code{gnus-treat-} have been added.
28399
28400 @item
28401 The Gnus posting styles have been redone again and now works in a
28402 subtly different manner.
28403
28404 @item
28405 New web-based back ends have been added: @code{nnslashdot},
28406 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
28407 again, to keep up with ever-changing layouts.
28408
28409 @item
28410 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
28411
28412 @end itemize
28413
28414 @node Oort Gnus
28415 @subsubsection Oort Gnus
28416 @cindex Oort Gnus
28417
28418 New features in Gnus 5.10:
28419
28420 @itemize @bullet
28421
28422 @item Installation changes
28423 @c ***********************
28424
28425 @itemize @bullet
28426 @item
28427 Upgrading from previous (stable) version if you have used Oort.
28428
28429 If you have tried Oort (the unstable Gnus branch leading to this
28430 release) but went back to a stable version, be careful when upgrading to
28431 this version.  In particular, you will probably want to remove all
28432 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
28433 read from your @file{.newsrc.eld} instead of from the
28434 @file{.marks}/@file{.mrk} file where this release store flags.  See a
28435 later entry for more information about marks.  Note that downgrading
28436 isn't save in general.
28437
28438 @item
28439 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
28440 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
28441 the new installer issues a warning if other Gnus installations which
28442 will shadow the latest one are detected.  You can then remove those
28443 shadows manually or remove them using @code{make
28444 remove-installed-shadows}.
28445
28446 @item
28447 New @file{make.bat} for compiling and installing Gnus under MS Windows
28448
28449 Use @file{make.bat} if you want to install Gnus under MS Windows, the
28450 first argument to the batch-program should be the directory where
28451 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
28452 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
28453 the second parameter.
28454
28455 @file{make.bat} has been rewritten from scratch, it now features
28456 automatic recognition of XEmacs and GNU Emacs, generates
28457 @file{gnus-load.el}, checks if errors occur while compilation and
28458 generation of info files and reports them at the end of the build
28459 process.  It now uses @code{makeinfo} if it is available and falls
28460 back to @file{infohack.el} otherwise.  @file{make.bat} should now
28461 install all files which are necessary to run Gnus and be generally a
28462 complete replacement for the @code{configure; make; make install}
28463 cycle used under Unix systems.
28464
28465 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
28466 superfluous, so they have been removed.
28467
28468 @item
28469 @file{~/News/overview/} not used.
28470
28471 As a result of the following change, the @file{~/News/overview/}
28472 directory is not used any more.  You can safely delete the entire
28473 hierarchy.
28474
28475 @c FIXME: `gnus-load' is mentioned in README, which is not included in
28476 @c the repository.  We should find a better place for this item.
28477 @item
28478 @code{(require 'gnus-load)}
28479
28480 If you use a stand-alone Gnus distribution, you'd better add
28481 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
28482 lisp directory into load-path.
28483
28484 File @file{gnus-load.el} contains autoload commands, functions and variables,
28485 some of which may not be included in distributions of Emacsen.
28486
28487 @end itemize
28488
28489 @item New packages and libraries within Gnus
28490 @c *****************************************
28491
28492 @itemize @bullet
28493
28494 @item
28495 The revised Gnus @acronym{FAQ} is included in the manual,
28496 @xref{Frequently Asked Questions}.
28497
28498 @item
28499 @acronym{TLS} wrapper shipped with Gnus
28500
28501 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
28502 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
28503 @acronym{TLS}/@acronym{SSL} support via (external third party)
28504 @file{ssl.el} and OpenSSL still works.
28505
28506 @item
28507 Improved anti-spam features.
28508
28509 Gnus is now able to take out spam from your mail and news streams
28510 using a wide variety of programs and filter rules.  Among the supported
28511 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
28512 for easy use of external packages such as SpamAssassin and Hashcash
28513 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
28514 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
28515
28516 @item
28517 Gnus supports server-side mail filtering using Sieve.
28518
28519 Sieve rules can be added as Group Parameters for groups, and the
28520 complete Sieve script is generated using @kbd{D g} from the Group
28521 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
28522 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
28523 manual @ref{Top, , Top, sieve, Emacs Sieve}.
28524
28525 @end itemize
28526
28527 @item Changes in group mode
28528 @c ************************
28529
28530 @itemize @bullet
28531
28532 @item
28533 @code{gnus-group-read-ephemeral-group} can be called interactively,
28534 using @kbd{G M}.
28535
28536 @item
28537 Retrieval of charters and control messages
28538
28539 There are new commands for fetching newsgroup charters (@kbd{H c}) and
28540 control messages (@kbd{H C}).
28541
28542 @item
28543 The new variable @code{gnus-parameters} can be used to set group parameters.
28544
28545 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
28546 the parameters in @file{~/.newsrc.eld}, but via this variable you can
28547 enjoy the powers of customize, and simplified backups since you set the
28548 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
28549 variable maps regular expressions matching group names to group
28550 parameters, a'la:
28551 @lisp
28552 (setq gnus-parameters
28553       '(("mail\\..*"
28554          (gnus-show-threads nil)
28555          (gnus-use-scoring nil))
28556         ("^nnimap:\\(foo.bar\\)$"
28557          (to-group . "\\1"))))
28558 @end lisp
28559
28560 @item
28561 Unread count correct in nnimap groups.
28562
28563 The estimated number of unread articles in the group buffer should now
28564 be correct for nnimap groups.  This is achieved by calling
28565 @code{nnimap-fixup-unread-after-getting-new-news} from the
28566 @code{gnus-setup-news-hook} (called on startup) and
28567 @code{gnus-after-getting-new-news-hook}. (called after getting new
28568 mail).  If you have modified those variables from the default, you may
28569 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
28570 you were happy with the estimate and want to save some (minimal) time
28571 when getting new mail, remove the function.
28572
28573 @item
28574 Group names are treated as UTF-8 by default.
28575
28576 This is supposedly what USEFOR wanted to migrate to.  See
28577 @code{gnus-group-name-charset-group-alist} and
28578 @code{gnus-group-name-charset-method-alist} for customization.
28579
28580 @item
28581 @code{gnus-group-charset-alist} and
28582 @code{gnus-group-ignored-charsets-alist}.
28583
28584 The regexps in these variables are compared with full group names
28585 instead of real group names in 5.8.  Users who customize these
28586 variables should change those regexps accordingly.  For example:
28587 @lisp
28588 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
28589 @end lisp
28590
28591 @item
28592 Old intermediate incoming mail files (@file{Incoming*}) are deleted
28593 after a couple of days, not immediately.  @xref{Mail Source
28594 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
28595
28596 @end itemize
28597
28598 @item Changes in summary and article mode
28599 @c **************************************
28600
28601 @itemize @bullet
28602
28603 @item
28604 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
28605 (@code{gnus-article-reply-with-original}) only yank the text in the
28606 region if the region is active.
28607
28608 @item
28609 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
28610 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
28611
28612 @item
28613 Article Buttons
28614
28615 More buttons for URLs, mail addresses, Message-IDs, Info links, man
28616 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
28617 variables @code{gnus-button-@var{*}-level} can be used to control the
28618 appearance of all article buttons.  @xref{Article Button Levels}.
28619
28620 @item
28621 Single-part yenc encoded attachments can be decoded.
28622
28623 @item
28624 Picons
28625
28626 The picons code has been reimplemented to work in GNU Emacs---some of
28627 the previous options have been removed or renamed.
28628
28629 Picons are small ``personal icons'' representing users, domain and
28630 newsgroups, which can be displayed in the Article buffer.
28631 @xref{Picons}.
28632
28633 @item
28634 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
28635 boundary line is drawn at the end of the headers.
28636
28637 @item
28638 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
28639
28640 @item
28641 The Summary Buffer uses an arrow in the fringe to indicate the current
28642 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
28643
28644 @item
28645 Warn about email replies to news
28646
28647 Do you often find yourself replying to news by email by mistake?  Then
28648 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
28649 you.
28650
28651 @item
28652 If the new option @code{gnus-summary-display-while-building} is
28653 non-@code{nil}, the summary buffer is shown and updated as it's being
28654 built.
28655
28656 @item
28657 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
28658 opposed to old but unread messages).
28659
28660 @item
28661 Gnus supports RFC 2369 mailing list headers, and adds a number of
28662 related commands in mailing list groups.  @xref{Mailing List}.
28663
28664 @item
28665 The Date header can be displayed in a format that can be read aloud
28666 in English.  @xref{Article Date}.
28667
28668 @item
28669 diffs are automatically highlighted in groups matching
28670 @code{mm-uu-diff-groups-regexp}
28671
28672 @item
28673 Better handling of Microsoft citation styles
28674
28675 Gnus now tries to recognize the mangled header block that some Microsoft
28676 mailers use to indicate that the rest of the message is a citation, even
28677 though it is not quoted in any way.  The variable
28678 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
28679 citations.
28680
28681 The new command @kbd{W Y f}
28682 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
28683 Outlook (Express) articles.
28684
28685 @item
28686 @code{gnus-article-skip-boring}
28687
28688 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
28689 not scroll down to show you a page that contains only boring text,
28690 which by default means cited text and signature.  You can customize
28691 what is skippable using @code{gnus-article-boring-faces}.
28692
28693 This feature is especially useful if you read many articles that
28694 consist of a little new content at the top with a long, untrimmed
28695 message cited below.
28696
28697 @item
28698 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
28699 Emacs too.
28700
28701 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
28702 disable it.
28703
28704 @item
28705 Face headers handling.  @xref{Face}.
28706
28707 @item
28708 In the summary buffer, the new command @kbd{/ N} inserts new messages
28709 and @kbd{/ o} inserts old messages.
28710
28711 @item
28712 Gnus decodes morse encoded messages if you press @kbd{W m}.
28713
28714 @item
28715 @code{gnus-summary-line-format}
28716
28717 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
28718 %s\n}.  Moreover @code{gnus-extra-headers},
28719 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
28720 changed their default so that the users name will be replaced by the
28721 recipient's name or the group name posting to for @acronym{NNTP}
28722 groups.
28723
28724 @item
28725 Deleting of attachments.
28726
28727 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
28728 on @acronym{MIME} buttons) saves a part and replaces the part with an
28729 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
28730 @acronym{MIME} buttons) removes a part.  It works only on back ends
28731 that support editing.
28732
28733 @item
28734 @code{gnus-default-charset}
28735
28736 The default value is determined from the
28737 @code{current-language-environment} variable, instead of
28738 @code{iso-8859-1}.  Also the @samp{.*} item in
28739 @code{gnus-group-charset-alist} is removed.
28740
28741 @item
28742 Printing capabilities are enhanced.
28743
28744 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
28745 Article buffers.  Also, each individual @acronym{MIME} part can be
28746 printed using @kbd{p} on the @acronym{MIME} button.
28747
28748 @item
28749 Extended format specs.
28750
28751 Format spec @samp{%&user-date;} is added into
28752 @code{gnus-summary-line-format-alist}.  Also, user defined extended
28753 format specs are supported.  The extended format specs look like
28754 @samp{%u&foo;}, which invokes function
28755 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
28756 escape character, old user defined format @samp{%u&} is no longer supported.
28757
28758 @item
28759 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
28760 @c FIXME: Was this a user-visible change?
28761
28762 It was aliased to @kbd{Y c}
28763 (@code{gnus-summary-insert-cached-articles}).  The new function filters
28764 out other articles.
28765
28766 @item
28767 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
28768
28769 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
28770 s}, @kbd{/ a}, and @kbd{/ x}
28771 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
28772 result will be to display all articles that do not match the expression.
28773
28774 @item
28775 Gnus inlines external parts (message/external).
28776
28777 @end itemize
28778
28779 @item Changes in Message mode and related Gnus features
28780 @c ****************************************************
28781
28782 @itemize @bullet
28783
28784 @item
28785 Delayed articles
28786
28787 You can delay the sending of a message with @kbd{C-c C-j} in the Message
28788 buffer.  The messages are delivered at specified time.  This is useful
28789 for sending yourself reminders.  @xref{Delayed Articles}.
28790
28791 @item
28792 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
28793 the nnml back end allows compressed message files.
28794
28795 @item
28796 The new option @code{gnus-gcc-mark-as-read} automatically marks
28797 Gcc articles as read.
28798
28799 @item
28800 Externalizing of attachments
28801
28802 If @code{gnus-gcc-externalize-attachments} or
28803 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
28804 local files as external parts.
28805
28806 @item
28807 The envelope sender address can be customized when using Sendmail.
28808 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
28809
28810 @item
28811 Gnus no longer generate the Sender: header automatically.
28812
28813 Earlier it was generated when the user configurable email address was
28814 different from the Gnus guessed default user address.  As the guessing
28815 algorithm is rarely correct these days, and (more controversially) the
28816 only use of the Sender: header was to check if you are entitled to
28817 cancel/supersede news (which is now solved by Cancel Locks instead,
28818 see another entry), generation of the header has been disabled by
28819 default.  See the variables @code{message-required-headers},
28820 @code{message-required-news-headers}, and
28821 @code{message-required-mail-headers}.
28822
28823 @item
28824 Features from third party @file{message-utils.el} added to @file{message.el}.
28825
28826 Message now asks if you wish to remove @samp{(was: <old subject>)} from
28827 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
28828 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
28829 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
28830 appropriate headers and a note in the body for cross-postings and
28831 followups (see the variables @code{message-cross-post-@var{*}}).
28832
28833 @item
28834 References and X-Draft-From headers are no longer generated when you
28835 start composing messages and @code{message-generate-headers-first} is
28836 @code{nil}.
28837
28838 @item
28839 Easy inclusion of X-Faces headers.  @xref{X-Face}.
28840
28841 @item
28842 Group Carbon Copy (GCC) quoting
28843
28844 To support groups that contains SPC and other weird characters, groups
28845 are quoted before they are placed in the Gcc: header.  This means
28846 variables such as @code{gnus-message-archive-group} should no longer
28847 contain quote characters to make groups containing SPC work.  Also, if
28848 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
28849 into two groups) you must change it to return the list
28850 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
28851 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
28852 was incorrect earlier, it just didn't generate any problems since it
28853 was inserted directly.
28854
28855 @item
28856 @code{message-insinuate-rmail}
28857
28858 @c FIXME should that not be 'message-user-agent?
28859 Adding @code{(message-insinuate-rmail)} and @code{(setq
28860 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
28861 compose, reply and forward messages in message-mode, where you can
28862 enjoy the power of @acronym{MML}.
28863
28864 @item
28865 @code{message-minibuffer-local-map}
28866
28867 The line below enables BBDB in resending a message:
28868 @lisp
28869 (define-key message-minibuffer-local-map [(tab)]
28870   'bbdb-complete-name)
28871 @end lisp
28872
28873 @item
28874 @code{gnus-posting-styles}
28875
28876 Add a new format of match like
28877 @lisp
28878 ((header "to" "larsi.*org")
28879  (Organization "Somewhere, Inc."))
28880 @end lisp
28881 The old format like the lines below is obsolete, but still accepted.
28882 @lisp
28883 (header "to" "larsi.*org"
28884         (Organization "Somewhere, Inc."))
28885 @end lisp
28886
28887 @item
28888 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
28889
28890 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
28891 added into these two variables.  If you customized those, perhaps you
28892 need add those two headers too.
28893
28894 @item
28895 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
28896 composing messages, it is enabled by @code{use-hard-newlines}.
28897 Decoding format=flowed was present but not documented in earlier
28898 versions.
28899
28900 @item
28901 The option @code{mm-fill-flowed} can be used to disable treatment of
28902 ``format=flowed'' messages.  Also, flowed text is disabled when sending
28903 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
28904 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
28905 @c This entry is also present in the node "No Gnus".
28906
28907 @item
28908 Gnus supports the generation of RFC 2298 Disposition Notification requests.
28909
28910 This is invoked with the @kbd{C-c M-n} key binding from message mode.
28911
28912 @item
28913 Message supports the Importance: (RFC 2156) header.
28914
28915 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
28916 the valid values.
28917
28918 @item
28919 Gnus supports Cancel Locks in News.
28920
28921 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
28922 used to determine if you wrote an article or not (for canceling and
28923 superseding).  Gnus generates a random password string the first time
28924 you post a message, and saves it in your @file{~/.emacs} using the Custom
28925 system.  While the variable is called @code{canlock-password}, it is not
28926 security sensitive data.  Publishing your canlock string on the web
28927 will not allow anyone to be able to anything she could not already do.
28928 The behavior can be changed by customizing @code{message-insert-canlock}.
28929
28930 @item
28931 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
28932 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
28933
28934 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
28935 additional Lisp libraries.  This add several menu items to the
28936 Attachments menu, and @kbd{C-c RET} key bindings, when composing
28937 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
28938
28939 @item
28940 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
28941 C-m}.
28942
28943 This change was made to avoid conflict with the standard binding of
28944 @code{back-to-indentation}, which is also useful in message mode.
28945
28946 @item
28947 The default for @code{message-forward-show-mml} changed to the symbol
28948 @code{best}.
28949
28950 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
28951 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
28952 used when forwarding signed or encrypted messages, as the conversion
28953 invalidate the digital signature.
28954
28955 @item
28956 If @code{auto-compression-mode} is enabled, attachments are automatically
28957 decompressed when activated.
28958 @c FIXME: Does this affect article or message mode?
28959
28960 @item
28961 Support for non-@acronym{ASCII} domain names
28962
28963 Message supports non-@acronym{ASCII} domain names in From:, To: and
28964 Cc: and will query you whether to perform encoding when you try to
28965 send a message.  The variable @code{message-use-idna} controls this.
28966 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
28967 and Cc: when you view a message.  The variable @code{gnus-use-idna}
28968 controls this.
28969
28970 @item You can now drag and drop attachments to the Message buffer.
28971 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28972 @xref{MIME, ,MIME, message, Message Manual}.
28973 @c New in 5.10.9 / 5.11 (Emacs 22.1)
28974
28975 @item @code{auto-fill-mode} is enabled by default in Message mode.
28976 See @code{message-fill-column}.  @xref{Various Message Variables, ,
28977 Message Headers, message, Message Manual}.
28978 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28979
28980 @end itemize
28981
28982 @item Changes in back ends
28983 @c ***********************
28984
28985 @itemize @bullet
28986 @item
28987 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
28988
28989 @item
28990 The nndoc back end now supports mailman digests and exim bounces.
28991
28992 @item
28993 Gnus supports Maildir groups.
28994
28995 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
28996
28997 @item
28998 The nnml and nnfolder back ends store marks for each groups.
28999
29000 This makes it possible to take backup of nnml/nnfolder servers/groups
29001 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
29002 makes it possible to share articles and marks between users (without
29003 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
29004 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
29005 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
29006 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
29007 another machine, Gnus will automatically use the @file{.marks} or
29008 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
29009 The new server variables @code{nnml-marks-is-evil} and
29010 @code{nnfolder-marks-is-evil} can be used to disable this feature.
29011
29012 @end itemize
29013
29014 @item Appearance
29015 @c *************
29016
29017 @itemize @bullet
29018
29019 @item
29020 The menu bar item (in Group and Summary buffer) named ``Misc'' has
29021 been renamed to ``Gnus''.
29022
29023 @item
29024 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
29025 renamed to ``Attachments''.  Note that this menu also contains security
29026 related stuff, like signing and encryption (@pxref{Security, Security,,
29027 message, Message Manual}).
29028
29029 @item
29030 The tool bars have been updated to use GNOME icons in Group, Summary and
29031 Message mode.  You can also customize the tool bars: @kbd{M-x
29032 customize-apropos RET -tool-bar$} should get you started.  This is a new
29033 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
29034
29035 @item The tool bar icons are now (de)activated correctly
29036 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
29037 Its default value depends on your Emacs version.  This is a new feature
29038 in Gnus 5.10.9.
29039 @end itemize
29040
29041
29042 @item Miscellaneous changes
29043 @c ************************
29044
29045 @itemize @bullet
29046
29047 @item
29048 @code{gnus-agent}
29049
29050 The Gnus Agent has seen a major updated and is now enabled by default,
29051 and all nntp and nnimap servers from @code{gnus-select-method} and
29052 @code{gnus-secondary-select-method} are agentized by default.  Earlier
29053 only the server in @code{gnus-select-method} was agentized by the
29054 default, and the agent was disabled by default.  When the agent is
29055 enabled, headers are now also retrieved from the Agent cache instead
29056 of the back ends when possible.  Earlier this only happened in the
29057 unplugged state.  You can enroll or remove servers with @kbd{J a} and
29058 @kbd{J r} in the server buffer.  Gnus will not download articles into
29059 the Agent cache, unless you instruct it to do so, though, by using
29060 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
29061 behavior of having the Agent disabled with @code{(setq gnus-agent
29062 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
29063 is not needed any more.
29064
29065 @item
29066 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
29067
29068 If one reads an article while plugged, and the article already exists
29069 in the Agent, it won't get downloaded once more.  @code{(setq
29070 gnus-agent-cache nil)} reverts to the old behavior.
29071
29072 @item
29073 Dired integration
29074
29075 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
29076 bindings in dired buffers to send a file as an attachment, open a file
29077 using the appropriate mailcap entry, and print a file using the mailcap
29078 entry.
29079
29080 @item
29081 The format spec @code{%C} for positioning point has changed to @code{%*}.
29082
29083 @item
29084 @code{gnus-slave-unplugged}
29085
29086 A new command which starts Gnus offline in slave mode.
29087
29088 @end itemize
29089
29090 @end itemize
29091
29092 @node No Gnus
29093 @subsubsection No Gnus
29094 @cindex No Gnus
29095
29096 New features in No Gnus:
29097 @c FIXME: Gnus 5.12?
29098
29099 @include gnus-news.texi
29100
29101 @iftex
29102
29103 @page
29104 @node The Manual
29105 @section The Manual
29106 @cindex colophon
29107 @cindex manual
29108
29109 This manual was generated from a TeXinfo file and then run through
29110 either @code{texi2dvi}
29111 @iflatex
29112 or my own home-brewed TeXinfo to \LaTeX\ transformer,
29113 and then run through @code{latex} and @code{dvips}
29114 @end iflatex
29115 to get what you hold in your hands now.
29116
29117 The following conventions have been used:
29118
29119 @enumerate
29120
29121 @item
29122 This is a @samp{string}
29123
29124 @item
29125 This is a @kbd{keystroke}
29126
29127 @item
29128 This is a @file{file}
29129
29130 @item
29131 This is a @code{symbol}
29132
29133 @end enumerate
29134
29135 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
29136 mean:
29137
29138 @lisp
29139 (setq flargnoze "yes")
29140 @end lisp
29141
29142 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
29143
29144 @lisp
29145 (setq flumphel 'yes)
29146 @end lisp
29147
29148 @samp{yes} and @code{yes} are two @emph{very} different things---don't
29149 ever get them confused.
29150
29151 @iflatex
29152 @c @head
29153 Of course, everything in this manual is of vital interest, so you should
29154 read it all.  Several times.  However, if you feel like skimming the
29155 manual, look for that gnu head you should see in the margin over
29156 there---it means that what's being discussed is of more importance than
29157 the rest of the stuff.  (On the other hand, if everything is infinitely
29158 important, how can anything be more important than that?  Just one more
29159 of the mysteries of this world, I guess.)
29160 @end iflatex
29161
29162 @end iftex
29163
29164
29165 @node On Writing Manuals
29166 @section On Writing Manuals
29167
29168 I guess most manuals are written after-the-fact; documenting a program
29169 that's already there.  This is not how this manual is written.  When
29170 implementing something, I write the manual entry for that something
29171 straight away.  I then see that it's difficult to explain the
29172 functionality, so I write how it's supposed to be, and then I change the
29173 implementation.  Writing the documentation and writing the code go hand
29174 in hand.
29175
29176 This, of course, means that this manual has no, or little, flow.  It
29177 documents absolutely everything in Gnus, but often not where you're
29178 looking for it.  It is a reference manual, and not a guide to how to get
29179 started with Gnus.
29180
29181 That would be a totally different book, that should be written using the
29182 reference manual as source material.  It would look quite different.
29183
29184
29185 @page
29186 @node Terminology
29187 @section Terminology
29188
29189 @cindex terminology
29190 @table @dfn
29191
29192 @item news
29193 @cindex news
29194 This is what you are supposed to use this thing for---reading news.
29195 News is generally fetched from a nearby @acronym{NNTP} server, and is
29196 generally publicly available to everybody.  If you post news, the entire
29197 world is likely to read just what you have written, and they'll all
29198 snigger mischievously.  Behind your back.
29199
29200 @item mail
29201 @cindex mail
29202 Everything that's delivered to you personally is mail.  Some news/mail
29203 readers (like Gnus) blur the distinction between mail and news, but
29204 there is a difference.  Mail is private.  News is public.  Mailing is
29205 not posting, and replying is not following up.
29206
29207 @item reply
29208 @cindex reply
29209 Send a mail to the person who has written what you are reading.
29210
29211 @item follow up
29212 @cindex follow up
29213 Post an article to the current newsgroup responding to the article you
29214 are reading.
29215
29216 @item back end
29217 @cindex back end
29218 Gnus considers mail and news to be mostly the same, really.  The only
29219 difference is how to access the actual articles.  News articles are
29220 commonly fetched via the protocol @acronym{NNTP}, whereas mail
29221 messages could be read from a file on the local disk.  The internal
29222 architecture of Gnus thus comprises a ``front end'' and a number of
29223 ``back ends''.  Internally, when you enter a group (by hitting
29224 @key{RET}, say), you thereby invoke a function in the front end in
29225 Gnus.  The front end then ``talks'' to a back end and says things like
29226 ``Give me the list of articles in the foo group'' or ``Show me article
29227 number 4711''.
29228
29229 So a back end mainly defines either a protocol (the @code{nntp} back
29230 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
29231 accesses mail via @acronym{IMAP}) or a file format and directory
29232 layout (the @code{nnspool} back end accesses news via the common
29233 ``spool directory'' format, the @code{nnml} back end access mail via a
29234 file format and directory layout that's quite similar).
29235
29236 Gnus does not handle the underlying media, so to speak---this is all
29237 done by the back ends.  A back end is a collection of functions to
29238 access the articles.
29239
29240 However, sometimes the term ``back end'' is also used where ``server''
29241 would have been more appropriate.  And then there is the term ``select
29242 method'' which can mean either.  The Gnus terminology can be quite
29243 confusing.
29244
29245 @item native
29246 @cindex native
29247 Gnus will always use one method (and back end) as the @dfn{native}, or
29248 default, way of getting news.
29249
29250 @item foreign
29251 @cindex foreign
29252 You can also have any number of foreign groups active at the same time.
29253 These are groups that use non-native non-secondary back ends for getting
29254 news.
29255
29256 @item secondary
29257 @cindex secondary
29258 Secondary back ends are somewhere half-way between being native and being
29259 foreign, but they mostly act like they are native.
29260
29261 @item article
29262 @cindex article
29263 A message that has been posted as news.
29264
29265 @item mail message
29266 @cindex mail message
29267 A message that has been mailed.
29268
29269 @item message
29270 @cindex message
29271 A mail message or news article
29272
29273 @item head
29274 @cindex head
29275 The top part of a message, where administrative information (etc.) is
29276 put.
29277
29278 @item body
29279 @cindex body
29280 The rest of an article.  Everything not in the head is in the
29281 body.
29282
29283 @item header
29284 @cindex header
29285 A line from the head of an article.
29286
29287 @item headers
29288 @cindex headers
29289 A collection of such lines, or a collection of heads.  Or even a
29290 collection of @acronym{NOV} lines.
29291
29292 @item @acronym{NOV}
29293 @cindex @acronym{NOV}
29294 @acronym{NOV} stands for News OverView, which is a type of news server
29295 header which provide datas containing the condensed header information
29296 of articles.  They are produced by the server itself; in the @code{nntp}
29297 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
29298 Gnus makes them by itself for some backends (in particular, @code{nnml}).
29299
29300 When Gnus enters a group, it asks the back end for the headers of all
29301 unread articles in the group.  Most servers support the News OverView
29302 format, which is more compact and much faster to read and parse than the
29303 normal @sc{head} format.
29304
29305 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
29306 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
29307 where each line has the header information of one article.  The header
29308 information is a tab-separated series of the header's contents including
29309 an article number, a subject, an author, a date, a message-id,
29310 references, etc.
29311
29312 Those data enable Gnus to generate summary lines quickly.  However, if
29313 the server does not support @acronym{NOV} or you disable it purposely or
29314 for some reason, Gnus will try to generate the header information by
29315 parsing each article's headers one by one.  It will take time.
29316 Therefore, it is not usually a good idea to set nn*-nov-is-evil
29317 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
29318 know that the server makes wrong @acronym{NOV} data.
29319
29320 @item level
29321 @cindex levels
29322 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
29323 that have a lower level are ``more'' subscribed than the groups with a
29324 higher level.  In fact, groups on levels 1-5 are considered
29325 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
29326 are @dfn{killed}.  Commands for listing groups and scanning for new
29327 articles will all use the numeric prefix as @dfn{working level}.
29328
29329 @item killed groups
29330 @cindex killed groups
29331 No information on killed groups is stored or updated, which makes killed
29332 groups much easier to handle than subscribed groups.
29333
29334 @item zombie groups
29335 @cindex zombie groups
29336 Just like killed groups, only slightly less dead.
29337
29338 @item active file
29339 @cindex active file
29340 The news server has to keep track of what articles it carries, and what
29341 groups exist.  All this information in stored in the active file, which
29342 is rather large, as you might surmise.
29343
29344 @item bogus groups
29345 @cindex bogus groups
29346 A group that exists in the @file{.newsrc} file, but isn't known to the
29347 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
29348 This means that the group probably doesn't exist (any more).
29349
29350 @item activating
29351 @cindex activating groups
29352 The act of asking the server for info on a group and computing the
29353 number of unread articles is called @dfn{activating the group}.
29354 Un-activated groups are listed with @samp{*} in the group buffer.
29355
29356 @item spool
29357 @cindex spool
29358 News servers store their articles locally in one fashion or other.
29359 One old-fashioned storage method is to have just one file per
29360 article.  That's called a ``traditional spool''.
29361
29362 @item server
29363 @cindex server
29364 A machine one can connect to and get news (or mail) from.
29365
29366 @item select method
29367 @cindex select method
29368 A structure that specifies the back end, the server and the virtual
29369 server settings.
29370
29371 @item virtual server
29372 @cindex virtual server
29373 A named select method.  Since a select method defines all there is to
29374 know about connecting to a (physical) server, taking the thing as a
29375 whole is a virtual server.
29376
29377 @item washing
29378 @cindex washing
29379 Taking a buffer and running it through a filter of some sort.  The
29380 result will (more often than not) be cleaner and more pleasing than the
29381 original.
29382
29383 @item ephemeral groups
29384 @cindex ephemeral groups
29385 @cindex temporary groups
29386 Most groups store data on what articles you have read.  @dfn{Ephemeral}
29387 groups are groups that will have no data stored---when you exit the
29388 group, it'll disappear into the aether.
29389
29390 @item solid groups
29391 @cindex solid groups
29392 This is the opposite of ephemeral groups.  All groups listed in the
29393 group buffer are solid groups.
29394
29395 @item sparse articles
29396 @cindex sparse articles
29397 These are article placeholders shown in the summary buffer when
29398 @code{gnus-build-sparse-threads} has been switched on.
29399
29400 @item threading
29401 @cindex threading
29402 To put responses to articles directly after the articles they respond
29403 to---in a hierarchical fashion.
29404
29405 @item root
29406 @cindex root
29407 @cindex thread root
29408 The first article in a thread is the root.  It is the ancestor of all
29409 articles in the thread.
29410
29411 @item parent
29412 @cindex parent
29413 An article that has responses.
29414
29415 @item child
29416 @cindex child
29417 An article that responds to a different article---its parent.
29418
29419 @item digest
29420 @cindex digest
29421 A collection of messages in one file.  The most common digest format is
29422 specified by RFC 1153.
29423
29424 @item splitting
29425 @cindex splitting, terminology
29426 @cindex mail sorting
29427 @cindex mail filtering (splitting)
29428 The action of sorting your emails according to certain rules. Sometimes
29429 incorrectly called mail filtering.
29430
29431 @end table
29432
29433
29434 @page
29435 @node Customization
29436 @section Customization
29437 @cindex general customization
29438
29439 All variables are properly documented elsewhere in this manual.  This
29440 section is designed to give general pointers on how to customize Gnus
29441 for some quite common situations.
29442
29443 @menu
29444 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
29445 * Slow Terminal Connection::    You run a remote Emacs.
29446 * Little Disk Space::           You feel that having large setup files is icky.
29447 * Slow Machine::                You feel like buying a faster machine.
29448 @end menu
29449
29450
29451 @node Slow/Expensive Connection
29452 @subsection Slow/Expensive Connection
29453
29454 If you run Emacs on a machine locally, and get your news from a machine
29455 over some very thin strings, you want to cut down on the amount of data
29456 Gnus has to get from the server.
29457
29458 @table @code
29459
29460 @item gnus-read-active-file
29461 Set this to @code{nil}, which will inhibit Gnus from requesting the
29462 entire active file from the server.  This file is often very large.  You
29463 also have to set @code{gnus-check-new-newsgroups} and
29464 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
29465 doesn't suddenly decide to fetch the active file anyway.
29466
29467 @item gnus-nov-is-evil
29468 @vindex gnus-nov-is-evil
29469 Usually this one must @emph{always} be @code{nil} (which is the
29470 default).  If, for example, you wish to not use @acronym{NOV}
29471 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
29472 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
29473 instead of setting this.  But you normally do not need to set
29474 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
29475 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
29476 headers from the @acronym{NNTP} server will not be very fast if you tell
29477 Gnus not to use @acronym{NOV}.
29478
29479 As the variables for the other back ends, there are
29480 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
29481 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
29482 @code{nnml-nov-is-evil}, @code{nnspool-nov-is-evil}, and
29483 @code{nnwarchive-nov-is-evil}.  Note that a non-@code{nil} value for
29484 @code{gnus-nov-is-evil} overrides all those variables.@footnote{Although
29485 the back ends @code{nnkiboze}, @code{nnultimate}, and
29486 @code{nnwfm} don't have their own nn*-nov-is-evil.}
29487 @end table
29488
29489
29490 @node Slow Terminal Connection
29491 @subsection Slow Terminal Connection
29492
29493 Let's say you use your home computer for dialing up the system that runs
29494 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
29495 possible) the amount of data sent over the wires.
29496
29497 @table @code
29498
29499 @item gnus-auto-center-summary
29500 Set this to @code{nil} to inhibit Gnus from re-centering the summary
29501 buffer all the time.  If it is @code{vertical}, do only vertical
29502 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
29503 horizontal and vertical recentering.
29504
29505 @item gnus-visible-headers
29506 Cut down on the headers included in the articles to the
29507 minimum.  You can, in fact, make do without them altogether---most of the
29508 useful data is in the summary buffer, anyway.  Set this variable to
29509 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
29510
29511 Use the following to enable all the available hiding features:
29512 @lisp
29513 (setq gnus-treat-hide-headers 'head
29514       gnus-treat-hide-signature t
29515       gnus-treat-hide-citation t)
29516 @end lisp
29517
29518 @item gnus-use-full-window
29519 By setting this to @code{nil}, you can make all the windows smaller.
29520 While this doesn't really cut down much generally, it means that you
29521 have to see smaller portions of articles before deciding that you didn't
29522 want to read them anyway.
29523
29524 @item gnus-thread-hide-subtree
29525 If this is non-@code{nil}, all threads in the summary buffer will be
29526 hidden initially.
29527
29528
29529 @item gnus-updated-mode-lines
29530 If this is @code{nil}, Gnus will not put information in the buffer mode
29531 lines, which might save some time.
29532 @end table
29533
29534
29535 @node Little Disk Space
29536 @subsection Little Disk Space
29537 @cindex disk space
29538
29539 The startup files can get rather large, so you may want to cut their
29540 sizes a bit if you are running out of space.
29541
29542 @table @code
29543
29544 @item gnus-save-newsrc-file
29545 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
29546 only save @file{.newsrc.eld}.  This means that you will not be able to
29547 use any other newsreaders than Gnus.  This variable is @code{t} by
29548 default.
29549
29550 @item gnus-read-newsrc-file
29551 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
29552 only read @file{.newsrc.eld}.  This means that you will not be able to
29553 use any other newsreaders than Gnus.  This variable is @code{t} by
29554 default.
29555
29556 @item gnus-save-killed-list
29557 If this is @code{nil}, Gnus will not save the list of dead groups.  You
29558 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
29559 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
29560 variable to @code{nil}.  This variable is @code{t} by default.
29561
29562 @end table
29563
29564
29565 @node Slow Machine
29566 @subsection Slow Machine
29567 @cindex slow machine
29568
29569 If you have a slow machine, or are just really impatient, there are a
29570 few things you can do to make Gnus run faster.
29571
29572 Set @code{gnus-check-new-newsgroups} and
29573 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
29574
29575 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
29576 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
29577 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
29578
29579
29580 @page
29581 @node Troubleshooting
29582 @section Troubleshooting
29583 @cindex troubleshooting
29584
29585 Gnus works @emph{so} well straight out of the box---I can't imagine any
29586 problems, really.
29587
29588 Ahem.
29589
29590 @enumerate
29591
29592 @item
29593 Make sure your computer is switched on.
29594
29595 @item
29596 Make sure that you really load the current Gnus version.  If you have
29597 been running @sc{gnus}, you need to exit Emacs and start it up again before
29598 Gnus will work.
29599
29600 @item
29601 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
29602 like @c
29603 @samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
29604 @c
29605 you have the right files loaded.  Otherwise you have some old @file{.el}
29606 files lying around.  Delete these.
29607
29608 @item
29609 Read the help group (@kbd{G h} in the group buffer) for a
29610 @acronym{FAQ} and a how-to.
29611
29612 @item
29613 @vindex max-lisp-eval-depth
29614 Gnus works on many recursive structures, and in some extreme (and very
29615 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
29616 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
29617 something like that.
29618 @end enumerate
29619
29620 If all else fails, report the problem as a bug.
29621
29622 @cindex bugs
29623 @cindex reporting bugs
29624
29625 @kindex M-x gnus-bug
29626 @findex gnus-bug
29627 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
29628 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
29629 me the backtrace.  I will fix bugs, but I can only fix them if you send
29630 me a precise description as to how to reproduce the bug.
29631
29632 You really can never be too detailed in a bug report.  Always use the
29633 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
29634 a 10Kb mail each time you use it, and even if you have sent me your
29635 environment 500 times before.  I don't care.  I want the full info each
29636 time.
29637
29638 It is also important to remember that I have no memory whatsoever.  If
29639 you send a bug report, and I send you a reply, and then you just send
29640 back ``No, it's not! Moron!'', I will have no idea what you are
29641 insulting me about.  Always over-explain everything.  It's much easier
29642 for all of us---if I don't have all the information I need, I will just
29643 mail you and ask for more info, and everything takes more time.
29644
29645 If the problem you're seeing is very visual, and you can't quite explain
29646 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
29647 it somewhere it can be reached, and include the URL of the picture in
29648 the bug report.
29649
29650 @cindex patches
29651 If you would like to contribute a patch to fix bugs or make
29652 improvements, please produce the patch using @samp{diff -u}.
29653
29654 @cindex edebug
29655 If you want to debug your problem further before reporting, possibly
29656 in order to solve the problem yourself and send a patch, you can use
29657 edebug.  Debugging Lisp code is documented in the Elisp manual
29658 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
29659 Lisp Reference Manual}).  To get you started with edebug, consider if
29660 you discover some weird behavior when pressing @kbd{c}, the first
29661 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
29662 the documentation buffer that leads you to the function definition,
29663 then press @kbd{M-x edebug-defun RET} with point inside that function,
29664 return to Gnus and press @kbd{c} to invoke the code.  You will be
29665 placed in the lisp buffer and can single step using @kbd{SPC} and
29666 evaluate expressions using @kbd{M-:} or inspect variables using
29667 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
29668 @kbd{c} or @kbd{g}.
29669
29670 @cindex elp
29671 @cindex profile
29672 @cindex slow
29673 Sometimes, a problem do not directly generate an elisp error but
29674 manifests itself by causing Gnus to be very slow.  In these cases, you
29675 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
29676 slow, and then try to analyze the backtrace (repeating the procedure
29677 helps isolating the real problem areas).
29678
29679 A fancier approach is to use the elisp profiler, ELP.  The profiler is
29680 (or should be) fully documented elsewhere, but to get you started
29681 there are a few steps that need to be followed.  First, instrument the
29682 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
29683 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
29684 RET message}.  Then perform the operation that is slow and press
29685 @kbd{M-x elp-results}.  You will then see which operations that takes
29686 time, and can debug them further.  If the entire operation takes much
29687 longer than the time spent in the slowest function in the profiler
29688 output, you probably profiled the wrong part of Gnus.  To reset
29689 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
29690 elp-restore-all} is supposed to remove profiling, but given the
29691 complexities and dynamic code generation in Gnus, it might not always
29692 work perfectly.
29693
29694 @cindex gnu.emacs.gnus
29695 @cindex ding mailing list
29696 If you just need help, you are better off asking on
29697 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
29698 @email{ding@@gnus.org, the ding mailing list}.  Write to
29699 @email{ding-request@@gnus.org} to subscribe.
29700
29701
29702 @page
29703 @node Gnus Reference Guide
29704 @section Gnus Reference Guide
29705
29706 It is my hope that other people will figure out smart stuff that Gnus
29707 can do, and that other people will write those smart things as well.  To
29708 facilitate that I thought it would be a good idea to describe the inner
29709 workings of Gnus.  And some of the not-so-inner workings, while I'm at
29710 it.
29711
29712 You can never expect the internals of a program not to change, but I
29713 will be defining (in some details) the interface between Gnus and its
29714 back ends (this is written in stone), the format of the score files
29715 (ditto), data structures (some are less likely to change than others)
29716 and general methods of operation.
29717
29718 @menu
29719 * Gnus Utility Functions::      Common functions and variable to use.
29720 * Back End Interface::          How Gnus communicates with the servers.
29721 * Score File Syntax::           A BNF definition of the score file standard.
29722 * Headers::                     How Gnus stores headers internally.
29723 * Ranges::                      A handy format for storing mucho numbers.
29724 * Group Info::                  The group info format.
29725 * Extended Interactive::        Symbolic prefixes and stuff.
29726 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
29727 * Various File Formats::        Formats of files that Gnus use.
29728 @end menu
29729
29730
29731 @node Gnus Utility Functions
29732 @subsection Gnus Utility Functions
29733 @cindex Gnus utility functions
29734 @cindex utility functions
29735 @cindex functions
29736 @cindex internal variables
29737
29738 When writing small functions to be run from hooks (and stuff), it's
29739 vital to have access to the Gnus internal functions and variables.
29740 Below is a list of the most common ones.
29741
29742 @table @code
29743
29744 @item gnus-newsgroup-name
29745 @vindex gnus-newsgroup-name
29746 This variable holds the name of the current newsgroup.
29747
29748 @item gnus-find-method-for-group
29749 @findex gnus-find-method-for-group
29750 A function that returns the select method for @var{group}.
29751
29752 @item gnus-group-real-name
29753 @findex gnus-group-real-name
29754 Takes a full (prefixed) Gnus group name, and returns the unprefixed
29755 name.
29756
29757 @item gnus-group-prefixed-name
29758 @findex gnus-group-prefixed-name
29759 Takes an unprefixed group name and a select method, and returns the full
29760 (prefixed) Gnus group name.
29761
29762 @item gnus-get-info
29763 @findex gnus-get-info
29764 Returns the group info list for @var{group}.
29765
29766 @item gnus-group-unread
29767 @findex gnus-group-unread
29768 The number of unread articles in @var{group}, or @code{t} if that is
29769 unknown.
29770
29771 @item gnus-active
29772 @findex gnus-active
29773 The active entry for @var{group}.
29774
29775 @item gnus-set-active
29776 @findex gnus-set-active
29777 Set the active entry for @var{group}.
29778
29779 @item gnus-add-current-to-buffer-list
29780 @findex gnus-add-current-to-buffer-list
29781 Adds the current buffer to the list of buffers to be killed on Gnus
29782 exit.
29783
29784 @item gnus-continuum-version
29785 @findex gnus-continuum-version
29786 Takes a Gnus version string as a parameter and returns a floating point
29787 number.  Earlier versions will always get a lower number than later
29788 versions.
29789
29790 @item gnus-group-read-only-p
29791 @findex gnus-group-read-only-p
29792 Says whether @var{group} is read-only or not.
29793
29794 @item gnus-news-group-p
29795 @findex gnus-news-group-p
29796 Says whether @var{group} came from a news back end.
29797
29798 @item gnus-ephemeral-group-p
29799 @findex gnus-ephemeral-group-p
29800 Says whether @var{group} is ephemeral or not.
29801
29802 @item gnus-server-to-method
29803 @findex gnus-server-to-method
29804 Returns the select method corresponding to @var{server}.
29805
29806 @item gnus-server-equal
29807 @findex gnus-server-equal
29808 Says whether two virtual servers are equal.
29809
29810 @item gnus-group-native-p
29811 @findex gnus-group-native-p
29812 Says whether @var{group} is native or not.
29813
29814 @item gnus-group-secondary-p
29815 @findex gnus-group-secondary-p
29816 Says whether @var{group} is secondary or not.
29817
29818 @item gnus-group-foreign-p
29819 @findex gnus-group-foreign-p
29820 Says whether @var{group} is foreign or not.
29821
29822 @item gnus-group-find-parameter
29823 @findex gnus-group-find-parameter
29824 Returns the parameter list of @var{group}.  If given a second parameter,
29825 returns the value of that parameter for @var{group}.
29826
29827 @item gnus-group-set-parameter
29828 @findex gnus-group-set-parameter
29829 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
29830
29831 @item gnus-narrow-to-body
29832 @findex gnus-narrow-to-body
29833 Narrows the current buffer to the body of the article.
29834
29835 @item gnus-check-backend-function
29836 @findex gnus-check-backend-function
29837 Takes two parameters, @var{function} and @var{group}.  If the back end
29838 @var{group} comes from supports @var{function}, return non-@code{nil}.
29839
29840 @lisp
29841 (gnus-check-backend-function "request-scan" "nnml:misc")
29842 @result{} t
29843 @end lisp
29844
29845 @item gnus-read-method
29846 @findex gnus-read-method
29847 Prompts the user for a select method.
29848
29849 @end table
29850
29851
29852 @node Back End Interface
29853 @subsection Back End Interface
29854
29855 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
29856 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
29857 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
29858 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
29859 examples of the latter we have @code{nntp-port-number} and
29860 @code{nnmbox-directory}.
29861
29862 When Gnus asks for information from a back end---say @code{nntp}---on
29863 something, it will normally include a virtual server name in the
29864 function parameters.  (If not, the back end should use the ``current''
29865 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
29866 server as its only (optional) parameter.  If this virtual server hasn't
29867 been opened, the function should fail.
29868
29869 Note that a virtual server name has no relation to some physical server
29870 name.  Take this example:
29871
29872 @lisp
29873 (nntp "odd-one"
29874       (nntp-address "ifi.uio.no")
29875       (nntp-port-number 4324))
29876 @end lisp
29877
29878 Here the virtual server name is @samp{odd-one} while the name of
29879 the physical server is @samp{ifi.uio.no}.
29880
29881 The back ends should be able to switch between several virtual servers.
29882 The standard back ends implement this by keeping an alist of virtual
29883 server environments that they pull down/push up when needed.
29884
29885 There are two groups of interface functions: @dfn{required functions},
29886 which must be present, and @dfn{optional functions}, which Gnus will
29887 always check for presence before attempting to call 'em.
29888
29889 All these functions are expected to return data in the buffer
29890 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
29891 unfortunately named, but we'll have to live with it.  When I talk about
29892 @dfn{resulting data}, I always refer to the data in that buffer.  When I
29893 talk about @dfn{return value}, I talk about the function value returned by
29894 the function call.  Functions that fail should return @code{nil} as the
29895 return value.
29896
29897 Some back ends could be said to be @dfn{server-forming} back ends, and
29898 some might be said not to be.  The latter are back ends that generally
29899 only operate on one group at a time, and have no concept of ``server''
29900 ---they have a group, and they deliver info on that group and nothing
29901 more.
29902
29903 Gnus identifies each message by way of group name and article number.  A
29904 few remarks about these article numbers might be useful.  First of all,
29905 the numbers are positive integers.  Secondly, it is normally not
29906 possible for later articles to ``re-use'' older article numbers without
29907 confusing Gnus.  That is, if a group has ever contained a message
29908 numbered 42, then no other message may get that number, or Gnus will get
29909 mightily confused.@footnote{See the function
29910 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
29911 Third, article numbers must be assigned in order of arrival in the
29912 group; this is not necessarily the same as the date of the message.
29913
29914 The previous paragraph already mentions all the ``hard'' restrictions that
29915 article numbers must fulfill.  But it seems that it might be useful to
29916 assign @emph{consecutive} article numbers, for Gnus gets quite confused
29917 if there are holes in the article numbering sequence.  However, due to
29918 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
29919 also useful for the article numbers to start at 1 to avoid running out
29920 of numbers as long as possible.
29921
29922 Note that by convention, back ends are named @code{nnsomething}, but
29923 Gnus also comes with some @code{nnnotbackends}, such as
29924 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
29925
29926 In the examples and definitions I will refer to the imaginary back end
29927 @code{nnchoke}.
29928
29929 @cindex @code{nnchoke}
29930
29931 @menu
29932 * Required Back End Functions::  Functions that must be implemented.
29933 * Optional Back End Functions::  Functions that need not be implemented.
29934 * Error Messaging::             How to get messages and report errors.
29935 * Writing New Back Ends::       Extending old back ends.
29936 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
29937 * Mail-like Back Ends::         Some tips on mail back ends.
29938 @end menu
29939
29940
29941 @node Required Back End Functions
29942 @subsubsection Required Back End Functions
29943
29944 @table @code
29945
29946 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
29947
29948 @var{articles} is either a range of article numbers or a list of
29949 @code{Message-ID}s.  Current back ends do not fully support either---only
29950 sequences (lists) of article numbers, and most back ends do not support
29951 retrieval of @code{Message-ID}s.  But they should try for both.
29952
29953 The result data should either be HEADs or @acronym{NOV} lines, and the result
29954 value should either be @code{headers} or @code{nov} to reflect this.
29955 This might later be expanded to @code{various}, which will be a mixture
29956 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
29957
29958 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
29959 headers'', in some meaning of the word.  This is generally done by
29960 fetching (at most) @var{fetch-old} extra headers less than the smallest
29961 article number in @code{articles}, and filling the gaps as well.  The
29962 presence of this parameter can be ignored if the back end finds it
29963 cumbersome to follow the request.  If this is non-@code{nil} and not a
29964 number, do maximum fetches.
29965
29966 Here's an example HEAD:
29967
29968 @example
29969 221 1056 Article retrieved.
29970 Path: ifi.uio.no!sturles
29971 From: sturles@@ifi.uio.no (Sturle Sunde)
29972 Newsgroups: ifi.discussion
29973 Subject: Re: Something very droll
29974 Date: 27 Oct 1994 14:02:57 +0100
29975 Organization: Dept. of Informatics, University of Oslo, Norway
29976 Lines: 26
29977 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29978 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29979 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29980 .
29981 @end example
29982
29983 So a @code{headers} return value would imply that there's a number of
29984 these in the data buffer.
29985
29986 Here's a BNF definition of such a buffer:
29987
29988 @example
29989 headers        = *head
29990 head           = error / valid-head
29991 error-message  = [ "4" / "5" ] 2number " " <error message> eol
29992 valid-head     = valid-message *header "." eol
29993 valid-message  = "221 " <number> " Article retrieved." eol
29994 header         = <text> eol
29995 @end example
29996
29997 @cindex BNF
29998 (The version of BNF used here is the one used in RFC822.)
29999
30000 If the return value is @code{nov}, the data buffer should contain
30001 @dfn{network overview database} lines.  These are basically fields
30002 separated by tabs.
30003
30004 @example
30005 nov-buffer = *nov-line
30006 nov-line   = field 7*8[ <TAB> field ] eol
30007 field      = <text except TAB>
30008 @end example
30009
30010 For a closer look at what should be in those fields,
30011 @pxref{Headers}.
30012
30013
30014 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
30015
30016 @var{server} is here the virtual server name.  @var{definitions} is a
30017 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
30018
30019 If the server can't be opened, no error should be signaled.  The back end
30020 may then choose to refuse further attempts at connecting to this
30021 server.  In fact, it should do so.
30022
30023 If the server is opened already, this function should return a
30024 non-@code{nil} value.  There should be no data returned.
30025
30026
30027 @item (nnchoke-close-server &optional SERVER)
30028
30029 Close connection to @var{server} and free all resources connected
30030 to it.  Return @code{nil} if the server couldn't be closed for some
30031 reason.
30032
30033 There should be no data returned.
30034
30035
30036 @item (nnchoke-request-close)
30037
30038 Close connection to all servers and free all resources that the back end
30039 have reserved.  All buffers that have been created by that back end
30040 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
30041 function is generally only called when Gnus is shutting down.
30042
30043 There should be no data returned.
30044
30045
30046 @item (nnchoke-server-opened &optional SERVER)
30047
30048 If @var{server} is the current virtual server, and the connection to the
30049 physical server is alive, then this function should return a
30050 non-@code{nil} value.  This function should under no circumstances
30051 attempt to reconnect to a server we have lost connection to.
30052
30053 There should be no data returned.
30054
30055
30056 @item (nnchoke-status-message &optional SERVER)
30057
30058 This function should return the last error message from @var{server}.
30059
30060 There should be no data returned.
30061
30062
30063 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
30064
30065 The result data from this function should be the article specified by
30066 @var{article}.  This might either be a @code{Message-ID} or a number.
30067 It is optional whether to implement retrieval by @code{Message-ID}, but
30068 it would be nice if that were possible.
30069
30070 If @var{to-buffer} is non-@code{nil}, the result data should be returned
30071 in this buffer instead of the normal data buffer.  This is to make it
30072 possible to avoid copying large amounts of data from one buffer to
30073 another, while Gnus mainly requests articles to be inserted directly
30074 into its article buffer.
30075
30076 If it is at all possible, this function should return a cons cell where
30077 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
30078 the article number.  This will enable Gnus to find out what the real
30079 group and article numbers are when fetching articles by
30080 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
30081 on successful article retrieval.
30082
30083
30084 @item (nnchoke-request-group GROUP &optional SERVER FAST)
30085
30086 Get data on @var{group}.  This function also has the side effect of
30087 making @var{group} the current group.
30088
30089 If @var{fast}, don't bother to return useful data, just make @var{group}
30090 the current group.
30091
30092 Here's an example of some result data and a definition of the same:
30093
30094 @example
30095 211 56 1000 1059 ifi.discussion
30096 @end example
30097
30098 The first number is the status, which should be 211.  Next is the
30099 total number of articles in the group, the lowest article number, the
30100 highest article number, and finally the group name.  Note that the total
30101 number of articles may be less than one might think while just
30102 considering the highest and lowest article numbers, but some articles
30103 may have been canceled.  Gnus just discards the total-number, so
30104 whether one should take the bother to generate it properly (if that is a
30105 problem) is left as an exercise to the reader.  If the group contains no
30106 articles, the lowest article number should be reported as 1 and the
30107 highest as 0.
30108
30109 @example
30110 group-status = [ error / info ] eol
30111 error        = [ "4" / "5" ] 2<number> " " <Error message>
30112 info         = "211 " 3* [ <number> " " ] <string>
30113 @end example
30114
30115
30116 @item (nnchoke-close-group GROUP &optional SERVER)
30117
30118 Close @var{group} and free any resources connected to it.  This will be
30119 a no-op on most back ends.
30120
30121 There should be no data returned.
30122
30123
30124 @item (nnchoke-request-list &optional SERVER)
30125
30126 Return a list of all groups available on @var{server}.  And that means
30127 @emph{all}.
30128
30129 Here's an example from a server that only carries two groups:
30130
30131 @example
30132 ifi.test 0000002200 0000002000 y
30133 ifi.discussion 3324 3300 n
30134 @end example
30135
30136 On each line we have a group name, then the highest article number in
30137 that group, the lowest article number, and finally a flag.  If the group
30138 contains no articles, the lowest article number should be reported as 1
30139 and the highest as 0.
30140
30141 @example
30142 active-file = *active-line
30143 active-line = name " " <number> " " <number> " " flags eol
30144 name        = <string>
30145 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
30146 @end example
30147
30148 The flag says whether the group is read-only (@samp{n}), is moderated
30149 (@samp{m}), is dead (@samp{x}), is aliased to some other group
30150 (@samp{=other-group}) or none of the above (@samp{y}).
30151
30152
30153 @item (nnchoke-request-post &optional SERVER)
30154
30155 This function should post the current buffer.  It might return whether
30156 the posting was successful or not, but that's not required.  If, for
30157 instance, the posting is done asynchronously, it has generally not been
30158 completed by the time this function concludes.  In that case, this
30159 function should set up some kind of sentinel to beep the user loud and
30160 clear if the posting could not be completed.
30161
30162 There should be no result data from this function.
30163
30164 @end table
30165
30166
30167 @node Optional Back End Functions
30168 @subsubsection Optional Back End Functions
30169
30170 @table @code
30171
30172 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
30173
30174 @var{groups} is a list of groups, and this function should request data
30175 on all those groups.  How it does it is of no concern to Gnus, but it
30176 should attempt to do this in a speedy fashion.
30177
30178 The return value of this function can be either @code{active} or
30179 @code{group}, which says what the format of the result data is.  The
30180 former is in the same format as the data from
30181 @code{nnchoke-request-list}, while the latter is a buffer full of lines
30182 in the same format as @code{nnchoke-request-group} gives.
30183
30184 @example
30185 group-buffer = *active-line / *group-status
30186 @end example
30187
30188
30189 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
30190
30191 A Gnus group info (@pxref{Group Info}) is handed to the back end for
30192 alterations.  This comes in handy if the back end really carries all
30193 the information (as is the case with virtual and imap groups).  This
30194 function should destructively alter the info to suit its needs, and
30195 should return a non-@code{nil} value (exceptionally,
30196 @code{nntp-request-update-info} always returns @code{nil} not to waste
30197 the network resources).
30198
30199 There should be no result data from this function.
30200
30201
30202 @item (nnchoke-request-type GROUP &optional ARTICLE)
30203
30204 When the user issues commands for ``sending news'' (@kbd{F} in the
30205 summary buffer, for instance), Gnus has to know whether the article the
30206 user is following up on is news or mail.  This function should return
30207 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
30208 is mail and @code{unknown} if the type can't be decided.  (The
30209 @var{article} parameter is necessary in @code{nnvirtual} groups which
30210 might very well combine mail groups and news groups.)  Both @var{group}
30211 and @var{article} may be @code{nil}.
30212
30213 There should be no result data from this function.
30214
30215
30216 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
30217
30218 Set/remove/add marks on articles.  Normally Gnus handles the article
30219 marks (such as read, ticked, expired etc) internally, and store them in
30220 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
30221 all information about the articles on the server, so Gnus need to
30222 propagate the mark information to the server.
30223
30224 @var{action} is a list of mark setting requests, having this format:
30225
30226 @example
30227 (RANGE ACTION MARK)
30228 @end example
30229
30230 @var{range} is a range of articles you wish to update marks on.
30231 @var{action} is @code{add} or @code{del}, used to add marks or remove
30232 marks (preserving all marks not mentioned).  @var{mark} is a list of
30233 marks; where each mark is a symbol.  Currently used marks are
30234 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
30235 @code{dormant}, @code{save}, @code{download}, @code{unsend},
30236 @code{forward} and @code{recent}, but your back end should, if
30237 possible, not limit itself to these.
30238
30239 Given contradictory actions, the last action in the list should be the
30240 effective one.  That is, if your action contains a request to add the
30241 @code{tick} mark on article 1 and, later in the list, a request to
30242 remove the mark on the same article, the mark should in fact be removed.
30243
30244 An example action list:
30245
30246 @example
30247 (((5 12 30) 'del '(tick))
30248  ((10 . 90) 'add '(read expire))
30249  ((92 94) 'del '(read)))
30250 @end example
30251
30252 The function should return a range of articles it wasn't able to set the
30253 mark on (currently not used for anything).
30254
30255 There should be no result data from this function.
30256
30257 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
30258
30259 If the user tries to set a mark that the back end doesn't like, this
30260 function may change the mark.  Gnus will use whatever this function
30261 returns as the mark for @var{article} instead of the original
30262 @var{mark}.  If the back end doesn't care, it must return the original
30263 @var{mark}, and not @code{nil} or any other type of garbage.
30264
30265 The only use for this I can see is what @code{nnvirtual} does with
30266 it---if a component group is auto-expirable, marking an article as read
30267 in the virtual group should result in the article being marked as
30268 expirable.
30269
30270 There should be no result data from this function.
30271
30272
30273 @item (nnchoke-request-scan &optional GROUP SERVER)
30274
30275 This function may be called at any time (by Gnus or anything else) to
30276 request that the back end check for incoming articles, in one way or
30277 another.  A mail back end will typically read the spool file or query
30278 the @acronym{POP} server when this function is invoked.  The
30279 @var{group} doesn't have to be heeded---if the back end decides that
30280 it is too much work just scanning for a single group, it may do a
30281 total scan of all groups.  It would be nice, however, to keep things
30282 local if that's practical.
30283
30284 There should be no result data from this function.
30285
30286
30287 @item (nnchoke-request-group-description GROUP &optional SERVER)
30288
30289 The result data from this function should be a description of
30290 @var{group}.
30291
30292 @example
30293 description-line = name <TAB> description eol
30294 name             = <string>
30295 description      = <text>
30296 @end example
30297
30298 @item (nnchoke-request-list-newsgroups &optional SERVER)
30299
30300 The result data from this function should be the description of all
30301 groups available on the server.
30302
30303 @example
30304 description-buffer = *description-line
30305 @end example
30306
30307
30308 @item (nnchoke-request-newgroups DATE &optional SERVER)
30309
30310 The result data from this function should be all groups that were
30311 created after @samp{date}, which is in normal human-readable date format
30312 (i.e., the date format used in mail and news headers, and returned by
30313 the function @code{message-make-date} by default).  The data should be
30314 in the active buffer format.
30315
30316 It is okay for this function to return ``too many'' groups; some back ends
30317 might find it cheaper to return the full list of groups, rather than
30318 just the new groups.  But don't do this for back ends with many groups.
30319 Normally, if the user creates the groups herself, there won't be too
30320 many groups, so @code{nnml} and the like are probably safe.  But for
30321 back ends like @code{nntp}, where the groups have been created by the
30322 server, it is quite likely that there can be many groups.
30323
30324
30325 @item (nnchoke-request-create-group GROUP &optional SERVER)
30326
30327 This function should create an empty group with name @var{group}.
30328
30329 There should be no return data.
30330
30331
30332 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
30333
30334 This function should run the expiry process on all articles in the
30335 @var{articles} range (which is currently a simple list of article
30336 numbers.)  It is left up to the back end to decide how old articles
30337 should be before they are removed by this function.  If @var{force} is
30338 non-@code{nil}, all @var{articles} should be deleted, no matter how new
30339 they are.
30340
30341 This function should return a list of articles that it did not/was not
30342 able to delete.
30343
30344 There should be no result data returned.
30345
30346
30347 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
30348
30349 This function should move @var{article} (which is a number) from
30350 @var{group} by calling @var{accept-form}.
30351
30352 This function should ready the article in question for moving by
30353 removing any header lines it has added to the article, and generally
30354 should ``tidy up'' the article.  Then it should @code{eval}
30355 @var{accept-form} in the buffer where the ``tidy'' article is.  This
30356 will do the actual copying.  If this @code{eval} returns a
30357 non-@code{nil} value, the article should be removed.
30358
30359 If @var{last} is @code{nil}, that means that there is a high likelihood
30360 that there will be more requests issued shortly, so that allows some
30361 optimizations.
30362
30363 The function should return a cons where the @code{car} is the group name and
30364 the @code{cdr} is the article number that the article was entered as.
30365
30366 There should be no data returned.
30367
30368
30369 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
30370
30371 This function takes the current buffer and inserts it into @var{group}.
30372 If @var{last} in @code{nil}, that means that there will be more calls to
30373 this function in short order.
30374
30375 The function should return a cons where the @code{car} is the group name and
30376 the @code{cdr} is the article number that the article was entered as.
30377
30378 The group should exist before the back end is asked to accept the
30379 article for that group.
30380
30381 There should be no data returned.
30382
30383
30384 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
30385
30386 This function should remove @var{article} (which is a number) from
30387 @var{group} and insert @var{buffer} there instead.
30388
30389 There should be no data returned.
30390
30391
30392 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
30393
30394 This function should delete @var{group}.  If @var{force}, it should
30395 really delete all the articles in the group, and then delete the group
30396 itself.  (If there is such a thing as ``the group itself''.)
30397
30398 There should be no data returned.
30399
30400
30401 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
30402
30403 This function should rename @var{group} into @var{new-name}.  All
30404 articles in @var{group} should move to @var{new-name}.
30405
30406 There should be no data returned.
30407
30408 @end table
30409
30410
30411 @node Error Messaging
30412 @subsubsection Error Messaging
30413
30414 @findex nnheader-report
30415 @findex nnheader-get-report
30416 The back ends should use the function @code{nnheader-report} to report
30417 error conditions---they should not raise errors when they aren't able to
30418 perform a request.  The first argument to this function is the back end
30419 symbol, and the rest are interpreted as arguments to @code{format} if
30420 there are multiple of them, or just a string if there is one of them.
30421 This function must always returns @code{nil}.
30422
30423 @lisp
30424 (nnheader-report 'nnchoke "You did something totally bogus")
30425
30426 (nnheader-report 'nnchoke "Could not request group %s" group)
30427 @end lisp
30428
30429 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
30430 @code{nil} back from a server, and this function returns the most
30431 recently reported message for the back end in question.  This function
30432 takes one argument---the server symbol.
30433
30434 Internally, these functions access @var{back-end}@code{-status-string},
30435 so the @code{nnchoke} back end will have its error message stored in
30436 @code{nnchoke-status-string}.
30437
30438
30439 @node Writing New Back Ends
30440 @subsubsection Writing New Back Ends
30441
30442 Many back ends are quite similar.  @code{nnml} is just like
30443 @code{nnspool}, but it allows you to edit the articles on the server.
30444 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
30445 and it doesn't maintain overview databases.  @code{nndir} is just like
30446 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
30447 editing articles.
30448
30449 It would make sense if it were possible to ``inherit'' functions from
30450 back ends when writing new back ends.  And, indeed, you can do that if you
30451 want to.  (You don't have to if you don't want to, of course.)
30452
30453 All the back ends declare their public variables and functions by using a
30454 package called @code{nnoo}.
30455
30456 To inherit functions from other back ends (and allow other back ends to
30457 inherit functions from the current back end), you should use the
30458 following macros:
30459
30460 @table @code
30461
30462 @item nnoo-declare
30463 This macro declares the first parameter to be a child of the subsequent
30464 parameters.  For instance:
30465
30466 @lisp
30467 (nnoo-declare nndir
30468   nnml nnmh)
30469 @end lisp
30470
30471 @code{nndir} has declared here that it intends to inherit functions from
30472 both @code{nnml} and @code{nnmh}.
30473
30474 @item defvoo
30475 This macro is equivalent to @code{defvar}, but registers the variable as
30476 a public server variable.  Most state-oriented variables should be
30477 declared with @code{defvoo} instead of @code{defvar}.
30478
30479 In addition to the normal @code{defvar} parameters, it takes a list of
30480 variables in the parent back ends to map the variable to when executing
30481 a function in those back ends.
30482
30483 @lisp
30484 (defvoo nndir-directory nil
30485   "Where nndir will look for groups."
30486   nnml-current-directory nnmh-current-directory)
30487 @end lisp
30488
30489 This means that @code{nnml-current-directory} will be set to
30490 @code{nndir-directory} when an @code{nnml} function is called on behalf
30491 of @code{nndir}.  (The same with @code{nnmh}.)
30492
30493 @item nnoo-define-basics
30494 This macro defines some common functions that almost all back ends should
30495 have.
30496
30497 @lisp
30498 (nnoo-define-basics nndir)
30499 @end lisp
30500
30501 @item deffoo
30502 This macro is just like @code{defun} and takes the same parameters.  In
30503 addition to doing the normal @code{defun} things, it registers the
30504 function as being public so that other back ends can inherit it.
30505
30506 @item nnoo-map-functions
30507 This macro allows mapping of functions from the current back end to
30508 functions from the parent back ends.
30509
30510 @lisp
30511 (nnoo-map-functions nndir
30512   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30513   (nnmh-request-article 0 nndir-current-group 0 0))
30514 @end lisp
30515
30516 This means that when @code{nndir-retrieve-headers} is called, the first,
30517 third, and fourth parameters will be passed on to
30518 @code{nnml-retrieve-headers}, while the second parameter is set to the
30519 value of @code{nndir-current-group}.
30520
30521 @item nnoo-import
30522 This macro allows importing functions from back ends.  It should be the
30523 last thing in the source file, since it will only define functions that
30524 haven't already been defined.
30525
30526 @lisp
30527 (nnoo-import nndir
30528   (nnmh
30529    nnmh-request-list
30530    nnmh-request-newgroups)
30531   (nnml))
30532 @end lisp
30533
30534 This means that calls to @code{nndir-request-list} should just be passed
30535 on to @code{nnmh-request-list}, while all public functions from
30536 @code{nnml} that haven't been defined in @code{nndir} yet should be
30537 defined now.
30538
30539 @end table
30540
30541 Below is a slightly shortened version of the @code{nndir} back end.
30542
30543 @lisp
30544 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
30545 ;; @r{Copyright (C) 1995,1996 Free Software Foundation, Inc.}
30546
30547 ;;; @r{Code:}
30548
30549 (require 'nnheader)
30550 (require 'nnmh)
30551 (require 'nnml)
30552 (require 'nnoo)
30553 (eval-when-compile (require 'cl))
30554
30555 (nnoo-declare nndir
30556   nnml nnmh)
30557
30558 (defvoo nndir-directory nil
30559   "Where nndir will look for groups."
30560   nnml-current-directory nnmh-current-directory)
30561
30562 (defvoo nndir-nov-is-evil nil
30563   "*Non-nil means that nndir will never retrieve NOV headers."
30564   nnml-nov-is-evil)
30565
30566 (defvoo nndir-current-group ""
30567   nil
30568   nnml-current-group nnmh-current-group)
30569 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
30570 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
30571
30572 (defvoo nndir-status-string "" nil nnmh-status-string)
30573 (defconst nndir-version "nndir 1.0")
30574
30575 ;;; @r{Interface functions.}
30576
30577 (nnoo-define-basics nndir)
30578
30579 (deffoo nndir-open-server (server &optional defs)
30580   (setq nndir-directory
30581         (or (cadr (assq 'nndir-directory defs))
30582             server))
30583   (unless (assq 'nndir-directory defs)
30584     (push `(nndir-directory ,server) defs))
30585   (push `(nndir-current-group
30586           ,(file-name-nondirectory
30587             (directory-file-name nndir-directory)))
30588         defs)
30589   (push `(nndir-top-directory
30590           ,(file-name-directory (directory-file-name nndir-directory)))
30591         defs)
30592   (nnoo-change-server 'nndir server defs))
30593
30594 (nnoo-map-functions nndir
30595   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30596   (nnmh-request-article 0 nndir-current-group 0 0)
30597   (nnmh-request-group nndir-current-group 0 0)
30598   (nnmh-close-group nndir-current-group 0))
30599
30600 (nnoo-import nndir
30601   (nnmh
30602    nnmh-status-message
30603    nnmh-request-list
30604    nnmh-request-newgroups))
30605
30606 (provide 'nndir)
30607 @end lisp
30608
30609
30610 @node Hooking New Back Ends Into Gnus
30611 @subsubsection Hooking New Back Ends Into Gnus
30612
30613 @vindex gnus-valid-select-methods
30614 @findex gnus-declare-backend
30615 Having Gnus start using your new back end is rather easy---you just
30616 declare it with the @code{gnus-declare-backend} functions.  This will
30617 enter the back end into the @code{gnus-valid-select-methods} variable.
30618
30619 @code{gnus-declare-backend} takes two parameters---the back end name and
30620 an arbitrary number of @dfn{abilities}.
30621
30622 Here's an example:
30623
30624 @lisp
30625 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
30626 @end lisp
30627
30628 The above line would then go in the @file{nnchoke.el} file.
30629
30630 The abilities can be:
30631
30632 @table @code
30633 @item mail
30634 This is a mailish back end---followups should (probably) go via mail.
30635 @item post
30636 This is a newsish back end---followups should (probably) go via news.
30637 @item post-mail
30638 This back end supports both mail and news.
30639 @item none
30640 This is neither a post nor mail back end---it's something completely
30641 different.
30642 @item respool
30643 It supports respooling---or rather, it is able to modify its source
30644 articles and groups.
30645 @item address
30646 The name of the server should be in the virtual server name.  This is
30647 true for almost all back ends.
30648 @item prompt-address
30649 The user should be prompted for an address when doing commands like
30650 @kbd{B} in the group buffer.  This is true for back ends like
30651 @code{nntp}, but not @code{nnmbox}, for instance.
30652 @end table
30653
30654
30655 @node Mail-like Back Ends
30656 @subsubsection Mail-like Back Ends
30657
30658 One of the things that separate the mail back ends from the rest of the
30659 back ends is the heavy dependence by most of the mail back ends on
30660 common functions in @file{nnmail.el}.  For instance, here's the
30661 definition of @code{nnml-request-scan}:
30662
30663 @lisp
30664 (deffoo nnml-request-scan (&optional group server)
30665   (setq nnml-article-file-alist nil)
30666   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
30667 @end lisp
30668
30669 It simply calls @code{nnmail-get-new-mail} with a few parameters,
30670 and @code{nnmail} takes care of all the moving and splitting of the
30671 mail.
30672
30673 This function takes four parameters.
30674
30675 @table @var
30676 @item method
30677 This should be a symbol to designate which back end is responsible for
30678 the call.
30679
30680 @item exit-function
30681 This function should be called after the splitting has been performed.
30682
30683 @item temp-directory
30684 Where the temporary files should be stored.
30685
30686 @item group
30687 This optional argument should be a group name if the splitting is to be
30688 performed for one group only.
30689 @end table
30690
30691 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
30692 save each article.  @var{back-end}@code{-active-number} will be called to
30693 find the article number assigned to this article.
30694
30695 The function also uses the following variables:
30696 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
30697 this back end); and @var{back-end}@code{-group-alist} and
30698 @var{back-end}@code{-active-file} to generate the new active file.
30699 @var{back-end}@code{-group-alist} should be a group-active alist, like
30700 this:
30701
30702 @example
30703 (("a-group" (1 . 10))
30704  ("some-group" (34 . 39)))
30705 @end example
30706
30707
30708 @node Score File Syntax
30709 @subsection Score File Syntax
30710
30711 Score files are meant to be easily parseable, but yet extremely
30712 mallable.  It was decided that something that had the same read syntax
30713 as an Emacs Lisp list would fit that spec.
30714
30715 Here's a typical score file:
30716
30717 @lisp
30718 (("summary"
30719   ("win95" -10000 nil s)
30720   ("Gnus"))
30721  ("from"
30722   ("Lars" -1000))
30723  (mark -100))
30724 @end lisp
30725
30726 BNF definition of a score file:
30727
30728 @example
30729 score-file      = "" / "(" *element ")"
30730 element         = rule / atom
30731 rule            = string-rule / number-rule / date-rule
30732 string-rule     = "(" quote string-header quote space *string-match ")"
30733 number-rule     = "(" quote number-header quote space *number-match ")"
30734 date-rule       = "(" quote date-header quote space *date-match ")"
30735 quote           = <ascii 34>
30736 string-header   = "subject" / "from" / "references" / "message-id" /
30737                   "xref" / "body" / "head" / "all" / "followup"
30738 number-header   = "lines" / "chars"
30739 date-header     = "date"
30740 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
30741                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
30742 score           = "nil" / <integer>
30743 date            = "nil" / <natural number>
30744 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
30745                   "r" / "regex" / "R" / "Regex" /
30746                   "e" / "exact" / "E" / "Exact" /
30747                   "f" / "fuzzy" / "F" / "Fuzzy"
30748 number-match    = "(" <integer> [ "" / [ space score [ "" /
30749                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
30750 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
30751 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
30752                   space date [ "" / [ space date-match-t ] ] ] ] ")"
30753 date-match-t    = "nil" / "at" / "before" / "after"
30754 atom            = "(" [ required-atom / optional-atom ] ")"
30755 required-atom   = mark / expunge / mark-and-expunge / files /
30756                   exclude-files / read-only / touched
30757 optional-atom   = adapt / local / eval
30758 mark            = "mark" space nil-or-number
30759 nil-or-number   = "nil" / <integer>
30760 expunge         = "expunge" space nil-or-number
30761 mark-and-expunge = "mark-and-expunge" space nil-or-number
30762 files           = "files" *[ space <string> ]
30763 exclude-files   = "exclude-files" *[ space <string> ]
30764 read-only       = "read-only" [ space "nil" / space "t" ]
30765 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
30766 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
30767 local           = "local" *[ space "(" <string> space <form> ")" ]
30768 eval            = "eval" space <form>
30769 space           = *[ " " / <TAB> / <NEWLINE> ]
30770 @end example
30771
30772 Any unrecognized elements in a score file should be ignored, but not
30773 discarded.
30774
30775 As you can see, white space is needed, but the type and amount of white
30776 space is irrelevant.  This means that formatting of the score file is
30777 left up to the programmer---if it's simpler to just spew it all out on
30778 one looong line, then that's ok.
30779
30780 The meaning of the various atoms are explained elsewhere in this
30781 manual (@pxref{Score File Format}).
30782
30783
30784 @node Headers
30785 @subsection Headers
30786
30787 Internally Gnus uses a format for storing article headers that
30788 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
30789 almost suspect that the author looked at the @acronym{NOV} specification and
30790 just shamelessly @emph{stole} the entire thing, and one would be right.
30791
30792 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
30793 RFC 1036 to talk about lines in the head of an article (e.g.,
30794 @code{From}).  It is used by many people as a synonym for
30795 ``head''---``the header and the body''.  (That should be avoided, in my
30796 opinion.)  And Gnus uses a format internally that it calls ``header'',
30797 which is what I'm talking about here.  This is a 9-element vector,
30798 basically, with each header (ouch) having one slot.
30799
30800 These slots are, in order: @code{number}, @code{subject}, @code{from},
30801 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
30802 @code{xref}, and @code{extra}.  There are macros for accessing and
30803 setting these slots---they all have predictable names beginning with
30804 @code{mail-header-} and @code{mail-header-set-}, respectively.
30805
30806 All these slots contain strings, except the @code{extra} slot, which
30807 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
30808
30809
30810 @node Ranges
30811 @subsection Ranges
30812
30813 @sc{gnus} introduced a concept that I found so useful that I've started
30814 using it a lot and have elaborated on it greatly.
30815
30816 The question is simple: If you have a large amount of objects that are
30817 identified by numbers (say, articles, to take a @emph{wild} example)
30818 that you want to qualify as being ``included'', a normal sequence isn't
30819 very useful.  (A 200,000 length sequence is a bit long-winded.)
30820
30821 The solution is as simple as the question: You just collapse the
30822 sequence.
30823
30824 @example
30825 (1 2 3 4 5 6 10 11 12)
30826 @end example
30827
30828 is transformed into
30829
30830 @example
30831 ((1 . 6) (10 . 12))
30832 @end example
30833
30834 To avoid having those nasty @samp{(13 . 13)} elements to denote a
30835 lonesome object, a @samp{13} is a valid element:
30836
30837 @example
30838 ((1 . 6) 7 (10 . 12))
30839 @end example
30840
30841 This means that comparing two ranges to find out whether they are equal
30842 is slightly tricky:
30843
30844 @example
30845 ((1 . 5) 7 8 (10 . 12))
30846 @end example
30847
30848 and
30849
30850 @example
30851 ((1 . 5) (7 . 8) (10 . 12))
30852 @end example
30853
30854 are equal.  In fact, any non-descending list is a range:
30855
30856 @example
30857 (1 2 3 4 5)
30858 @end example
30859
30860 is a perfectly valid range, although a pretty long-winded one.  This is
30861 also valid:
30862
30863 @example
30864 (1 . 5)
30865 @end example
30866
30867 and is equal to the previous range.
30868
30869 Here's a BNF definition of ranges.  Of course, one must remember the
30870 semantic requirement that the numbers are non-descending.  (Any number
30871 of repetition of the same number is allowed, but apt to disappear in
30872 range handling.)
30873
30874 @example
30875 range           = simple-range / normal-range
30876 simple-range    = "(" number " . " number ")"
30877 normal-range    = "(" start-contents ")"
30878 contents        = "" / simple-range *[ " " contents ] /
30879                   number *[ " " contents ]
30880 @end example
30881
30882 Gnus currently uses ranges to keep track of read articles and article
30883 marks.  I plan on implementing a number of range operators in C if The
30884 Powers That Be are willing to let me.  (I haven't asked yet, because I
30885 need to do some more thinking on what operators I need to make life
30886 totally range-based without ever having to convert back to normal
30887 sequences.)
30888
30889
30890 @node Group Info
30891 @subsection Group Info
30892
30893 Gnus stores all permanent info on groups in a @dfn{group info} list.
30894 This list is from three to six elements (or more) long and exhaustively
30895 describes the group.
30896
30897 Here are two example group infos; one is a very simple group while the
30898 second is a more complex one:
30899
30900 @example
30901 ("no.group" 5 ((1 . 54324)))
30902
30903 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
30904                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
30905                 (nnml "")
30906                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
30907 @end example
30908
30909 The first element is the @dfn{group name}---as Gnus knows the group,
30910 anyway.  The second element is the @dfn{subscription level}, which
30911 normally is a small integer.  (It can also be the @dfn{rank}, which is a
30912 cons cell where the @code{car} is the level and the @code{cdr} is the
30913 score.)  The third element is a list of ranges of read articles.  The
30914 fourth element is a list of lists of article marks of various kinds.
30915 The fifth element is the select method (or virtual server, if you like).
30916 The sixth element is a list of @dfn{group parameters}, which is what
30917 this section is about.
30918
30919 Any of the last three elements may be missing if they are not required.
30920 In fact, the vast majority of groups will normally only have the first
30921 three elements, which saves quite a lot of cons cells.
30922
30923 Here's a BNF definition of the group info format:
30924
30925 @example
30926 info          = "(" group space ralevel space read
30927                 [ "" / [ space marks-list [ "" / [ space method [ "" /
30928                 space parameters ] ] ] ] ] ")"
30929 group         = quote <string> quote
30930 ralevel       = rank / level
30931 level         = <integer in the range of 1 to inf>
30932 rank          = "(" level "." score ")"
30933 score         = <integer in the range of 1 to inf>
30934 read          = range
30935 marks-lists   = nil / "(" *marks ")"
30936 marks         = "(" <string> range ")"
30937 method        = "(" <string> *elisp-forms ")"
30938 parameters    = "(" *elisp-forms ")"
30939 @end example
30940
30941 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
30942 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
30943 in pseudo-BNF.
30944
30945 If you have a Gnus info and want to access the elements, Gnus offers a
30946 series of macros for getting/setting these elements.
30947
30948 @table @code
30949 @item gnus-info-group
30950 @itemx gnus-info-set-group
30951 @findex gnus-info-group
30952 @findex gnus-info-set-group
30953 Get/set the group name.
30954
30955 @item gnus-info-rank
30956 @itemx gnus-info-set-rank
30957 @findex gnus-info-rank
30958 @findex gnus-info-set-rank
30959 Get/set the group rank (@pxref{Group Score}).
30960
30961 @item gnus-info-level
30962 @itemx gnus-info-set-level
30963 @findex gnus-info-level
30964 @findex gnus-info-set-level
30965 Get/set the group level.
30966
30967 @item gnus-info-score
30968 @itemx gnus-info-set-score
30969 @findex gnus-info-score
30970 @findex gnus-info-set-score
30971 Get/set the group score (@pxref{Group Score}).
30972
30973 @item gnus-info-read
30974 @itemx gnus-info-set-read
30975 @findex gnus-info-read
30976 @findex gnus-info-set-read
30977 Get/set the ranges of read articles.
30978
30979 @item gnus-info-marks
30980 @itemx gnus-info-set-marks
30981 @findex gnus-info-marks
30982 @findex gnus-info-set-marks
30983 Get/set the lists of ranges of marked articles.
30984
30985 @item gnus-info-method
30986 @itemx gnus-info-set-method
30987 @findex gnus-info-method
30988 @findex gnus-info-set-method
30989 Get/set the group select method.
30990
30991 @item gnus-info-params
30992 @itemx gnus-info-set-params
30993 @findex gnus-info-params
30994 @findex gnus-info-set-params
30995 Get/set the group parameters.
30996 @end table
30997
30998 All the getter functions take one parameter---the info list.  The setter
30999 functions take two parameters---the info list and the new value.
31000
31001 The last three elements in the group info aren't mandatory, so it may be
31002 necessary to extend the group info before setting the element.  If this
31003 is necessary, you can just pass on a non-@code{nil} third parameter to
31004 the three final setter functions to have this happen automatically.
31005
31006
31007 @node Extended Interactive
31008 @subsection Extended Interactive
31009 @cindex interactive
31010 @findex gnus-interactive
31011
31012 Gnus extends the standard Emacs @code{interactive} specification
31013 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
31014 Prefixes}).  Here's an example of how this is used:
31015
31016 @lisp
31017 (defun gnus-summary-increase-score (&optional score symp)
31018   (interactive (gnus-interactive "P\ny"))
31019   ...
31020   )
31021 @end lisp
31022
31023 The best thing to do would have been to implement
31024 @code{gnus-interactive} as a macro which would have returned an
31025 @code{interactive} form, but this isn't possible since Emacs checks
31026 whether a function is interactive or not by simply doing an @code{assq}
31027 on the lambda form.  So, instead we have @code{gnus-interactive}
31028 function that takes a string and returns values that are usable to
31029 @code{interactive}.
31030
31031 This function accepts (almost) all normal @code{interactive} specs, but
31032 adds a few more.
31033
31034 @table @samp
31035 @item y
31036 @vindex gnus-current-prefix-symbol
31037 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
31038 variable.
31039
31040 @item Y
31041 @vindex gnus-current-prefix-symbols
31042 A list of the current symbolic prefixes---the
31043 @code{gnus-current-prefix-symbol} variable.
31044
31045 @item A
31046 The current article number---the @code{gnus-summary-article-number}
31047 function.
31048
31049 @item H
31050 The current article header---the @code{gnus-summary-article-header}
31051 function.
31052
31053 @item g
31054 The current group name---the @code{gnus-group-group-name}
31055 function.
31056
31057 @end table
31058
31059
31060 @node Emacs/XEmacs Code
31061 @subsection Emacs/XEmacs Code
31062 @cindex XEmacs
31063 @cindex Emacsen
31064
31065 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
31066 platforms must be the primary one.  I chose Emacs.  Not because I don't
31067 like XEmacs or Mule, but because it comes first alphabetically.
31068
31069 This means that Gnus will byte-compile under Emacs with nary a warning,
31070 while XEmacs will pump out gigabytes of warnings while byte-compiling.
31071 As I use byte-compilation warnings to help me root out trivial errors in
31072 Gnus, that's very useful.
31073
31074 I've also consistently used Emacs function interfaces, but have used
31075 Gnusey aliases for the functions.  To take an example:  Emacs defines a
31076 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
31077 function.  I then define a function called @code{gnus-run-at-time} that
31078 takes the same parameters as the Emacs @code{run-at-time}.  When running
31079 Gnus under Emacs, the former function is just an alias for the latter.
31080 However, when running under XEmacs, the former is an alias for the
31081 following function:
31082
31083 @lisp
31084 (defun gnus-xmas-run-at-time (time repeat function &rest args)
31085   (start-itimer
31086    "gnus-run-at-time"
31087    `(lambda ()
31088       (,function ,@@args))
31089    time repeat))
31090 @end lisp
31091
31092 This sort of thing has been done for bunches of functions.  Gnus does
31093 not redefine any native Emacs functions while running under XEmacs---it
31094 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
31095 all over.
31096
31097 In the cases where the XEmacs function interface was obviously cleaner,
31098 I used it instead.  For example @code{gnus-region-active-p} is an alias
31099 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
31100
31101 Of course, I could have chosen XEmacs as my native platform and done
31102 mapping functions the other way around.  But I didn't.  The performance
31103 hit these indirections impose on Gnus under XEmacs should be slight.
31104
31105
31106 @node Various File Formats
31107 @subsection Various File Formats
31108
31109 @menu
31110 * Active File Format::          Information on articles and groups available.
31111 * Newsgroups File Format::      Group descriptions.
31112 @end menu
31113
31114
31115 @node Active File Format
31116 @subsubsection Active File Format
31117
31118 The active file lists all groups available on the server in
31119 question.  It also lists the highest and lowest current article numbers
31120 in each group.
31121
31122 Here's an excerpt from a typical active file:
31123
31124 @example
31125 soc.motss 296030 293865 y
31126 alt.binaries.pictures.fractals 3922 3913 n
31127 comp.sources.unix 1605 1593 m
31128 comp.binaries.ibm.pc 5097 5089 y
31129 no.general 1000 900 y
31130 @end example
31131
31132 Here's a pseudo-BNF definition of this file:
31133
31134 @example
31135 active      = *group-line
31136 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
31137 group       = <non-white-space string>
31138 spc         = " "
31139 high-number = <non-negative integer>
31140 low-number  = <positive integer>
31141 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
31142 @end example
31143
31144 For a full description of this file, see the manual pages for
31145 @samp{innd}, in particular @samp{active(5)}.
31146
31147
31148 @node Newsgroups File Format
31149 @subsubsection Newsgroups File Format
31150
31151 The newsgroups file lists groups along with their descriptions.  Not all
31152 groups on the server have to be listed,  and not all groups in the file
31153 have to exist on the server.  The file is meant purely as information to
31154 the user.
31155
31156 The format is quite simple; a group name, a tab, and the description.
31157 Here's the definition:
31158
31159 @example
31160 newsgroups    = *line
31161 line          = group tab description <NEWLINE>
31162 group         = <non-white-space string>
31163 tab           = <TAB>
31164 description   = <string>
31165 @end example
31166
31167
31168 @page
31169 @node Emacs for Heathens
31170 @section Emacs for Heathens
31171
31172 Believe it or not, but some people who use Gnus haven't really used
31173 Emacs much before they embarked on their journey on the Gnus Love Boat.
31174 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
31175 region'', and ``set @code{gnus-flargblossen} to an alist where the key
31176 is a regexp that is used for matching on the group name'' are magical
31177 phrases with little or no meaning, then this appendix is for you.  If
31178 you are already familiar with Emacs, just ignore this and go fondle your
31179 cat instead.
31180
31181 @menu
31182 * Keystrokes::                  Entering text and executing commands.
31183 * Emacs Lisp::                  The built-in Emacs programming language.
31184 @end menu
31185
31186
31187 @node Keystrokes
31188 @subsection Keystrokes
31189
31190 @itemize @bullet
31191 @item
31192 Q: What is an experienced Emacs user?
31193
31194 @item
31195 A: A person who wishes that the terminal had pedals.
31196 @end itemize
31197
31198 Yes, when you use Emacs, you are apt to use the control key, the shift
31199 key and the meta key a lot.  This is very annoying to some people
31200 (notably @code{vi}le users), and the rest of us just love the hell out
31201 of it.  Just give up and submit.  Emacs really does stand for
31202 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
31203 may have heard from other disreputable sources (like the Emacs author).
31204
31205 The shift keys are normally located near your pinky fingers, and are
31206 normally used to get capital letters and stuff.  You probably use it all
31207 the time.  The control key is normally marked ``CTRL'' or something like
31208 that.  The meta key is, funnily enough, never marked as such on any
31209 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
31210 which is the meta key on this keyboard.  It's usually located somewhere
31211 to the left hand side of the keyboard, usually on the bottom row.
31212
31213 Now, us Emacs people don't say ``press the meta-control-m key'',
31214 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
31215 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
31216 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
31217 down the control key, and hold it down while you press @kbd{k}''.
31218 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
31219 the control key and then press @kbd{k}''.  Simple, ay?
31220
31221 This is somewhat complicated by the fact that not all keyboards have a
31222 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
31223 means ``press escape, release escape, press @kbd{k}''.  That's much more
31224 work than if you have a meta key, so if that's the case, I respectfully
31225 suggest you get a real keyboard with a meta key.  You can't live without
31226 it.
31227
31228
31229
31230 @node Emacs Lisp
31231 @subsection Emacs Lisp
31232
31233 Emacs is the King of Editors because it's really a Lisp interpreter.
31234 Each and every key you tap runs some Emacs Lisp code snippet, and since
31235 Emacs Lisp is an interpreted language, that means that you can configure
31236 any key to run any arbitrary code.  You just, like, do it.
31237
31238 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
31239 functions.  (These are byte-compiled for speed, but it's still
31240 interpreted.)  If you decide that you don't like the way Gnus does
31241 certain things, it's trivial to have it do something a different way.
31242 (Well, at least if you know how to write Lisp code.)  However, that's
31243 beyond the scope of this manual, so we are simply going to talk about
31244 some common constructs that you normally use in your @file{~/.gnus.el}
31245 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
31246 in order to set things of Gnus up, it is much better to use the
31247 @file{~/.gnus.el} file, @xref{Startup Files}.)
31248
31249 If you want to set the variable @code{gnus-florgbnize} to four (4), you
31250 write the following:
31251
31252 @lisp
31253 (setq gnus-florgbnize 4)
31254 @end lisp
31255
31256 This function (really ``special form'') @code{setq} is the one that can
31257 set a variable to some value.  This is really all you need to know.  Now
31258 you can go and fill your @file{~/.gnus.el} file with lots of these to
31259 change how Gnus works.
31260
31261 If you have put that thing in your @file{~/.gnus.el} file, it will be
31262 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
31263 start Gnus.  If you want to change the variable right away, simply say
31264 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
31265 previous ``form'', which is a simple @code{setq} statement here.
31266
31267 Go ahead---just try it, if you're located at your Emacs.  After you
31268 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
31269 is the return value of the form you @code{eval}ed.
31270
31271 Some pitfalls:
31272
31273 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
31274 that means:
31275
31276 @lisp
31277 (setq gnus-read-active-file 'some)
31278 @end lisp
31279
31280 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
31281 @samp{nntp.ifi.uio.no}'', that means:
31282
31283 @lisp
31284 (setq gnus-nntp-server "nntp.ifi.uio.no")
31285 @end lisp
31286
31287 So be careful not to mix up strings (the latter) with symbols (the
31288 former).  The manual is unambiguous, but it can be confusing.
31289
31290 @page
31291 @include gnus-faq.texi
31292
31293 @node GNU Free Documentation License
31294 @chapter GNU Free Documentation License
31295 @include doclicense.texi
31296
31297 @node Index
31298 @chapter Index
31299 @printindex cp
31300
31301 @node Key Index
31302 @chapter Key Index
31303 @printindex ky
31304
31305 @bye
31306
31307 @iftex
31308 @iflatex
31309 \end{document}
31310 @end iflatex
31311 @end iftex
31312
31313 @c Local Variables:
31314 @c mode: texinfo
31315 @c coding: iso-8859-1
31316 @c End:
31317
31318 @ignore
31319    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
31320 @end ignore