* gnus-art.el (gnus-copy-article-ignored-headers): New variable.
[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 (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001,
13 2002, 2003, 2004
14 Free Software Foundation, Inc.
15
16 @quotation
17 Permission is granted to copy, distribute and/or modify this document
18 under the terms of the GNU Free Documentation License, Version 1.1 or
19 any later version published by the Free Software Foundation; with no
20 Invariant Sections, with the Front-Cover texts being ``A GNU
21 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
22 license is included in the section entitled ``GNU Free Documentation
23 License'' in the Emacs manual.
24
25 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
26 this GNU Manual, like GNU software.  Copies published by the Free
27 Software Foundation raise funds for GNU development.''
28
29 This document is part of a collection distributed under the GNU Free
30 Documentation License.  If you want to distribute this document
31 separately from the collection, you can do so by adding a copy of the
32 license to the document, as described in section 6 of the license.
33 @end quotation
34 @end copying
35
36 @iftex
37 @iflatex
38 \documentclass[twoside,a4paper,openright,11pt]{book}
39 \usepackage[latin1]{inputenc}
40 \usepackage{pagestyle}
41 \usepackage{epsfig}
42 \usepackage{pixidx}
43 \input{gnusconfig.tex}
44
45 \ifx\pdfoutput\undefined
46 \else
47 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
48 \usepackage{thumbpdf}
49 \pdfcompresslevel=9
50 \fi
51
52 \makeindex
53 \begin{document}
54
55 \newcommand{\gnusversionname}{Gnus v5.10.6}
56 \newcommand{\gnuschaptername}{}
57 \newcommand{\gnussectionname}{}
58
59 \newcommand{\gnusbackslash}{/}
60
61 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
62 \ifx\pdfoutput\undefined
63 \newcommand{\gnusuref}[1]{\gnustt{#1}}
64 \else
65 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
66 \fi
67 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
68 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
69
70 \newcommand{\gnuskindex}[1]{\index{#1}}
71 \newcommand{\gnusindex}[1]{\index{#1}}
72
73 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
74 \newcommand{\gnuscode}[1]{\gnustt{#1}}
75 \newcommand{\gnusasis}[1]{\gnustt{#1}}
76 \newcommand{\gnusurl}[1]{\gnustt{#1}}
77 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
78 \newcommand{\gnusenv}[1]{\gnustt{#1}}
79 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
80 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
81 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
82 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
83 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
84 \newcommand{\gnusdfn}[1]{\textit{#1}}
85 \newcommand{\gnusi}[1]{\textit{#1}}
86 \newcommand{\gnusr}[1]{\textrm{#1}}
87 \newcommand{\gnusstrong}[1]{\textbf{#1}}
88 \newcommand{\gnusemph}[1]{\textit{#1}}
89 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
90 \newcommand{\gnussc}[1]{\textsc{#1}}
91 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
92 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
93 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
94 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
95 \newcommand{\gnusacronym}[1]{\textsc{#1}}
96 \newcommand{\gnusemail}[1]{\textit{#1}}
97
98 \newcommand{\gnusbullet}{{${\bullet}$}}
99 \newcommand{\gnusdollar}{\$}
100 \newcommand{\gnusampersand}{\&}
101 \newcommand{\gnuspercent}{\%}
102 \newcommand{\gnushash}{\#}
103 \newcommand{\gnushat}{\symbol{"5E}}
104 \newcommand{\gnusunderline}{\symbol{"5F}}
105 \newcommand{\gnusnot}{$\neg$}
106 \newcommand{\gnustilde}{\symbol{"7E}}
107 \newcommand{\gnusless}{{$<$}}
108 \newcommand{\gnusgreater}{{$>$}}
109 \newcommand{\gnusbraceleft}{{$>$}}
110 \newcommand{\gnusbraceright}{{$>$}}
111
112 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
113 \newcommand{\gnusinteresting}{
114 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
115 }
116
117 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
118
119 \newcommand{\gnuspagechapter}[1]{
120 {\mbox{}}
121 }
122
123 \newdimen{\gnusdimen}
124 \gnusdimen 0pt
125
126 \newcommand{\gnuschapter}[2]{
127 \gnuscleardoublepage
128 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
129 \chapter{#2}
130 \renewcommand{\gnussectionname}{}
131 \renewcommand{\gnuschaptername}{#2}
132 \thispagestyle{empty}
133 \hspace*{-2cm}
134 \begin{picture}(500,500)(0,0)
135 \put(480,350){\makebox(0,0)[tr]{#1}}
136 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
137 \end{picture}
138 \clearpage
139 }
140
141 \newcommand{\gnusfigure}[3]{
142 \begin{figure}
143 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
144 #3
145 \end{picture}
146 \caption{#1}
147 \end{figure}
148 }
149
150 \newcommand{\gnusicon}[1]{
151 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
152 }
153
154 \newcommand{\gnuspicon}[1]{
155 \margindex{\epsfig{figure=#1,width=2cm}}
156 }
157
158 \newcommand{\gnusxface}[2]{
159 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
160 }
161
162 \newcommand{\gnussmiley}[2]{
163 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
164 }
165
166 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
167
168 \newcommand{\gnussection}[1]{
169 \renewcommand{\gnussectionname}{#1}
170 \section{#1}
171 }
172
173 \newenvironment{codelist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{asislist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newenvironment{kbdlist}%
184 {\begin{list}{}{
185 \labelwidth=0cm
186 }
187 }{\end{list}}
188
189 \newenvironment{dfnlist}%
190 {\begin{list}{}{
191 }
192 }{\end{list}}
193
194 \newenvironment{stronglist}%
195 {\begin{list}{}{
196 }
197 }{\end{list}}
198
199 \newenvironment{samplist}%
200 {\begin{list}{}{
201 }
202 }{\end{list}}
203
204 \newenvironment{varlist}%
205 {\begin{list}{}{
206 }
207 }{\end{list}}
208
209 \newenvironment{emphlist}%
210 {\begin{list}{}{
211 }
212 }{\end{list}}
213
214 \newlength\gnusheadtextwidth
215 \setlength{\gnusheadtextwidth}{\headtextwidth}
216 \addtolength{\gnusheadtextwidth}{1cm}
217
218 \newpagestyle{gnuspreamble}%
219 {
220 {
221 \ifodd\count0
222 {
223 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
224 }
225 \else
226 {
227 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
228 }
229 }
230 \fi
231 }
232 }
233 {
234 \ifodd\count0
235 \mbox{} \hfill
236 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
237 \else
238 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
239 \hfill \mbox{}
240 \fi
241 }
242
243 \newpagestyle{gnusindex}%
244 {
245 {
246 \ifodd\count0
247 {
248 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
249 }
250 \else
251 {
252 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
253 }
254 \fi
255 }
256 }
257 {
258 \ifodd\count0
259 \mbox{} \hfill
260 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
261 \else
262 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
263 \hfill \mbox{}
264 \fi
265 }
266
267 \newpagestyle{gnus}%
268 {
269 {
270 \ifodd\count0
271 {
272 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
273 }
274 \else
275 {
276 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
277 }
278 \fi
279 }
280 }
281 {
282 \ifodd\count0
283 \mbox{} \hfill
284 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
285 \else
286 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
287 \hfill \mbox{}
288 \fi
289 }
290
291 \pagenumbering{roman}
292 \pagestyle{gnuspreamble}
293
294 @end iflatex
295 @end iftex
296
297 @iftex
298 @iflatex
299
300 \begin{titlepage}
301 {
302
303 %\addtolength{\oddsidemargin}{-5cm}
304 %\addtolength{\evensidemargin}{-5cm}
305 \parindent=0cm
306 \addtolength{\textheight}{2cm}
307
308 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
309 \rule{15cm}{1mm}\\
310 \vfill
311 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
312 \vfill
313 \rule{15cm}{1mm}\\
314 \gnusauthor{by Lars Magne Ingebrigtsen}
315 \newpage
316 }
317
318 \mbox{}
319 \vfill
320
321 \thispagestyle{empty}
322
323 @c @insertcopying
324 \newpage
325 \end{titlepage}
326 @end iflatex
327 @end iftex
328
329 @ifnottex
330 @insertcopying
331 @end ifnottex
332
333 @dircategory Emacs
334 @direntry
335 * Gnus: (gnus).         The newsreader Gnus.
336 @end direntry
337 @iftex
338 @finalout
339 @end iftex
340 @setchapternewpage odd
341
342
343
344 @titlepage
345 @title Gnus Manual
346
347 @author by Lars Magne Ingebrigtsen
348 @page
349 @vskip 0pt plus 1filll
350 @insertcopying
351 @end titlepage
352
353
354 @node Top
355 @top The Gnus Newsreader
356
357 @ifinfo
358
359 You can read news (and mail) from within Emacs by using Gnus.  The news
360 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
361 spool or your mbox file.  All at the same time, if you want to push your
362 luck.
363
364 This manual corresponds to Gnus v5.10.6.
365
366 @end ifinfo
367
368 @iftex
369
370 @iflatex
371 \tableofcontents
372 \gnuscleardoublepage
373 @end iflatex
374
375 Gnus is the advanced, self-documenting, customizable, extensible
376 unreal-time newsreader for GNU Emacs.
377
378 Oops.  That sounds oddly familiar, so let's start over again to avoid
379 being accused of plagiarism:
380
381 Gnus is a message-reading laboratory.  It will let you look at just
382 about anything as if it were a newsgroup.  You can read mail with it,
383 you can browse directories with it, you can @code{ftp} with it---you
384 can even read news with it!
385
386 Gnus tries to empower people who read news the same way Emacs empowers
387 people who edit text.  Gnus sets no limits to what the user should be
388 allowed to do.  Users are encouraged to extend Gnus to make it behave
389 like they want it to behave.  A program should not control people;
390 people should be empowered to do what they want by using (or abusing)
391 the program.
392
393 @end iftex
394
395 @menu
396 * Starting Up::                 Finding news can be a pain.
397 * Group Buffer::                Selecting, subscribing and killing groups.
398 * Summary Buffer::              Reading, saving and posting articles.
399 * Article Buffer::              Displaying and handling articles.
400 * Composing Messages::          Information on sending mail and news.
401 * Select Methods::              Gnus reads all messages from various select methods.
402 * Scoring::                     Assigning values to articles.
403 * Various::                     General purpose settings.
404 * The End::                     Farewell and goodbye.
405 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
406 * Index::                       Variable, function and concept index.
407 * Key Index::                   Key Index.
408
409 Other related manuals
410
411 * Message:(message).            Composing messages.
412 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
413 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
414 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
415 * SASL:(sasl).                  @acronym{SASL} authentication in Emacs.
416
417 @detailmenu
418  --- The Detailed Node Listing ---
419
420 Starting Gnus
421
422 * Finding the News::            Choosing a method for getting news.
423 * The First Time::              What does Gnus do the first time you start it?
424 * The Server is Down::          How can I read my mail then?
425 * Slave Gnusae::                You can have more than one Gnus active at a time.
426 * Fetching a Group::            Starting Gnus just to read a group.
427 * New Groups::                  What is Gnus supposed to do with new groups?
428 * Changing Servers::            You may want to move from one server to another.
429 * Startup Files::               Those pesky startup files---@file{.newsrc}.
430 * Auto Save::                   Recovering from a crash.
431 * The Active File::             Reading the active file over a slow line Takes Time.
432 * Startup Variables::           Other variables you might change.
433
434 New Groups
435
436 * Checking New Groups::         Determining what groups are new.
437 * Subscription Methods::        What Gnus should do with new groups.
438 * Filtering New Groups::        Making Gnus ignore certain new groups.
439
440 Group Buffer
441
442 * Group Buffer Format::         Information listed and how you can change it.
443 * Group Maneuvering::           Commands for moving in the group buffer.
444 * Selecting a Group::           Actually reading news.
445 * Subscription Commands::       Unsubscribing, killing, subscribing.
446 * Group Data::                  Changing the info for a group.
447 * Group Levels::                Levels? What are those, then?
448 * Group Score::                 A mechanism for finding out what groups you like.
449 * Marking Groups::              You can mark groups for later processing.
450 * Foreign Groups::              Creating and editing groups.
451 * Group Parameters::            Each group may have different parameters set.
452 * Listing Groups::              Gnus can list various subsets of the groups.
453 * Sorting Groups::              Re-arrange the group order.
454 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
455 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
456 * Exiting Gnus::                Stop reading news and get some work done.
457 * Group Topics::                A folding group mode divided into topics.
458 * Misc Group Stuff::            Other stuff that you can to do.
459
460 Group Buffer Format
461
462 * Group Line Specification::    Deciding how the group buffer is to look.
463 * Group Mode Line Specification::  The group buffer mode line.
464 * Group Highlighting::          Having nice colors in the group buffer.
465
466 Group Topics
467
468 * Topic Commands::              Interactive E-Z commands.
469 * Topic Variables::             How to customize the topics the Lisp Way.
470 * Topic Sorting::               Sorting each topic individually.
471 * Topic Topology::              A map of the world.
472 * Topic Parameters::            Parameters that apply to all groups in a topic.
473
474 Misc Group Stuff
475
476 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
477 * Group Information::           Information and help on groups and Gnus.
478 * Group Timestamp::             Making Gnus keep track of when you last read a group.
479 * File Commands::               Reading and writing the Gnus files.
480 * Sieve Commands::              Managing Sieve scripts.
481
482 Summary Buffer
483
484 * Summary Buffer Format::       Deciding how the summary buffer is to look.
485 * Summary Maneuvering::         Moving around the summary buffer.
486 * Choosing Articles::           Reading articles.
487 * Paging the Article::          Scrolling the current article.
488 * Reply Followup and Post::     Posting articles.
489 * Delayed Articles::            Send articles at a later time.
490 * Marking Articles::            Marking articles as read, expirable, etc.
491 * Limiting::                    You can limit the summary buffer.
492 * Threading::                   How threads are made.
493 * Sorting the Summary Buffer::  How articles and threads are sorted.
494 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
495 * Article Caching::             You may store articles in a cache.
496 * Persistent Articles::         Making articles expiry-resistant.
497 * Article Backlog::             Having already read articles hang around.
498 * Saving Articles::             Ways of customizing article saving.
499 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
500 * Article Treatment::           The article buffer can be mangled at will.
501 * MIME Commands::               Doing MIMEy things with the articles.
502 * Charsets::                    Character set issues.
503 * Article Commands::            Doing various things with the article buffer.
504 * Summary Sorting::             Sorting the summary buffer in various ways.
505 * Finding the Parent::          No child support? Get the parent.
506 * Alternative Approaches::      Reading using non-default summaries.
507 * Tree Display::                A more visual display of threads.
508 * Mail Group Commands::         Some commands can only be used in mail groups.
509 * Various Summary Stuff::       What didn't fit anywhere else.
510 * Exiting the Summary Buffer::  Returning to the Group buffer,
511                                 or reselecting the current group.
512 * Crosspost Handling::          How crossposted articles are dealt with.
513 * Duplicate Suppression::       An alternative when crosspost handling fails.
514 * Security::                    Decrypt and Verify.
515 * Mailing List::                Mailing list minor mode.
516
517 Summary Buffer Format
518
519 * Summary Buffer Lines::        You can specify how summary lines should look.
520 * To From Newsgroups::          How to not display your own name.
521 * Summary Buffer Mode Line::    You can say how the mode line should look.
522 * Summary Highlighting::        Making the summary buffer all pretty and nice.
523
524 Choosing Articles
525
526 * Choosing Commands::           Commands for choosing articles.
527 * Choosing Variables::          Variables that influence these commands.
528
529 Reply, Followup and Post
530
531 * Summary Mail Commands::       Sending mail.
532 * Summary Post Commands::       Sending news.
533 * Summary Message Commands::    Other Message-related commands.
534 * Canceling and Superseding::
535
536 Marking Articles
537
538 * Unread Articles::             Marks for unread articles.
539 * Read Articles::               Marks for read articles.
540 * Other Marks::                 Marks that do not affect readedness.
541 * Setting Marks::               How to set and remove marks.
542 * Generic Marking Commands::    How to customize the marking.
543 * Setting Process Marks::       How to mark articles for later processing.
544
545 Threading
546
547 * Customizing Threading::       Variables you can change to affect the threading.
548 * Thread Commands::             Thread based commands in the summary buffer.
549
550 Customizing Threading
551
552 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
553 * Filling In Threads::          Making the threads displayed look fuller.
554 * More Threading::              Even more variables for fiddling with threads.
555 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
556
557 Decoding Articles
558
559 * Uuencoded Articles::          Uudecode articles.
560 * Shell Archives::              Unshar articles.
561 * PostScript Files::            Split PostScript.
562 * Other Files::                 Plain save and binhex.
563 * Decoding Variables::          Variables for a happy decoding.
564 * Viewing Files::               You want to look at the result of the decoding?
565
566 Decoding Variables
567
568 * Rule Variables::              Variables that say how a file is to be viewed.
569 * Other Decode Variables::      Other decode variables.
570 * Uuencoding and Posting::      Variables for customizing uuencoding.
571
572 Article Treatment
573
574 * Article Highlighting::        You want to make the article look like fruit salad.
575 * Article Fontisizing::         Making emphasized text look nice.
576 * Article Hiding::              You also want to make certain info go away.
577 * Article Washing::             Lots of way-neat functions to make life better.
578 * Article Header::              Doing various header transformations.
579 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
580 * Article Button Levels::       Controlling appearance of buttons.
581 * Article Date::                Grumble, UT!
582 * Article Display::             Display various stuff---X-Face, Picons, Smileys
583 * Article Signature::           What is a signature?
584 * Article Miscellanea::         Various other stuff.
585
586 Alternative Approaches
587
588 * Pick and Read::               First mark articles and then read them.
589 * Binary Groups::               Auto-decode all articles.
590
591 Various Summary Stuff
592
593 * Summary Group Information::   Information oriented commands.
594 * Searching for Articles::      Multiple article commands.
595 * Summary Generation Commands::
596 * Really Various Summary Commands::  Those pesky non-conformant commands.
597
598 Article Buffer
599
600 * Hiding Headers::              Deciding what headers should be displayed.
601 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
602 * Customizing Articles::        Tailoring the look of the articles.
603 * Article Keymap::              Keystrokes available in the article buffer.
604 * Misc Article::                Other stuff.
605
606 Composing Messages
607
608 * Mail::                        Mailing and replying.
609 * Posting Server::              What server should you post and mail via?
610 * POP before SMTP::             You cannot send a mail unless you read a mail.
611 * Mail and Post::               Mailing and posting at the same time.
612 * Archived Messages::           Where Gnus stores the messages you've sent.
613 * Posting Styles::              An easier way to specify who you are.
614 * Drafts::                      Postponing messages and rejected messages.
615 * Rejected Articles::           What happens if the server doesn't like your article?
616 * Signing and encrypting::      How to compose secure messages.
617
618 Select Methods
619
620 * Server Buffer::               Making and editing virtual servers.
621 * Getting News::                Reading USENET news with Gnus.
622 * Getting Mail::                Reading your personal mail with Gnus.
623 * Browsing the Web::            Getting messages from a plethora of Web sources.
624 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
625 * Other Sources::               Reading directories, files, SOUP packets.
626 * Combined Groups::             Combining groups into one group.
627 * Gnus Unplugged::              Reading news and mail offline.
628
629 Server Buffer
630
631 * Server Buffer Format::        You can customize the look of this buffer.
632 * Server Commands::             Commands to manipulate servers.
633 * Example Methods::             Examples server specifications.
634 * Creating a Virtual Server::   An example session.
635 * Server Variables::            Which variables to set.
636 * Servers and Methods::         You can use server names as select methods.
637 * Unavailable Servers::         Some servers you try to contact may be down.
638
639 Getting News
640
641 * NNTP::                        Reading news from an @acronym{NNTP} server.
642 * News Spool::                  Reading news from the local spool.
643
644 @acronym{NNTP}
645
646 * Direct Functions::            Connecting directly to the server.
647 * Indirect Functions::          Connecting indirectly to the server.
648 * Common Variables::            Understood by several connection functions.
649
650 Getting Mail
651
652 * Mail in a Newsreader::        Important introductory notes.
653 * Getting Started Reading Mail::  A simple cookbook example.
654 * Splitting Mail::              How to create mail groups.
655 * Mail Sources::                How to tell Gnus where to get mail from.
656 * Mail Back End Variables::     Variables for customizing mail handling.
657 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
658 * Group Mail Splitting::        Use group customize to drive mail splitting.
659 * Incorporating Old Mail::      What about the old mail you have?
660 * Expiring Mail::               Getting rid of unwanted mail.
661 * Washing Mail::                Removing cruft from the mail you get.
662 * Duplicates::                  Dealing with duplicated mail.
663 * Not Reading Mail::            Using mail back ends for reading other files.
664 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
665
666 Mail Sources
667
668 * Mail Source Specifiers::      How to specify what a mail source is.
669 * Mail Source Customization::   Some variables that influence things.
670 * Fetching Mail::               Using the mail source specifiers.
671
672 Choosing a Mail Back End
673
674 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
675 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
676 * Mail Spool::                  Store your mail in a private spool?
677 * MH Spool::                    An mhspool-like back end.
678 * Maildir::                     Another one-file-per-message format.
679 * Mail Folders::                Having one file for each group.
680 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
681
682 Browsing the Web
683
684 * Archiving Mail::
685 * Web Searches::                Creating groups from articles that match a string.
686 * Slashdot::                    Reading the Slashdot comments.
687 * Ultimate::                    The Ultimate Bulletin Board systems.
688 * Web Archive::                 Reading mailing list archived on web.
689 * RSS::                         Reading RDF site summary.
690 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
691
692 @acronym{IMAP}
693
694 * Splitting in IMAP::           Splitting mail with nnimap.
695 * Expiring in IMAP::            Expiring mail with nnimap.
696 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
697 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
698 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
699 * Debugging IMAP::              What to do when things don't work.
700
701 Other Sources
702
703 * Directory Groups::            You can read a directory as if it was a newsgroup.
704 * Anything Groups::             Dired?  Who needs dired?
705 * Document Groups::             Single files can be the basis of a group.
706 * SOUP::                        Reading @sc{soup} packets ``offline''.
707 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
708
709 Document Groups
710
711 * Document Server Internals::   How to add your own document types.
712
713 SOUP
714
715 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
716 * SOUP Groups::                 A back end for reading @sc{soup} packets.
717 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
718
719 Combined Groups
720
721 * Virtual Groups::              Combining articles from many groups.
722 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
723
724 Gnus Unplugged
725
726 * Agent Basics::                How it all is supposed to work.
727 * Agent Categories::            How to tell the Gnus Agent what to download.
728 * Agent Commands::              New commands for all the buffers.
729 * Agent Visuals::               Ways that the agent may effect your summary buffer.
730 * Agent as Cache::              The Agent is a big cache too.
731 * Agent Expiry::                How to make old articles go away.
732 * Agent Regeneration::          How to recover from lost connections and other accidents.
733 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
734 * Outgoing Messages::           What happens when you post/mail something?
735 * Agent Variables::             Customizing is fun.
736 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
737 * Batching Agents::             How to fetch news from a @code{cron} job.
738 * Agent Caveats::               What you think it'll do and what it does.
739
740 Agent Categories
741
742 * Category Syntax::             What a category looks like.
743 * Category Buffer::             A buffer for maintaining categories.
744 * Category Variables::          Customize'r'Us.
745
746 Agent Commands
747
748 * Group Agent Commands::        Configure groups and fetch their contents.
749 * Summary Agent Commands::      Manually select then fetch specific articles.
750 * Server Agent Commands::       Select the servers that are supported by the agent.
751
752 Scoring
753
754 * Summary Score Commands::      Adding score entries for the current group.
755 * Group Score Commands::        General score commands.
756 * Score Variables::             Customize your scoring.  (My, what terminology).
757 * Score File Format::           What a score file may contain.
758 * Score File Editing::          You can edit score files by hand as well.
759 * Adaptive Scoring::            Big Sister Gnus knows what you read.
760 * Home Score File::             How to say where new score entries are to go.
761 * Followups To Yourself::       Having Gnus notice when people answer you.
762 * Scoring On Other Headers::    Scoring on non-standard headers.
763 * Scoring Tips::                How to score effectively.
764 * Reverse Scoring::             That problem child of old is not problem.
765 * Global Score Files::          Earth-spanning, ear-splitting score files.
766 * Kill Files::                  They are still here, but they can be ignored.
767 * Converting Kill Files::       Translating kill files to score files.
768 * Advanced Scoring::            Using logical expressions to build score rules.
769 * Score Decays::                It can be useful to let scores wither away.
770
771 Advanced Scoring
772
773 * Advanced Scoring Syntax::     A definition.
774 * Advanced Scoring Examples::   What they look like.
775 * Advanced Scoring Tips::       Getting the most out of it.
776
777 Various
778
779 * Process/Prefix::              A convention used by many treatment commands.
780 * Interactive::                 Making Gnus ask you many questions.
781 * Symbolic Prefixes::           How to supply some Gnus functions with options.
782 * Formatting Variables::        You can specify what buffers should look like.
783 * Window Layout::               Configuring the Gnus buffer windows.
784 * Faces and Fonts::             How to change how faces look.
785 * Compilation::                 How to speed Gnus up.
786 * Mode Lines::                  Displaying information in the mode lines.
787 * Highlighting and Menus::      Making buffers look all nice and cozy.
788 * Buttons::                     Get tendinitis in ten easy steps!
789 * Daemons::                     Gnus can do things behind your back.
790 * NoCeM::                       How to avoid spam and other fatty foods.
791 * Undo::                        Some actions can be undone.
792 * Predicate Specifiers::        Specifying predicates.
793 * Moderation::                  What to do if you're a moderator.
794 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
795 * Fuzzy Matching::              What's the big fuzz?
796 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
797 * Other modes::                 Interaction with other modes.
798 * Various Various::             Things that are really various.
799
800 Formatting Variables
801
802 * Formatting Basics::           A formatting variable is basically a format string.
803 * Mode Line Formatting::        Some rules about mode line formatting variables.
804 * Advanced Formatting::         Modifying output in various ways.
805 * User-Defined Specs::          Having Gnus call your own functions.
806 * Formatting Fonts::            Making the formatting look colorful and nice.
807 * Positioning Point::           Moving point to a position after an operation.
808 * Tabulation::                  Tabulating your output.
809 * Wide Characters::             Dealing with wide characters.
810
811 Image Enhancements
812
813 * X-Face::                      Display a funky, teensy black-and-white image.
814 * Face::                        Display a funkier, teensier colored image.
815 * Smileys::                     Show all those happy faces the way they were meant to be shown.
816 * Picons::                      How to display pictures of what you're reading.
817 * XVarious::                    Other XEmacsy Gnusey variables.
818
819 Thwarting Email Spam
820
821 * The problem of spam::         Some background, and some solutions
822 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
823 * SpamAssassin::                How to use external anti-spam tools.
824 * Hashcash::                    Reduce spam by burning CPU time.
825 * Filtering Spam Using The Spam ELisp Package::
826 * Filtering Spam Using Statistics with spam-stat::
827
828 Filtering Spam Using The Spam ELisp Package
829
830 * Spam ELisp Package Sequence of Events::  
831 * Spam ELisp Package Filtering of Incoming Mail::  
832 * Spam ELisp Package Global Variables::  
833 * Spam ELisp Package Configuration Examples::  
834 * Blacklists and Whitelists::   
835 * BBDB Whitelists::             
836 * Gmane Spam Reporting::        
837 * Anti-spam Hashcash Payments::  
838 * Blackholes::                  
839 * Regular Expressions Header Matching::  
840 * Bogofilter::                  
841 * SpamAssassin backend::        
842 * ifile spam filtering::        
843 * spam-stat spam filtering::    
844 * SpamOracle::                  
845 * Extending the Spam ELisp package::  
846
847 Filtering Spam Using Statistics with spam-stat
848
849 * Creating a spam-stat dictionary::
850 * Splitting mail using spam-stat::
851 * Low-level interface to the spam-stat dictionary::
852
853 Appendices
854
855 * XEmacs::                      Requirements for installing under XEmacs.
856 * History::                     How Gnus got where it is today.
857 * On Writing Manuals::          Why this is not a beginner's guide.
858 * Terminology::                 We use really difficult, like, words here.
859 * Customization::               Tailoring Gnus to your needs.
860 * Troubleshooting::             What you might try if things do not work.
861 * Gnus Reference Guide::        Rilly, rilly technical stuff.
862 * Emacs for Heathens::          A short introduction to Emacsian terms.
863 * Frequently Asked Questions::  The Gnus FAQ
864
865 History
866
867 * Gnus Versions::               What Gnus versions have been released.
868 * Other Gnus Versions::         Other Gnus versions that also have been released.
869 * Why?::                        What's the point of Gnus?
870 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
871 * Conformity::                  Gnus tries to conform to all standards.
872 * Emacsen::                     Gnus can be run on a few modern Emacsen.
873 * Gnus Development::            How Gnus is developed.
874 * Contributors::                Oodles of people.
875 * New Features::                Pointers to some of the new stuff in Gnus.
876
877 New Features
878
879 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
880 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
881 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
882 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
883 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
884 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
885 * No Gnus::                     Lars, FIXME!
886
887 Customization
888
889 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
890 * Slow Terminal Connection::    You run a remote Emacs.
891 * Little Disk Space::           You feel that having large setup files is icky.
892 * Slow Machine::                You feel like buying a faster machine.
893
894 Gnus Reference Guide
895
896 * Gnus Utility Functions::      Common functions and variable to use.
897 * Back End Interface::          How Gnus communicates with the servers.
898 * Score File Syntax::           A BNF definition of the score file standard.
899 * Headers::                     How Gnus stores headers internally.
900 * Ranges::                      A handy format for storing mucho numbers.
901 * Group Info::                  The group info format.
902 * Extended Interactive::        Symbolic prefixes and stuff.
903 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
904 * Various File Formats::        Formats of files that Gnus use.
905
906 Back End Interface
907
908 * Required Back End Functions::  Functions that must be implemented.
909 * Optional Back End Functions::  Functions that need not be implemented.
910 * Error Messaging::             How to get messages and report errors.
911 * Writing New Back Ends::       Extending old back ends.
912 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
913 * Mail-like Back Ends::         Some tips on mail back ends.
914
915 Various File Formats
916
917 * Active File Format::          Information on articles and groups available.
918 * Newsgroups File Format::      Group descriptions.
919
920 Emacs for Heathens
921
922 * Keystrokes::                  Entering text and executing commands.
923 * Emacs Lisp::                  The built-in Emacs programming language.
924
925 @end detailmenu
926 @end menu
927
928 @node Starting Up
929 @chapter Starting Gnus
930 @cindex starting up
931
932 @kindex M-x gnus
933 @findex gnus
934 If your system administrator has set things up properly, starting Gnus
935 and reading news is extremely easy---you just type @kbd{M-x gnus} in
936 your Emacs.
937
938 @findex gnus-other-frame
939 @kindex M-x gnus-other-frame
940 If you want to start Gnus in a different frame, you can use the command
941 @kbd{M-x gnus-other-frame} instead.
942
943 If things do not go smoothly at startup, you have to twiddle some
944 variables in your @file{~/.gnus.el} file.  This file is similar to
945 @file{~/.emacs}, but is read when Gnus starts.
946
947 If you puzzle at any terms used in this manual, please refer to the
948 terminology section (@pxref{Terminology}).
949
950 @menu
951 * Finding the News::            Choosing a method for getting news.
952 * The First Time::              What does Gnus do the first time you start it?
953 * The Server is Down::          How can I read my mail then?
954 * Slave Gnusae::                You can have more than one Gnus active at a time.
955 * Fetching a Group::            Starting Gnus just to read a group.
956 * New Groups::                  What is Gnus supposed to do with new groups?
957 * Changing Servers::            You may want to move from one server to another.
958 * Startup Files::               Those pesky startup files---@file{.newsrc}.
959 * Auto Save::                   Recovering from a crash.
960 * The Active File::             Reading the active file over a slow line Takes Time.
961 * Startup Variables::           Other variables you might change.
962 @end menu
963
964
965 @node Finding the News
966 @section Finding the News
967 @cindex finding news
968
969 @vindex gnus-select-method
970 @c @head
971 The @code{gnus-select-method} variable says where Gnus should look for
972 news.  This variable should be a list where the first element says
973 @dfn{how} and the second element says @dfn{where}.  This method is your
974 native method.  All groups not fetched with this method are
975 foreign groups.
976
977 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
978 you want to get your daily dosage of news from, you'd say:
979
980 @lisp
981 (setq gnus-select-method '(nntp "news.somewhere.edu"))
982 @end lisp
983
984 If you want to read directly from the local spool, say:
985
986 @lisp
987 (setq gnus-select-method '(nnspool ""))
988 @end lisp
989
990 If you can use a local spool, you probably should, as it will almost
991 certainly be much faster.  But do not use the local spool if your
992 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
993
994 @vindex gnus-nntpserver-file
995 @cindex NNTPSERVER
996 @cindex @acronym{NNTP} server
997 If this variable is not set, Gnus will take a look at the
998 @env{NNTPSERVER} environment variable.  If that variable isn't set,
999 Gnus will see whether @code{gnus-nntpserver-file}
1000 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1001 If that fails as well, Gnus will try to use the machine running Emacs
1002 as an @acronym{NNTP} server.  That's a long shot, though.
1003
1004 @vindex gnus-nntp-server
1005 If @code{gnus-nntp-server} is set, this variable will override
1006 @code{gnus-select-method}.  You should therefore set
1007 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1008
1009 @vindex gnus-secondary-servers
1010 @vindex gnus-nntp-server
1011 You can also make Gnus prompt you interactively for the name of an
1012 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1013 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1014 in the @code{gnus-secondary-servers} list (if any).  You can also just
1015 type in the name of any server you feel like visiting.  (Note that this
1016 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1017 gnus} later in the same Emacs session, Gnus will contact the same
1018 server.)
1019
1020 @findex gnus-group-browse-foreign-server
1021 @kindex B (Group)
1022 However, if you use one @acronym{NNTP} server regularly and are just
1023 interested in a couple of groups from a different server, you would be
1024 better served by using the @kbd{B} command in the group buffer.  It will
1025 let you have a look at what groups are available, and you can subscribe
1026 to any of the groups you want to.  This also makes @file{.newsrc}
1027 maintenance much tidier.  @xref{Foreign Groups}.
1028
1029 @vindex gnus-secondary-select-methods
1030 @c @head
1031 A slightly different approach to foreign groups is to set the
1032 @code{gnus-secondary-select-methods} variable.  The select methods
1033 listed in this variable are in many ways just as native as the
1034 @code{gnus-select-method} server.  They will also be queried for active
1035 files during startup (if that's required), and new newsgroups that
1036 appear on these servers will be subscribed (or not) just as native
1037 groups are.
1038
1039 For instance, if you use the @code{nnmbox} back end to read your mail,
1040 you would typically set this variable to
1041
1042 @lisp
1043 (setq gnus-secondary-select-methods '((nnmbox "")))
1044 @end lisp
1045
1046
1047 @node The First Time
1048 @section The First Time
1049 @cindex first time usage
1050
1051 If no startup files exist, Gnus will try to determine what groups should
1052 be subscribed by default.
1053
1054 @vindex gnus-default-subscribed-newsgroups
1055 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1056 will subscribe you to just those groups in that list, leaving the rest
1057 killed.  Your system administrator should have set this variable to
1058 something useful.
1059
1060 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1061 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1062 here as @dfn{whatever Lars thinks you should read}.)
1063
1064 You'll also be subscribed to the Gnus documentation group, which should
1065 help you with most common problems.
1066
1067 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1068 use the normal functions for handling new groups, and not do anything
1069 special.
1070
1071
1072 @node The Server is Down
1073 @section The Server is Down
1074 @cindex server errors
1075
1076 If the default server is down, Gnus will understandably have some
1077 problems starting.  However, if you have some mail groups in addition to
1078 the news groups, you may want to start Gnus anyway.
1079
1080 Gnus, being the trusting sort of program, will ask whether to proceed
1081 without a native select method if that server can't be contacted.  This
1082 will happen whether the server doesn't actually exist (i.e., you have
1083 given the wrong address) or the server has just momentarily taken ill
1084 for some reason or other.  If you decide to continue and have no foreign
1085 groups, you'll find it difficult to actually do anything in the group
1086 buffer.  But, hey, that's your problem.  Blllrph!
1087
1088 @findex gnus-no-server
1089 @kindex M-x gnus-no-server
1090 @c @head
1091 If you know that the server is definitely down, or you just want to read
1092 your mail without bothering with the server at all, you can use the
1093 @code{gnus-no-server} command to start Gnus.  That might come in handy
1094 if you're in a hurry as well.  This command will not attempt to contact
1095 your primary server---instead, it will just activate all groups on level
1096 1 and 2.  (You should preferably keep no native groups on those two
1097 levels.) Also @pxref{Group Levels}.
1098
1099
1100 @node Slave Gnusae
1101 @section Slave Gnusae
1102 @cindex slave
1103
1104 You might want to run more than one Emacs with more than one Gnus at the
1105 same time.  If you are using different @file{.newsrc} files (e.g., if you
1106 are using the two different Gnusae to read from two different servers),
1107 that is no problem whatsoever.  You just do it.
1108
1109 The problem appears when you want to run two Gnusae that use the same
1110 @file{.newsrc} file.
1111
1112 To work around that problem some, we here at the Think-Tank at the Gnus
1113 Towers have come up with a new concept: @dfn{Masters} and
1114 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1115 taken out a copyright on those words.  If you wish to use those words in
1116 conjunction with each other, you have to send $1 per usage instance to
1117 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1118 Applications}) will be much more expensive, of course.)
1119
1120 @findex gnus-slave
1121 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1122 however you do it).  Each subsequent slave Gnusae should be started with
1123 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1124 files, but instead save @dfn{slave files} that contain information only
1125 on what groups have been read in the slave session.  When a master Gnus
1126 starts, it will read (and delete) these slave files, incorporating all
1127 information from them.  (The slave files will be read in the sequence
1128 they were created, so the latest changes will have precedence.)
1129
1130 Information from the slave files has, of course, precedence over the
1131 information in the normal (i.e., master) @file{.newsrc} file.
1132
1133 If the @file{.newsrc*} files have not been saved in the master when the
1134 slave starts, you may be prompted as to whether to read an auto-save
1135 file.  If you answer ``yes'', the unsaved changes to the master will be
1136 incorporated into the slave.  If you answer ``no'', the slave may see some
1137 messages as unread that have been read in the master.
1138
1139 @node Fetching a Group
1140 @section Fetching a Group
1141 @cindex fetching a group
1142
1143 @findex gnus-fetch-group
1144 It is sometimes convenient to be able to just say ``I want to read this
1145 group and I don't care whether Gnus has been started or not''.  This is
1146 perhaps more useful for people who write code than for users, but the
1147 command @code{gnus-fetch-group} provides this functionality in any case.
1148 It takes the group name as a parameter.
1149
1150
1151 @node New Groups
1152 @section New Groups
1153 @cindex new groups
1154 @cindex subscription
1155
1156 @vindex gnus-check-new-newsgroups
1157 If you are satisfied that you really never want to see any new groups,
1158 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1159 also save you some time at startup.  Even if this variable is
1160 @code{nil}, you can always subscribe to the new groups just by pressing
1161 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1162 is @code{ask-server} by default.  If you set this variable to
1163 @code{always}, then Gnus will query the back ends for new groups even
1164 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1165
1166 @menu
1167 * Checking New Groups::         Determining what groups are new.
1168 * Subscription Methods::        What Gnus should do with new groups.
1169 * Filtering New Groups::        Making Gnus ignore certain new groups.
1170 @end menu
1171
1172
1173 @node Checking New Groups
1174 @subsection Checking New Groups
1175
1176 Gnus normally determines whether a group is new or not by comparing the
1177 list of groups from the active file(s) with the lists of subscribed and
1178 dead groups.  This isn't a particularly fast method.  If
1179 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1180 server for new groups since the last time.  This is both faster and
1181 cheaper.  This also means that you can get rid of the list of killed
1182 groups altogether, so you may set @code{gnus-save-killed-list} to
1183 @code{nil}, which will save time both at startup, at exit, and all over.
1184 Saves disk space, too.  Why isn't this the default, then?
1185 Unfortunately, not all servers support this command.
1186
1187 I bet I know what you're thinking now: How do I find out whether my
1188 server supports @code{ask-server}?  No?  Good, because I don't have a
1189 fail-safe answer.  I would suggest just setting this variable to
1190 @code{ask-server} and see whether any new groups appear within the next
1191 few days.  If any do, then it works.  If none do, then it doesn't
1192 work.  I could write a function to make Gnus guess whether the server
1193 supports @code{ask-server}, but it would just be a guess.  So I won't.
1194 You could @code{telnet} to the server and say @code{HELP} and see
1195 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1196 it does, then it might work.  (But there are servers that lists
1197 @samp{NEWGROUPS} without supporting the function properly.)
1198
1199 This variable can also be a list of select methods.  If so, Gnus will
1200 issue an @code{ask-server} command to each of the select methods, and
1201 subscribe them (or not) using the normal methods.  This might be handy
1202 if you are monitoring a few servers for new groups.  A side effect is
1203 that startup will take much longer, so you can meditate while waiting.
1204 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1205
1206
1207 @node Subscription Methods
1208 @subsection Subscription Methods
1209
1210 @vindex gnus-subscribe-newsgroup-method
1211 What Gnus does when it encounters a new group is determined by the
1212 @code{gnus-subscribe-newsgroup-method} variable.
1213
1214 This variable should contain a function.  This function will be called
1215 with the name of the new group as the only parameter.
1216
1217 Some handy pre-fab functions are:
1218
1219 @table @code
1220
1221 @item gnus-subscribe-zombies
1222 @vindex gnus-subscribe-zombies
1223 Make all new groups zombies.  This is the default.  You can browse the
1224 zombies later (with @kbd{A z}) and either kill them all off properly
1225 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1226
1227 @item gnus-subscribe-randomly
1228 @vindex gnus-subscribe-randomly
1229 Subscribe all new groups in arbitrary order.  This really means that all
1230 new groups will be added at ``the top'' of the group buffer.
1231
1232 @item gnus-subscribe-alphabetically
1233 @vindex gnus-subscribe-alphabetically
1234 Subscribe all new groups in alphabetical order.
1235
1236 @item gnus-subscribe-hierarchically
1237 @vindex gnus-subscribe-hierarchically
1238 Subscribe all new groups hierarchically.  The difference between this
1239 function and @code{gnus-subscribe-alphabetically} is slight.
1240 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1241 alphabetical fashion, while this function will enter groups into its
1242 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1243 @samp{comp} hierarchy, this function will not mess that configuration
1244 up.  Or something like that.
1245
1246 @item gnus-subscribe-interactively
1247 @vindex gnus-subscribe-interactively
1248 Subscribe new groups interactively.  This means that Gnus will ask
1249 you about @strong{all} new groups.  The groups you choose to subscribe
1250 to will be subscribed hierarchically.
1251
1252 @item gnus-subscribe-killed
1253 @vindex gnus-subscribe-killed
1254 Kill all new groups.
1255
1256 @item gnus-subscribe-topics
1257 @vindex gnus-subscribe-topics
1258 Put the groups into the topic that has a matching @code{subscribe} topic
1259 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1260 topic parameter that looks like
1261
1262 @example
1263 "nnslashdot"
1264 @end example
1265
1266 will mean that all groups that match that regex will be subscribed under
1267 that topic.
1268
1269 If no topics match the groups, the groups will be subscribed in the
1270 top-level topic.
1271
1272 @end table
1273
1274 @vindex gnus-subscribe-hierarchical-interactive
1275 A closely related variable is
1276 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1277 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1278 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1279 will ask you for each sub-hierarchy whether you want to descend the
1280 hierarchy or not.
1281
1282 One common mistake is to set the variable a few paragraphs above
1283 (@code{gnus-subscribe-newsgroup-method}) to
1284 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1285 will not work.  This is ga-ga.  So don't do it.
1286
1287
1288 @node Filtering New Groups
1289 @subsection Filtering New Groups
1290
1291 A nice and portable way to control which new newsgroups should be
1292 subscribed (or ignored) is to put an @dfn{options} line at the start of
1293 the @file{.newsrc} file.  Here's an example:
1294
1295 @example
1296 options -n !alt.all !rec.all sci.all
1297 @end example
1298
1299 @vindex gnus-subscribe-options-newsgroup-method
1300 This line obviously belongs to a serious-minded intellectual scientific
1301 person (or she may just be plain old boring), because it says that all
1302 groups that have names beginning with @samp{alt} and @samp{rec} should
1303 be ignored, and all groups with names beginning with @samp{sci} should
1304 be subscribed.  Gnus will not use the normal subscription method for
1305 subscribing these groups.
1306 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1307 variable defaults to @code{gnus-subscribe-alphabetically}.
1308
1309 @vindex gnus-options-not-subscribe
1310 @vindex gnus-options-subscribe
1311 If you don't want to mess with your @file{.newsrc} file, you can just
1312 set the two variables @code{gnus-options-subscribe} and
1313 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1314 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1315 and if the new group matches the former, it will be unconditionally
1316 subscribed, and if it matches the latter, it will be ignored.
1317
1318 @vindex gnus-auto-subscribed-groups
1319 Yet another variable that meddles here is
1320 @code{gnus-auto-subscribed-groups}.  It works exactly like
1321 @code{gnus-options-subscribe}, and is therefore really superfluous,
1322 but I thought it would be nice to have two of these.  This variable is
1323 more meant for setting some ground rules, while the other variable is
1324 used more for user fiddling.  By default this variable makes all new
1325 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1326 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1327 subscribed.  If you don't like that, just set this variable to
1328 @code{nil}.
1329
1330 New groups that match this regexp are subscribed using
1331 @code{gnus-subscribe-options-newsgroup-method}.
1332
1333
1334 @node Changing Servers
1335 @section Changing Servers
1336 @cindex changing servers
1337
1338 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1339 This happens very rarely, but perhaps you change jobs, or one server is
1340 very flaky and you want to use another.
1341
1342 Changing the server is pretty easy, right?  You just change
1343 @code{gnus-select-method} to point to the new server?
1344
1345 @emph{Wrong!}
1346
1347 Article numbers are not (in any way) kept synchronized between different
1348 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1349 you have read is by keeping track of article numbers.  So when you
1350 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1351 worthless.
1352
1353 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1354 file from one server to another.  They all have one thing in
1355 common---they take a looong time to run.  You don't want to use these
1356 functions more than absolutely necessary.
1357
1358 @kindex M-x gnus-change-server
1359 @findex gnus-change-server
1360 If you have access to both servers, Gnus can request the headers for all
1361 the articles you have read and compare @code{Message-ID}s and map the
1362 article numbers of the read articles and article marks.  The @kbd{M-x
1363 gnus-change-server} command will do this for all your native groups.  It
1364 will prompt for the method you want to move to.
1365
1366 @kindex M-x gnus-group-move-group-to-server
1367 @findex gnus-group-move-group-to-server
1368 You can also move individual groups with the @kbd{M-x
1369 gnus-group-move-group-to-server} command.  This is useful if you want to
1370 move a (foreign) group from one server to another.
1371
1372 @kindex M-x gnus-group-clear-data-on-native-groups
1373 @findex gnus-group-clear-data-on-native-groups
1374 If you don't have access to both the old and new server, all your marks
1375 and read ranges have become worthless.  You can use the @kbd{M-x
1376 gnus-group-clear-data-on-native-groups} command to clear out all data
1377 that you have on your native groups.  Use with caution.
1378
1379 @kindex M-x gnus-group-clear-data
1380 @findex gnus-group-clear-data
1381 Clear the data from the current group only---nix out marks and the
1382 list of read articles (@code{gnus-group-clear-data}).
1383
1384 After changing servers, you @strong{must} move the cache hierarchy away,
1385 since the cached articles will have wrong article numbers, which will
1386 affect which articles Gnus thinks are read.
1387 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1388 to have it done automatically; for @code{gnus-group-clear-data}, you
1389 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1390 cache for all groups).
1391
1392
1393 @node Startup Files
1394 @section Startup Files
1395 @cindex startup files
1396 @cindex .newsrc
1397 @cindex .newsrc.el
1398 @cindex .newsrc.eld
1399
1400 Now, you all know about the @file{.newsrc} file.  All subscription
1401 information is traditionally stored in this file.
1402
1403 Things got a bit more complicated with @sc{gnus}.  In addition to
1404 keeping the @file{.newsrc} file updated, it also used a file called
1405 @file{.newsrc.el} for storing all the information that didn't fit into
1406 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1407 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1408 files was the most recently saved, which enabled people to swap between
1409 @sc{gnus} and other newsreaders.
1410
1411 That was kinda silly, so Gnus went one better: In addition to the
1412 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1413 @file{.newsrc.eld}.  It will read whichever of these files that are most
1414 recent, but it will never write a @file{.newsrc.el} file.  You should
1415 never delete the @file{.newsrc.eld} file---it contains much information
1416 not stored in the @file{.newsrc} file.
1417
1418 @vindex gnus-save-newsrc-file
1419 @vindex gnus-read-newsrc-file
1420 You can turn off writing the @file{.newsrc} file by setting
1421 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1422 the file and save some space, as well as exiting from Gnus faster.
1423 However, this will make it impossible to use other newsreaders than
1424 Gnus.  But hey, who would want to, right?  Similarly, setting
1425 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1426 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1427 convenient if you have a tendency to use Netscape once in a while.
1428
1429 @vindex gnus-save-killed-list
1430 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1431 will not save the list of killed groups to the startup file.  This will
1432 save both time (when starting and quitting) and space (on disk).  It
1433 will also mean that Gnus has no record of what groups are new or old,
1434 so the automatic new groups subscription methods become meaningless.
1435 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1436 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1437 Groups}).  This variable can also be a regular expression.  If that's
1438 the case, remove all groups that do not match this regexp before
1439 saving.  This can be useful in certain obscure situations that involve
1440 several servers where not all servers support @code{ask-server}.
1441
1442 @vindex gnus-startup-file
1443 @vindex gnus-backup-startup-file
1444 @vindex version-control
1445 The @code{gnus-startup-file} variable says where the startup files are.
1446 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1447 file being whatever that one is, with a @samp{.eld} appended.
1448 If you want version control for this file, set
1449 @code{gnus-backup-startup-file}.  It respects the same values as the
1450 @code{version-control} variable.
1451
1452 @vindex gnus-save-newsrc-hook
1453 @vindex gnus-save-quick-newsrc-hook
1454 @vindex gnus-save-standard-newsrc-hook
1455 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1456 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1457 saving the @file{.newsrc.eld} file, and
1458 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1459 @file{.newsrc} file.  The latter two are commonly used to turn version
1460 control on or off.  Version control is on by default when saving the
1461 startup files.  If you want to turn backup creation off, say something like:
1462
1463 @lisp
1464 (defun turn-off-backup ()
1465   (set (make-local-variable 'backup-inhibited) t))
1466
1467 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1468 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1469 @end lisp
1470
1471 @vindex gnus-init-file
1472 @vindex gnus-site-init-file
1473 When Gnus starts, it will read the @code{gnus-site-init-file}
1474 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1475 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1476 and can be used to avoid cluttering your @file{~/.emacs} and
1477 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1478 with the same names as these, but with @file{.elc} and @file{.el}
1479 suffixes.  In other words, if you have set @code{gnus-init-file} to
1480 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1481 and finally @file{~/.gnus} (in this order).
1482
1483
1484
1485 @node Auto Save
1486 @section Auto Save
1487 @cindex dribble file
1488 @cindex auto-save
1489
1490 Whenever you do something that changes the Gnus data (reading articles,
1491 catching up, killing/subscribing groups), the change is added to a
1492 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1493 Emacs way.  If your Emacs should crash before you have saved the
1494 @file{.newsrc} files, all changes you have made can be recovered from
1495 this file.
1496
1497 If Gnus detects this file at startup, it will ask the user whether to
1498 read it.  The auto save file is deleted whenever the real startup file is
1499 saved.
1500
1501 @vindex gnus-use-dribble-file
1502 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1503 maintain a dribble buffer.  The default is @code{t}.
1504
1505 @vindex gnus-dribble-directory
1506 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1507 this variable is @code{nil}, which it is by default, Gnus will dribble
1508 into the directory where the @file{.newsrc} file is located.  (This is
1509 normally the user's home directory.)  The dribble file will get the same
1510 file permissions as the @file{.newsrc} file.
1511
1512 @vindex gnus-always-read-dribble-file
1513 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1514 read the dribble file on startup without querying the user.
1515
1516
1517 @node The Active File
1518 @section The Active File
1519 @cindex active file
1520 @cindex ignored groups
1521
1522 When Gnus starts, or indeed whenever it tries to determine whether new
1523 articles have arrived, it reads the active file.  This is a very large
1524 file that lists all the active groups and articles on the server.
1525
1526 @vindex gnus-ignored-newsgroups
1527 Before examining the active file, Gnus deletes all lines that match the
1528 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1529 any groups with bogus names, but you can use this variable to make Gnus
1530 ignore hierarchies you aren't ever interested in.  However, this is not
1531 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1532 Groups} for an overview of other variables that can be used instead.
1533
1534 @c This variable is
1535 @c @code{nil} by default, and will slow down active file handling somewhat
1536 @c if you set it to anything else.
1537
1538 @vindex gnus-read-active-file
1539 @c @head
1540 The active file can be rather Huge, so if you have a slow network, you
1541 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1542 reading the active file.  This variable is @code{some} by default.
1543
1544 Gnus will try to make do by getting information just on the groups that
1545 you actually subscribe to.
1546
1547 Note that if you subscribe to lots and lots of groups, setting this
1548 variable to @code{nil} will probably make Gnus slower, not faster.  At
1549 present, having this variable @code{nil} will slow Gnus down
1550 considerably, unless you read news over a 2400 baud modem.
1551
1552 This variable can also have the value @code{some}.  Gnus will then
1553 attempt to read active info only on the subscribed groups.  On some
1554 servers this is quite fast (on sparkling, brand new INN servers that
1555 support the @code{LIST ACTIVE group} command), on others this isn't fast
1556 at all.  In any case, @code{some} should be faster than @code{nil}, and
1557 is certainly faster than @code{t} over slow lines.
1558
1559 Some news servers (old versions of Leafnode and old versions of INN, for
1560 instance) do not support the @code{LIST ACTIVE group}.  For these
1561 servers, @code{nil} is probably the most efficient value for this
1562 variable.
1563
1564 If this variable is @code{nil}, Gnus will ask for group info in total
1565 lock-step, which isn't very fast.  If it is @code{some} and you use an
1566 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1567 read all the replies in one swoop.  This will normally result in better
1568 performance, but if the server does not support the aforementioned
1569 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1570
1571 If you think that starting up Gnus takes too long, try all the three
1572 different values for this variable and see what works best for you.
1573
1574 In any case, if you use @code{some} or @code{nil}, you should definitely
1575 kill all groups that you aren't interested in to speed things up.
1576
1577 Note that this variable also affects active file retrieval from
1578 secondary select methods.
1579
1580
1581 @node Startup Variables
1582 @section Startup Variables
1583
1584 @table @code
1585
1586 @item gnus-load-hook
1587 @vindex gnus-load-hook
1588 A hook run while Gnus is being loaded.  Note that this hook will
1589 normally be run just once in each Emacs session, no matter how many
1590 times you start Gnus.
1591
1592 @item gnus-before-startup-hook
1593 @vindex gnus-before-startup-hook
1594 A hook run after starting up Gnus successfully.
1595
1596 @item gnus-startup-hook
1597 @vindex gnus-startup-hook
1598 A hook run as the very last thing after starting up Gnus
1599
1600 @item gnus-started-hook
1601 @vindex gnus-started-hook
1602 A hook that is run as the very last thing after starting up Gnus
1603 successfully.
1604
1605 @item gnus-setup-news-hook
1606 @vindex gnus-setup-news-hook
1607 A hook that is run after reading the @file{.newsrc} file(s), but before
1608 generating the group buffer.
1609
1610 @item gnus-check-bogus-newsgroups
1611 @vindex gnus-check-bogus-newsgroups
1612 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1613 startup.  A @dfn{bogus group} is a group that you have in your
1614 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1615 bogus groups can take quite a while, so to save time and resources it's
1616 best to leave this option off, and do the checking for bogus groups once
1617 in a while from the group buffer instead (@pxref{Group Maintenance}).
1618
1619 @item gnus-inhibit-startup-message
1620 @vindex gnus-inhibit-startup-message
1621 If non-@code{nil}, the startup message won't be displayed.  That way,
1622 your boss might not notice as easily that you are reading news instead
1623 of doing your job.  Note that this variable is used before
1624 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1625
1626 @item gnus-no-groups-message
1627 @vindex gnus-no-groups-message
1628 Message displayed by Gnus when no groups are available.
1629
1630 @item gnus-play-startup-jingle
1631 @vindex gnus-play-startup-jingle
1632 If non-@code{nil}, play the Gnus jingle at startup.
1633
1634 @item gnus-startup-jingle
1635 @vindex gnus-startup-jingle
1636 Jingle to be played if the above variable is non-@code{nil}.  The
1637 default is @samp{Tuxedomoon.Jingle4.au}.
1638
1639 @end table
1640
1641
1642 @node Group Buffer
1643 @chapter Group Buffer
1644 @cindex group buffer
1645
1646 @c Alex Schroeder suggests to rearrange this as follows:
1647 @c
1648 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1649 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1650 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1651 @c   7. Group Score, 8. Group Buffer Format
1652 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1653 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1654 @c <kensanata> First, "Gnus considers groups... (default 9)."
1655 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1656 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1657 @c <kensanata> Then expand the next paragraph or add some more to it.
1658 @c    This short one sentence explains levels 1 and 2, therefore I understand
1659 @c    that I should keep important news at 3 and boring news at 4.
1660 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1661 @c    Maybe keep those that you don't want to read temporarily at 6,
1662 @c    those that you never want to read at 8, those that offend your
1663 @c    human rights at 9...
1664
1665
1666 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1667 is the first buffer shown when Gnus starts, and will never be killed as
1668 long as Gnus is active.
1669
1670 @iftex
1671 @iflatex
1672 \gnusfigure{The Group Buffer}{320}{
1673 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1674 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1675 \put(120,38){\vector(1,2){10}}
1676 \put(40,60){\makebox(0,0)[r]{Mode line}}
1677 \put(40,58){\vector(1,0){30}}
1678 \put(200,28){\makebox(0,0)[t]{Native select method}}
1679 \put(200,26){\vector(-1,2){15}}
1680 }
1681 @end iflatex
1682 @end iftex
1683
1684 @menu
1685 * Group Buffer Format::         Information listed and how you can change it.
1686 * Group Maneuvering::           Commands for moving in the group buffer.
1687 * Selecting a Group::           Actually reading news.
1688 * Subscription Commands::       Unsubscribing, killing, subscribing.
1689 * Group Data::                  Changing the info for a group.
1690 * Group Levels::                Levels? What are those, then?
1691 * Group Score::                 A mechanism for finding out what groups you like.
1692 * Marking Groups::              You can mark groups for later processing.
1693 * Foreign Groups::              Creating and editing groups.
1694 * Group Parameters::            Each group may have different parameters set.
1695 * Listing Groups::              Gnus can list various subsets of the groups.
1696 * Sorting Groups::              Re-arrange the group order.
1697 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1698 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1699 * Exiting Gnus::                Stop reading news and get some work done.
1700 * Group Topics::                A folding group mode divided into topics.
1701 * Misc Group Stuff::            Other stuff that you can to do.
1702 @end menu
1703
1704
1705 @node Group Buffer Format
1706 @section Group Buffer Format
1707
1708 @menu
1709 * Group Line Specification::    Deciding how the group buffer is to look.
1710 * Group Mode Line Specification::  The group buffer mode line.
1711 * Group Highlighting::          Having nice colors in the group buffer.
1712 @end menu
1713
1714
1715 @node Group Line Specification
1716 @subsection Group Line Specification
1717 @cindex group buffer format
1718
1719 The default format of the group buffer is nice and dull, but you can
1720 make it as exciting and ugly as you feel like.
1721
1722 Here's a couple of example group lines:
1723
1724 @example
1725      25: news.announce.newusers
1726  *    0: alt.fan.andrea-dworkin
1727 @end example
1728
1729 Quite simple, huh?
1730
1731 You can see that there are 25 unread articles in
1732 @samp{news.announce.newusers}.  There are no unread articles, but some
1733 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1734 asterisk at the beginning of the line?).
1735
1736 @vindex gnus-group-line-format
1737 You can change that format to whatever you want by fiddling with the
1738 @code{gnus-group-line-format} variable.  This variable works along the
1739 lines of a @code{format} specification, which is pretty much the same as
1740 a @code{printf} specifications, for those of you who use (feh!) C.
1741 @xref{Formatting Variables}.
1742
1743 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1744
1745 There should always be a colon on the line; the cursor always moves to
1746 the colon after performing an operation.  @xref{Positioning
1747 Point}.  Nothing else is required---not even the group name.  All
1748 displayed text is just window dressing, and is never examined by Gnus.
1749 Gnus stores all real information it needs using text properties.
1750
1751 (Note that if you make a really strange, wonderful, spreadsheet-like
1752 layout, everybody will believe you are hard at work with the accounting
1753 instead of wasting time reading news.)
1754
1755 Here's a list of all available format characters:
1756
1757 @table @samp
1758
1759 @item M
1760 An asterisk if the group only has marked articles.
1761
1762 @item S
1763 Whether the group is subscribed.
1764
1765 @item L
1766 Level of subscribedness.
1767
1768 @item N
1769 Number of unread articles.
1770
1771 @item I
1772 Number of dormant articles.
1773
1774 @item T
1775 Number of ticked articles.
1776
1777 @item R
1778 Number of read articles.
1779
1780 @item U
1781 Number of unseen articles.
1782
1783 @item t
1784 Estimated total number of articles.  (This is really @var{max-number}
1785 minus @var{min-number} plus 1.)
1786
1787 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1788 efficient access to @var{max-number} and @var{min-number} but getting
1789 the true unread message count is not possible efficiently.  For
1790 hysterical raisins, even the mail back ends, where the true number of
1791 unread messages might be available efficiently, use the same limited
1792 interface.  To remove this restriction from Gnus means that the back
1793 end interface has to be changed, which is not an easy job.  If you
1794 want to work on this, please contact the Gnus mailing list.
1795
1796 @item y
1797 Number of unread, unticked, non-dormant articles.
1798
1799 @item i
1800 Number of ticked and dormant articles.
1801
1802 @item g
1803 Full group name.
1804
1805 @item G
1806 Group name.
1807
1808 @item C
1809 Group comment (@pxref{Group Parameters}) or group name if there is no
1810 comment element in the group parameters.
1811
1812 @item D
1813 Newsgroup description.  You need to read the group descriptions
1814 before these will appear, and to do that, you either have to set
1815 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1816 command.
1817
1818 @item o
1819 @samp{m} if moderated.
1820
1821 @item O
1822 @samp{(m)} if moderated.
1823
1824 @item s
1825 Select method.
1826
1827 @item B
1828 If the summary buffer for the group is open or not.
1829
1830 @item n
1831 Select from where.
1832
1833 @item z
1834 A string that looks like @samp{<%s:%n>} if a foreign select method is
1835 used.
1836
1837 @item P
1838 Indentation based on the level of the topic (@pxref{Group Topics}).
1839
1840 @item c
1841 @vindex gnus-group-uncollapsed-levels
1842 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1843 variable says how many levels to leave at the end of the group name.
1844 The default is 1---this will mean that group names like
1845 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1846
1847 @item m
1848 @vindex gnus-new-mail-mark
1849 @cindex %
1850 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1851 the group lately.
1852
1853 @item p
1854 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1855
1856 @item d
1857 A string that says when you last read the group (@pxref{Group
1858 Timestamp}).
1859
1860 @item F
1861 The disk space used by the articles fetched by both the cache and
1862 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1863 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1864 of %7F is sufficient for a fixed-width column.
1865
1866 @item u
1867 User defined specifier.  The next character in the format string should
1868 be a letter.  Gnus will call the function
1869 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1870 following @samp{%u}.  The function will be passed a single dummy
1871 parameter as argument.  The function should return a string, which will
1872 be inserted into the buffer just like information from any other
1873 specifier.
1874 @end table
1875
1876 @cindex *
1877 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1878 if no info is available---for instance, if it is a non-activated foreign
1879 group, or a bogus native group.
1880
1881
1882 @node Group Mode Line Specification
1883 @subsection Group Mode Line Specification
1884 @cindex group mode line
1885
1886 @vindex gnus-group-mode-line-format
1887 The mode line can be changed by setting
1888 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1889 doesn't understand that many format specifiers:
1890
1891 @table @samp
1892 @item S
1893 The native news server.
1894 @item M
1895 The native select method.
1896 @end table
1897
1898
1899 @node Group Highlighting
1900 @subsection Group Highlighting
1901 @cindex highlighting
1902 @cindex group highlighting
1903
1904 @vindex gnus-group-highlight
1905 Highlighting in the group buffer is controlled by the
1906 @code{gnus-group-highlight} variable.  This is an alist with elements
1907 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1908 something non-@code{nil}, the @var{face} will be used on the line.
1909
1910 Here's an example value for this variable that might look nice if the
1911 background is dark:
1912
1913 @lisp
1914 (cond (window-system
1915        (setq custom-background-mode 'light)
1916        (defface my-group-face-1
1917          '((t (:foreground "Red" :bold t))) "First group face")
1918        (defface my-group-face-2
1919          '((t (:foreground "DarkSeaGreen4" :bold t)))
1920          "Second group face")
1921        (defface my-group-face-3
1922          '((t (:foreground "Green4" :bold t))) "Third group face")
1923        (defface my-group-face-4
1924          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1925        (defface my-group-face-5
1926          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1927
1928 (setq gnus-group-highlight
1929       '(((> unread 200) . my-group-face-1)
1930         ((and (< level 3) (zerop unread)) . my-group-face-2)
1931         ((< level 3) . my-group-face-3)
1932         ((zerop unread) . my-group-face-4)
1933         (t . my-group-face-5)))
1934 @end lisp
1935
1936 Also @pxref{Faces and Fonts}.
1937
1938 Variables that are dynamically bound when the forms are evaluated
1939 include:
1940
1941 @table @code
1942 @item group
1943 The group name.
1944 @item unread
1945 The number of unread articles in the group.
1946 @item method
1947 The select method.
1948 @item mailp
1949 Whether the group is a mail group.
1950 @item level
1951 The level of the group.
1952 @item score
1953 The score of the group.
1954 @item ticked
1955 The number of ticked articles in the group.
1956 @item total
1957 The total number of articles in the group.  Or rather,
1958 @var{max-number} minus @var{min-number} plus one.
1959 @item topic
1960 When using the topic minor mode, this variable is bound to the current
1961 topic being inserted.
1962 @end table
1963
1964 When the forms are @code{eval}ed, point is at the beginning of the line
1965 of the group in question, so you can use many of the normal Gnus
1966 functions for snarfing info on the group.
1967
1968 @vindex gnus-group-update-hook
1969 @findex gnus-group-highlight-line
1970 @code{gnus-group-update-hook} is called when a group line is changed.
1971 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1972 calls @code{gnus-group-highlight-line} by default.
1973
1974
1975 @node Group Maneuvering
1976 @section Group Maneuvering
1977 @cindex group movement
1978
1979 All movement commands understand the numeric prefix and will behave as
1980 expected, hopefully.
1981
1982 @table @kbd
1983
1984 @item n
1985 @kindex n (Group)
1986 @findex gnus-group-next-unread-group
1987 Go to the next group that has unread articles
1988 (@code{gnus-group-next-unread-group}).
1989
1990 @item p
1991 @itemx DEL
1992 @kindex DEL (Group)
1993 @kindex p (Group)
1994 @findex gnus-group-prev-unread-group
1995 Go to the previous group that has unread articles
1996 (@code{gnus-group-prev-unread-group}).
1997
1998 @item N
1999 @kindex N (Group)
2000 @findex gnus-group-next-group
2001 Go to the next group (@code{gnus-group-next-group}).
2002
2003 @item P
2004 @kindex P (Group)
2005 @findex gnus-group-prev-group
2006 Go to the previous group (@code{gnus-group-prev-group}).
2007
2008 @item M-n
2009 @kindex M-n (Group)
2010 @findex gnus-group-next-unread-group-same-level
2011 Go to the next unread group on the same (or lower) level
2012 (@code{gnus-group-next-unread-group-same-level}).
2013
2014 @item M-p
2015 @kindex M-p (Group)
2016 @findex gnus-group-prev-unread-group-same-level
2017 Go to the previous unread group on the same (or lower) level
2018 (@code{gnus-group-prev-unread-group-same-level}).
2019 @end table
2020
2021 Three commands for jumping to groups:
2022
2023 @table @kbd
2024
2025 @item j
2026 @kindex j (Group)
2027 @findex gnus-group-jump-to-group
2028 Jump to a group (and make it visible if it isn't already)
2029 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2030 like living groups.
2031
2032 @item ,
2033 @kindex , (Group)
2034 @findex gnus-group-best-unread-group
2035 Jump to the unread group with the lowest level
2036 (@code{gnus-group-best-unread-group}).
2037
2038 @item .
2039 @kindex . (Group)
2040 @findex gnus-group-first-unread-group
2041 Jump to the first group with unread articles
2042 (@code{gnus-group-first-unread-group}).
2043 @end table
2044
2045 @vindex gnus-group-goto-unread
2046 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2047 commands will move to the next group, not the next unread group.  Even
2048 the commands that say they move to the next unread group.  The default
2049 is @code{t}.
2050
2051
2052 @node Selecting a Group
2053 @section Selecting a Group
2054 @cindex group selection
2055
2056 @table @kbd
2057
2058 @item SPACE
2059 @kindex SPACE (Group)
2060 @findex gnus-group-read-group
2061 Select the current group, switch to the summary buffer and display the
2062 first unread article (@code{gnus-group-read-group}).  If there are no
2063 unread articles in the group, or if you give a non-numerical prefix to
2064 this command, Gnus will offer to fetch all the old articles in this
2065 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2066 determines the number of articles Gnus will fetch.  If @var{n} is
2067 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2068 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2069
2070 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2071 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2072 - 4 2 SPC} fetches the 42 oldest ones.
2073
2074 When you are in the group (in the Summary buffer), you can type
2075 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2076 ones.
2077
2078 @item RET
2079 @kindex RET (Group)
2080 @findex gnus-group-select-group
2081 Select the current group and switch to the summary buffer
2082 (@code{gnus-group-select-group}).  Takes the same arguments as
2083 @code{gnus-group-read-group}---the only difference is that this command
2084 does not display the first unread article automatically upon group
2085 entry.
2086
2087 @item M-RET
2088 @kindex M-RET (Group)
2089 @findex gnus-group-quick-select-group
2090 This does the same as the command above, but tries to do it with the
2091 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2092 scoring/killing will be performed, there will be no highlights and no
2093 expunging.  This might be useful if you're in a real hurry and have to
2094 enter some humongous group.  If you give a 0 prefix to this command
2095 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2096 which is useful if you want to toggle threading before generating the
2097 summary buffer (@pxref{Summary Generation Commands}).
2098
2099 @item M-SPACE
2100 @kindex M-SPACE (Group)
2101 @findex gnus-group-visible-select-group
2102 This is yet one more command that does the same as the @kbd{RET}
2103 command, but this one does it without expunging and hiding dormants
2104 (@code{gnus-group-visible-select-group}).
2105
2106 @item C-M-RET
2107 @kindex C-M-RET (Group)
2108 @findex gnus-group-select-group-ephemerally
2109 Finally, this command selects the current group ephemerally without
2110 doing any processing of its contents
2111 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2112 turned off.  Everything you do in the group after selecting it in this
2113 manner will have no permanent effects.
2114
2115 @end table
2116
2117 @vindex gnus-large-newsgroup
2118 The @code{gnus-large-newsgroup} variable says what Gnus should
2119 consider to be a big group.  If it is @code{nil}, no groups are
2120 considered big.  The default value is 200.  If the group has more
2121 (unread and/or ticked) articles than this, Gnus will query the user
2122 before entering the group.  The user can then specify how many
2123 articles should be fetched from the server.  If the user specifies a
2124 negative number (@var{-n}), the @var{n} oldest articles will be
2125 fetched.  If it is positive, the @var{n} articles that have arrived
2126 most recently will be fetched.
2127
2128 @vindex gnus-large-ephemeral-newsgroup
2129 @code{gnus-large-ephemeral-newsgroup} is the same as
2130 @code{gnus-large-newsgroup}, but is only used for ephemeral
2131 newsgroups.
2132
2133 @vindex gnus-select-group-hook
2134 @vindex gnus-auto-select-first
2135 @vindex gnus-auto-select-subject
2136 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2137 automatically when entering a group with the @kbd{SPACE} command.
2138 Which article this is is controlled by the
2139 @code{gnus-auto-select-subject} variable.  Valid values for this
2140 variable is:
2141
2142 @table @code
2143
2144 @item unread
2145 Place point on the subject line of the first unread article.
2146
2147 @item first
2148 Place point on the subject line of the first article.
2149
2150 @item unseen
2151 Place point on the subject line of the first unseen article.
2152
2153 @item unseen-or-unread
2154 Place point on the subject line of the first unseen article, and if
2155 there is no such article, place point on the subject line of the first
2156 unread article.
2157
2158 @item best
2159 Place point on the subject line of the highest-scored unread article.
2160
2161 @end table
2162
2163 This variable can also be a function.  In that case, that function
2164 will be called to place point on a subject line.
2165
2166 If you want to prevent automatic selection in some group (say, in a
2167 binary group with Huge articles) you can set the
2168 @code{gnus-auto-select-first} variable to @code{nil} in
2169 @code{gnus-select-group-hook}, which is called when a group is
2170 selected.
2171
2172
2173 @node Subscription Commands
2174 @section Subscription Commands
2175 @cindex subscription
2176
2177 @table @kbd
2178
2179 @item S t
2180 @itemx u
2181 @kindex S t (Group)
2182 @kindex u (Group)
2183 @findex gnus-group-unsubscribe-current-group
2184 @c @icon{gnus-group-unsubscribe}
2185 Toggle subscription to the current group
2186 (@code{gnus-group-unsubscribe-current-group}).
2187
2188 @item S s
2189 @itemx U
2190 @kindex S s (Group)
2191 @kindex U (Group)
2192 @findex gnus-group-unsubscribe-group
2193 Prompt for a group to subscribe, and then subscribe it.  If it was
2194 subscribed already, unsubscribe it instead
2195 (@code{gnus-group-unsubscribe-group}).
2196
2197 @item S k
2198 @itemx C-k
2199 @kindex S k (Group)
2200 @kindex C-k (Group)
2201 @findex gnus-group-kill-group
2202 @c @icon{gnus-group-kill-group}
2203 Kill the current group (@code{gnus-group-kill-group}).
2204
2205 @item S y
2206 @itemx C-y
2207 @kindex S y (Group)
2208 @kindex C-y (Group)
2209 @findex gnus-group-yank-group
2210 Yank the last killed group (@code{gnus-group-yank-group}).
2211
2212 @item C-x C-t
2213 @kindex C-x C-t (Group)
2214 @findex gnus-group-transpose-groups
2215 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2216 really a subscription command, but you can use it instead of a
2217 kill-and-yank sequence sometimes.
2218
2219 @item S w
2220 @itemx C-w
2221 @kindex S w (Group)
2222 @kindex C-w (Group)
2223 @findex gnus-group-kill-region
2224 Kill all groups in the region (@code{gnus-group-kill-region}).
2225
2226 @item S z
2227 @kindex S z (Group)
2228 @findex gnus-group-kill-all-zombies
2229 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2230
2231 @item S C-k
2232 @kindex S C-k (Group)
2233 @findex gnus-group-kill-level
2234 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2235 These groups can't be yanked back after killing, so this command should
2236 be used with some caution.  The only time where this command comes in
2237 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2238 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2239 kill off all unsubscribed groups that do not have message numbers in the
2240 @file{.newsrc} file.
2241
2242 @end table
2243
2244 Also @pxref{Group Levels}.
2245
2246
2247 @node Group Data
2248 @section Group Data
2249
2250 @table @kbd
2251
2252 @item c
2253 @kindex c (Group)
2254 @findex gnus-group-catchup-current
2255 @vindex gnus-group-catchup-group-hook
2256 @c @icon{gnus-group-catchup-current}
2257 Mark all unticked articles in this group as read
2258 (@code{gnus-group-catchup-current}).
2259 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2260 the group buffer.
2261
2262 @item C
2263 @kindex C (Group)
2264 @findex gnus-group-catchup-current-all
2265 Mark all articles in this group, even the ticked ones, as read
2266 (@code{gnus-group-catchup-current-all}).
2267
2268 @item M-c
2269 @kindex M-c (Group)
2270 @findex gnus-group-clear-data
2271 Clear the data from the current group---nix out marks and the list of
2272 read articles (@code{gnus-group-clear-data}).
2273
2274 @item M-x gnus-group-clear-data-on-native-groups
2275 @kindex M-x gnus-group-clear-data-on-native-groups
2276 @findex gnus-group-clear-data-on-native-groups
2277 If you have switched from one @acronym{NNTP} server to another, all your marks
2278 and read ranges have become worthless.  You can use this command to
2279 clear out all data that you have on your native groups.  Use with
2280 caution.
2281
2282 @end table
2283
2284
2285 @node Group Levels
2286 @section Group Levels
2287 @cindex group level
2288 @cindex level
2289
2290 All groups have a level of @dfn{subscribedness}.  For instance, if a
2291 group is on level 2, it is more subscribed than a group on level 5.  You
2292 can ask Gnus to just list groups on a given level or lower
2293 (@pxref{Listing Groups}), or to just check for new articles in groups on
2294 a given level or lower (@pxref{Scanning New Messages}).
2295
2296 Remember:  The higher the level of the group, the less important it is.
2297
2298 @table @kbd
2299
2300 @item S l
2301 @kindex S l (Group)
2302 @findex gnus-group-set-current-level
2303 Set the level of the current group.  If a numeric prefix is given, the
2304 next @var{n} groups will have their levels set.  The user will be
2305 prompted for a level.
2306 @end table
2307
2308 @vindex gnus-level-killed
2309 @vindex gnus-level-zombie
2310 @vindex gnus-level-unsubscribed
2311 @vindex gnus-level-subscribed
2312 Gnus considers groups from levels 1 to
2313 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2314 @code{gnus-level-subscribed} (exclusive) and
2315 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2316 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2317 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2318 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2319 same, but zombie and killed groups have no information on what articles
2320 you have read, etc, stored.  This distinction between dead and living
2321 groups isn't done because it is nice or clever, it is done purely for
2322 reasons of efficiency.
2323
2324 It is recommended that you keep all your mail groups (if any) on quite
2325 low levels (e.g. 1 or 2).
2326
2327 Maybe the following description of the default behavior of Gnus helps to
2328 understand what these levels are all about.  By default, Gnus shows you
2329 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2330 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2331 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2332 groups are hidden, in a way.
2333
2334 Zombie and killed groups are similar to unsubscribed groups in that they
2335 are hidden by default.  But they are different from subscribed and
2336 unsubscribed groups in that Gnus doesn't ask the news server for
2337 information (number of messages, number of unread messages) on zombie
2338 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2339 aren't interested in.  If most groups are killed, Gnus is faster.
2340
2341 Why does Gnus distinguish between zombie and killed groups?  Well, when
2342 a new group arrives on the server, Gnus by default makes it a zombie
2343 group.  This means that you are normally not bothered with new groups,
2344 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2345 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2346 list of killed groups.)
2347
2348 If you want to play with the level variables, you should show some care.
2349 Set them once, and don't touch them ever again.  Better yet, don't touch
2350 them at all unless you know exactly what you're doing.
2351
2352 @vindex gnus-level-default-unsubscribed
2353 @vindex gnus-level-default-subscribed
2354 Two closely related variables are @code{gnus-level-default-subscribed}
2355 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2356 which are the levels that new groups will be put on if they are
2357 (un)subscribed.  These two variables should, of course, be inside the
2358 relevant valid ranges.
2359
2360 @vindex gnus-keep-same-level
2361 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2362 will only move to groups of the same level (or lower).  In
2363 particular, going from the last article in one group to the next group
2364 will go to the next group of the same level (or lower).  This might be
2365 handy if you want to read the most important groups before you read the
2366 rest.
2367
2368 If this variable is @code{best}, Gnus will make the next newsgroup the
2369 one with the best level.
2370
2371 @vindex gnus-group-default-list-level
2372 All groups with a level less than or equal to
2373 @code{gnus-group-default-list-level} will be listed in the group buffer
2374 by default.
2375
2376 @vindex gnus-group-list-inactive-groups
2377 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2378 groups will be listed along with the unread groups.  This variable is
2379 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2380 listed.
2381
2382 @vindex gnus-group-use-permanent-levels
2383 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2384 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2385 use this level as the ``work'' level.
2386
2387 @vindex gnus-activate-level
2388 Gnus will normally just activate (i. e., query the server about) groups
2389 on level @code{gnus-activate-level} or less.  If you don't want to
2390 activate unsubscribed groups, for instance, you might set this variable
2391 to 5.  The default is 6.
2392
2393
2394 @node Group Score
2395 @section Group Score
2396 @cindex group score
2397 @cindex group rank
2398 @cindex rank
2399
2400 You would normally keep important groups on high levels, but that scheme
2401 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2402 group buffer according to how often you read groups, perhaps?  Within
2403 reason?
2404
2405 This is what @dfn{group score} is for.  You can have Gnus assign a score
2406 to each group through the mechanism described below.  You can then sort
2407 the group buffer based on this score.  Alternatively, you can sort on
2408 score and then level.  (Taken together, the level and the score is
2409 called the @dfn{rank} of the group.  A group that is on level 4 and has
2410 a score of 1 has a higher rank than a group on level 5 that has a score
2411 of 300.  (The level is the most significant part and the score is the
2412 least significant part.))
2413
2414 @findex gnus-summary-bubble-group
2415 If you want groups you read often to get higher scores than groups you
2416 read seldom you can add the @code{gnus-summary-bubble-group} function to
2417 the @code{gnus-summary-exit-hook} hook.  This will result (after
2418 sorting) in a bubbling sort of action.  If you want to see that in
2419 action after each summary exit, you can add
2420 @code{gnus-group-sort-groups-by-rank} or
2421 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2422 slow things down somewhat.
2423
2424
2425 @node Marking Groups
2426 @section Marking Groups
2427 @cindex marking groups
2428
2429 If you want to perform some command on several groups, and they appear
2430 subsequently in the group buffer, you would normally just give a
2431 numerical prefix to the command.  Most group commands will then do your
2432 bidding on those groups.
2433
2434 However, if the groups are not in sequential order, you can still
2435 perform a command on several groups.  You simply mark the groups first
2436 with the process mark and then execute the command.
2437
2438 @table @kbd
2439
2440 @item #
2441 @kindex # (Group)
2442 @itemx M m
2443 @kindex M m (Group)
2444 @findex gnus-group-mark-group
2445 Set the mark on the current group (@code{gnus-group-mark-group}).
2446
2447 @item M-#
2448 @kindex M-# (Group)
2449 @itemx M u
2450 @kindex M u (Group)
2451 @findex gnus-group-unmark-group
2452 Remove the mark from the current group
2453 (@code{gnus-group-unmark-group}).
2454
2455 @item M U
2456 @kindex M U (Group)
2457 @findex gnus-group-unmark-all-groups
2458 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2459
2460 @item M w
2461 @kindex M w (Group)
2462 @findex gnus-group-mark-region
2463 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2464
2465 @item M b
2466 @kindex M b (Group)
2467 @findex gnus-group-mark-buffer
2468 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2469
2470 @item M r
2471 @kindex M r (Group)
2472 @findex gnus-group-mark-regexp
2473 Mark all groups that match some regular expression
2474 (@code{gnus-group-mark-regexp}).
2475 @end table
2476
2477 Also @pxref{Process/Prefix}.
2478
2479 @findex gnus-group-universal-argument
2480 If you want to execute some command on all groups that have been marked
2481 with the process mark, you can use the @kbd{M-&}
2482 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2483 the command to be executed.
2484
2485
2486 @node Foreign Groups
2487 @section Foreign Groups
2488 @cindex foreign groups
2489
2490 Below are some group mode commands for making and editing general foreign
2491 groups, as well as commands to ease the creation of a few
2492 special-purpose groups.  All these commands insert the newly created
2493 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2494 consulted.
2495
2496 @table @kbd
2497
2498 @item G m
2499 @kindex G m (Group)
2500 @findex gnus-group-make-group
2501 @cindex making groups
2502 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2503 for a name, a method and possibly an @dfn{address}.  For an easier way
2504 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2505
2506 @item G M
2507 @kindex G M (Group)
2508 @findex gnus-group-read-ephemeral-group
2509 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2510 will prompt you for a name, a method and an @dfn{address}.
2511
2512 @item G r
2513 @kindex G r (Group)
2514 @findex gnus-group-rename-group
2515 @cindex renaming groups
2516 Rename the current group to something else
2517 (@code{gnus-group-rename-group}).  This is valid only on some
2518 groups---mail groups mostly.  This command might very well be quite slow
2519 on some back ends.
2520
2521 @item G c
2522 @kindex G c (Group)
2523 @cindex customizing
2524 @findex gnus-group-customize
2525 Customize the group parameters (@code{gnus-group-customize}).
2526
2527 @item G e
2528 @kindex G e (Group)
2529 @findex gnus-group-edit-group-method
2530 @cindex renaming groups
2531 Enter a buffer where you can edit the select method of the current
2532 group (@code{gnus-group-edit-group-method}).
2533
2534 @item G p
2535 @kindex G p (Group)
2536 @findex gnus-group-edit-group-parameters
2537 Enter a buffer where you can edit the group parameters
2538 (@code{gnus-group-edit-group-parameters}).
2539
2540 @item G E
2541 @kindex G E (Group)
2542 @findex gnus-group-edit-group
2543 Enter a buffer where you can edit the group info
2544 (@code{gnus-group-edit-group}).
2545
2546 @item G d
2547 @kindex G d (Group)
2548 @findex gnus-group-make-directory-group
2549 @cindex nndir
2550 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2551 for a directory name (@code{gnus-group-make-directory-group}).
2552
2553 @item G h
2554 @kindex G h (Group)
2555 @cindex help group
2556 @findex gnus-group-make-help-group
2557 Make the Gnus help group (@code{gnus-group-make-help-group}).
2558
2559 @item G a
2560 @kindex G a (Group)
2561 @cindex (ding) archive
2562 @cindex archive group
2563 @findex gnus-group-make-archive-group
2564 @vindex gnus-group-archive-directory
2565 @vindex gnus-group-recent-archive-directory
2566 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2567 default a group pointing to the most recent articles will be created
2568 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2569 group will be created from @code{gnus-group-archive-directory}.
2570
2571 @item G k
2572 @kindex G k (Group)
2573 @findex gnus-group-make-kiboze-group
2574 @cindex nnkiboze
2575 Make a kiboze group.  You will be prompted for a name, for a regexp to
2576 match groups to be ``included'' in the kiboze group, and a series of
2577 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2578 @xref{Kibozed Groups}.
2579
2580 @item G D
2581 @kindex G D (Group)
2582 @findex gnus-group-enter-directory
2583 @cindex nneething
2584 Read an arbitrary directory as if it were a newsgroup with the
2585 @code{nneething} back end (@code{gnus-group-enter-directory}).
2586 @xref{Anything Groups}.
2587
2588 @item G f
2589 @kindex G f (Group)
2590 @findex gnus-group-make-doc-group
2591 @cindex ClariNet Briefs
2592 @cindex nndoc
2593 Make a group based on some file or other
2594 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2595 command, you will be prompted for a file name and a file type.
2596 Currently supported types are @code{mbox}, @code{babyl},
2597 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2598 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2599 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2600 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2601 you run this command without a prefix, Gnus will guess at the file
2602 type.  @xref{Document Groups}.
2603
2604 @item G u
2605 @kindex G u (Group)
2606 @vindex gnus-useful-groups
2607 @findex gnus-group-make-useful-group
2608 Create one of the groups mentioned in @code{gnus-useful-groups}
2609 (@code{gnus-group-make-useful-group}).
2610
2611 @item G w
2612 @kindex G w (Group)
2613 @findex gnus-group-make-web-group
2614 @cindex Google
2615 @cindex nnweb
2616 @cindex gmane
2617 Make an ephemeral group based on a web search
2618 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2619 command, make a solid group instead.  You will be prompted for the
2620 search engine type and the search string.  Valid search engine types
2621 include @code{google}, @code{dejanews}, and @code{gmane}.
2622 @xref{Web Searches}.
2623
2624 If you use the @code{google} search engine, you can limit the search
2625 to a particular group by using a match string like
2626 @samp{shaving group:alt.sysadmin.recovery}.
2627
2628 @item G R
2629 @kindex G R (Group)
2630 @findex gnus-group-make-rss-group
2631 Make a group based on an @acronym{RSS} feed
2632 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2633 @xref{RSS}.
2634
2635 @item G DEL
2636 @kindex G DEL (Group)
2637 @findex gnus-group-delete-group
2638 This function will delete the current group
2639 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2640 actually delete all the articles in the group, and forcibly remove the
2641 group itself from the face of the Earth.  Use a prefix only if you are
2642 absolutely sure of what you are doing.  This command can't be used on
2643 read-only groups (like @code{nntp} groups), though.
2644
2645 @item G V
2646 @kindex G V (Group)
2647 @findex gnus-group-make-empty-virtual
2648 Make a new, fresh, empty @code{nnvirtual} group
2649 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2650
2651 @item G v
2652 @kindex G v (Group)
2653 @findex gnus-group-add-to-virtual
2654 Add the current group to an @code{nnvirtual} group
2655 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2656 @end table
2657
2658 @xref{Select Methods}, for more information on the various select
2659 methods.
2660
2661 @vindex gnus-activate-foreign-newsgroups
2662 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2663 Gnus will check all foreign groups with this level or lower at startup.
2664 This might take quite a while, especially if you subscribe to lots of
2665 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2666 @code{gnus-activate-level} also affects activation of foreign
2667 newsgroups.
2668
2669
2670 @node Group Parameters
2671 @section Group Parameters
2672 @cindex group parameters
2673
2674 The group parameters store information local to a particular group.
2675 Here's an example group parameter list:
2676
2677 @example
2678 ((to-address . "ding@@gnus.org")
2679  (auto-expire . t))
2680 @end example
2681
2682 We see that each element consists of a ``dotted pair''---the thing before
2683 the dot is the key, while the thing after the dot is the value.  All the
2684 parameters have this form @emph{except} local variable specs, which are
2685 not dotted pairs, but proper lists.
2686
2687 Some parameters have correspondent customizable variables, each of which
2688 is an alist of regexps and values.
2689
2690 The following group parameters can be used:
2691
2692 @table @code
2693 @item to-address
2694 @cindex to-address
2695 Address used by when doing followups and new posts.
2696
2697 @example
2698 (to-address . "some@@where.com")
2699 @end example
2700
2701 This is primarily useful in mail groups that represent closed mailing
2702 lists---mailing lists where it's expected that everybody that writes to
2703 the mailing list is subscribed to it.  Since using this parameter
2704 ensures that the mail only goes to the mailing list itself, it means
2705 that members won't receive two copies of your followups.
2706
2707 Using @code{to-address} will actually work whether the group is foreign
2708 or not.  Let's say there's a group on the server that is called
2709 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2710 the articles from a mail-to-news gateway.  Posting directly to this
2711 group is therefore impossible---you have to send mail to the mailing
2712 list address instead.
2713
2714 See also @code{gnus-parameter-to-address-alist}.
2715
2716 @item to-list
2717 @cindex to-list
2718 Address used when doing @kbd{a} in that group.
2719
2720 @example
2721 (to-list . "some@@where.com")
2722 @end example
2723
2724 It is totally ignored
2725 when doing a followup---except that if it is present in a news group,
2726 you'll get mail group semantics when doing @kbd{f}.
2727
2728 If you do an @kbd{a} command in a mail group and you have neither a
2729 @code{to-list} group parameter nor a @code{to-address} group parameter,
2730 then a @code{to-list} group parameter will be added automatically upon
2731 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2732 @vindex gnus-add-to-list
2733
2734 @findex gnus-mailing-list-mode
2735 @cindex mail list groups
2736 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2737 entering summary buffer.
2738
2739 See also @code{gnus-parameter-to-list-alist}.
2740
2741 @anchor{subscribed}
2742 @item subscribed
2743 @cindex subscribed
2744 @cindex Mail-Followup-To
2745 @findex gnus-find-subscribed-addresses
2746 If this parameter is set to @code{t}, Gnus will consider the
2747 to-address and to-list parameters for this group as addresses of
2748 mailing lists you are subscribed to.  Giving Gnus this information is
2749 (only) a first step in getting it to generate correct Mail-Followup-To
2750 headers for your posts to these lists.  The second step is to put the
2751 following in your @file{.gnus.el}
2752
2753 @lisp
2754 (setq message-subscribed-address-functions
2755       '(gnus-find-subscribed-addresses))
2756 @end lisp
2757
2758 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2759 a complete treatment of available MFT support.
2760
2761 @item visible
2762 @cindex visible
2763 If the group parameter list has the element @code{(visible . t)},
2764 that group will always be visible in the Group buffer, regardless
2765 of whether it has any unread articles.
2766
2767 @item broken-reply-to
2768 @cindex broken-reply-to
2769 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2770 headers in this group are to be ignored, and for the header to be hidden
2771 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2772 can be useful if you're reading a mailing list group where the listserv
2773 has inserted @code{Reply-To} headers that point back to the listserv
2774 itself.  That is broken behavior.  So there!
2775
2776 @item to-group
2777 @cindex to-group
2778 Elements like @code{(to-group . "some.group.name")} means that all
2779 posts in that group will be sent to @code{some.group.name}.
2780
2781 @item newsgroup
2782 @cindex newsgroup
2783 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2784 will treat all responses as if they were responses to news articles.
2785 This can be useful if you have a mail group that's really a mirror of a
2786 news group.
2787
2788 @item gcc-self
2789 @cindex gcc-self
2790 If @code{(gcc-self . t)} is present in the group parameter list, newly
2791 composed messages will be @code{Gcc}'d to the current group.  If
2792 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2793 generated, if @code{(gcc-self . "string")} is present, this string will
2794 be inserted literally as a @code{gcc} header.  This parameter takes
2795 precedence over any default @code{Gcc} rules as described later
2796 (@pxref{Archived Messages}).
2797
2798 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2799 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2800 doesn't accept articles.
2801
2802 @item auto-expire
2803 @cindex auto-expire
2804 If the group parameter has an element that looks like @code{(auto-expire
2805 . t)}, all articles read will be marked as expirable.  For an
2806 alternative approach, @pxref{Expiring Mail}.
2807
2808 See also @code{gnus-auto-expirable-newsgroups}.
2809
2810 @item total-expire
2811 @cindex total-expire
2812 If the group parameter has an element that looks like
2813 @code{(total-expire . t)}, all read articles will be put through the
2814 expiry process, even if they are not marked as expirable.  Use with
2815 caution.  Unread, ticked and dormant articles are not eligible for
2816 expiry.
2817
2818 See also @code{gnus-total-expirable-newsgroups}.
2819
2820 @item expiry-wait
2821 @cindex expiry-wait
2822 @vindex nnmail-expiry-wait-function
2823 If the group parameter has an element that looks like
2824 @code{(expiry-wait . 10)}, this value will override any
2825 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2826 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2827 can either be a number of days (not necessarily an integer) or the
2828 symbols @code{never} or @code{immediate}.
2829
2830 @item expiry-target
2831 @cindex expiry-target
2832 Where expired messages end up.  This parameter overrides
2833 @code{nnmail-expiry-target}.
2834
2835 @item score-file
2836 @cindex score file group parameter
2837 Elements that look like @code{(score-file . "file")} will make
2838 @file{file} into the current score file for the group in question.  All
2839 interactive score entries will be put into this file.
2840
2841 @item adapt-file
2842 @cindex adapt file group parameter
2843 Elements that look like @code{(adapt-file . "file")} will make
2844 @file{file} into the current adaptive file for the group in question.
2845 All adaptive score entries will be put into this file.
2846
2847 @item admin-address
2848 @cindex admin-address
2849 When unsubscribing from a mailing list you should never send the
2850 unsubscription notice to the mailing list itself.  Instead, you'd send
2851 messages to the administrative address.  This parameter allows you to
2852 put the admin address somewhere convenient.
2853
2854 @item display
2855 @cindex display
2856 Elements that look like @code{(display . MODE)} say which articles to
2857 display on entering the group.  Valid values are:
2858
2859 @table @code
2860 @item all
2861 Display all articles, both read and unread.
2862
2863 @item an integer
2864 Display the last @var{integer} articles in the group.  This is the same as
2865 entering the group with @kbd{C-u @var{integer}}.
2866
2867 @item default
2868 Display the default visible articles, which normally includes unread and
2869 ticked articles.
2870
2871 @item an array
2872 Display articles that satisfy a predicate.
2873
2874 Here are some examples:
2875
2876 @table @code
2877 @item [unread]
2878 Display only unread articles.
2879
2880 @item [not expire]
2881 Display everything except expirable articles.
2882
2883 @item [and (not reply) (not expire)]
2884 Display everything except expirable and articles you've already
2885 responded to.
2886 @end table
2887
2888 The available operators are @code{not}, @code{and} and @code{or}.
2889 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2890 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2891 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2892 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2893
2894 @end table
2895
2896 The @code{display} parameter works by limiting the summary buffer to
2897 the subset specified.  You can pop the limit by using the @kbd{/ w}
2898 command (@pxref{Limiting}).
2899
2900 @item comment
2901 @cindex comment
2902 Elements that look like @code{(comment . "This is a comment")} are
2903 arbitrary comments on the group.  You can display comments in the
2904 group line (@pxref{Group Line Specification}).
2905
2906 @item charset
2907 @cindex charset
2908 Elements that look like @code{(charset . iso-8859-1)} will make
2909 @code{iso-8859-1} the default charset; that is, the charset that will be
2910 used for all articles that do not specify a charset.
2911
2912 See also @code{gnus-group-charset-alist}.
2913
2914 @item ignored-charsets
2915 @cindex ignored-charset
2916 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2917 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2918 default charset will be used for decoding articles.
2919
2920 See also @code{gnus-group-ignored-charsets-alist}.
2921
2922 @item posting-style
2923 @cindex posting-style
2924 You can store additional posting style information for this group
2925 here (@pxref{Posting Styles}).  The format is that of an entry in the
2926 @code{gnus-posting-styles} alist, except that there's no regexp matching
2927 the group name (of course).  Style elements in this group parameter will
2928 take precedence over the ones found in @code{gnus-posting-styles}.
2929
2930 For instance, if you want a funky name and signature in this group only,
2931 instead of hacking @code{gnus-posting-styles}, you could put something
2932 like this in the group parameters:
2933
2934 @example
2935 (posting-style
2936   (name "Funky Name")
2937   ("X-My-Header" "Funky Value")
2938   (signature "Funky Signature"))
2939 @end example
2940
2941 @item post-method
2942 @cindex post-method
2943 If it is set, the value is used as the method for posting message
2944 instead of @code{gnus-post-method}.
2945
2946 @item banner
2947 @cindex banner
2948 An item like @code{(banner . @var{regexp})} causes any part of an article
2949 that matches the regular expression @var{regexp} to be stripped.  Instead of
2950 @var{regexp}, you can also use the symbol @code{signature} which strips the
2951 last signature or any of the elements of the alist
2952 @code{gnus-article-banner-alist}.
2953
2954 @item sieve
2955 @cindex sieve
2956 This parameter contains a Sieve test that should match incoming mail
2957 that should be placed in this group.  From this group parameter, a
2958 Sieve @samp{IF} control structure is generated, having the test as the
2959 condition and @samp{fileinto "group.name";} as the body.
2960
2961 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
2962 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2963 translating the group parameter into a Sieve script (@pxref{Sieve
2964 Commands}) the following Sieve code is generated:
2965
2966 @example
2967 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2968         fileinto \"INBOX.list.sieve\";
2969 @}
2970 @end example
2971
2972 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
2973 Top, sieve, Emacs Sieve}.
2974
2975 @item (agent parameters)
2976 If the agent has been enabled, you can set any of the its parameters
2977 to control the behavior of the agent in individual groups. See Agent
2978 Parameters in @ref{Category Syntax}.  Most users will choose to set
2979 agent parameters in either an agent category or group topic to
2980 minimize the configuration effort.
2981
2982 @item (@var{variable} @var{form})
2983 You can use the group parameters to set variables local to the group you
2984 are entering.  If you want to turn threading off in @samp{news.answers},
2985 you could put @code{(gnus-show-threads nil)} in the group parameters of
2986 that group.  @code{gnus-show-threads} will be made into a local variable
2987 in the summary buffer you enter, and the form @code{nil} will be
2988 @code{eval}ed there.
2989
2990 Note that this feature sets the variable locally to the summary buffer.
2991 But some variables are evaluated in the article buffer, or in the
2992 message buffer (of a reply or followup or otherwise newly created
2993 message).  As a workaround, it might help to add the variable in
2994 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2995 Stuff}.  So if you want to set @code{message-from-style} via the group
2996 parameters, then you may need the following statement elsewhere in your
2997 @file{~/.gnus} file:
2998
2999 @lisp
3000 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3001 @end lisp
3002
3003 @vindex gnus-list-identifiers
3004 A use for this feature is to remove a mailing list identifier tag in
3005 the subject fields of articles.  E.g. if the news group
3006
3007 @example
3008 nntp+news.gnus.org:gmane.text.docbook.apps
3009 @end example
3010
3011 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3012 tag can be removed from the article subjects in the summary buffer for
3013 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3014 into the group parameters for the group.
3015
3016 This can also be used as a group-specific hook function.  If you want to
3017 hear a beep when you enter a group, you could put something like
3018 @code{(dummy-variable (ding))} in the parameters of that group.
3019 @code{dummy-variable} will be set to the (meaningless) result of the
3020 @code{(ding)} form.  
3021
3022 Alternatively, since the VARIABLE becomes local to the group, this
3023 pattern can be used to temporarily change a hook.  For example, if the
3024 following is added to a group parameter
3025
3026 @lisp
3027 (gnus-summary-prepared-hook
3028   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3029 @end lisp
3030
3031 when the group is entered, the 'd' key will not mark the article as
3032 expired.
3033
3034 @end table
3035
3036 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3037 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3038 presents you with a Customize-like interface.  The latter helps avoid
3039 silly Lisp errors.)  You might also be interested in reading about topic
3040 parameters (@pxref{Topic Parameters}).
3041
3042 @vindex gnus-parameters
3043 Group parameters can be set via the @code{gnus-parameters} variable too.
3044 But some variables, such as @code{visible}, have no effect.  For
3045 example:
3046
3047 @lisp
3048 (setq gnus-parameters
3049       '(("mail\\..*"
3050          (gnus-show-threads nil)
3051          (gnus-use-scoring nil)
3052          (gnus-summary-line-format
3053           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3054          (gcc-self . t)
3055          (display . all))
3056
3057         ("^nnimap:\\(foo.bar\\)$"
3058          (to-group . "\\1"))
3059
3060         ("mail\\.me"
3061          (gnus-use-scoring  t))
3062
3063         ("list\\..*"
3064          (total-expire . t)
3065          (broken-reply-to . t))))
3066 @end lisp
3067
3068 String value of parameters will be subjected to regexp substitution, as
3069 the @code{to-group} example shows.
3070
3071
3072 @node Listing Groups
3073 @section Listing Groups
3074 @cindex group listing
3075
3076 These commands all list various slices of the groups available.
3077
3078 @table @kbd
3079
3080 @item l
3081 @itemx A s
3082 @kindex A s (Group)
3083 @kindex l (Group)
3084 @findex gnus-group-list-groups
3085 List all groups that have unread articles
3086 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3087 command will list only groups of level ARG and lower.  By default, it
3088 only lists groups of level five (i.e.,
3089 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3090 groups).
3091
3092 @item L
3093 @itemx A u
3094 @kindex A u (Group)
3095 @kindex L (Group)
3096 @findex gnus-group-list-all-groups
3097 List all groups, whether they have unread articles or not
3098 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3099 this command will list only groups of level ARG and lower.  By default,
3100 it lists groups of level seven or lower (i.e., just subscribed and
3101 unsubscribed groups).
3102
3103 @item A l
3104 @kindex A l (Group)
3105 @findex gnus-group-list-level
3106 List all unread groups on a specific level
3107 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3108 with no unread articles.
3109
3110 @item A k
3111 @kindex A k (Group)
3112 @findex gnus-group-list-killed
3113 List all killed groups (@code{gnus-group-list-killed}).  If given a
3114 prefix argument, really list all groups that are available, but aren't
3115 currently (un)subscribed.  This could entail reading the active file
3116 from the server.
3117
3118 @item A z
3119 @kindex A z (Group)
3120 @findex gnus-group-list-zombies
3121 List all zombie groups (@code{gnus-group-list-zombies}).
3122
3123 @item A m
3124 @kindex A m (Group)
3125 @findex gnus-group-list-matching
3126 List all unread, subscribed groups with names that match a regexp
3127 (@code{gnus-group-list-matching}).
3128
3129 @item A M
3130 @kindex A M (Group)
3131 @findex gnus-group-list-all-matching
3132 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3133
3134 @item A A
3135 @kindex A A (Group)
3136 @findex gnus-group-list-active
3137 List absolutely all groups in the active file(s) of the
3138 server(s) you are connected to (@code{gnus-group-list-active}).  This
3139 might very well take quite a while.  It might actually be a better idea
3140 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3141 thing to match on.  Also note that this command may list groups that
3142 don't exist (yet)---these will be listed as if they were killed groups.
3143 Take the output with some grains of salt.
3144
3145 @item A a
3146 @kindex A a (Group)
3147 @findex gnus-group-apropos
3148 List all groups that have names that match a regexp
3149 (@code{gnus-group-apropos}).
3150
3151 @item A d
3152 @kindex A d (Group)
3153 @findex gnus-group-description-apropos
3154 List all groups that have names or descriptions that match a regexp
3155 (@code{gnus-group-description-apropos}).
3156
3157 @item A c
3158 @kindex A c (Group)
3159 @findex gnus-group-list-cached
3160 List all groups with cached articles (@code{gnus-group-list-cached}).
3161
3162 @item A ?
3163 @kindex A ? (Group)
3164 @findex gnus-group-list-dormant
3165 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3166
3167 @item A /
3168 @kindex A / (Group)
3169 @findex gnus-group-list-limit
3170 List groups limited within the current selection
3171 (@code{gnus-group-list-limit}).
3172
3173 @item A f
3174 @kindex A f (Group)
3175 @findex gnus-group-list-flush
3176 Flush groups from the current selection (@code{gnus-group-list-flush}).
3177
3178 @item A p
3179 @kindex A p (Group)
3180 @findex gnus-group-list-plus
3181 List groups plus the current selection (@code{gnus-group-list-plus}).
3182
3183 @end table
3184
3185 @vindex gnus-permanently-visible-groups
3186 @cindex visible group parameter
3187 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3188 always be shown, whether they have unread articles or not.  You can also
3189 add the @code{visible} element to the group parameters in question to
3190 get the same effect.
3191
3192 @vindex gnus-list-groups-with-ticked-articles
3193 Groups that have just ticked articles in it are normally listed in the
3194 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3195 @code{nil}, these groups will be treated just like totally empty
3196 groups.  It is @code{t} by default.
3197
3198
3199 @node Sorting Groups
3200 @section Sorting Groups
3201 @cindex sorting groups
3202
3203 @kindex C-c C-s (Group)
3204 @findex gnus-group-sort-groups
3205 @vindex gnus-group-sort-function
3206 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3207 group buffer according to the function(s) given by the
3208 @code{gnus-group-sort-function} variable.  Available sorting functions
3209 include:
3210
3211 @table @code
3212
3213 @item gnus-group-sort-by-alphabet
3214 @findex gnus-group-sort-by-alphabet
3215 Sort the group names alphabetically.  This is the default.
3216
3217 @item gnus-group-sort-by-real-name
3218 @findex gnus-group-sort-by-real-name
3219 Sort the group alphabetically on the real (unprefixed) group names.
3220
3221 @item gnus-group-sort-by-level
3222 @findex gnus-group-sort-by-level
3223 Sort by group level.
3224
3225 @item gnus-group-sort-by-score
3226 @findex gnus-group-sort-by-score
3227 Sort by group score.  @xref{Group Score}.
3228
3229 @item gnus-group-sort-by-rank
3230 @findex gnus-group-sort-by-rank
3231 Sort by group score and then the group level.  The level and the score
3232 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3233
3234 @item gnus-group-sort-by-unread
3235 @findex gnus-group-sort-by-unread
3236 Sort by number of unread articles.
3237
3238 @item gnus-group-sort-by-method
3239 @findex gnus-group-sort-by-method
3240 Sort alphabetically on the select method.
3241
3242 @item gnus-group-sort-by-server
3243 @findex gnus-group-sort-by-server
3244 Sort alphabetically on the Gnus server name.
3245
3246
3247 @end table
3248
3249 @code{gnus-group-sort-function} can also be a list of sorting
3250 functions.  In that case, the most significant sort key function must be
3251 the last one.
3252
3253
3254 There are also a number of commands for sorting directly according to
3255 some sorting criteria:
3256
3257 @table @kbd
3258 @item G S a
3259 @kindex G S a (Group)
3260 @findex gnus-group-sort-groups-by-alphabet
3261 Sort the group buffer alphabetically by group name
3262 (@code{gnus-group-sort-groups-by-alphabet}).
3263
3264 @item G S u
3265 @kindex G S u (Group)
3266 @findex gnus-group-sort-groups-by-unread
3267 Sort the group buffer by the number of unread articles
3268 (@code{gnus-group-sort-groups-by-unread}).
3269
3270 @item G S l
3271 @kindex G S l (Group)
3272 @findex gnus-group-sort-groups-by-level
3273 Sort the group buffer by group level
3274 (@code{gnus-group-sort-groups-by-level}).
3275
3276 @item G S v
3277 @kindex G S v (Group)
3278 @findex gnus-group-sort-groups-by-score
3279 Sort the group buffer by group score
3280 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3281
3282 @item G S r
3283 @kindex G S r (Group)
3284 @findex gnus-group-sort-groups-by-rank
3285 Sort the group buffer by group rank
3286 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3287
3288 @item G S m
3289 @kindex G S m (Group)
3290 @findex gnus-group-sort-groups-by-method
3291 Sort the group buffer alphabetically by back end name@*
3292 (@code{gnus-group-sort-groups-by-method}).
3293
3294 @item G S n
3295 @kindex G S n (Group)
3296 @findex gnus-group-sort-groups-by-real-name
3297 Sort the group buffer alphabetically by real (unprefixed) group name
3298 (@code{gnus-group-sort-groups-by-real-name}).
3299
3300 @end table
3301
3302 All the commands below obey the process/prefix convention
3303 (@pxref{Process/Prefix}).
3304
3305 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3306 commands will sort in reverse order.
3307
3308 You can also sort a subset of the groups:
3309
3310 @table @kbd
3311 @item G P a
3312 @kindex G P a (Group)
3313 @findex gnus-group-sort-selected-groups-by-alphabet
3314 Sort the groups alphabetically by group name
3315 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3316
3317 @item G P u
3318 @kindex G P u (Group)
3319 @findex gnus-group-sort-selected-groups-by-unread
3320 Sort the groups by the number of unread articles
3321 (@code{gnus-group-sort-selected-groups-by-unread}).
3322
3323 @item G P l
3324 @kindex G P l (Group)
3325 @findex gnus-group-sort-selected-groups-by-level
3326 Sort the groups by group level
3327 (@code{gnus-group-sort-selected-groups-by-level}).
3328
3329 @item G P v
3330 @kindex G P v (Group)
3331 @findex gnus-group-sort-selected-groups-by-score
3332 Sort the groups by group score
3333 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3334
3335 @item G P r
3336 @kindex G P r (Group)
3337 @findex gnus-group-sort-selected-groups-by-rank
3338 Sort the groups by group rank
3339 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3340
3341 @item G P m
3342 @kindex G P m (Group)
3343 @findex gnus-group-sort-selected-groups-by-method
3344 Sort the groups alphabetically by back end name@*
3345 (@code{gnus-group-sort-selected-groups-by-method}).
3346
3347 @item G P n
3348 @kindex G P n (Group)
3349 @findex gnus-group-sort-selected-groups-by-real-name
3350 Sort the groups alphabetically by real (unprefixed) group name
3351 (@code{gnus-group-sort-selected-groups-by-real-name}).
3352
3353 @item G P s
3354 @kindex G P s (Group)
3355 @findex gnus-group-sort-selected-groups
3356 Sort the groups according to @code{gnus-group-sort-function}.
3357
3358 @end table
3359
3360 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3361 move groups around.
3362
3363
3364 @node Group Maintenance
3365 @section Group Maintenance
3366 @cindex bogus groups
3367
3368 @table @kbd
3369 @item b
3370 @kindex b (Group)
3371 @findex gnus-group-check-bogus-groups
3372 Find bogus groups and delete them
3373 (@code{gnus-group-check-bogus-groups}).
3374
3375 @item F
3376 @kindex F (Group)
3377 @findex gnus-group-find-new-groups
3378 Find new groups and process them (@code{gnus-group-find-new-groups}).
3379 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3380 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3381 to query the server for new groups, and subscribe the new groups as
3382 zombies.
3383
3384 @item C-c C-x
3385 @kindex C-c C-x (Group)
3386 @findex gnus-group-expire-articles
3387 Run all expirable articles in the current group through the expiry
3388 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3389 all expirable articles in the group that have been around for a while.
3390 (@pxref{Expiring Mail}).
3391
3392 @item C-c C-M-x
3393 @kindex C-c C-M-x (Group)
3394 @findex gnus-group-expire-all-groups
3395 Run all expirable articles in all groups through the expiry process
3396 (@code{gnus-group-expire-all-groups}).
3397
3398 @end table
3399
3400
3401 @node Browse Foreign Server
3402 @section Browse Foreign Server
3403 @cindex foreign servers
3404 @cindex browsing servers
3405
3406 @table @kbd
3407 @item B
3408 @kindex B (Group)
3409 @findex gnus-group-browse-foreign-server
3410 You will be queried for a select method and a server name.  Gnus will
3411 then attempt to contact this server and let you browse the groups there
3412 (@code{gnus-group-browse-foreign-server}).
3413 @end table
3414
3415 @findex gnus-browse-mode
3416 A new buffer with a list of available groups will appear.  This buffer
3417 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3418 a lot) like a normal group buffer.
3419
3420 Here's a list of keystrokes available in the browse mode:
3421
3422 @table @kbd
3423 @item n
3424 @kindex n (Browse)
3425 @findex gnus-group-next-group
3426 Go to the next group (@code{gnus-group-next-group}).
3427
3428 @item p
3429 @kindex p (Browse)
3430 @findex gnus-group-prev-group
3431 Go to the previous group (@code{gnus-group-prev-group}).
3432
3433 @item SPACE
3434 @kindex SPACE (Browse)
3435 @findex gnus-browse-read-group
3436 Enter the current group and display the first article
3437 (@code{gnus-browse-read-group}).
3438
3439 @item RET
3440 @kindex RET (Browse)
3441 @findex gnus-browse-select-group
3442 Enter the current group (@code{gnus-browse-select-group}).
3443
3444 @item u
3445 @kindex u (Browse)
3446 @findex gnus-browse-unsubscribe-current-group
3447 Unsubscribe to the current group, or, as will be the case here,
3448 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3449
3450 @item l
3451 @itemx q
3452 @kindex q (Browse)
3453 @kindex l (Browse)
3454 @findex gnus-browse-exit
3455 Exit browse mode (@code{gnus-browse-exit}).
3456
3457 @item d
3458 @kindex d (Browse)
3459 @findex gnus-browse-describe-group
3460 Describe the current group (@code{gnus-browse-describe-group}).
3461
3462 @item ?
3463 @kindex ? (Browse)
3464 @findex gnus-browse-describe-briefly
3465 Describe browse mode briefly (well, there's not much to describe, is
3466 there) (@code{gnus-browse-describe-briefly}).
3467 @end table
3468
3469
3470 @node Exiting Gnus
3471 @section Exiting Gnus
3472 @cindex exiting Gnus
3473
3474 Yes, Gnus is ex(c)iting.
3475
3476 @table @kbd
3477 @item z
3478 @kindex z (Group)
3479 @findex gnus-group-suspend
3480 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3481 but it kills all buffers except the Group buffer.  I'm not sure why this
3482 is a gain, but then who am I to judge?
3483
3484 @item q
3485 @kindex q (Group)
3486 @findex gnus-group-exit
3487 @c @icon{gnus-group-exit}
3488 Quit Gnus (@code{gnus-group-exit}).
3489
3490 @item Q
3491 @kindex Q (Group)
3492 @findex gnus-group-quit
3493 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3494 The dribble file will be saved, though (@pxref{Auto Save}).
3495 @end table
3496
3497 @vindex gnus-exit-gnus-hook
3498 @vindex gnus-suspend-gnus-hook
3499 @vindex gnus-after-exiting-gnus-hook
3500 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3501 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3502 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3503 exiting Gnus.
3504
3505 Note:
3506
3507 @quotation
3508 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3509 numbly heavy and herself fall into a hazy trance as the boy sitting
3510 behind her drew repeated lines with his pencil across the back of her
3511 plastic chair.
3512 @end quotation
3513
3514
3515 @node Group Topics
3516 @section Group Topics
3517 @cindex topics
3518
3519 If you read lots and lots of groups, it might be convenient to group
3520 them hierarchically according to topics.  You put your Emacs groups over
3521 here, your sex groups over there, and the rest (what, two groups or so?)
3522 you put in some misc section that you never bother with anyway.  You can
3523 even group the Emacs sex groups as a sub-topic to either the Emacs
3524 groups or the sex groups---or both!  Go wild!
3525
3526 @iftex
3527 @iflatex
3528 \gnusfigure{Group Topics}{400}{
3529 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3530 }
3531 @end iflatex
3532 @end iftex
3533
3534 Here's an example:
3535
3536 @example
3537 Gnus
3538   Emacs -- I wuw it!
3539      3: comp.emacs
3540      2: alt.religion.emacs
3541     Naughty Emacs
3542      452: alt.sex.emacs
3543        0: comp.talk.emacs.recovery
3544   Misc
3545      8: comp.binaries.fractals
3546     13: comp.sources.unix
3547 @end example
3548
3549 @findex gnus-topic-mode
3550 @kindex t (Group)
3551 To get this @emph{fab} functionality you simply turn on (ooh!) the
3552 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3553 is a toggling command.)
3554
3555 Go ahead, just try it.  I'll still be here when you get back.  La de
3556 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3557 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3558 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3559 Hot and bothered?
3560
3561 If you want this permanently enabled, you should add that minor mode to
3562 the hook for the group mode.  Put the following line in your
3563 @file{~/.gnus.el} file:
3564
3565 @lisp
3566 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3567 @end lisp
3568
3569 @menu
3570 * Topic Commands::              Interactive E-Z commands.
3571 * Topic Variables::             How to customize the topics the Lisp Way.
3572 * Topic Sorting::               Sorting each topic individually.
3573 * Topic Topology::              A map of the world.
3574 * Topic Parameters::            Parameters that apply to all groups in a topic.
3575 @end menu
3576
3577
3578 @node Topic Commands
3579 @subsection Topic Commands
3580 @cindex topic commands
3581
3582 When the topic minor mode is turned on, a new @kbd{T} submap will be
3583 available.  In addition, a few of the standard keys change their
3584 definitions slightly.
3585
3586 In general, the following kinds of operations are possible on topics.
3587 First of all, you want to create topics.  Secondly, you want to put
3588 groups in topics and to move them around until you have an order you
3589 like.  The third kind of operation is to show/hide parts of the whole
3590 shebang.  You might want to hide a topic including its subtopics and
3591 groups, to get a better overview of the other groups.
3592
3593 Here is a list of the basic keys that you might need to set up topics
3594 the way you like.
3595
3596 @table @kbd
3597
3598 @item T n
3599 @kindex T n (Topic)
3600 @findex gnus-topic-create-topic
3601 Prompt for a new topic name and create it
3602 (@code{gnus-topic-create-topic}).
3603
3604 @item T TAB
3605 @itemx TAB
3606 @kindex T TAB (Topic)
3607 @kindex TAB (Topic)
3608 @findex gnus-topic-indent
3609 ``Indent'' the current topic so that it becomes a sub-topic of the
3610 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3611 ``un-indent'' the topic instead.
3612
3613 @item M-TAB
3614 @kindex M-TAB (Topic)
3615 @findex gnus-topic-unindent
3616 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3617 parent of its current parent (@code{gnus-topic-unindent}).
3618
3619 @end table
3620
3621 The following two keys can be used to move groups and topics around.
3622 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3623 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3624 kill and yank rather than cut and paste.
3625
3626 @table @kbd
3627
3628 @item C-k
3629 @kindex C-k (Topic)
3630 @findex gnus-topic-kill-group
3631 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3632 topic will be removed along with the topic.
3633
3634 @item C-y
3635 @kindex C-y (Topic)
3636 @findex gnus-topic-yank-group
3637 Yank the previously killed group or topic
3638 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3639 before all groups.
3640
3641 So, to move a topic to the beginning of the list of topics, just hit
3642 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3643 move the cursor to the beginning of the buffer (just below the ``Gnus''
3644 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3645 paste.  Like I said -- E-Z.
3646
3647 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3648 you can move topics around as well as groups.
3649
3650 @end table
3651
3652 After setting up the topics the way you like them, you might wish to
3653 hide a topic, or to show it again.  That's why we have the following
3654 key.
3655
3656 @table @kbd
3657
3658 @item RET
3659 @kindex RET (Topic)
3660 @findex gnus-topic-select-group
3661 @itemx SPACE
3662 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3663 When you perform this command on a group, you'll enter the group, as
3664 usual.  When done on a topic line, the topic will be folded (if it was
3665 visible) or unfolded (if it was folded already).  So it's basically a
3666 toggling command on topics.  In addition, if you give a numerical
3667 prefix, group on that level (and lower) will be displayed.
3668
3669 @end table
3670
3671 Now for a list of other commands, in no particular order.
3672
3673 @table @kbd
3674
3675 @item T m
3676 @kindex T m (Topic)
3677 @findex gnus-topic-move-group
3678 Move the current group to some other topic
3679 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3680 convention (@pxref{Process/Prefix}).
3681
3682 @item T j
3683 @kindex T j (Topic)
3684 @findex gnus-topic-jump-to-topic
3685 Go to a topic (@code{gnus-topic-jump-to-topic}).
3686
3687 @item T c
3688 @kindex T c (Topic)
3689 @findex gnus-topic-copy-group
3690 Copy the current group to some other topic
3691 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3692 convention (@pxref{Process/Prefix}).
3693
3694 @item T h
3695 @kindex T h (Topic)
3696 @findex gnus-topic-hide-topic
3697 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3698 a prefix, hide the topic permanently.
3699
3700 @item T s
3701 @kindex T s (Topic)
3702 @findex gnus-topic-show-topic
3703 Show the current topic (@code{gnus-topic-show-topic}).  If given
3704 a prefix, show the topic permanently.
3705
3706 @item T D
3707 @kindex T D (Topic)
3708 @findex gnus-topic-remove-group
3709 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3710 This command is mainly useful if you have the same group in several
3711 topics and wish to remove it from one of the topics.  You may also
3712 remove a group from all topics, but in that case, Gnus will add it to
3713 the root topic the next time you start Gnus.  In fact, all new groups
3714 (which, naturally, don't belong to any topic) will show up in the root
3715 topic.
3716
3717 This command uses the process/prefix convention
3718 (@pxref{Process/Prefix}).
3719
3720 @item T M
3721 @kindex T M (Topic)
3722 @findex gnus-topic-move-matching
3723 Move all groups that match some regular expression to a topic
3724 (@code{gnus-topic-move-matching}).
3725
3726 @item T C
3727 @kindex T C (Topic)
3728 @findex gnus-topic-copy-matching
3729 Copy all groups that match some regular expression to a topic
3730 (@code{gnus-topic-copy-matching}).
3731
3732 @item T H
3733 @kindex T H (Topic)
3734 @findex gnus-topic-toggle-display-empty-topics
3735 Toggle hiding empty topics
3736 (@code{gnus-topic-toggle-display-empty-topics}).
3737
3738 @item T #
3739 @kindex T # (Topic)
3740 @findex gnus-topic-mark-topic
3741 Mark all groups in the current topic with the process mark
3742 (@code{gnus-topic-mark-topic}).  This command works recursively on
3743 sub-topics unless given a prefix.
3744
3745 @item T M-#
3746 @kindex T M-# (Topic)
3747 @findex gnus-topic-unmark-topic
3748 Remove the process mark from all groups in the current topic
3749 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3750 sub-topics unless given a prefix.
3751
3752 @item C-c C-x
3753 @kindex C-c C-x (Topic)
3754 @findex gnus-topic-expire-articles
3755 Run all expirable articles in the current group or topic through the
3756 expiry process (if any)
3757 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3758
3759 @item T r
3760 @kindex T r (Topic)
3761 @findex gnus-topic-rename
3762 Rename a topic (@code{gnus-topic-rename}).
3763
3764 @item T DEL
3765 @kindex T DEL (Topic)
3766 @findex gnus-topic-delete
3767 Delete an empty topic (@code{gnus-topic-delete}).
3768
3769 @item A T
3770 @kindex A T (Topic)
3771 @findex gnus-topic-list-active
3772 List all groups that Gnus knows about in a topics-ified way
3773 (@code{gnus-topic-list-active}).
3774
3775 @item T M-n
3776 @kindex T M-n (Topic)
3777 @findex gnus-topic-goto-next-topic
3778 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3779
3780 @item T M-p
3781 @kindex T M-p (Topic)
3782 @findex gnus-topic-goto-previous-topic
3783 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3784
3785 @item G p
3786 @kindex G p (Topic)
3787 @findex gnus-topic-edit-parameters
3788 @cindex group parameters
3789 @cindex topic parameters
3790 @cindex parameters
3791 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3792 @xref{Topic Parameters}.
3793
3794 @end table
3795
3796
3797 @node Topic Variables
3798 @subsection Topic Variables
3799 @cindex topic variables
3800
3801 The previous section told you how to tell Gnus which topics to display.
3802 This section explains how to tell Gnus what to display about each topic.
3803
3804 @vindex gnus-topic-line-format
3805 The topic lines themselves are created according to the
3806 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3807 Valid elements are:
3808
3809 @table @samp
3810 @item i
3811 Indentation.
3812 @item n
3813 Topic name.
3814 @item v
3815 Visibility.
3816 @item l
3817 Level.
3818 @item g
3819 Number of groups in the topic.
3820 @item a
3821 Number of unread articles in the topic.
3822 @item A
3823 Number of unread articles in the topic and all its subtopics.
3824 @end table
3825
3826 @vindex gnus-topic-indent-level
3827 Each sub-topic (and the groups in the sub-topics) will be indented with
3828 @code{gnus-topic-indent-level} times the topic level number of spaces.
3829 The default is 2.
3830
3831 @vindex gnus-topic-mode-hook
3832 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3833
3834 @vindex gnus-topic-display-empty-topics
3835 The @code{gnus-topic-display-empty-topics} says whether to display even
3836 topics that have no unread articles in them.  The default is @code{t}.
3837
3838
3839 @node Topic Sorting
3840 @subsection Topic Sorting
3841 @cindex topic sorting
3842
3843 You can sort the groups in each topic individually with the following
3844 commands:
3845
3846
3847 @table @kbd
3848 @item T S a
3849 @kindex T S a (Topic)
3850 @findex gnus-topic-sort-groups-by-alphabet
3851 Sort the current topic alphabetically by group name
3852 (@code{gnus-topic-sort-groups-by-alphabet}).
3853
3854 @item T S u
3855 @kindex T S u (Topic)
3856 @findex gnus-topic-sort-groups-by-unread
3857 Sort the current topic by the number of unread articles
3858 (@code{gnus-topic-sort-groups-by-unread}).
3859
3860 @item T S l
3861 @kindex T S l (Topic)
3862 @findex gnus-topic-sort-groups-by-level
3863 Sort the current topic by group level
3864 (@code{gnus-topic-sort-groups-by-level}).
3865
3866 @item T S v
3867 @kindex T S v (Topic)
3868 @findex gnus-topic-sort-groups-by-score
3869 Sort the current topic by group score
3870 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3871
3872 @item T S r
3873 @kindex T S r (Topic)
3874 @findex gnus-topic-sort-groups-by-rank
3875 Sort the current topic by group rank
3876 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3877
3878 @item T S m
3879 @kindex T S m (Topic)
3880 @findex gnus-topic-sort-groups-by-method
3881 Sort the current topic alphabetically by back end name
3882 (@code{gnus-topic-sort-groups-by-method}).
3883
3884 @item T S e
3885 @kindex T S e (Topic)
3886 @findex gnus-topic-sort-groups-by-server
3887 Sort the current topic alphabetically by server name
3888 (@code{gnus-topic-sort-groups-by-server}).
3889
3890 @item T S s
3891 @kindex T S s (Topic)
3892 @findex gnus-topic-sort-groups
3893 Sort the current topic according to the function(s) given by the
3894 @code{gnus-group-sort-function} variable
3895 (@code{gnus-topic-sort-groups}).
3896
3897 @end table
3898
3899 When given a prefix argument, all these commands will sort in reverse
3900 order.  @xref{Sorting Groups}, for more information about group
3901 sorting.
3902
3903
3904 @node Topic Topology
3905 @subsection Topic Topology
3906 @cindex topic topology
3907 @cindex topology
3908
3909 So, let's have a look at an example group buffer:
3910
3911 @example
3912 @group
3913 Gnus
3914   Emacs -- I wuw it!
3915      3: comp.emacs
3916      2: alt.religion.emacs
3917     Naughty Emacs
3918      452: alt.sex.emacs
3919        0: comp.talk.emacs.recovery
3920   Misc
3921      8: comp.binaries.fractals
3922     13: comp.sources.unix
3923 @end group
3924 @end example
3925
3926 So, here we have one top-level topic (@samp{Gnus}), two topics under
3927 that, and one sub-topic under one of the sub-topics.  (There is always
3928 just one (1) top-level topic).  This topology can be expressed as
3929 follows:
3930
3931 @lisp
3932 (("Gnus" visible)
3933  (("Emacs -- I wuw it!" visible)
3934   (("Naughty Emacs" visible)))
3935  (("Misc" visible)))
3936 @end lisp
3937
3938 @vindex gnus-topic-topology
3939 This is in fact how the variable @code{gnus-topic-topology} would look
3940 for the display above.  That variable is saved in the @file{.newsrc.eld}
3941 file, and shouldn't be messed with manually---unless you really want
3942 to.  Since this variable is read from the @file{.newsrc.eld} file,
3943 setting it in any other startup files will have no effect.
3944
3945 This topology shows what topics are sub-topics of what topics (right),
3946 and which topics are visible.  Two settings are currently
3947 allowed---@code{visible} and @code{invisible}.
3948
3949
3950 @node Topic Parameters
3951 @subsection Topic Parameters
3952 @cindex topic parameters
3953
3954 All groups in a topic will inherit group parameters from the parent
3955 (and ancestor) topic parameters.  All valid group parameters are valid
3956 topic parameters (@pxref{Group Parameters}).  When the agent is
3957 enabled, all agent parameters (See Agent Parameters in @ref{Category
3958 Syntax}) are also valid topic parameters.
3959
3960 In addition, the following parameters are only valid as topic
3961 parameters:
3962
3963 @table @code
3964 @item subscribe
3965 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3966 @code{subscribe} topic parameter says what groups go in what topic.  Its
3967 value should be a regexp to match the groups that should go in that
3968 topic.
3969
3970 @item subscribe-level
3971 When subscribing new groups by topic (see the @code{subscribe} parameter),
3972 the group will be subscribed with the level specified in the
3973 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3974
3975 @end table
3976
3977 Group parameters (of course) override topic parameters, and topic
3978 parameters in sub-topics override topic parameters in super-topics.  You
3979 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3980 verb, although you may feel free to disagree with me here.)
3981
3982 @example
3983 @group
3984 Gnus
3985   Emacs
3986      3: comp.emacs
3987      2: alt.religion.emacs
3988    452: alt.sex.emacs
3989     Relief
3990      452: alt.sex.emacs
3991        0: comp.talk.emacs.recovery
3992   Misc
3993      8: comp.binaries.fractals
3994     13: comp.sources.unix
3995    452: alt.sex.emacs
3996 @end group   
3997 @end example
3998
3999 The @samp{Emacs} topic has the topic parameter @code{(score-file
4000 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4001 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4002 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4003 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4004 . "religion.SCORE")}.
4005
4006 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4007 will get the @file{relief.SCORE} home score file.  If you enter the same
4008 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4009 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4010 get the @file{religion.SCORE} home score file.
4011
4012 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4013 there are some problems, especially with the @code{total-expiry}
4014 parameter.  Say you have a mail group in two topics; one with
4015 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4016 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4017 of these topics you mean to expire articles from, so anything may
4018 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4019 happens.  You just have to be careful if you do stuff like that.
4020
4021
4022 @node Misc Group Stuff
4023 @section Misc Group Stuff
4024
4025 @menu
4026 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4027 * Group Information::           Information and help on groups and Gnus.
4028 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4029 * File Commands::               Reading and writing the Gnus files.
4030 * Sieve Commands::              Managing Sieve scripts.
4031 @end menu
4032
4033 @table @kbd
4034
4035 @item ^
4036 @kindex ^ (Group)
4037 @findex gnus-group-enter-server-mode
4038 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4039 @xref{Server Buffer}.
4040
4041 @item a
4042 @kindex a (Group)
4043 @findex gnus-group-post-news
4044 Start composing a message (a news by default)
4045 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4046 under the point.  If the prefix is 1, prompt for a group to post to.
4047 Contrary to what the name of this function suggests, the prepared
4048 article might be a mail instead of a news, if a mail group is specified
4049 with the prefix argument.  @xref{Composing Messages}.
4050
4051 @item m
4052 @kindex m (Group)
4053 @findex gnus-group-mail
4054 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4055 use the posting style of the group under the point.  If the prefix is 1,
4056 prompt for a group name to find the posting style.
4057 @xref{Composing Messages}.
4058
4059 @item i
4060 @kindex i (Group)
4061 @findex gnus-group-news
4062 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4063 post to the group under the point.  If the prefix is 1, prompt
4064 for group to post to.  @xref{Composing Messages}.
4065
4066 This function actually prepares a news even when using mail groups.
4067 This is useful for ``posting'' messages to mail groups without actually
4068 sending them over the network: they're just saved directly to the group
4069 in question.  The corresponding back end must have a request-post method
4070 for this to work though.
4071
4072 @end table
4073
4074 Variables for the group buffer:
4075
4076 @table @code
4077
4078 @item gnus-group-mode-hook
4079 @vindex gnus-group-mode-hook
4080 is called after the group buffer has been
4081 created.
4082
4083 @item gnus-group-prepare-hook
4084 @vindex gnus-group-prepare-hook
4085 is called after the group buffer is
4086 generated.  It may be used to modify the buffer in some strange,
4087 unnatural way.
4088
4089 @item gnus-group-prepared-hook
4090 @vindex gnus-group-prepare-hook
4091 is called as the very last thing after the group buffer has been
4092 generated.  It may be used to move point around, for instance.
4093
4094 @item gnus-permanently-visible-groups
4095 @vindex gnus-permanently-visible-groups
4096 Groups matching this regexp will always be listed in the group buffer,
4097 whether they are empty or not.
4098
4099 @item gnus-group-name-charset-method-alist
4100 @vindex gnus-group-name-charset-method-alist
4101 An alist of method and the charset for group names.  It is used to show
4102 non-@acronym{ASCII} group names.
4103
4104 For example:
4105 @lisp
4106 (setq gnus-group-name-charset-method-alist
4107     '(((nntp "news.com.cn") . cn-gb-2312)))
4108 @end lisp
4109
4110 @item gnus-group-name-charset-group-alist
4111 @cindex UTF-8 group names
4112 @vindex gnus-group-name-charset-group-alist
4113 An alist of regexp of group name and the charset for group names.  It
4114 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4115 utf-8))} is the default value if UTF-8 is supported, otherwise the
4116 default is @code{nil}.
4117
4118 For example:
4119 @lisp
4120 (setq gnus-group-name-charset-group-alist
4121     '(("\\.com\\.cn:" . cn-gb-2312)))
4122 @end lisp
4123
4124 @end table
4125
4126 @node Scanning New Messages
4127 @subsection Scanning New Messages
4128 @cindex new messages
4129 @cindex scanning new news
4130
4131 @table @kbd
4132
4133 @item g
4134 @kindex g (Group)
4135 @findex gnus-group-get-new-news
4136 @c @icon{gnus-group-get-new-news}
4137 Check the server(s) for new articles.  If the numerical prefix is used,
4138 this command will check only groups of level @var{arg} and lower
4139 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4140 command will force a total re-reading of the active file(s) from the
4141 back end(s).
4142
4143 @item M-g
4144 @kindex M-g (Group)
4145 @findex gnus-group-get-new-news-this-group
4146 @vindex gnus-goto-next-group-when-activating
4147 @c @icon{gnus-group-get-new-news-this-group}
4148 Check whether new articles have arrived in the current group
4149 (@code{gnus-group-get-new-news-this-group}).
4150 @code{gnus-goto-next-group-when-activating} says whether this command is
4151 to move point to the next group or not.  It is @code{t} by default.
4152
4153 @findex gnus-activate-all-groups
4154 @cindex activating groups
4155 @item C-c M-g
4156 @kindex C-c M-g (Group)
4157 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4158
4159 @item R
4160 @kindex R (Group)
4161 @cindex restarting
4162 @findex gnus-group-restart
4163 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4164 file(s), closes the connection to all servers, clears up all run-time
4165 Gnus variables, and then starts Gnus all over again.
4166
4167 @end table
4168
4169 @vindex gnus-get-new-news-hook
4170 @code{gnus-get-new-news-hook} is run just before checking for new news.
4171
4172 @vindex gnus-after-getting-new-news-hook
4173 @code{gnus-after-getting-new-news-hook} is run after checking for new
4174 news.
4175
4176
4177 @node Group Information
4178 @subsection Group Information
4179 @cindex group information
4180 @cindex information on groups
4181
4182 @table @kbd
4183
4184
4185 @item H f
4186 @kindex H f (Group)
4187 @findex gnus-group-fetch-faq
4188 @vindex gnus-group-faq-directory
4189 @cindex FAQ
4190 @cindex ange-ftp
4191 Try to fetch the @acronym{FAQ} for the current group
4192 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4193 from @code{gnus-group-faq-directory}, which is usually a directory on
4194 a remote machine.  This variable can also be a list of directories.
4195 In that case, giving a prefix to this command will allow you to choose
4196 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4197 used for fetching the file.
4198
4199 If fetching from the first site is unsuccessful, Gnus will attempt to go
4200 through @code{gnus-group-faq-directory} and try to open them one by one.
4201
4202 @item H c
4203 @kindex H c (Group)
4204 @findex gnus-group-fetch-charter
4205 @vindex gnus-group-charter-alist
4206 @cindex charter
4207 Try to open the charter for the current group in a web browser
4208 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4209 prefix argument.
4210
4211 Gnus will use @code{gnus-group-charter-alist} to find the location of
4212 the charter.  If no location is known, Gnus will fetch the control
4213 messages for the group, which in some cases includes the charter.
4214
4215 @item H C
4216 @kindex H C (Group)
4217 @findex gnus-group-fetch-control
4218 @vindex gnus-group-fetch-control-use-browse-url
4219 @cindex control message
4220 Fetch the control messages for the group from the archive at
4221 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4222 group if given a prefix argument.
4223
4224 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4225 Gnus will open the control messages in a browser using
4226 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4227 and displayed in an ephemeral group.
4228
4229 Note that the control messages are compressed.  To use this command
4230 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4231 Files, ,Compressed Files, emacs, The Emacs Manual}).
4232
4233 @item H d
4234 @itemx C-c C-d
4235 @c @icon{gnus-group-describe-group}
4236 @kindex H d (Group)
4237 @kindex C-c C-d (Group)
4238 @cindex describing groups
4239 @cindex group description
4240 @findex gnus-group-describe-group
4241 Describe the current group (@code{gnus-group-describe-group}).  If given
4242 a prefix, force Gnus to re-read the description from the server.
4243
4244 @item M-d
4245 @kindex M-d (Group)
4246 @findex gnus-group-describe-all-groups
4247 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4248 prefix, force Gnus to re-read the description file from the server.
4249
4250 @item H v
4251 @itemx V
4252 @kindex V (Group)
4253 @kindex H v (Group)
4254 @cindex version
4255 @findex gnus-version
4256 Display current Gnus version numbers (@code{gnus-version}).
4257
4258 @item ?
4259 @kindex ? (Group)
4260 @findex gnus-group-describe-briefly
4261 Give a very short help message (@code{gnus-group-describe-briefly}).
4262
4263 @item C-c C-i
4264 @kindex C-c C-i (Group)
4265 @cindex info
4266 @cindex manual
4267 @findex gnus-info-find-node
4268 Go to the Gnus info node (@code{gnus-info-find-node}).
4269 @end table
4270
4271
4272 @node Group Timestamp
4273 @subsection Group Timestamp
4274 @cindex timestamps
4275 @cindex group timestamps
4276
4277 It can be convenient to let Gnus keep track of when you last read a
4278 group.  To set the ball rolling, you should add
4279 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4280
4281 @lisp
4282 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4283 @end lisp
4284
4285 After doing this, each time you enter a group, it'll be recorded.
4286
4287 This information can be displayed in various ways---the easiest is to
4288 use the @samp{%d} spec in the group line format:
4289
4290 @lisp
4291 (setq gnus-group-line-format
4292       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4293 @end lisp
4294
4295 This will result in lines looking like:
4296
4297 @example
4298 *        0: mail.ding                                19961002T012943
4299          0: custom                                   19961002T012713
4300 @end example
4301
4302 As you can see, the date is displayed in compact ISO 8601 format.  This
4303 may be a bit too much, so to just display the date, you could say
4304 something like:
4305
4306 @lisp
4307 (setq gnus-group-line-format
4308       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4309 @end lisp
4310
4311 If you would like greater control of the time format, you can use a
4312 user-defined format spec.  Something like the following should do the
4313 trick:
4314
4315 @lisp
4316 (setq gnus-group-line-format
4317       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4318 (defun gnus-user-format-function-d (headers)
4319   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4320     (if time
4321         (format-time-string "%b %d  %H:%M" time)
4322       "")))
4323 @end lisp
4324
4325
4326 @node File Commands
4327 @subsection File Commands
4328 @cindex file commands
4329
4330 @table @kbd
4331
4332 @item r
4333 @kindex r (Group)
4334 @findex gnus-group-read-init-file
4335 @vindex gnus-init-file
4336 @cindex reading init file
4337 Re-read the init file (@code{gnus-init-file}, which defaults to
4338 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4339
4340 @item s
4341 @kindex s (Group)
4342 @findex gnus-group-save-newsrc
4343 @cindex saving .newsrc
4344 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4345 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4346 file(s) whether Gnus thinks it is necessary or not.
4347
4348 @c @item Z
4349 @c @kindex Z (Group)
4350 @c @findex gnus-group-clear-dribble
4351 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4352
4353 @end table
4354
4355
4356 @node Sieve Commands
4357 @subsection Sieve Commands
4358 @cindex group sieve commands
4359
4360 Sieve is a server-side mail filtering language.  In Gnus you can use
4361 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4362 sieve rules that should apply to each group.  Gnus provides two
4363 commands to translate all these group parameters into a proper Sieve
4364 script that can be transfered to the server somehow.
4365
4366 @vindex gnus-sieve-file
4367 @vindex gnus-sieve-region-start
4368 @vindex gnus-sieve-region-end
4369 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4370 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4371 between two delimiters, @code{gnus-sieve-region-start} and
4372 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4373 outside these delimiters that will not be removed the next time you
4374 regenerate the Sieve script.
4375
4376 @vindex gnus-sieve-crosspost
4377 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4378 is generated.  If it is non-@code{nil} (the default) articles is
4379 placed in all groups that have matching rules, otherwise the article
4380 is only placed in the group with the first matching rule.  For
4381 example, the group parameter @samp{(sieve address "sender"
4382 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4383 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4384 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4385 except that the line containing the call to @code{stop} is removed.)
4386
4387 @example
4388 if address "sender" "owner-ding@@hpc.uh.edu" @{
4389         fileinto "INBOX.ding";
4390         stop;
4391 @}
4392 @end example
4393
4394 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4395
4396 @table @kbd
4397
4398 @item D g
4399 @kindex D g (Group)
4400 @findex gnus-sieve-generate
4401 @vindex gnus-sieve-file
4402 @cindex generating sieve script
4403 Regenerate a Sieve script from the @code{sieve} group parameters and
4404 put you into the @code{gnus-sieve-file} without saving it.
4405
4406 @item D u
4407 @kindex D u (Group)
4408 @findex gnus-sieve-update
4409 @vindex gnus-sieve-file
4410 @cindex updating sieve script
4411 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4412 @code{sieve} group parameters, save the file and upload it to the
4413 server using the @code{sieveshell} program.
4414
4415 @end table
4416
4417
4418 @node Summary Buffer
4419 @chapter Summary Buffer
4420 @cindex summary buffer
4421
4422 A line for each article is displayed in the summary buffer.  You can
4423 move around, read articles, post articles and reply to articles.
4424
4425 The most common way to a summary buffer is to select a group from the
4426 group buffer (@pxref{Selecting a Group}).
4427
4428 You can have as many summary buffers open as you wish.
4429
4430 @menu
4431 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4432 * Summary Maneuvering::         Moving around the summary buffer.
4433 * Choosing Articles::           Reading articles.
4434 * Paging the Article::          Scrolling the current article.
4435 * Reply Followup and Post::     Posting articles.
4436 * Delayed Articles::            Send articles at a later time.
4437 * Marking Articles::            Marking articles as read, expirable, etc.
4438 * Limiting::                    You can limit the summary buffer.
4439 * Threading::                   How threads are made.
4440 * Sorting the Summary Buffer::  How articles and threads are sorted.
4441 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4442 * Article Caching::             You may store articles in a cache.
4443 * Persistent Articles::         Making articles expiry-resistant.
4444 * Article Backlog::             Having already read articles hang around.
4445 * Saving Articles::             Ways of customizing article saving.
4446 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4447 * Article Treatment::           The article buffer can be mangled at will.
4448 * MIME Commands::               Doing MIMEy things with the articles.
4449 * Charsets::                    Character set issues.
4450 * Article Commands::            Doing various things with the article buffer.
4451 * Summary Sorting::             Sorting the summary buffer in various ways.
4452 * Finding the Parent::          No child support? Get the parent.
4453 * Alternative Approaches::      Reading using non-default summaries.
4454 * Tree Display::                A more visual display of threads.
4455 * Mail Group Commands::         Some commands can only be used in mail groups.
4456 * Various Summary Stuff::       What didn't fit anywhere else.
4457 * Exiting the Summary Buffer::  Returning to the Group buffer,
4458                                 or reselecting the current group.
4459 * Crosspost Handling::          How crossposted articles are dealt with.
4460 * Duplicate Suppression::       An alternative when crosspost handling fails.
4461 * Security::                    Decrypt and Verify.
4462 * Mailing List::                Mailing list minor mode.
4463 @end menu
4464
4465
4466 @node Summary Buffer Format
4467 @section Summary Buffer Format
4468 @cindex summary buffer format
4469
4470 @iftex
4471 @iflatex
4472 \gnusfigure{The Summary Buffer}{180}{
4473 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4474 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4475 }
4476 @end iflatex
4477 @end iftex
4478
4479 @menu
4480 * Summary Buffer Lines::        You can specify how summary lines should look.
4481 * To From Newsgroups::          How to not display your own name.
4482 * Summary Buffer Mode Line::    You can say how the mode line should look.
4483 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4484 @end menu
4485
4486 @findex mail-extract-address-components
4487 @findex gnus-extract-address-components
4488 @vindex gnus-extract-address-components
4489 Gnus will use the value of the @code{gnus-extract-address-components}
4490 variable as a function for getting the name and address parts of a
4491 @code{From} header.  Two pre-defined functions exist:
4492 @code{gnus-extract-address-components}, which is the default, quite
4493 fast, and too simplistic solution; and
4494 @code{mail-extract-address-components}, which works very nicely, but is
4495 slower.  The default function will return the wrong answer in 5% of the
4496 cases.  If this is unacceptable to you, use the other function instead:
4497
4498 @lisp
4499 (setq gnus-extract-address-components
4500       'mail-extract-address-components)
4501 @end lisp
4502
4503 @vindex gnus-summary-same-subject
4504 @code{gnus-summary-same-subject} is a string indicating that the current
4505 article has the same subject as the previous.  This string will be used
4506 with those specs that require it.  The default is @code{""}.
4507
4508
4509 @node Summary Buffer Lines
4510 @subsection Summary Buffer Lines
4511
4512 @vindex gnus-summary-line-format
4513 You can change the format of the lines in the summary buffer by changing
4514 the @code{gnus-summary-line-format} variable.  It works along the same
4515 lines as a normal @code{format} string, with some extensions
4516 (@pxref{Formatting Variables}).
4517
4518 There should always be a colon or a point position marker on the line;
4519 the cursor always moves to the point position marker or the colon after
4520 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4521 possible to change this.  Just write a new function
4522 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4523 @xref{Positioning Point}.
4524
4525 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4526
4527 The following format specification characters and extended format
4528 specification(s) are understood:
4529
4530 @table @samp
4531 @item N
4532 Article number.
4533 @item S
4534 Subject string.  List identifiers stripped,
4535 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4536 @item s
4537 Subject if the article is the root of the thread or the previous article
4538 had a different subject, @code{gnus-summary-same-subject} otherwise.
4539 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4540 @item F
4541 Full @code{From} header.
4542 @item n
4543 The name (from the @code{From} header).
4544 @item f
4545 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4546 From Newsgroups}).
4547 @item a
4548 The name (from the @code{From} header).  This differs from the @code{n}
4549 spec in that it uses the function designated by the
4550 @code{gnus-extract-address-components} variable, which is slower, but
4551 may be more thorough.
4552 @item A
4553 The address (from the @code{From} header).  This works the same way as
4554 the @code{a} spec.
4555 @item L
4556 Number of lines in the article.
4557 @item c
4558 Number of characters in the article.  This specifier is not supported
4559 in some methods (like nnfolder).
4560 @item k
4561 Pretty-printed version of the number of characters in the article;
4562 for example, @samp{1.2k} or @samp{0.4M}.
4563 @item I
4564 Indentation based on thread level (@pxref{Customizing Threading}).
4565 @item B
4566 A complex trn-style thread tree, showing response-connecting trace
4567 lines.  A thread could be drawn like this:
4568
4569 @example
4570 >
4571 +->
4572 | +->
4573 | | \->
4574 | |   \->
4575 | \->
4576 +->
4577 \->
4578 @end example
4579
4580 You can customize the appearance with the following options.  Note
4581 that it is possible to make the thread display look really neat by
4582 replacing the default @acronym{ASCII} characters with graphic
4583 line-drawing glyphs.
4584 @table @code
4585 @item gnus-sum-thread-tree-root
4586 @vindex gnus-sum-thread-tree-root
4587 Used for the root of a thread.  If @code{nil}, use subject
4588 instead.  The default is @samp{> }.
4589
4590 @item gnus-sum-thread-tree-false-root
4591 @vindex gnus-sum-thread-tree-false-root
4592 Used for the false root of a thread (@pxref{Loose Threads}).  If
4593 @code{nil}, use subject instead.  The default is @samp{> }.
4594
4595 @item gnus-sum-thread-tree-single-indent
4596 @vindex gnus-sum-thread-tree-single-indent
4597 Used for a thread with just one message.  If @code{nil}, use subject
4598 instead.  The default is @samp{}.
4599
4600 @item gnus-sum-thread-tree-vertical
4601 @vindex gnus-sum-thread-tree-vertical
4602 Used for drawing a vertical line.  The default is @samp{| }.
4603
4604 @item gnus-sum-thread-tree-indent
4605 @vindex gnus-sum-thread-tree-indent
4606 Used for indenting.  The default is @samp{  }.
4607
4608 @item gnus-sum-thread-tree-leaf-with-other
4609 @vindex gnus-sum-thread-tree-leaf-with-other
4610 Used for a leaf with brothers.  The default is @samp{+-> }.
4611
4612 @item gnus-sum-thread-tree-single-leaf
4613 @vindex gnus-sum-thread-tree-single-leaf
4614 Used for a leaf without brothers.  The default is @samp{\-> }
4615
4616 @end table
4617
4618 @item T
4619 Nothing if the article is a root and lots of spaces if it isn't (it
4620 pushes everything after it off the screen).
4621 @item [
4622 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4623 for adopted articles (@pxref{Customizing Threading}).
4624 @item ]
4625 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4626 for adopted articles.
4627 @item >
4628 One space for each thread level.
4629 @item <
4630 Twenty minus thread level spaces.
4631 @item U
4632 Unread.  @xref{Read Articles}.
4633
4634 @item R
4635 This misleadingly named specifier is the @dfn{secondary mark}.  This
4636 mark will say whether the article has been replied to, has been cached,
4637 or has been saved.  @xref{Other Marks}.
4638
4639 @item i
4640 Score as a number (@pxref{Scoring}).
4641 @item z
4642 @vindex gnus-summary-zcore-fuzz
4643 Zcore, @samp{+} if above the default level and @samp{-} if below the
4644 default level.  If the difference between
4645 @code{gnus-summary-default-score} and the score is less than
4646 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4647 @item V
4648 Total thread score.
4649 @item x
4650 @code{Xref}.
4651 @item D
4652 @code{Date}.
4653 @item d
4654 The @code{Date} in @code{DD-MMM} format.
4655 @item o
4656 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4657 @item M
4658 @code{Message-ID}.
4659 @item r
4660 @code{References}.
4661 @item t
4662 Number of articles in the current sub-thread.  Using this spec will slow
4663 down summary buffer generation somewhat.
4664 @item e
4665 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4666 article has any children.
4667 @item P
4668 The line number.
4669 @item O
4670 Download mark.
4671 @item &user-date;
4672 Age sensitive date format.  Various date format is defined in
4673 @code{gnus-user-date-format-alist}.
4674 @item u
4675 User defined specifier.  The next character in the format string should
4676 be a letter.  Gnus will call the function
4677 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4678 following @samp{%u}.  The function will be passed the current header as
4679 argument.  The function should return a string, which will be inserted
4680 into the summary just like information from any other summary specifier.
4681 @end table
4682
4683 Text between @samp{%(} and @samp{%)} will be highlighted with
4684 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4685 There can only be one such area.
4686
4687 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4688 have to be handled with care.  For reasons of efficiency, Gnus will
4689 compute what column these characters will end up in, and ``hard-code''
4690 that.  This means that it is invalid to have these specs after a
4691 variable-length spec.  Well, you might not be arrested, but your summary
4692 buffer will look strange, which is bad enough.
4693
4694 The smart choice is to have these specs as far to the left as possible.
4695 (Isn't that the case with everything, though?  But I digress.)
4696
4697 This restriction may disappear in later versions of Gnus.
4698
4699
4700 @node To From Newsgroups
4701 @subsection To From Newsgroups
4702 @cindex To
4703 @cindex Newsgroups
4704
4705 In some groups (particularly in archive groups), the @code{From} header
4706 isn't very interesting, since all the articles there are written by
4707 you.  To display the information in the @code{To} or @code{Newsgroups}
4708 headers instead, you need to decide three things: What information to
4709 gather; where to display it; and when to display it.
4710
4711 @enumerate
4712 @item
4713 @vindex gnus-extra-headers
4714 The reading of extra header information is controlled by the
4715 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4716 instance:
4717
4718 @lisp
4719 (setq gnus-extra-headers
4720       '(To Newsgroups X-Newsreader))
4721 @end lisp
4722
4723 This will result in Gnus trying to obtain these three headers, and
4724 storing it in header structures for later easy retrieval.
4725
4726 @item
4727 @findex gnus-extra-header
4728 The value of these extra headers can be accessed via the
4729 @code{gnus-extra-header} function.  Here's a format line spec that will
4730 access the @code{X-Newsreader} header:
4731
4732 @example
4733 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4734 @end example
4735
4736 @item
4737 @vindex gnus-ignored-from-addresses
4738 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4739 summary line spec returns the @code{To}, @code{Newsreader} or
4740 @code{From} header.  If this regexp matches the contents of the
4741 @code{From} header, the value of the @code{To} or @code{Newsreader}
4742 headers are used instead.
4743
4744 @end enumerate
4745
4746 @vindex nnmail-extra-headers
4747 A related variable is @code{nnmail-extra-headers}, which controls when
4748 to include extra headers when generating overview (@acronym{NOV}) files.
4749 If you have old overview files, you should regenerate them after
4750 changing this variable, by entering the server buffer using @kbd{^},
4751 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4752 regeneration.
4753
4754 @vindex gnus-summary-line-format
4755 You also have to instruct Gnus to display the data by changing the
4756 @code{%n} spec to the @code{%f} spec in the
4757 @code{gnus-summary-line-format} variable.
4758
4759 In summary, you'd typically put something like the following in
4760 @file{~/.gnus.el}:
4761
4762 @lisp
4763 (setq gnus-extra-headers
4764       '(To Newsgroups))
4765 (setq nnmail-extra-headers gnus-extra-headers)
4766 (setq gnus-summary-line-format
4767       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4768 (setq gnus-ignored-from-addresses
4769       "Your Name Here")
4770 @end lisp
4771
4772 (The values listed above are the default values in Gnus.  Alter them
4773 to fit your needs.)
4774
4775 A note for news server administrators, or for users who wish to try to
4776 convince their news server administrator to provide some additional
4777 support:
4778
4779 The above is mostly useful for mail groups, where you have control over
4780 the @acronym{NOV} files that are created.  However, if you can persuade your
4781 nntp admin to add (in the usual implementation, notably INN):
4782
4783 @example
4784 Newsgroups:full
4785 @end example
4786
4787 to the end of her @file{overview.fmt} file, then you can use that just
4788 as you would the extra headers from the mail groups.
4789
4790
4791 @node Summary Buffer Mode Line
4792 @subsection Summary Buffer Mode Line
4793
4794 @vindex gnus-summary-mode-line-format
4795 You can also change the format of the summary mode bar (@pxref{Mode Line
4796 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4797 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4798
4799 Here are the elements you can play with:
4800
4801 @table @samp
4802 @item G
4803 Group name.
4804 @item p
4805 Unprefixed group name.
4806 @item A
4807 Current article number.
4808 @item z
4809 Current article score.
4810 @item V
4811 Gnus version.
4812 @item U
4813 Number of unread articles in this group.
4814 @item e
4815 Number of unread articles in this group that aren't displayed in the
4816 summary buffer.
4817 @item Z
4818 A string with the number of unread and unselected articles represented
4819 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4820 articles, and just as @samp{<%U more>} if there are just unread articles
4821 and no unselected ones.
4822 @item g
4823 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4824 shortened to @samp{r.a.anime}.
4825 @item S
4826 Subject of the current article.
4827 @item u
4828 User-defined spec (@pxref{User-Defined Specs}).
4829 @item s
4830 Name of the current score file (@pxref{Scoring}).
4831 @item d
4832 Number of dormant articles (@pxref{Unread Articles}).
4833 @item t
4834 Number of ticked articles (@pxref{Unread Articles}).
4835 @item r
4836 Number of articles that have been marked as read in this session.
4837 @item E
4838 Number of articles expunged by the score files.
4839 @end table
4840
4841
4842 @node Summary Highlighting
4843 @subsection Summary Highlighting
4844
4845 @table @code
4846
4847 @item gnus-visual-mark-article-hook
4848 @vindex gnus-visual-mark-article-hook
4849 This hook is run after selecting an article.  It is meant to be used for
4850 highlighting the article in some way.  It is not run if
4851 @code{gnus-visual} is @code{nil}.
4852
4853 @item gnus-summary-update-hook
4854 @vindex gnus-summary-update-hook
4855 This hook is called when a summary line is changed.  It is not run if
4856 @code{gnus-visual} is @code{nil}.
4857
4858 @item gnus-summary-selected-face
4859 @vindex gnus-summary-selected-face
4860 This is the face (or @dfn{font} as some people call it) used to
4861 highlight the current article in the summary buffer.
4862
4863 @item gnus-summary-highlight
4864 @vindex gnus-summary-highlight
4865 Summary lines are highlighted according to this variable, which is a
4866 list where the elements are of the format @code{(@var{form}
4867 . @var{face})}.  If you would, for instance, like ticked articles to be
4868 italic and high-scored articles to be bold, you could set this variable
4869 to something like
4870 @lisp
4871 (((eq mark gnus-ticked-mark) . italic)
4872  ((> score default) . bold))
4873 @end lisp
4874 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4875 @var{face} will be applied to the line.
4876 @end table
4877
4878
4879 @node Summary Maneuvering
4880 @section Summary Maneuvering
4881 @cindex summary movement
4882
4883 All the straight movement commands understand the numeric prefix and
4884 behave pretty much as you'd expect.
4885
4886 None of these commands select articles.
4887
4888 @table @kbd
4889 @item G M-n
4890 @itemx M-n
4891 @kindex M-n (Summary)
4892 @kindex G M-n (Summary)
4893 @findex gnus-summary-next-unread-subject
4894 Go to the next summary line of an unread article
4895 (@code{gnus-summary-next-unread-subject}).
4896
4897 @item G M-p
4898 @itemx M-p
4899 @kindex M-p (Summary)
4900 @kindex G M-p (Summary)
4901 @findex gnus-summary-prev-unread-subject
4902 Go to the previous summary line of an unread article
4903 (@code{gnus-summary-prev-unread-subject}).
4904
4905 @item G g
4906 @kindex G g (Summary)
4907 @findex gnus-summary-goto-subject
4908 Ask for an article number and then go to the summary line of that article
4909 without displaying the article (@code{gnus-summary-goto-subject}).
4910 @end table
4911
4912 If Gnus asks you to press a key to confirm going to the next group, you
4913 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4914 buffer, searching for the next group to read without actually returning
4915 to the group buffer.
4916
4917 Variables related to summary movement:
4918
4919 @table @code
4920
4921 @vindex gnus-auto-select-next
4922 @item gnus-auto-select-next
4923 If you issue one of the movement commands (like @kbd{n}) and there are
4924 no more unread articles after the current one, Gnus will offer to go to
4925 the next group.  If this variable is @code{t} and the next group is
4926 empty, Gnus will exit summary mode and return to the group buffer.  If
4927 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4928 next group with unread articles.  As a special case, if this variable
4929 is @code{quietly}, Gnus will select the next group without asking for
4930 confirmation.  If this variable is @code{almost-quietly}, the same
4931 will happen only if you are located on the last article in the group.
4932 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4933 command will go to the next group without confirmation.  Also
4934 @pxref{Group Levels}.
4935
4936 @item gnus-auto-select-same
4937 @vindex gnus-auto-select-same
4938 If non-@code{nil}, all the movement commands will try to go to the next
4939 article with the same subject as the current.  (@dfn{Same} here might
4940 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4941 for details (@pxref{Customizing Threading}).)  If there are no more
4942 articles with the same subject, go to the first unread article.
4943
4944 This variable is not particularly useful if you use a threaded display.
4945
4946 @item gnus-summary-check-current
4947 @vindex gnus-summary-check-current
4948 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4949 to the next (or previous) article if the current article is unread.
4950 Instead, they will choose the current article.
4951
4952 @item gnus-auto-center-summary
4953 @vindex gnus-auto-center-summary
4954 If non-@code{nil}, Gnus will keep the point in the summary buffer
4955 centered at all times.  This makes things quite tidy, but if you have a
4956 slow network connection, or simply do not like this un-Emacsism, you can
4957 set this variable to @code{nil} to get the normal Emacs scrolling
4958 action.  This will also inhibit horizontal re-centering of the summary
4959 buffer, which might make it more inconvenient to read extremely long
4960 threads.
4961
4962 This variable can also be a number.  In that case, center the window at
4963 the given number of lines from the top.
4964
4965 @end table
4966
4967
4968 @node Choosing Articles
4969 @section Choosing Articles
4970 @cindex selecting articles
4971
4972 @menu
4973 * Choosing Commands::           Commands for choosing articles.
4974 * Choosing Variables::          Variables that influence these commands.
4975 @end menu
4976
4977
4978 @node Choosing Commands
4979 @subsection Choosing Commands
4980
4981 None of the following movement commands understand the numeric prefix,
4982 and they all select and display an article.
4983
4984 If you want to fetch new articles or redisplay the group, see
4985 @ref{Exiting the Summary Buffer}.
4986
4987 @table @kbd
4988 @item SPACE
4989 @kindex SPACE (Summary)
4990 @findex gnus-summary-next-page
4991 Select the current article, or, if that one's read already, the next
4992 unread article (@code{gnus-summary-next-page}).
4993
4994 If you have an article window open already and you press @kbd{SPACE}
4995 again, the article will be scrolled.  This lets you conveniently
4996 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4997
4998 @item G n
4999 @itemx n
5000 @kindex n (Summary)
5001 @kindex G n (Summary)
5002 @findex gnus-summary-next-unread-article
5003 @c @icon{gnus-summary-next-unread}
5004 Go to next unread article (@code{gnus-summary-next-unread-article}).
5005
5006 @item G p
5007 @itemx p
5008 @kindex p (Summary)
5009 @findex gnus-summary-prev-unread-article
5010 @c @icon{gnus-summary-prev-unread}
5011 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5012
5013 @item G N
5014 @itemx N
5015 @kindex N (Summary)
5016 @kindex G N (Summary)
5017 @findex gnus-summary-next-article
5018 Go to the next article (@code{gnus-summary-next-article}).
5019
5020 @item G P
5021 @itemx P
5022 @kindex P (Summary)
5023 @kindex G P (Summary)
5024 @findex gnus-summary-prev-article
5025 Go to the previous article (@code{gnus-summary-prev-article}).
5026
5027 @item G C-n
5028 @kindex G C-n (Summary)
5029 @findex gnus-summary-next-same-subject
5030 Go to the next article with the same subject
5031 (@code{gnus-summary-next-same-subject}).
5032
5033 @item G C-p
5034 @kindex G C-p (Summary)
5035 @findex gnus-summary-prev-same-subject
5036 Go to the previous article with the same subject
5037 (@code{gnus-summary-prev-same-subject}).
5038
5039 @item G f
5040 @itemx .
5041 @kindex G f  (Summary)
5042 @kindex .  (Summary)
5043 @findex gnus-summary-first-unread-article
5044 Go to the first unread article
5045 (@code{gnus-summary-first-unread-article}).
5046
5047 @item G b
5048 @itemx ,
5049 @kindex G b (Summary)
5050 @kindex , (Summary)
5051 @findex gnus-summary-best-unread-article
5052 Go to the unread article with the highest score
5053 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5054 go to the first unread article that has a score over the default score.
5055
5056 @item G l
5057 @itemx l
5058 @kindex l (Summary)
5059 @kindex G l (Summary)
5060 @findex gnus-summary-goto-last-article
5061 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5062
5063 @item G o
5064 @kindex G o (Summary)
5065 @findex gnus-summary-pop-article
5066 @cindex history
5067 @cindex article history
5068 Pop an article off the summary history and go to this article
5069 (@code{gnus-summary-pop-article}).  This command differs from the
5070 command above in that you can pop as many previous articles off the
5071 history as you like, while @kbd{l} toggles the two last read articles.
5072 For a somewhat related issue (if you use these commands a lot),
5073 @pxref{Article Backlog}.
5074
5075 @item G j
5076 @itemx j
5077 @kindex j (Summary)
5078 @kindex G j (Summary)
5079 @findex gnus-summary-goto-article
5080 Ask for an article number or @code{Message-ID}, and then go to that
5081 article (@code{gnus-summary-goto-article}).
5082
5083 @end table
5084
5085
5086 @node Choosing Variables
5087 @subsection Choosing Variables
5088
5089 Some variables relevant for moving and selecting articles:
5090
5091 @table @code
5092 @item gnus-auto-extend-newsgroup
5093 @vindex gnus-auto-extend-newsgroup
5094 All the movement commands will try to go to the previous (or next)
5095 article, even if that article isn't displayed in the Summary buffer if
5096 this variable is non-@code{nil}.  Gnus will then fetch the article from
5097 the server and display it in the article buffer.
5098
5099 @item gnus-select-article-hook
5100 @vindex gnus-select-article-hook
5101 This hook is called whenever an article is selected.  By default it
5102 exposes any threads hidden under the selected article.  If you would
5103 like each article to be saved in the Agent as you read it, putting
5104 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5105
5106 @item gnus-mark-article-hook
5107 @vindex gnus-mark-article-hook
5108 @findex gnus-summary-mark-unread-as-read
5109 @findex gnus-summary-mark-read-and-unread-as-read
5110 @findex gnus-unread-mark
5111 This hook is called whenever an article is selected.  It is intended to
5112 be used for marking articles as read.  The default value is
5113 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5114 mark of almost any article you read to @code{gnus-unread-mark}.  The
5115 only articles not affected by this function are ticked, dormant, and
5116 expirable articles.  If you'd instead like to just have unread articles
5117 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5118 instead.  It will leave marks like @code{gnus-low-score-mark},
5119 @code{gnus-del-mark} (and so on) alone.
5120
5121 @end table
5122
5123
5124 @node Paging the Article
5125 @section Scrolling the Article
5126 @cindex article scrolling
5127
5128 @table @kbd
5129
5130 @item SPACE
5131 @kindex SPACE (Summary)
5132 @findex gnus-summary-next-page
5133 Pressing @kbd{SPACE} will scroll the current article forward one page,
5134 or, if you have come to the end of the current article, will choose the
5135 next article (@code{gnus-summary-next-page}).
5136
5137 @vindex gnus-article-boring-faces
5138 @vindex gnus-article-skip-boring
5139 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5140 the article consists only of citations and signature, then it will be
5141 skipped; the next article will be shown instead.  You can customize
5142 what is considered uninteresting with
5143 @code{gnus-article-boring-faces}.  You can manually view the article's
5144 pages, no matter how boring, using @kbd{C-M-v}.
5145
5146 @item DEL
5147 @kindex DEL (Summary)
5148 @findex gnus-summary-prev-page
5149 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5150
5151 @item RET
5152 @kindex RET (Summary)
5153 @findex gnus-summary-scroll-up
5154 Scroll the current article one line forward
5155 (@code{gnus-summary-scroll-up}).
5156
5157 @item M-RET
5158 @kindex M-RET (Summary)
5159 @findex gnus-summary-scroll-down
5160 Scroll the current article one line backward
5161 (@code{gnus-summary-scroll-down}).
5162
5163 @item A g
5164 @itemx g
5165 @kindex A g (Summary)
5166 @kindex g (Summary)
5167 @findex gnus-summary-show-article
5168 @vindex gnus-summary-show-article-charset-alist
5169 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5170 given a prefix, fetch the current article, but don't run any of the
5171 article treatment functions.  This will give you a ``raw'' article, just
5172 the way it came from the server.
5173
5174 If given a numerical prefix, you can do semi-manual charset stuff.
5175 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5176 encoded in the @code{cn-gb-2312} charset.  If you have
5177
5178 @lisp
5179 (setq gnus-summary-show-article-charset-alist
5180       '((1 . cn-gb-2312)
5181         (2 . big5)))
5182 @end lisp
5183
5184 then you can say @kbd{C-u 1 g} to get the same effect.
5185
5186 @item A <
5187 @itemx <
5188 @kindex < (Summary)
5189 @kindex A < (Summary)
5190 @findex gnus-summary-beginning-of-article
5191 Scroll to the beginning of the article
5192 (@code{gnus-summary-beginning-of-article}).
5193
5194 @item A >
5195 @itemx >
5196 @kindex > (Summary)
5197 @kindex A > (Summary)
5198 @findex gnus-summary-end-of-article
5199 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5200
5201 @item A s
5202 @itemx s
5203 @kindex A s (Summary)
5204 @kindex s (Summary)
5205 @findex gnus-summary-isearch-article
5206 Perform an isearch in the article buffer
5207 (@code{gnus-summary-isearch-article}).
5208
5209 @item h
5210 @kindex h (Summary)
5211 @findex gnus-summary-select-article-buffer
5212 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5213
5214 @end table
5215
5216
5217 @node Reply Followup and Post
5218 @section Reply, Followup and Post
5219
5220 @menu
5221 * Summary Mail Commands::       Sending mail.
5222 * Summary Post Commands::       Sending news.
5223 * Summary Message Commands::    Other Message-related commands.
5224 * Canceling and Superseding::
5225 @end menu
5226
5227
5228 @node Summary Mail Commands
5229 @subsection Summary Mail Commands
5230 @cindex mail
5231 @cindex composing mail
5232
5233 Commands for composing a mail message:
5234
5235 @table @kbd
5236
5237 @item S r
5238 @itemx r
5239 @kindex S r (Summary)
5240 @kindex r (Summary)
5241 @findex gnus-summary-reply
5242 @c @icon{gnus-summary-mail-reply}
5243 @c @icon{gnus-summary-reply}
5244 Mail a reply to the author of the current article
5245 (@code{gnus-summary-reply}).
5246
5247 @item S R
5248 @itemx R
5249 @kindex R (Summary)
5250 @kindex S R (Summary)
5251 @findex gnus-summary-reply-with-original
5252 @c @icon{gnus-summary-reply-with-original}
5253 Mail a reply to the author of the current article and include the
5254 original message (@code{gnus-summary-reply-with-original}).  This
5255 command uses the process/prefix convention.
5256
5257 @item S w
5258 @kindex S w (Summary)
5259 @findex gnus-summary-wide-reply
5260 Mail a wide reply to the author of the current article
5261 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5262 goes out to all people listed in the @code{To}, @code{From} (or
5263 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5264 present, that's used instead.
5265
5266 @item S W
5267 @kindex S W (Summary)
5268 @findex gnus-summary-wide-reply-with-original
5269 Mail a wide reply to the current article and include the original
5270 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5271 the process/prefix convention.
5272
5273 @item S v
5274 @kindex S v (Summary)
5275 @findex gnus-summary-very-wide-reply
5276 Mail a very wide reply to the author of the current article
5277 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5278 that goes out to all people listed in the @code{To}, @code{From} (or
5279 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5280 articles.  This command uses the process/prefix convention.
5281
5282 @item S V
5283 @kindex S V (Summary)
5284 @findex gnus-summary-very-wide-reply-with-original
5285 Mail a very wide reply to the author of the current article and include the
5286 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5287 command uses the process/prefix convention.
5288
5289 @item S B r
5290 @kindex S B r (Summary)
5291 @findex gnus-summary-reply-broken-reply-to
5292 Mail a reply to the author of the current article but ignore the
5293 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5294 If you need this because a mailing list incorrectly sets a
5295 @code{Reply-To} header pointing to the list, you probably want to set
5296 the @code{broken-reply-to} group parameter instead, so things will work
5297 correctly.  @xref{Group Parameters}.
5298
5299 @item S B R
5300 @kindex S B R (Summary)
5301 @findex gnus-summary-reply-broken-reply-to-with-original
5302 Mail a reply to the author of the current article and include the
5303 original message but ignore the @code{Reply-To} field
5304 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5305
5306 @item S o m
5307 @itemx C-c C-f
5308 @kindex S o m (Summary)
5309 @kindex C-c C-f (Summary)
5310 @findex gnus-summary-mail-forward
5311 @c @icon{gnus-summary-mail-forward}
5312 Forward the current article to some other person
5313 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5314 is forwarded according to the value of (@code{message-forward-as-mime})
5315 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5316 message and forward directly inline; if the prefix is 2, forward message
5317 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5318 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5319 directly inline; otherwise, the message is forwarded as no prefix given
5320 but use the flipped value of (@code{message-forward-as-mime}).  By
5321 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5322 section.
5323
5324 @item S m
5325 @itemx m
5326 @kindex m (Summary)
5327 @kindex S m (Summary)
5328 @findex gnus-summary-mail-other-window
5329 @c @icon{gnus-summary-mail-originate}
5330 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5331 the posting style of the current group.  If given a prefix, disable that.
5332 If the prefix is 1, prompt for a group name to find the posting style.
5333
5334 @item S i
5335 @itemx i
5336 @kindex i (Summary)
5337 @kindex S i (Summary)
5338 @findex gnus-summary-news-other-window
5339 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5340 post to the current group.  If given a prefix, disable that.  If the
5341 prefix is 1, prompt for a group to post to.
5342
5343 This function actually prepares a news even when using mail groups.
5344 This is useful for ``posting'' messages to mail groups without actually
5345 sending them over the network: they're just saved directly to the group
5346 in question.  The corresponding back end must have a request-post method
5347 for this to work though.
5348
5349 @item S D b
5350 @kindex S D b (Summary)
5351 @findex gnus-summary-resend-bounced-mail
5352 @cindex bouncing mail
5353 If you have sent a mail, but the mail was bounced back to you for some
5354 reason (wrong address, transient failure), you can use this command to
5355 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5356 will be popped into a mail buffer where you can edit the headers before
5357 sending the mail off again.  If you give a prefix to this command, and
5358 the bounced mail is a reply to some other mail, Gnus will try to fetch
5359 that mail and display it for easy perusal of its headers.  This might
5360 very well fail, though.
5361
5362 @item S D r
5363 @kindex S D r (Summary)
5364 @findex gnus-summary-resend-message
5365 Not to be confused with the previous command,
5366 @code{gnus-summary-resend-message} will prompt you for an address to
5367 send the current message off to, and then send it to that place.  The
5368 headers of the message won't be altered---but lots of headers that say
5369 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5370 means that you actually send a mail to someone that has a @code{To}
5371 header that (probably) points to yourself.  This will confuse people.
5372 So, natcherly you'll only do that if you're really eVIl.
5373
5374 This command is mainly used if you have several accounts and want to
5375 ship a mail to a different account of yours.  (If you're both
5376 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5377 to the @code{root} account, you may want to resend it to
5378 @code{postmaster}.  Ordnung muss sein!
5379
5380 This command understands the process/prefix convention
5381 (@pxref{Process/Prefix}).
5382
5383 @item S D e
5384 @kindex S D e (Summary)
5385 @findex gnus-summary-resend-message-edit
5386
5387 Like the previous command, but will allow you to edit the message as
5388 if it were a new message before resending.
5389
5390 @item S O m
5391 @kindex S O m (Summary)
5392 @findex gnus-uu-digest-mail-forward
5393 Digest the current series (@pxref{Decoding Articles}) and forward the
5394 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5395 uses the process/prefix convention (@pxref{Process/Prefix}).
5396
5397 @item S M-c
5398 @kindex S M-c (Summary)
5399 @findex gnus-summary-mail-crosspost-complaint
5400 @cindex crossposting
5401 @cindex excessive crossposting
5402 Send a complaint about excessive crossposting to the author of the
5403 current article (@code{gnus-summary-mail-crosspost-complaint}).
5404
5405 @findex gnus-crosspost-complaint
5406 This command is provided as a way to fight back against the current
5407 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5408 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5409 command understands the process/prefix convention
5410 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5411
5412 @end table
5413
5414 Also @xref{Header Commands, ,Header Commands, message, The Message
5415 Manual}, for more information.
5416
5417
5418 @node Summary Post Commands
5419 @subsection Summary Post Commands
5420 @cindex post
5421 @cindex composing news
5422
5423 Commands for posting a news article:
5424
5425 @table @kbd
5426 @item S p
5427 @itemx a
5428 @kindex a (Summary)
5429 @kindex S p (Summary)
5430 @findex gnus-summary-post-news
5431 @c @icon{gnus-summary-post-news}
5432 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5433 default, post to the current group.  If given a prefix, disable that.
5434 If the prefix is 1, prompt for another group instead.
5435
5436 @item S f
5437 @itemx f
5438 @kindex f (Summary)
5439 @kindex S f (Summary)
5440 @findex gnus-summary-followup
5441 @c @icon{gnus-summary-followup}
5442 Post a followup to the current article (@code{gnus-summary-followup}).
5443
5444 @item S F
5445 @itemx F
5446 @kindex S F (Summary)
5447 @kindex F (Summary)
5448 @c @icon{gnus-summary-followup-with-original}
5449 @findex gnus-summary-followup-with-original
5450 Post a followup to the current article and include the original message
5451 (@code{gnus-summary-followup-with-original}).  This command uses the
5452 process/prefix convention.
5453
5454 @item S n
5455 @kindex S n (Summary)
5456 @findex gnus-summary-followup-to-mail
5457 Post a followup to the current article via news, even if you got the
5458 message through mail (@code{gnus-summary-followup-to-mail}).
5459
5460 @item S N
5461 @kindex S N (Summary)
5462 @findex gnus-summary-followup-to-mail-with-original
5463 Post a followup to the current article via news, even if you got the
5464 message through mail and include the original message
5465 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5466 the process/prefix convention.
5467
5468 @item S o p
5469 @kindex S o p (Summary)
5470 @findex gnus-summary-post-forward
5471 Forward the current article to a newsgroup
5472 (@code{gnus-summary-post-forward}).
5473  If no prefix is given, the message is forwarded according to the value
5474 of (@code{message-forward-as-mime}) and
5475 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5476 message and forward directly inline; if the prefix is 2, forward message
5477 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5478 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5479 directly inline; otherwise, the message is forwarded as no prefix given
5480 but use the flipped value of (@code{message-forward-as-mime}).  By
5481 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5482
5483 @item S O p
5484 @kindex S O p (Summary)
5485 @findex gnus-uu-digest-post-forward
5486 @cindex digests
5487 @cindex making digests
5488 Digest the current series and forward the result to a newsgroup
5489 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5490 process/prefix convention.
5491
5492 @item S u
5493 @kindex S u (Summary)
5494 @findex gnus-uu-post-news
5495 @c @icon{gnus-uu-post-news}
5496 Uuencode a file, split it into parts, and post it as a series
5497 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5498 @end table
5499
5500 Also @xref{Header Commands, ,Header Commands, message, The Message
5501 Manual}, for more information.
5502
5503
5504 @node Summary Message Commands
5505 @subsection Summary Message Commands
5506
5507 @table @kbd
5508 @item S y
5509 @kindex S y (Summary)
5510 @findex gnus-summary-yank-message
5511 Yank the current article into an already existing Message composition
5512 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5513 what message buffer you want to yank into, and understands the
5514 process/prefix convention (@pxref{Process/Prefix}).
5515
5516 @end table
5517
5518
5519 @node Canceling and Superseding
5520 @subsection Canceling Articles
5521 @cindex canceling articles
5522 @cindex superseding articles
5523
5524 Have you ever written something, and then decided that you really,
5525 really, really wish you hadn't posted that?
5526
5527 Well, you can't cancel mail, but you can cancel posts.
5528
5529 @findex gnus-summary-cancel-article
5530 @kindex C (Summary)
5531 @c @icon{gnus-summary-cancel-article}
5532 Find the article you wish to cancel (you can only cancel your own
5533 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5534 c} (@code{gnus-summary-cancel-article}).  Your article will be
5535 canceled---machines all over the world will be deleting your article.
5536 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5537
5538 Be aware, however, that not all sites honor cancels, so your article may
5539 live on here and there, while most sites will delete the article in
5540 question.
5541
5542 Gnus will use the ``current'' select method when canceling.  If you
5543 want to use the standard posting method, use the @samp{a} symbolic
5544 prefix (@pxref{Symbolic Prefixes}).
5545
5546 Gnus ensures that only you can cancel your own messages using a
5547 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5548 message, Message Manual}).
5549
5550 If you discover that you have made some mistakes and want to do some
5551 corrections, you can post a @dfn{superseding} article that will replace
5552 your original article.
5553
5554 @findex gnus-summary-supersede-article
5555 @kindex S (Summary)
5556 Go to the original article and press @kbd{S s}
5557 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5558 where you can edit the article all you want before sending it off the
5559 usual way.
5560
5561 The same goes for superseding as for canceling, only more so: Some
5562 sites do not honor superseding.  On those sites, it will appear that you
5563 have posted almost the same article twice.
5564
5565 If you have just posted the article, and change your mind right away,
5566 there is a trick you can use to cancel/supersede the article without
5567 waiting for the article to appear on your site first.  You simply return
5568 to the post buffer (which is called @code{*sent ...*}).  There you will
5569 find the article you just posted, with all the headers intact.  Change
5570 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5571 header by substituting one of those words for the word
5572 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5573 you would do normally.  The previous article will be
5574 canceled/superseded.
5575
5576 Just remember, kids: There is no 'c' in 'supersede'.
5577
5578 @node Delayed Articles
5579 @section Delayed Articles
5580 @cindex delayed sending
5581 @cindex send delayed
5582
5583 Sometimes, you might wish to delay the sending of a message.  For
5584 example, you might wish to arrange for a message to turn up just in time
5585 to remind your about the birthday of your Significant Other.  For this,
5586 there is the @code{gnus-delay} package.  Setup is simple:
5587
5588 @lisp
5589 (gnus-delay-initialize)
5590 @end lisp
5591
5592 @findex gnus-delay-article
5593 Normally, to send a message you use the @kbd{C-c C-c} command from
5594 Message mode.  To delay a message, use @kbd{C-c C-j}
5595 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5596 message should be delayed.  Possible answers are:
5597
5598 @itemize @bullet
5599 @item
5600 A time span.  Consists of an integer and a letter.  For example,
5601 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5602 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5603 (months) and @code{Y} (years).
5604
5605 @item
5606 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5607 delayed until that day, at a specific time (eight o'clock by default).
5608 See also @code{gnus-delay-default-hour}.
5609
5610 @item
5611 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5612 stuff.  The deadline will be at that time today, except if that time has
5613 already passed, then it's at the given time tomorrow.  So if it's ten
5614 o'clock in the morning and you specify @code{11:15}, then the deadline
5615 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5616 that means a time tomorrow.
5617 @end itemize
5618
5619 The action of the @code{gnus-delay-article} command is influenced by a
5620 couple of variables:
5621
5622 @table @code
5623 @item gnus-delay-default-hour
5624 @vindex gnus-delay-default-hour
5625 When you specify a specific date, the message will be due on that hour
5626 on the given date.  Possible values are integers 0 through 23.
5627
5628 @item gnus-delay-default-delay
5629 @vindex gnus-delay-default-delay
5630 This is a string and gives the default delay.  It can be of any of the
5631 formats described above.
5632
5633 @item gnus-delay-group
5634 @vindex gnus-delay-group
5635 Delayed articles will be kept in this group on the drafts server until
5636 they are due.  You probably don't need to change this.  The default
5637 value is @code{"delayed"}.
5638
5639 @item gnus-delay-header
5640 @vindex gnus-delay-header
5641 The deadline for each article will be stored in a header.  This variable
5642 is a string and gives the header name.  You probably don't need to
5643 change this.  The default value is @code{"X-Gnus-Delayed"}.
5644 @end table
5645
5646 The way delaying works is like this: when you use the
5647 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5648 calculates the deadline of the message and stores it in the
5649 @code{X-Gnus-Delayed} header and puts the message in the
5650 @code{nndraft:delayed} group.
5651
5652 @findex gnus-delay-send-queue
5653 And whenever you get new news, Gnus looks through the group for articles
5654 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5655 function for this.  By default, this function is added to the hook
5656 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5657 Maybe you want to use the demon to send drafts?  Just tell the demon to
5658 execute the @code{gnus-delay-send-queue} function.
5659
5660 @table @code
5661 @item gnus-delay-initialize
5662 @findex gnus-delay-initialize
5663 By default, this function installs @code{gnus-delay-send-queue} in
5664 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5665 argument @code{no-check}.  If it is non-@code{nil},
5666 @code{gnus-get-new-news-hook} is not changed.  The optional first
5667 argument is ignored.
5668
5669 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5670 Presumably, you want to use the demon for sending due delayed articles.
5671 Just don't forget to set that up :-)
5672 @end table
5673
5674
5675 @node Marking Articles
5676 @section Marking Articles
5677 @cindex article marking
5678 @cindex article ticking
5679 @cindex marks
5680
5681 There are several marks you can set on an article.
5682
5683 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5684 neologism ohoy!) of the article.  Alphabetic marks generally mean
5685 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5686
5687 In addition, you also have marks that do not affect readedness.
5688
5689 @ifinfo
5690 There's a plethora of commands for manipulating these marks.
5691 @end ifinfo
5692
5693 @menu
5694 * Unread Articles::             Marks for unread articles.
5695 * Read Articles::               Marks for read articles.
5696 * Other Marks::                 Marks that do not affect readedness.
5697 * Setting Marks::               How to set and remove marks.
5698 * Generic Marking Commands::    How to customize the marking.
5699 * Setting Process Marks::       How to mark articles for later processing.
5700 @end menu
5701
5702
5703 @node Unread Articles
5704 @subsection Unread Articles
5705
5706 The following marks mark articles as (kinda) unread, in one form or
5707 other.
5708
5709 @table @samp
5710 @item !
5711 @vindex gnus-ticked-mark
5712 Marked as ticked (@code{gnus-ticked-mark}).
5713
5714 @dfn{Ticked articles} are articles that will remain visible always.  If
5715 you see an article that you find interesting, or you want to put off
5716 reading it, or replying to it, until sometime later, you'd typically
5717 tick it.  However, articles can be expired (from news servers by the
5718 news server software, Gnus itself never expires ticked messages), so if
5719 you want to keep an article forever, you'll have to make it persistent
5720 (@pxref{Persistent Articles}).
5721
5722 @item ?
5723 @vindex gnus-dormant-mark
5724 Marked as dormant (@code{gnus-dormant-mark}).
5725
5726 @dfn{Dormant articles} will only appear in the summary buffer if there
5727 are followups to it.  If you want to see them even if they don't have
5728 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5729 Otherwise (except for the visibility issue), they are just like ticked
5730 messages.
5731
5732 @item SPACE
5733 @vindex gnus-unread-mark
5734 Marked as unread (@code{gnus-unread-mark}).
5735
5736 @dfn{Unread articles} are articles that haven't been read at all yet.
5737 @end table
5738
5739
5740 @node Read Articles
5741 @subsection Read Articles
5742 @cindex expirable mark
5743
5744 All the following marks mark articles as read.
5745
5746 @table @samp
5747
5748 @item r
5749 @vindex gnus-del-mark
5750 These are articles that the user has marked as read with the @kbd{d}
5751 command manually, more or less (@code{gnus-del-mark}).
5752
5753 @item R
5754 @vindex gnus-read-mark
5755 Articles that have actually been read (@code{gnus-read-mark}).
5756
5757 @item O
5758 @vindex gnus-ancient-mark
5759 Articles that were marked as read in previous sessions and are now
5760 @dfn{old} (@code{gnus-ancient-mark}).
5761
5762 @item K
5763 @vindex gnus-killed-mark
5764 Marked as killed (@code{gnus-killed-mark}).
5765
5766 @item X
5767 @vindex gnus-kill-file-mark
5768 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5769
5770 @item Y
5771 @vindex gnus-low-score-mark
5772 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5773
5774 @item C
5775 @vindex gnus-catchup-mark
5776 Marked as read by a catchup (@code{gnus-catchup-mark}).
5777
5778 @item G
5779 @vindex gnus-canceled-mark
5780 Canceled article (@code{gnus-canceled-mark})
5781
5782 @item F
5783 @vindex gnus-souped-mark
5784 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5785
5786 @item Q
5787 @vindex gnus-sparse-mark
5788 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5789 Threading}.
5790
5791 @item M
5792 @vindex gnus-duplicate-mark
5793 Article marked as read by duplicate suppression
5794 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5795
5796 @end table
5797
5798 All these marks just mean that the article is marked as read, really.
5799 They are interpreted differently when doing adaptive scoring, though.
5800
5801 One more special mark, though:
5802
5803 @table @samp
5804 @item E
5805 @vindex gnus-expirable-mark
5806 Marked as expirable (@code{gnus-expirable-mark}).
5807
5808 Marking articles as @dfn{expirable} (or have them marked as such
5809 automatically) doesn't make much sense in normal groups---a user doesn't
5810 control expiring of news articles, but in mail groups, for instance,
5811 articles marked as @dfn{expirable} can be deleted by Gnus at
5812 any time.
5813 @end table
5814
5815
5816 @node Other Marks
5817 @subsection Other Marks
5818 @cindex process mark
5819 @cindex bookmarks
5820
5821 There are some marks that have nothing to do with whether the article is
5822 read or not.
5823
5824 @itemize @bullet
5825
5826 @item
5827 You can set a bookmark in the current article.  Say you are reading a
5828 long thesis on cats' urinary tracts, and have to go home for dinner
5829 before you've finished reading the thesis.  You can then set a bookmark
5830 in the article, and Gnus will jump to this bookmark the next time it
5831 encounters the article.  @xref{Setting Marks}.
5832
5833 @item
5834 @vindex gnus-replied-mark
5835 All articles that you have replied to or made a followup to (i.e., have
5836 answered) will be marked with an @samp{A} in the second column
5837 (@code{gnus-replied-mark}).
5838
5839 @item
5840 @vindex gnus-forwarded-mark
5841 All articles that you have forwarded will be marked with an @samp{F} in
5842 the second column (@code{gnus-forwarded-mark}).
5843
5844 @item
5845 @vindex gnus-cached-mark
5846 Articles stored in the article cache will be marked with an @samp{*} in
5847 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5848
5849 @item
5850 @vindex gnus-saved-mark
5851 Articles ``saved'' (in some manner or other; not necessarily
5852 religiously) are marked with an @samp{S} in the second column
5853 (@code{gnus-saved-mark}).
5854
5855 @item
5856 @vindex gnus-recent-mark
5857 Articles that according to the server haven't been shown to the user
5858 before are marked with a @samp{N} in the second column
5859 (@code{gnus-recent-mark}).  Note that not all servers support this
5860 mark, in which case it simply never appears.  Compare with
5861 @code{gnus-unseen-mark}.
5862
5863 @item
5864 @vindex gnus-unseen-mark
5865 Articles that haven't been seen before in Gnus by the user are marked
5866 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5867 Compare with @code{gnus-recent-mark}.
5868
5869 @item
5870 @vindex gnus-downloaded-mark
5871 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5872 downloaded for unplugged (offline) viewing.  If you are using the
5873 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5874 (The variable @code{gnus-downloaded-mark} controls which character to
5875 use.)
5876
5877 @item
5878 @vindex gnus-undownloaded-mark
5879 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5880 not have been downloaded.  Such articles cannot be viewed while you
5881 are unplugged (offline).  If you are using the @samp{%O} spec, these
5882 articles get the @samp{-} mark in that spec.  (The variable
5883 @code{gnus-undownloaded-mark} controls which character to use.)
5884
5885 @item
5886 @vindex gnus-downloadable-mark
5887 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5888 automatically, but it is also possible to explicitly mark articles for
5889 download, even if they would not be downloaded automatically.  Such
5890 explicitly-marked articles get the @samp{%} mark in the first column.
5891 (The variable @code{gnus-downloadable-mark} controls which character to
5892 use.)
5893
5894 @item
5895 @vindex gnus-not-empty-thread-mark
5896 @vindex gnus-empty-thread-mark
5897 If the @samp{%e} spec is used, the presence of threads or not will be
5898 marked with @code{gnus-not-empty-thread-mark} and
5899 @code{gnus-empty-thread-mark} in the third column, respectively.
5900
5901 @item
5902 @vindex gnus-process-mark
5903 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5904 variety of commands react to the presence of the process mark.  For
5905 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5906 all articles that have been marked with the process mark.  Articles
5907 marked with the process mark have a @samp{#} in the second column.
5908
5909 @end itemize
5910
5911 You might have noticed that most of these ``non-readedness'' marks
5912 appear in the second column by default.  So if you have a cached, saved,
5913 replied article that you have process-marked, what will that look like?
5914
5915 Nothing much.  The precedence rules go as follows: process -> cache ->
5916 replied -> saved.  So if the article is in the cache and is replied,
5917 you'll only see the cache mark and not the replied mark.
5918
5919
5920 @node Setting Marks
5921 @subsection Setting Marks
5922 @cindex setting marks
5923
5924 All the marking commands understand the numeric prefix.
5925
5926 @table @kbd
5927 @item M c
5928 @itemx M-u
5929 @kindex M c (Summary)
5930 @kindex M-u (Summary)
5931 @findex gnus-summary-clear-mark-forward
5932 @cindex mark as unread
5933 Clear all readedness-marks from the current article
5934 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5935 article as unread.
5936
5937 @item M t
5938 @itemx !
5939 @kindex ! (Summary)
5940 @kindex M t (Summary)
5941 @findex gnus-summary-tick-article-forward
5942 Tick the current article (@code{gnus-summary-tick-article-forward}).
5943 @xref{Article Caching}.
5944
5945 @item M ?
5946 @itemx ?
5947 @kindex ? (Summary)
5948 @kindex M ? (Summary)
5949 @findex gnus-summary-mark-as-dormant
5950 Mark the current article as dormant
5951 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5952
5953 @item M d
5954 @itemx d
5955 @kindex M d (Summary)
5956 @kindex d (Summary)
5957 @findex gnus-summary-mark-as-read-forward
5958 Mark the current article as read
5959 (@code{gnus-summary-mark-as-read-forward}).
5960
5961 @item D
5962 @kindex D (Summary)
5963 @findex gnus-summary-mark-as-read-backward
5964 Mark the current article as read and move point to the previous line
5965 (@code{gnus-summary-mark-as-read-backward}).
5966
5967 @item M k
5968 @itemx k
5969 @kindex k (Summary)
5970 @kindex M k (Summary)
5971 @findex gnus-summary-kill-same-subject-and-select
5972 Mark all articles that have the same subject as the current one as read,
5973 and then select the next unread article
5974 (@code{gnus-summary-kill-same-subject-and-select}).
5975
5976 @item M K
5977 @itemx C-k
5978 @kindex M K (Summary)
5979 @kindex C-k (Summary)
5980 @findex gnus-summary-kill-same-subject
5981 Mark all articles that have the same subject as the current one as read
5982 (@code{gnus-summary-kill-same-subject}).
5983
5984 @item M C
5985 @kindex M C (Summary)
5986 @findex gnus-summary-catchup
5987 @c @icon{gnus-summary-catchup}
5988 Mark all unread articles as read (@code{gnus-summary-catchup}).
5989
5990 @item M C-c
5991 @kindex M C-c (Summary)
5992 @findex gnus-summary-catchup-all
5993 Mark all articles in the group as read---even the ticked and dormant
5994 articles (@code{gnus-summary-catchup-all}).
5995
5996 @item M H
5997 @kindex M H (Summary)
5998 @findex gnus-summary-catchup-to-here
5999 Catchup the current group to point (before the point)
6000 (@code{gnus-summary-catchup-to-here}).
6001
6002 @item M h
6003 @kindex M h (Summary)
6004 @findex gnus-summary-catchup-from-here
6005 Catchup the current group from point (after the point)
6006 (@code{gnus-summary-catchup-from-here}).
6007
6008 @item C-w
6009 @kindex C-w (Summary)
6010 @findex gnus-summary-mark-region-as-read
6011 Mark all articles between point and mark as read
6012 (@code{gnus-summary-mark-region-as-read}).
6013
6014 @item M V k
6015 @kindex M V k (Summary)
6016 @findex gnus-summary-kill-below
6017 Kill all articles with scores below the default score (or below the
6018 numeric prefix) (@code{gnus-summary-kill-below}).
6019
6020 @item M e
6021 @itemx E
6022 @kindex M e (Summary)
6023 @kindex E (Summary)
6024 @findex gnus-summary-mark-as-expirable
6025 Mark the current article as expirable
6026 (@code{gnus-summary-mark-as-expirable}).
6027
6028 @item M b
6029 @kindex M b (Summary)
6030 @findex gnus-summary-set-bookmark
6031 Set a bookmark in the current article
6032 (@code{gnus-summary-set-bookmark}).
6033
6034 @item M B
6035 @kindex M B (Summary)
6036 @findex gnus-summary-remove-bookmark
6037 Remove the bookmark from the current article
6038 (@code{gnus-summary-remove-bookmark}).
6039
6040 @item M V c
6041 @kindex M V c (Summary)
6042 @findex gnus-summary-clear-above
6043 Clear all marks from articles with scores over the default score (or
6044 over the numeric prefix) (@code{gnus-summary-clear-above}).
6045
6046 @item M V u
6047 @kindex M V u (Summary)
6048 @findex gnus-summary-tick-above
6049 Tick all articles with scores over the default score (or over the
6050 numeric prefix) (@code{gnus-summary-tick-above}).
6051
6052 @item M V m
6053 @kindex M V m (Summary)
6054 @findex gnus-summary-mark-above
6055 Prompt for a mark, and mark all articles with scores over the default
6056 score (or over the numeric prefix) with this mark
6057 (@code{gnus-summary-clear-above}).
6058 @end table
6059
6060 @vindex gnus-summary-goto-unread
6061 The @code{gnus-summary-goto-unread} variable controls what action should
6062 be taken after setting a mark.  If non-@code{nil}, point will move to
6063 the next/previous unread article.  If @code{nil}, point will just move
6064 one line up or down.  As a special case, if this variable is
6065 @code{never}, all the marking commands as well as other commands (like
6066 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6067 The default is @code{t}.
6068
6069
6070 @node Generic Marking Commands
6071 @subsection Generic Marking Commands
6072
6073 Some people would like the command that ticks an article (@kbd{!}) go to
6074 the next article.  Others would like it to go to the next unread
6075 article.  Yet others would like it to stay on the current article.  And
6076 even though I haven't heard of anybody wanting it to go to the
6077 previous (unread) article, I'm sure there are people that want that as
6078 well.
6079
6080 Multiply these five behaviors with five different marking commands, and
6081 you get a potentially complex set of variable to control what each
6082 command should do.
6083
6084 To sidestep that mess, Gnus provides commands that do all these
6085 different things.  They can be found on the @kbd{M M} map in the summary
6086 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6087 to list in this manual.
6088
6089 While you can use these commands directly, most users would prefer
6090 altering the summary mode keymap.  For instance, if you would like the
6091 @kbd{!} command to go to the next article instead of the next unread
6092 article, you could say something like:
6093
6094 @lisp
6095 @group
6096 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6097 (defun my-alter-summary-map ()
6098   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6099 @end group
6100 @end lisp
6101
6102 @noindent
6103 or
6104
6105 @lisp
6106 (defun my-alter-summary-map ()
6107   (local-set-key "!" "MM!n"))
6108 @end lisp
6109
6110
6111 @node Setting Process Marks
6112 @subsection Setting Process Marks
6113 @cindex setting process marks
6114
6115 Process marks are displayed as @code{#} in the summary buffer, and are
6116 used for marking articles in such a way that other commands will
6117 process these articles.  For instance, if you process mark four
6118 articles and then use the @kbd{*} command, Gnus will enter these four
6119 commands into the cache.  For more information,
6120 @pxref{Process/Prefix}.
6121
6122 @table @kbd
6123
6124 @item M P p
6125 @itemx #
6126 @kindex # (Summary)
6127 @kindex M P p (Summary)
6128 @findex gnus-summary-mark-as-processable
6129 Mark the current article with the process mark
6130 (@code{gnus-summary-mark-as-processable}).
6131 @findex gnus-summary-unmark-as-processable
6132
6133 @item M P u
6134 @itemx M-#
6135 @kindex M P u (Summary)
6136 @kindex M-# (Summary)
6137 Remove the process mark, if any, from the current article
6138 (@code{gnus-summary-unmark-as-processable}).
6139
6140 @item M P U
6141 @kindex M P U (Summary)
6142 @findex gnus-summary-unmark-all-processable
6143 Remove the process mark from all articles
6144 (@code{gnus-summary-unmark-all-processable}).
6145
6146 @item M P i
6147 @kindex M P i (Summary)
6148 @findex gnus-uu-invert-processable
6149 Invert the list of process marked articles
6150 (@code{gnus-uu-invert-processable}).
6151
6152 @item M P R
6153 @kindex M P R (Summary)
6154 @findex gnus-uu-mark-by-regexp
6155 Mark articles that have a @code{Subject} header that matches a regular
6156 expression (@code{gnus-uu-mark-by-regexp}).
6157
6158 @item M P G
6159 @kindex M P G (Summary)
6160 @findex gnus-uu-unmark-by-regexp
6161 Unmark articles that have a @code{Subject} header that matches a regular
6162 expression (@code{gnus-uu-unmark-by-regexp}).
6163
6164 @item M P r
6165 @kindex M P r (Summary)
6166 @findex gnus-uu-mark-region
6167 Mark articles in region (@code{gnus-uu-mark-region}).
6168
6169 @item M P g
6170 @kindex M P g (Summary)
6171 @findex gnus-uu-unmark-region
6172 Unmark articles in region (@code{gnus-uu-unmark-region}).
6173
6174 @item M P t
6175 @kindex M P t (Summary)
6176 @findex gnus-uu-mark-thread
6177 Mark all articles in the current (sub)thread
6178 (@code{gnus-uu-mark-thread}).
6179
6180 @item M P T
6181 @kindex M P T (Summary)
6182 @findex gnus-uu-unmark-thread
6183 Unmark all articles in the current (sub)thread
6184 (@code{gnus-uu-unmark-thread}).
6185
6186 @item M P v
6187 @kindex M P v (Summary)
6188 @findex gnus-uu-mark-over
6189 Mark all articles that have a score above the prefix argument
6190 (@code{gnus-uu-mark-over}).
6191
6192 @item M P s
6193 @kindex M P s (Summary)
6194 @findex gnus-uu-mark-series
6195 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6196
6197 @item M P S
6198 @kindex M P S (Summary)
6199 @findex gnus-uu-mark-sparse
6200 Mark all series that have already had some articles marked
6201 (@code{gnus-uu-mark-sparse}).
6202
6203 @item M P a
6204 @kindex M P a (Summary)
6205 @findex gnus-uu-mark-all
6206 Mark all articles in series order (@code{gnus-uu-mark-all}).
6207
6208 @item M P b
6209 @kindex M P b (Summary)
6210 @findex gnus-uu-mark-buffer
6211 Mark all articles in the buffer in the order they appear
6212 (@code{gnus-uu-mark-buffer}).
6213
6214 @item M P k
6215 @kindex M P k (Summary)
6216 @findex gnus-summary-kill-process-mark
6217 Push the current process mark set onto the stack and unmark all articles
6218 (@code{gnus-summary-kill-process-mark}).
6219
6220 @item M P y
6221 @kindex M P y (Summary)
6222 @findex gnus-summary-yank-process-mark
6223 Pop the previous process mark set from the stack and restore it
6224 (@code{gnus-summary-yank-process-mark}).
6225
6226 @item M P w
6227 @kindex M P w (Summary)
6228 @findex gnus-summary-save-process-mark
6229 Push the current process mark set onto the stack
6230 (@code{gnus-summary-save-process-mark}).
6231
6232 @end table
6233
6234 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6235 set process marks based on article body contents.
6236
6237
6238 @node Limiting
6239 @section Limiting
6240 @cindex limiting
6241
6242 It can be convenient to limit the summary buffer to just show some
6243 subset of the articles currently in the group.  The effect most limit
6244 commands have is to remove a few (or many) articles from the summary
6245 buffer.
6246
6247 All limiting commands work on subsets of the articles already fetched
6248 from the servers.  None of these commands query the server for
6249 additional articles.
6250
6251 @table @kbd
6252
6253 @item / /
6254 @itemx / s
6255 @kindex / / (Summary)
6256 @findex gnus-summary-limit-to-subject
6257 Limit the summary buffer to articles that match some subject
6258 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6259 matching articles.
6260
6261 @item / a
6262 @kindex / a (Summary)
6263 @findex gnus-summary-limit-to-author
6264 Limit the summary buffer to articles that match some author
6265 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6266 matching articles.
6267
6268 @item / x
6269 @kindex / x (Summary)
6270 @findex gnus-summary-limit-to-extra
6271 Limit the summary buffer to articles that match one of the ``extra''
6272 headers (@pxref{To From Newsgroups})
6273 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6274 matching articles.
6275
6276 @item / u
6277 @itemx x
6278 @kindex / u (Summary)
6279 @kindex x (Summary)
6280 @findex gnus-summary-limit-to-unread
6281 Limit the summary buffer to articles not marked as read
6282 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6283 buffer to articles strictly unread.  This means that ticked and
6284 dormant articles will also be excluded.
6285
6286 @item / m
6287 @kindex / m (Summary)
6288 @findex gnus-summary-limit-to-marks
6289 Ask for a mark and then limit to all articles that have been marked
6290 with that mark (@code{gnus-summary-limit-to-marks}).
6291
6292 @item / t
6293 @kindex / t (Summary)
6294 @findex gnus-summary-limit-to-age
6295 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6296 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6297 articles younger than that number of days.
6298
6299 @item / n
6300 @kindex / n (Summary)
6301 @findex gnus-summary-limit-to-articles
6302 Limit the summary buffer to the current article
6303 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6304 convention (@pxref{Process/Prefix}).
6305
6306 @item / w
6307 @kindex / w (Summary)
6308 @findex gnus-summary-pop-limit
6309 Pop the previous limit off the stack and restore it
6310 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6311 the stack.
6312
6313 @item / .
6314 @kindex / . (Summary)
6315 @findex gnus-summary-limit-to-unseen
6316 Limit the summary buffer to the unseen articles
6317 (@code{gnus-summary-limit-to-unseen}).
6318
6319 @item / v
6320 @kindex / v (Summary)
6321 @findex gnus-summary-limit-to-score
6322 Limit the summary buffer to articles that have a score at or above some
6323 score (@code{gnus-summary-limit-to-score}).
6324
6325 @item / p
6326 @kindex / p (Summary)
6327 @findex gnus-summary-limit-to-display-predicate
6328 Limit the summary buffer to articles that satisfy the @code{display}
6329 group parameter predicate
6330 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6331 Parameters}, for more on this predicate.
6332
6333 @item / r
6334 @kindex / r (Summary)
6335 @findex gnus-summary-limit-to-replied
6336 Limit the summary buffer to replied articles
6337 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
6338 replied articles.
6339
6340 @item / E
6341 @itemx M S
6342 @kindex M S (Summary)
6343 @kindex / E (Summary)
6344 @findex gnus-summary-limit-include-expunged
6345 Include all expunged articles in the limit
6346 (@code{gnus-summary-limit-include-expunged}).
6347
6348 @item / D
6349 @kindex / D (Summary)
6350 @findex gnus-summary-limit-include-dormant
6351 Include all dormant articles in the limit
6352 (@code{gnus-summary-limit-include-dormant}).
6353
6354 @item / *
6355 @kindex / * (Summary)
6356 @findex gnus-summary-limit-include-cached
6357 Include all cached articles in the limit
6358 (@code{gnus-summary-limit-include-cached}).
6359
6360 @item / d
6361 @kindex / d (Summary)
6362 @findex gnus-summary-limit-exclude-dormant
6363 Exclude all dormant articles from the limit
6364 (@code{gnus-summary-limit-exclude-dormant}).
6365
6366 @item / M
6367 @kindex / M (Summary)
6368 @findex gnus-summary-limit-exclude-marks
6369 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6370
6371 @item / T
6372 @kindex / T (Summary)
6373 @findex gnus-summary-limit-include-thread
6374 Include all the articles in the current thread in the limit.
6375
6376 @item / c
6377 @kindex / c (Summary)
6378 @findex gnus-summary-limit-exclude-childless-dormant
6379 Exclude all dormant articles that have no children from the limit@*
6380 (@code{gnus-summary-limit-exclude-childless-dormant}).
6381
6382 @item / C
6383 @kindex / C (Summary)
6384 @findex gnus-summary-limit-mark-excluded-as-read
6385 Mark all excluded unread articles as read
6386 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6387 also mark excluded ticked and dormant articles as read.
6388
6389 @item / N
6390 @kindex / N (Summary)
6391 @findex gnus-summary-insert-new-articles
6392 Insert all new articles in the summary buffer.  It scans for new emails
6393 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6394
6395 @item / o
6396 @kindex / o (Summary)
6397 @findex gnus-summary-insert-old-articles
6398 Insert all old articles in the summary buffer.  If given a numbered
6399 prefix, fetch this number of articles.
6400
6401 @end table
6402
6403
6404 @node Threading
6405 @section Threading
6406 @cindex threading
6407 @cindex article threading
6408
6409 Gnus threads articles by default.  @dfn{To thread} is to put responses
6410 to articles directly after the articles they respond to---in a
6411 hierarchical fashion.
6412
6413 Threading is done by looking at the @code{References} headers of the
6414 articles.  In a perfect world, this would be enough to build pretty
6415 trees, but unfortunately, the @code{References} header is often broken
6416 or simply missing.  Weird news propagation exacerbates the problem,
6417 so one has to employ other heuristics to get pleasing results.  A
6418 plethora of approaches exists, as detailed in horrible detail in
6419 @ref{Customizing Threading}.
6420
6421 First, a quick overview of the concepts:
6422
6423 @table @dfn
6424 @item root
6425 The top-most article in a thread; the first article in the thread.
6426
6427 @item thread
6428 A tree-like article structure.
6429
6430 @item sub-thread
6431 A small(er) section of this tree-like structure.
6432
6433 @item loose threads
6434 Threads often lose their roots due to article expiry, or due to the root
6435 already having been read in a previous session, and not displayed in the
6436 summary buffer.  We then typically have many sub-threads that really
6437 belong to one thread, but are without connecting roots.  These are
6438 called loose threads.
6439
6440 @item thread gathering
6441 An attempt to gather loose threads into bigger threads.
6442
6443 @item sparse threads
6444 A thread where the missing articles have been ``guessed'' at, and are
6445 displayed as empty lines in the summary buffer.
6446
6447 @end table
6448
6449
6450 @menu
6451 * Customizing Threading::       Variables you can change to affect the threading.
6452 * Thread Commands::             Thread based commands in the summary buffer.
6453 @end menu
6454
6455
6456 @node Customizing Threading
6457 @subsection Customizing Threading
6458 @cindex customizing threading
6459
6460 @menu
6461 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6462 * Filling In Threads::          Making the threads displayed look fuller.
6463 * More Threading::              Even more variables for fiddling with threads.
6464 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6465 @end menu
6466
6467
6468 @node Loose Threads
6469 @subsubsection Loose Threads
6470 @cindex <
6471 @cindex >
6472 @cindex loose threads
6473
6474 @table @code
6475 @item gnus-summary-make-false-root
6476 @vindex gnus-summary-make-false-root
6477 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6478 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6479 Yup.)  Loose subtrees occur when the real root has expired, or you've
6480 read or killed the root in a previous session.
6481
6482 When there is no real root of a thread, Gnus will have to fudge
6483 something.  This variable says what fudging method Gnus should use.
6484 There are four possible values:
6485
6486 @iftex
6487 @iflatex
6488 \gnusfigure{The Summary Buffer}{390}{
6489 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6490 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6491 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6492 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6493 }
6494 @end iflatex
6495 @end iftex
6496
6497 @cindex adopting articles
6498
6499 @table @code
6500
6501 @item adopt
6502 Gnus will make the first of the orphaned articles the parent.  This
6503 parent will adopt all the other articles.  The adopted articles will be
6504 marked as such by pointy brackets (@samp{<>}) instead of the standard
6505 square brackets (@samp{[]}).  This is the default method.
6506
6507 @item dummy
6508 @vindex gnus-summary-dummy-line-format
6509 @vindex gnus-summary-make-false-root-always
6510 Gnus will create a dummy summary line that will pretend to be the
6511 parent.  This dummy line does not correspond to any real article, so
6512 selecting it will just select the first real article after the dummy
6513 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6514 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6515 which is the subject of the article.  @xref{Formatting Variables}.
6516 If you want all threads to have a dummy root, even the non-gathered
6517 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6518
6519 @item empty
6520 Gnus won't actually make any article the parent, but simply leave the
6521 subject field of all orphans except the first empty.  (Actually, it will
6522 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6523 Buffer Format}).)
6524
6525 @item none
6526 Don't make any article parent at all.  Just gather the threads and
6527 display them after one another.
6528
6529 @item nil
6530 Don't gather loose threads.
6531 @end table
6532
6533 @item gnus-summary-gather-subject-limit
6534 @vindex gnus-summary-gather-subject-limit
6535 Loose threads are gathered by comparing subjects of articles.  If this
6536 variable is @code{nil}, Gnus requires an exact match between the
6537 subjects of the loose threads before gathering them into one big
6538 super-thread.  This might be too strict a requirement, what with the
6539 presence of stupid newsreaders that chop off long subject lines.  If
6540 you think so, set this variable to, say, 20 to require that only the
6541 first 20 characters of the subjects have to match.  If you set this
6542 variable to a really low number, you'll find that Gnus will gather
6543 everything in sight into one thread, which isn't very helpful.
6544
6545 @cindex fuzzy article gathering
6546 If you set this variable to the special value @code{fuzzy}, Gnus will
6547 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6548 Matching}).
6549
6550 @item gnus-simplify-subject-fuzzy-regexp
6551 @vindex gnus-simplify-subject-fuzzy-regexp
6552 This can either be a regular expression or list of regular expressions
6553 that match strings that will be removed from subjects if fuzzy subject
6554 simplification is used.
6555
6556 @item gnus-simplify-ignored-prefixes
6557 @vindex gnus-simplify-ignored-prefixes
6558 If you set @code{gnus-summary-gather-subject-limit} to something as low
6559 as 10, you might consider setting this variable to something sensible:
6560
6561 @c Written by Michael Ernst <mernst@cs.rice.edu>
6562 @lisp
6563 (setq gnus-simplify-ignored-prefixes
6564       (concat
6565        "\\`\\[?\\("
6566        (mapconcat
6567         'identity
6568         '("looking"
6569           "wanted" "followup" "summary\\( of\\)?"
6570           "help" "query" "problem" "question"
6571           "answer" "reference" "announce"
6572           "How can I" "How to" "Comparison of"
6573           ;; ...
6574           )
6575         "\\|")
6576        "\\)\\s *\\("
6577        (mapconcat 'identity
6578                   '("for" "for reference" "with" "about")
6579                   "\\|")
6580        "\\)?\\]?:?[ \t]*"))
6581 @end lisp
6582
6583 All words that match this regexp will be removed before comparing two
6584 subjects.
6585
6586 @item gnus-simplify-subject-functions
6587 @vindex gnus-simplify-subject-functions
6588 If non-@code{nil}, this variable overrides
6589 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6590 list of functions to apply to the @code{Subject} string iteratively to
6591 arrive at the simplified version of the string.
6592
6593 Useful functions to put in this list include:
6594
6595 @table @code
6596 @item gnus-simplify-subject-re
6597 @findex gnus-simplify-subject-re
6598 Strip the leading @samp{Re:}.
6599
6600 @item gnus-simplify-subject-fuzzy
6601 @findex gnus-simplify-subject-fuzzy
6602 Simplify fuzzily.
6603
6604 @item gnus-simplify-whitespace
6605 @findex gnus-simplify-whitespace
6606 Remove excessive whitespace.
6607
6608 @item gnus-simplify-all-whitespace
6609 @findex gnus-simplify-all-whitespace
6610 Remove all whitespace.
6611 @end table
6612
6613 You may also write your own functions, of course.
6614
6615
6616 @item gnus-summary-gather-exclude-subject
6617 @vindex gnus-summary-gather-exclude-subject
6618 Since loose thread gathering is done on subjects only, that might lead
6619 to many false hits, especially with certain common subjects like
6620 @samp{} and @samp{(none)}.  To make the situation slightly better,
6621 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6622 what subjects should be excluded from the gathering process.@*
6623 The default is @samp{^ *$\\|^(none)$}.
6624
6625 @item gnus-summary-thread-gathering-function
6626 @vindex gnus-summary-thread-gathering-function
6627 Gnus gathers threads by looking at @code{Subject} headers.  This means
6628 that totally unrelated articles may end up in the same ``thread'', which
6629 is confusing.  An alternate approach is to look at all the
6630 @code{Message-ID}s in all the @code{References} headers to find matches.
6631 This will ensure that no gathered threads ever include unrelated
6632 articles, but it also means that people who have posted with broken
6633 newsreaders won't be gathered properly.  The choice is yours---plague or
6634 cholera:
6635
6636 @table @code
6637 @item gnus-gather-threads-by-subject
6638 @findex gnus-gather-threads-by-subject
6639 This function is the default gathering function and looks at
6640 @code{Subject}s exclusively.
6641
6642 @item gnus-gather-threads-by-references
6643 @findex gnus-gather-threads-by-references
6644 This function looks at @code{References} headers exclusively.
6645 @end table
6646
6647 If you want to test gathering by @code{References}, you could say
6648 something like:
6649
6650 @lisp
6651 (setq gnus-summary-thread-gathering-function
6652       'gnus-gather-threads-by-references)
6653 @end lisp
6654
6655 @end table
6656
6657
6658 @node Filling In Threads
6659 @subsubsection Filling In Threads
6660
6661 @table @code
6662 @item gnus-fetch-old-headers
6663 @vindex gnus-fetch-old-headers
6664 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6665 more old headers---headers to articles marked as read.  If you would
6666 like to display as few summary lines as possible, but still connect as
6667 many loose threads as possible, you should set this variable to
6668 @code{some} or a number.  If you set it to a number, no more than that
6669 number of extra old headers will be fetched.  In either case, fetching
6670 old headers only works if the back end you are using carries overview
6671 files---this would normally be @code{nntp}, @code{nnspool},
6672 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6673 the thread has been expired by the server, there's not much Gnus can
6674 do about that.
6675
6676 This variable can also be set to @code{invisible}.  This won't have any
6677 visible effects, but is useful if you use the @kbd{A T} command a lot
6678 (@pxref{Finding the Parent}).
6679
6680 @item gnus-fetch-old-ephemeral-headers
6681 @vindex gnus-fetch-old-ephemeral-headers
6682 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6683 newsgroups.
6684
6685 @item gnus-build-sparse-threads
6686 @vindex gnus-build-sparse-threads
6687 Fetching old headers can be slow.  A low-rent similar effect can be
6688 gotten by setting this variable to @code{some}.  Gnus will then look at
6689 the complete @code{References} headers of all articles and try to string
6690 together articles that belong in the same thread.  This will leave
6691 @dfn{gaps} in the threading display where Gnus guesses that an article
6692 is missing from the thread.  (These gaps appear like normal summary
6693 lines.  If you select a gap, Gnus will try to fetch the article in
6694 question.)  If this variable is @code{t}, Gnus will display all these
6695 ``gaps'' without regard for whether they are useful for completing the
6696 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6697 off sparse leaf nodes that don't lead anywhere.  This variable is
6698 @code{nil} by default.
6699
6700 @item gnus-read-all-available-headers
6701 @vindex gnus-read-all-available-headers
6702 This is a rather obscure variable that few will find useful.  It's
6703 intended for those non-news newsgroups where the back end has to fetch
6704 quite a lot to present the summary buffer, and where it's impossible to
6705 go back to parents of articles.  This is mostly the case in the
6706 web-based groups, like the @code{nnultimate} groups.
6707
6708 If you don't use those, then it's safe to leave this as the default
6709 @code{nil}.  If you want to use this variable, it should be a regexp
6710 that matches the group name, or @code{t} for all groups.
6711
6712 @end table
6713
6714
6715 @node More Threading
6716 @subsubsection More Threading
6717
6718 @table @code
6719 @item gnus-show-threads
6720 @vindex gnus-show-threads
6721 If this variable is @code{nil}, no threading will be done, and all of
6722 the rest of the variables here will have no effect.  Turning threading
6723 off will speed group selection up a bit, but it is sure to make reading
6724 slower and more awkward.
6725
6726 @item gnus-thread-hide-subtree
6727 @vindex gnus-thread-hide-subtree
6728 If non-@code{nil}, all threads will be hidden when the summary buffer is
6729 generated.
6730
6731 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6732 Available predicates are @code{gnus-article-unread-p} and
6733 @code{gnus-article-unseen-p}.
6734
6735 Here's an example:
6736
6737 @lisp
6738 (setq gnus-thread-hide-subtree
6739       '(or gnus-article-unread-p
6740            gnus-article-unseen-p))
6741 @end lisp
6742
6743 (It's a pretty nonsensical example, since all unseen articles are also
6744 unread, but you get my drift.)
6745
6746
6747 @item gnus-thread-expunge-below
6748 @vindex gnus-thread-expunge-below
6749 All threads that have a total score (as defined by
6750 @code{gnus-thread-score-function}) less than this number will be
6751 expunged.  This variable is @code{nil} by default, which means that no
6752 threads are expunged.
6753
6754 @item gnus-thread-hide-killed
6755 @vindex gnus-thread-hide-killed
6756 if you kill a thread and this variable is non-@code{nil}, the subtree
6757 will be hidden.
6758
6759 @item gnus-thread-ignore-subject
6760 @vindex gnus-thread-ignore-subject
6761 Sometimes somebody changes the subject in the middle of a thread.  If
6762 this variable is non-@code{nil}, which is the default, the subject
6763 change is ignored.  If it is @code{nil}, a change in the subject will
6764 result in a new thread.
6765
6766 @item gnus-thread-indent-level
6767 @vindex gnus-thread-indent-level
6768 This is a number that says how much each sub-thread should be indented.
6769 The default is 4.
6770
6771 @item gnus-sort-gathered-threads-function
6772 @vindex gnus-sort-gathered-threads-function
6773 Sometimes, particularly with mailing lists, the order in which mails
6774 arrive locally is not necessarily the same as the order in which they
6775 arrived on the mailing list.  Consequently, when sorting sub-threads
6776 using the default @code{gnus-thread-sort-by-number}, responses can end
6777 up appearing before the article to which they are responding to.
6778 Setting this variable to an alternate value
6779 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6780 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6781 more logical sub-thread ordering in such instances.
6782
6783 @end table
6784
6785
6786 @node Low-Level Threading
6787 @subsubsection Low-Level Threading
6788
6789 @table @code
6790
6791 @item gnus-parse-headers-hook
6792 @vindex gnus-parse-headers-hook
6793 Hook run before parsing any headers.
6794
6795 @item gnus-alter-header-function
6796 @vindex gnus-alter-header-function
6797 If non-@code{nil}, this function will be called to allow alteration of
6798 article header structures.  The function is called with one parameter,
6799 the article header vector, which it may alter in any way.  For instance,
6800 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6801 in systematic ways (by adding prefixes and such), you can use this
6802 variable to un-scramble the @code{Message-ID}s so that they are more
6803 meaningful.  Here's one example:
6804
6805 @lisp
6806 (setq gnus-alter-header-function 'my-alter-message-id)
6807
6808 (defun my-alter-message-id (header)
6809   (let ((id (mail-header-id header)))
6810     (when (string-match
6811            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6812       (mail-header-set-id
6813        (concat (match-string 1 id) "@@" (match-string 2 id))
6814        header))))
6815 @end lisp
6816
6817 @end table
6818
6819
6820 @node Thread Commands
6821 @subsection Thread Commands
6822 @cindex thread commands
6823
6824 @table @kbd
6825
6826 @item T k
6827 @itemx C-M-k
6828 @kindex T k (Summary)
6829 @kindex C-M-k (Summary)
6830 @findex gnus-summary-kill-thread
6831 Mark all articles in the current (sub-)thread as read
6832 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6833 remove all marks instead.  If the prefix argument is negative, tick
6834 articles instead.
6835
6836 @item T l
6837 @itemx C-M-l
6838 @kindex T l (Summary)
6839 @kindex C-M-l (Summary)
6840 @findex gnus-summary-lower-thread
6841 Lower the score of the current (sub-)thread
6842 (@code{gnus-summary-lower-thread}).
6843
6844 @item T i
6845 @kindex T i (Summary)
6846 @findex gnus-summary-raise-thread
6847 Increase the score of the current (sub-)thread
6848 (@code{gnus-summary-raise-thread}).
6849
6850 @item T #
6851 @kindex T # (Summary)
6852 @findex gnus-uu-mark-thread
6853 Set the process mark on the current (sub-)thread
6854 (@code{gnus-uu-mark-thread}).
6855
6856 @item T M-#
6857 @kindex T M-# (Summary)
6858 @findex gnus-uu-unmark-thread
6859 Remove the process mark from the current (sub-)thread
6860 (@code{gnus-uu-unmark-thread}).
6861
6862 @item T T
6863 @kindex T T (Summary)
6864 @findex gnus-summary-toggle-threads
6865 Toggle threading (@code{gnus-summary-toggle-threads}).
6866
6867 @item T s
6868 @kindex T s (Summary)
6869 @findex gnus-summary-show-thread
6870 Expose the (sub-)thread hidden under the current article, if any@*
6871 (@code{gnus-summary-show-thread}).
6872
6873 @item T h
6874 @kindex T h (Summary)
6875 @findex gnus-summary-hide-thread
6876 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6877
6878 @item T S
6879 @kindex T S (Summary)
6880 @findex gnus-summary-show-all-threads
6881 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6882
6883 @item T H
6884 @kindex T H (Summary)
6885 @findex gnus-summary-hide-all-threads
6886 Hide all threads (@code{gnus-summary-hide-all-threads}).
6887
6888 @item T t
6889 @kindex T t (Summary)
6890 @findex gnus-summary-rethread-current
6891 Re-thread the current article's thread
6892 (@code{gnus-summary-rethread-current}).  This works even when the
6893 summary buffer is otherwise unthreaded.
6894
6895 @item T ^
6896 @kindex T ^ (Summary)
6897 @findex gnus-summary-reparent-thread
6898 Make the current article the child of the marked (or previous) article
6899 (@code{gnus-summary-reparent-thread}).
6900
6901 @end table
6902
6903 The following commands are thread movement commands.  They all
6904 understand the numeric prefix.
6905
6906 @table @kbd
6907
6908 @item T n
6909 @kindex T n (Summary)
6910 @itemx C-M-f
6911 @kindex C-M-n (Summary)
6912 @itemx M-down
6913 @kindex M-down (Summary)
6914 @findex gnus-summary-next-thread
6915 Go to the next thread (@code{gnus-summary-next-thread}).
6916
6917 @item T p
6918 @kindex T p (Summary)
6919 @itemx C-M-b
6920 @kindex C-M-p (Summary)
6921 @itemx M-up
6922 @kindex M-up (Summary)
6923 @findex gnus-summary-prev-thread
6924 Go to the previous thread (@code{gnus-summary-prev-thread}).
6925
6926 @item T d
6927 @kindex T d (Summary)
6928 @findex gnus-summary-down-thread
6929 Descend the thread (@code{gnus-summary-down-thread}).
6930
6931 @item T u
6932 @kindex T u (Summary)
6933 @findex gnus-summary-up-thread
6934 Ascend the thread (@code{gnus-summary-up-thread}).
6935
6936 @item T o
6937 @kindex T o (Summary)
6938 @findex gnus-summary-top-thread
6939 Go to the top of the thread (@code{gnus-summary-top-thread}).
6940 @end table
6941
6942 @vindex gnus-thread-operation-ignore-subject
6943 If you ignore subject while threading, you'll naturally end up with
6944 threads that have several different subjects in them.  If you then issue
6945 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6946 wish to kill the entire thread, but just those parts of the thread that
6947 have the same subject as the current article.  If you like this idea,
6948 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6949 is non-@code{nil} (which it is by default), subjects will be ignored
6950 when doing thread commands.  If this variable is @code{nil}, articles in
6951 the same thread with different subjects will not be included in the
6952 operation in question.  If this variable is @code{fuzzy}, only articles
6953 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6954 Matching}).
6955
6956
6957 @node Sorting the Summary Buffer
6958 @section Sorting the Summary Buffer
6959
6960 @findex gnus-thread-sort-by-total-score
6961 @findex gnus-thread-sort-by-date
6962 @findex gnus-thread-sort-by-score
6963 @findex gnus-thread-sort-by-subject
6964 @findex gnus-thread-sort-by-author
6965 @findex gnus-thread-sort-by-number
6966 @findex gnus-thread-sort-by-random
6967 @vindex gnus-thread-sort-functions
6968 @findex gnus-thread-sort-by-most-recent-number
6969 @findex gnus-thread-sort-by-most-recent-date
6970 If you are using a threaded summary display, you can sort the threads by
6971 setting @code{gnus-thread-sort-functions}, which can be either a single
6972 function, a list of functions, or a list containing functions and
6973 @code{(not some-function)} elements.
6974
6975 By default, sorting is done on article numbers.  Ready-made sorting
6976 predicate functions include @code{gnus-thread-sort-by-number},
6977 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6978 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6979 @code{gnus-thread-sort-by-most-recent-number},
6980 @code{gnus-thread-sort-by-most-recent-date},
6981 @code{gnus-thread-sort-by-random} and
6982 @code{gnus-thread-sort-by-total-score}.
6983
6984 Each function takes two threads and returns non-@code{nil} if the first
6985 thread should be sorted before the other.  Note that sorting really is
6986 normally done by looking only at the roots of each thread.
6987
6988 If you use more than one function, the primary sort key should be the
6989 last function in the list.  You should probably always include
6990 @code{gnus-thread-sort-by-number} in the list of sorting
6991 functions---preferably first.  This will ensure that threads that are
6992 equal with respect to the other sort criteria will be displayed in
6993 ascending article order.
6994
6995 If you would like to sort by reverse score, then by subject, and finally
6996 by number, you could do something like:
6997
6998 @lisp
6999 (setq gnus-thread-sort-functions
7000       '(gnus-thread-sort-by-number
7001         gnus-thread-sort-by-subject
7002         (not gnus-thread-sort-by-total-score)))
7003 @end lisp
7004
7005 The threads that have highest score will be displayed first in the
7006 summary buffer.  When threads have the same score, they will be sorted
7007 alphabetically.  The threads that have the same score and the same
7008 subject will be sorted by number, which is (normally) the sequence in
7009 which the articles arrived.
7010
7011 If you want to sort by score and then reverse arrival order, you could
7012 say something like:
7013
7014 @lisp
7015 (setq gnus-thread-sort-functions
7016       '((lambda (t1 t2)
7017           (not (gnus-thread-sort-by-number t1 t2)))
7018         gnus-thread-sort-by-score))
7019 @end lisp
7020
7021 @vindex gnus-thread-score-function
7022 The function in the @code{gnus-thread-score-function} variable (default
7023 @code{+}) is used for calculating the total score of a thread.  Useful
7024 functions might be @code{max}, @code{min}, or squared means, or whatever
7025 tickles your fancy.
7026
7027 @findex gnus-article-sort-functions
7028 @findex gnus-article-sort-by-date
7029 @findex gnus-article-sort-by-score
7030 @findex gnus-article-sort-by-subject
7031 @findex gnus-article-sort-by-author
7032 @findex gnus-article-sort-by-random
7033 @findex gnus-article-sort-by-number
7034 If you are using an unthreaded display for some strange reason or
7035 other, you have to fiddle with the @code{gnus-article-sort-functions}
7036 variable.  It is very similar to the
7037 @code{gnus-thread-sort-functions}, except that it uses slightly
7038 different functions for article comparison.  Available sorting
7039 predicate functions are @code{gnus-article-sort-by-number},
7040 @code{gnus-article-sort-by-author},
7041 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7042 @code{gnus-article-sort-by-random}, and
7043 @code{gnus-article-sort-by-score}.
7044
7045 If you want to sort an unthreaded summary display by subject, you could
7046 say something like:
7047
7048 @lisp
7049 (setq gnus-article-sort-functions
7050       '(gnus-article-sort-by-number
7051         gnus-article-sort-by-subject))
7052 @end lisp
7053
7054
7055
7056 @node Asynchronous Fetching
7057 @section Asynchronous Article Fetching
7058 @cindex asynchronous article fetching
7059 @cindex article pre-fetch
7060 @cindex pre-fetch
7061
7062 If you read your news from an @acronym{NNTP} server that's far away, the
7063 network latencies may make reading articles a chore.  You have to wait
7064 for a while after pressing @kbd{n} to go to the next article before the
7065 article appears.  Why can't Gnus just go ahead and fetch the article
7066 while you are reading the previous one?  Why not, indeed.
7067
7068 First, some caveats.  There are some pitfalls to using asynchronous
7069 article fetching, especially the way Gnus does it.
7070
7071 Let's say you are reading article 1, which is short, and article 2 is
7072 quite long, and you are not interested in reading that.  Gnus does not
7073 know this, so it goes ahead and fetches article 2.  You decide to read
7074 article 3, but since Gnus is in the process of fetching article 2, the
7075 connection is blocked.
7076
7077 To avoid these situations, Gnus will open two (count 'em two)
7078 connections to the server.  Some people may think this isn't a very nice
7079 thing to do, but I don't see any real alternatives.  Setting up that
7080 extra connection takes some time, so Gnus startup will be slower.
7081
7082 Gnus will fetch more articles than you will read.  This will mean that
7083 the link between your machine and the @acronym{NNTP} server will become more
7084 loaded than if you didn't use article pre-fetch.  The server itself will
7085 also become more loaded---both with the extra article requests, and the
7086 extra connection.
7087
7088 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7089 you really want to.
7090
7091 @vindex gnus-asynchronous
7092 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7093 happen automatically.
7094
7095 @vindex gnus-use-article-prefetch
7096 You can control how many articles are to be pre-fetched by setting
7097 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7098 that when you read an article in the group, the back end will pre-fetch
7099 the next 30 articles.  If this variable is @code{t}, the back end will
7100 pre-fetch all the articles it can without bound.  If it is
7101 @code{nil}, no pre-fetching will be done.
7102
7103 @vindex gnus-async-prefetch-article-p
7104 @findex gnus-async-read-p
7105 There are probably some articles that you don't want to pre-fetch---read
7106 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7107 variable controls whether an article is to be pre-fetched.  This
7108 function should return non-@code{nil} when the article in question is
7109 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7110 returns @code{nil} on read articles.  The function is called with an
7111 article data structure as the only parameter.
7112
7113 If, for instance, you wish to pre-fetch only unread articles shorter
7114 than 100 lines, you could say something like:
7115
7116 @lisp
7117 (defun my-async-short-unread-p (data)
7118   "Return non-nil for short, unread articles."
7119   (and (gnus-data-unread-p data)
7120        (< (mail-header-lines (gnus-data-header data))
7121           100)))
7122
7123 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7124 @end lisp
7125
7126 These functions will be called many, many times, so they should
7127 preferably be short and sweet to avoid slowing down Gnus too much.
7128 It's probably a good idea to byte-compile things like this.
7129
7130 @vindex gnus-prefetched-article-deletion-strategy
7131 Articles have to be removed from the asynch buffer sooner or later.  The
7132 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7133 articles.  This is a list that may contain the following elements:
7134
7135 @table @code
7136 @item read
7137 Remove articles when they are read.
7138
7139 @item exit
7140 Remove articles when exiting the group.
7141 @end table
7142
7143 The default value is @code{(read exit)}.
7144
7145 @c @vindex gnus-use-header-prefetch
7146 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7147 @c from the next group.
7148
7149
7150 @node Article Caching
7151 @section Article Caching
7152 @cindex article caching
7153 @cindex caching
7154
7155 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7156 consider turning article caching on.  Each article will then be stored
7157 locally under your home directory.  As you may surmise, this could
7158 potentially use @emph{huge} amounts of disk space, as well as eat up all
7159 your inodes so fast it will make your head swim.  In vodka.
7160
7161 Used carefully, though, it could be just an easier way to save articles.
7162
7163 @vindex gnus-use-long-file-name
7164 @vindex gnus-cache-directory
7165 @vindex gnus-use-cache
7166 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7167 all articles ticked or marked as dormant will then be copied
7168 over to your local cache (@code{gnus-cache-directory}).  Whether this
7169 cache is flat or hierarchical is controlled by the
7170 @code{gnus-use-long-file-name} variable, as usual.
7171
7172 When re-selecting a ticked or dormant article, it will be fetched from the
7173 cache instead of from the server.  As articles in your cache will never
7174 expire, this might serve as a method of saving articles while still
7175 keeping them where they belong.  Just mark all articles you want to save
7176 as dormant, and don't worry.
7177
7178 When an article is marked as read, is it removed from the cache.
7179
7180 @vindex gnus-cache-remove-articles
7181 @vindex gnus-cache-enter-articles
7182 The entering/removal of articles from the cache is controlled by the
7183 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7184 variables.  Both are lists of symbols.  The first is @code{(ticked
7185 dormant)} by default, meaning that ticked and dormant articles will be
7186 put in the cache.  The latter is @code{(read)} by default, meaning that
7187 articles marked as read are removed from the cache.  Possibly
7188 symbols in these two lists are @code{ticked}, @code{dormant},
7189 @code{unread} and @code{read}.
7190
7191 @findex gnus-jog-cache
7192 So where does the massive article-fetching and storing come into the
7193 picture?  The @code{gnus-jog-cache} command will go through all
7194 subscribed newsgroups, request all unread articles, score them, and
7195 store them in the cache.  You should only ever, ever ever ever, use this
7196 command if 1) your connection to the @acronym{NNTP} server is really, really,
7197 really slow and 2) you have a really, really, really huge disk.
7198 Seriously.  One way to cut down on the number of articles downloaded is
7199 to score unwanted articles down and have them marked as read.  They will
7200 not then be downloaded by this command.
7201
7202 @vindex gnus-uncacheable-groups
7203 @vindex gnus-cacheable-groups
7204 It is likely that you do not want caching on all groups.  For instance,
7205 if your @code{nnml} mail is located under your home directory, it makes no
7206 sense to cache it somewhere else under your home directory.  Unless you
7207 feel that it's neat to use twice as much space.
7208
7209 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7210 regexp of groups to cache, @samp{^nntp} for instance, or set the
7211 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7212 Both variables are @code{nil} by default.  If a group matches both
7213 variables, the group is not cached.
7214
7215 @findex gnus-cache-generate-nov-databases
7216 @findex gnus-cache-generate-active
7217 @vindex gnus-cache-active-file
7218 The cache stores information on what articles it contains in its active
7219 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7220 of the cache) becomes all messed up for some reason or other, Gnus
7221 offers two functions that will try to set things right.  @kbd{M-x
7222 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7223 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7224 file.
7225
7226 @findex gnus-cache-move-cache
7227 @code{gnus-cache-move-cache} will move your whole
7228 @code{gnus-cache-directory} to some other location.  You get asked to
7229 where, isn't that cool?
7230
7231 @node Persistent Articles
7232 @section Persistent Articles
7233 @cindex persistent articles
7234
7235 Closely related to article caching, we have @dfn{persistent articles}.
7236 In fact, it's just a different way of looking at caching, and much more
7237 useful in my opinion.
7238
7239 Say you're reading a newsgroup, and you happen on to some valuable gem
7240 that you want to keep and treasure forever.  You'd normally just save it
7241 (using one of the many saving commands) in some file.  The problem with
7242 that is that it's just, well, yucky.  Ideally you'd prefer just having
7243 the article remain in the group where you found it forever; untouched by
7244 the expiry going on at the news server.
7245
7246 This is what a @dfn{persistent article} is---an article that just won't
7247 be deleted.  It's implemented using the normal cache functions, but
7248 you use two explicit commands for managing persistent articles:
7249
7250 @table @kbd
7251
7252 @item *
7253 @kindex * (Summary)
7254 @findex gnus-cache-enter-article
7255 Make the current article persistent (@code{gnus-cache-enter-article}).
7256
7257 @item M-*
7258 @kindex M-* (Summary)
7259 @findex gnus-cache-remove-article
7260 Remove the current article from the persistent articles
7261 (@code{gnus-cache-remove-article}).  This will normally delete the
7262 article.
7263 @end table
7264
7265 Both these commands understand the process/prefix convention.
7266
7267 To avoid having all ticked articles (and stuff) entered into the cache,
7268 you should set @code{gnus-use-cache} to @code{passive} if you're just
7269 interested in persistent articles:
7270
7271 @lisp
7272 (setq gnus-use-cache 'passive)
7273 @end lisp
7274
7275
7276 @node Article Backlog
7277 @section Article Backlog
7278 @cindex backlog
7279 @cindex article backlog
7280
7281 If you have a slow connection, but the idea of using caching seems
7282 unappealing to you (and it is, really), you can help the situation some
7283 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7284 already read articles so that it doesn't have to re-fetch articles
7285 you've already read.  This only helps if you are in the habit of
7286 re-selecting articles you've recently read, of course.  If you never do
7287 that, turning the backlog on will slow Gnus down a little bit, and
7288 increase memory usage some.
7289
7290 @vindex gnus-keep-backlog
7291 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7292 at most @var{n} old articles in a buffer for later re-fetching.  If this
7293 variable is non-@code{nil} and is not a number, Gnus will store
7294 @emph{all} read articles, which means that your Emacs will grow without
7295 bound before exploding and taking your machine down with you.  I put
7296 that in there just to keep y'all on your toes.
7297
7298 The default value is 20.
7299
7300
7301 @node Saving Articles
7302 @section Saving Articles
7303 @cindex saving articles
7304
7305 Gnus can save articles in a number of ways.  Below is the documentation
7306 for saving articles in a fairly straight-forward fashion (i.e., little
7307 processing of the article is done before it is saved).  For a different
7308 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7309 (@pxref{Decoding Articles}).
7310
7311 For the commands listed here, the target is a file.  If you want to
7312 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7313 command (@pxref{Mail Group Commands}).
7314
7315 @vindex gnus-save-all-headers
7316 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7317 unwanted headers before saving the article.
7318
7319 @vindex gnus-saved-headers
7320 If the preceding variable is @code{nil}, all headers that match the
7321 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7322 deleted before saving.
7323
7324 @table @kbd
7325
7326 @item O o
7327 @itemx o
7328 @kindex O o (Summary)
7329 @kindex o (Summary)
7330 @findex gnus-summary-save-article
7331 @c @icon{gnus-summary-save-article}
7332 Save the current article using the default article saver
7333 (@code{gnus-summary-save-article}).
7334
7335 @item O m
7336 @kindex O m (Summary)
7337 @findex gnus-summary-save-article-mail
7338 Save the current article in mail format
7339 (@code{gnus-summary-save-article-mail}).
7340
7341 @item O r
7342 @kindex O r (Summary)
7343 @findex gnus-summary-save-article-rmail
7344 Save the current article in Rmail format
7345 (@code{gnus-summary-save-article-rmail}).
7346
7347 @item O f
7348 @kindex O f (Summary)
7349 @findex gnus-summary-save-article-file
7350 @c @icon{gnus-summary-save-article-file}
7351 Save the current article in plain file format
7352 (@code{gnus-summary-save-article-file}).
7353
7354 @item O F
7355 @kindex O F (Summary)
7356 @findex gnus-summary-write-article-file
7357 Write the current article in plain file format, overwriting any previous
7358 file contents (@code{gnus-summary-write-article-file}).
7359
7360 @item O b
7361 @kindex O b (Summary)
7362 @findex gnus-summary-save-article-body-file
7363 Save the current article body in plain file format
7364 (@code{gnus-summary-save-article-body-file}).
7365
7366 @item O h
7367 @kindex O h (Summary)
7368 @findex gnus-summary-save-article-folder
7369 Save the current article in mh folder format
7370 (@code{gnus-summary-save-article-folder}).
7371
7372 @item O v
7373 @kindex O v (Summary)
7374 @findex gnus-summary-save-article-vm
7375 Save the current article in a VM folder
7376 (@code{gnus-summary-save-article-vm}).
7377
7378 @item O p
7379 @itemx |
7380 @kindex O p (Summary)
7381 @kindex | (Summary)
7382 @findex gnus-summary-pipe-output
7383 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7384 the current article to a process (@code{gnus-summary-pipe-output}).
7385 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7386 complete headers in the piped output.
7387
7388 @item O P
7389 @kindex O P (Summary)
7390 @findex gnus-summary-muttprint
7391 @vindex gnus-summary-muttprint-program
7392 Save the current article into muttprint.  That is, print it using the
7393 external program @uref{http://muttprint.sourceforge.net/,
7394 Muttprint}.  The program name and options to use is controlled by the
7395 variable @code{gnus-summary-muttprint-program}.
7396 (@code{gnus-summary-muttprint}).
7397
7398 @end table
7399
7400 @vindex gnus-prompt-before-saving
7401 All these commands use the process/prefix convention
7402 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7403 functions, you might get tired of being prompted for files to save each
7404 and every article in.  The prompting action is controlled by
7405 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7406 default, giving you that excessive prompting action you know and
7407 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7408 just once for each series of articles you save.  If you like to really
7409 have Gnus do all your thinking for you, you can even set this variable
7410 to @code{nil}, which means that you will never be prompted for files to
7411 save articles in.  Gnus will simply save all the articles in the default
7412 files.
7413
7414
7415 @vindex gnus-default-article-saver
7416 You can customize the @code{gnus-default-article-saver} variable to make
7417 Gnus do what you want it to.  You can use any of the six ready-made
7418 functions below, or you can create your own.
7419
7420 @table @code
7421
7422 @item gnus-summary-save-in-rmail
7423 @findex gnus-summary-save-in-rmail
7424 @vindex gnus-rmail-save-name
7425 @findex gnus-plain-save-name
7426 This is the default format, @dfn{Babyl}.  Uses the function in the
7427 @code{gnus-rmail-save-name} variable to get a file name to save the
7428 article in.  The default is @code{gnus-plain-save-name}.
7429
7430 @item gnus-summary-save-in-mail
7431 @findex gnus-summary-save-in-mail
7432 @vindex gnus-mail-save-name
7433 Save in a Unix mail (mbox) file.  Uses the function in the
7434 @code{gnus-mail-save-name} variable to get a file name to save the
7435 article in.  The default is @code{gnus-plain-save-name}.
7436
7437 @item gnus-summary-save-in-file
7438 @findex gnus-summary-save-in-file
7439 @vindex gnus-file-save-name
7440 @findex gnus-numeric-save-name
7441 Append the article straight to an ordinary file.  Uses the function in
7442 the @code{gnus-file-save-name} variable to get a file name to save the
7443 article in.  The default is @code{gnus-numeric-save-name}.
7444
7445 @item gnus-summary-write-to-file
7446 @findex gnus-summary-write-to-file
7447 Write the article straight to an ordinary file.  The file is
7448 overwritten if it exists.  Uses the function in the
7449 @code{gnus-file-save-name} variable to get a file name to save the
7450 article in.  The default is @code{gnus-numeric-save-name}.
7451
7452 @item gnus-summary-save-body-in-file
7453 @findex gnus-summary-save-body-in-file
7454 Append the article body to an ordinary file.  Uses the function in the
7455 @code{gnus-file-save-name} variable to get a file name to save the
7456 article in.  The default is @code{gnus-numeric-save-name}.
7457
7458 @item gnus-summary-save-in-folder
7459 @findex gnus-summary-save-in-folder
7460 @findex gnus-folder-save-name
7461 @findex gnus-Folder-save-name
7462 @vindex gnus-folder-save-name
7463 @cindex rcvstore
7464 @cindex MH folders
7465 Save the article to an MH folder using @code{rcvstore} from the MH
7466 library.  Uses the function in the @code{gnus-folder-save-name} variable
7467 to get a file name to save the article in.  The default is
7468 @code{gnus-folder-save-name}, but you can also use
7469 @code{gnus-Folder-save-name}, which creates capitalized names.
7470
7471 @item gnus-summary-save-in-vm
7472 @findex gnus-summary-save-in-vm
7473 Save the article in a VM folder.  You have to have the VM mail
7474 reader to use this setting.
7475 @end table
7476
7477 @vindex gnus-article-save-directory
7478 All of these functions, except for the last one, will save the article
7479 in the @code{gnus-article-save-directory}, which is initialized from the
7480 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7481 default.
7482
7483 As you can see above, the functions use different functions to find a
7484 suitable name of a file to save the article in.  Below is a list of
7485 available functions that generate names:
7486
7487 @table @code
7488
7489 @item gnus-Numeric-save-name
7490 @findex gnus-Numeric-save-name
7491 File names like @file{~/News/Alt.andrea-dworkin/45}.
7492
7493 @item gnus-numeric-save-name
7494 @findex gnus-numeric-save-name
7495 File names like @file{~/News/alt.andrea-dworkin/45}.
7496
7497 @item gnus-Plain-save-name
7498 @findex gnus-Plain-save-name
7499 File names like @file{~/News/Alt.andrea-dworkin}.
7500
7501 @item gnus-plain-save-name
7502 @findex gnus-plain-save-name
7503 File names like @file{~/News/alt.andrea-dworkin}.
7504
7505 @item gnus-sender-save-name
7506 @findex gnus-sender-save-name
7507 File names like @file{~/News/larsi}.
7508 @end table
7509
7510 @vindex gnus-split-methods
7511 You can have Gnus suggest where to save articles by plonking a regexp into
7512 the @code{gnus-split-methods} alist.  For instance, if you would like to
7513 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7514 related to VM in @file{vm-stuff}, you could set this variable to something
7515 like:
7516
7517 @lisp
7518 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7519  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7520  (my-choosing-function "../other-dir/my-stuff")
7521  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7522 @end lisp
7523
7524 We see that this is a list where each element is a list that has two
7525 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7526 a string (in which case it is used as a regexp to match on the article
7527 head); it can be a symbol (which will be called as a function with the
7528 group name as a parameter); or it can be a list (which will be
7529 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7530 the @dfn{file} will be used as a default prompt.  In addition, the
7531 result of the operation itself will be used if the function or form
7532 called returns a string or a list of strings.
7533
7534 You basically end up with a list of file names that might be used when
7535 saving the current article.  (All ``matches'' will be used.)  You will
7536 then be prompted for what you really want to use as a name, with file
7537 name completion over the results from applying this variable.
7538
7539 This variable is @code{((gnus-article-archive-name))} by default, which
7540 means that Gnus will look at the articles it saves for an
7541 @code{Archive-name} line and use that as a suggestion for the file
7542 name.
7543
7544 Here's an example function to clean up file names somewhat.  If you have
7545 lots of mail groups called things like
7546 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7547 these group names before creating the file name to save to.  The
7548 following will do just that:
7549
7550 @lisp
7551 (defun my-save-name (group)
7552   (when (string-match "^nnml:mail." group)
7553     (substring group (match-end 0))))
7554
7555 (setq gnus-split-methods
7556       '((gnus-article-archive-name)
7557         (my-save-name)))
7558 @end lisp
7559
7560
7561 @vindex gnus-use-long-file-name
7562 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7563 @code{nil}, all the preceding functions will replace all periods
7564 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7565 the functions will generate hierarchies of directories instead of having
7566 all the files in the top level directory
7567 (@file{~/News/alt/andrea-dworkin} instead of
7568 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7569 on most systems.  However, for historical reasons, this is @code{nil} on
7570 Xenix and usg-unix-v machines by default.
7571
7572 This function also affects kill and score file names.  If this variable
7573 is a list, and the list contains the element @code{not-score}, long file
7574 names will not be used for score files, if it contains the element
7575 @code{not-save}, long file names will not be used for saving, and if it
7576 contains the element @code{not-kill}, long file names will not be used
7577 for kill files.
7578
7579 If you'd like to save articles in a hierarchy that looks something like
7580 a spool, you could
7581
7582 @lisp
7583 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7584 (setq gnus-default-article-saver
7585       'gnus-summary-save-in-file)          ; @r{no encoding}
7586 @end lisp
7587
7588 Then just save with @kbd{o}.  You'd then read this hierarchy with
7589 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7590 the top level directory as the argument (@file{~/News/}).  Then just walk
7591 around to the groups/directories with @code{nneething}.
7592
7593
7594 @node Decoding Articles
7595 @section Decoding Articles
7596 @cindex decoding articles
7597
7598 Sometime users post articles (or series of articles) that have been
7599 encoded in some way or other.  Gnus can decode them for you.
7600
7601 @menu
7602 * Uuencoded Articles::          Uudecode articles.
7603 * Shell Archives::              Unshar articles.
7604 * PostScript Files::            Split PostScript.
7605 * Other Files::                 Plain save and binhex.
7606 * Decoding Variables::          Variables for a happy decoding.
7607 * Viewing Files::               You want to look at the result of the decoding?
7608 @end menu
7609
7610 @cindex series
7611 @cindex article series
7612 All these functions use the process/prefix convention
7613 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7614 the extension that a ``single article'' means ``a single series''.  Gnus
7615 can find out by itself what articles belong to a series, decode all the
7616 articles and unpack/view/save the resulting file(s).
7617
7618 Gnus guesses what articles are in the series according to the following
7619 simplish rule: The subjects must be (nearly) identical, except for the
7620 last two numbers of the line.  (Spaces are largely ignored, however.)
7621
7622 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7623 will find all the articles that match the regexp @samp{^cat.gif
7624 ([0-9]+/[0-9]+).*$}.
7625
7626 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7627 series}, will not be properly recognized by any of the automatic viewing
7628 commands, and you have to mark the articles manually with @kbd{#}.
7629
7630
7631 @node Uuencoded Articles
7632 @subsection Uuencoded Articles
7633 @cindex uudecode
7634 @cindex uuencoded articles
7635
7636 @table @kbd
7637
7638 @item X u
7639 @kindex X u (Summary)
7640 @findex gnus-uu-decode-uu
7641 @c @icon{gnus-uu-decode-uu}
7642 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7643
7644 @item X U
7645 @kindex X U (Summary)
7646 @findex gnus-uu-decode-uu-and-save
7647 Uudecodes and saves the current series
7648 (@code{gnus-uu-decode-uu-and-save}).
7649
7650 @item X v u
7651 @kindex X v u (Summary)
7652 @findex gnus-uu-decode-uu-view
7653 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7654
7655 @item X v U
7656 @kindex X v U (Summary)
7657 @findex gnus-uu-decode-uu-and-save-view
7658 Uudecodes, views and saves the current series
7659 (@code{gnus-uu-decode-uu-and-save-view}).
7660
7661 @end table
7662
7663 Remember that these all react to the presence of articles marked with
7664 the process mark.  If, for instance, you'd like to decode and save an
7665 entire newsgroup, you'd typically do @kbd{M P a}
7666 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7667 (@code{gnus-uu-decode-uu-and-save}).
7668
7669 All this is very much different from how @code{gnus-uu} worked with
7670 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7671 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7672 articles in some way (@pxref{Setting Process Marks}) and then press
7673 @kbd{X u}.
7674
7675 @vindex gnus-uu-notify-files
7676 Note: When trying to decode articles that have names matching
7677 @code{gnus-uu-notify-files}, which is hard-coded to
7678 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7679 automatically post an article on @samp{comp.unix.wizards} saying that
7680 you have just viewed the file in question.  This feature can't be turned
7681 off.
7682
7683
7684 @node Shell Archives
7685 @subsection Shell Archives
7686 @cindex unshar
7687 @cindex shell archives
7688 @cindex shared articles
7689
7690 Shell archives (``shar files'') used to be a popular way to distribute
7691 sources, but it isn't used all that much today.  In any case, we have
7692 some commands to deal with these:
7693
7694 @table @kbd
7695
7696 @item X s
7697 @kindex X s (Summary)
7698 @findex gnus-uu-decode-unshar
7699 Unshars the current series (@code{gnus-uu-decode-unshar}).
7700
7701 @item X S
7702 @kindex X S (Summary)
7703 @findex gnus-uu-decode-unshar-and-save
7704 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7705
7706 @item X v s
7707 @kindex X v s (Summary)
7708 @findex gnus-uu-decode-unshar-view
7709 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7710
7711 @item X v S
7712 @kindex X v S (Summary)
7713 @findex gnus-uu-decode-unshar-and-save-view
7714 Unshars, views and saves the current series
7715 (@code{gnus-uu-decode-unshar-and-save-view}).
7716 @end table
7717
7718
7719 @node PostScript Files
7720 @subsection PostScript Files
7721 @cindex PostScript
7722
7723 @table @kbd
7724
7725 @item X p
7726 @kindex X p (Summary)
7727 @findex gnus-uu-decode-postscript
7728 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7729
7730 @item X P
7731 @kindex X P (Summary)
7732 @findex gnus-uu-decode-postscript-and-save
7733 Unpack and save the current PostScript series
7734 (@code{gnus-uu-decode-postscript-and-save}).
7735
7736 @item X v p
7737 @kindex X v p (Summary)
7738 @findex gnus-uu-decode-postscript-view
7739 View the current PostScript series
7740 (@code{gnus-uu-decode-postscript-view}).
7741
7742 @item X v P
7743 @kindex X v P (Summary)
7744 @findex gnus-uu-decode-postscript-and-save-view
7745 View and save the current PostScript series
7746 (@code{gnus-uu-decode-postscript-and-save-view}).
7747 @end table
7748
7749
7750 @node Other Files
7751 @subsection Other Files
7752
7753 @table @kbd
7754 @item X o
7755 @kindex X o (Summary)
7756 @findex gnus-uu-decode-save
7757 Save the current series
7758 (@code{gnus-uu-decode-save}).
7759
7760 @item X b
7761 @kindex X b (Summary)
7762 @findex gnus-uu-decode-binhex
7763 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7764 doesn't really work yet.
7765 @end table
7766
7767
7768 @node Decoding Variables
7769 @subsection Decoding Variables
7770
7771 Adjective, not verb.
7772
7773 @menu
7774 * Rule Variables::              Variables that say how a file is to be viewed.
7775 * Other Decode Variables::      Other decode variables.
7776 * Uuencoding and Posting::      Variables for customizing uuencoding.
7777 @end menu
7778
7779
7780 @node Rule Variables
7781 @subsubsection Rule Variables
7782 @cindex rule variables
7783
7784 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7785 variables are of the form
7786
7787 @lisp
7788       (list '(regexp1 command2)
7789             '(regexp2 command2)
7790             ...)
7791 @end lisp
7792
7793 @table @code
7794
7795 @item gnus-uu-user-view-rules
7796 @vindex gnus-uu-user-view-rules
7797 @cindex sox
7798 This variable is consulted first when viewing files.  If you wish to use,
7799 for instance, @code{sox} to convert an @file{.au} sound file, you could
7800 say something like:
7801 @lisp
7802 (setq gnus-uu-user-view-rules
7803       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7804 @end lisp
7805
7806 @item gnus-uu-user-view-rules-end
7807 @vindex gnus-uu-user-view-rules-end
7808 This variable is consulted if Gnus couldn't make any matches from the
7809 user and default view rules.
7810
7811 @item gnus-uu-user-archive-rules
7812 @vindex gnus-uu-user-archive-rules
7813 This variable can be used to say what commands should be used to unpack
7814 archives.
7815 @end table
7816
7817
7818 @node Other Decode Variables
7819 @subsubsection Other Decode Variables
7820
7821 @table @code
7822 @vindex gnus-uu-grabbed-file-functions
7823
7824 @item gnus-uu-grabbed-file-functions
7825 All functions in this list will be called right after each file has been
7826 successfully decoded---so that you can move or view files right away,
7827 and don't have to wait for all files to be decoded before you can do
7828 anything.  Ready-made functions you can put in this list are:
7829
7830 @table @code
7831
7832 @item gnus-uu-grab-view
7833 @findex gnus-uu-grab-view
7834 View the file.
7835
7836 @item gnus-uu-grab-move
7837 @findex gnus-uu-grab-move
7838 Move the file (if you're using a saving function.)
7839 @end table
7840
7841 @item gnus-uu-be-dangerous
7842 @vindex gnus-uu-be-dangerous
7843 Specifies what to do if unusual situations arise during decoding.  If
7844 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7845 that didn't work, and overwrite existing files.  Otherwise, ask each
7846 time.
7847
7848 @item gnus-uu-ignore-files-by-name
7849 @vindex gnus-uu-ignore-files-by-name
7850 Files with name matching this regular expression won't be viewed.
7851
7852 @item gnus-uu-ignore-files-by-type
7853 @vindex gnus-uu-ignore-files-by-type
7854 Files with a @acronym{MIME} type matching this variable won't be viewed.
7855 Note that Gnus tries to guess what type the file is based on the name.
7856 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7857 kludgey.
7858
7859 @item gnus-uu-tmp-dir
7860 @vindex gnus-uu-tmp-dir
7861 Where @code{gnus-uu} does its work.
7862
7863 @item gnus-uu-do-not-unpack-archives
7864 @vindex gnus-uu-do-not-unpack-archives
7865 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7866 looking for files to display.
7867
7868 @item gnus-uu-view-and-save
7869 @vindex gnus-uu-view-and-save
7870 Non-@code{nil} means that the user will always be asked to save a file
7871 after viewing it.
7872
7873 @item gnus-uu-ignore-default-view-rules
7874 @vindex gnus-uu-ignore-default-view-rules
7875 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7876 rules.
7877
7878 @item gnus-uu-ignore-default-archive-rules
7879 @vindex gnus-uu-ignore-default-archive-rules
7880 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7881 unpacking commands.
7882
7883 @item gnus-uu-kill-carriage-return
7884 @vindex gnus-uu-kill-carriage-return
7885 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7886 from articles.
7887
7888 @item gnus-uu-unmark-articles-not-decoded
7889 @vindex gnus-uu-unmark-articles-not-decoded
7890 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7891 decoded articles as unread.
7892
7893 @item gnus-uu-correct-stripped-uucode
7894 @vindex gnus-uu-correct-stripped-uucode
7895 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7896 uuencoded files that have had trailing spaces deleted.
7897
7898 @item gnus-uu-pre-uudecode-hook
7899 @vindex gnus-uu-pre-uudecode-hook
7900 Hook run before sending a message to @code{uudecode}.
7901
7902 @item gnus-uu-view-with-metamail
7903 @vindex gnus-uu-view-with-metamail
7904 @cindex metamail
7905 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7906 commands defined by the rule variables and just fudge a @acronym{MIME}
7907 content type based on the file name.  The result will be fed to
7908 @code{metamail} for viewing.
7909
7910 @item gnus-uu-save-in-digest
7911 @vindex gnus-uu-save-in-digest
7912 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7913 decoding, will save in digests.  If this variable is @code{nil},
7914 @code{gnus-uu} will just save everything in a file without any
7915 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7916 to specify any meaningful volume and issue numbers were found, so I
7917 simply dropped them.
7918
7919 @end table
7920
7921
7922 @node Uuencoding and Posting
7923 @subsubsection Uuencoding and Posting
7924
7925 @table @code
7926
7927 @item gnus-uu-post-include-before-composing
7928 @vindex gnus-uu-post-include-before-composing
7929 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7930 before you compose the article.  If this variable is @code{t}, you can
7931 either include an encoded file with @kbd{C-c C-i} or have one included
7932 for you when you post the article.
7933
7934 @item gnus-uu-post-length
7935 @vindex gnus-uu-post-length
7936 Maximum length of an article.  The encoded file will be split into how
7937 many articles it takes to post the entire file.
7938
7939 @item gnus-uu-post-threaded
7940 @vindex gnus-uu-post-threaded
7941 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7942 thread.  This may not be smart, as no other decoder I have seen is able
7943 to follow threads when collecting uuencoded articles.  (Well, I have
7944 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7945 think that counts@dots{}) Default is @code{nil}.
7946
7947 @item gnus-uu-post-separate-description
7948 @vindex gnus-uu-post-separate-description
7949 Non-@code{nil} means that the description will be posted in a separate
7950 article.  The first article will typically be numbered (0/x).  If this
7951 variable is @code{nil}, the description the user enters will be included
7952 at the beginning of the first article, which will be numbered (1/x).
7953 Default is @code{t}.
7954
7955 @end table
7956
7957
7958 @node Viewing Files
7959 @subsection Viewing Files
7960 @cindex viewing files
7961 @cindex pseudo-articles
7962
7963 After decoding, if the file is some sort of archive, Gnus will attempt
7964 to unpack the archive and see if any of the files in the archive can be
7965 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7966 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7967 uncompress and de-tar the main file, and then view the two pictures.
7968 This unpacking process is recursive, so if the archive contains archives
7969 of archives, it'll all be unpacked.
7970
7971 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7972 extracted file into the summary buffer.  If you go to these
7973 ``articles'', you will be prompted for a command to run (usually Gnus
7974 will make a suggestion), and then the command will be run.
7975
7976 @vindex gnus-view-pseudo-asynchronously
7977 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7978 until the viewing is done before proceeding.
7979
7980 @vindex gnus-view-pseudos
7981 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7982 the pseudo-articles into the summary buffer, but view them
7983 immediately.  If this variable is @code{not-confirm}, the user won't even
7984 be asked for a confirmation before viewing is done.
7985
7986 @vindex gnus-view-pseudos-separately
7987 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7988 pseudo-article will be created for each file to be viewed.  If
7989 @code{nil}, all files that use the same viewing command will be given as
7990 a list of parameters to that command.
7991
7992 @vindex gnus-insert-pseudo-articles
7993 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7994 pseudo-articles when decoding.  It is @code{t} by default.
7995
7996 So; there you are, reading your @emph{pseudo-articles} in your
7997 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7998 Why isn't anything real anymore? How did we get here?
7999
8000
8001 @node Article Treatment
8002 @section Article Treatment
8003
8004 Reading through this huge manual, you may have quite forgotten that the
8005 object of newsreaders is to actually, like, read what people have
8006 written.  Reading articles.  Unfortunately, people are quite bad at
8007 writing, so there are tons of functions and variables to make reading
8008 these articles easier.
8009
8010 @menu
8011 * Article Highlighting::        You want to make the article look like fruit salad.
8012 * Article Fontisizing::         Making emphasized text look nice.
8013 * Article Hiding::              You also want to make certain info go away.
8014 * Article Washing::             Lots of way-neat functions to make life better.
8015 * Article Header::              Doing various header transformations.
8016 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
8017 * Article Button Levels::       Controlling appearance of buttons.
8018 * Article Date::                Grumble, UT!
8019 * Article Display::             Display various stuff---X-Face, Picons, Smileys
8020 * Article Signature::           What is a signature?
8021 * Article Miscellanea::         Various other stuff.
8022 @end menu
8023
8024
8025 @node Article Highlighting
8026 @subsection Article Highlighting
8027 @cindex highlighting
8028
8029 Not only do you want your article buffer to look like fruit salad, but
8030 you want it to look like technicolor fruit salad.
8031
8032 @table @kbd
8033
8034 @item W H a
8035 @kindex W H a (Summary)
8036 @findex gnus-article-highlight
8037 @findex gnus-article-maybe-highlight
8038 Do much highlighting of the current article
8039 (@code{gnus-article-highlight}).  This function highlights header, cited
8040 text, the signature, and adds buttons to the body and the head.
8041
8042 @item W H h
8043 @kindex W H h (Summary)
8044 @findex gnus-article-highlight-headers
8045 @vindex gnus-header-face-alist
8046 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8047 highlighting will be done according to the @code{gnus-header-face-alist}
8048 variable, which is a list where each element has the form
8049 @code{(@var{regexp} @var{name} @var{content})}.
8050 @var{regexp} is a regular expression for matching the
8051 header, @var{name} is the face used for highlighting the header name
8052 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8053 the header value.  The first match made will be used.  Note that
8054 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8055
8056 @item W H c
8057 @kindex W H c (Summary)
8058 @findex gnus-article-highlight-citation
8059 Highlight cited text (@code{gnus-article-highlight-citation}).
8060
8061 Some variables to customize the citation highlights:
8062
8063 @table @code
8064 @vindex gnus-cite-parse-max-size
8065
8066 @item gnus-cite-parse-max-size
8067 If the article size if bigger than this variable (which is 25000 by
8068 default), no citation highlighting will be performed.
8069
8070 @item gnus-cite-max-prefix
8071 @vindex gnus-cite-max-prefix
8072 Maximum possible length for a citation prefix (default 20).
8073
8074 @item gnus-cite-face-list
8075 @vindex gnus-cite-face-list
8076 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8077 When there are citations from multiple articles in the same message,
8078 Gnus will try to give each citation from each article its own face.
8079 This should make it easier to see who wrote what.
8080
8081 @item gnus-supercite-regexp
8082 @vindex gnus-supercite-regexp
8083 Regexp matching normal Supercite attribution lines.
8084
8085 @item gnus-supercite-secondary-regexp
8086 @vindex gnus-supercite-secondary-regexp
8087 Regexp matching mangled Supercite attribution lines.
8088
8089 @item gnus-cite-minimum-match-count
8090 @vindex gnus-cite-minimum-match-count
8091 Minimum number of identical prefixes we have to see before we believe
8092 that it's a citation.
8093
8094 @item gnus-cite-attribution-prefix
8095 @vindex gnus-cite-attribution-prefix
8096 Regexp matching the beginning of an attribution line.
8097
8098 @item gnus-cite-attribution-suffix
8099 @vindex gnus-cite-attribution-suffix
8100 Regexp matching the end of an attribution line.
8101
8102 @item gnus-cite-attribution-face
8103 @vindex gnus-cite-attribution-face
8104 Face used for attribution lines.  It is merged with the face for the
8105 cited text belonging to the attribution.
8106
8107 @item gnus-cite-ignore-quoted-from
8108 @vindex gnus-cite-ignore-quoted-from
8109 If non-@code{nil}, no citation highlighting will be performed on lines
8110 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
8111 in order not to mix up with the envelope From line.  The default value
8112 is @code{t}.
8113
8114 @end table
8115
8116
8117 @item W H s
8118 @kindex W H s (Summary)
8119 @vindex gnus-signature-separator
8120 @vindex gnus-signature-face
8121 @findex gnus-article-highlight-signature
8122 Highlight the signature (@code{gnus-article-highlight-signature}).
8123 Everything after @code{gnus-signature-separator} (@pxref{Article
8124 Signature}) in an article will be considered a signature and will be
8125 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8126 default.
8127
8128 @end table
8129
8130 @xref{Customizing Articles}, for how to highlight articles automatically.
8131
8132
8133 @node Article Fontisizing
8134 @subsection Article Fontisizing
8135 @cindex emphasis
8136 @cindex article emphasis
8137
8138 @findex gnus-article-emphasize
8139 @kindex W e (Summary)
8140 People commonly add emphasis to words in news articles by writing things
8141 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8142 this look nicer by running the article through the @kbd{W e}
8143 (@code{gnus-article-emphasize}) command.
8144
8145 @vindex gnus-emphasis-alist
8146 How the emphasis is computed is controlled by the
8147 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8148 element is a regular expression to be matched.  The second is a number
8149 that says what regular expression grouping is used to find the entire
8150 emphasized word.  The third is a number that says what regexp grouping
8151 should be displayed and highlighted.  (The text between these two
8152 groupings will be hidden.)  The fourth is the face used for
8153 highlighting.
8154
8155 @lisp
8156 (setq gnus-emphasis-alist
8157       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8158         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8159 @end lisp
8160
8161 @cindex slash
8162 @cindex asterisk
8163 @cindex underline
8164 @cindex /
8165 @cindex *
8166
8167 @vindex gnus-emphasis-underline
8168 @vindex gnus-emphasis-bold
8169 @vindex gnus-emphasis-italic
8170 @vindex gnus-emphasis-underline-bold
8171 @vindex gnus-emphasis-underline-italic
8172 @vindex gnus-emphasis-bold-italic
8173 @vindex gnus-emphasis-underline-bold-italic
8174 By default, there are seven rules, and they use the following faces:
8175 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8176 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8177 @code{gnus-emphasis-underline-italic},
8178 @code{gnus-emphasis-underline-bold}, and
8179 @code{gnus-emphasis-underline-bold-italic}.
8180
8181 If you want to change these faces, you can either use @kbd{M-x
8182 customize}, or you can use @code{copy-face}.  For instance, if you want
8183 to make @code{gnus-emphasis-italic} use a red face instead, you could
8184 say something like:
8185
8186 @lisp
8187 (copy-face 'red 'gnus-emphasis-italic)
8188 @end lisp
8189
8190 @vindex gnus-group-highlight-words-alist
8191
8192 If you want to highlight arbitrary words, you can use the
8193 @code{gnus-group-highlight-words-alist} variable, which uses the same
8194 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8195 parameter (@pxref{Group Parameters}) can also be used.
8196
8197 @xref{Customizing Articles}, for how to fontize articles automatically.
8198
8199
8200 @node Article Hiding
8201 @subsection Article Hiding
8202 @cindex article hiding
8203
8204 Or rather, hiding certain things in each article.  There usually is much
8205 too much cruft in most articles.
8206
8207 @table @kbd
8208
8209 @item W W a
8210 @kindex W W a (Summary)
8211 @findex gnus-article-hide
8212 Do quite a lot of hiding on the article buffer
8213 (@kbd{gnus-article-hide}).  In particular, this function will hide
8214 headers, @acronym{PGP}, cited text and the signature.
8215
8216 @item W W h
8217 @kindex W W h (Summary)
8218 @findex gnus-article-hide-headers
8219 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8220 Headers}.
8221
8222 @item W W b
8223 @kindex W W b (Summary)
8224 @findex gnus-article-hide-boring-headers
8225 Hide headers that aren't particularly interesting
8226 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8227
8228 @item W W s
8229 @kindex W W s (Summary)
8230 @findex gnus-article-hide-signature
8231 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8232 Signature}.
8233
8234 @item W W l
8235 @kindex W W l (Summary)
8236 @findex gnus-article-hide-list-identifiers
8237 @vindex gnus-list-identifiers
8238 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8239 are strings some mailing list servers add to the beginning of all
8240 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8241 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8242 may not contain @code{\\(..\\)}.
8243
8244 @table @code
8245
8246 @item gnus-list-identifiers
8247 @vindex gnus-list-identifiers
8248 A regular expression that matches list identifiers to be removed from
8249 subject.  This can also be a list of regular expressions.
8250
8251 @end table
8252
8253 @item W W P
8254 @kindex W W P (Summary)
8255 @findex gnus-article-hide-pem
8256 Hide @acronym{PEM} (privacy enhanced messages) cruft
8257 (@code{gnus-article-hide-pem}).
8258
8259 @item W W B
8260 @kindex W W B (Summary)
8261 @findex gnus-article-strip-banner
8262 @vindex gnus-article-banner-alist
8263 @vindex gnus-article-address-banner-alist
8264 @cindex banner
8265 @cindex OneList
8266 @cindex stripping advertisements
8267 @cindex advertisements
8268 Strip the banner specified by the @code{banner} group parameter
8269 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8270 annoying banners and/or signatures that some mailing lists and moderated
8271 groups adds to all the messages.  The way to use this function is to add
8272 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8273 group you want banners stripped from.  The parameter either be a string,
8274 which will be interpreted as a regular expression matching text to be
8275 removed, or the symbol @code{signature}, meaning that the (last)
8276 signature should be removed, or other symbol, meaning that the
8277 corresponding regular expression in @code{gnus-article-banner-alist} is
8278 used.
8279
8280 Regardless of a group, you can hide things like advertisements only when
8281 the sender of an article has a certain mail address specified in
8282 @code{gnus-article-address-banner-alist}.
8283
8284 @table @code
8285
8286 @item gnus-article-address-banner-alist
8287 @vindex gnus-article-address-banner-alist
8288 Alist of mail addresses and banners.  Each element has the form
8289 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8290 matching a mail address in the From header, @var{banner} is one of a
8291 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8292 a regexp and @code{nil}.  If @var{address} matches author's mail
8293 address, it will remove things like advertisements.  For example, if a
8294 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8295 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8296 sends, you can use the following element to remove them:
8297
8298 @lisp
8299 ("@@yoo-hoo\\.co\\.jp\\'" .
8300  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8301 @end lisp
8302
8303 @end table
8304
8305 @item W W c
8306 @kindex W W c (Summary)
8307 @findex gnus-article-hide-citation
8308 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8309 customizing the hiding:
8310
8311 @table @code
8312
8313 @item gnus-cited-opened-text-button-line-format
8314 @itemx gnus-cited-closed-text-button-line-format
8315 @vindex gnus-cited-closed-text-button-line-format
8316 @vindex gnus-cited-opened-text-button-line-format
8317 Gnus adds buttons to show where the cited text has been hidden, and to
8318 allow toggle hiding the text.  The format of the variable is specified
8319 by these format-like variable (@pxref{Formatting Variables}).  These
8320 specs are valid:
8321
8322 @table @samp
8323 @item b
8324 Starting point of the hidden text.
8325 @item e
8326 Ending point of the hidden text.
8327 @item l
8328 Number of characters in the hidden region.
8329 @item n
8330 Number of lines of hidden text.
8331 @end table
8332
8333 @item gnus-cited-lines-visible
8334 @vindex gnus-cited-lines-visible
8335 The number of lines at the beginning of the cited text to leave
8336 shown.  This can also be a cons cell with the number of lines at the top
8337 and bottom of the text, respectively, to remain visible.
8338
8339 @end table
8340
8341 @item W W C-c
8342 @kindex W W C-c (Summary)
8343 @findex gnus-article-hide-citation-maybe
8344
8345 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8346 following two variables:
8347
8348 @table @code
8349 @item gnus-cite-hide-percentage
8350 @vindex gnus-cite-hide-percentage
8351 If the cited text is of a bigger percentage than this variable (default
8352 50), hide the cited text.
8353
8354 @item gnus-cite-hide-absolute
8355 @vindex gnus-cite-hide-absolute
8356 The cited text must have at least this length (default 10) before it
8357 is hidden.
8358 @end table
8359
8360 @item W W C
8361 @kindex W W C (Summary)
8362 @findex gnus-article-hide-citation-in-followups
8363 Hide cited text in articles that aren't roots
8364 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8365 useful as an interactive command, but might be a handy function to stick
8366 have happen automatically (@pxref{Customizing Articles}).
8367
8368 @end table
8369
8370 All these ``hiding'' commands are toggles, but if you give a negative
8371 prefix to these commands, they will show what they have previously
8372 hidden.  If you give a positive prefix, they will always hide.
8373
8374 Also @pxref{Article Highlighting} for further variables for
8375 citation customization.
8376
8377 @xref{Customizing Articles}, for how to hide article elements
8378 automatically.
8379
8380
8381 @node Article Washing
8382 @subsection Article Washing
8383 @cindex washing
8384 @cindex article washing
8385
8386 We call this ``article washing'' for a really good reason.  Namely, the
8387 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8388
8389 @dfn{Washing} is defined by us as ``changing something from something to
8390 something else'', but normally results in something looking better.
8391 Cleaner, perhaps.
8392
8393 @xref{Customizing Articles}, if you want to change how Gnus displays
8394 articles by default.
8395
8396 @table @kbd
8397
8398 @item C-u g
8399 This is not really washing, it's sort of the opposite of washing.  If
8400 you type this, you see the article exactly as it exists on disk or on
8401 the server.
8402
8403 @item g
8404 Force redisplaying of the current article
8405 (@code{gnus-summary-show-article}).  This is also not really washing.
8406 If you type this, you see the article without any previously applied
8407 interactive Washing functions but with all default treatments
8408 (@pxref{Customizing Articles}).
8409
8410 @item W l
8411 @kindex W l (Summary)
8412 @findex gnus-summary-stop-page-breaking
8413 Remove page breaks from the current article
8414 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8415 delimiters.
8416
8417 @item W r
8418 @kindex W r (Summary)
8419 @findex gnus-summary-caesar-message
8420 @c @icon{gnus-summary-caesar-message}
8421 Do a Caesar rotate (rot13) on the article buffer
8422 (@code{gnus-summary-caesar-message}).
8423 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8424 (Typically offensive jokes and such.)
8425
8426 It's commonly called ``rot13'' because each letter is rotated 13
8427 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8428 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8429 is rumored to have employed this form of, uh, somewhat weak encryption.
8430
8431 @item W m
8432 @kindex W m (Summary)
8433 @findex gnus-summary-morse-message
8434 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8435
8436 @item W t
8437 @item t
8438 @kindex W t (Summary)
8439 @kindex t (Summary)
8440 @findex gnus-summary-toggle-header
8441 Toggle whether to display all headers in the article buffer
8442 (@code{gnus-summary-toggle-header}).
8443
8444 @item W v
8445 @kindex W v (Summary)
8446 @findex gnus-summary-verbose-headers
8447 Toggle whether to display all headers in the article buffer permanently
8448 (@code{gnus-summary-verbose-headers}).
8449
8450 @item W o
8451 @kindex W o (Summary)
8452 @findex gnus-article-treat-overstrike
8453 Treat overstrike (@code{gnus-article-treat-overstrike}).
8454
8455 @item W d
8456 @kindex W d (Summary)
8457 @findex gnus-article-treat-dumbquotes
8458 @vindex gnus-article-dumbquotes-map
8459 @cindex Smartquotes
8460 @cindex M****s*** sm*rtq**t*s
8461 @cindex Latin 1
8462 Treat M****s*** sm*rtq**t*s according to
8463 @code{gnus-article-dumbquotes-map}
8464 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8465 whether a character is a sm*rtq**t* or not, so it should only be used
8466 interactively.
8467
8468 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8469 an attempt to provide more quoting characters.  If you see something
8470 like @code{\222} or @code{\264} where you're expecting some kind of
8471 apostrophe or quotation mark, then try this wash.
8472
8473 @item W Y f
8474 @kindex W Y f (Summary)
8475 @findex gnus-article-outlook-deuglify-article
8476 @cindex Outlook Express
8477 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8478 unwrap lines, repair attribution and rearrange citation.
8479 (@code{gnus-article-outlook-deuglify-article}).
8480
8481 @item W Y u
8482 @kindex W Y u (Summary)
8483 @findex gnus-article-outlook-unwrap-lines
8484 @vindex gnus-outlook-deuglify-unwrap-min
8485 @vindex gnus-outlook-deuglify-unwrap-max
8486 Unwrap lines that appear to be wrapped citation lines.  You can control
8487 what lines will be unwrapped by frobbing
8488 @code{gnus-outlook-deuglify-unwrap-min} and
8489 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8490 maximum length of an unwrapped citation line.
8491 (@code{gnus-article-outlook-unwrap-lines}).
8492
8493 @item W Y a
8494 @kindex W Y a (Summary)
8495 @findex gnus-article-outlook-repair-attribution
8496 Repair a broken attribution line.@*
8497 (@code{gnus-article-outlook-repair-attribution}).
8498
8499 @item W Y c
8500 @kindex W Y c (Summary)
8501 @findex gnus-article-outlook-rearrange-citation
8502 Repair broken citations by rearranging the text.
8503 (@code{gnus-article-outlook-rearrange-citation}).
8504
8505 @item W w
8506 @kindex W w (Summary)
8507 @findex gnus-article-fill-cited-article
8508 Do word wrap (@code{gnus-article-fill-cited-article}).
8509
8510 You can give the command a numerical prefix to specify the width to use
8511 when filling.
8512
8513 @item W Q
8514 @kindex W Q (Summary)
8515 @findex gnus-article-fill-long-lines
8516 Fill long lines (@code{gnus-article-fill-long-lines}).
8517
8518 @item W C
8519 @kindex W C (Summary)
8520 @findex gnus-article-capitalize-sentences
8521 Capitalize the first word in each sentence
8522 (@code{gnus-article-capitalize-sentences}).
8523
8524 @item W c
8525 @kindex W c (Summary)
8526 @findex gnus-article-remove-cr
8527 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8528 (this takes care of DOS line endings), and then translate any remaining
8529 CRs into LF (this takes care of Mac line endings)
8530 (@code{gnus-article-remove-cr}).
8531
8532 @item W q
8533 @kindex W q (Summary)
8534 @findex gnus-article-de-quoted-unreadable
8535 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8536 Quoted-Printable is one common @acronym{MIME} encoding employed when
8537 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8538 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
8539 which doesn't look very readable to me.  Note that this is usually
8540 done automatically by Gnus if the message in question has a
8541 @code{Content-Transfer-Encoding} header that says that this encoding
8542 has been done.  If a prefix is given, a charset will be asked for.
8543
8544 @item W 6
8545 @kindex W 6 (Summary)
8546 @findex gnus-article-de-base64-unreadable
8547 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8548 one common @acronym{MIME} encoding employed when sending
8549 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8550 usually done automatically by Gnus if the message in question has a
8551 @code{Content-Transfer-Encoding} header that says that this encoding
8552 has been done.  If a prefix is given, a charset will be asked for.
8553
8554 @item W Z
8555 @kindex W Z (Summary)
8556 @findex gnus-article-decode-HZ
8557 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8558 common encoding employed when sending Chinese articles.  It typically
8559 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8560
8561 @item W A
8562 @kindex W A (Summary)
8563 @findex gnus-article-treat-ansi-sequences
8564 @cindex @acronym{ANSI} control sequences
8565 Translate @acronym{ANSI} SGR control sequences into overlays or
8566 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
8567 sequences are used in some Chinese hierarchies for highlighting.
8568
8569 @item W u
8570 @kindex W u (Summary)
8571 @findex gnus-article-unsplit-urls
8572 Remove newlines from within URLs.  Some mailers insert newlines into
8573 outgoing email messages to keep lines short.  This reformatting can
8574 split long URLs onto multiple lines.  Repair those URLs by removing
8575 the newlines (@code{gnus-article-unsplit-urls}).
8576
8577 @item W h
8578 @kindex W h (Summary)
8579 @findex gnus-article-wash-html
8580 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8581 usually done automatically by Gnus if the message in question has a
8582 @code{Content-Type} header that says that the message is @acronym{HTML}.
8583
8584 If a prefix is given, a charset will be asked for.
8585
8586 @vindex gnus-article-wash-function
8587 The default is to use the function specified by
8588 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8589 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8590 @acronym{HTML}, but this is controlled by the
8591 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8592 can use include:
8593
8594 @table @code
8595 @item w3
8596 Use Emacs/w3.
8597
8598 @item w3m
8599 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8600
8601 @item links
8602 Use @uref{http://links.sf.net/, Links}.
8603
8604 @item lynx
8605 Use @uref{http://lynx.isc.org/, Lynx}.
8606
8607 @item html2text
8608 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8609
8610 @end table
8611
8612 @item W b
8613 @kindex W b (Summary)
8614 @findex gnus-article-add-buttons
8615 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8616 @xref{Article Buttons}.
8617
8618 @item W B
8619 @kindex W B (Summary)
8620 @findex gnus-article-add-buttons-to-head
8621 Add clickable buttons to the article headers
8622 (@code{gnus-article-add-buttons-to-head}).
8623
8624 @item W p
8625 @kindex W p (Summary)
8626 @findex gnus-article-verify-x-pgp-sig
8627 Verify a signed control message
8628 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8629 @code{newgroup} and @code{checkgroups} are usually signed by the
8630 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8631 the maintainer to your keyring to verify the
8632 message.@footnote{@acronym{PGP} keys for many hierarchies are
8633 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8634
8635 @item W s
8636 @kindex W s (Summary)
8637 @findex gnus-summary-force-verify-and-decrypt
8638 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8639 @acronym{S/MIME}) message
8640 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8641
8642 @item W a
8643 @kindex W a (Summary)
8644 @findex gnus-article-strip-headers-in-body
8645 Strip headers like the @code{X-No-Archive} header from the beginning of
8646 article bodies (@code{gnus-article-strip-headers-in-body}).
8647
8648 @item W E l
8649 @kindex W E l (Summary)
8650 @findex gnus-article-strip-leading-blank-lines
8651 Remove all blank lines from the beginning of the article
8652 (@code{gnus-article-strip-leading-blank-lines}).
8653
8654 @item W E m
8655 @kindex W E m (Summary)
8656 @findex gnus-article-strip-multiple-blank-lines
8657 Replace all blank lines with empty lines and then all multiple empty
8658 lines with a single empty line.
8659 (@code{gnus-article-strip-multiple-blank-lines}).
8660
8661 @item W E t
8662 @kindex W E t (Summary)
8663 @findex gnus-article-remove-trailing-blank-lines
8664 Remove all blank lines at the end of the article
8665 (@code{gnus-article-remove-trailing-blank-lines}).
8666
8667 @item W E a
8668 @kindex W E a (Summary)
8669 @findex gnus-article-strip-blank-lines
8670 Do all the three commands above
8671 (@code{gnus-article-strip-blank-lines}).
8672
8673 @item W E A
8674 @kindex W E A (Summary)
8675 @findex gnus-article-strip-all-blank-lines
8676 Remove all blank lines
8677 (@code{gnus-article-strip-all-blank-lines}).
8678
8679 @item W E s
8680 @kindex W E s (Summary)
8681 @findex gnus-article-strip-leading-space
8682 Remove all white space from the beginning of all lines of the article
8683 body (@code{gnus-article-strip-leading-space}).
8684
8685 @item W E e
8686 @kindex W E e (Summary)
8687 @findex gnus-article-strip-trailing-space
8688 Remove all white space from the end of all lines of the article
8689 body (@code{gnus-article-strip-trailing-space}).
8690
8691 @end table
8692
8693 @xref{Customizing Articles}, for how to wash articles automatically.
8694
8695
8696 @node Article Header
8697 @subsection Article Header
8698
8699 These commands perform various transformations of article header.
8700
8701 @table @kbd
8702
8703 @item W G u
8704 @kindex W G u (Summary)
8705 @findex gnus-article-treat-unfold-headers
8706 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8707
8708 @item W G n
8709 @kindex W G n (Summary)
8710 @findex gnus-article-treat-fold-newsgroups
8711 Fold the @code{Newsgroups} and @code{Followup-To} headers
8712 (@code{gnus-article-treat-fold-newsgroups}).
8713
8714 @item W G f
8715 @kindex W G f (Summary)
8716 @findex gnus-article-treat-fold-headers
8717 Fold all the message headers
8718 (@code{gnus-article-treat-fold-headers}).
8719
8720 @item W E w
8721 @kindex W E w (Summary)
8722 @findex gnus-article-remove-leading-whitespace
8723 Remove excessive whitespace from all headers
8724 (@code{gnus-article-remove-leading-whitespace}).
8725
8726 @end table
8727
8728
8729 @node Article Buttons
8730 @subsection Article Buttons
8731 @cindex buttons
8732
8733 People often include references to other stuff in articles, and it would
8734 be nice if Gnus could just fetch whatever it is that people talk about
8735 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8736 button on these references.
8737
8738 @vindex gnus-button-man-handler
8739 Gnus adds @dfn{buttons} to certain standard references by default:
8740 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8741 Emacs or Gnus related references.  This is controlled by two variables,
8742 one that handles article bodies and one that handles article heads:
8743
8744 @table @code
8745
8746 @item gnus-button-alist
8747 @vindex gnus-button-alist
8748 This is an alist where each entry has this form:
8749
8750 @lisp
8751 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8752 @end lisp
8753
8754 @table @var
8755
8756 @item regexp
8757 All text that match this regular expression (case insensitive) will be
8758 considered an external reference.  Here's a typical regexp that matches
8759 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8760 variable containing a regexp, useful variables to use include
8761 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8762
8763 @item button-par
8764 Gnus has to know which parts of the matches is to be highlighted.  This
8765 is a number that says what sub-expression of the regexp is to be
8766 highlighted.  If you want it all highlighted, you use 0 here.
8767
8768 @item use-p
8769 This form will be @code{eval}ed, and if the result is non-@code{nil},
8770 this is considered a match.  This is useful if you want extra sifting to
8771 avoid false matches.  Often variables named
8772 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8773 Levels}, but any other form may be used too.
8774
8775 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8776
8777 @item function
8778 This function will be called when you click on this button.
8779
8780 @item data-par
8781 As with @var{button-par}, this is a sub-expression number, but this one
8782 says which part of the match is to be sent as data to @var{function}.
8783
8784 @end table
8785
8786 So the full entry for buttonizing URLs is then
8787
8788 @lisp
8789 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8790 @end lisp
8791
8792 @item gnus-header-button-alist
8793 @vindex gnus-header-button-alist
8794 This is just like the other alist, except that it is applied to the
8795 article head only, and that each entry has an additional element that is
8796 used to say what headers to apply the buttonize coding to:
8797
8798 @lisp
8799 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8800 @end lisp
8801
8802 @var{header} is a regular expression.
8803 @end table
8804
8805 @subsubsection Related variables and functions
8806
8807 @table @code
8808 @item gnus-button-@var{*}-level
8809 @xref{Article Button Levels}.
8810
8811 @c Stuff related to gnus-button-browse-level
8812
8813 @item gnus-button-url-regexp
8814 @vindex gnus-button-url-regexp
8815 A regular expression that matches embedded URLs.  It is used in the
8816 default values of the variables above.
8817
8818 @c Stuff related to gnus-button-man-level
8819
8820 @item gnus-button-man-handler
8821 @vindex gnus-button-man-handler
8822 The function to use for displaying man pages.  It must take at least one
8823 argument with a string naming the man page.
8824
8825 @c Stuff related to gnus-button-message-level
8826
8827 @item gnus-button-mid-or-mail-regexp
8828 @vindex gnus-button-mid-or-mail-regexp
8829 Regular expression that matches a message ID or a mail address.
8830
8831 @item gnus-button-prefer-mid-or-mail
8832 @vindex gnus-button-prefer-mid-or-mail
8833 This variable determines what to do when the button on a string as
8834 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8835 message ID or a mail address.  If it is one of the symbols @code{mid} or
8836 @code{mail}, Gnus will always assume that the string is a message ID or
8837 a mail address, respectively.  If this variable is set to the symbol
8838 @code{ask}, always query the user what do do.  If it is a function, this
8839 function will be called with the string as its only argument.  The
8840 function must return @code{mid}, @code{mail}, @code{invalid} or
8841 @code{ask}.  The default value is the function
8842 @code{gnus-button-mid-or-mail-heuristic}.
8843
8844 @item gnus-button-mid-or-mail-heuristic
8845 @findex gnus-button-mid-or-mail-heuristic
8846 Function that guesses whether its argument is a message ID or a mail
8847 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8848 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8849 string is invalid.
8850
8851 @item gnus-button-mid-or-mail-heuristic-alist
8852 @vindex gnus-button-mid-or-mail-heuristic-alist
8853 An alist of @code{(RATE . REGEXP)} pairs used by the function
8854 @code{gnus-button-mid-or-mail-heuristic}.
8855
8856 @c Stuff related to gnus-button-tex-level
8857
8858 @item gnus-button-ctan-handler
8859 @findex gnus-button-ctan-handler
8860 The function to use for displaying CTAN links.  It must take one
8861 argument, the string naming the URL.
8862
8863 @item gnus-ctan-url
8864 @vindex gnus-ctan-url
8865 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8866 by @code{gnus-button-ctan-handler}.
8867
8868 @c Misc stuff
8869
8870 @item gnus-article-button-face
8871 @vindex gnus-article-button-face
8872 Face used on buttons.
8873
8874 @item gnus-article-mouse-face
8875 @vindex gnus-article-mouse-face
8876 Face used when the mouse cursor is over a button.
8877
8878 @end table
8879
8880 @xref{Customizing Articles}, for how to buttonize articles automatically.
8881
8882
8883 @node Article Button Levels
8884 @subsection Article button levels
8885 @cindex button levels
8886 The higher the value of the variables @code{gnus-button-@var{*}-level},
8887 the more buttons will appear.  If the level is zero, no corresponding
8888 buttons are displayed.  With the default value (which is 5) you should
8889 already see quite a lot of buttons.  With higher levels, you will see
8890 more buttons, but you may also get more false positives.  To avoid them,
8891 you can set the variables @code{gnus-button-@var{*}-level} local to
8892 specific groups (@pxref{Group Parameters}).  Here's an example for the
8893 variable @code{gnus-parameters}:
8894
8895 @lisp
8896 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8897 (setq gnus-parameters
8898       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8899         ("\\<unix\\>"               (gnus-button-man-level 10))
8900         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8901 @end lisp
8902
8903 @table @code
8904
8905 @item gnus-button-browse-level
8906 @vindex gnus-button-browse-level
8907 Controls the display of references to message IDs, mail addresses and
8908 news URLs.  Related variables and functions include
8909 @code{gnus-button-url-regexp}, @code{browse-url}, and
8910 @code{browse-url-browser-function}.
8911
8912 @item gnus-button-emacs-level
8913 @vindex gnus-button-emacs-level
8914 Controls the display of Emacs or Gnus references.  Related functions are
8915 @code{gnus-button-handle-custom},
8916 @code{gnus-button-handle-describe-function},
8917 @code{gnus-button-handle-describe-variable},
8918 @code{gnus-button-handle-symbol},
8919 @code{gnus-button-handle-describe-key},
8920 @code{gnus-button-handle-apropos},
8921 @code{gnus-button-handle-apropos-command},
8922 @code{gnus-button-handle-apropos-variable},
8923 @code{gnus-button-handle-apropos-documentation}, and
8924 @code{gnus-button-handle-library}.
8925
8926 @item gnus-button-man-level
8927 @vindex gnus-button-man-level
8928 Controls the display of references to (Unix) man pages.
8929 See @code{gnus-button-man-handler}.
8930
8931 @item gnus-button-message-level
8932 @vindex gnus-button-message-level
8933 Controls the display of message IDs, mail addresses and news URLs.
8934 Related variables and functions include
8935 @code{gnus-button-mid-or-mail-regexp},
8936 @code{gnus-button-prefer-mid-or-mail},
8937 @code{gnus-button-mid-or-mail-heuristic}, and
8938 @code{gnus-button-mid-or-mail-heuristic-alist}.
8939
8940 @item gnus-button-tex-level
8941 @vindex gnus-button-tex-level
8942 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8943 URLs.  See the variables @code{gnus-ctan-url},
8944 @code{gnus-button-ctan-handler},
8945 @code{gnus-button-ctan-directory-regexp}, and
8946 @code{gnus-button-handle-ctan-bogus-regexp}.
8947
8948 @end table
8949
8950
8951 @node Article Date
8952 @subsection Article Date
8953
8954 The date is most likely generated in some obscure timezone you've never
8955 heard of, so it's quite nice to be able to find out what the time was
8956 when the article was sent.
8957
8958 @table @kbd
8959
8960 @item W T u
8961 @kindex W T u (Summary)
8962 @findex gnus-article-date-ut
8963 Display the date in UT (aka. GMT, aka ZULU)
8964 (@code{gnus-article-date-ut}).
8965
8966 @item W T i
8967 @kindex W T i (Summary)
8968 @findex gnus-article-date-iso8601
8969 @cindex ISO 8601
8970 Display the date in international format, aka. ISO 8601
8971 (@code{gnus-article-date-iso8601}).
8972
8973 @item W T l
8974 @kindex W T l (Summary)
8975 @findex gnus-article-date-local
8976 Display the date in the local timezone (@code{gnus-article-date-local}).
8977
8978 @item W T p
8979 @kindex W T p (Summary)
8980 @findex gnus-article-date-english
8981 Display the date in a format that's easily pronounceable in English
8982 (@code{gnus-article-date-english}).
8983
8984 @item W T s
8985 @kindex W T s (Summary)
8986 @vindex gnus-article-time-format
8987 @findex gnus-article-date-user
8988 @findex format-time-string
8989 Display the date using a user-defined format
8990 (@code{gnus-article-date-user}).  The format is specified by the
8991 @code{gnus-article-time-format} variable, and is a string that's passed
8992 to @code{format-time-string}.  See the documentation of that variable
8993 for a list of possible format specs.
8994
8995 @item W T e
8996 @kindex W T e (Summary)
8997 @findex gnus-article-date-lapsed
8998 @findex gnus-start-date-timer
8999 @findex gnus-stop-date-timer
9000 Say how much time has elapsed between the article was posted and now
9001 (@code{gnus-article-date-lapsed}).  It looks something like:
9002
9003 @example
9004 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9005 @end example
9006
9007 @vindex gnus-article-date-lapsed-new-header
9008 The value of @code{gnus-article-date-lapsed-new-header} determines
9009 whether this header will just be added below the old Date one, or will
9010 replace it.
9011
9012 An advantage of using Gnus to read mail is that it converts simple bugs
9013 into wonderful absurdities.
9014
9015 If you want to have this line updated continually, you can put
9016
9017 @lisp
9018 (gnus-start-date-timer)
9019 @end lisp
9020
9021 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
9022 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
9023 command.
9024
9025 @item W T o
9026 @kindex W T o (Summary)
9027 @findex gnus-article-date-original
9028 Display the original date (@code{gnus-article-date-original}).  This can
9029 be useful if you normally use some other conversion function and are
9030 worried that it might be doing something totally wrong.  Say, claiming
9031 that the article was posted in 1854.  Although something like that is
9032 @emph{totally} impossible.  Don't you trust me? *titter*
9033
9034 @end table
9035
9036 @xref{Customizing Articles}, for how to display the date in your
9037 preferred format automatically.
9038
9039
9040 @node Article Display
9041 @subsection Article Display
9042 @cindex picons
9043 @cindex x-face
9044 @cindex smileys
9045
9046 These commands add various frivolous display gimmicks to the article
9047 buffer in Emacs versions that support them.
9048
9049 @code{X-Face} headers are small black-and-white images supplied by the
9050 message headers (@pxref{X-Face}).
9051
9052 @code{Face} headers are small colored images supplied by the message
9053 headers (@pxref{Face}).
9054
9055 Smileys are those little @samp{:-)} symbols that people like to litter
9056 their messages with (@pxref{Smileys}).
9057
9058 Picons, on the other hand, reside on your own system, and Gnus will
9059 try to match the headers to what you have (@pxref{Picons}).
9060
9061 All these functions are toggles---if the elements already exist,
9062 they'll be removed.
9063
9064 @table @kbd
9065 @item W D x
9066 @kindex W D x (Summary)
9067 @findex gnus-article-display-x-face
9068 Display an @code{X-Face} in the @code{From} header.
9069 (@code{gnus-article-display-x-face}).
9070
9071 @item W D d
9072 @kindex W D d (Summary)
9073 @findex gnus-article-display-face
9074 Display a @code{Face} in the @code{From} header.
9075 (@code{gnus-article-display-face}).
9076
9077 @item W D s
9078 @kindex W D s (Summary)
9079 @findex gnus-treat-smiley
9080 Display smileys (@code{gnus-treat-smiley}).
9081
9082 @item W D f
9083 @kindex W D f (Summary)
9084 @findex gnus-treat-from-picon
9085 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9086
9087 @item W D m
9088 @kindex W D m (Summary)
9089 @findex gnus-treat-mail-picon
9090 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9091 (@code{gnus-treat-mail-picon}).
9092
9093 @item W D n
9094 @kindex W D n (Summary)
9095 @findex gnus-treat-newsgroups-picon
9096 Piconify all news headers (i. e., @code{Newsgroups} and
9097 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9098
9099 @item W D D
9100 @kindex W D D (Summary)
9101 @findex gnus-article-remove-images
9102 Remove all images from the article buffer
9103 (@code{gnus-article-remove-images}).
9104
9105 @end table
9106
9107
9108
9109 @node Article Signature
9110 @subsection Article Signature
9111 @cindex signatures
9112 @cindex article signature
9113
9114 @vindex gnus-signature-separator
9115 Each article is divided into two parts---the head and the body.  The
9116 body can be divided into a signature part and a text part.  The variable
9117 that says what is to be considered a signature is
9118 @code{gnus-signature-separator}.  This is normally the standard
9119 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9120 non-standard signature separators, so this variable can also be a list
9121 of regular expressions to be tested, one by one.  (Searches are done
9122 from the end of the body towards the beginning.)  One likely value is:
9123
9124 @lisp
9125 (setq gnus-signature-separator
9126       '("^-- $"         ; @r{The standard}
9127         "^-- *$"        ; @r{A common mangling}
9128         "^-------*$"    ; @r{Many people just use a looong}
9129                         ; @r{line of dashes.  Shame!}
9130         "^ *--------*$" ; @r{Double-shame!}
9131         "^________*$"   ; @r{Underscores are also popular}
9132         "^========*$")) ; @r{Pervert!}
9133 @end lisp
9134
9135 The more permissive you are, the more likely it is that you'll get false
9136 positives.
9137
9138 @vindex gnus-signature-limit
9139 @code{gnus-signature-limit} provides a limit to what is considered a
9140 signature when displaying articles.
9141
9142 @enumerate
9143 @item
9144 If it is an integer, no signature may be longer (in characters) than
9145 that integer.
9146 @item
9147 If it is a floating point number, no signature may be longer (in lines)
9148 than that number.
9149 @item
9150 If it is a function, the function will be called without any parameters,
9151 and if it returns @code{nil}, there is no signature in the buffer.
9152 @item
9153 If it is a string, it will be used as a regexp.  If it matches, the text
9154 in question is not a signature.
9155 @end enumerate
9156
9157 This variable can also be a list where the elements may be of the types
9158 listed above.  Here's an example:
9159
9160 @lisp
9161 (setq gnus-signature-limit
9162       '(200.0 "^---*Forwarded article"))
9163 @end lisp
9164
9165 This means that if there are more than 200 lines after the signature
9166 separator, or the text after the signature separator is matched by
9167 the regular expression @samp{^---*Forwarded article}, then it isn't a
9168 signature after all.
9169
9170
9171 @node Article Miscellanea
9172 @subsection Article Miscellanea
9173
9174 @table @kbd
9175 @item A t
9176 @kindex A t (Summary)
9177 @findex gnus-article-babel
9178 Translate the article from one language to another
9179 (@code{gnus-article-babel}).
9180
9181 @end table
9182
9183
9184 @node MIME Commands
9185 @section MIME Commands
9186 @cindex MIME decoding
9187 @cindex attachments
9188 @cindex viewing attachments
9189
9190 The following commands all understand the numerical prefix.  For
9191 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9192
9193 @table @kbd
9194 @item b
9195 @itemx K v
9196 @kindex b (Summary)
9197 @kindex K v (Summary)
9198 View the @acronym{MIME} part.
9199
9200 @item K o
9201 @kindex K o (Summary)
9202 Save the @acronym{MIME} part.
9203
9204 @item K c
9205 @kindex K c (Summary)
9206 Copy the @acronym{MIME} part.
9207
9208 @item K e
9209 @kindex K e (Summary)
9210 View the @acronym{MIME} part externally.
9211
9212 @item K i
9213 @kindex K i (Summary)
9214 View the @acronym{MIME} part internally.
9215
9216 @item K |
9217 @kindex K | (Summary)
9218 Pipe the @acronym{MIME} part to an external command.
9219 @end table
9220
9221 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9222 the same manner:
9223
9224 @table @kbd
9225 @item K b
9226 @kindex K b (Summary)
9227 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9228 mostly useful if you wish to save (or perform other actions) on inlined
9229 parts.
9230
9231 @item K m
9232 @kindex K m (Summary)
9233 @findex gnus-summary-repair-multipart
9234 Some multipart messages are transmitted with missing or faulty headers.
9235 This command will attempt to ``repair'' these messages so that they can
9236 be viewed in a more pleasant manner
9237 (@code{gnus-summary-repair-multipart}).
9238
9239 @item X m
9240 @kindex X m (Summary)
9241 @findex gnus-summary-save-parts
9242 Save all parts matching a @acronym{MIME} type to a directory
9243 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9244 convention (@pxref{Process/Prefix}).
9245
9246 @item M-t
9247 @kindex M-t (Summary)
9248 @findex gnus-summary-toggle-display-buttonized
9249 Toggle the buttonized display of the article buffer
9250 (@code{gnus-summary-toggle-display-buttonized}).
9251
9252 @item W M w
9253 @kindex W M w (Summary)
9254 @findex gnus-article-decode-mime-words
9255 Decode RFC 2047-encoded words in the article headers
9256 (@code{gnus-article-decode-mime-words}).
9257
9258 @item W M c
9259 @kindex W M c (Summary)
9260 @findex gnus-article-decode-charset
9261 Decode encoded article bodies as well as charsets
9262 (@code{gnus-article-decode-charset}).
9263
9264 This command looks in the @code{Content-Type} header to determine the
9265 charset.  If there is no such header in the article, you can give it a
9266 prefix, which will prompt for the charset to decode as.  In regional
9267 groups where people post using some common encoding (but do not
9268 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9269 parameter to the required charset (@pxref{Group Parameters}).
9270
9271 @item W M v
9272 @kindex W M v (Summary)
9273 @findex gnus-mime-view-all-parts
9274 View all the @acronym{MIME} parts in the current article
9275 (@code{gnus-mime-view-all-parts}).
9276
9277 @end table
9278
9279 Relevant variables:
9280
9281 @table @code
9282 @item gnus-ignored-mime-types
9283 @vindex gnus-ignored-mime-types
9284 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9285 this list will be completely ignored by Gnus.  The default value is
9286 @code{nil}.
9287
9288 To have all Vcards be ignored, you'd say something like this:
9289
9290 @lisp
9291 (setq gnus-ignored-mime-types
9292       '("text/x-vcard"))
9293 @end lisp
9294
9295 @item gnus-article-loose-mime
9296 @vindex gnus-article-loose-mime
9297 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9298 before interpreting the message as a @acronym{MIME} message.  This helps
9299 when reading messages from certain broken mail user agents.  The
9300 default is @code{nil}.
9301
9302 @item gnus-article-emulate-mime
9303 @vindex gnus-article-emulate-mime
9304 There are other, non-@acronym{MIME} encoding methods used.  The most common
9305 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9306 this variable is non-@code{nil}, Gnus will look in message bodies to
9307 see if it finds these encodings, and if so, it'll run them through the
9308 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9309
9310 @item gnus-unbuttonized-mime-types
9311 @vindex gnus-unbuttonized-mime-types
9312 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9313 this list won't have @acronym{MIME} buttons inserted unless they aren't
9314 displayed or this variable is overridden by
9315 @code{gnus-buttonized-mime-types}.  The default value is
9316 @code{(".*/.*")}.  This variable is only used when
9317 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9318
9319 @item gnus-buttonized-mime-types
9320 @vindex gnus-buttonized-mime-types
9321 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9322 this list will have @acronym{MIME} buttons inserted unless they aren't
9323 displayed.  This variable overrides
9324 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9325 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9326 is @code{nil}.
9327
9328 To see e.g. security buttons but no other buttons, you could set this
9329 variable to @code{("multipart/signed")} and leave
9330 @code{gnus-unbuttonized-mime-types} at the default value.
9331
9332 @item gnus-inhibit-mime-unbuttonizing
9333 @vindex gnus-inhibit-mime-unbuttonizing
9334 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9335 default value is @code{nil}.
9336
9337 @item gnus-article-mime-part-function
9338 @vindex gnus-article-mime-part-function
9339 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9340 handle as the parameter.  The function is meant to be used to allow
9341 users to gather information from the article (e. g., add Vcard info to
9342 the bbdb database) or to do actions based on parts (e. g., automatically
9343 save all jpegs into some directory).
9344
9345 Here's an example function the does the latter:
9346
9347 @lisp
9348 (defun my-save-all-jpeg-parts (handle)
9349   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9350     (with-temp-buffer
9351       (insert (mm-get-part handle))
9352       (write-region (point-min) (point-max)
9353                     (read-file-name "Save jpeg to: ")))))
9354 (setq gnus-article-mime-part-function
9355       'my-save-all-jpeg-parts)
9356 @end lisp
9357
9358 @vindex gnus-mime-multipart-functions
9359 @item gnus-mime-multipart-functions
9360 Alist of @acronym{MIME} multipart types and functions to handle them.
9361
9362 @vindex gnus-mime-display-multipart-alternative-as-mixed
9363 @item gnus-mime-display-multipart-alternative-as-mixed
9364 Display "multipart/alternative" parts as "multipart/mixed".
9365
9366 @vindex gnus-mime-display-multipart-related-as-mixed
9367 @item gnus-mime-display-multipart-related-as-mixed
9368 Display "multipart/related" parts as "multipart/mixed".
9369
9370 If displaying "text/html" is discouraged, see
9371 @code{mm-discouraged-alternatives} in @ref{Display Customization,
9372 Display Customization, , emacs-mime, Emacs-Mime Manual}.  Images or
9373 other material inside a "multipart/related" part might be overlooked
9374 when this variable is nil.
9375
9376 @vindex gnus-mime-display-multipart-as-mixed
9377 @item gnus-mime-display-multipart-as-mixed
9378 Display "multipart" parts as "multipart/mixed".  If t, it overrides nil
9379 values of @code{gnus-mime-display-multipart-alternative-as-mixed} and
9380 @code{gnus-mime-display-multipart-related-as-mixed}.
9381
9382 @vindex mm-file-name-rewrite-functions
9383 @item mm-file-name-rewrite-functions
9384 List of functions used for rewriting file names of @acronym{MIME} parts.
9385 Each function takes a file name as input and returns a file name.
9386
9387 Ready-made functions include@*
9388 @code{mm-file-name-delete-whitespace},
9389 @code{mm-file-name-trim-whitespace},
9390 @code{mm-file-name-collapse-whitespace}, and
9391 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9392 the variable @code{mm-file-name-replace-whitespace} to replace each
9393 whitespace character in a file name with that string; default value
9394 is @code{"_"} (a single underscore).
9395 @findex mm-file-name-delete-whitespace
9396 @findex mm-file-name-trim-whitespace
9397 @findex mm-file-name-collapse-whitespace
9398 @findex mm-file-name-replace-whitespace
9399 @vindex mm-file-name-replace-whitespace
9400
9401 The standard functions @code{capitalize}, @code{downcase},
9402 @code{upcase}, and @code{upcase-initials} may be useful, too.
9403
9404 Everybody knows that whitespace characters in file names are evil,
9405 except those who don't know.  If you receive lots of attachments from
9406 such unenlightened users, you can make live easier by adding
9407
9408 @lisp
9409 (setq mm-file-name-rewrite-functions
9410       '(mm-file-name-trim-whitespace
9411         mm-file-name-collapse-whitespace
9412         mm-file-name-replace-whitespace))
9413 @end lisp
9414
9415 @noindent
9416 to your @file{~/.gnus.el} file.
9417
9418 @end table
9419
9420
9421 @node Charsets
9422 @section Charsets
9423 @cindex charsets
9424
9425 People use different charsets, and we have @acronym{MIME} to let us know what
9426 charsets they use.  Or rather, we wish we had.  Many people use
9427 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9428 just send out messages without saying what character sets they use.  To
9429 help a bit with this, some local news hierarchies have policies that say
9430 what character set is the default.  For instance, the @samp{fj}
9431 hierarchy uses @code{iso-2022-jp-2}.
9432
9433 @vindex gnus-group-charset-alist
9434 This knowledge is encoded in the @code{gnus-group-charset-alist}
9435 variable, which is an alist of regexps (use the first item to match full
9436 group names) and default charsets to be used when reading these groups.
9437
9438 @vindex gnus-newsgroup-ignored-charsets
9439 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9440 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9441 even if they really are in @code{koi-8}.  To help here, the
9442 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9443 charsets that are listed here will be ignored.  The variable can be
9444 set on a group-by-group basis using the group parameters (@pxref{Group
9445 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9446 which includes values some agents insist on having in there.
9447
9448 @vindex gnus-group-posting-charset-alist
9449 When posting, @code{gnus-group-posting-charset-alist} is used to
9450 determine which charsets should not be encoded using the @acronym{MIME}
9451 encodings.  For instance, some hierarchies discourage using
9452 quoted-printable header encoding.
9453
9454 This variable is an alist of regexps and permitted unencoded charsets
9455 for posting.  Each element of the alist has the form @code{(}@var{test
9456 header body-list}@code{)}, where:
9457
9458 @table @var
9459 @item test
9460 is either a regular expression matching the newsgroup header or a
9461 variable to query,
9462 @item header
9463 is the charset which may be left unencoded in the header (@code{nil}
9464 means encode all charsets),
9465 @item body-list
9466 is a list of charsets which may be encoded using 8bit content-transfer
9467 encoding in the body, or one of the special values @code{nil} (always
9468 encode using quoted-printable) or @code{t} (always use 8bit).
9469 @end table
9470
9471 @cindex Russian
9472 @cindex koi8-r
9473 @cindex koi8-u
9474 @cindex iso-8859-5
9475 @cindex coding system aliases
9476 @cindex preferred charset
9477
9478 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
9479 The Emacs MIME Manual}, for additional variables that control which
9480 MIME charsets are used when sending messages.
9481
9482 Other charset tricks that may be useful, although not Gnus-specific:
9483
9484 If there are several @acronym{MIME} charsets that encode the same Emacs
9485 charset, you can choose what charset to use by saying the following:
9486
9487 @lisp
9488 (put-charset-property 'cyrillic-iso8859-5
9489                       'preferred-coding-system 'koi8-r)
9490 @end lisp
9491
9492 This means that Russian will be encoded using @code{koi8-r} instead of
9493 the default @code{iso-8859-5} @acronym{MIME} charset.
9494
9495 If you want to read messages in @code{koi8-u}, you can cheat and say
9496
9497 @lisp
9498 (define-coding-system-alias 'koi8-u 'koi8-r)
9499 @end lisp
9500
9501 This will almost do the right thing.
9502
9503 And finally, to read charsets like @code{windows-1251}, you can say
9504 something like
9505
9506 @lisp
9507 (codepage-setup 1251)
9508 (define-coding-system-alias 'windows-1251 'cp1251)
9509 @end lisp
9510
9511
9512 @node Article Commands
9513 @section Article Commands
9514
9515 @table @kbd
9516
9517 @item A P
9518 @cindex PostScript
9519 @cindex printing
9520 @kindex A P (Summary)
9521 @vindex gnus-ps-print-hook
9522 @findex gnus-summary-print-article
9523 Generate and print a PostScript image of the article buffer
9524 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9525 be run just before printing the buffer.  An alternative way to print
9526 article is to use Muttprint (@pxref{Saving Articles}).
9527
9528 @end table
9529
9530
9531 @node Summary Sorting
9532 @section Summary Sorting
9533 @cindex summary sorting
9534
9535 You can have the summary buffer sorted in various ways, even though I
9536 can't really see why you'd want that.
9537
9538 @table @kbd
9539
9540 @item C-c C-s C-n
9541 @kindex C-c C-s C-n (Summary)
9542 @findex gnus-summary-sort-by-number
9543 Sort by article number (@code{gnus-summary-sort-by-number}).
9544
9545 @item C-c C-s C-a
9546 @kindex C-c C-s C-a (Summary)
9547 @findex gnus-summary-sort-by-author
9548 Sort by author (@code{gnus-summary-sort-by-author}).
9549
9550 @item C-c C-s C-s
9551 @kindex C-c C-s C-s (Summary)
9552 @findex gnus-summary-sort-by-subject
9553 Sort by subject (@code{gnus-summary-sort-by-subject}).
9554
9555 @item C-c C-s C-d
9556 @kindex C-c C-s C-d (Summary)
9557 @findex gnus-summary-sort-by-date
9558 Sort by date (@code{gnus-summary-sort-by-date}).
9559
9560 @item C-c C-s C-l
9561 @kindex C-c C-s C-l (Summary)
9562 @findex gnus-summary-sort-by-lines
9563 Sort by lines (@code{gnus-summary-sort-by-lines}).
9564
9565 @item C-c C-s C-c
9566 @kindex C-c C-s C-c (Summary)
9567 @findex gnus-summary-sort-by-chars
9568 Sort by article length (@code{gnus-summary-sort-by-chars}).
9569
9570 @item C-c C-s C-i
9571 @kindex C-c C-s C-i (Summary)
9572 @findex gnus-summary-sort-by-score
9573 Sort by score (@code{gnus-summary-sort-by-score}).
9574
9575 @item C-c C-s C-r
9576 @kindex C-c C-s C-r (Summary)
9577 @findex gnus-summary-sort-by-random
9578 Randomize (@code{gnus-summary-sort-by-random}).
9579
9580 @item C-c C-s C-o
9581 @kindex C-c C-s C-o (Summary)
9582 @findex gnus-summary-sort-by-original
9583 Sort using the default sorting method
9584 (@code{gnus-summary-sort-by-original}).
9585 @end table
9586
9587 These functions will work both when you use threading and when you don't
9588 use threading.  In the latter case, all summary lines will be sorted,
9589 line by line.  In the former case, sorting will be done on a
9590 root-by-root basis, which might not be what you were looking for.  To
9591 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9592 Commands}).
9593
9594
9595 @node Finding the Parent
9596 @section Finding the Parent
9597 @cindex parent articles
9598 @cindex referring articles
9599
9600 @table @kbd
9601 @item ^
9602 @kindex ^ (Summary)
9603 @findex gnus-summary-refer-parent-article
9604 If you'd like to read the parent of the current article, and it is not
9605 displayed in the summary buffer, you might still be able to.  That is,
9606 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9607 and the @code{References} in the current article are not mangled, you
9608 can just press @kbd{^} or @kbd{A r}
9609 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9610 you'll get the parent.  If the parent is already displayed in the
9611 summary buffer, point will just move to this article.
9612
9613 If given a positive numerical prefix, fetch that many articles back into
9614 the ancestry.  If given a negative numerical prefix, fetch just that
9615 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9616 grandparent and the grandgrandparent of the current article.  If you say
9617 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9618 article.
9619
9620 @item A R (Summary)
9621 @findex gnus-summary-refer-references
9622 @kindex A R (Summary)
9623 Fetch all articles mentioned in the @code{References} header of the
9624 article (@code{gnus-summary-refer-references}).
9625
9626 @item A T (Summary)
9627 @findex gnus-summary-refer-thread
9628 @kindex A T (Summary)
9629 Display the full thread where the current article appears
9630 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9631 headers in the current group to work, so it usually takes a while.  If
9632 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9633 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9634 visible effects normally, but it'll make this command work a whole lot
9635 faster.  Of course, it'll make group entry somewhat slow.
9636
9637 @vindex gnus-refer-thread-limit
9638 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9639 articles before the first displayed in the current group) headers to
9640 fetch when doing this command.  The default is 200.  If @code{t}, all
9641 the available headers will be fetched.  This variable can be overridden
9642 by giving the @kbd{A T} command a numerical prefix.
9643
9644 @item M-^ (Summary)
9645 @findex gnus-summary-refer-article
9646 @kindex M-^ (Summary)
9647 @cindex Message-ID
9648 @cindex fetching by Message-ID
9649 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9650 matter what group it belongs to.  @kbd{M-^}
9651 (@code{gnus-summary-refer-article}) will ask you for a
9652 @code{Message-ID}, which is one of those long, hard-to-read thingies
9653 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9654 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9655 @end table
9656
9657 The current select method will be used when fetching by
9658 @code{Message-ID} from non-news select method, but you can override this
9659 by giving this command a prefix.
9660
9661 @vindex gnus-refer-article-method
9662 If the group you are reading is located on a back end that does not
9663 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9664 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9665 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9666 updating the spool you are reading from, but that's not really
9667 necessary.
9668
9669 It can also be a list of select methods, as well as the special symbol
9670 @code{current}, which means to use the current select method.  If it
9671 is a list, Gnus will try all the methods in the list until it finds a
9672 match.
9673
9674 Here's an example setting that will first try the current method, and
9675 then ask Google if that fails:
9676
9677 @lisp
9678 (setq gnus-refer-article-method
9679       '(current
9680         (nnweb "google" (nnweb-type google))))
9681 @end lisp
9682
9683 Most of the mail back ends support fetching by @code{Message-ID}, but
9684 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9685 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
9686 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
9687 only able to locate articles that have been posted to the current
9688 group.  (Anything else would be too time consuming.)  @code{nnmh} does
9689 not support this at all.
9690
9691
9692 @node Alternative Approaches
9693 @section Alternative Approaches
9694
9695 Different people like to read news using different methods.  This being
9696 Gnus, we offer a small selection of minor modes for the summary buffers.
9697
9698 @menu
9699 * Pick and Read::               First mark articles and then read them.
9700 * Binary Groups::               Auto-decode all articles.
9701 @end menu
9702
9703
9704 @node Pick and Read
9705 @subsection Pick and Read
9706 @cindex pick and read
9707
9708 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9709 a two-phased reading interface.  The user first marks in a summary
9710 buffer the articles she wants to read.  Then she starts reading the
9711 articles with just an article buffer displayed.
9712
9713 @findex gnus-pick-mode
9714 @kindex M-x gnus-pick-mode
9715 Gnus provides a summary buffer minor mode that allows
9716 this---@code{gnus-pick-mode}.  This basically means that a few process
9717 mark commands become one-keystroke commands to allow easy marking, and
9718 it provides one additional command for switching to the summary buffer.
9719
9720 Here are the available keystrokes when using pick mode:
9721
9722 @table @kbd
9723 @item .
9724 @kindex . (Pick)
9725 @findex gnus-pick-article-or-thread
9726 Pick the article or thread on the current line
9727 (@code{gnus-pick-article-or-thread}).  If the variable
9728 @code{gnus-thread-hide-subtree} is true, then this key selects the
9729 entire thread when used at the first article of the thread.  Otherwise,
9730 it selects just the article.  If given a numerical prefix, go to that
9731 thread or article and pick it.  (The line number is normally displayed
9732 at the beginning of the summary pick lines.)
9733
9734 @item SPACE
9735 @kindex SPACE (Pick)
9736 @findex gnus-pick-next-page
9737 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9738 at the end of the buffer, start reading the picked articles.
9739
9740 @item u
9741 @kindex u (Pick)
9742 @findex gnus-pick-unmark-article-or-thread.
9743 Unpick the thread or article
9744 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9745 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9746 thread if used at the first article of the thread.  Otherwise it unpicks
9747 just the article.  You can give this key a numerical prefix to unpick
9748 the thread or article at that line.
9749
9750 @item RET
9751 @kindex RET (Pick)
9752 @findex gnus-pick-start-reading
9753 @vindex gnus-pick-display-summary
9754 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9755 given a prefix, mark all unpicked articles as read first.  If
9756 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9757 will still be visible when you are reading.
9758
9759 @end table
9760
9761 All the normal summary mode commands are still available in the
9762 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9763 which is mapped to the same function
9764 @code{gnus-summary-tick-article-forward}.
9765
9766 If this sounds like a good idea to you, you could say:
9767
9768 @lisp
9769 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9770 @end lisp
9771
9772 @vindex gnus-pick-mode-hook
9773 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9774
9775 @vindex gnus-mark-unpicked-articles-as-read
9776 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9777 all unpicked articles as read.  The default is @code{nil}.
9778
9779 @vindex gnus-summary-pick-line-format
9780 The summary line format in pick mode is slightly different from the
9781 standard format.  At the beginning of each line the line number is
9782 displayed.  The pick mode line format is controlled by the
9783 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9784 Variables}).  It accepts the same format specs that
9785 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9786
9787
9788 @node Binary Groups
9789 @subsection Binary Groups
9790 @cindex binary groups
9791
9792 @findex gnus-binary-mode
9793 @kindex M-x gnus-binary-mode
9794 If you spend much time in binary groups, you may grow tired of hitting
9795 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9796 is a minor mode for summary buffers that makes all ordinary Gnus article
9797 selection functions uudecode series of articles and display the result
9798 instead of just displaying the articles the normal way.
9799
9800 @kindex g (Binary)
9801 @findex gnus-binary-show-article
9802 The only way, in fact, to see the actual articles is the @kbd{g}
9803 command, when you have turned on this mode
9804 (@code{gnus-binary-show-article}).
9805
9806 @vindex gnus-binary-mode-hook
9807 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9808
9809
9810 @node Tree Display
9811 @section Tree Display
9812 @cindex trees
9813
9814 @vindex gnus-use-trees
9815 If you don't like the normal Gnus summary display, you might try setting
9816 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9817 additional @dfn{tree buffer}.  You can execute all summary mode commands
9818 in the tree buffer.
9819
9820 There are a few variables to customize the tree display, of course:
9821
9822 @table @code
9823 @item gnus-tree-mode-hook
9824 @vindex gnus-tree-mode-hook
9825 A hook called in all tree mode buffers.
9826
9827 @item gnus-tree-mode-line-format
9828 @vindex gnus-tree-mode-line-format
9829 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9830 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9831 of valid specs, @pxref{Summary Buffer Mode Line}.
9832
9833 @item gnus-selected-tree-face
9834 @vindex gnus-selected-tree-face
9835 Face used for highlighting the selected article in the tree buffer.  The
9836 default is @code{modeline}.
9837
9838 @item gnus-tree-line-format
9839 @vindex gnus-tree-line-format
9840 A format string for the tree nodes.  The name is a bit of a misnomer,
9841 though---it doesn't define a line, but just the node.  The default value
9842 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9843 the name of the poster.  It is vital that all nodes are of the same
9844 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9845
9846 Valid specs are:
9847
9848 @table @samp
9849 @item n
9850 The name of the poster.
9851 @item f
9852 The @code{From} header.
9853 @item N
9854 The number of the article.
9855 @item [
9856 The opening bracket.
9857 @item ]
9858 The closing bracket.
9859 @item s
9860 The subject.
9861 @end table
9862
9863 @xref{Formatting Variables}.
9864
9865 Variables related to the display are:
9866
9867 @table @code
9868 @item gnus-tree-brackets
9869 @vindex gnus-tree-brackets
9870 This is used for differentiating between ``real'' articles and
9871 ``sparse'' articles.  The format is
9872 @example
9873 ((@var{real-open} . @var{real-close})
9874  (@var{sparse-open} . @var{sparse-close})
9875  (@var{dummy-open} . @var{dummy-close}))
9876 @end example
9877 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9878
9879 @item gnus-tree-parent-child-edges
9880 @vindex gnus-tree-parent-child-edges
9881 This is a list that contains the characters used for connecting parent
9882 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9883
9884 @end table
9885
9886 @item gnus-tree-minimize-window
9887 @vindex gnus-tree-minimize-window
9888 If this variable is non-@code{nil}, Gnus will try to keep the tree
9889 buffer as small as possible to allow more room for the other Gnus
9890 windows.  If this variable is a number, the tree buffer will never be
9891 higher than that number.  The default is @code{t}.  Note that if you
9892 have several windows displayed side-by-side in a frame and the tree
9893 buffer is one of these, minimizing the tree window will also resize all
9894 other windows displayed next to it.
9895
9896 You may also wish to add the following hook to keep the window minimized
9897 at all times:
9898
9899 @lisp
9900 (add-hook 'gnus-configure-windows-hook
9901           'gnus-tree-perhaps-minimize)
9902 @end lisp
9903
9904 @item gnus-generate-tree-function
9905 @vindex gnus-generate-tree-function
9906 @findex gnus-generate-horizontal-tree
9907 @findex gnus-generate-vertical-tree
9908 The function that actually generates the thread tree.  Two predefined
9909 functions are available: @code{gnus-generate-horizontal-tree} and
9910 @code{gnus-generate-vertical-tree} (which is the default).
9911
9912 @end table
9913
9914 Here's an example from a horizontal tree buffer:
9915
9916 @example
9917 @{***@}-(***)-[odd]-[Gun]
9918      |      \[Jan]
9919      |      \[odd]-[Eri]
9920      |      \(***)-[Eri]
9921      |            \[odd]-[Paa]
9922      \[Bjo]
9923      \[Gun]
9924      \[Gun]-[Jor]
9925 @end example
9926
9927 Here's the same thread displayed in a vertical tree buffer:
9928
9929 @example
9930 @group
9931 @{***@}
9932   |--------------------------\-----\-----\
9933 (***)                         [Bjo] [Gun] [Gun]
9934   |--\-----\-----\                          |
9935 [odd] [Jan] [odd] (***)                   [Jor]
9936   |           |     |--\
9937 [Gun]       [Eri] [Eri] [odd]
9938                           |
9939                         [Paa]
9940 @end group
9941 @end example
9942
9943 If you're using horizontal trees, it might be nice to display the trees
9944 side-by-side with the summary buffer.  You could add something like the
9945 following to your @file{~/.gnus.el} file:
9946
9947 @lisp
9948 (setq gnus-use-trees t
9949       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9950       gnus-tree-minimize-window nil)
9951 (gnus-add-configuration
9952  '(article
9953    (vertical 1.0
9954              (horizontal 0.25
9955                          (summary 0.75 point)
9956                          (tree 1.0))
9957              (article 1.0))))
9958 @end lisp
9959
9960 @xref{Window Layout}.
9961
9962
9963 @node Mail Group Commands
9964 @section Mail Group Commands
9965 @cindex mail group commands
9966
9967 Some commands only make sense in mail groups.  If these commands are
9968 invalid in the current group, they will raise a hell and let you know.
9969
9970 All these commands (except the expiry and edit commands) use the
9971 process/prefix convention (@pxref{Process/Prefix}).
9972
9973 @table @kbd
9974
9975 @item B e
9976 @kindex B e (Summary)
9977 @findex gnus-summary-expire-articles
9978 Run all expirable articles in the current group through the expiry
9979 process (@code{gnus-summary-expire-articles}).  That is, delete all
9980 expirable articles in the group that have been around for a while.
9981 (@pxref{Expiring Mail}).
9982
9983 @item B C-M-e
9984 @kindex B C-M-e (Summary)
9985 @findex gnus-summary-expire-articles-now
9986 Delete all the expirable articles in the group
9987 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9988 articles eligible for expiry in the current group will
9989 disappear forever into that big @file{/dev/null} in the sky.
9990
9991 @item B DEL
9992 @kindex B DEL (Summary)
9993 @findex gnus-summary-delete-article
9994 @c @icon{gnus-summary-mail-delete}
9995 Delete the mail article.  This is ``delete'' as in ``delete it from your
9996 disk forever and ever, never to return again.'' Use with caution.
9997 (@code{gnus-summary-delete-article}).
9998
9999 @item B m
10000 @kindex B m (Summary)
10001 @cindex move mail
10002 @findex gnus-summary-move-article
10003 @vindex gnus-preserve-marks
10004 Move the article from one mail group to another
10005 (@code{gnus-summary-move-article}).  Marks will be preserved if
10006 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10007
10008 @item B c
10009 @kindex B c (Summary)
10010 @cindex copy mail
10011 @findex gnus-summary-copy-article
10012 @c @icon{gnus-summary-mail-copy}
10013 Copy the article from one group (mail group or not) to a mail group
10014 (@code{gnus-summary-copy-article}).  Marks will be preserved if
10015 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10016
10017 @item B B
10018 @kindex B B (Summary)
10019 @cindex crosspost mail
10020 @findex gnus-summary-crosspost-article
10021 Crosspost the current article to some other group
10022 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
10023 the article in the other group, and the Xref headers of the article will
10024 be properly updated.
10025
10026 @item B i
10027 @kindex B i (Summary)
10028 @findex gnus-summary-import-article
10029 Import an arbitrary file into the current mail newsgroup
10030 (@code{gnus-summary-import-article}).  You will be prompted for a file
10031 name, a @code{From} header and a @code{Subject} header.
10032
10033 @item B I
10034 @kindex B I (Summary)
10035 @findex gnus-summary-create-article
10036 Create an empty article in the current mail newsgroups
10037 (@code{gnus-summary-create-article}).  You will be prompted for a
10038 @code{From} header and a @code{Subject} header.
10039
10040 @item B r
10041 @kindex B r (Summary)
10042 @findex gnus-summary-respool-article
10043 @vindex gnus-summary-respool-default-method
10044 Respool the mail article (@code{gnus-summary-respool-article}).
10045 @code{gnus-summary-respool-default-method} will be used as the default
10046 select method when respooling.  This variable is @code{nil} by default,
10047 which means that the current group select method will be used instead.
10048 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10049 (which is the default).
10050
10051 @item B w
10052 @itemx e
10053 @kindex B w (Summary)
10054 @kindex e (Summary)
10055 @findex gnus-summary-edit-article
10056 @kindex C-c C-c (Article)
10057 @findex gnus-summary-edit-article-done
10058 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10059 editing and make the changes permanent, type @kbd{C-c C-c}
10060 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10061 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10062
10063 @item B q
10064 @kindex B q (Summary)
10065 @findex gnus-summary-respool-query
10066 If you want to re-spool an article, you might be curious as to what group
10067 the article will end up in before you do the re-spooling.  This command
10068 will tell you (@code{gnus-summary-respool-query}).
10069
10070 @item B t
10071 @kindex B t (Summary)
10072 @findex gnus-summary-respool-trace
10073 Similarly, this command will display all fancy splitting patterns used
10074 when respooling, if any (@code{gnus-summary-respool-trace}).
10075
10076 @item B p
10077 @kindex B p (Summary)
10078 @findex gnus-summary-article-posted-p
10079 Some people have a tendency to send you ``courtesy'' copies when they
10080 follow up to articles you have posted.  These usually have a
10081 @code{Newsgroups} header in them, but not always.  This command
10082 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10083 article from your news server (or rather, from
10084 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10085 report back whether it found the article or not.  Even if it says that
10086 it didn't find the article, it may have been posted anyway---mail
10087 propagation is much faster than news propagation, and the news copy may
10088 just not have arrived yet.
10089
10090 @item K E
10091 @kindex K E (Summary)
10092 @findex gnus-article-encrypt-body
10093 @vindex gnus-article-encrypt-protocol
10094 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10095 The body is encrypted with the encryption protocol specified by the
10096 variable @code{gnus-article-encrypt-protocol}.
10097
10098 @end table
10099
10100 @vindex gnus-move-split-methods
10101 @cindex moving articles
10102 If you move (or copy) articles regularly, you might wish to have Gnus
10103 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10104 variable that uses the same syntax as @code{gnus-split-methods}
10105 (@pxref{Saving Articles}).  You may customize that variable to create
10106 suggestions you find reasonable.  (Note that
10107 @code{gnus-move-split-methods} uses group names where
10108 @code{gnus-split-methods} uses file names.)
10109
10110 @lisp
10111 (setq gnus-move-split-methods
10112       '(("^From:.*Lars Magne" "nnml:junk")
10113         ("^Subject:.*gnus" "nnfolder:important")
10114         (".*" "nnml:misc")))
10115 @end lisp
10116
10117
10118 @node Various Summary Stuff
10119 @section Various Summary Stuff
10120
10121 @menu
10122 * Summary Group Information::   Information oriented commands.
10123 * Searching for Articles::      Multiple article commands.
10124 * Summary Generation Commands::
10125 * Really Various Summary Commands::  Those pesky non-conformant commands.
10126 @end menu
10127
10128 @table @code
10129 @vindex gnus-summary-display-while-building
10130 @item gnus-summary-display-while-building
10131 If non-@code{nil}, show and update the summary buffer as it's being
10132 built.  If @code{t}, update the buffer after every line is inserted.
10133 If the value is an integer, @var{n}, update the display every @var{n}
10134 lines.  The default is @code{nil}.
10135
10136 @vindex gnus-summary-display-arrow
10137 @item gnus-summary-display-arrow
10138 If non-@code{nil}, display an arrow in the fringe to indicate the
10139 current article.
10140
10141 @vindex gnus-summary-mode-hook
10142 @item gnus-summary-mode-hook
10143 This hook is called when creating a summary mode buffer.
10144
10145 @vindex gnus-summary-generate-hook
10146 @item gnus-summary-generate-hook
10147 This is called as the last thing before doing the threading and the
10148 generation of the summary buffer.  It's quite convenient for customizing
10149 the threading variables based on what data the newsgroup has.  This hook
10150 is called from the summary buffer after most summary buffer variables
10151 have been set.
10152
10153 @vindex gnus-summary-prepare-hook
10154 @item gnus-summary-prepare-hook
10155 It is called after the summary buffer has been generated.  You might use
10156 it to, for instance, highlight lines or modify the look of the buffer in
10157 some other ungodly manner.  I don't care.
10158
10159 @vindex gnus-summary-prepared-hook
10160 @item gnus-summary-prepared-hook
10161 A hook called as the very last thing after the summary buffer has been
10162 generated.
10163
10164 @vindex gnus-summary-ignore-duplicates
10165 @item gnus-summary-ignore-duplicates
10166 When Gnus discovers two articles that have the same @code{Message-ID},
10167 it has to do something drastic.  No articles are allowed to have the
10168 same @code{Message-ID}, but this may happen when reading mail from some
10169 sources.  Gnus allows you to customize what happens with this variable.
10170 If it is @code{nil} (which is the default), Gnus will rename the
10171 @code{Message-ID} (for display purposes only) and display the article as
10172 any other article.  If this variable is @code{t}, it won't display the
10173 article---it'll be as if it never existed.
10174
10175 @vindex gnus-alter-articles-to-read-function
10176 @item gnus-alter-articles-to-read-function
10177 This function, which takes two parameters (the group name and the list
10178 of articles to be selected), is called to allow the user to alter the
10179 list of articles to be selected.
10180
10181 For instance, the following function adds the list of cached articles to
10182 the list in one particular group:
10183
10184 @lisp
10185 (defun my-add-cached-articles (group articles)
10186   (if (string= group "some.group")
10187       (append gnus-newsgroup-cached articles)
10188     articles))
10189 @end lisp
10190
10191 @vindex gnus-newsgroup-variables
10192 @item gnus-newsgroup-variables
10193 A list of newsgroup (summary buffer) local variables, or cons of
10194 variables and their default expressions to be evalled (when the default
10195 values are not @code{nil}), that should be made global while the summary
10196 buffer is active.
10197
10198 Note: The default expressions will be evaluated (using function
10199 @code{eval}) before assignment to the local variable rather than just
10200 assigned to it.  If the default expression is the symbol @code{global},
10201 that symbol will not be evaluated but the global value of the local
10202 variable will be used instead.
10203
10204 These variables can be used to set variables in the group parameters
10205 while still allowing them to affect operations done in other
10206 buffers.  For example:
10207
10208 @lisp
10209 (setq gnus-newsgroup-variables
10210       '(message-use-followup-to
10211         (gnus-visible-headers .
10212  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10213 @end lisp
10214
10215 Also @pxref{Group Parameters}.
10216 @end table
10217
10218
10219 @node Summary Group Information
10220 @subsection Summary Group Information
10221
10222 @table @kbd
10223
10224 @item H f
10225 @kindex H f (Summary)
10226 @findex gnus-summary-fetch-faq
10227 @vindex gnus-group-faq-directory
10228 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10229 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10230 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10231 is usually a directory on a remote machine.  This variable can also be
10232 a list of directories.  In that case, giving a prefix to this command
10233 will allow you to choose between the various sites.  @code{ange-ftp}
10234 or @code{efs} will probably be used for fetching the file.
10235
10236 @item H d
10237 @kindex H d (Summary)
10238 @findex gnus-summary-describe-group
10239 Give a brief description of the current group
10240 (@code{gnus-summary-describe-group}).  If given a prefix, force
10241 rereading the description from the server.
10242
10243 @item H h
10244 @kindex H h (Summary)
10245 @findex gnus-summary-describe-briefly
10246 Give an extremely brief description of the most important summary
10247 keystrokes (@code{gnus-summary-describe-briefly}).
10248
10249 @item H i
10250 @kindex H i (Summary)
10251 @findex gnus-info-find-node
10252 Go to the Gnus info node (@code{gnus-info-find-node}).
10253 @end table
10254
10255
10256 @node Searching for Articles
10257 @subsection Searching for Articles
10258
10259 @table @kbd
10260
10261 @item M-s
10262 @kindex M-s (Summary)
10263 @findex gnus-summary-search-article-forward
10264 Search through all subsequent (raw) articles for a regexp
10265 (@code{gnus-summary-search-article-forward}).
10266
10267 @item M-r
10268 @kindex M-r (Summary)
10269 @findex gnus-summary-search-article-backward
10270 Search through all previous (raw) articles for a regexp
10271 (@code{gnus-summary-search-article-backward}).
10272
10273 @item &
10274 @kindex & (Summary)
10275 @findex gnus-summary-execute-command
10276 This command will prompt you for a header, a regular expression to match
10277 on this field, and a command to be executed if the match is made
10278 (@code{gnus-summary-execute-command}).  If the header is an empty
10279 string, the match is done on the entire article.  If given a prefix,
10280 search backward instead.
10281
10282 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10283 all articles that have heads or bodies that match @samp{some.*string}.
10284
10285 @item M-&
10286 @kindex M-& (Summary)
10287 @findex gnus-summary-universal-argument
10288 Perform any operation on all articles that have been marked with
10289 the process mark (@code{gnus-summary-universal-argument}).
10290 @end table
10291
10292 @node Summary Generation Commands
10293 @subsection Summary Generation Commands
10294
10295 @table @kbd
10296
10297 @item Y g
10298 @kindex Y g (Summary)
10299 @findex gnus-summary-prepare
10300 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10301
10302 @item Y c
10303 @kindex Y c (Summary)
10304 @findex gnus-summary-insert-cached-articles
10305 Pull all cached articles (for the current group) into the summary buffer
10306 (@code{gnus-summary-insert-cached-articles}).
10307
10308 @item Y d
10309 @kindex Y d (Summary)
10310 @findex gnus-summary-insert-dormant-articles
10311 Pull all dormant articles (for the current group) into the summary buffer
10312 (@code{gnus-summary-insert-dormant-articles}).
10313
10314 @end table
10315
10316
10317 @node Really Various Summary Commands
10318 @subsection Really Various Summary Commands
10319
10320 @table @kbd
10321
10322 @item A D
10323 @itemx C-d
10324 @kindex C-d (Summary)
10325 @kindex A D (Summary)
10326 @findex gnus-summary-enter-digest-group
10327 If the current article is a collection of other articles (for instance,
10328 a digest), you might use this command to enter a group based on the that
10329 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10330 guess what article type is currently displayed unless you give a prefix
10331 to this command, which forces a ``digest'' interpretation.  Basically,
10332 whenever you see a message that is a collection of other messages of
10333 some format, you @kbd{C-d} and read these messages in a more convenient
10334 fashion.
10335
10336 @item C-M-d
10337 @kindex C-M-d (Summary)
10338 @findex gnus-summary-read-document
10339 This command is very similar to the one above, but lets you gather
10340 several documents into one biiig group
10341 (@code{gnus-summary-read-document}).  It does this by opening several
10342 @code{nndoc} groups for each document, and then opening an
10343 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10344 command understands the process/prefix convention
10345 (@pxref{Process/Prefix}).
10346
10347 @item C-t
10348 @kindex C-t (Summary)
10349 @findex gnus-summary-toggle-truncation
10350 Toggle truncation of summary lines
10351 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10352 line centering function in the summary buffer, so it's not a good idea
10353 to have truncation switched off while reading articles.
10354
10355 @item =
10356 @kindex = (Summary)
10357 @findex gnus-summary-expand-window
10358 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10359 If given a prefix, force an @code{article} window configuration.
10360
10361 @item C-M-e
10362 @kindex C-M-e (Summary)
10363 @findex gnus-summary-edit-parameters
10364 Edit the group parameters (@pxref{Group Parameters}) of the current
10365 group (@code{gnus-summary-edit-parameters}).
10366
10367 @item C-M-a
10368 @kindex C-M-a (Summary)
10369 @findex gnus-summary-customize-parameters
10370 Customize the group parameters (@pxref{Group Parameters}) of the current
10371 group (@code{gnus-summary-customize-parameters}).
10372
10373 @end table
10374
10375
10376 @node Exiting the Summary Buffer
10377 @section Exiting the Summary Buffer
10378 @cindex summary exit
10379 @cindex exiting groups
10380
10381 Exiting from the summary buffer will normally update all info on the
10382 group and return you to the group buffer.
10383
10384 @table @kbd
10385
10386 @item Z Z
10387 @itemx Z Q
10388 @itemx q
10389 @kindex Z Z (Summary)
10390 @kindex Z Q (Summary)
10391 @kindex q (Summary)
10392 @findex gnus-summary-exit
10393 @vindex gnus-summary-exit-hook
10394 @vindex gnus-summary-prepare-exit-hook
10395 @vindex gnus-group-no-more-groups-hook
10396 @c @icon{gnus-summary-exit}
10397 Exit the current group and update all information on the group
10398 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10399 called before doing much of the exiting, which calls
10400 @code{gnus-summary-expire-articles} by default.
10401 @code{gnus-summary-exit-hook} is called after finishing the exit
10402 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10403 group mode having no more (unread) groups.
10404
10405 @item Z E
10406 @itemx Q
10407 @kindex Z E (Summary)
10408 @kindex Q (Summary)
10409 @findex gnus-summary-exit-no-update
10410 Exit the current group without updating any information on the group
10411 (@code{gnus-summary-exit-no-update}).
10412
10413 @item Z c
10414 @itemx c
10415 @kindex Z c (Summary)
10416 @kindex c (Summary)
10417 @findex gnus-summary-catchup-and-exit
10418 @c @icon{gnus-summary-catchup-and-exit}
10419 Mark all unticked articles in the group as read and then exit
10420 (@code{gnus-summary-catchup-and-exit}).
10421
10422 @item Z C
10423 @kindex Z C (Summary)
10424 @findex gnus-summary-catchup-all-and-exit
10425 Mark all articles, even the ticked ones, as read and then exit
10426 (@code{gnus-summary-catchup-all-and-exit}).
10427
10428 @item Z n
10429 @kindex Z n (Summary)
10430 @findex gnus-summary-catchup-and-goto-next-group
10431 Mark all articles as read and go to the next group
10432 (@code{gnus-summary-catchup-and-goto-next-group}).
10433
10434 @item Z R
10435 @itemx C-x C-s
10436 @kindex Z R (Summary)
10437 @kindex C-x C-s (Summary)
10438 @findex gnus-summary-reselect-current-group
10439 Exit this group, and then enter it again
10440 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10441 all articles, both read and unread.
10442
10443 @item Z G
10444 @itemx M-g
10445 @kindex Z G (Summary)
10446 @kindex M-g (Summary)
10447 @findex gnus-summary-rescan-group
10448 @c @icon{gnus-summary-mail-get}
10449 Exit the group, check for new articles in the group, and select the
10450 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10451 articles, both read and unread.
10452
10453 @item Z N
10454 @kindex Z N (Summary)
10455 @findex gnus-summary-next-group
10456 Exit the group and go to the next group
10457 (@code{gnus-summary-next-group}).
10458
10459 @item Z P
10460 @kindex Z P (Summary)
10461 @findex gnus-summary-prev-group
10462 Exit the group and go to the previous group
10463 (@code{gnus-summary-prev-group}).
10464
10465 @item Z s
10466 @kindex Z s (Summary)
10467 @findex gnus-summary-save-newsrc
10468 Save the current number of read/marked articles in the dribble buffer
10469 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10470 given a prefix, also save the @file{.newsrc} file(s).  Using this
10471 command will make exit without updating (the @kbd{Q} command) worthless.
10472 @end table
10473
10474 @vindex gnus-exit-group-hook
10475 @code{gnus-exit-group-hook} is called when you exit the current group
10476 with an ``updating'' exit.  For instance @kbd{Q}
10477 (@code{gnus-summary-exit-no-update}) does not call this hook.
10478
10479 @findex gnus-summary-wake-up-the-dead
10480 @findex gnus-dead-summary-mode
10481 @vindex gnus-kill-summary-on-exit
10482 If you're in the habit of exiting groups, and then changing your mind
10483 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10484 If you do that, Gnus won't kill the summary buffer when you exit it.
10485 (Quelle surprise!)  Instead it will change the name of the buffer to
10486 something like @samp{*Dead Summary ... *} and install a minor mode
10487 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10488 buffer, you'll find that all keys are mapped to a function called
10489 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10490 summary buffer will result in a live, normal summary buffer.
10491
10492 There will never be more than one dead summary buffer at any one time.
10493
10494 @vindex gnus-use-cross-reference
10495 The data on the current group will be updated (which articles you have
10496 read, which articles you have replied to, etc.) when you exit the
10497 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10498 @code{t} (which is the default), articles that are cross-referenced to
10499 this group and are marked as read, will also be marked as read in the
10500 other subscribed groups they were cross-posted to.  If this variable is
10501 neither @code{nil} nor @code{t}, the article will be marked as read in
10502 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10503
10504
10505 @node Crosspost Handling
10506 @section Crosspost Handling
10507
10508 @cindex velveeta
10509 @cindex spamming
10510 Marking cross-posted articles as read ensures that you'll never have to
10511 read the same article more than once.  Unless, of course, somebody has
10512 posted it to several groups separately.  Posting the same article to
10513 several groups (not cross-posting) is called @dfn{spamming}, and you are
10514 by law required to send nasty-grams to anyone who perpetrates such a
10515 heinous crime.  You may want to try NoCeM handling to filter out spam
10516 (@pxref{NoCeM}).
10517
10518 Remember: Cross-posting is kinda ok, but posting the same article
10519 separately to several groups is not.  Massive cross-posting (aka.
10520 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10521 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10522 excessive crossposting (@pxref{Summary Mail Commands}).
10523
10524 @cindex cross-posting
10525 @cindex Xref
10526 @cindex @acronym{NOV}
10527 One thing that may cause Gnus to not do the cross-posting thing
10528 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10529 (which is very nice, because it speeds things up considerably) which
10530 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10531 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10532 even with @sc{xover} by registering the @code{Xref} lines of all
10533 articles you actually read, but if you kill the articles, or just mark
10534 them as read without reading them, Gnus will not get a chance to snoop
10535 the @code{Xref} lines out of these articles, and will be unable to use
10536 the cross reference mechanism.
10537
10538 @cindex LIST overview.fmt
10539 @cindex overview.fmt
10540 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10541 in its overview files, try @samp{telnet your.nntp.server nntp},
10542 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10543 overview.fmt}.  This may not work, but if it does, and the last line you
10544 get does not read @samp{Xref:full}, then you should shout and whine at
10545 your news admin until she includes the @code{Xref} header in the
10546 overview files.
10547
10548 @vindex gnus-nov-is-evil
10549 If you want Gnus to get the @code{Xref}s right all the time, you have to
10550 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10551 considerably.
10552
10553 C'est la vie.
10554
10555 For an alternative approach, @pxref{Duplicate Suppression}.
10556
10557
10558 @node Duplicate Suppression
10559 @section Duplicate Suppression
10560
10561 By default, Gnus tries to make sure that you don't have to read the same
10562 article more than once by utilizing the crossposting mechanism
10563 (@pxref{Crosspost Handling}).  However, that simple and efficient
10564 approach may not work satisfactory for some users for various
10565 reasons.
10566
10567 @enumerate
10568 @item
10569 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10570 is evil and not very common.
10571
10572 @item
10573 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10574 @file{.overview} data bases.  This is evil and all too common, alas.
10575
10576 @item
10577 You may be reading the same group (or several related groups) from
10578 different @acronym{NNTP} servers.
10579
10580 @item
10581 You may be getting mail that duplicates articles posted to groups.
10582 @end enumerate
10583
10584 I'm sure there are other situations where @code{Xref} handling fails as
10585 well, but these four are the most common situations.
10586
10587 If, and only if, @code{Xref} handling fails for you, then you may
10588 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10589 will remember the @code{Message-ID}s of all articles you have read or
10590 otherwise marked as read, and then, as if by magic, mark them as read
10591 all subsequent times you see them---in @emph{all} groups.  Using this
10592 mechanism is quite likely to be somewhat inefficient, but not overly
10593 so.  It's certainly preferable to reading the same articles more than
10594 once.
10595
10596 Duplicate suppression is not a very subtle instrument.  It's more like a
10597 sledge hammer than anything else.  It works in a very simple
10598 fashion---if you have marked an article as read, it adds this Message-ID
10599 to a cache.  The next time it sees this Message-ID, it will mark the
10600 article as read with the @samp{M} mark.  It doesn't care what group it
10601 saw the article in.
10602
10603 @table @code
10604 @item gnus-suppress-duplicates
10605 @vindex gnus-suppress-duplicates
10606 If non-@code{nil}, suppress duplicates.
10607
10608 @item gnus-save-duplicate-list
10609 @vindex gnus-save-duplicate-list
10610 If non-@code{nil}, save the list of duplicates to a file.  This will
10611 make startup and shutdown take longer, so the default is @code{nil}.
10612 However, this means that only duplicate articles read in a single Gnus
10613 session are suppressed.
10614
10615 @item gnus-duplicate-list-length
10616 @vindex gnus-duplicate-list-length
10617 This variable says how many @code{Message-ID}s to keep in the duplicate
10618 suppression list.  The default is 10000.
10619
10620 @item gnus-duplicate-file
10621 @vindex gnus-duplicate-file
10622 The name of the file to store the duplicate suppression list in.  The
10623 default is @file{~/News/suppression}.
10624 @end table
10625
10626 If you have a tendency to stop and start Gnus often, setting
10627 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10628 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10629 the other hand, saving the list makes startup and shutdown much slower,
10630 so that means that if you stop and start Gnus often, you should set
10631 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10632 to you to figure out, I think.
10633
10634 @node Security
10635 @section Security
10636
10637 Gnus is able to verify signed messages or decrypt encrypted messages.
10638 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10639 and @acronym{S/MIME}, however you need some external programs to get
10640 things to work:
10641
10642 @enumerate
10643 @item
10644 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10645 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10646 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10647 Manual}), but Mailcrypt and gpg.el are also supported.
10648
10649 @item
10650 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10651 or newer is recommended.
10652
10653 @end enumerate
10654
10655 More information on how to set things up can be found in the message
10656 manual (@pxref{Security, ,Security, message, Message Manual}).
10657
10658 @table @code
10659 @item mm-verify-option
10660 @vindex mm-verify-option
10661 Option of verifying signed parts.  @code{never}, not verify;
10662 @code{always}, always verify; @code{known}, only verify known
10663 protocols.  Otherwise, ask user.
10664
10665 @item mm-decrypt-option
10666 @vindex mm-decrypt-option
10667 Option of decrypting encrypted parts.  @code{never}, no decryption;
10668 @code{always}, always decrypt; @code{known}, only decrypt known
10669 protocols.  Otherwise, ask user.
10670
10671 @item mml1991-use
10672 @vindex mml1991-use
10673 Symbol indicating elisp interface to OpenPGP implementation for
10674 @acronym{PGP} messages.  The default is @code{pgg}, but
10675 @code{mailcrypt} and @code{gpg} are also supported although
10676 deprecated.
10677
10678 @item mml2015-use
10679 @vindex mml2015-use
10680 Symbol indicating elisp interface to OpenPGP implementation for
10681 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10682 @code{mailcrypt} and @code{gpg} are also supported although
10683 deprecated.
10684
10685 @end table
10686
10687 @cindex snarfing keys
10688 @cindex importing PGP keys
10689 @cindex PGP key ring import
10690 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10691 key ring) is not supported explicitly through a menu item or command,
10692 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10693 allowing you to specify whatever action you think is appropriate
10694 through the usual @acronym{MIME} infrastructure.  You can use a
10695 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10696 Emacs MIME Manual}) such as the following to import keys using GNU
10697 Privacy Guard when you click on the @acronym{MIME} button
10698 (@pxref{Using MIME}).
10699
10700 @example
10701 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10702 @end example
10703 @noindent
10704 This happens to also be the default action defined in
10705 @code{mailcap-mime-data}.
10706
10707 @node Mailing List
10708 @section Mailing List
10709 @cindex mailing list
10710 @cindex RFC 2396
10711
10712 @kindex A M (summary)
10713 @findex gnus-mailing-list-insinuate
10714 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10715 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10716 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10717 summary buffer.
10718
10719 That enables the following commands to the summary buffer:
10720
10721 @table @kbd
10722
10723 @item C-c C-n h
10724 @kindex C-c C-n h (Summary)
10725 @findex gnus-mailing-list-help
10726 Send a message to fetch mailing list help, if List-Help field exists.
10727
10728 @item C-c C-n s
10729 @kindex C-c C-n s (Summary)
10730 @findex gnus-mailing-list-subscribe
10731 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10732
10733 @item C-c C-n u
10734 @kindex C-c C-n u (Summary)
10735 @findex gnus-mailing-list-unsubscribe
10736 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10737 field exists.
10738
10739 @item C-c C-n p
10740 @kindex C-c C-n p (Summary)
10741 @findex gnus-mailing-list-post
10742 Post to the mailing list, if List-Post field exists.
10743
10744 @item C-c C-n o
10745 @kindex C-c C-n o (Summary)
10746 @findex gnus-mailing-list-owner
10747 Send a message to the mailing list owner, if List-Owner field exists.
10748
10749 @item C-c C-n a
10750 @kindex C-c C-n a (Summary)
10751 @findex gnus-mailing-list-archive
10752 Browse the mailing list archive, if List-Archive field exists.
10753
10754 @end table
10755
10756
10757 @node Article Buffer
10758 @chapter Article Buffer
10759 @cindex article buffer
10760
10761 The articles are displayed in the article buffer, of which there is only
10762 one.  All the summary buffers share the same article buffer unless you
10763 tell Gnus otherwise.
10764
10765 @menu
10766 * Hiding Headers::              Deciding what headers should be displayed.
10767 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10768 * Customizing Articles::        Tailoring the look of the articles.
10769 * Article Keymap::              Keystrokes available in the article buffer.
10770 * Misc Article::                Other stuff.
10771 @end menu
10772
10773
10774 @node Hiding Headers
10775 @section Hiding Headers
10776 @cindex hiding headers
10777 @cindex deleting headers
10778
10779 The top section of each article is the @dfn{head}.  (The rest is the
10780 @dfn{body}, but you may have guessed that already.)
10781
10782 @vindex gnus-show-all-headers
10783 There is a lot of useful information in the head: the name of the person
10784 who wrote the article, the date it was written and the subject of the
10785 article.  That's well and nice, but there's also lots of information
10786 most people do not want to see---what systems the article has passed
10787 through before reaching you, the @code{Message-ID}, the
10788 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10789 of some of those lines.  If you want to keep all those lines in the
10790 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10791
10792 Gnus provides you with two variables for sifting headers:
10793
10794 @table @code
10795
10796 @item gnus-visible-headers
10797 @vindex gnus-visible-headers
10798 If this variable is non-@code{nil}, it should be a regular expression
10799 that says what headers you wish to keep in the article buffer.  All
10800 headers that do not match this variable will be hidden.
10801
10802 For instance, if you only want to see the name of the person who wrote
10803 the article and the subject, you'd say:
10804
10805 @lisp
10806 (setq gnus-visible-headers "^From:\\|^Subject:")
10807 @end lisp
10808
10809 This variable can also be a list of regexps to match headers to
10810 remain visible.
10811
10812 @item gnus-ignored-headers
10813 @vindex gnus-ignored-headers
10814 This variable is the reverse of @code{gnus-visible-headers}.  If this
10815 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10816 should be a regular expression that matches all lines that you want to
10817 hide.  All lines that do not match this variable will remain visible.
10818
10819 For instance, if you just want to get rid of the @code{References} line
10820 and the @code{Xref} line, you might say:
10821
10822 @lisp
10823 (setq gnus-ignored-headers "^References:\\|^Xref:")
10824 @end lisp
10825
10826 This variable can also be a list of regexps to match headers to
10827 be removed.
10828
10829 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10830 variable will have no effect.
10831
10832 @end table
10833
10834 @vindex gnus-sorted-header-list
10835 Gnus can also sort the headers for you.  (It does this by default.)  You
10836 can control the sorting by setting the @code{gnus-sorted-header-list}
10837 variable.  It is a list of regular expressions that says in what order
10838 the headers are to be displayed.
10839
10840 For instance, if you want the name of the author of the article first,
10841 and then the subject, you might say something like:
10842
10843 @lisp
10844 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10845 @end lisp
10846
10847 Any headers that are to remain visible, but are not listed in this
10848 variable, will be displayed in random order after all the headers listed in this variable.
10849
10850 @findex gnus-article-hide-boring-headers
10851 @vindex gnus-boring-article-headers
10852 You can hide further boring headers by setting
10853 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10854 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10855 list, but this list doesn't actually contain header names.  Instead it
10856 lists various @dfn{boring conditions} that Gnus can check and remove
10857 from sight.
10858
10859 These conditions are:
10860 @table @code
10861 @item empty
10862 Remove all empty headers.
10863 @item followup-to
10864 Remove the @code{Followup-To} header if it is identical to the
10865 @code{Newsgroups} header.
10866 @item reply-to
10867 Remove the @code{Reply-To} header if it lists the same addresses as
10868 the @code{From} header, or if the @code{broken-reply-to} group
10869 parameter is set.
10870 @item newsgroups
10871 Remove the @code{Newsgroups} header if it only contains the current group
10872 name.
10873 @item to-address
10874 Remove the @code{To} header if it only contains the address identical to
10875 the current group's @code{to-address} parameter.
10876 @item to-list
10877 Remove the @code{To} header if it only contains the address identical to
10878 the current group's @code{to-list} parameter.
10879 @item cc-list
10880 Remove the @code{CC} header if it only contains the address identical to
10881 the current group's @code{to-list} parameter.
10882 @item date
10883 Remove the @code{Date} header if the article is less than three days
10884 old.
10885 @item long-to
10886 Remove the @code{To} header if it is very long.
10887 @item many-to
10888 Remove all @code{To} headers if there are more than one.
10889 @end table
10890
10891 To include these three elements, you could say something like:
10892
10893 @lisp
10894 (setq gnus-boring-article-headers
10895       '(empty followup-to reply-to))
10896 @end lisp
10897
10898 This is also the default value for this variable.
10899
10900
10901 @node Using MIME
10902 @section Using MIME
10903 @cindex @acronym{MIME}
10904
10905 Mime is a standard for waving your hands through the air, aimlessly,
10906 while people stand around yawning.
10907
10908 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10909 while all newsreaders die of fear.
10910
10911 @acronym{MIME} may specify what character set the article uses, the encoding
10912 of the characters, and it also makes it possible to embed pictures and
10913 other naughty stuff in innocent-looking articles.
10914
10915 @vindex gnus-display-mime-function
10916 @findex gnus-display-mime
10917 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10918 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10919 default, which creates a bundle of clickable buttons that can be used to
10920 display, save and manipulate the @acronym{MIME} objects.
10921
10922 The following commands are available when you have placed point over a
10923 @acronym{MIME} button:
10924
10925 @table @kbd
10926 @findex gnus-article-press-button
10927 @item RET (Article)
10928 @kindex RET (Article)
10929 @itemx BUTTON-2 (Article)
10930 Toggle displaying of the @acronym{MIME} object
10931 (@code{gnus-article-press-button}).  If built-in viewers can not display
10932 the object, Gnus resorts to external viewers in the @file{mailcap}
10933 files.  If a viewer has the @samp{copiousoutput} specification, the
10934 object is displayed inline.
10935
10936 @findex gnus-mime-view-part
10937 @item M-RET (Article)
10938 @kindex M-RET (Article)
10939 @itemx v (Article)
10940 Prompt for a method, and then view the @acronym{MIME} object using this
10941 method (@code{gnus-mime-view-part}).
10942
10943 @findex gnus-mime-view-part-as-type
10944 @item t (Article)
10945 @kindex t (Article)
10946 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10947 (@code{gnus-mime-view-part-as-type}).
10948
10949 @findex gnus-mime-view-part-as-charset
10950 @item C (Article)
10951 @kindex C (Article)
10952 Prompt for a charset, and then view the @acronym{MIME} object using this
10953 charset (@code{gnus-mime-view-part-as-charset}).
10954
10955 @findex gnus-mime-save-part
10956 @item o (Article)
10957 @kindex o (Article)
10958 Prompt for a file name, and then save the @acronym{MIME} object
10959 (@code{gnus-mime-save-part}).
10960
10961 @findex gnus-mime-save-part-and-strip
10962 @item C-o (Article)
10963 @kindex C-o (Article)
10964 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10965 the article.  Then proceed to article editing, where a reasonable
10966 suggestion is being made on how the altered article should look
10967 like.  The stripped @acronym{MIME} object will be referred via the
10968 message/external-body @acronym{MIME} type.
10969 (@code{gnus-mime-save-part-and-strip}).
10970
10971 @findex gnus-mime-delete-part
10972 @item d (Article)
10973 @kindex d (Article)
10974 Delete the @acronym{MIME} object from the article and replace it with some
10975 information about the removed @acronym{MIME} object
10976 (@code{gnus-mime-delete-part}).
10977
10978 @findex gnus-mime-copy-part
10979 @item c (Article)
10980 @kindex c (Article)
10981 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10982 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10983 @file{.bz2} are automatically decompressed if
10984 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10985 Accessing Compressed Files, emacs, The Emacs Editor}).
10986
10987 @findex gnus-mime-print-part
10988 @item p (Article)
10989 @kindex p (Article)
10990 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10991 command respects the @samp{print=} specifications in the
10992 @file{.mailcap} file.
10993
10994 @findex gnus-mime-inline-part
10995 @item i (Article)
10996 @kindex i (Article)
10997 Insert the contents of the @acronym{MIME} object into the buffer
10998 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10999 the raw contents without decoding.  If given a numerical prefix, you can
11000 do semi-manual charset stuff (see
11001 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
11002 Article}).
11003
11004 @findex gnus-mime-view-part-internally
11005 @item E (Article)
11006 @kindex E (Article)
11007 View the @acronym{MIME} object with an internal viewer.  If no internal
11008 viewer is available, use an external viewer
11009 (@code{gnus-mime-view-part-internally}).
11010
11011 @findex gnus-mime-view-part-externally
11012 @item e (Article)
11013 @kindex e (Article)
11014 View the @acronym{MIME} object with an external viewer.
11015 (@code{gnus-mime-view-part-externally}).
11016
11017 @findex gnus-mime-pipe-part
11018 @item | (Article)
11019 @kindex | (Article)
11020 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11021
11022 @findex gnus-mime-action-on-part
11023 @item . (Article)
11024 @kindex . (Article)
11025 Interactively run an action on the @acronym{MIME} object
11026 (@code{gnus-mime-action-on-part}).
11027
11028 @end table
11029
11030 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
11031 determines which parts to do this with is described in the Emacs
11032 @acronym{MIME} manual.
11033
11034 It might be best to just use the toggling functions from the article
11035 buffer to avoid getting nasty surprises.  (For instance, you enter the
11036 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11037 decoded the sound file in the article and some horrible sing-a-long song
11038 comes screaming out your speakers, and you can't find the volume button,
11039 because there isn't one, and people are starting to look at you, and you
11040 try to stop the program, but you can't, and you can't find the program
11041 to control the volume, and everybody else in the room suddenly decides
11042 to look at you disdainfully, and you'll feel rather stupid.)
11043
11044 Any similarity to real events and people is purely coincidental.  Ahem.
11045
11046 Also @pxref{MIME Commands}.
11047
11048
11049 @node Customizing Articles
11050 @section Customizing Articles
11051 @cindex article customization
11052
11053 A slew of functions for customizing how the articles are to look like
11054 exist.  You can call these functions interactively
11055 (@pxref{Article Washing}), or you can have them
11056 called automatically when you select the articles.
11057
11058 To have them called automatically, you should set the corresponding
11059 ``treatment'' variable.  For instance, to have headers hidden, you'd set
11060 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
11061 be set, but first we discuss the values these variables can have.
11062
11063 Note: Some values, while valid, make little sense.  Check the list below
11064 for sensible values.
11065
11066 @enumerate
11067 @item
11068 @code{nil}: Don't do this treatment.
11069
11070 @item
11071 @code{t}: Do this treatment on all body parts.
11072
11073 @item
11074 @code{head}: Do the treatment on the headers.
11075
11076 @item
11077 @code{last}: Do this treatment on the last part.
11078
11079 @item
11080 An integer: Do this treatment on all body parts that have a length less
11081 than this number.
11082
11083 @item
11084 A list of strings: Do this treatment on all body parts that are in
11085 articles that are read in groups that have names that match one of the
11086 regexps in the list.
11087
11088 @item
11089 A list where the first element is not a string:
11090
11091 The list is evaluated recursively.  The first element of the list is a
11092 predicate.  The following predicates are recognized: @code{or},
11093 @code{and}, @code{not} and @code{typep}.  Here's an example:
11094
11095 @lisp
11096 (or last
11097     (typep "text/x-vcard"))
11098 @end lisp
11099
11100 @end enumerate
11101
11102 You may have noticed that the word @dfn{part} is used here.  This refers
11103 to the fact that some messages are @acronym{MIME} multipart articles that may
11104 be divided into several parts.  Articles that are not multiparts are
11105 considered to contain just a single part.
11106
11107 @vindex gnus-article-treat-types
11108 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11109 want to, but by default, only @samp{text/plain} parts are given the
11110 treatment.  This is controlled by the @code{gnus-article-treat-types}
11111 variable, which is a list of regular expressions that are matched to the
11112 type of the part.  This variable is ignored if the value of the
11113 controlling variable is a predicate list, as described above.
11114
11115 The following treatment options are available.  The easiest way to
11116 customize this is to examine the @code{gnus-article-treat} customization
11117 group.  Values in parenthesis are suggested sensible values.  Others are
11118 possible but those listed are probably sufficient for most people.
11119
11120 @table @code
11121 @item gnus-treat-buttonize (t, integer)
11122 @item gnus-treat-buttonize-head (head)
11123
11124 @xref{Article Buttons}.
11125
11126 @item gnus-treat-capitalize-sentences (t, integer)
11127 @item gnus-treat-overstrike (t, integer)
11128 @item gnus-treat-strip-cr (t, integer)
11129 @item gnus-treat-strip-headers-in-body (t, integer)
11130 @item gnus-treat-strip-leading-blank-lines (t, integer)
11131 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11132 @item gnus-treat-strip-pem (t, last, integer)
11133 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11134 @item gnus-treat-unsplit-urls (t, integer)
11135 @item gnus-treat-wash-html (t, integer)
11136
11137 @xref{Article Washing}.
11138
11139 @item gnus-treat-date-english (head)
11140 @item gnus-treat-date-iso8601 (head)
11141 @item gnus-treat-date-lapsed (head)
11142 @item gnus-treat-date-local (head)
11143 @item gnus-treat-date-original (head)
11144 @item gnus-treat-date-user-defined (head)
11145 @item gnus-treat-date-ut (head)
11146
11147 @xref{Article Date}.
11148
11149 @item gnus-treat-from-picon (head)
11150 @item gnus-treat-mail-picon (head)
11151 @item gnus-treat-newsgroups-picon (head)
11152
11153 @xref{Picons}.
11154
11155 @item gnus-treat-display-smileys (t, integer)
11156
11157 @item gnus-treat-body-boundary (head)
11158
11159 @vindex gnus-body-boundary-delimiter
11160 Adds a delimiter between header and body, the string used as delimiter
11161 is controlled by @code{gnus-body-boundary-delimiter}.
11162
11163 @xref{Smileys}.
11164
11165 @item gnus-treat-display-x-face (head)
11166
11167 @xref{X-Face}.
11168
11169 @item gnus-treat-display-face (head)
11170
11171 @xref{Face}.
11172
11173 @item gnus-treat-emphasize (t, head, integer)
11174 @item gnus-treat-fill-article (t, integer)
11175 @item gnus-treat-fill-long-lines (t, integer)
11176 @item gnus-treat-hide-boring-headers (head)
11177 @item gnus-treat-hide-citation (t, integer)
11178 @item gnus-treat-hide-citation-maybe (t, integer)
11179 @item gnus-treat-hide-headers (head)
11180 @item gnus-treat-hide-signature (t, last)
11181 @item gnus-treat-strip-banner (t, last)
11182 @item gnus-treat-strip-list-identifiers (head)
11183
11184 @xref{Article Hiding}.
11185
11186 @item gnus-treat-highlight-citation (t, integer)
11187 @item gnus-treat-highlight-headers (head)
11188 @item gnus-treat-highlight-signature (t, last, integer)
11189
11190 @xref{Article Highlighting}.
11191
11192 @item gnus-treat-play-sounds
11193 @item gnus-treat-translate
11194 @item gnus-treat-ansi-sequences (t)
11195 @item gnus-treat-x-pgp-sig (head)
11196
11197 @item gnus-treat-unfold-headers (head)
11198 @item gnus-treat-fold-headers (head)
11199 @item gnus-treat-fold-newsgroups (head)
11200 @item gnus-treat-leading-whitespace (head)
11201
11202 @xref{Article Header}.
11203
11204
11205 @end table
11206
11207 @vindex gnus-part-display-hook
11208 You can, of course, write your own functions to be called from
11209 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11210 part, and you can do anything you like, pretty much.  There is no
11211 information that you have to keep in the buffer---you can change
11212 everything.
11213
11214
11215 @node Article Keymap
11216 @section Article Keymap
11217
11218 Most of the keystrokes in the summary buffer can also be used in the
11219 article buffer.  They should behave as if you typed them in the summary
11220 buffer, which means that you don't actually have to have a summary
11221 buffer displayed while reading.  You can do it all from the article
11222 buffer.
11223
11224 A few additional keystrokes are available:
11225
11226 @table @kbd
11227
11228 @item SPACE
11229 @kindex SPACE (Article)
11230 @findex gnus-article-next-page
11231 Scroll forwards one page (@code{gnus-article-next-page}).
11232 This is exactly the same as @kbd{h SPACE h}.
11233
11234 @item DEL
11235 @kindex DEL (Article)
11236 @findex gnus-article-prev-page
11237 Scroll backwards one page (@code{gnus-article-prev-page}).
11238 This is exactly the same as @kbd{h DEL h}.
11239
11240 @item C-c ^
11241 @kindex C-c ^ (Article)
11242 @findex gnus-article-refer-article
11243 If point is in the neighborhood of a @code{Message-ID} and you press
11244 @kbd{C-c ^}, Gnus will try to get that article from the server
11245 (@code{gnus-article-refer-article}).
11246
11247 @item C-c C-m
11248 @kindex C-c C-m (Article)
11249 @findex gnus-article-mail
11250 Send a reply to the address near point (@code{gnus-article-mail}).  If
11251 given a prefix, include the mail.
11252
11253 @item s
11254 @kindex s (Article)
11255 @findex gnus-article-show-summary
11256 Reconfigure the buffers so that the summary buffer becomes visible
11257 (@code{gnus-article-show-summary}).
11258
11259 @item ?
11260 @kindex ? (Article)
11261 @findex gnus-article-describe-briefly
11262 Give a very brief description of the available keystrokes
11263 (@code{gnus-article-describe-briefly}).
11264
11265 @item TAB
11266 @kindex TAB (Article)
11267 @findex gnus-article-next-button
11268 Go to the next button, if any (@code{gnus-article-next-button}).  This
11269 only makes sense if you have buttonizing turned on.
11270
11271 @item M-TAB
11272 @kindex M-TAB (Article)
11273 @findex gnus-article-prev-button
11274 Go to the previous button, if any (@code{gnus-article-prev-button}).
11275
11276 @item R
11277 @kindex R (Article)
11278 @findex gnus-article-reply-with-original
11279 Send a reply to the current article and yank the current article
11280 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11281 wide reply.  If the region is active, only yank the text in the
11282 region.
11283
11284 @item F
11285 @kindex F (Article)
11286 @findex gnus-article-followup-with-original
11287 Send a followup to the current article and yank the current article
11288 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11289 a wide reply.  If the region is active, only yank the text in the
11290 region.
11291
11292
11293 @end table
11294
11295
11296 @node Misc Article
11297 @section Misc Article
11298
11299 @table @code
11300
11301 @item gnus-single-article-buffer
11302 @vindex gnus-single-article-buffer
11303 If non-@code{nil}, use the same article buffer for all the groups.
11304 (This is the default.)  If @code{nil}, each group will have its own
11305 article buffer.
11306
11307 @vindex gnus-article-decode-hook
11308 @item gnus-article-decode-hook
11309 @cindex @acronym{MIME}
11310 Hook used to decode @acronym{MIME} articles.  The default value is
11311 @code{(article-decode-charset article-decode-encoded-words)}
11312
11313 @vindex gnus-article-prepare-hook
11314 @item gnus-article-prepare-hook
11315 This hook is called right after the article has been inserted into the
11316 article buffer.  It is mainly intended for functions that do something
11317 depending on the contents; it should probably not be used for changing
11318 the contents of the article buffer.
11319
11320 @item gnus-article-mode-hook
11321 @vindex gnus-article-mode-hook
11322 Hook called in article mode buffers.
11323
11324 @item gnus-article-mode-syntax-table
11325 @vindex gnus-article-mode-syntax-table
11326 Syntax table used in article buffers.  It is initialized from
11327 @code{text-mode-syntax-table}.
11328
11329 @vindex gnus-article-over-scroll
11330 @item gnus-article-over-scroll
11331 If non-@code{nil}, allow scrolling the article buffer even when there
11332 no more new text to scroll in.  The default is @code{nil}.
11333
11334 @vindex gnus-article-mode-line-format
11335 @item gnus-article-mode-line-format
11336 This variable is a format string along the same lines as
11337 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
11338 Line}).  It accepts the same format specifications as that variable,
11339 with two extensions:
11340
11341 @table @samp
11342
11343 @item w
11344 The @dfn{wash status} of the article.  This is a short string with one
11345 character for each possible article wash operation that may have been
11346 performed.  The characters and their meaning:
11347
11348 @table @samp
11349
11350 @item c
11351 Displayed when cited text may be hidden in the article buffer.
11352
11353 @item h
11354 Displayed when headers are hidden in the article buffer.
11355
11356 @item p
11357 Displayed when article is digitally signed or encrypted, and Gnus has
11358 hidden the security headers.  (N.B. does not tell anything about
11359 security status, i.e. good or bad signature.)
11360
11361 @item s
11362 Displayed when the signature has been hidden in the Article buffer.
11363
11364 @item o
11365 Displayed when Gnus has treated overstrike characters in the article buffer.
11366
11367 @item e
11368 Displayed when Gnus has treated emphasised strings in the article buffer.
11369
11370 @end table
11371
11372 @item m
11373 The number of @acronym{MIME} parts in the article.
11374
11375 @end table
11376
11377 @vindex gnus-break-pages
11378
11379 @item gnus-break-pages
11380 Controls whether @dfn{page breaking} is to take place.  If this variable
11381 is non-@code{nil}, the articles will be divided into pages whenever a
11382 page delimiter appears in the article.  If this variable is @code{nil},
11383 paging will not be done.
11384
11385 @item gnus-page-delimiter
11386 @vindex gnus-page-delimiter
11387 This is the delimiter mentioned above.  By default, it is @samp{^L}
11388 (formfeed).
11389
11390 @cindex IDNA
11391 @cindex internationalized domain names
11392 @vindex gnus-use-idna
11393 @item gnus-use-idna
11394 This variable controls whether Gnus performs IDNA decoding of
11395 internationalized domain names inside @samp{From}, @samp{To} and
11396 @samp{Cc} headers.  This requires
11397 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11398 variable is only enabled if you have installed it.
11399
11400 @end table
11401
11402
11403 @node Composing Messages
11404 @chapter Composing Messages
11405 @cindex composing messages
11406 @cindex messages
11407 @cindex mail
11408 @cindex sending mail
11409 @cindex reply
11410 @cindex followup
11411 @cindex post
11412 @cindex using gpg
11413 @cindex using s/mime
11414 @cindex using smime
11415
11416 @kindex C-c C-c (Post)
11417 All commands for posting and mailing will put you in a message buffer
11418 where you can edit the article all you like, before you send the
11419 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11420 Message Manual}.  Where the message will be posted/mailed to depends
11421 on your setup (@pxref{Posting Server}).
11422
11423 @menu
11424 * Mail::                        Mailing and replying.
11425 * Posting Server::              What server should you post and mail via?
11426 * POP before SMTP::             You cannot send a mail unless you read a mail.
11427 * Mail and Post::               Mailing and posting at the same time.
11428 * Archived Messages::           Where Gnus stores the messages you've sent.
11429 * Posting Styles::              An easier way to specify who you are.
11430 * Drafts::                      Postponing messages and rejected messages.
11431 * Rejected Articles::           What happens if the server doesn't like your article?
11432 * Signing and encrypting::      How to compose secure messages.
11433 @end menu
11434
11435 Also @pxref{Canceling and Superseding} for information on how to
11436 remove articles you shouldn't have posted.
11437
11438
11439 @node Mail
11440 @section Mail
11441
11442 Variables for customizing outgoing mail:
11443
11444 @table @code
11445 @item gnus-uu-digest-headers
11446 @vindex gnus-uu-digest-headers
11447 List of regexps to match headers included in digested messages.  The
11448 headers will be included in the sequence they are matched.  If
11449 @code{nil} include all headers.
11450
11451 @item gnus-add-to-list
11452 @vindex gnus-add-to-list
11453 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11454 that have none when you do a @kbd{a}.
11455
11456 @item gnus-confirm-mail-reply-to-news
11457 @vindex gnus-confirm-mail-reply-to-news
11458 This can also be a function receiving the group name as the only
11459 parameter which should return non-@code{nil} if a confirmation is
11460 needed, or a regular expression matching group names, where
11461 confirmation is should be asked for.
11462
11463 If you find yourself never wanting to reply to mail, but occasionally
11464 press R anyway, this variable might be for you.
11465
11466 @item gnus-confirm-treat-mail-like-news
11467 @vindex gnus-confirm-treat-mail-like-news
11468 If non-@code{nil}, Gnus also requests confirmation according to
11469 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11470 useful for treating mailing lists like newsgroups.
11471
11472 @end table
11473
11474
11475 @node Posting Server
11476 @section Posting Server
11477
11478 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11479 (extremely intelligent, of course) article, where does it go?
11480
11481 Thank you for asking.  I hate you.
11482
11483 It can be quite complicated.
11484
11485 @vindex gnus-post-method
11486 When posting news, Message usually invokes @code{message-send-news}
11487 (@pxref{News Variables, , News Variables, message, Message Manual}).
11488 Normally, Gnus will post using the same select method as you're
11489 reading from (which might be convenient if you're reading lots of
11490 groups from different private servers).  However.  If the server
11491 you're reading from doesn't allow posting, just reading, you probably
11492 want to use some other server to post your (extremely intelligent and
11493 fabulously interesting) articles.  You can then set the
11494 @code{gnus-post-method} to some other method:
11495
11496 @lisp
11497 (setq gnus-post-method '(nnspool ""))
11498 @end lisp
11499
11500 Now, if you've done this, and then this server rejects your article, or
11501 this server is down, what do you do then?  To override this variable you
11502 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11503 the ``current'' server, to get back the default behavior, for posting.
11504
11505 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11506 Gnus will prompt you for what method to use for posting.
11507
11508 You can also set @code{gnus-post-method} to a list of select methods.
11509 If that's the case, Gnus will always prompt you for what method to use
11510 for posting.
11511
11512 Finally, if you want to always post using the native select method,
11513 you can set this variable to @code{native}.
11514
11515 When sending mail, Message invokes @code{message-send-mail-function}.
11516 The default function, @code{message-send-mail-with-sendmail}, pipes
11517 your article to the @code{sendmail} binary for further queuing and
11518 sending.  When your local system is not configured for sending mail
11519 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11520 server, you can set @code{message-send-mail-function} to
11521 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11522 package correctly.  An example:
11523
11524 @lisp
11525 (setq message-send-mail-function 'smtpmail-send-it
11526       smtpmail-default-smtp-server "YOUR SMTP HOST")
11527 @end lisp
11528
11529 To the thing similar to this, there is
11530 @code{message-smtpmail-send-it}.  It is useful if your @acronym{ISP}
11531 requires the @acronym{POP}-before-@acronym{SMTP} authentication.
11532 @xref{POP before SMTP}.
11533
11534 Other possible choices for @code{message-send-mail-function} includes
11535 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11536 and @code{feedmail-send-it}.
11537
11538 @node POP before SMTP
11539 @section POP before SMTP
11540 @cindex pop before smtp
11541 @findex message-smtpmail-send-it
11542 @findex mail-source-touch-pop
11543
11544 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
11545 authentication?  It is whether you need to connect to the @acronym{POP}
11546 mail server within a certain time before sending mails.  If so, there is
11547 a convenient way.  To do that, put the following lines in your
11548 @file{~/.gnus.el} file:
11549
11550 @lisp
11551 (setq message-send-mail-function 'message-smtpmail-send-it)
11552 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
11553 @end lisp
11554
11555 @noindent
11556 It means to let Gnus connect to the @acronym{POP} mail server in advance
11557 whenever you send a mail.  The @code{mail-source-touch-pop} function
11558 does only a @acronym{POP} authentication according to the value of
11559 @code{mail-sources} without fetching mails, just before sending a mail.
11560 Note that you have to use @code{message-smtpmail-send-it} which runs
11561 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
11562 set the value of @code{mail-sources} for a @acronym{POP} connection
11563 correctly.  @xref{Mail Sources}.
11564
11565 If you have two or more @acronym{POP} mail servers set in
11566 @code{mail-sources}, you may want to specify one of them to
11567 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
11568 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
11569 is your primary @acronym{POP} mail server (i.e., you are fetching mails
11570 mainly from that server), you can set it permanently as follows:
11571
11572 @lisp
11573 (setq mail-source-primary-source
11574       '(pop :server "pop3.mail.server"
11575             :password "secret"))
11576 @end lisp
11577
11578 @noindent
11579 Otherwise, bind it dynamically only when performing the
11580 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
11581
11582 @lisp
11583 (add-hook 'message-send-mail-hook
11584           (lambda ()
11585             (let ((mail-source-primary-source
11586                    '(pop :server "pop3.mail.server"
11587                          :password "secret")))
11588               (mail-source-touch-pop))))
11589 @end lisp
11590
11591 @node Mail and Post
11592 @section Mail and Post
11593
11594 Here's a list of variables relevant to both mailing and
11595 posting:
11596
11597 @table @code
11598 @item gnus-mailing-list-groups
11599 @findex gnus-mailing-list-groups
11600 @cindex mailing lists
11601
11602 If your news server offers groups that are really mailing lists
11603 gatewayed to the @acronym{NNTP} server, you can read those groups without
11604 problems, but you can't post/followup to them without some difficulty.
11605 One solution is to add a @code{to-address} to the group parameters
11606 (@pxref{Group Parameters}).  An easier thing to do is set the
11607 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11608 really are mailing lists.  Then, at least, followups to the mailing
11609 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11610 still a pain, though.
11611
11612 @item gnus-user-agent
11613 @vindex gnus-user-agent
11614 @cindex User-Agent
11615
11616 This variable controls which information should be exposed in the
11617 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11618 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11619 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11620 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11621 system type) or a custom string.  If you set it to a string, be sure to
11622 use a valid format, see RFC 2616.
11623
11624 @end table
11625
11626 You may want to do spell-checking on messages that you send out.  Or, if
11627 you don't want to spell-check by hand, you could add automatic
11628 spell-checking via the @code{ispell} package:
11629
11630 @cindex ispell
11631 @findex ispell-message
11632 @lisp
11633 (add-hook 'message-send-hook 'ispell-message)
11634 @end lisp
11635
11636 If you want to change the @code{ispell} dictionary based on what group
11637 you're in, you could say something like the following:
11638
11639 @lisp
11640 (add-hook 'gnus-select-group-hook
11641           (lambda ()
11642             (cond
11643              ((string-match
11644                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11645               (ispell-change-dictionary "deutsch"))
11646              (t
11647               (ispell-change-dictionary "english")))))
11648 @end lisp
11649
11650 Modify to suit your needs.
11651
11652
11653 @node Archived Messages
11654 @section Archived Messages
11655 @cindex archived messages
11656 @cindex sent messages
11657
11658 Gnus provides a few different methods for storing the mail and news you
11659 send.  The default method is to use the @dfn{archive virtual server} to
11660 store the messages.  If you want to disable this completely, the
11661 @code{gnus-message-archive-group} variable should be @code{nil}, which
11662 is the default.
11663
11664 For archiving interesting messages in a group you read, see the
11665 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11666 Group Commands}).
11667
11668 @vindex gnus-message-archive-method
11669 @code{gnus-message-archive-method} says what virtual server Gnus is to
11670 use to store sent messages.  The default is:
11671
11672 @lisp
11673 (nnfolder "archive"
11674           (nnfolder-directory   "~/Mail/archive")
11675           (nnfolder-active-file "~/Mail/archive/active")
11676           (nnfolder-get-new-mail nil)
11677           (nnfolder-inhibit-expiry t))
11678 @end lisp
11679
11680 You can, however, use any mail select method (@code{nnml},
11681 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11682 for doing this sort of thing, though.  If you don't like the default
11683 directory chosen, you could say something like:
11684
11685 @lisp
11686 (setq gnus-message-archive-method
11687       '(nnfolder "archive"
11688                  (nnfolder-inhibit-expiry t)
11689                  (nnfolder-active-file "~/News/sent-mail/active")
11690                  (nnfolder-directory "~/News/sent-mail/")))
11691 @end lisp
11692
11693 @vindex gnus-message-archive-group
11694 @cindex Gcc
11695 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11696 to one or more group(s) on that server.  Which group to use is
11697 determined by the @code{gnus-message-archive-group} variable.
11698
11699 This variable can be used to do the following:
11700
11701 @table @asis
11702 @item a string
11703 Messages will be saved in that group.
11704
11705 Note that you can include a select method in the group name, then the
11706 message will not be stored in the select method given by
11707 @code{gnus-message-archive-method}, but in the select method specified
11708 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11709 has the default value shown above.  Then setting
11710 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11711 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11712 value @code{"nnml:foo"}, then outgoing messages will be stored in
11713 @samp{nnml:foo}.
11714
11715 @item a list of strings
11716 Messages will be saved in all those groups.
11717
11718 @item an alist of regexps, functions and forms
11719 When a key ``matches'', the result is used.
11720
11721 @item @code{nil}
11722 No message archiving will take place.  This is the default.
11723 @end table
11724
11725 Let's illustrate:
11726
11727 Just saving to a single group called @samp{MisK}:
11728 @lisp
11729 (setq gnus-message-archive-group "MisK")
11730 @end lisp
11731
11732 Saving to two groups, @samp{MisK} and @samp{safe}:
11733 @lisp
11734 (setq gnus-message-archive-group '("MisK" "safe"))
11735 @end lisp
11736
11737 Save to different groups based on what group you are in:
11738 @lisp
11739 (setq gnus-message-archive-group
11740       '(("^alt" "sent-to-alt")
11741         ("mail" "sent-to-mail")
11742         (".*" "sent-to-misc")))
11743 @end lisp
11744
11745 More complex stuff:
11746 @lisp
11747 (setq gnus-message-archive-group
11748       '((if (message-news-p)
11749             "misc-news"
11750           "misc-mail")))
11751 @end lisp
11752
11753 How about storing all news messages in one file, but storing all mail
11754 messages in one file per month:
11755
11756 @lisp
11757 (setq gnus-message-archive-group
11758       '((if (message-news-p)
11759             "misc-news"
11760           (concat "mail." (format-time-string "%Y-%m")))))
11761 @end lisp
11762
11763 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11764 @c use a different value for @code{gnus-message-archive-group} there.)
11765
11766 Now, when you send a message off, it will be stored in the appropriate
11767 group.  (If you want to disable storing for just one particular message,
11768 you can just remove the @code{Gcc} header that has been inserted.)  The
11769 archive group will appear in the group buffer the next time you start
11770 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11771 enter it and read the articles in it just like you'd read any other
11772 group.  If the group gets really big and annoying, you can simply rename
11773 if (using @kbd{G r} in the group buffer) to something
11774 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11775 continue to be stored in the old (now empty) group.
11776
11777 That's the default method of archiving sent messages.  Gnus offers a
11778 different way for the people who don't like the default method.  In that
11779 case you should set @code{gnus-message-archive-group} to @code{nil};
11780 this will disable archiving.
11781
11782 @table @code
11783 @item gnus-outgoing-message-group
11784 @vindex gnus-outgoing-message-group
11785 All outgoing messages will be put in this group.  If you want to store
11786 all your outgoing mail and articles in the group @samp{nnml:archive},
11787 you set this variable to that value.  This variable can also be a list of
11788 group names.
11789
11790 If you want to have greater control over what group to put each
11791 message in, you can set this variable to a function that checks the
11792 current newsgroup name and then returns a suitable group name (or list
11793 of names).
11794
11795 This variable can be used instead of @code{gnus-message-archive-group},
11796 but the latter is the preferred method.
11797
11798 @item gnus-gcc-mark-as-read
11799 @vindex gnus-gcc-mark-as-read
11800 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11801
11802 @item gnus-gcc-externalize-attachments
11803 @vindex gnus-gcc-externalize-attachments
11804 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11805 and matches the Gcc group name, attach files as external parts; if it is
11806 @code{all}, attach local files as external parts; if it is other
11807 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11808 changed in the future.
11809
11810 @end table
11811
11812
11813 @node Posting Styles
11814 @section Posting Styles
11815 @cindex posting styles
11816 @cindex styles
11817
11818 All them variables, they make my head swim.
11819
11820 So what if you want a different @code{Organization} and signature based
11821 on what groups you post to?  And you post both from your home machine
11822 and your work machine, and you want different @code{From} lines, and so
11823 on?
11824
11825 @vindex gnus-posting-styles
11826 One way to do stuff like that is to write clever hooks that change the
11827 variables you need to have changed.  That's a bit boring, so somebody
11828 came up with the bright idea of letting the user specify these things in
11829 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11830 variable:
11831
11832 @lisp
11833 ((".*"
11834   (signature "Peace and happiness")
11835   (organization "What me?"))
11836  ("^comp"
11837   (signature "Death to everybody"))
11838  ("comp.emacs.i-love-it"
11839   (organization "Emacs is it")))
11840 @end lisp
11841
11842 As you might surmise from this example, this alist consists of several
11843 @dfn{styles}.  Each style will be applicable if the first element
11844 ``matches'', in some form or other.  The entire alist will be iterated
11845 over, from the beginning towards the end, and each match will be
11846 applied, which means that attributes in later styles that match override
11847 the same attributes in earlier matching styles.  So
11848 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11849 signature and the @samp{What me?} @code{Organization} header.
11850
11851 The first element in each style is called the @code{match}.  If it's a
11852 string, then Gnus will try to regexp match it against the group name.
11853 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11854 will look in the original article for a header whose name is
11855 @var{match} and compare that @var{regexp}.  @var{match} and
11856 @var{regexp} are strings.  (The original article is the one you are
11857 replying or following up to.  If you are not composing a reply or a
11858 followup, then there is nothing to match against.)  If the
11859 @code{match} is a function symbol, that function will be called with
11860 no arguments.  If it's a variable symbol, then the variable will be
11861 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11862 any case, if this returns a non-@code{nil} value, then the style is
11863 said to @dfn{match}.
11864
11865 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11866 attribute consists of a @code{(@var{name} @var{value})} pair.  In
11867 addition, you can also use the @code{(@var{name} :file @var{value})}
11868 form or the @code{(@var{name} :value @var{value})} form.  Where
11869 @code{:file} signifies @var{value} represents a file name and its
11870 contents should be used as the attribute value, @code{:value} signifies
11871 @var{value} does not represent a file name explicitly.  The attribute
11872 name can be one of:
11873
11874 @itemize @bullet
11875 @item @code{signature}
11876 @item @code{signature-file}
11877 @item @code{x-face-file}
11878 @item @code{address}, overriding @code{user-mail-address}
11879 @item @code{name}, overriding @code{(user-full-name)}
11880 @item @code{body}
11881 @end itemize
11882
11883 The attribute name can also be a string or a symbol.  In that case,
11884 this will be used as a header name, and the value will be inserted in
11885 the headers of the article; if the value is @code{nil}, the header
11886 name will be removed.  If the attribute name is @code{eval}, the form
11887 is evaluated, and the result is thrown away.
11888
11889 The attribute value can be a string (used verbatim), a function with
11890 zero arguments (the return value will be used), a variable (its value
11891 will be used) or a list (it will be @code{eval}ed and the return value
11892 will be used).  The functions and sexps are called/@code{eval}ed in the
11893 message buffer that is being set up.  The headers of the current article
11894 are available through the @code{message-reply-headers} variable, which
11895 is a vector of the following headers: number subject from date id
11896 references chars lines xref extra.
11897
11898 @vindex message-reply-headers
11899
11900 If you wish to check whether the message you are about to compose is
11901 meant to be a news article or a mail message, you can check the values
11902 of the @code{message-news-p} and @code{message-mail-p} functions.
11903
11904 @findex message-mail-p
11905 @findex message-news-p
11906
11907 So here's a new example:
11908
11909 @lisp
11910 (setq gnus-posting-styles
11911       '((".*"
11912          (signature-file "~/.signature")
11913          (name "User Name")
11914          ("X-Home-Page" (getenv "WWW_HOME"))
11915          (organization "People's Front Against MWM"))
11916         ("^rec.humor"
11917          (signature my-funny-signature-randomizer))
11918         ((equal (system-name) "gnarly")  ;; @r{A form}
11919          (signature my-quote-randomizer))
11920         (message-news-p        ;; @r{A function symbol}
11921          (signature my-news-signature))
11922         (window-system         ;; @r{A value symbol}
11923          ("X-Window-System" (format "%s" window-system)))
11924         ;; @r{If I'm replying to Larsi, set the Organization header.}
11925         ((header "from" "larsi.*org")
11926          (Organization "Somewhere, Inc."))
11927         ((posting-from-work-p) ;; @r{A user defined function}
11928          (signature-file "~/.work-signature")
11929          (address "user@@bar.foo")
11930          (body "You are fired.\n\nSincerely, your boss.")
11931          (organization "Important Work, Inc"))
11932         ("nnml:.*"
11933          (From (save-excursion
11934                  (set-buffer gnus-article-buffer)
11935                  (message-fetch-field "to"))))
11936         ("^nn.+:"
11937          (signature-file "~/.mail-signature"))))
11938 @end lisp
11939
11940 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11941 @code{From} address in all your outgoing replies, which might be handy
11942 if you fill many roles.
11943
11944
11945 @node Drafts
11946 @section Drafts
11947 @cindex drafts
11948
11949 If you are writing a message (mail or news) and suddenly remember that
11950 you have a steak in the oven (or some pesto in the food processor, you
11951 craaazy vegetarians), you'll probably wish there was a method to save
11952 the message you are writing so that you can continue editing it some
11953 other day, and send it when you feel its finished.
11954
11955 Well, don't worry about it.  Whenever you start composing a message of
11956 some sort using the Gnus mail and post commands, the buffer you get will
11957 automatically associate to an article in a special @dfn{draft} group.
11958 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11959 article will be saved there.  (Auto-save files also go to the draft
11960 group.)
11961
11962 @cindex nndraft
11963 @vindex nndraft-directory
11964 The draft group is a special group (which is implemented as an
11965 @code{nndraft} group, if you absolutely have to know) called
11966 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11967 @code{nndraft} is to store its files.  What makes this group special is
11968 that you can't tick any articles in it or mark any articles as
11969 read---all articles in the group are permanently unread.
11970
11971 If the group doesn't exist, it will be created and you'll be subscribed
11972 to it.  The only way to make it disappear from the Group buffer is to
11973 unsubscribe it.  The special properties of the draft group comes from
11974 a group property (@pxref{Group Parameters}), and if lost the group
11975 behaves like any other group.  This means the commands below will not
11976 be available.  To restore the special properties of the group, the
11977 simplest way is to kill the group, using @kbd{C-k}, and restart
11978 Gnus.  The group is automatically created again with the
11979 correct parameters.  The content of the group is not lost.
11980
11981 @c @findex gnus-dissociate-buffer-from-draft
11982 @c @kindex C-c M-d (Mail)
11983 @c @kindex C-c M-d (Post)
11984 @c @findex gnus-associate-buffer-with-draft
11985 @c @kindex C-c C-d (Mail)
11986 @c @kindex C-c C-d (Post)
11987 @c If you're writing some super-secret message that you later want to
11988 @c encode with PGP before sending, you may wish to turn the auto-saving
11989 @c (and association with the draft group) off.  You never know who might be
11990 @c interested in reading all your extremely valuable and terribly horrible
11991 @c and interesting secrets.  The @kbd{C-c M-d}
11992 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11993 @c If you change your mind and want to turn the auto-saving back on again,
11994 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11995 @c
11996 @c @vindex gnus-use-draft
11997 @c To leave association with the draft group off by default, set
11998 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11999
12000 @findex gnus-draft-edit-message
12001 @kindex D e (Draft)
12002 When you want to continue editing the article, you simply enter the
12003 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
12004 that.  You will be placed in a buffer where you left off.
12005
12006 Rejected articles will also be put in this draft group (@pxref{Rejected
12007 Articles}).
12008
12009 @findex gnus-draft-send-all-messages
12010 @kindex D s (Draft)
12011 @findex gnus-draft-send-message
12012 @kindex D S (Draft)
12013 If you have lots of rejected messages you want to post (or mail) without
12014 doing further editing, you can use the @kbd{D s} command
12015 (@code{gnus-draft-send-message}).  This command understands the
12016 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
12017 command (@code{gnus-draft-send-all-messages}) will ship off all messages
12018 in the buffer.
12019
12020 @findex gnus-draft-toggle-sending
12021 @kindex D t (Draft)
12022 If you have some messages that you wish not to send, you can use the
12023 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
12024 as unsendable.  This is a toggling command.
12025
12026
12027 @node Rejected Articles
12028 @section Rejected Articles
12029 @cindex rejected articles
12030
12031 Sometimes a news server will reject an article.  Perhaps the server
12032 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
12033 @emph{there be demons}.  Perhaps you have included too much cited text.
12034 Perhaps the disk is full.  Perhaps the server is down.
12035
12036 These situations are, of course, totally beyond the control of Gnus.
12037 (Gnus, of course, loves the way you look, always feels great, has angels
12038 fluttering around inside of it, doesn't care about how much cited text
12039 you include, never runs full and never goes down.)  So Gnus saves these
12040 articles until some later time when the server feels better.
12041
12042 The rejected articles will automatically be put in a special draft group
12043 (@pxref{Drafts}).  When the server comes back up again, you'd then
12044 typically enter that group and send all the articles off.
12045
12046 @node Signing and encrypting
12047 @section Signing and encrypting
12048 @cindex using gpg
12049 @cindex using s/mime
12050 @cindex using smime
12051
12052 Gnus can digitally sign and encrypt your messages, using vanilla
12053 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
12054 decoding such messages, see the @code{mm-verify-option} and
12055 @code{mm-decrypt-option} options (@pxref{Security}).
12056
12057 @vindex gnus-message-replysign
12058 @vindex gnus-message-replyencrypt
12059 @vindex gnus-message-replysignencrypted
12060 Often, you would like to sign replies to people who send you signed
12061 messages.  Even more often, you might want to encrypt messages which
12062 are in reply to encrypted messages.  Gnus offers
12063 @code{gnus-message-replysign} to enable the former, and
12064 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
12065 @code{gnus-message-replysignencrypted} (on by default) will sign
12066 automatically encrypted messages.
12067
12068 Instructing @acronym{MML} to perform security operations on a
12069 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
12070 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
12071
12072 @table @kbd
12073
12074 @item C-c C-m s s
12075 @kindex C-c C-m s s (Message)
12076 @findex mml-secure-message-sign-smime
12077
12078 Digitally sign current message using @acronym{S/MIME}.
12079
12080 @item C-c C-m s o
12081 @kindex C-c C-m s o (Message)
12082 @findex mml-secure-message-sign-pgp
12083
12084 Digitally sign current message using @acronym{PGP}.
12085
12086 @item C-c C-m s p
12087 @kindex C-c C-m s p (Message)
12088 @findex mml-secure-message-sign-pgp
12089
12090 Digitally sign current message using @acronym{PGP/MIME}.
12091
12092 @item C-c C-m c s
12093 @kindex C-c C-m c s (Message)
12094 @findex mml-secure-message-encrypt-smime
12095
12096 Digitally encrypt current message using @acronym{S/MIME}.
12097
12098 @item C-c C-m c o
12099 @kindex C-c C-m c o (Message)
12100 @findex mml-secure-message-encrypt-pgp
12101
12102 Digitally encrypt current message using @acronym{PGP}.
12103
12104 @item C-c C-m c p
12105 @kindex C-c C-m c p (Message)
12106 @findex mml-secure-message-encrypt-pgpmime
12107
12108 Digitally encrypt current message using @acronym{PGP/MIME}.
12109
12110 @item C-c C-m C-n
12111 @kindex C-c C-m C-n (Message)
12112 @findex mml-unsecure-message
12113 Remove security related @acronym{MML} tags from message.
12114
12115 @end table
12116
12117 @xref{Security, ,Security, message, Message Manual}, for more information.
12118
12119 @node Select Methods
12120 @chapter Select Methods
12121 @cindex foreign groups
12122 @cindex select methods
12123
12124 A @dfn{foreign group} is a group not read by the usual (or
12125 default) means.  It could be, for instance, a group from a different
12126 @acronym{NNTP} server, it could be a virtual group, or it could be your own
12127 personal mail group.
12128
12129 A foreign group (or any group, really) is specified by a @dfn{name} and
12130 a @dfn{select method}.  To take the latter first, a select method is a
12131 list where the first element says what back end to use (e.g. @code{nntp},
12132 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12133 name}.  There may be additional elements in the select method, where the
12134 value may have special meaning for the back end in question.
12135
12136 One could say that a select method defines a @dfn{virtual server}---so
12137 we do just that (@pxref{Server Buffer}).
12138
12139 The @dfn{name} of the group is the name the back end will recognize the
12140 group as.
12141
12142 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12143 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12144 method @code{(nntp "some.where.edu")}.  Gnus will call this group
12145 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12146 back end just knows this group as @samp{soc.motss}.
12147
12148 The different methods all have their peculiarities, of course.
12149
12150 @menu
12151 * Server Buffer::               Making and editing virtual servers.
12152 * Getting News::                Reading USENET news with Gnus.
12153 * Getting Mail::                Reading your personal mail with Gnus.
12154 * Browsing the Web::            Getting messages from a plethora of Web sources.
12155 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
12156 * Other Sources::               Reading directories, files, SOUP packets.
12157 * Combined Groups::             Combining groups into one group.
12158 * Gnus Unplugged::              Reading news and mail offline.
12159 @end menu
12160
12161
12162 @node Server Buffer
12163 @section Server Buffer
12164
12165 Traditionally, a @dfn{server} is a machine or a piece of software that
12166 one connects to, and then requests information from.  Gnus does not
12167 connect directly to any real servers, but does all transactions through
12168 one back end or other.  But that's just putting one layer more between
12169 the actual media and Gnus, so we might just as well say that each
12170 back end represents a virtual server.
12171
12172 For instance, the @code{nntp} back end may be used to connect to several
12173 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12174 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12175 use, and what parameters to set by specifying a @dfn{select method}.
12176
12177 These select method specifications can sometimes become quite
12178 complicated---say, for instance, that you want to read from the
12179 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12180 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12181 Anyway, if you had to specify that for each group that used this
12182 server, that would be too much work, so Gnus offers a way of naming
12183 select methods, which is what you do in the server buffer.
12184
12185 To enter the server buffer, use the @kbd{^}
12186 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12187
12188 @menu
12189 * Server Buffer Format::        You can customize the look of this buffer.
12190 * Server Commands::             Commands to manipulate servers.
12191 * Example Methods::             Examples server specifications.
12192 * Creating a Virtual Server::   An example session.
12193 * Server Variables::            Which variables to set.
12194 * Servers and Methods::         You can use server names as select methods.
12195 * Unavailable Servers::         Some servers you try to contact may be down.
12196 @end menu
12197
12198 @vindex gnus-server-mode-hook
12199 @code{gnus-server-mode-hook} is run when creating the server buffer.
12200
12201
12202 @node Server Buffer Format
12203 @subsection Server Buffer Format
12204 @cindex server buffer format
12205
12206 @vindex gnus-server-line-format
12207 You can change the look of the server buffer lines by changing the
12208 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12209 variable, with some simple extensions:
12210
12211 @table @samp
12212
12213 @item h
12214 How the news is fetched---the back end name.
12215
12216 @item n
12217 The name of this server.
12218
12219 @item w
12220 Where the news is to be fetched from---the address.
12221
12222 @item s
12223 The opened/closed/denied status of the server.
12224 @end table
12225
12226 @vindex gnus-server-mode-line-format
12227 The mode line can also be customized by using the
12228 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12229 Formatting}).  The following specs are understood:
12230
12231 @table @samp
12232 @item S
12233 Server name.
12234
12235 @item M
12236 Server method.
12237 @end table
12238
12239 Also @pxref{Formatting Variables}.
12240
12241
12242 @node Server Commands
12243 @subsection Server Commands
12244 @cindex server commands
12245
12246 @table @kbd
12247
12248 @item a
12249 @kindex a (Server)
12250 @findex gnus-server-add-server
12251 Add a new server (@code{gnus-server-add-server}).
12252
12253 @item e
12254 @kindex e (Server)
12255 @findex gnus-server-edit-server
12256 Edit a server (@code{gnus-server-edit-server}).
12257
12258 @item SPACE
12259 @kindex SPACE (Server)
12260 @findex gnus-server-read-server
12261 Browse the current server (@code{gnus-server-read-server}).
12262
12263 @item q
12264 @kindex q (Server)
12265 @findex gnus-server-exit
12266 Return to the group buffer (@code{gnus-server-exit}).
12267
12268 @item k
12269 @kindex k (Server)
12270 @findex gnus-server-kill-server
12271 Kill the current server (@code{gnus-server-kill-server}).
12272
12273 @item y
12274 @kindex y (Server)
12275 @findex gnus-server-yank-server
12276 Yank the previously killed server (@code{gnus-server-yank-server}).
12277
12278 @item c
12279 @kindex c (Server)
12280 @findex gnus-server-copy-server
12281 Copy the current server (@code{gnus-server-copy-server}).
12282
12283 @item l
12284 @kindex l (Server)
12285 @findex gnus-server-list-servers
12286 List all servers (@code{gnus-server-list-servers}).
12287
12288 @item s
12289 @kindex s (Server)
12290 @findex gnus-server-scan-server
12291 Request that the server scan its sources for new articles
12292 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12293 servers.
12294
12295 @item g
12296 @kindex g (Server)
12297 @findex gnus-server-regenerate-server
12298 Request that the server regenerate all its data structures
12299 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12300 a mail back end that has gotten out of sync.
12301
12302 @end table
12303
12304
12305 @node Example Methods
12306 @subsection Example Methods
12307
12308 Most select methods are pretty simple and self-explanatory:
12309
12310 @lisp
12311 (nntp "news.funet.fi")
12312 @end lisp
12313
12314 Reading directly from the spool is even simpler:
12315
12316 @lisp
12317 (nnspool "")
12318 @end lisp
12319
12320 As you can see, the first element in a select method is the name of the
12321 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12322 will.
12323
12324 After these two elements, there may be an arbitrary number of
12325 @code{(@var{variable} @var{form})} pairs.
12326
12327 To go back to the first example---imagine that you want to read from
12328 port 15 on that machine.  This is what the select method should
12329 look like then:
12330
12331 @lisp
12332 (nntp "news.funet.fi" (nntp-port-number 15))
12333 @end lisp
12334
12335 You should read the documentation to each back end to find out what
12336 variables are relevant, but here's an @code{nnmh} example:
12337
12338 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12339 you have two structures that you wish to access: One is your private
12340 mail spool, and the other is a public one.  Here's the possible spec for
12341 your private mail:
12342
12343 @lisp
12344 (nnmh "private" (nnmh-directory "~/private/mail/"))
12345 @end lisp
12346
12347 (This server is then called @samp{private}, but you may have guessed
12348 that.)
12349
12350 Here's the method for a public spool:
12351
12352 @lisp
12353 (nnmh "public"
12354       (nnmh-directory "/usr/information/spool/")
12355       (nnmh-get-new-mail nil))
12356 @end lisp
12357
12358 @cindex proxy
12359 @cindex firewall
12360
12361 If you are behind a firewall and only have access to the @acronym{NNTP}
12362 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12363 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12364 Doing this can be rather fiddly, but your virtual server definition
12365 should probably look something like this:
12366
12367 @lisp
12368 (nntp "firewall"
12369       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12370       (nntp-via-address "the.firewall.machine")
12371       (nntp-address "the.real.nntp.host")
12372       (nntp-end-of-line "\n"))
12373 @end lisp
12374
12375 If you want to use the wonderful @code{ssh} program to provide a
12376 compressed connection over the modem line, you could add the following
12377 configuration to the example above:
12378
12379 @lisp
12380       (nntp-via-rlogin-command "ssh")
12381 @end lisp
12382
12383 See also @code{nntp-via-rlogin-command-switches}.
12384
12385 If you're behind a firewall, but have direct access to the outside world
12386 through a wrapper command like "runsocks", you could open a socksified
12387 telnet connection to the news server as follows:
12388
12389 @lisp
12390 (nntp "outside"
12391       (nntp-pre-command "runsocks")
12392       (nntp-open-connection-function nntp-open-via-telnet)
12393       (nntp-address "the.news.server")
12394       (nntp-end-of-line "\n"))
12395 @end lisp
12396
12397 This means that you have to have set up @code{ssh-agent} correctly to
12398 provide automatic authorization, of course.  And to get a compressed
12399 connection, you have to have the @samp{Compression} option in the
12400 @code{ssh} @file{config} file.
12401
12402
12403 @node Creating a Virtual Server
12404 @subsection Creating a Virtual Server
12405
12406 If you're saving lots of articles in the cache by using persistent
12407 articles, you may want to create a virtual server to read the cache.
12408
12409 First you need to add a new server.  The @kbd{a} command does that.  It
12410 would probably be best to use @code{nnml} to read the cache.  You
12411 could also use @code{nnspool} or @code{nnmh}, though.
12412
12413 Type @kbd{a nnml RET cache RET}.
12414
12415 You should now have a brand new @code{nnml} virtual server called
12416 @samp{cache}.  You now need to edit it to have the right definitions.
12417 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12418 will contain the following:
12419
12420 @lisp
12421 (nnml "cache")
12422 @end lisp
12423
12424 Change that to:
12425
12426 @lisp
12427 (nnml "cache"
12428          (nnml-directory "~/News/cache/")
12429          (nnml-active-file "~/News/cache/active"))
12430 @end lisp
12431
12432 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12433 @kbd{RET} over this virtual server, you should be entered into a browse
12434 buffer, and you should be able to enter any of the groups displayed.
12435
12436
12437 @node Server Variables
12438 @subsection Server Variables
12439 @cindex server variables
12440 @cindex server parameters
12441
12442 One sticky point when defining variables (both on back ends and in Emacs
12443 in general) is that some variables are typically initialized from other
12444 variables when the definition of the variables is being loaded.  If you
12445 change the ``base'' variable after the variables have been loaded, you
12446 won't change the ``derived'' variables.
12447
12448 This typically affects directory and file variables.  For instance,
12449 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12450 directory variables are initialized from that variable, so
12451 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12452 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12453 @code{nnml-directory}---you have to explicitly set all the file
12454 variables to be what you want them to be.  For a complete list of
12455 variables for each back end, see each back end's section later in this
12456 manual, but here's an example @code{nnml} definition:
12457
12458 @lisp
12459 (nnml "public"
12460       (nnml-directory "~/my-mail/")
12461       (nnml-active-file "~/my-mail/active")
12462       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12463 @end lisp
12464
12465 Server variables are often called @dfn{server parameters}.
12466
12467 @node Servers and Methods
12468 @subsection Servers and Methods
12469
12470 Wherever you would normally use a select method
12471 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12472 when browsing a foreign server) you can use a virtual server name
12473 instead.  This could potentially save lots of typing.  And it's nice all
12474 over.
12475
12476
12477 @node Unavailable Servers
12478 @subsection Unavailable Servers
12479
12480 If a server seems to be unreachable, Gnus will mark that server as
12481 @code{denied}.  That means that any subsequent attempt to make contact
12482 with that server will just be ignored.  ``It can't be opened,'' Gnus
12483 will tell you, without making the least effort to see whether that is
12484 actually the case or not.
12485
12486 That might seem quite naughty, but it does make sense most of the time.
12487 Let's say you have 10 groups subscribed to on server
12488 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12489 away from you and the machine is quite slow, so it takes 1 minute just
12490 to find out that it refuses connection to you today.  If Gnus were to
12491 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12492 attempt to do that.  Once it has gotten a single ``connection refused'',
12493 it will regard that server as ``down''.
12494
12495 So, what happens if the machine was only feeling unwell temporarily?
12496 How do you test to see whether the machine has come up again?
12497
12498 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12499 with the following commands:
12500
12501 @table @kbd
12502
12503 @item O
12504 @kindex O (Server)
12505 @findex gnus-server-open-server
12506 Try to establish connection to the server on the current line
12507 (@code{gnus-server-open-server}).
12508
12509 @item C
12510 @kindex C (Server)
12511 @findex gnus-server-close-server
12512 Close the connection (if any) to the server
12513 (@code{gnus-server-close-server}).
12514
12515 @item D
12516 @kindex D (Server)
12517 @findex gnus-server-deny-server
12518 Mark the current server as unreachable
12519 (@code{gnus-server-deny-server}).
12520
12521 @item M-o
12522 @kindex M-o (Server)
12523 @findex gnus-server-open-all-servers
12524 Open the connections to all servers in the buffer
12525 (@code{gnus-server-open-all-servers}).
12526
12527 @item M-c
12528 @kindex M-c (Server)
12529 @findex gnus-server-close-all-servers
12530 Close the connections to all servers in the buffer
12531 (@code{gnus-server-close-all-servers}).
12532
12533 @item R
12534 @kindex R (Server)
12535 @findex gnus-server-remove-denials
12536 Remove all marks to whether Gnus was denied connection from any servers
12537 (@code{gnus-server-remove-denials}).
12538
12539 @item L
12540 @kindex L (Server)
12541 @findex gnus-server-offline-server
12542 Set server status to offline (@code{gnus-server-offline-server}).
12543
12544 @end table
12545
12546
12547 @node Getting News
12548 @section Getting News
12549 @cindex reading news
12550 @cindex news back ends
12551
12552 A newsreader is normally used for reading news.  Gnus currently provides
12553 only two methods of getting news---it can read from an @acronym{NNTP} server,
12554 or it can read from a local spool.
12555
12556 @menu
12557 * NNTP::                        Reading news from an @acronym{NNTP} server.
12558 * News Spool::                  Reading news from the local spool.
12559 @end menu
12560
12561
12562 @node NNTP
12563 @subsection NNTP
12564 @cindex nntp
12565
12566 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12567 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12568 server as the, uhm, address.
12569
12570 If the @acronym{NNTP} server is located at a non-standard port, setting the
12571 third element of the select method to this port number should allow you
12572 to connect to the right port.  You'll have to edit the group info for
12573 that (@pxref{Foreign Groups}).
12574
12575 The name of the foreign group can be the same as a native group.  In
12576 fact, you can subscribe to the same group from as many different servers
12577 you feel like.  There will be no name collisions.
12578
12579 The following variables can be used to create a virtual @code{nntp}
12580 server:
12581
12582 @table @code
12583
12584 @item nntp-server-opened-hook
12585 @vindex nntp-server-opened-hook
12586 @cindex @sc{mode reader}
12587 @cindex authinfo
12588 @cindex authentification
12589 @cindex nntp authentification
12590 @findex nntp-send-authinfo
12591 @findex nntp-send-mode-reader
12592 is run after a connection has been made.  It can be used to send
12593 commands to the @acronym{NNTP} server after it has been contacted.  By
12594 default it sends the command @code{MODE READER} to the server with the
12595 @code{nntp-send-mode-reader} function.  This function should always be
12596 present in this hook.
12597
12598 @item nntp-authinfo-function
12599 @vindex nntp-authinfo-function
12600 @findex nntp-send-authinfo
12601 @vindex nntp-authinfo-file
12602 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12603 server.  The default function is @code{nntp-send-authinfo}, which looks
12604 through your @file{~/.authinfo} (or whatever you've set the
12605 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12606 are found, it will prompt you for a login name and a password.  The
12607 format of the @file{~/.authinfo} file is (almost) the same as the
12608 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12609 manual page, but here are the salient facts:
12610
12611 @enumerate
12612 @item
12613 The file contains one or more line, each of which define one server.
12614
12615 @item
12616 Each line may contain an arbitrary number of token/value pairs.
12617
12618 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12619 @samp{default}.  In addition Gnus introduces two new tokens, not present
12620 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12621 @samp{force}.  (This is the only way the @file{.authinfo} file format
12622 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12623 indicate what port on the server the credentials apply to and
12624 @samp{force} is explained below.
12625
12626 @end enumerate
12627
12628 Here's an example file:
12629
12630 @example
12631 machine news.uio.no login larsi password geheimnis
12632 machine nntp.ifi.uio.no login larsi force yes
12633 @end example
12634
12635 The token/value pairs may appear in any order; @samp{machine} doesn't
12636 have to be first, for instance.
12637
12638 In this example, both login name and password have been supplied for the
12639 former server, while the latter has only the login name listed, and the
12640 user will be prompted for the password.  The latter also has the
12641 @samp{force} tag, which means that the authinfo will be sent to the
12642 @var{nntp} server upon connection; the default (i.e., when there is not
12643 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12644 until the @var{nntp} server asks for it.
12645
12646 You can also add @samp{default} lines that will apply to all servers
12647 that don't have matching @samp{machine} lines.
12648
12649 @example
12650 default force yes
12651 @end example
12652
12653 This will force sending @samp{AUTHINFO} commands to all servers not
12654 previously mentioned.
12655
12656 Remember to not leave the @file{~/.authinfo} file world-readable.
12657
12658 @item nntp-server-action-alist
12659 @vindex nntp-server-action-alist
12660 This is a list of regexps to match on server types and actions to be
12661 taken when matches are made.  For instance, if you want Gnus to beep
12662 every time you connect to innd, you could say something like:
12663
12664 @lisp
12665 (setq nntp-server-action-alist
12666       '(("innd" (ding))))
12667 @end lisp
12668
12669 You probably don't want to do that, though.
12670
12671 The default value is
12672
12673 @lisp
12674 '(("nntpd 1\\.5\\.11t"
12675    (remove-hook 'nntp-server-opened-hook
12676                 'nntp-send-mode-reader)))
12677 @end lisp
12678
12679 This ensures that Gnus doesn't send the @code{MODE READER} command to
12680 nntpd 1.5.11t, since that command chokes that server, I've been told.
12681
12682 @item nntp-maximum-request
12683 @vindex nntp-maximum-request
12684 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12685 will collect headers by sending a series of @code{head} commands.  To
12686 speed things up, the back end sends lots of these commands without
12687 waiting for reply, and then reads all the replies.  This is controlled
12688 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12689 your network is buggy, you should set this to 1.
12690
12691 @item nntp-connection-timeout
12692 @vindex nntp-connection-timeout
12693 If you have lots of foreign @code{nntp} groups that you connect to
12694 regularly, you're sure to have problems with @acronym{NNTP} servers not
12695 responding properly, or being too loaded to reply within reasonable
12696 time.  This is can lead to awkward problems, which can be helped
12697 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12698 that says how many seconds the @code{nntp} back end should wait for a
12699 connection before giving up.  If it is @code{nil}, which is the default,
12700 no timeouts are done.
12701
12702 @c @item nntp-command-timeout
12703 @c @vindex nntp-command-timeout
12704 @c @cindex PPP connections
12705 @c @cindex dynamic IP addresses
12706 @c If you're running Gnus on a machine that has a dynamically assigned
12707 @c address, Gnus may become confused.  If the address of your machine
12708 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12709 @c waiting forever for replies from the server.  To help with this
12710 @c unfortunate problem, you can set this command to a number.  Gnus will
12711 @c then, if it sits waiting for a reply from the server longer than that
12712 @c number of seconds, shut down the connection, start a new one, and resend
12713 @c the command.  This should hopefully be transparent to the user.  A
12714 @c likely number is 30 seconds.
12715 @c
12716 @c @item nntp-retry-on-break
12717 @c @vindex nntp-retry-on-break
12718 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12719 @c hangs.  This will have much the same effect as the command timeout
12720 @c described above.
12721
12722 @item nntp-server-hook
12723 @vindex nntp-server-hook
12724 This hook is run as the last step when connecting to an @acronym{NNTP}
12725 server.
12726
12727 @item nntp-buggy-select
12728 @vindex nntp-buggy-select
12729 Set this to non-@code{nil} if your select routine is buggy.
12730
12731 @item nntp-nov-is-evil
12732 @vindex nntp-nov-is-evil
12733 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12734 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12735 can be used.
12736
12737 @item nntp-xover-commands
12738 @vindex nntp-xover-commands
12739 @cindex @acronym{NOV}
12740 @cindex XOVER
12741 List of strings used as commands to fetch @acronym{NOV} lines from a
12742 server.  The default value of this variable is @code{("XOVER"
12743 "XOVERVIEW")}.
12744
12745 @item nntp-nov-gap
12746 @vindex nntp-nov-gap
12747 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12748 the server.  The server responds with one huge list of lines.  However,
12749 if you have read articles 2-5000 in the group, and only want to read
12750 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12751 lines that you will not need.  This variable says how
12752 big a gap between two consecutive articles is allowed to be before the
12753 @code{XOVER} request is split into several request.  Note that if your
12754 network is fast, setting this variable to a really small number means
12755 that fetching will probably be slower.  If this variable is @code{nil},
12756 @code{nntp} will never split requests.  The default is 5.
12757
12758 @item nntp-prepare-server-hook
12759 @vindex nntp-prepare-server-hook
12760 A hook run before attempting to connect to an @acronym{NNTP} server.
12761
12762 @item nntp-warn-about-losing-connection
12763 @vindex nntp-warn-about-losing-connection
12764 If this variable is non-@code{nil}, some noise will be made when a
12765 server closes connection.
12766
12767 @item nntp-record-commands
12768 @vindex nntp-record-commands
12769 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12770 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12771 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12772 that doesn't seem to work.
12773
12774 @item nntp-open-connection-function
12775 @vindex nntp-open-connection-function
12776 It is possible to customize how the connection to the nntp server will
12777 be opened.  If you specify an @code{nntp-open-connection-function}
12778 parameter, Gnus will use that function to establish the connection.
12779 Five pre-made functions are supplied.  These functions can be grouped in
12780 two categories: direct connection functions (three pre-made), and
12781 indirect ones (two pre-made).
12782
12783 @item nntp-prepare-post-hook
12784 @vindex nntp-prepare-post-hook
12785 A hook run just before posting an article.  If there is no
12786 @code{Message-ID} header in the article and the news server provides the
12787 recommended ID, it will be added to the article before running this
12788 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12789 inhibit Gnus to add a @code{Message-ID} header, you could say:
12790
12791 @lisp
12792 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12793 @end lisp
12794
12795 Note that not all servers support the recommended ID.  This works for
12796 INN versions 2.3.0 and later, for instance.
12797
12798 @item nntp-read-timeout
12799 @vindex nntp-read-timeout
12800 How long nntp should wait between checking for the end of output.
12801 Shorter values mean quicker response, but is more CPU intensive.  The
12802 default is 0.1 seconds.  If you have a slow line to the server (and
12803 don't like to see Emacs eat your available CPU power), you might set
12804 this to, say, 1.
12805
12806 @end table
12807
12808 @menu
12809 * Direct Functions::            Connecting directly to the server.
12810 * Indirect Functions::          Connecting indirectly to the server.
12811 * Common Variables::            Understood by several connection functions.
12812 @end menu
12813
12814
12815 @node Direct Functions
12816 @subsubsection Direct Functions
12817 @cindex direct connection functions
12818
12819 These functions are called direct because they open a direct connection
12820 between your machine and the @acronym{NNTP} server.  The behavior of these
12821 functions is also affected by commonly understood variables
12822 (@pxref{Common Variables}).
12823
12824 @table @code
12825 @findex nntp-open-network-stream
12826 @item nntp-open-network-stream
12827 This is the default, and simply connects to some port or other on the
12828 remote system.
12829
12830 @findex nntp-open-tls-stream
12831 @item nntp-open-tls-stream
12832 Opens a connection to a server over a @dfn{secure} channel.  To use
12833 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12834 installed.  You then define a server as follows:
12835
12836 @lisp
12837 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12838 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12839 ;;
12840 (nntp "snews.bar.com"
12841       (nntp-open-connection-function nntp-open-tls-stream)
12842       (nntp-port-number )
12843       (nntp-address "snews.bar.com"))
12844 @end lisp
12845
12846 @findex nntp-open-ssl-stream
12847 @item nntp-open-ssl-stream
12848 Opens a connection to a server over a @dfn{secure} channel.  To use
12849 this you must have @uref{http://www.openssl.org, OpenSSL} or
12850 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12851 then define a server as follows:
12852
12853 @lisp
12854 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12855 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12856 ;;
12857 (nntp "snews.bar.com"
12858       (nntp-open-connection-function nntp-open-ssl-stream)
12859       (nntp-port-number 563)
12860       (nntp-address "snews.bar.com"))
12861 @end lisp
12862
12863 @findex nntp-open-telnet-stream
12864 @item nntp-open-telnet-stream
12865 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12866 it.  You might wonder why this function exists, since we have the
12867 default @code{nntp-open-network-stream} which would do the job.  (One
12868 of) the reason(s) is that if you are behind a firewall but have direct
12869 connections to the outside world thanks to a command wrapper like
12870 @code{runsocks}, you can use it like this:
12871
12872 @lisp
12873 (nntp "socksified"
12874       (nntp-pre-command "runsocks")
12875       (nntp-open-connection-function nntp-open-telnet-stream)
12876       (nntp-address "the.news.server"))
12877 @end lisp
12878
12879 With the default method, you would need to wrap your whole Emacs
12880 session, which is not a good idea.
12881 @end table
12882
12883
12884 @node Indirect Functions
12885 @subsubsection Indirect Functions
12886 @cindex indirect connection functions
12887
12888 These functions are called indirect because they connect to an
12889 intermediate host before actually connecting to the @acronym{NNTP} server.
12890 All of these functions and related variables are also said to belong to
12891 the ``via'' family of connection: they're all prefixed with ``via'' to make
12892 things cleaner.  The behavior of these functions is also affected by
12893 commonly understood variables (@pxref{Common Variables}).
12894
12895 @table @code
12896 @item nntp-open-via-rlogin-and-telnet
12897 @findex nntp-open-via-rlogin-and-telnet
12898 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12899 to the real @acronym{NNTP} server from there.  This is useful for instance if
12900 you need to connect to a firewall machine first.
12901
12902 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12903
12904 @table @code
12905 @item nntp-via-rlogin-command
12906 @vindex nntp-via-rlogin-command
12907 Command used to log in on the intermediate host.  The default is
12908 @samp{rsh}, but @samp{ssh} is a popular alternative.
12909
12910 @item nntp-via-rlogin-command-switches
12911 @vindex nntp-via-rlogin-command-switches
12912 List of strings to be used as the switches to
12913 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12914 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12915 @samp{("-C")} in order to compress all data connections, otherwise set
12916 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12917 the telnet command requires a pseudo-tty allocation on an intermediate
12918 host.
12919 @end table
12920
12921 Note that you may want to change the value for @code{nntp-end-of-line}
12922 to @samp{\n} (@pxref{Common Variables}).
12923
12924 @item nntp-open-via-rlogin-and-netcat
12925 @findex nntp-open-via-rlogin-and-netcat
12926 Does essentially the same, but uses
12927 @uref{http://netcat.sourceforge.net/, netcat} instead of @samp{telnet}
12928 to connect to the real @acronym{NNTP} server from the intermediate host.
12929
12930 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
12931
12932 @table @code
12933 @item nntp-via-netcat-command
12934 @vindex nntp-via-netcat-command
12935 Command used to connect to the real @acronym{NNTP} server from the
12936 intermediate host.  The default is @samp{nc}.  You can also use other
12937 programs like @uref{http://www.imasy.or.jp/~gotoh/ssh/connect.html,
12938 connect} instead.
12939
12940 @item nntp-via-netcat-switches
12941 @vindex nntp-via-netcat-switches
12942 List of strings to be used as the switches to the
12943 @code{nntp-via-telnet-command} command.  The default is @code{nil}.
12944
12945 @item nntp-via-rlogin-command
12946 @vindex nntp-via-rlogin-command
12947 Command used to log in on the intermediate host.  The default is
12948 @samp{rsh}, but @samp{ssh} is a popular alternative.
12949
12950 @item nntp-via-rlogin-command-switches
12951 @vindex nntp-via-rlogin-command-switches
12952 List of strings to be used as the switches to
12953 @code{nntp-via-rlogin-command}.  The default is @code{nil}.
12954 @end table
12955
12956 @item nntp-open-via-telnet-and-telnet
12957 @findex nntp-open-via-telnet-and-telnet
12958 Does essentially also the same, but uses @samp{telnet} instead of
12959 @samp{rlogin} to connect to the intermediate host.
12960
12961 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12962
12963 @table @code
12964 @item nntp-via-telnet-command
12965 @vindex nntp-via-telnet-command
12966 Command used to @code{telnet} the intermediate host.  The default is
12967 @samp{telnet}.
12968
12969 @item nntp-via-telnet-switches
12970 @vindex nntp-via-telnet-switches
12971 List of strings to be used as the switches to the
12972 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12973
12974 @item nntp-via-user-password
12975 @vindex nntp-via-user-password
12976 Password to use when logging in on the intermediate host.
12977
12978 @item nntp-via-envuser
12979 @vindex nntp-via-envuser
12980 If non-@code{nil}, the intermediate @code{telnet} session (client and
12981 server both) will support the @code{ENVIRON} option and not prompt for
12982 login name.  This works for Solaris @code{telnet}, for instance.
12983
12984 @item nntp-via-shell-prompt
12985 @vindex nntp-via-shell-prompt
12986 Regexp matching the shell prompt on the intermediate host.  The default
12987 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12988
12989 @end table
12990
12991 Note that you may want to change the value for @code{nntp-end-of-line}
12992 to @samp{\n} (@pxref{Common Variables}).
12993 @end table
12994
12995
12996 Here are some additional variables that are understood by all the above
12997 functions:
12998
12999 @table @code
13000
13001 @item nntp-via-user-name
13002 @vindex nntp-via-user-name
13003 User name to use when connecting to the intermediate host.
13004
13005 @item nntp-via-address
13006 @vindex nntp-via-address
13007 Address of the intermediate host to connect to.
13008
13009 @end table
13010
13011
13012 @node Common Variables
13013 @subsubsection Common Variables
13014
13015 The following variables affect the behavior of all, or several of the
13016 pre-made connection functions.  When not specified, all functions are
13017 affected.
13018
13019 @table @code
13020
13021 @item nntp-pre-command
13022 @vindex nntp-pre-command
13023 A command wrapper to use when connecting through a non native
13024 connection function (all except @code{nntp-open-network-stream},
13025 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
13026 where you would put a @samp{SOCKS} wrapper for instance.
13027
13028 @item nntp-address
13029 @vindex nntp-address
13030 The address of the @acronym{NNTP} server.
13031
13032 @item nntp-port-number
13033 @vindex nntp-port-number
13034 Port number to connect to the @acronym{NNTP} server.  The default is
13035 @samp{nntp}.  If you use @acronym{NNTP} over
13036 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
13037 than named ports (i.e, use @samp{563} instead of @samp{snews} or
13038 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
13039 not work with named ports.
13040
13041 @item nntp-end-of-line
13042 @vindex nntp-end-of-line
13043 String to use as end-of-line marker when talking to the @acronym{NNTP}
13044 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
13045 using a non native telnet connection function.
13046
13047 @item nntp-telnet-command
13048 @vindex nntp-telnet-command
13049 Command to use when connecting to the @acronym{NNTP} server through
13050 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
13051 just for the real @acronym{NNTP} server.  The default is
13052 @samp{telnet}.
13053
13054 @item nntp-telnet-switches
13055 @vindex nntp-telnet-switches
13056 A list of switches to pass to @code{nntp-telnet-command}.  The default
13057 is @samp{("-8")}.
13058
13059 @end table
13060
13061
13062 @node News Spool
13063 @subsection News Spool
13064 @cindex nnspool
13065 @cindex news spool
13066
13067 Subscribing to a foreign group from the local spool is extremely easy,
13068 and might be useful, for instance, to speed up reading groups that
13069 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
13070 instance.
13071
13072 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
13073 anything else) as the address.
13074
13075 If you have access to a local spool, you should probably use that as the
13076 native select method (@pxref{Finding the News}).  It is normally faster
13077 than using an @code{nntp} select method, but might not be.  It depends.
13078 You just have to try to find out what's best at your site.
13079
13080 @table @code
13081
13082 @item nnspool-inews-program
13083 @vindex nnspool-inews-program
13084 Program used to post an article.
13085
13086 @item nnspool-inews-switches
13087 @vindex nnspool-inews-switches
13088 Parameters given to the inews program when posting an article.
13089
13090 @item nnspool-spool-directory
13091 @vindex nnspool-spool-directory
13092 Where @code{nnspool} looks for the articles.  This is normally
13093 @file{/usr/spool/news/}.
13094
13095 @item nnspool-nov-directory
13096 @vindex nnspool-nov-directory
13097 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
13098 @file{/usr/spool/news/over.view/}.
13099
13100 @item nnspool-lib-dir
13101 @vindex nnspool-lib-dir
13102 Where the news lib dir is (@file{/usr/lib/news/} by default).
13103
13104 @item nnspool-active-file
13105 @vindex nnspool-active-file
13106 The name of the active file.
13107
13108 @item nnspool-newsgroups-file
13109 @vindex nnspool-newsgroups-file
13110 The name of the group descriptions file.
13111
13112 @item nnspool-history-file
13113 @vindex nnspool-history-file
13114 The name of the news history file.
13115
13116 @item nnspool-active-times-file
13117 @vindex nnspool-active-times-file
13118 The name of the active date file.
13119
13120 @item nnspool-nov-is-evil
13121 @vindex nnspool-nov-is-evil
13122 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
13123 that it finds.
13124
13125 @item nnspool-sift-nov-with-sed
13126 @vindex nnspool-sift-nov-with-sed
13127 @cindex sed
13128 If non-@code{nil}, which is the default, use @code{sed} to get the
13129 relevant portion from the overview file.  If @code{nil},
13130 @code{nnspool} will load the entire file into a buffer and process it
13131 there.
13132
13133 @end table
13134
13135
13136 @node Getting Mail
13137 @section Getting Mail
13138 @cindex reading mail
13139 @cindex mail
13140
13141 Reading mail with a newsreader---isn't that just plain WeIrD? But of
13142 course.
13143
13144 @menu
13145 * Mail in a Newsreader::        Important introductory notes.
13146 * Getting Started Reading Mail::  A simple cookbook example.
13147 * Splitting Mail::              How to create mail groups.
13148 * Mail Sources::                How to tell Gnus where to get mail from.
13149 * Mail Back End Variables::     Variables for customizing mail handling.
13150 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
13151 * Group Mail Splitting::        Use group customize to drive mail splitting.
13152 * Incorporating Old Mail::      What about the old mail you have?
13153 * Expiring Mail::               Getting rid of unwanted mail.
13154 * Washing Mail::                Removing cruft from the mail you get.
13155 * Duplicates::                  Dealing with duplicated mail.
13156 * Not Reading Mail::            Using mail back ends for reading other files.
13157 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
13158 @end menu
13159
13160
13161 @node Mail in a Newsreader
13162 @subsection Mail in a Newsreader
13163
13164 If you are used to traditional mail readers, but have decided to switch
13165 to reading mail with Gnus, you may find yourself experiencing something
13166 of a culture shock.
13167
13168 Gnus does not behave like traditional mail readers.  If you want to make
13169 it behave that way, you can, but it's an uphill battle.
13170
13171 Gnus, by default, handles all its groups using the same approach.  This
13172 approach is very newsreaderly---you enter a group, see the new/unread
13173 messages, and when you read the messages, they get marked as read, and
13174 you don't see them any more.  (Unless you explicitly ask for them.)
13175
13176 In particular, you do not do anything explicitly to delete messages.
13177
13178 Does this mean that all the messages that have been marked as read are
13179 deleted?  How awful!
13180
13181 But, no, it means that old messages are @dfn{expired} according to some
13182 scheme or other.  For news messages, the expire process is controlled by
13183 the news administrator; for mail, the expire process is controlled by
13184 you.  The expire process for mail is covered in depth in @ref{Expiring
13185 Mail}.
13186
13187 What many Gnus users find, after using it a while for both news and
13188 mail, is that the transport mechanism has very little to do with how
13189 they want to treat a message.
13190
13191 Many people subscribe to several mailing lists.  These are transported
13192 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
13193 answering, or even reading these messages very carefully.  We may not
13194 need to save them because if we should need to read one again, they are
13195 archived somewhere else.
13196
13197 Some people have local news groups which have only a handful of readers.
13198 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
13199 to read and answer a large fraction of the messages very carefully in
13200 order to do our work.  And there may not be an archive, so we may need
13201 to save the interesting messages the same way we would personal mail.
13202
13203 The important distinction turns out to be not the transport mechanism,
13204 but other factors such as how interested we are in the subject matter,
13205 or how easy it is to retrieve the message if we need to read it again.
13206
13207 Gnus provides many options for sorting mail into ``groups'' which behave
13208 like newsgroups, and for treating each group (whether mail or news)
13209 differently.
13210
13211 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13212 that Gnus should grow up and be a male, er, mail reader.  It is possible
13213 to whip Gnus into a more mailreaderly being, but, as said before, it's
13214 not easy.  People who prefer proper mail readers should try @sc{vm}
13215 instead, which is an excellent, and proper, mail reader.
13216
13217 I don't mean to scare anybody off, but I want to make it clear that you
13218 may be required to learn a new way of thinking about messages.  After
13219 you've been subjected to The Gnus Way, you will come to love it.  I can
13220 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13221 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13222 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13223 You Do.)
13224
13225
13226 @node Getting Started Reading Mail
13227 @subsection Getting Started Reading Mail
13228
13229 It's quite easy to use Gnus to read your new mail.  You just plonk the
13230 mail back end of your choice into @code{gnus-secondary-select-methods},
13231 and things will happen automatically.
13232
13233 For instance, if you want to use @code{nnml} (which is a ``one file per
13234 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13235
13236 @lisp
13237 (setq gnus-secondary-select-methods '((nnml "")))
13238 @end lisp
13239
13240 Now, the next time you start Gnus, this back end will be queried for new
13241 articles, and it will move all the messages in your spool file to its
13242 directory, which is @file{~/Mail/} by default.  The new group that will
13243 be created (@samp{mail.misc}) will be subscribed, and you can read it
13244 like any other group.
13245
13246 You will probably want to split the mail into several groups, though:
13247
13248 @lisp
13249 (setq nnmail-split-methods
13250       '(("junk" "^From:.*Lars Ingebrigtsen")
13251         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13252         ("other" "")))
13253 @end lisp
13254
13255 This will result in three new @code{nnml} mail groups being created:
13256 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13257 mail that doesn't fit into the first two groups will be placed in the
13258 last group.
13259
13260 This should be sufficient for reading mail with Gnus.  You might want to
13261 give the other sections in this part of the manual a perusal, though.
13262 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13263
13264
13265 @node Splitting Mail
13266 @subsection Splitting Mail
13267 @cindex splitting mail
13268 @cindex mail splitting
13269 @cindex mail filtering (splitting)
13270
13271 @vindex nnmail-split-methods
13272 The @code{nnmail-split-methods} variable says how the incoming mail is
13273 to be split into groups.
13274
13275 @lisp
13276 (setq nnmail-split-methods
13277   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13278     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13279     ("mail.other" "")))
13280 @end lisp
13281
13282 This variable is a list of lists, where the first element of each of
13283 these lists is the name of the mail group (they do not have to be called
13284 something beginning with @samp{mail}, by the way), and the second
13285 element is a regular expression used on the header of each mail to
13286 determine if it belongs in this mail group.  The first string may
13287 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13288 insert sub-expressions from the matched text.  For instance:
13289
13290 @lisp
13291 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13292 @end lisp
13293
13294 @noindent
13295 In that case, @code{nnmail-split-lowercase-expanded} controls whether
13296 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
13297
13298 The second element can also be a function.  In that case, it will be
13299 called narrowed to the headers with the first element of the rule as the
13300 argument.  It should return a non-@code{nil} value if it thinks that the
13301 mail belongs in that group.
13302
13303 The last of these groups should always be a general one, and the regular
13304 expression should @emph{always} be @samp{*} so that it matches any mails
13305 that haven't been matched by any of the other regexps.  (These rules are
13306 processed from the beginning of the alist toward the end.  The first
13307 rule to make a match will ``win'', unless you have crossposting enabled.
13308 In that case, all matching rules will ``win''.)  When new groups are
13309 created by splitting mail, you may want to run
13310 @code{gnus-group-find-new-groups} to see the new groups.
13311
13312 If you like to tinker with this yourself, you can set this variable to a
13313 function of your choice.  This function will be called without any
13314 arguments in a buffer narrowed to the headers of an incoming mail
13315 message.  The function should return a list of group names that it
13316 thinks should carry this mail message.
13317
13318 Note that the mail back ends are free to maul the poor, innocent,
13319 incoming headers all they want to.  They all add @code{Lines} headers;
13320 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13321 @code{From<SPACE>} line to something else.
13322
13323 @vindex nnmail-crosspost
13324 The mail back ends all support cross-posting.  If several regexps match,
13325 the mail will be ``cross-posted'' to all those groups.
13326 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13327 that no articles are crossposted to the general (@samp{*}) group.
13328
13329 @vindex nnmail-crosspost-link-function
13330 @cindex crosspost
13331 @cindex links
13332 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13333 the crossposted articles.  However, not all file systems support hard
13334 links.  If that's the case for you, set
13335 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13336 variable is @code{add-name-to-file} by default.)
13337
13338 @kindex M-x nnmail-split-history
13339 @findex nnmail-split-history
13340 If you wish to see where the previous mail split put the messages, you
13341 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13342 where re-spooling messages would put the messages, you can use
13343 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13344 Group Commands}).
13345
13346 @vindex nnmail-split-header-length-limit
13347 Header lines longer than the value of
13348 @code{nnmail-split-header-length-limit} are excluded from the split
13349 function.
13350
13351 @vindex nnmail-mail-splitting-charset
13352 @vindex nnmail-mail-splitting-decodes
13353 By default the splitting codes @acronym{MIME} decodes headers so you
13354 can match on non-@acronym{ASCII} strings.  The
13355 @code{nnmail-mail-splitting-charset} variable specifies the default
13356 charset for decoding.  The behaviour can be turned off completely by
13357 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13358 useful if you want to match articles based on the raw header data.
13359
13360 @vindex nnmail-resplit-incoming
13361 By default, splitting is performed on all incoming messages.  If you
13362 specify a @code{directory} entry for the variable @code{mail-sources}
13363 (@pxref{Mail Source Specifiers}), however, then splitting does
13364 @emph{not} happen by default.  You can set the variable
13365 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13366 splitting happen even in this case.  (This variable has no effect on
13367 other kinds of entries.)
13368
13369 Gnus gives you all the opportunity you could possibly want for shooting
13370 yourself in the foot.  Let's say you create a group that will contain
13371 all the mail you get from your boss.  And then you accidentally
13372 unsubscribe from the group.  Gnus will still put all the mail from your
13373 boss in the unsubscribed group, and so, when your boss mails you ``Have
13374 that report ready by Monday or you're fired!'', you'll never see it and,
13375 come Tuesday, you'll still believe that you're gainfully employed while
13376 you really should be out collecting empty bottles to save up for next
13377 month's rent money.
13378
13379
13380 @node Mail Sources
13381 @subsection Mail Sources
13382
13383 Mail can be gotten from many different sources---the mail spool, from
13384 a @acronym{POP} mail server, from a procmail directory, or from a
13385 maildir, for instance.
13386
13387 @menu
13388 * Mail Source Specifiers::      How to specify what a mail source is.
13389 * Mail Source Customization::   Some variables that influence things.
13390 * Fetching Mail::               Using the mail source specifiers.
13391 @end menu
13392
13393
13394 @node Mail Source Specifiers
13395 @subsubsection Mail Source Specifiers
13396 @cindex POP
13397 @cindex mail server
13398 @cindex procmail
13399 @cindex mail spool
13400 @cindex mail source
13401
13402 You tell Gnus how to fetch mail by setting @code{mail-sources}
13403 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13404
13405 Here's an example:
13406
13407 @lisp
13408 (pop :server "pop3.mailserver.com" :user "myname")
13409 @end lisp
13410
13411 As can be observed, a mail source specifier is a list where the first
13412 element is a @dfn{mail source type}, followed by an arbitrary number of
13413 @dfn{keywords}.  Keywords that are not explicitly specified are given
13414 default values.
13415
13416 The following mail source types are available:
13417
13418 @table @code
13419 @item file
13420 Get mail from a single file; typically from the mail spool.
13421
13422 Keywords:
13423
13424 @table @code
13425 @item :path
13426 The file name.  Defaults to the value of the @env{MAIL}
13427 environment variable or the value of @code{rmail-spool-directory}
13428 (usually something like @file{/usr/mail/spool/user-name}).
13429
13430 @item :prescript
13431 @itemx :postscript
13432 Script run before/after fetching mail.
13433 @end table
13434
13435 An example file mail source:
13436
13437 @lisp
13438 (file :path "/usr/spool/mail/user-name")
13439 @end lisp
13440
13441 Or using the default file name:
13442
13443 @lisp
13444 (file)
13445 @end lisp
13446
13447 If the mail spool file is not located on the local machine, it's best
13448 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13449 You can not use ange-ftp file names here---it has no way to lock the
13450 mail spool while moving the mail.
13451
13452 If it's impossible to set up a proper server, you can use ssh instead.
13453
13454 @lisp
13455 (setq mail-sources
13456       '((file :prescript "ssh host bin/getmail >%t")))
13457 @end lisp
13458
13459 The @samp{getmail} script would look something like the following:
13460
13461 @example
13462 #!/bin/sh
13463 #  getmail - move mail from spool to stdout
13464 #  flu@@iki.fi
13465
13466 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13467 TMP=$HOME/Mail/tmp
13468 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13469 @end example
13470
13471 Alter this script to fit find the @samp{movemail} you want to use.
13472
13473
13474 @item directory
13475 @vindex nnmail-scan-directory-mail-source-once
13476 Get mail from several files in a directory.  This is typically used
13477 when you have procmail split the incoming mail into several files.
13478 That is, there is a one-to-one correspondence between files in that
13479 directory and groups, so that mail from the file @file{foo.bar.spool}
13480 will be put in the group @code{foo.bar}.  (You can change the suffix
13481 to be used instead of @code{.spool}.)  Setting
13482 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13483 Gnus to scan the mail source only once.  This is particularly useful
13484 if you want to scan mail groups at a specified level.
13485
13486 @vindex nnmail-resplit-incoming
13487 There is also the variable @code{nnmail-resplit-incoming}, if you set
13488 that to a non-@code{nil} value, then the normal splitting process is
13489 applied to all the files from the directory, @ref{Splitting Mail}.
13490
13491 Keywords:
13492
13493 @table @code
13494 @item :path
13495 The name of the directory where the files are.  There is no default
13496 value.
13497
13498 @item :suffix
13499 Only files ending with this suffix are used.  The default is
13500 @samp{.spool}.
13501
13502 @item :predicate
13503 Only files that have this predicate return non-@code{nil} are returned.
13504 The default is @code{identity}.  This is used as an additional
13505 filter---only files that have the right suffix @emph{and} satisfy this
13506 predicate are considered.
13507
13508 @item :prescript
13509 @itemx :postscript
13510 Script run before/after fetching mail.
13511
13512 @end table
13513
13514 An example directory mail source:
13515
13516 @lisp
13517 (directory :path "/home/user-name/procmail-dir/"
13518            :suffix ".prcml")
13519 @end lisp
13520
13521 @item pop
13522 Get mail from a @acronym{POP} server.
13523
13524 Keywords:
13525
13526 @table @code
13527 @item :server
13528 The name of the @acronym{POP} server.  The default is taken from the
13529 @env{MAILHOST} environment variable.
13530
13531 @item :port
13532 The port number of the @acronym{POP} server.  This can be a number (eg,
13533 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13534 string, it should be a service name as listed in @file{/etc/services} on
13535 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13536 need to specify it as @samp{"pop-3"} instead.
13537
13538 @item :user
13539 The user name to give to the @acronym{POP} server.  The default is the login
13540 name.
13541
13542 @item :password
13543 The password to give to the @acronym{POP} server.  If not specified,
13544 the user is prompted.
13545
13546 @item :program
13547 The program to use to fetch mail from the @acronym{POP} server.  This
13548 should be a @code{format}-like string.  Here's an example:
13549
13550 @example
13551 fetchmail %u@@%s -P %p %t
13552 @end example
13553
13554 The valid format specifier characters are:
13555
13556 @table @samp
13557 @item t
13558 The name of the file the mail is to be moved to.  This must always be
13559 included in this string.
13560
13561 @item s
13562 The name of the server.
13563
13564 @item P
13565 The port number of the server.
13566
13567 @item u
13568 The user name to use.
13569
13570 @item p
13571 The password to use.
13572 @end table
13573
13574 The values used for these specs are taken from the values you give the
13575 corresponding keywords.
13576
13577 @item :prescript
13578 A script to be run before fetching the mail.  The syntax is the same as
13579 the @code{:program} keyword.  This can also be a function to be run.
13580
13581 @item :postscript
13582 A script to be run after fetching the mail.  The syntax is the same as
13583 the @code{:program} keyword.  This can also be a function to be run.
13584
13585 @item :function
13586 The function to use to fetch mail from the @acronym{POP} server.  The
13587 function is called with one parameter---the name of the file where the
13588 mail should be moved to.
13589
13590 @item :authentication
13591 This can be either the symbol @code{password} or the symbol @code{apop}
13592 and says what authentication scheme to use.  The default is
13593 @code{password}.
13594
13595 @end table
13596
13597 If the @code{:program} and @code{:function} keywords aren't specified,
13598 @code{pop3-movemail} will be used.  If the
13599 @code{pop3-leave-mail-on-server} is non-@code{nil} the mail is to be
13600 left on the POP server after fetching.
13601
13602 Here are some examples.  Fetch from the default @acronym{POP} server,
13603 using the default user name, and default fetcher:
13604
13605 @lisp
13606 (pop)
13607 @end lisp
13608
13609 Fetch from a named server with a named user and password:
13610
13611 @lisp
13612 (pop :server "my.pop.server"
13613      :user "user-name" :password "secret")
13614 @end lisp
13615
13616 Use @samp{movemail} to move the mail:
13617
13618 @lisp
13619 (pop :program "movemail po:%u %t %p")
13620 @end lisp
13621
13622 @item maildir
13623 Get mail from a maildir.  This is a type of mailbox that is supported by
13624 at least qmail and postfix, where each file in a special directory
13625 contains exactly one mail.
13626
13627 Keywords:
13628
13629 @table @code
13630 @item :path
13631 The name of the directory where the mails are stored.  The default is
13632 taken from the @env{MAILDIR} environment variable or
13633 @file{~/Maildir/}.
13634 @item :subdirs
13635 The subdirectories of the Maildir.  The default is
13636 @samp{("new" "cur")}.
13637
13638 @c If you sometimes look at your mail through a pop3 daemon before fetching
13639 @c them with Gnus, you may also have to fetch your mails from the
13640 @c @code{cur} directory inside the maildir, like in the first example
13641 @c below.
13642
13643 You can also get mails from remote hosts (because maildirs don't suffer
13644 from locking problems).
13645
13646 @end table
13647
13648 Two example maildir mail sources:
13649
13650 @lisp
13651 (maildir :path "/home/user-name/Maildir/"
13652          :subdirs ("cur" "new"))
13653 @end lisp
13654
13655 @lisp
13656 (maildir :path "/user@@remotehost.org:~/Maildir/"
13657          :subdirs ("new"))
13658 @end lisp
13659
13660 @item imap
13661 Get mail from a @acronym{IMAP} server.  If you don't want to use
13662 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13663 with nnimap), for some reason or other, Gnus let you treat it similar
13664 to a @acronym{POP} server and fetches articles from a given
13665 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13666
13667 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13668 may need external programs and libraries, @xref{IMAP}.
13669
13670 Keywords:
13671
13672 @table @code
13673 @item :server
13674 The name of the @acronym{IMAP} server.  The default is taken from the
13675 @env{MAILHOST} environment variable.
13676
13677 @item :port
13678 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13679 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13680
13681 @item :user
13682 The user name to give to the @acronym{IMAP} server.  The default is the login
13683 name.
13684
13685 @item :password
13686 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13687 prompted.
13688
13689 @item :stream
13690 What stream to use for connecting to the server, this is one of the
13691 symbols in @code{imap-stream-alist}.  Right now, this means
13692 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13693 @samp{ssl}, @samp{shell} or the default @samp{network}.
13694
13695 @item :authentication
13696 Which authenticator to use for authenticating to the server, this is
13697 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13698 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13699 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13700
13701 @item :program
13702 When using the `shell' :stream, the contents of this variable is
13703 mapped into the @code{imap-shell-program} variable.  This should be a
13704 @code{format}-like string (or list of strings).  Here's an example:
13705
13706 @example
13707 ssh %s imapd
13708 @end example
13709
13710 The valid format specifier characters are:
13711
13712 @table @samp
13713 @item s
13714 The name of the server.
13715
13716 @item l
13717 User name from @code{imap-default-user}.
13718
13719 @item p
13720 The port number of the server.
13721 @end table
13722
13723 The values used for these specs are taken from the values you give the
13724 corresponding keywords.
13725
13726 @item :mailbox
13727 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13728 which normally is the mailbox which receive incoming mail.
13729
13730 @item :predicate
13731 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13732 UNDELETED}, is probably the best choice for most people, but if you
13733 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13734 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13735 Then all articles in the mailbox is fetched, no matter what.  For a
13736 complete list of predicates, see RFC 2060 section 6.4.4.
13737
13738 @item :fetchflag
13739 How to flag fetched articles on the server, the default @samp{\Deleted}
13740 will mark them as deleted, an alternative would be @samp{\Seen} which
13741 would simply mark them as read.  These are the two most likely choices,
13742 but more flags are defined in RFC 2060 section 2.3.2.
13743
13744 @item :dontexpunge
13745 If non-@code{nil}, don't remove all articles marked as deleted in the
13746 mailbox after finishing the fetch.
13747
13748 @end table
13749
13750 An example @acronym{IMAP} mail source:
13751
13752 @lisp
13753 (imap :server "mail.mycorp.com"
13754       :stream kerberos4
13755       :fetchflag "\\Seen")
13756 @end lisp
13757
13758 @item webmail
13759 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13760 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13761 @uref{http://mail.yahoo.com/}.
13762
13763 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
13764 required for url "4.0pre.46".
13765
13766 WARNING: Mails may be lost.  NO WARRANTY.
13767
13768 Keywords:
13769
13770 @table @code
13771 @item :subtype
13772 The type of the webmail server.  The default is @code{hotmail}.  The
13773 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13774
13775 @item :user
13776 The user name to give to the webmail server.  The default is the login
13777 name.
13778
13779 @item :password
13780 The password to give to the webmail server.  If not specified, the user is
13781 prompted.
13782
13783 @item :dontexpunge
13784 If non-@code{nil}, only fetch unread articles and don't move them to
13785 trash folder after finishing the fetch.
13786
13787 @end table
13788
13789 An example webmail source:
13790
13791 @lisp
13792 (webmail :subtype 'hotmail
13793          :user "user-name"
13794          :password "secret")
13795 @end lisp
13796 @end table
13797
13798 @table @dfn
13799 @item Common Keywords
13800 Common keywords can be used in any type of mail source.
13801
13802 Keywords:
13803
13804 @table @code
13805 @item :plugged
13806 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13807 use directory source to get mail, you can specify it as in this
13808 example:
13809
13810 @lisp
13811 (setq mail-sources
13812       '((directory :path "/home/pavel/.Spool/"
13813                    :suffix ""
13814                    :plugged t)))
13815 @end lisp
13816
13817 Gnus will then fetch your mail even when you are unplugged.  This is
13818 useful when you use local mail and news.
13819
13820 @end table
13821 @end table
13822
13823 @subsubsection Function Interface
13824
13825 Some of the above keywords specify a Lisp function to be executed.
13826 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13827 the value of the keyword while the function is executing.  For example,
13828 consider the following mail-source setting:
13829
13830 @lisp
13831 (setq mail-sources '((pop :user "jrl"
13832                           :server "pophost" :function fetchfunc)))
13833 @end lisp
13834
13835 While the function @code{fetchfunc} is executing, the symbol @code{user}
13836 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13837 @code{"pophost"}.  The symbols @code{port}, @code{password},
13838 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13839 and @code{authentication} are also bound (to their default values).
13840
13841 See above for a list of keywords for each type of mail source.
13842
13843
13844 @node Mail Source Customization
13845 @subsubsection Mail Source Customization
13846
13847 The following is a list of variables that influence how the mail is
13848 fetched.  You would normally not need to set or change any of these
13849 variables.
13850
13851 @table @code
13852 @item mail-source-crash-box
13853 @vindex mail-source-crash-box
13854 File where mail will be stored while processing it.  The default is@*
13855 @file{~/.emacs-mail-crash-box}.
13856
13857 @item mail-source-delete-incoming
13858 @vindex mail-source-delete-incoming
13859 If non-@code{nil}, delete incoming files after handling them.  If
13860 @code{t}, delete the files immediately, if @code{nil}, never delete any
13861 files.  If a positive number, delete files older than number of days
13862 (This will only happen, when receiving new mail).  You may also set
13863 @code{mail-source-delete-incoming} to @code{nil} and call
13864 @code{mail-source-delete-old-incoming} from a hook or interactively.
13865
13866 @item mail-source-delete-old-incoming-confirm
13867 @vindex mail-source-delete-old-incoming-confirm
13868 If non-@code{nil}, ask for for confirmation before deleting old incoming
13869 files.  This variable only applies when
13870 @code{mail-source-delete-incoming} is a positive number.
13871
13872 @item mail-source-ignore-errors
13873 @vindex mail-source-ignore-errors
13874 If non-@code{nil}, ignore errors when reading mail from a mail source.
13875
13876 @item mail-source-directory
13877 @vindex mail-source-directory
13878 Directory where incoming mail source files (if any) will be stored.  The
13879 default is @file{~/Mail/}.  At present, the only thing this is used for
13880 is to say where the incoming files will be stored if the variable
13881 @code{mail-source-delete-incoming} is @code{nil} or a number.
13882
13883 @item mail-source-incoming-file-prefix
13884 @vindex mail-source-incoming-file-prefix
13885 Prefix for file name for storing incoming mail.  The default is
13886 @file{Incoming}, in which case files will end up with names like
13887 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13888 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13889
13890 @item mail-source-default-file-modes
13891 @vindex mail-source-default-file-modes
13892 All new mail files will get this file mode.  The default is 384.
13893
13894 @item mail-source-movemail-program
13895 @vindex mail-source-movemail-program
13896 If non-@code{nil}, name of program for fetching new mail.  If
13897 @code{nil}, @code{movemail} in @var{exec-directory}.
13898
13899 @end table
13900
13901
13902 @node Fetching Mail
13903 @subsubsection Fetching Mail
13904
13905 @vindex mail-sources
13906 @vindex nnmail-spool-file
13907 The way to actually tell Gnus where to get new mail from is to set
13908 @code{mail-sources} to a list of mail source specifiers
13909 (@pxref{Mail Source Specifiers}).
13910
13911 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13912 @code{nil}, the mail back ends will never attempt to fetch mail by
13913 themselves.
13914
13915 If you want to fetch mail both from your local spool as well as a
13916 @acronym{POP} mail server, you'd say something like:
13917
13918 @lisp
13919 (setq mail-sources
13920       '((file)
13921         (pop :server "pop3.mail.server"
13922              :password "secret")))
13923 @end lisp
13924
13925 Or, if you don't want to use any of the keyword defaults:
13926
13927 @lisp
13928 (setq mail-sources
13929       '((file :path "/var/spool/mail/user-name")
13930         (pop :server "pop3.mail.server"
13931              :user "user-name"
13932              :port "pop3"
13933              :password "secret")))
13934 @end lisp
13935
13936
13937 When you use a mail back end, Gnus will slurp all your mail from your
13938 inbox and plonk it down in your home directory.  Gnus doesn't move any
13939 mail if you're not using a mail back end---you have to do a lot of magic
13940 invocations first.  At the time when you have finished drawing the
13941 pentagram, lightened the candles, and sacrificed the goat, you really
13942 shouldn't be too surprised when Gnus moves your mail.
13943
13944
13945
13946 @node Mail Back End Variables
13947 @subsection Mail Back End Variables
13948
13949 These variables are (for the most part) pertinent to all the various
13950 mail back ends.
13951
13952 @table @code
13953 @vindex nnmail-read-incoming-hook
13954 @item nnmail-read-incoming-hook
13955 The mail back ends all call this hook after reading new mail.  You can
13956 use this hook to notify any mail watch programs, if you want to.
13957
13958 @vindex nnmail-split-hook
13959 @item nnmail-split-hook
13960 @findex gnus-article-decode-encoded-words
13961 @cindex RFC 1522 decoding
13962 @cindex RFC 2047 decoding
13963 Hook run in the buffer where the mail headers of each message is kept
13964 just before the splitting based on these headers is done.  The hook is
13965 free to modify the buffer contents in any way it sees fit---the buffer
13966 is discarded after the splitting has been done, and no changes performed
13967 in the buffer will show up in any files.
13968 @code{gnus-article-decode-encoded-words} is one likely function to add
13969 to this hook.
13970
13971 @vindex nnmail-pre-get-new-mail-hook
13972 @vindex nnmail-post-get-new-mail-hook
13973 @item nnmail-pre-get-new-mail-hook
13974 @itemx nnmail-post-get-new-mail-hook
13975 These are two useful hooks executed when treating new incoming
13976 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13977 starting to handle the new mail) and
13978 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13979 is done).  Here's and example of using these two hooks to change the
13980 default file modes the new mail files get:
13981
13982 @lisp
13983 (add-hook 'nnmail-pre-get-new-mail-hook
13984           (lambda () (set-default-file-modes 511)))
13985
13986 (add-hook 'nnmail-post-get-new-mail-hook
13987           (lambda () (set-default-file-modes 551)))
13988 @end lisp
13989
13990 @item nnmail-use-long-file-names
13991 @vindex nnmail-use-long-file-names
13992 If non-@code{nil}, the mail back ends will use long file and directory
13993 names.  Groups like @samp{mail.misc} will end up in directories
13994 (assuming use of @code{nnml} back end) or files (assuming use of
13995 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13996 the same group will end up in @file{mail/misc}.
13997
13998 @item nnmail-delete-file-function
13999 @vindex nnmail-delete-file-function
14000 @findex delete-file
14001 Function called to delete files.  It is @code{delete-file} by default.
14002
14003 @item nnmail-cache-accepted-message-ids
14004 @vindex nnmail-cache-accepted-message-ids
14005 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
14006 the back end (via @code{Gcc}, for instance) into the mail duplication
14007 discovery cache.  The default is @code{nil}.
14008
14009 @item nnmail-cache-ignore-groups
14010 @vindex nnmail-cache-ignore-groups
14011 This can be a regular expression or a list of regular expressions.
14012 Group names that match any of the regular expressions will never be
14013 recorded in the @code{Message-ID} cache.
14014
14015 This can be useful, for example, when using Fancy Splitting
14016 (@pxref{Fancy Mail Splitting}) together with the function
14017 @code{nnmail-split-fancy-with-parent}.
14018
14019 @end table
14020
14021
14022 @node Fancy Mail Splitting
14023 @subsection Fancy Mail Splitting
14024 @cindex mail splitting
14025 @cindex fancy mail splitting
14026
14027 @vindex nnmail-split-fancy
14028 @findex nnmail-split-fancy
14029 If the rather simple, standard method for specifying how to split mail
14030 doesn't allow you to do what you want, you can set
14031 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
14032 play with the @code{nnmail-split-fancy} variable.
14033
14034 Let's look at an example value of this variable first:
14035
14036 @lisp
14037 ;; @r{Messages from the mailer daemon are not crossposted to any of}
14038 ;; @r{the ordinary groups.  Warnings are put in a separate group}
14039 ;; @r{from real errors.}
14040 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
14041                    "mail.misc"))
14042    ;; @r{Non-error messages are crossposted to all relevant}
14043    ;; @r{groups, but we don't crosspost between the group for the}
14044    ;; @r{(ding) list and the group for other (ding) related mail.}
14045    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
14046          ("subject" "ding" "ding.misc"))
14047       ;; @r{Other mailing lists@dots{}}
14048       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
14049       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
14050       ;; @r{Both lists below have the same suffix, so prevent}
14051       ;; @r{cross-posting to mkpkg.list of messages posted only to}
14052       ;; @r{the bugs- list, but allow cross-posting when the}
14053       ;; @r{message was really cross-posted.}
14054       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
14055       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
14056       ;; @r{People@dots{}}
14057       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
14058    ;; @r{Unmatched mail goes to the catch all group.}
14059    "misc.misc")
14060 @end lisp
14061
14062 This variable has the format of a @dfn{split}.  A split is a
14063 (possibly) recursive structure where each split may contain other
14064 splits.  Here are the possible split syntaxes:
14065
14066 @table @code
14067
14068 @item group 
14069 If the split is a string, that will be taken as a group name.  Normal
14070 regexp match expansion will be done.  See below for examples.
14071
14072 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
14073 If the split is a list, the first element of which is a string, then
14074 store the message as specified by @var{split}, if header @var{field}
14075 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
14076 (yet another regexp) matches some string after @var{field} and before
14077 the end of the matched @var{value}, the @var{split} is ignored.  If
14078 none of the @var{restrict} clauses match, @var{split} is processed.
14079
14080 @item (| @var{split} @dots{})
14081 If the split is a list, and the first element is @code{|} (vertical
14082 bar), then process each @var{split} until one of them matches.  A
14083 @var{split} is said to match if it will cause the mail message to be
14084 stored in one or more groups.
14085
14086 @item (& @var{split} @dots{})
14087 If the split is a list, and the first element is @code{&}, then
14088 process all @var{split}s in the list.
14089
14090 @item junk
14091 If the split is the symbol @code{junk}, then don't save (i.e., delete)
14092 this message.  Use with extreme caution.
14093
14094 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
14095 If the split is a list, and the first element is @samp{:}, then the
14096 second element will be called as a function with @var{args} given as
14097 arguments.  The function should return a @var{split}.
14098
14099 @cindex body split
14100 For instance, the following function could be used to split based on the
14101 body of the messages:
14102
14103 @lisp
14104 (defun split-on-body ()
14105   (save-excursion
14106     (save-restriction
14107       (widen)
14108       (goto-char (point-min))
14109       (when (re-search-forward "Some.*string" nil t)
14110         "string.group"))))
14111 @end lisp
14112
14113 The buffer is narrowed to the message in question when @var{function}
14114 is run.  That's why @code{(widen)} needs to be called after
14115 @code{save-excursion} and @code{save-restriction} in the example
14116 above.  Also note that with the nnimap backend, message bodies will
14117 not be downloaded by default.  You need to set
14118 @code{nnimap-split-download-body} to @code{t} to do that
14119 (@pxref{Splitting in IMAP}).
14120
14121 @item (! @var{func} @var{split})
14122 If the split is a list, and the first element is @code{!}, then
14123 @var{split} will be processed, and @var{func} will be called as a
14124 function with the result of @var{split} as argument.  @var{func}
14125 should return a split.
14126
14127 @item nil
14128 If the split is @code{nil}, it is ignored.
14129
14130 @end table
14131
14132 In these splits, @var{field} must match a complete field name.
14133 @var{value} must match a complete word according to the fundamental mode
14134 syntax table.  You can use @code{.*} in the regexps to match partial
14135 field names or words.  In other words, all @var{value}'s are wrapped in
14136 @samp{\<} and @samp{\>} pairs.
14137
14138 @vindex nnmail-split-abbrev-alist
14139 @var{field} and @var{value} can also be Lisp symbols, in that case
14140 they are expanded as specified by the variable
14141 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
14142 where the @sc{car} of a cell contains the key, and the @sc{cdr}
14143 contains the associated value.  Predefined entries in
14144 @code{nnmail-split-abbrev-alist} include:
14145
14146 @table @code
14147 @item from
14148 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
14149 @item to
14150 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
14151 @samp{Resent-To} and @samp{Resent-Cc} fields.
14152 @item any
14153 Is the union of the @code{from} and @code{to} entries.
14154 @end table
14155
14156 @vindex nnmail-split-fancy-syntax-table
14157 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
14158 when all this splitting is performed.
14159
14160 If you want to have Gnus create groups dynamically based on some
14161 information in the headers (i.e., do @code{replace-match}-like
14162 substitutions in the group names), you can say things like:
14163
14164 @example
14165 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
14166 @end example
14167
14168 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
14169 will be filed in @samp{mail.debian.foo}.
14170
14171 If the string contains the element @samp{\&}, then the previously
14172 matched string will be substituted.  Similarly, the elements @samp{\\1}
14173 up to @samp{\\9} will be substituted with the text matched by the
14174 groupings 1 through 9.
14175
14176 @vindex nnmail-split-lowercase-expanded
14177 Where @code{nnmail-split-lowercase-expanded} controls whether the
14178 lowercase of the matched string should be used for the substitution.
14179 Setting it as non-@code{nil} is useful to avoid the creation of multiple
14180 groups when users send to an address using different case
14181 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
14182 is @code{t}.
14183
14184 @vindex nnmail-split-fancy-match-partial-words
14185 @code{nnmail-split-fancy-match-partial-words} controls whether partial
14186 words are matched during fancy splitting.
14187
14188 Normally, regular expressions given in @code{nnmail-split-fancy} are
14189 implicitly surrounded by @code{\<...\>} markers, which are word
14190 delimiters.  If this variable is true, they are not implicitly
14191 surrounded by anything.
14192
14193 @example
14194 (any "joe" "joemail")
14195 @end example
14196
14197 In this example, messages sent from @samp{joedavis@@foo.org} will
14198 normally not be filed in @samp{joemail}.  With
14199 @code{nnmail-split-fancy-match-partial-words} set to t, however, the
14200 match will happen.  In effect, the requirement of a word boundary is
14201 removed and instead the match becomes more like a grep.
14202
14203 @findex nnmail-split-fancy-with-parent
14204 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14205 split followups into the same groups their parents are in.  Sometimes
14206 you can't make splitting rules for all your mail.  For example, your
14207 boss might send you personal mail regarding different projects you are
14208 working on, and as you can't tell your boss to put a distinguishing
14209 string into the subject line, you have to resort to manually moving the
14210 messages into the right group.  With this function, you only have to do
14211 it once per thread.
14212
14213 To use this feature, you have to set @code{nnmail-treat-duplicates}
14214 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14215 value.  And then you can include @code{nnmail-split-fancy-with-parent}
14216 using the colon feature, like so:
14217 @lisp
14218 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
14219       nnmail-cache-accepted-message-ids t
14220       nnmail-split-fancy
14221       '(| (: nnmail-split-fancy-with-parent)
14222           ;; @r{other splits go here}
14223         ))
14224 @end lisp
14225
14226 This feature works as follows: when @code{nnmail-treat-duplicates} is
14227 non-@code{nil}, Gnus records the message id of every message it sees
14228 in the file specified by the variable
14229 @code{nnmail-message-id-cache-file}, together with the group it is in
14230 (the group is omitted for non-mail messages).  When mail splitting is
14231 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14232 at the References (and In-Reply-To) header of each message to split
14233 and searches the file specified by @code{nnmail-message-id-cache-file}
14234 for the message ids.  When it has found a parent, it returns the
14235 corresponding group name unless the group name matches the regexp
14236 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
14237 recommended that you set @code{nnmail-message-id-cache-length} to a
14238 somewhat higher number than the default so that the message ids are
14239 still in the cache.  (A value of 5000 appears to create a file some
14240 300 kBytes in size.)
14241 @vindex nnmail-cache-accepted-message-ids
14242 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14243 also records the message ids of moved articles, so that the followup
14244 messages goes into the new group.
14245
14246 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14247 want certain groups to be recorded in the cache.  For example, if all
14248 outgoing messages are written to an ``outgoing'' group, you could set
14249 @code{nnmail-cache-ignore-groups} to match that group name.
14250 Otherwise, answers to all your messages would end up in the
14251 ``outgoing'' group.
14252
14253
14254 @node Group Mail Splitting
14255 @subsection Group Mail Splitting
14256 @cindex mail splitting
14257 @cindex group mail splitting
14258
14259 @findex gnus-group-split
14260 If you subscribe to dozens of mailing lists but you don't want to
14261 maintain mail splitting rules manually, group mail splitting is for you.
14262 You just have to set @code{to-list} and/or @code{to-address} in group
14263 parameters or group customization and set @code{nnmail-split-methods} to
14264 @code{gnus-group-split}.  This splitting function will scan all groups
14265 for those parameters and split mail accordingly, i.e., messages posted
14266 from or to the addresses specified in the parameters @code{to-list} or
14267 @code{to-address} of a mail group will be stored in that group.
14268
14269 Sometimes, mailing lists have multiple addresses, and you may want mail
14270 splitting to recognize them all: just set the @code{extra-aliases} group
14271 parameter to the list of additional addresses and it's done.  If you'd
14272 rather use a regular expression, set @code{split-regexp}.
14273
14274 All these parameters in a group will be used to create an
14275 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14276 the @var{value} is a single regular expression that matches
14277 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14278 matches of @code{split-regexp}, and the @var{split} is the name of the
14279 group.  @var{restrict}s are also supported: just set the
14280 @code{split-exclude} parameter to a list of regular expressions.
14281
14282 If you can't get the right split to be generated using all these
14283 parameters, or you just need something fancier, you can set the
14284 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
14285 this case, all other aforementioned parameters will be ignored by
14286 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
14287 @code{nil}, in which case the group will be ignored by
14288 @code{gnus-group-split}.
14289
14290 @vindex gnus-group-split-default-catch-all-group
14291 @code{gnus-group-split} will do cross-posting on all groups that match,
14292 by defining a single @code{&} fancy split containing one split for each
14293 group.  If a message doesn't match any split, it will be stored in the
14294 group named in @code{gnus-group-split-default-catch-all-group}, unless
14295 some group has @code{split-spec} set to @code{catch-all}, in which case
14296 that group is used as the catch-all group.  Even though this variable is
14297 often used just to name a group, it may also be set to an arbitrarily
14298 complex fancy split (after all, a group name is a fancy split), and this
14299 may be useful to split mail that doesn't go to any mailing list to
14300 personal mail folders.  Note that this fancy split is added as the last
14301 element of a @code{|} split list that also contains a @code{&} split
14302 with the rules extracted from group parameters.
14303
14304 It's time for an example.  Assume the following group parameters have
14305 been defined:
14306
14307 @example
14308 nnml:mail.bar:
14309 ((to-address . "bar@@femail.com")
14310  (split-regexp . ".*@@femail\\.com"))
14311 nnml:mail.foo:
14312 ((to-list . "foo@@nowhere.gov")
14313  (extra-aliases "foo@@localhost" "foo-redist@@home")
14314  (split-exclude "bugs-foo" "rambling-foo")
14315  (admin-address . "foo-request@@nowhere.gov"))
14316 nnml:mail.others:
14317 ((split-spec . catch-all))
14318 @end example
14319
14320 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14321 behave as if @code{nnmail-split-fancy} had been selected and variable
14322 @code{nnmail-split-fancy} had been set as follows:
14323
14324 @lisp
14325 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14326       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14327            - "bugs-foo" - "rambling-foo" "mail.foo"))
14328    "mail.others")
14329 @end lisp
14330
14331 @findex gnus-group-split-fancy
14332 If you'd rather not use group splitting for all your mail groups, you
14333 may use it for only some of them, by using @code{nnmail-split-fancy}
14334 splits like this:
14335
14336 @lisp
14337 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14338 @end lisp
14339
14340 @var{groups} may be a regular expression or a list of group names whose
14341 parameters will be scanned to generate the output split.
14342 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14343 single @code{|} split will be output.  @var{catch-all} is the fall back
14344 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14345 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14346 empty string in any selected group, no catch-all split will be issued.
14347 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14348 this group will override the value of the @var{catch-all} argument.
14349
14350 @findex gnus-group-split-setup
14351 Unfortunately, scanning all groups and their parameters can be quite
14352 slow, especially considering that it has to be done for every message.
14353 But don't despair!  The function @code{gnus-group-split-setup} can be
14354 used to enable @code{gnus-group-split} in a much more efficient way.  It
14355 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14356 @code{nnmail-split-fancy} to the split produced by
14357 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14358 scanned once, no matter how many messages are split.
14359
14360 @findex gnus-group-split-update
14361 However, if you change group parameters, you'd have to update
14362 @code{nnmail-split-fancy} manually.  You can do it by running
14363 @code{gnus-group-split-update}.  If you'd rather have it updated
14364 automatically, just tell @code{gnus-group-split-setup} to do it for
14365 you.  For example, add to your @file{~/.gnus.el}:
14366
14367 @lisp
14368 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14369 @end lisp
14370
14371 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14372 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14373 have to worry about updating @code{nnmail-split-fancy} again.  If you
14374 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14375 @code{gnus-group-split-default-catch-all-group} will be set to its
14376 value.
14377
14378 @vindex gnus-group-split-updated-hook
14379 Because you may want to change @code{nnmail-split-fancy} after it is set
14380 by @code{gnus-group-split-update}, this function will run
14381 @code{gnus-group-split-updated-hook} just before finishing.
14382
14383 @node Incorporating Old Mail
14384 @subsection Incorporating Old Mail
14385 @cindex incorporating old mail
14386 @cindex import old mail
14387
14388 Most people have lots of old mail stored in various file formats.  If
14389 you have set up Gnus to read mail using one of the spiffy Gnus mail
14390 back ends, you'll probably wish to have that old mail incorporated into
14391 your mail groups.
14392
14393 Doing so can be quite easy.
14394
14395 To take an example: You're reading mail using @code{nnml}
14396 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14397 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14398 file filled with important, but old, mail.  You want to move it into
14399 your @code{nnml} groups.
14400
14401 Here's how:
14402
14403 @enumerate
14404 @item
14405 Go to the group buffer.
14406
14407 @item
14408 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14409 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14410
14411 @item
14412 Type @kbd{SPACE} to enter the newly created group.
14413
14414 @item
14415 Type @kbd{M P b} to process-mark all articles in this group's buffer
14416 (@pxref{Setting Process Marks}).
14417
14418 @item
14419 Type @kbd{B r} to respool all the process-marked articles, and answer
14420 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14421 @end enumerate
14422
14423 All the mail messages in the mbox file will now also be spread out over
14424 all your @code{nnml} groups.  Try entering them and check whether things
14425 have gone without a glitch.  If things look ok, you may consider
14426 deleting the mbox file, but I wouldn't do that unless I was absolutely
14427 sure that all the mail has ended up where it should be.
14428
14429 Respooling is also a handy thing to do if you're switching from one mail
14430 back end to another.  Just respool all the mail in the old mail groups
14431 using the new mail back end.
14432
14433
14434 @node Expiring Mail
14435 @subsection Expiring Mail
14436 @cindex article expiry
14437
14438 Traditional mail readers have a tendency to remove mail articles when
14439 you mark them as read, in some way.  Gnus takes a fundamentally
14440 different approach to mail reading.
14441
14442 Gnus basically considers mail just to be news that has been received in
14443 a rather peculiar manner.  It does not think that it has the power to
14444 actually change the mail, or delete any mail messages.  If you enter a
14445 mail group, and mark articles as ``read'', or kill them in some other
14446 fashion, the mail articles will still exist on the system.  I repeat:
14447 Gnus will not delete your old, read mail.  Unless you ask it to, of
14448 course.
14449
14450 To make Gnus get rid of your unwanted mail, you have to mark the
14451 articles as @dfn{expirable}.  (With the default key bindings, this means
14452 that you have to type @kbd{E}.)  This does not mean that the articles
14453 will disappear right away, however.  In general, a mail article will be
14454 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14455 more than one week old.  If you do not mark an article as expirable, it
14456 will remain on your system until hell freezes over.  This bears
14457 repeating one more time, with some spurious capitalizations: IF you do
14458 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14459
14460 You do not have to mark articles as expirable by hand.  Gnus provides
14461 two features, called ``auto-expire'' and ``total-expire'', that can help you
14462 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14463 for you when you select an article.  And ``total-expire'' means that Gnus
14464 considers all articles as expirable that are read.  So, in addition to
14465 the articles marked @samp{E}, also the articles marked @samp{r},
14466 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14467 expirable.
14468
14469 When should either auto-expire or total-expire be used?  Most people
14470 who are subscribed to mailing lists split each list into its own group
14471 and then turn on auto-expire or total-expire for those groups.
14472 (@xref{Splitting Mail}, for more information on splitting each list
14473 into its own group.)
14474
14475 Which one is better, auto-expire or total-expire?  It's not easy to
14476 answer.  Generally speaking, auto-expire is probably faster.  Another
14477 advantage of auto-expire is that you get more marks to work with: for
14478 the articles that are supposed to stick around, you can still choose
14479 between tick and dormant and read marks.  But with total-expire, you
14480 only have dormant and ticked to choose from.  The advantage of
14481 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14482 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14483 scoring.
14484
14485 @vindex gnus-auto-expirable-newsgroups
14486 Groups that match the regular expression
14487 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14488 read marked as expirable automatically.  All articles marked as
14489 expirable have an @samp{E} in the first column in the summary buffer.
14490
14491 By default, if you have auto expiry switched on, Gnus will mark all the
14492 articles you read as expirable, no matter if they were read or unread
14493 before.  To avoid having articles marked as read marked as expirable
14494 automatically, you can put something like the following in your
14495 @file{~/.gnus.el} file:
14496
14497 @vindex gnus-mark-article-hook
14498 @lisp
14499 (remove-hook 'gnus-mark-article-hook
14500              'gnus-summary-mark-read-and-unread-as-read)
14501 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14502 @end lisp
14503
14504 Note that making a group auto-expirable doesn't mean that all read
14505 articles are expired---only the articles marked as expirable
14506 will be expired.  Also note that using the @kbd{d} command won't make
14507 articles expirable---only semi-automatic marking of articles as read will
14508 mark the articles as expirable in auto-expirable groups.
14509
14510 Let's say you subscribe to a couple of mailing lists, and you want the
14511 articles you have read to disappear after a while:
14512
14513 @lisp
14514 (setq gnus-auto-expirable-newsgroups
14515       "mail.nonsense-list\\|mail.nice-list")
14516 @end lisp
14517
14518 Another way to have auto-expiry happen is to have the element
14519 @code{auto-expire} in the group parameters of the group.
14520
14521 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14522 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14523 don't really mix very well.
14524
14525 @vindex nnmail-expiry-wait
14526 The @code{nnmail-expiry-wait} variable supplies the default time an
14527 expirable article has to live.  Gnus starts counting days from when the
14528 message @emph{arrived}, not from when it was sent.  The default is seven
14529 days.
14530
14531 Gnus also supplies a function that lets you fine-tune how long articles
14532 are to live, based on what group they are in.  Let's say you want to
14533 have one month expiry period in the @samp{mail.private} group, a one day
14534 expiry period in the @samp{mail.junk} group, and a six day expiry period
14535 everywhere else:
14536
14537 @vindex nnmail-expiry-wait-function
14538 @lisp
14539 (setq nnmail-expiry-wait-function
14540       (lambda (group)
14541        (cond ((string= group "mail.private")
14542                31)
14543              ((string= group "mail.junk")
14544                1)
14545              ((string= group "important")
14546                'never)
14547              (t
14548                6))))
14549 @end lisp
14550
14551 The group names this function is fed are ``unadorned'' group
14552 names---no @samp{nnml:} prefixes and the like.
14553
14554 The @code{nnmail-expiry-wait} variable and
14555 @code{nnmail-expiry-wait-function} function can either be a number (not
14556 necessarily an integer) or one of the symbols @code{immediate} or
14557 @code{never}.
14558
14559 You can also use the @code{expiry-wait} group parameter to selectively
14560 change the expiry period (@pxref{Group Parameters}).
14561
14562 @vindex nnmail-expiry-target
14563 The normal action taken when expiring articles is to delete them.
14564 However, in some circumstances it might make more sense to move them
14565 to other groups instead of deleting them.  The variable
14566 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14567 parameter) controls this.  The variable supplies a default value for
14568 all groups, which can be overridden for specific groups by the group
14569 parameter.  default value is @code{delete}, but this can also be a
14570 string (which should be the name of the group the message should be
14571 moved to), or a function (which will be called in a buffer narrowed to
14572 the message in question, and with the name of the group being moved
14573 from as its parameter) which should return a target---either a group
14574 name or @code{delete}.
14575
14576 Here's an example for specifying a group name:
14577 @lisp
14578 (setq nnmail-expiry-target "nnml:expired")
14579 @end lisp
14580
14581 @findex nnmail-fancy-expiry-target
14582 @vindex nnmail-fancy-expiry-targets
14583 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14584 expire mail to groups according to the variable
14585 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14586
14587 @lisp
14588  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14589        nnmail-fancy-expiry-targets
14590        '((to-from "boss" "nnfolder:Work")
14591          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14592          ("from" ".*" "nnfolder:Archive-%Y")))
14593 @end lisp
14594
14595 With this setup, any mail that has @code{IMPORTANT} in its Subject
14596 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14597 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14598 From or To header contains the string @code{boss}, it will get expired
14599 to @code{nnfolder:Work}.  All other mail will get expired to
14600 @code{nnfolder:Archive-YYYY}.
14601
14602 @vindex nnmail-keep-last-article
14603 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14604 expire the final article in a mail newsgroup.  This is to make life
14605 easier for procmail users.
14606
14607 @vindex gnus-total-expirable-newsgroups
14608 By the way: That line up there, about Gnus never expiring non-expirable
14609 articles, is a lie.  If you put @code{total-expire} in the group
14610 parameters, articles will not be marked as expirable, but all read
14611 articles will be put through the expiry process.  Use with extreme
14612 caution.  Even more dangerous is the
14613 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14614 this regexp will have all read articles put through the expiry process,
14615 which means that @emph{all} old mail articles in the groups in question
14616 will be deleted after a while.  Use with extreme caution, and don't come
14617 crying to me when you discover that the regexp you used matched the
14618 wrong group and all your important mail has disappeared.  Be a
14619 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14620 with!  So there!
14621
14622 Most people make most of their mail groups total-expirable, though.
14623
14624 @vindex gnus-inhibit-user-auto-expire
14625 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14626 commands will not mark an article as expirable, even if the group has
14627 auto-expire turned on.
14628
14629
14630 @node Washing Mail
14631 @subsection Washing Mail
14632 @cindex mail washing
14633 @cindex list server brain damage
14634 @cindex incoming mail treatment
14635
14636 Mailers and list servers are notorious for doing all sorts of really,
14637 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14638 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14639 end of all lines passing through our server, so let's do that!!!!1!''
14640 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14641 considered to be self-evident were not discussed.  So.  Here we are.
14642
14643 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14644 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14645 be shocked and dismayed by this, but I haven't got the energy.  It is to
14646 laugh.
14647
14648 Gnus provides a plethora of functions for washing articles while
14649 displaying them, but it might be nicer to do the filtering before
14650 storing the mail to disk.  For that purpose, we have three hooks and
14651 various functions that can be put in these hooks.
14652
14653 @table @code
14654 @item nnmail-prepare-incoming-hook
14655 @vindex nnmail-prepare-incoming-hook
14656 This hook is called before doing anything with the mail and is meant for
14657 grand, sweeping gestures.  It is called in a buffer that contains all
14658 the new, incoming mail.  Functions to be used include:
14659
14660 @table @code
14661 @item nnheader-ms-strip-cr
14662 @findex nnheader-ms-strip-cr
14663 Remove trailing carriage returns from each line.  This is default on
14664 Emacs running on MS machines.
14665
14666 @end table
14667
14668 @item nnmail-prepare-incoming-header-hook
14669 @vindex nnmail-prepare-incoming-header-hook
14670 This hook is called narrowed to each header.  It can be used when
14671 cleaning up the headers.  Functions that can be used include:
14672
14673 @table @code
14674 @item nnmail-remove-leading-whitespace
14675 @findex nnmail-remove-leading-whitespace
14676 Clear leading white space that ``helpful'' listservs have added to the
14677 headers to make them look nice.  Aaah.
14678
14679 (Note that this function works on both the header on the body of all
14680 messages, so it is a potentially dangerous function to use (if a body
14681 of a message contains something that looks like a header line).  So
14682 rather than fix the bug, it is of course the right solution to make it
14683 into a feature by documenting it.)
14684
14685 @item nnmail-remove-list-identifiers
14686 @findex nnmail-remove-list-identifiers
14687 Some list servers add an identifier---for example, @samp{(idm)}---to the
14688 beginning of all @code{Subject} headers.  I'm sure that's nice for
14689 people who use stone age mail readers.  This function will remove
14690 strings that match the @code{nnmail-list-identifiers} regexp, which can
14691 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14692 @code{\\(..\\)}.
14693
14694 For instance, if you want to remove the @samp{(idm)} and the
14695 @samp{nagnagnag} identifiers:
14696
14697 @lisp
14698 (setq nnmail-list-identifiers
14699       '("(idm)" "nagnagnag"))
14700 @end lisp
14701
14702 This can also be done non-destructively with
14703 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14704
14705 @item nnmail-remove-tabs
14706 @findex nnmail-remove-tabs
14707 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14708
14709 @item nnmail-fix-eudora-headers
14710 @findex nnmail-fix-eudora-headers
14711 @cindex Eudora
14712 Eudora produces broken @code{References} headers, but OK
14713 @code{In-Reply-To} headers.  This function will get rid of the
14714 @code{References} headers.
14715
14716 @end table
14717
14718 @item nnmail-prepare-incoming-message-hook
14719 @vindex nnmail-prepare-incoming-message-hook
14720 This hook is called narrowed to each message.  Functions to be used
14721 include:
14722
14723 @table @code
14724 @item article-de-quoted-unreadable
14725 @findex article-de-quoted-unreadable
14726 Decode Quoted Readable encoding.
14727
14728 @end table
14729 @end table
14730
14731
14732 @node Duplicates
14733 @subsection Duplicates
14734
14735 @vindex nnmail-treat-duplicates
14736 @vindex nnmail-message-id-cache-length
14737 @vindex nnmail-message-id-cache-file
14738 @cindex duplicate mails
14739 If you are a member of a couple of mailing lists, you will sometimes
14740 receive two copies of the same mail.  This can be quite annoying, so
14741 @code{nnmail} checks for and treats any duplicates it might find.  To do
14742 this, it keeps a cache of old @code{Message-ID}s---
14743 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14744 default.  The approximate maximum number of @code{Message-ID}s stored
14745 there is controlled by the @code{nnmail-message-id-cache-length}
14746 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14747 stored.) If all this sounds scary to you, you can set
14748 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14749 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14750 will insert a warning into the head of the mail saying that it thinks
14751 that this is a duplicate of a different message.
14752
14753 This variable can also be a function.  If that's the case, the function
14754 will be called from a buffer narrowed to the message in question with
14755 the @code{Message-ID} as a parameter.  The function must return either
14756 @code{nil}, @code{warn}, or @code{delete}.
14757
14758 You can turn this feature off completely by setting the variable to
14759 @code{nil}.
14760
14761 If you want all the duplicate mails to be put into a special
14762 @dfn{duplicates} group, you could do that using the normal mail split
14763 methods:
14764
14765 @lisp
14766 (setq nnmail-split-fancy
14767       '(| ;; @r{Messages duplicates go to a separate group.}
14768         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14769         ;; @r{Message from daemons, postmaster, and the like to another.}
14770         (any mail "mail.misc")
14771         ;; @r{Other rules.}
14772         [...] ))
14773 @end lisp
14774 @noindent
14775 Or something like:
14776 @lisp
14777 (setq nnmail-split-methods
14778       '(("duplicates" "^Gnus-Warning:.*duplicate")
14779         ;; @r{Other rules.}
14780         [...]))
14781 @end lisp
14782
14783 Here's a neat feature: If you know that the recipient reads her mail
14784 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14785 @code{delete}, you can send her as many insults as you like, just by
14786 using a @code{Message-ID} of a mail that you know that she's already
14787 received.  Think of all the fun!  She'll never see any of it!  Whee!
14788
14789
14790 @node Not Reading Mail
14791 @subsection Not Reading Mail
14792
14793 If you start using any of the mail back ends, they have the annoying
14794 habit of assuming that you want to read mail with them.  This might not
14795 be unreasonable, but it might not be what you want.
14796
14797 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14798 @code{nil}, none of the back ends will ever attempt to read incoming
14799 mail, which should help.
14800
14801 @vindex nnbabyl-get-new-mail
14802 @vindex nnmbox-get-new-mail
14803 @vindex nnml-get-new-mail
14804 @vindex nnmh-get-new-mail
14805 @vindex nnfolder-get-new-mail
14806 This might be too much, if, for instance, you are reading mail quite
14807 happily with @code{nnml} and just want to peek at some old Rmail
14808 file you have stashed away with @code{nnbabyl}.  All back ends have
14809 variables called back-end-@code{get-new-mail}.  If you want to disable
14810 the @code{nnbabyl} mail reading, you edit the virtual server for the
14811 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14812
14813 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14814 narrowed to the article to be saved before saving it when reading
14815 incoming mail.
14816
14817
14818 @node Choosing a Mail Back End
14819 @subsection Choosing a Mail Back End
14820
14821 Gnus will read the mail spool when you activate a mail group.  The mail
14822 file is first copied to your home directory.  What happens after that
14823 depends on what format you want to store your mail in.
14824
14825 There are six different mail back ends in the standard Gnus, and more
14826 back ends are available separately.  The mail back end most people use
14827 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14828 Spool}).
14829
14830 @menu
14831 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14832 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14833 * Mail Spool::                  Store your mail in a private spool?
14834 * MH Spool::                    An mhspool-like back end.
14835 * Maildir::                     Another one-file-per-message format.
14836 * Mail Folders::                Having one file for each group.
14837 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14838 @end menu
14839
14840
14841 @node Unix Mail Box
14842 @subsubsection Unix Mail Box
14843 @cindex nnmbox
14844 @cindex unix mail box
14845
14846 @vindex nnmbox-active-file
14847 @vindex nnmbox-mbox-file
14848 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14849 mail.  @code{nnmbox} will add extra headers to each mail article to say
14850 which group it belongs in.
14851
14852 Virtual server settings:
14853
14854 @table @code
14855 @item nnmbox-mbox-file
14856 @vindex nnmbox-mbox-file
14857 The name of the mail box in the user's home directory.  Default is
14858 @file{~/mbox}.
14859
14860 @item nnmbox-active-file
14861 @vindex nnmbox-active-file
14862 The name of the active file for the mail box.  Default is
14863 @file{~/.mbox-active}.
14864
14865 @item nnmbox-get-new-mail
14866 @vindex nnmbox-get-new-mail
14867 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14868 into groups.  Default is @code{t}.
14869 @end table
14870
14871
14872 @node Rmail Babyl
14873 @subsubsection Rmail Babyl
14874 @cindex nnbabyl
14875 @cindex Rmail mbox
14876
14877 @vindex nnbabyl-active-file
14878 @vindex nnbabyl-mbox-file
14879 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14880 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14881 mail article to say which group it belongs in.
14882
14883 Virtual server settings:
14884
14885 @table @code
14886 @item nnbabyl-mbox-file
14887 @vindex nnbabyl-mbox-file
14888 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14889
14890 @item nnbabyl-active-file
14891 @vindex nnbabyl-active-file
14892 The name of the active file for the rmail box.  The default is
14893 @file{~/.rmail-active}
14894
14895 @item nnbabyl-get-new-mail
14896 @vindex nnbabyl-get-new-mail
14897 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14898 @code{t}
14899 @end table
14900
14901
14902 @node Mail Spool
14903 @subsubsection Mail Spool
14904 @cindex nnml
14905 @cindex mail @acronym{NOV} spool
14906
14907 The @dfn{nnml} spool mail format isn't compatible with any other known
14908 format.  It should be used with some caution.
14909
14910 @vindex nnml-directory
14911 If you use this back end, Gnus will split all incoming mail into files,
14912 one file for each mail, and put the articles into the corresponding
14913 directories under the directory specified by the @code{nnml-directory}
14914 variable.  The default value is @file{~/Mail/}.
14915
14916 You do not have to create any directories beforehand; Gnus will take
14917 care of all that.
14918
14919 If you have a strict limit as to how many files you are allowed to store
14920 in your account, you should not use this back end.  As each mail gets its
14921 own file, you might very well occupy thousands of inodes within a few
14922 weeks.  If this is no problem for you, and it isn't a problem for you
14923 having your friendly systems administrator walking around, madly,
14924 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14925 know that this is probably the fastest format to use.  You do not have
14926 to trudge through a big mbox file just to read your new mail.
14927
14928 @code{nnml} is probably the slowest back end when it comes to article
14929 splitting.  It has to create lots of files, and it also generates
14930 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14931 fastest back end when it comes to reading mail.
14932
14933 @cindex self contained nnml servers
14934 @cindex marks
14935 When the marks file is used (which it is by default), @code{nnml}
14936 servers have the property that you may backup them using @code{tar} or
14937 similar, and later be able to restore them into Gnus (by adding the
14938 proper @code{nnml} server) and have all your marks be preserved.  Marks
14939 for a group is usually stored in the @code{.marks} file (but see
14940 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14941 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14942 to restore the group (after restoring the backup into the nnml
14943 directory).
14944
14945 If for some reason you believe your @file{.marks} files are screwed
14946 up, you can just delete them all.  Gnus will then correctly regenerate
14947 them next time it starts.
14948
14949 Virtual server settings:
14950
14951 @table @code
14952 @item nnml-directory
14953 @vindex nnml-directory
14954 All @code{nnml} directories will be placed under this directory.  The
14955 default is the value of @code{message-directory} (whose default value
14956 is @file{~/Mail}).
14957
14958 @item nnml-active-file
14959 @vindex nnml-active-file
14960 The active file for the @code{nnml} server.  The default is
14961 @file{~/Mail/active}.
14962
14963 @item nnml-newsgroups-file
14964 @vindex nnml-newsgroups-file
14965 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14966 Format}.  The default is @file{~/Mail/newsgroups}.
14967
14968 @item nnml-get-new-mail
14969 @vindex nnml-get-new-mail
14970 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14971 @code{t}.
14972
14973 @item nnml-nov-is-evil
14974 @vindex nnml-nov-is-evil
14975 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14976 default is @code{nil}.
14977
14978 @item nnml-nov-file-name
14979 @vindex nnml-nov-file-name
14980 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14981
14982 @item nnml-prepare-save-mail-hook
14983 @vindex nnml-prepare-save-mail-hook
14984 Hook run narrowed to an article before saving.
14985
14986 @item nnml-marks-is-evil
14987 @vindex nnml-marks-is-evil
14988 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14989 default is @code{nil}.
14990
14991 @item nnml-marks-file-name
14992 @vindex nnml-marks-file-name
14993 The name of the @dfn{marks} files.  The default is @file{.marks}.
14994
14995 @item nnml-use-compressed-files
14996 @vindex nnml-use-compressed-files
14997 If non-@code{nil}, @code{nnml} will allow using compressed message
14998 files.
14999
15000 @end table
15001
15002 @findex nnml-generate-nov-databases
15003 If your @code{nnml} groups and @acronym{NOV} files get totally out of
15004 whack, you can do a complete update by typing @kbd{M-x
15005 nnml-generate-nov-databases}.  This command will trawl through the
15006 entire @code{nnml} hierarchy, looking at each and every article, so it
15007 might take a while to complete.  A better interface to this
15008 functionality can be found in the server buffer (@pxref{Server
15009 Commands}).
15010
15011
15012 @node MH Spool
15013 @subsubsection MH Spool
15014 @cindex nnmh
15015 @cindex mh-e mail spool
15016
15017 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
15018 @acronym{NOV} databases and it doesn't keep an active file or marks
15019 file.  This makes @code{nnmh} a @emph{much} slower back end than
15020 @code{nnml}, but it also makes it easier to write procmail scripts
15021 for.
15022
15023 Virtual server settings:
15024
15025 @table @code
15026 @item nnmh-directory
15027 @vindex nnmh-directory
15028 All @code{nnmh} directories will be located under this directory.  The
15029 default is the value of @code{message-directory} (whose default is
15030 @file{~/Mail})
15031
15032 @item nnmh-get-new-mail
15033 @vindex nnmh-get-new-mail
15034 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
15035 @code{t}.
15036
15037 @item nnmh-be-safe
15038 @vindex nnmh-be-safe
15039 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
15040 sure that the articles in the folder are actually what Gnus thinks
15041 they are.  It will check date stamps and stat everything in sight, so
15042 setting this to @code{t} will mean a serious slow-down.  If you never
15043 use anything but Gnus to read the @code{nnmh} articles, you do not
15044 have to set this variable to @code{t}.  The default is @code{nil}.
15045 @end table
15046
15047
15048 @node Maildir
15049 @subsubsection Maildir
15050 @cindex nnmaildir
15051 @cindex maildir
15052
15053 @code{nnmaildir} stores mail in the maildir format, with each maildir
15054 corresponding to a group in Gnus.  This format is documented here:
15055 @uref{http://cr.yp.to/proto/maildir.html} and here:
15056 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
15057 also stores extra information in the @file{.nnmaildir/} directory
15058 within a maildir.
15059
15060 Maildir format was designed to allow concurrent deliveries and
15061 reading, without needing locks.  With other back ends, you would have
15062 your mail delivered to a spool of some kind, and then you would
15063 configure Gnus to split mail from that spool into your groups.  You
15064 can still do that with @code{nnmaildir}, but the more common
15065 configuration is to have your mail delivered directly to the maildirs
15066 that appear as group in Gnus.
15067
15068 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
15069 never corrupt its data in memory, and @code{SIGKILL} will never
15070 corrupt its data in the filesystem.
15071
15072 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
15073 maildir.  So you can copy a whole maildir from one Gnus setup to
15074 another, and you will keep your marks.
15075
15076 Virtual server settings:
15077
15078 @table @code
15079 @item directory
15080 For each of your @code{nnmaildir} servers (it's very unlikely that
15081 you'd need more than one), you need to create a directory and populate
15082 it with maildirs or symlinks to maildirs (and nothing else; do not
15083 choose a directory already used for other purposes).  Each maildir
15084 will be represented in Gnus as a newsgroup on that server; the
15085 filename of the symlink will be the name of the group.  Any filenames
15086 in the directory starting with @samp{.} are ignored.  The directory is
15087 scanned when you first start Gnus, and each time you type @kbd{g} in
15088 the group buffer; if any maildirs have been removed or added,
15089 @code{nnmaildir} notices at these times.
15090
15091 The value of the @code{directory} parameter should be a Lisp form
15092 which is processed by @code{eval} and @code{expand-file-name} to get
15093 the path of the directory for this server.  The form is @code{eval}ed
15094 only when the server is opened; the resulting string is used until the
15095 server is closed.  (If you don't know about forms and @code{eval},
15096 don't worry---a simple string will work.)  This parameter is not
15097 optional; you must specify it.  I don't recommend using
15098 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
15099 use that directory by default for various things, and may get confused
15100 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
15101 value.
15102
15103 @item target-prefix
15104 This should be a Lisp form which is processed by @code{eval} and
15105 @code{expand-file-name}.  The form is @code{eval}ed only when the
15106 server is opened; the resulting string is used until the server is
15107 closed.
15108
15109 When you create a group on an @code{nnmaildir} server, the maildir is
15110 created with @code{target-prefix} prepended to its name, and a symlink
15111 pointing to that maildir is created, named with the plain group name.
15112 So if @code{directory} is @code{"~/.nnmaildir"} and
15113 @code{target-prefix} is @code{"../maildirs/"}, then when you create
15114 the group @code{foo}, @code{nnmaildir} will create
15115 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
15116 @file{~/.nnmaildir/foo} as a symlink pointing to
15117 @file{../maildirs/foo}.
15118
15119 You can set @code{target-prefix} to a string without any slashes to
15120 create both maildirs and symlinks in the same @code{directory}; in
15121 this case, any maildirs found in @code{directory} whose names start
15122 with @code{target-prefix} will not be listed as groups (but the
15123 symlinks pointing to them will be).
15124
15125 As a special case, if @code{target-prefix} is @code{""} (the default),
15126 then when you create a group, the maildir will be created in
15127 @code{directory} without a corresponding symlink.  Beware that you
15128 cannot use @code{gnus-group-delete-group} on such groups without the
15129 @code{force} argument.
15130
15131 @item directory-files
15132 This should be a function with the same interface as
15133 @code{directory-files} (such as @code{directory-files} itself).  It is
15134 used to scan the server's @code{directory} for maildirs.  This
15135 parameter is optional; the default is
15136 @code{nnheader-directory-files-safe} if
15137 @code{nnheader-directory-files-is-safe} is @code{nil}, and
15138 @code{directory-files} otherwise.
15139 (@code{nnheader-directory-files-is-safe} is checked only once when the
15140 server is opened; if you want to check it each time the directory is
15141 scanned, you'll have to provide your own function that does that.)
15142
15143 @item get-new-mail
15144 If non-@code{nil}, then after scanning for new mail in the group
15145 maildirs themselves as usual, this server will also incorporate mail
15146 the conventional Gnus way, from @code{mail-sources} according to
15147 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
15148 value is @code{nil}.
15149
15150 Do @emph{not} use the same maildir both in @code{mail-sources} and as
15151 an @code{nnmaildir} group.  The results might happen to be useful, but
15152 that would be by chance, not by design, and the results might be
15153 different in the future.  If your split rules create new groups,
15154 remember to supply a @code{create-directory} server parameter.
15155 @end table
15156
15157 @subsubsection Group parameters
15158
15159 @code{nnmaildir} uses several group parameters.  It's safe to ignore
15160 all this; the default behavior for @code{nnmaildir} is the same as the
15161 default behavior for other mail back ends: articles are deleted after
15162 one week, etc.  Except for the expiry parameters, all this
15163 functionality is unique to @code{nnmaildir}, so you can ignore it if
15164 you're just trying to duplicate the behavior you already have with
15165 another back end.
15166
15167 If the value of any of these parameters is a vector, the first element
15168 is evaluated as a Lisp form and the result is used, rather than the
15169 original value.  If the value is not a vector, the value itself is
15170 evaluated as a Lisp form.  (This is why these parameters use names
15171 different from those of other, similar parameters supported by other
15172 back ends: they have different, though similar, meanings.)  (For
15173 numbers, strings, @code{nil}, and @code{t}, you can ignore the
15174 @code{eval} business again; for other values, remember to use an extra
15175 quote and wrap the value in a vector when appropriate.)
15176
15177 @table @code
15178 @item expire-age
15179 An integer specifying the minimum age, in seconds, of an article
15180 before it will be expired, or the symbol @code{never} to specify that
15181 articles should never be expired.  If this parameter is not set,
15182 @code{nnmaildir} falls back to the usual
15183 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
15184 the @code{expiry-wait}(@code{-function}) group parameters.  If you
15185 wanted a value of 3 days, you could use something like @code{[(* 3 24
15186 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
15187 An article's age is measured starting from the article file's
15188 modification time.  Normally, this is the same as the article's
15189 delivery time, but editing an article makes it younger.  Moving an
15190 article (other than via expiry) may also make an article younger.
15191
15192 @item expire-group
15193 If this is set to a string such as a full Gnus group name, like
15194 @example
15195 "backend+server.address.string:group.name"
15196 @end example
15197 and if it is not the name of the same group that the parameter belongs
15198 to, then articles will be moved to the specified group during expiry
15199 before being deleted.  @emph{If this is set to an @code{nnmaildir}
15200 group, the article will be just as old in the destination group as it
15201 was in the source group.}  So be careful with @code{expire-age} in the
15202 destination group.  If this is set to the name of the same group that
15203 the parameter belongs to, then the article is not expired at all.  If
15204 you use the vector form, the first element is evaluated once for each
15205 article.  So that form can refer to
15206 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15207 article.  @emph{If this parameter is not set, @code{nnmaildir} does
15208 not fall back to the @code{expiry-target} group parameter or the
15209 @code{nnmail-expiry-target} variable.}
15210
15211 @item read-only
15212 If this is set to @code{t}, @code{nnmaildir} will treat the articles
15213 in this maildir as read-only.  This means: articles are not renamed
15214 from @file{new/} into @file{cur/}; articles are only found in
15215 @file{new/}, not @file{cur/}; articles are never deleted; articles
15216 cannot be edited.  @file{new/} is expected to be a symlink to the
15217 @file{new/} directory of another maildir---e.g., a system-wide mailbox
15218 containing a mailing list of common interest.  Everything in the
15219 maildir outside @file{new/} is @emph{not} treated as read-only, so for
15220 a shared mailbox, you do still need to set up your own maildir (or
15221 have write permission to the shared mailbox); your maildir just won't
15222 contain extra copies of the articles.
15223
15224 @item directory-files
15225 A function with the same interface as @code{directory-files}.  It is
15226 used to scan the directories in the maildir corresponding to this
15227 group to find articles.  The default is the function specified by the
15228 server's @code{directory-files} parameter.
15229
15230 @item distrust-Lines:
15231 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
15232 article, rather than use the @code{Lines:} header field.  If
15233 @code{nil}, the header field will be used if present.
15234
15235 @item always-marks
15236 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
15237 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15238 say that all articles have these marks, regardless of whether the
15239 marks stored in the filesystem say so.  This is a proof-of-concept
15240 feature that will probably be removed eventually; it ought to be done
15241 in Gnus proper, or abandoned if it's not worthwhile.
15242
15243 @item never-marks
15244 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
15245 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15246 say that no articles have these marks, regardless of whether the marks
15247 stored in the filesystem say so.  @code{never-marks} overrides
15248 @code{always-marks}.  This is a proof-of-concept feature that will
15249 probably be removed eventually; it ought to be done in Gnus proper, or
15250 abandoned if it's not worthwhile.
15251
15252 @item nov-cache-size
15253 An integer specifying the size of the @acronym{NOV} memory cache.  To
15254 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
15255 for a limited number of articles in each group.  (This is probably not
15256 worthwhile, and will probably be removed in the future.)  This
15257 parameter's value is noticed only the first time a group is seen after
15258 the server is opened---i.e., when you first start Gnus, typically.
15259 The @acronym{NOV} cache is never resized until the server is closed
15260 and reopened.  The default is an estimate of the number of articles
15261 that would be displayed in the summary buffer: a count of articles
15262 that are either marked with @code{tick} or not marked with
15263 @code{read}, plus a little extra.
15264 @end table
15265
15266 @subsubsection Article identification
15267 Articles are stored in the @file{cur/} subdirectory of each maildir.
15268 Each article file is named like @code{uniq:info}, where @code{uniq}
15269 contains no colons.  @code{nnmaildir} ignores, but preserves, the
15270 @code{:info} part.  (Other maildir readers typically use this part of
15271 the filename to store marks.)  The @code{uniq} part uniquely
15272 identifies the article, and is used in various places in the
15273 @file{.nnmaildir/} subdirectory of the maildir to store information
15274 about the corresponding article.  The full pathname of an article is
15275 available in the variable @code{nnmaildir-article-file-name} after you
15276 request the article in the summary buffer.
15277
15278 @subsubsection NOV data
15279 An article identified by @code{uniq} has its @acronym{NOV} data (used
15280 to generate lines in the summary buffer) stored in
15281 @code{.nnmaildir/nov/uniq}.  There is no
15282 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15283 need for it---an article's @acronym{NOV} data is updated automatically
15284 when the article or @code{nnmail-extra-headers} has changed.)  You can
15285 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
15286 single article simply by deleting the corresponding @acronym{NOV}
15287 file, but @emph{beware}: this will also cause @code{nnmaildir} to
15288 assign a new article number for this article, which may cause trouble
15289 with @code{seen} marks, the Agent, and the cache.
15290
15291 @subsubsection Article marks
15292 An article identified by @code{uniq} is considered to have the mark
15293 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15294 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
15295 looks for such files and reports the set of marks it finds.  When Gnus
15296 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
15297 creates and deletes the corresponding files as needed.  (Actually,
15298 rather than create a new file for each mark, it just creates hard
15299 links to @file{.nnmaildir/markfile}, to save inodes.)
15300
15301 You can invent new marks by creating a new directory in
15302 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15303 your server, untar it later, and keep your marks.  You can add and
15304 remove marks yourself by creating and deleting mark files.  If you do
15305 this while Gnus is running and your @code{nnmaildir} server is open,
15306 it's best to exit all summary buffers for @code{nnmaildir} groups and
15307 type @kbd{s} in the group buffer first, and to type @kbd{g} or
15308 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
15309 pick up the changes, and might undo them.
15310
15311
15312 @node Mail Folders
15313 @subsubsection Mail Folders
15314 @cindex nnfolder
15315 @cindex mbox folders
15316 @cindex mail folders
15317
15318 @code{nnfolder} is a back end for storing each mail group in a
15319 separate file.  Each file is in the standard Un*x mbox format.
15320 @code{nnfolder} will add extra headers to keep track of article
15321 numbers and arrival dates.
15322
15323 @cindex self contained nnfolder servers
15324 @cindex marks
15325 When the marks file is used (which it is by default), @code{nnfolder}
15326 servers have the property that you may backup them using @code{tar} or
15327 similar, and later be able to restore them into Gnus (by adding the
15328 proper @code{nnfolder} server) and have all your marks be preserved.
15329 Marks for a group is usually stored in a file named as the mbox file
15330 with @code{.mrk} concatenated to it (but see
15331 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
15332 directory.  Individual @code{nnfolder} groups are also possible to
15333 backup, use @kbd{G m} to restore the group (after restoring the backup
15334 into the @code{nnfolder} directory).
15335
15336 Virtual server settings:
15337
15338 @table @code
15339 @item nnfolder-directory
15340 @vindex nnfolder-directory
15341 All the @code{nnfolder} mail boxes will be stored under this
15342 directory.  The default is the value of @code{message-directory}
15343 (whose default is @file{~/Mail})
15344
15345 @item nnfolder-active-file
15346 @vindex nnfolder-active-file
15347 The name of the active file.  The default is @file{~/Mail/active}.
15348
15349 @item nnfolder-newsgroups-file
15350 @vindex nnfolder-newsgroups-file
15351 The name of the group descriptions file.  @xref{Newsgroups File
15352 Format}.  The default is @file{~/Mail/newsgroups}
15353
15354 @item nnfolder-get-new-mail
15355 @vindex nnfolder-get-new-mail
15356 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
15357 default is @code{t}
15358
15359 @item nnfolder-save-buffer-hook
15360 @vindex nnfolder-save-buffer-hook
15361 @cindex backup files
15362 Hook run before saving the folders.  Note that Emacs does the normal
15363 backup renaming of files even with the @code{nnfolder} buffers.  If
15364 you wish to switch this off, you could say something like the
15365 following in your @file{.emacs} file:
15366
15367 @lisp
15368 (defun turn-off-backup ()
15369   (set (make-local-variable 'backup-inhibited) t))
15370
15371 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15372 @end lisp
15373
15374 @item nnfolder-delete-mail-hook
15375 @vindex nnfolder-delete-mail-hook
15376 Hook run in a buffer narrowed to the message that is to be deleted.
15377 This function can be used to copy the message to somewhere else, or to
15378 extract some information from it before removing it.
15379
15380 @item nnfolder-nov-is-evil
15381 @vindex nnfolder-nov-is-evil
15382 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15383 default is @code{nil}.
15384
15385 @item nnfolder-nov-file-suffix
15386 @vindex nnfolder-nov-file-suffix
15387 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15388
15389 @item nnfolder-nov-directory
15390 @vindex nnfolder-nov-directory
15391 The directory where the @acronym{NOV} files should be stored.  If
15392 @code{nil}, @code{nnfolder-directory} is used.
15393
15394 @item nnfolder-marks-is-evil
15395 @vindex nnfolder-marks-is-evil
15396 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15397 default is @code{nil}.
15398
15399 @item nnfolder-marks-file-suffix
15400 @vindex nnfolder-marks-file-suffix
15401 The extension for @sc{marks} files.  The default is @file{.mrk}.
15402
15403 @item nnfolder-marks-directory
15404 @vindex nnfolder-marks-directory
15405 The directory where the @sc{marks} files should be stored.  If
15406 @code{nil}, @code{nnfolder-directory} is used.
15407
15408 @end table
15409
15410
15411 @findex nnfolder-generate-active-file
15412 @kindex M-x nnfolder-generate-active-file
15413 If you have lots of @code{nnfolder}-like files you'd like to read with
15414 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15415 command to make @code{nnfolder} aware of all likely files in
15416 @code{nnfolder-directory}.  This only works if you use long file names,
15417 though.
15418
15419 @node Comparing Mail Back Ends
15420 @subsubsection Comparing Mail Back Ends
15421
15422 First, just for terminology, the @dfn{back end} is the common word for a
15423 low-level access method---a transport, if you will, by which something
15424 is acquired.  The sense is that one's mail has to come from somewhere,
15425 and so selection of a suitable back end is required in order to get that
15426 mail within spitting distance of Gnus.
15427
15428 The same concept exists for Usenet itself: Though access to articles is
15429 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15430 in the world got at Usenet by running a reader on the machine where the
15431 articles lay (the machine which today we call an @acronym{NNTP} server), and
15432 access was by the reader stepping into the articles' directory spool
15433 area directly.  One can still select between either the @code{nntp} or
15434 @code{nnspool} back ends, to select between these methods, if one happens
15435 actually to live on the server (or can see its spool directly, anyway,
15436 via NFS).
15437
15438 The goal in selecting a mail back end is to pick one which
15439 simultaneously represents a suitable way of dealing with the original
15440 format plus leaving mail in a form that is convenient to use in the
15441 future.  Here are some high and low points on each:
15442
15443 @table @code
15444 @item nnmbox
15445
15446 UNIX systems have historically had a single, very common, and well-
15447 defined format.  All messages arrive in a single @dfn{spool file}, and
15448 they are delineated by a line whose regular expression matches
15449 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15450 to make it clear in this instance that this is not the RFC-specified
15451 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15452 historically from the Unix environment, it is simplest if one does not
15453 mess a great deal with the original mailbox format, so if one chooses
15454 this back end, Gnus' primary activity in getting mail from the real spool
15455 area to Gnus' preferred directory is simply to copy it, with no
15456 (appreciable) format change in the process.  It is the ``dumbest'' way
15457 to move mail into availability in the Gnus environment.  This makes it
15458 fast to move into place, but slow to parse, when Gnus has to look at
15459 what's where.
15460
15461 @item nnbabyl
15462
15463 Once upon a time, there was the DEC-10 and DEC-20, running operating
15464 systems called TOPS and related things, and the usual (only?) mail
15465 reading environment was a thing called Babyl.  I don't know what format
15466 was used for mail landing on the system, but Babyl had its own internal
15467 format to which mail was converted, primarily involving creating a
15468 spool-file-like entity with a scheme for inserting Babyl-specific
15469 headers and status bits above the top of each message in the file.
15470 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15471 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15472 to understand the mail files folks already had in existence.  Gnus (and
15473 VM, for that matter) continue to support this format because it's
15474 perceived as having some good qualities in those mailer-specific
15475 headers/status bits stuff.  Rmail itself still exists as well, of
15476 course, and is still maintained by Stallman.
15477
15478 Both of the above forms leave your mail in a single file on your
15479 file system, and they must parse that entire file each time you take a
15480 look at your mail.
15481
15482 @item nnml
15483
15484 @code{nnml} is the back end which smells the most as though you were
15485 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15486 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15487 lo these years ago.)  One's mail is taken from the original spool file,
15488 and is then cut up into individual message files, 1:1.  It maintains a
15489 Usenet-style active file (analogous to what one finds in an INN- or
15490 CNews-based news system in (for instance) @file{/var/lib/news/active},
15491 or what is returned via the @samp{NNTP LIST} verb) and also creates
15492 @dfn{overview} files for efficient group entry, as has been defined for
15493 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15494 due to the creation of lots of files, updates to the @code{nnml} active
15495 file, and additions to overview files on a per-message basis, but it is
15496 extremely fast on access because of what amounts to the indexing support
15497 provided by the active file and overviews.
15498
15499 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15500 resource which defines available places in the file system to put new
15501 files.  Sysadmins take a dim view of heavy inode occupation within
15502 tight, shared file systems.  But if you live on a personal machine where
15503 the file system is your own and space is not at a premium, @code{nnml}
15504 wins big.
15505
15506 It is also problematic using this back end if you are living in a
15507 FAT16-based Windows world, since much space will be wasted on all these
15508 tiny files.
15509
15510 @item nnmh
15511
15512 The Rand MH mail-reading system has been around UNIX systems for a very
15513 long time; it operates by splitting one's spool file of messages into
15514 individual files, but with little or no indexing support---@code{nnmh}
15515 is considered to be semantically equivalent to ``@code{nnml} without
15516 active file or overviews''.  This is arguably the worst choice, because
15517 one gets the slowness of individual file creation married to the
15518 slowness of access parsing when learning what's new in one's groups.
15519
15520 @item nnfolder
15521
15522 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15523 method described above) on a per-group basis.  That is, @code{nnmbox}
15524 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15525 little bit of optimization to this so that each of one's mail groups has
15526 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15527 can be parsed separately, and still provides the simple Unix mail box
15528 format requiring minimal effort in moving the mail around.  In addition,
15529 it maintains an ``active'' file making it much faster for Gnus to figure
15530 out how many messages there are in each separate group.
15531
15532 If you have groups that are expected to have a massive amount of
15533 messages, @code{nnfolder} is not the best choice, but if you receive
15534 only a moderate amount of mail, @code{nnfolder} is probably the most
15535 friendly mail back end all over.
15536
15537 @item nnmaildir
15538
15539 For configuring expiry and other things, @code{nnmaildir} uses
15540 incompatible group parameters, slightly different from those of other
15541 mail back ends.
15542
15543 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15544 differences.  Each message is stored in a separate file, but the
15545 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15546 also stores the equivalent of @code{nnml}'s overview files in one file
15547 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15548 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15549 you down or takes up very much space, consider switching to
15550 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15551 file system.
15552
15553 Since maildirs don't require locking for delivery, the maildirs you use
15554 as groups can also be the maildirs your mail is directly delivered to.
15555 This means you can skip Gnus' mail splitting if your mail is already
15556 organized into different mailboxes during delivery.  A @code{directory}
15557 entry in @code{mail-sources} would have a similar effect, but would
15558 require one set of mailboxes for spooling deliveries (in mbox format,
15559 thus damaging message bodies), and another set to be used as groups (in
15560 whatever format you like).  A maildir has a built-in spool, in the
15561 @code{new/} subdirectory.  Beware that currently, mail moved from
15562 @code{new/} to @code{cur/} instead of via mail splitting will not
15563 undergo treatment such as duplicate checking.
15564
15565 @code{nnmaildir} stores article marks for a given group in the
15566 corresponding maildir, in a way designed so that it's easy to manipulate
15567 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15568 else, and still have your marks.  @code{nnml} also stores marks, but
15569 it's not as easy to work with them from outside Gnus as with
15570 @code{nnmaildir}.
15571
15572 @code{nnmaildir} uses a significant amount of memory to speed things up.
15573 (It keeps in memory some of the things that @code{nnml} stores in files
15574 and that @code{nnmh} repeatedly parses out of message files.)  If this
15575 is a problem for you, you can set the @code{nov-cache-size} group
15576 parameter to something small (0 would probably not work, but 1 probably
15577 would) to make it use less memory.  This caching will probably be
15578 removed in the future.
15579
15580 Startup is likely to be slower with @code{nnmaildir} than with other
15581 back ends.  Everything else is likely to be faster, depending in part
15582 on your file system.
15583
15584 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15585 to write an @code{nnmaildir}-derived back end.
15586
15587 @end table
15588
15589
15590 @node Browsing the Web
15591 @section Browsing the Web
15592 @cindex web
15593 @cindex browsing the web
15594 @cindex www
15595 @cindex http
15596
15597 Web-based discussion forums are getting more and more popular.  On many
15598 subjects, the web-based forums have become the most important forums,
15599 eclipsing the importance of mailing lists and news groups.  The reason
15600 is easy to understand---they are friendly to new users; you just point
15601 and click, and there's the discussion.  With mailing lists, you have to
15602 go through a cumbersome subscription procedure, and most people don't
15603 even know what a news group is.
15604
15605 The problem with this scenario is that web browsers are not very good at
15606 being newsreaders.  They do not keep track of what articles you've read;
15607 they do not allow you to score on subjects you're interested in; they do
15608 not allow off-line browsing; they require you to click around and drive
15609 you mad in the end.
15610
15611 So---if web browsers suck at reading discussion forums, why not use Gnus
15612 to do it instead?
15613
15614 Gnus has been getting a bit of a collection of back ends for providing
15615 interfaces to these sources.
15616
15617 @menu
15618 * Archiving Mail::
15619 * Web Searches::                Creating groups from articles that match a string.
15620 * Slashdot::                    Reading the Slashdot comments.
15621 * Ultimate::                    The Ultimate Bulletin Board systems.
15622 * Web Archive::                 Reading mailing list archived on web.
15623 * RSS::                         Reading RDF site summary.
15624 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15625 @end menu
15626
15627 All the web sources require Emacs/w3 and the url library to work.
15628
15629 The main caveat with all these web sources is that they probably won't
15630 work for a very long time.  Gleaning information from the @acronym{HTML} data
15631 is guesswork at best, and when the layout is altered, the Gnus back end
15632 will fail.  If you have reasonably new versions of these back ends,
15633 though, you should be ok.
15634
15635 One thing all these Web methods have in common is that the Web sources
15636 are often down, unavailable or just plain too slow to be fun.  In those
15637 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15638 Unplugged}) handle downloading articles, and then you can read them at
15639 leisure from your local disk.  No more World Wide Wait for you.
15640
15641 @node Archiving Mail
15642 @subsection Archiving Mail
15643 @cindex archiving mail
15644 @cindex backup of mail
15645
15646 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15647 @code{nnmaildir}, now actually store the article marks with each group.
15648 For these servers, archiving and restoring a group while preserving
15649 marks is fairly simple.
15650
15651 (Preserving the group level and group parameters as well still
15652 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15653 though.)
15654
15655 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15656 server, take a recursive copy of the server directory.  There is no need
15657 to shut down Gnus, so archiving may be invoked by @code{cron} or
15658 similar.  You restore the data by restoring the directory tree, and
15659 adding a server definition pointing to that directory in Gnus.  The
15660 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15661 might interfere with overwriting data, so you may want to shut down Gnus
15662 before you restore the data.
15663
15664 It is also possible to archive individual @code{nnml},
15665 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15666 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15667 directory.  For @code{nnfolder} you need to copy both the base folder
15668 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15669 this example).  Restoring the group is done with @kbd{G m} from the Group
15670 buffer.  The last step makes Gnus notice the new directory.
15671 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15672 is unnecessary in that case.
15673
15674 @node Web Searches
15675 @subsection Web Searches
15676 @cindex nnweb
15677 @cindex Google
15678 @cindex dejanews
15679 @cindex gmane
15680 @cindex Usenet searches
15681 @cindex searching the Usenet
15682
15683 It's, like, too neat to search the Usenet for articles that match a
15684 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15685 those, like, Web browsers, and you, like, have to, rilly, like, look at
15686 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15687 searches without having to use a browser.
15688
15689 The @code{nnweb} back end allows an easy interface to the mighty search
15690 engine.  You create an @code{nnweb} group, enter a search pattern, and
15691 then enter the group and read the articles like you would any normal
15692 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15693 Groups}) will do this in an easy-to-use fashion.
15694
15695 @code{nnweb} groups don't really lend themselves to being solid
15696 groups---they have a very fleeting idea of article numbers.  In fact,
15697 each time you enter an @code{nnweb} group (not even changing the search
15698 pattern), you are likely to get the articles ordered in a different
15699 manner.  Not even using duplicate suppression (@pxref{Duplicate
15700 Suppression}) will help, since @code{nnweb} doesn't even know the
15701 @code{Message-ID} of the articles before reading them using some search
15702 engines (Google, for instance).  The only possible way to keep track
15703 of which articles you've read is by scoring on the @code{Date}
15704 header---mark all articles posted before the last date you read the
15705 group as read.
15706
15707 If the search engine changes its output substantially, @code{nnweb}
15708 won't be able to parse it and will fail.  One could hardly fault the Web
15709 providers if they were to do this---their @emph{raison d'@^etre} is to
15710 make money off of advertisements, not to provide services to the
15711 community.  Since @code{nnweb} washes the ads off all the articles, one
15712 might think that the providers might be somewhat miffed.  We'll see.
15713
15714 You must have the @code{url} and @code{w3} package installed to be able
15715 to use @code{nnweb}.
15716
15717 Virtual server variables:
15718
15719 @table @code
15720 @item nnweb-type
15721 @vindex nnweb-type
15722 What search engine type is being used.  The currently supported types
15723 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15724 @code{dejanews} is an alias to @code{google}.
15725
15726 @item nnweb-search
15727 @vindex nnweb-search
15728 The search string to feed to the search engine.
15729
15730 @item nnweb-max-hits
15731 @vindex nnweb-max-hits
15732 Advisory maximum number of hits per search to display.  The default is
15733 999.
15734
15735 @item nnweb-type-definition
15736 @vindex nnweb-type-definition
15737 Type-to-definition alist.  This alist says what @code{nnweb} should do
15738 with the various search engine types.  The following elements must be
15739 present:
15740
15741 @table @code
15742 @item article
15743 Function to decode the article and provide something that Gnus
15744 understands.
15745
15746 @item map
15747 Function to create an article number to message header and URL alist.
15748
15749 @item search
15750 Function to send the search string to the search engine.
15751
15752 @item address
15753 The address the aforementioned function should send the search string
15754 to.
15755
15756 @item id
15757 Format string URL to fetch an article by @code{Message-ID}.
15758 @end table
15759
15760 @end table
15761
15762
15763 @node Slashdot
15764 @subsection Slashdot
15765 @cindex Slashdot
15766 @cindex nnslashdot
15767
15768 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15769 lively discussion following the news articles.  @code{nnslashdot} will
15770 let you read this forum in a convenient manner.
15771
15772 The easiest way to read this source is to put something like the
15773 following in your @file{~/.gnus.el} file:
15774
15775 @lisp
15776 (setq gnus-secondary-select-methods
15777       '((nnslashdot "")))
15778 @end lisp
15779
15780 This will make Gnus query the @code{nnslashdot} back end for new comments
15781 and groups.  The @kbd{F} command will subscribe each new news article as
15782 a new Gnus group, and you can read the comments by entering these
15783 groups.  (Note that the default subscription method is to subscribe new
15784 groups as zombies.  Other methods are available (@pxref{Subscription
15785 Methods}).
15786
15787 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15788 command is the most handy tool (@pxref{Foreign Groups}).
15789
15790 When following up to @code{nnslashdot} comments (or posting new
15791 comments), some light @acronym{HTML}izations will be performed.  In
15792 particular, text quoted with @samp{> } will be quoted with
15793 @samp{blockquote} instead, and signatures will have @samp{br} added to
15794 the end of each line.  Other than that, you can just write @acronym{HTML}
15795 directly into the message buffer.  Note that Slashdot filters out some
15796 @acronym{HTML} forms.
15797
15798 The following variables can be altered to change its behavior:
15799
15800 @table @code
15801 @item nnslashdot-threaded
15802 Whether @code{nnslashdot} should display threaded groups or not.  The
15803 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15804 has to retrieve absolutely all comments in a group upon entry.  If a
15805 threaded display is not required, @code{nnslashdot} will only retrieve
15806 the comments that are actually wanted by the user.  Threading is nicer,
15807 but much, much slower than unthreaded.
15808
15809 @item nnslashdot-login-name
15810 @vindex nnslashdot-login-name
15811 The login name to use when posting.
15812
15813 @item nnslashdot-password
15814 @vindex nnslashdot-password
15815 The password to use when posting.
15816
15817 @item nnslashdot-directory
15818 @vindex nnslashdot-directory
15819 Where @code{nnslashdot} will store its files.  The default is
15820 @file{~/News/slashdot/}.
15821
15822 @item nnslashdot-active-url
15823 @vindex nnslashdot-active-url
15824 The @acronym{URL} format string that will be used to fetch the
15825 information on news articles and comments.  The default is@*
15826 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15827
15828 @item nnslashdot-comments-url
15829 @vindex nnslashdot-comments-url
15830 The @acronym{URL} format string that will be used to fetch comments.
15831
15832 @item nnslashdot-article-url
15833 @vindex nnslashdot-article-url
15834 The @acronym{URL} format string that will be used to fetch the news
15835 article.  The default is
15836 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15837
15838 @item nnslashdot-threshold
15839 @vindex nnslashdot-threshold
15840 The score threshold.  The default is -1.
15841
15842 @item nnslashdot-group-number
15843 @vindex nnslashdot-group-number
15844 The number of old groups, in addition to the ten latest, to keep
15845 updated.  The default is 0.
15846
15847 @end table
15848
15849
15850
15851 @node Ultimate
15852 @subsection Ultimate
15853 @cindex nnultimate
15854 @cindex Ultimate Bulletin Board
15855
15856 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15857 probably the most popular Web bulletin board system used.  It has a
15858 quite regular and nice interface, and it's possible to get the
15859 information Gnus needs to keep groups updated.
15860
15861 The easiest way to get started with @code{nnultimate} is to say
15862 something like the following in the group buffer:  @kbd{B nnultimate RET
15863 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
15864 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15865 you're interested in; there's quite a list of them on the Ultimate web
15866 site.)  Then subscribe to the groups you're interested in from the
15867 server buffer, and read them from the group buffer.
15868
15869 The following @code{nnultimate} variables can be altered:
15870
15871 @table @code
15872 @item nnultimate-directory
15873 @vindex nnultimate-directory
15874 The directory where @code{nnultimate} stores its files.  The default is@*
15875 @file{~/News/ultimate/}.
15876 @end table
15877
15878
15879 @node Web Archive
15880 @subsection Web Archive
15881 @cindex nnwarchive
15882 @cindex Web Archive
15883
15884 Some mailing lists only have archives on Web servers, such as
15885 @uref{http://www.egroups.com/} and
15886 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15887 interface, and it's possible to get the information Gnus needs to keep
15888 groups updated.
15889
15890 @findex gnus-group-make-warchive-group
15891 The easiest way to get started with @code{nnwarchive} is to say
15892 something like the following in the group buffer: @kbd{M-x
15893 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15894 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15895 @var{an_egroup} with the mailing list you subscribed, the
15896 @var{your@@email.address} with your email address.), or to browse the
15897 back end by @kbd{B nnwarchive RET mail-archive RET}.
15898
15899 The following @code{nnwarchive} variables can be altered:
15900
15901 @table @code
15902 @item nnwarchive-directory
15903 @vindex nnwarchive-directory
15904 The directory where @code{nnwarchive} stores its files.  The default is@*
15905 @file{~/News/warchive/}.
15906
15907 @item nnwarchive-login
15908 @vindex nnwarchive-login
15909 The account name on the web server.
15910
15911 @item nnwarchive-passwd
15912 @vindex nnwarchive-passwd
15913 The password for your account on the web server.
15914 @end table
15915
15916 @node RSS
15917 @subsection RSS
15918 @cindex nnrss
15919 @cindex RSS
15920
15921 Some web sites have an RDF Site Summary (@acronym{RSS}).
15922 @acronym{RSS} is a format for summarizing headlines from news related
15923 sites (such as BBC or CNN).  But basically anything list-like can be
15924 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
15925 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
15926
15927 @acronym{RSS} has a quite regular and nice interface, and it's
15928 possible to get the information Gnus needs to keep groups updated.
15929
15930 @kindex G R (Summary)
15931 Use @kbd{G R} from the summary buffer to subscribe to a feed---you
15932 will be prompted for the location of the feed.
15933
15934 An easy way to get started with @code{nnrss} is to say something like
15935 the following in the group buffer: @kbd{B nnrss RET y}, then
15936 subscribe to groups.
15937
15938 @cindex OPML
15939 You can also use the following commands to import and export your
15940 subscriptions from a file in @acronym{OPML} format (Outline Processor
15941 Markup Language).
15942
15943 @defun nnrss-opml-import file
15944 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
15945 file.
15946 @end defun
15947
15948 @defun nnrss-opml-export
15949 Write your current @acronym{RSS} subscriptions to a buffer in
15950 @acronym{OPML} format.
15951 @end defun
15952
15953 The following @code{nnrss} variables can be altered:
15954
15955 @table @code
15956 @item nnrss-directory
15957 @vindex nnrss-directory
15958 The directory where @code{nnrss} stores its files.  The default is
15959 @file{~/News/rss/}.
15960
15961 @item nnrss-use-local
15962 @vindex nnrss-use-local
15963 @findex nnrss-generate-download-script
15964 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
15965 the feeds from local files in @code{nnrss-directory}.  You can use
15966 the command @code{nnrss-generate-download-script} to generate a
15967 download script using @command{wget}.
15968 @end table
15969
15970 The following code may be helpful, if you want to show the description in
15971 the summary buffer.
15972
15973 @lisp
15974 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15975 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15976
15977 (defun gnus-user-format-function-X (header)
15978   (let ((descr
15979          (assq nnrss-description-field (mail-header-extra header))))
15980     (if descr (concat "\n\t" (cdr descr)) "")))
15981 @end lisp
15982
15983 The following code may be useful to open an nnrss url directly from the
15984 summary buffer.
15985 @lisp
15986 (require 'browse-url)
15987
15988 (defun browse-nnrss-url( arg )
15989   (interactive "p")
15990   (let ((url (assq nnrss-url-field
15991                    (mail-header-extra
15992                     (gnus-data-header
15993                      (assq (gnus-summary-article-number)
15994                            gnus-newsgroup-data))))))
15995     (if url
15996         (progn
15997           (browse-url (cdr url))
15998           (gnus-summary-mark-as-read-forward 1))
15999       (gnus-summary-scroll-up arg))))
16000
16001 (eval-after-load "gnus"
16002   #'(define-key gnus-summary-mode-map
16003       (kbd "<RET>") 'browse-nnrss-url))
16004 (add-to-list 'nnmail-extra-headers nnrss-url-field)
16005 @end lisp
16006
16007 @node Customizing w3
16008 @subsection Customizing w3
16009 @cindex w3
16010 @cindex html
16011 @cindex url
16012 @cindex Netscape
16013
16014 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
16015 pages.  Emacs/w3 is documented in its own manual, but there are some
16016 things that may be more relevant for Gnus users.
16017
16018 For instance, a common question is how to make Emacs/w3 follow links
16019 using the @code{browse-url} functions (which will call some external web
16020 browser like Netscape).  Here's one way:
16021
16022 @lisp
16023 (eval-after-load "w3"
16024   '(progn
16025     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
16026     (defun w3-fetch (&optional url target)
16027       (interactive (list (w3-read-url-with-default)))
16028       (if (eq major-mode 'gnus-article-mode)
16029           (browse-url url)
16030         (w3-fetch-orig url target)))))
16031 @end lisp
16032
16033 Put that in your @file{.emacs} file, and hitting links in w3-rendered
16034 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
16035 follow the link.
16036
16037
16038 @node IMAP
16039 @section IMAP
16040 @cindex nnimap
16041 @cindex @acronym{IMAP}
16042
16043 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
16044 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
16045 server is much similar to connecting to a news server, you just
16046 specify the network address of the server.
16047
16048 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
16049 everything that @acronym{POP} can, it can hence be viewed as a
16050 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
16051 similar to @acronym{NNTP} being a news storage protocol---however,
16052 @acronym{IMAP} offers more features than @acronym{NNTP} because news
16053 is more or less read-only whereas mail is read-write.
16054
16055 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
16056 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
16057 the @acronym{IMAP} server and store them on the local disk.  This is
16058 not the usage described in this section---@xref{Mail Sources}.
16059
16060 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
16061 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
16062 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
16063 usage explained in this section.
16064
16065 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
16066 servers might look something like the following.  (Note that for
16067 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
16068 see below.)
16069
16070 @lisp
16071 (setq gnus-secondary-select-methods
16072       '((nnimap "simpleserver") ; @r{no special configuration}
16073         ; @r{perhaps a ssh port forwarded server:}
16074         (nnimap "dolk"
16075                 (nnimap-address "localhost")
16076                 (nnimap-server-port 1430))
16077         ; @r{a UW server running on localhost}
16078         (nnimap "barbar"
16079                 (nnimap-server-port 143)
16080                 (nnimap-address "localhost")
16081                 (nnimap-list-pattern ("INBOX" "mail/*")))
16082         ; @r{anonymous public cyrus server:}
16083         (nnimap "cyrus.andrew.cmu.edu"
16084                 (nnimap-authenticator anonymous)
16085                 (nnimap-list-pattern "archive.*")
16086                 (nnimap-stream network))
16087         ; @r{a ssl server on a non-standard port:}
16088         (nnimap "vic20"
16089                 (nnimap-address "vic20.somewhere.com")
16090                 (nnimap-server-port 9930)
16091                 (nnimap-stream ssl))))
16092 @end lisp
16093
16094 After defining the new server, you can subscribe to groups on the
16095 server using normal Gnus commands such as @kbd{U} in the Group Buffer
16096 (@pxref{Subscription Commands}) or via the Server Buffer
16097 (@pxref{Server Buffer}).
16098
16099 The following variables can be used to create a virtual @code{nnimap}
16100 server:
16101
16102 @table @code
16103
16104 @item nnimap-address
16105 @vindex nnimap-address
16106
16107 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
16108 server name if not specified.
16109
16110 @item nnimap-server-port
16111 @vindex nnimap-server-port
16112 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
16113
16114 Note that this should be an integer, example server specification:
16115
16116 @lisp
16117 (nnimap "mail.server.com"
16118         (nnimap-server-port 4711))
16119 @end lisp
16120
16121 @item nnimap-list-pattern
16122 @vindex nnimap-list-pattern
16123 String or list of strings of mailboxes to limit available groups to.
16124 This is used when the server has very many mailboxes and you're only
16125 interested in a few---some servers export your home directory via
16126 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
16127 @file{~/Mail/*} then.
16128
16129 The string can also be a cons of REFERENCE and the string as above, what
16130 REFERENCE is used for is server specific, but on the University of
16131 Washington server it's a directory that will be concatenated with the
16132 mailbox.
16133
16134 Example server specification:
16135
16136 @lisp
16137 (nnimap "mail.server.com"
16138         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
16139                                ("~friend/Mail/" . "list/*"))))
16140 @end lisp
16141
16142 @item nnimap-stream
16143 @vindex nnimap-stream
16144 The type of stream used to connect to your server.  By default, nnimap
16145 will detect and automatically use all of the below, with the exception
16146 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
16147 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
16148 be automatically detected, but it's not widely deployed yet.)
16149
16150 Example server specification:
16151
16152 @lisp
16153 (nnimap "mail.server.com"
16154         (nnimap-stream ssl))
16155 @end lisp
16156
16157 Please note that the value of @code{nnimap-stream} is a symbol!
16158
16159 @itemize @bullet
16160 @item
16161 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
16162 @samp{gsasl} or @samp{imtest} program.
16163 @item
16164 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
16165 @item
16166 @dfn{starttls:} Connect via the STARTTLS extension (similar to
16167 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
16168 @samp{starttls}.
16169 @item
16170 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
16171 @samp{gnutls-cli}).
16172 @item
16173 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
16174 @samp{openssl}) or SSLeay (@samp{s_client}).
16175 @item
16176 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
16177 @item
16178 @dfn{network:} Plain, TCP/IP network connection.
16179 @end itemize
16180
16181 @vindex imap-kerberos4-program
16182 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
16183 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
16184 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
16185 to make @code{imap.el} use a pty instead of a pipe when communicating
16186 with @samp{imtest}.  You will then suffer from a line length
16187 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
16188 indefinitely if you have many articles in a mailbox.  The variable
16189 @code{imap-kerberos4-program} contain parameters to pass to the imtest
16190 program.
16191
16192 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
16193 needed.  It is available from
16194 @uref{http://www.gnu.org/software/gnutls/}.
16195
16196 @vindex imap-gssapi-program
16197 This parameter specifies a list of command lines that invoke a GSSAPI
16198 authenticated @acronym{IMAP} stream in a subshell.  They are tried
16199 sequentially until a connection is made, or the list has been
16200 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
16201 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
16202 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
16203 tried.
16204
16205 @vindex imap-ssl-program
16206 For @acronym{SSL} connections, the OpenSSL program is available from
16207 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
16208 and nnimap support it too---although the most recent versions of
16209 SSLeay, 0.9.x, are known to have serious bugs making it
16210 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
16211 work.  The variable @code{imap-ssl-program} contain parameters to pass
16212 to OpenSSL/SSLeay.
16213
16214 @vindex imap-shell-program
16215 @vindex imap-shell-host
16216 For @acronym{IMAP} connections using the @code{shell} stream, the variable
16217 @code{imap-shell-program} specify what program to call.
16218
16219 @item nnimap-authenticator
16220 @vindex nnimap-authenticator
16221
16222 The authenticator used to connect to the server.  By default, nnimap
16223 will use the most secure authenticator your server is capable of.
16224
16225 Example server specification:
16226
16227 @lisp
16228 (nnimap "mail.server.com"
16229         (nnimap-authenticator anonymous))
16230 @end lisp
16231
16232 Please note that the value of @code{nnimap-authenticator} is a symbol!
16233
16234 @itemize @bullet
16235 @item
16236 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
16237 external program @code{gsasl} or @code{imtest}.
16238 @item
16239 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
16240 @code{imtest}.
16241 @item
16242 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
16243 external library @code{digest-md5.el}.
16244 @item
16245 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16246 @item
16247 @dfn{login:} Plain-text username/password via LOGIN.
16248 @item
16249 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16250 @end itemize
16251
16252 @item nnimap-expunge-on-close
16253 @cindex expunging
16254 @vindex nnimap-expunge-on-close
16255 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16256 don't exist actually do exist.  More specifically, @acronym{IMAP} has
16257 this concept of marking articles @code{Deleted} which doesn't actually
16258 delete them, and this (marking them @code{Deleted}, that is) is what
16259 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16260 similar).
16261
16262 Since the articles aren't really removed when we mark them with the
16263 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
16264 running in circles yet?
16265
16266 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16267 when closing a mailbox but this is now configurable by this server
16268 variable.
16269
16270 The possible options are:
16271
16272 @table @code
16273
16274 @item always
16275 The default behavior, delete all articles marked as ``Deleted'' when
16276 closing a mailbox.
16277 @item never
16278 Never actually delete articles.  Currently there is no way of showing
16279 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16280 may allow you to do this.  If you ever want to run the EXPUNGE command
16281 manually, @xref{Expunging mailboxes}.
16282 @item ask
16283 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16284 articles or not.
16285
16286 @end table
16287
16288 @item nnimap-importantize-dormant
16289 @vindex nnimap-importantize-dormant
16290
16291 If non-@code{nil} (the default), marks dormant articles as ticked (as
16292 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16293 naturally still (only) be marked as dormant.  This is to make dormant
16294 articles stand out, just like ticked articles, in other @acronym{IMAP}
16295 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16296 has only one.)
16297
16298 Probably the only reason for frobing this would be if you're trying
16299 enable per-user persistent dormant flags, using something like:
16300
16301 @lisp
16302 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16303         (format "gnus-dormant-%s" (user-login-name)))
16304 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16305         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16306 @end lisp
16307
16308 In this case, you would not want the per-user dormant flag showing up
16309 as ticked for other users.
16310
16311 @item nnimap-expunge-search-string
16312 @cindex expunging
16313 @vindex nnimap-expunge-search-string
16314
16315 This variable contain the @acronym{IMAP} search command sent to server when
16316 searching for articles eligible for expiring.  The default is
16317 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16318 UID set and the second @code{%s} is replaced by a date.
16319
16320 Probably the only useful value to change this to is
16321 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16322 messages instead of the internal article date.  See section 6.4.4 of
16323 RFC 2060 for more information on valid strings.
16324
16325 @item nnimap-authinfo-file
16326 @vindex nnimap-authinfo-file
16327
16328 A file containing credentials used to log in on servers.  The format is
16329 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16330 variable @code{nntp-authinfo-file} for exact syntax; also see
16331 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is: 
16332
16333 @example
16334 machine students.uio.no login larsi password geheimnis port imap
16335 @end example
16336
16337 Note that it should be @code{port imap}, or @code{port 143}, if you
16338 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
16339 actual port number used is port 993 for secured IMAP.  For
16340 convenience, Gnus will accept @code{port imaps} as a synonym of
16341 @code{port imap}.
16342
16343 @item nnimap-need-unselect-to-notice-new-mail
16344 @vindex nnimap-need-unselect-to-notice-new-mail
16345
16346 Unselect mailboxes before looking for new mail in them.  Some servers
16347 seem to need this under some circumstances; it was reported that
16348 Courier 1.7.1 did.
16349
16350 @end table
16351
16352 @menu
16353 * Splitting in IMAP::           Splitting mail with nnimap.
16354 * Expiring in IMAP::            Expiring mail with nnimap.
16355 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16356 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16357 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16358 * Debugging IMAP::              What to do when things don't work.
16359 @end menu
16360
16361
16362
16363 @node Splitting in IMAP
16364 @subsection Splitting in IMAP
16365 @cindex splitting imap mail
16366
16367 Splitting is something Gnus users have loved and used for years, and now
16368 the rest of the world is catching up.  Yeah, dream on, not many
16369 @acronym{IMAP} servers have server side splitting and those that have
16370 splitting seem to use some non-standard protocol.  This means that
16371 @acronym{IMAP} support for Gnus has to do its own splitting.
16372
16373 And it does.
16374
16375 (Incidentally, people seem to have been dreaming on, and Sieve has
16376 gaining a market share and is supported by several IMAP servers.
16377 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16378
16379 Here are the variables of interest:
16380
16381 @table @code
16382
16383 @item nnimap-split-crosspost
16384 @cindex splitting, crosspost
16385 @cindex crosspost
16386 @vindex nnimap-split-crosspost
16387
16388 If non-@code{nil}, do crossposting if several split methods match the
16389 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16390 found will be used.
16391
16392 Nnmail equivalent: @code{nnmail-crosspost}.
16393
16394 @item nnimap-split-inbox
16395 @cindex splitting, inbox
16396 @cindex inbox
16397 @vindex nnimap-split-inbox
16398
16399 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16400 mailboxes to split from.  Defaults to @code{nil}, which means that
16401 splitting is disabled!
16402
16403 @lisp
16404 (setq nnimap-split-inbox
16405       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16406 @end lisp
16407
16408 No nnmail equivalent.
16409
16410 @item nnimap-split-rule
16411 @cindex splitting, rules
16412 @vindex nnimap-split-rule
16413
16414 New mail found in @code{nnimap-split-inbox} will be split according to
16415 this variable.
16416
16417 This variable contains a list of lists, where the first element in the
16418 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16419 matching the regexp in the second element in the sublist.  Got that?
16420 Neither did I, we need examples.
16421
16422 @lisp
16423 (setq nnimap-split-rule
16424       '(("INBOX.nnimap"
16425          "^Sender: owner-nnimap@@vic20.globalcom.se")
16426         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16427         ("INBOX.private" "")))
16428 @end lisp
16429
16430 This will put all articles from the nnimap mailing list into mailbox
16431 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16432 into INBOX.junk and everything else in INBOX.private.
16433
16434 The first string may contain @samp{\\1} forms, like the ones used by
16435 replace-match to insert sub-expressions from the matched text.  For
16436 instance:
16437
16438 @lisp
16439 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16440 @end lisp
16441
16442 The first element can also be the symbol @code{junk} to indicate that
16443 matching messages should simply be deleted.  Use with care.
16444
16445 The second element can also be a function.  In that case, it will be
16446 called with the first element of the rule as the argument, in a buffer
16447 containing the headers of the article.  It should return a
16448 non-@code{nil} value if it thinks that the mail belongs in that group.
16449
16450 Nnmail users might recollect that the last regexp had to be empty to
16451 match all articles (like in the example above).  This is not required in
16452 nnimap.  Articles not matching any of the regexps will not be moved out
16453 of your inbox.  (This might affect performance if you keep lots of
16454 unread articles in your inbox, since the splitting code would go over
16455 them every time you fetch new mail.)
16456
16457 These rules are processed from the beginning of the alist toward the
16458 end.  The first rule to make a match will ``win'', unless you have
16459 crossposting enabled.  In that case, all matching rules will ``win''.
16460
16461 This variable can also have a function as its value, the function will
16462 be called with the headers narrowed and should return a group where it
16463 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16464
16465 The splitting code tries to create mailboxes if it needs to.
16466
16467 To allow for different split rules on different virtual servers, and
16468 even different split rules in different inboxes on the same server,
16469 the syntax of this variable have been extended along the lines of:
16470
16471 @lisp
16472 (setq nnimap-split-rule
16473       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16474                                ("junk"    "From:.*Simon"))))
16475         ("my2server"    ("INBOX" nnimap-split-fancy))
16476         ("my[34]server" (".*" (("private" "To:.*Simon")
16477                                ("junk"    my-junk-func))))))
16478 @end lisp
16479
16480 The virtual server name is in fact a regexp, so that the same rules
16481 may apply to several servers.  In the example, the servers
16482 @code{my3server} and @code{my4server} both use the same rules.
16483 Similarly, the inbox string is also a regexp.  The actual splitting
16484 rules are as before, either a function, or a list with group/regexp or
16485 group/function elements.
16486
16487 Nnmail equivalent: @code{nnmail-split-methods}.
16488
16489 @item nnimap-split-predicate
16490 @cindex splitting
16491 @vindex nnimap-split-predicate
16492
16493 Mail matching this predicate in @code{nnimap-split-inbox} will be
16494 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16495
16496 This might be useful if you use another @acronym{IMAP} client to read mail in
16497 your inbox but would like Gnus to split all articles in the inbox
16498 regardless of readedness.  Then you might change this to
16499 @samp{UNDELETED}.
16500
16501 @item nnimap-split-fancy
16502 @cindex splitting, fancy
16503 @findex nnimap-split-fancy
16504 @vindex nnimap-split-fancy
16505
16506 It's possible to set @code{nnimap-split-rule} to
16507 @code{nnmail-split-fancy} if you want to use fancy
16508 splitting.  @xref{Fancy Mail Splitting}.
16509
16510 However, to be able to have different fancy split rules for nnmail and
16511 nnimap back ends you can set @code{nnimap-split-rule} to
16512 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16513 rule in @code{nnimap-split-fancy}.
16514
16515 Example:
16516
16517 @lisp
16518 (setq nnimap-split-rule 'nnimap-split-fancy
16519       nnimap-split-fancy ...)
16520 @end lisp
16521
16522 Nnmail equivalent: @code{nnmail-split-fancy}.
16523
16524 @item nnimap-split-download-body
16525 @findex nnimap-split-download-body
16526 @vindex nnimap-split-download-body
16527
16528 Set to non-@code{nil} to download entire articles during splitting.
16529 This is generally not required, and will slow things down
16530 considerably.  You may need it if you want to use an advanced
16531 splitting function that analyses the body to split the article.
16532
16533 @end table
16534
16535 @node Expiring in IMAP
16536 @subsection Expiring in IMAP
16537 @cindex expiring imap mail
16538
16539 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16540 end, it supports most features in regular expiring (@pxref{Expiring
16541 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16542 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16543 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16544 follows below are the variables used by the @code{nnimap} expiry
16545 process.
16546
16547 A note on how the expire mark is stored on the @acronym{IMAP} server is
16548 appropriate here as well.  The expire mark is translated into a
16549 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16550 message.  This means that likely only Gnus will understand and treat
16551 the @code{gnus-expire} mark properly, although other clients may allow
16552 you to view client specific flags on the message.  It also means that
16553 your server must support permanent storage of client specific flags on
16554 messages.  Most do, fortunately.
16555
16556 @table @code
16557
16558 @item nnmail-expiry-wait
16559 @item nnmail-expiry-wait-function
16560
16561 These variables are fully supported.  The expire value can be a
16562 number, the symbol @code{immediate} or @code{never}.
16563
16564 @item nnmail-expiry-target
16565
16566 This variable is supported, and internally implemented by calling the
16567 @code{nnmail} functions that handle this.  It contains an optimization
16568 that if the destination is a @acronym{IMAP} group on the same server, the
16569 article is copied instead of appended (that is, uploaded again).
16570
16571 @end table
16572
16573 @node Editing IMAP ACLs
16574 @subsection Editing IMAP ACLs
16575 @cindex editing imap acls
16576 @cindex Access Control Lists
16577 @cindex Editing @acronym{IMAP} ACLs
16578 @kindex G l (Group)
16579 @findex gnus-group-nnimap-edit-acl
16580
16581 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16582 limiting (or enabling) other users access to your mail boxes.  Not all
16583 @acronym{IMAP} servers support this, this function will give an error if it
16584 doesn't.
16585
16586 To edit an ACL for a mailbox, type @kbd{G l}
16587 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16588 editing window with detailed instructions.
16589
16590 Some possible uses:
16591
16592 @itemize @bullet
16593 @item
16594 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16595 on your mailing list mailboxes enables other users on the same server to
16596 follow the list without subscribing to it.
16597 @item
16598 At least with the Cyrus server, you are required to give the user
16599 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16600 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16601 INBOX.mailbox).
16602 @end itemize
16603
16604 @node Expunging mailboxes
16605 @subsection Expunging mailboxes
16606 @cindex expunging
16607
16608 @cindex expunge
16609 @cindex manual expunging
16610 @kindex G x (Group)
16611 @findex gnus-group-nnimap-expunge
16612
16613 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16614 you may want the option of expunging all deleted articles in a mailbox
16615 manually.  This is exactly what @kbd{G x} does.
16616
16617 Currently there is no way of showing deleted articles, you can just
16618 delete them.
16619
16620 @node A note on namespaces
16621 @subsection A note on namespaces
16622 @cindex IMAP namespace
16623 @cindex namespaces
16624
16625 The @acronym{IMAP} protocol has a concept called namespaces, described
16626 by the following text in the RFC:
16627
16628 @display
16629 5.1.2.  Mailbox Namespace Naming Convention
16630
16631    By convention, the first hierarchical element of any mailbox name
16632    which begins with "#" identifies the "namespace" of the remainder of
16633    the name.  This makes it possible to disambiguate between different
16634    types of mailbox stores, each of which have their own namespaces.
16635
16636       For example, implementations which offer access to USENET
16637       newsgroups MAY use the "#news" namespace to partition the USENET
16638       newsgroup namespace from that of other mailboxes.  Thus, the
16639       comp.mail.misc newsgroup would have an mailbox name of
16640       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16641       to a different object (e.g. a user's private mailbox).
16642 @end display
16643
16644 While there is nothing in this text that warrants concern for the
16645 @acronym{IMAP} implementation in Gnus, some servers use namespace
16646 prefixes in a way that does not work with how Gnus uses mailbox names.
16647
16648 Specifically, University of Washington's @acronym{IMAP} server uses
16649 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16650 in the @sc{create} and @sc{append} commands.  After the mailbox is
16651 created (or a messages is appended to a mailbox), it must be accessed
16652 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16653 not make it possible for the user to guarantee that user entered
16654 mailbox names will only be used with the CREATE and APPEND commands,
16655 you should simply not use the namespace prefixed mailbox names in
16656 Gnus.
16657
16658 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16659 for more information on how to use the prefixes.  They are a power
16660 tool and should be used only if you are sure what the effects are.
16661
16662 @node Debugging IMAP
16663 @subsection Debugging IMAP
16664 @cindex IMAP debugging
16665 @cindex protocol dump (IMAP)
16666
16667 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
16668 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
16669 best to fix them right away.  If you encounter odd behaviour, chances
16670 are that either the server or Gnus is buggy.
16671
16672 If you are familiar with network protocols in general, you will
16673 probably be able to extract some clues from the protocol dump of the
16674 exchanges between Gnus and the server.  Even if you are not familiar
16675 with network protocols, when you include the protocol dump in
16676 @acronym{IMAP}-related bug reports you are helping us with data
16677 critical to solving the problem.  Therefore, we strongly encourage you
16678 to include the protocol dump when reporting IMAP bugs in Gnus.
16679
16680
16681 @vindex imap-log
16682 Because the protocol dump, when enabled, generates lots of data, it is
16683 disabled by default.  You can enable it by setting @code{imap-log} as
16684 follows: 
16685
16686 @lisp
16687 (setq imap-log t)
16688 @end lisp
16689
16690 This instructs the @code{imap.el} package to log any exchanges with
16691 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
16692 for error messages, which sometimes are tagged with the keyword
16693 @code{BAD}---but when submitting a bug, make sure to include all the
16694 data.
16695
16696 @node Other Sources
16697 @section Other Sources
16698
16699 Gnus can do more than just read news or mail.  The methods described
16700 below allow Gnus to view directories and files as if they were
16701 newsgroups.
16702
16703 @menu
16704 * Directory Groups::            You can read a directory as if it was a newsgroup.
16705 * Anything Groups::             Dired?  Who needs dired?
16706 * Document Groups::             Single files can be the basis of a group.
16707 * SOUP::                        Reading @sc{soup} packets ``offline''.
16708 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16709 @end menu
16710
16711
16712 @node Directory Groups
16713 @subsection Directory Groups
16714 @cindex nndir
16715 @cindex directory groups
16716
16717 If you have a directory that has lots of articles in separate files in
16718 it, you might treat it as a newsgroup.  The files have to have numerical
16719 names, of course.
16720
16721 This might be an opportune moment to mention @code{ange-ftp} (and its
16722 successor @code{efs}), that most wonderful of all wonderful Emacs
16723 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16724 back end to read directories.  Big deal.
16725
16726 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16727 enter the @code{ange-ftp} file name
16728 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16729 @code{ange-ftp} or @code{efs} will actually allow you to read this
16730 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16731
16732 @code{nndir} will use @acronym{NOV} files if they are present.
16733
16734 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16735 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16736 whatever you use @code{nndir} for, so you could switch to any of those
16737 methods if you feel the need to have a non-read-only @code{nndir}.
16738
16739
16740 @node Anything Groups
16741 @subsection Anything Groups
16742 @cindex nneething
16743
16744 From the @code{nndir} back end (which reads a single spool-like
16745 directory), it's just a hop and a skip to @code{nneething}, which
16746 pretends that any arbitrary directory is a newsgroup.  Strange, but
16747 true.
16748
16749 When @code{nneething} is presented with a directory, it will scan this
16750 directory and assign article numbers to each file.  When you enter such
16751 a group, @code{nneething} must create ``headers'' that Gnus can use.
16752 After all, Gnus is a newsreader, in case you're forgetting.
16753 @code{nneething} does this in a two-step process.  First, it snoops each
16754 file in question.  If the file looks like an article (i.e., the first
16755 few lines look like headers), it will use this as the head.  If this is
16756 just some arbitrary file without a head (e.g. a C source file),
16757 @code{nneething} will cobble up a header out of thin air.  It will use
16758 file ownership, name and date and do whatever it can with these
16759 elements.
16760
16761 All this should happen automatically for you, and you will be presented
16762 with something that looks very much like a newsgroup.  Totally like a
16763 newsgroup, to be precise.  If you select an article, it will be displayed
16764 in the article buffer, just as usual.
16765
16766 If you select a line that represents a directory, Gnus will pop you into
16767 a new summary buffer for this @code{nneething} group.  And so on.  You can
16768 traverse the entire disk this way, if you feel like, but remember that
16769 Gnus is not dired, really, and does not intend to be, either.
16770
16771 There are two overall modes to this action---ephemeral or solid.  When
16772 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16773 will not store information on what files you have read, and what files
16774 are new, and so on.  If you create a solid @code{nneething} group the
16775 normal way with @kbd{G m}, Gnus will store a mapping table between
16776 article numbers and file names, and you can treat this group like any
16777 other groups.  When you activate a solid @code{nneething} group, you will
16778 be told how many unread articles it contains, etc., etc.
16779
16780 Some variables:
16781
16782 @table @code
16783 @item nneething-map-file-directory
16784 @vindex nneething-map-file-directory
16785 All the mapping files for solid @code{nneething} groups will be stored
16786 in this directory, which defaults to @file{~/.nneething/}.
16787
16788 @item nneething-exclude-files
16789 @vindex nneething-exclude-files
16790 All files that match this regexp will be ignored.  Nice to use to exclude
16791 auto-save files and the like, which is what it does by default.
16792
16793 @item nneething-include-files
16794 @vindex nneething-include-files
16795 Regexp saying what files to include in the group.  If this variable is
16796 non-@code{nil}, only files matching this regexp will be included.
16797
16798 @item nneething-map-file
16799 @vindex nneething-map-file
16800 Name of the map files.
16801 @end table
16802
16803
16804 @node Document Groups
16805 @subsection Document Groups
16806 @cindex nndoc
16807 @cindex documentation group
16808 @cindex help group
16809
16810 @code{nndoc} is a cute little thing that will let you read a single file
16811 as a newsgroup.  Several files types are supported:
16812
16813 @table @code
16814 @cindex Babyl
16815 @cindex Rmail mbox
16816
16817 @item babyl
16818 The Babyl (Rmail) mail box.
16819 @cindex mbox
16820 @cindex Unix mbox
16821
16822 @item mbox
16823 The standard Unix mbox file.
16824
16825 @cindex MMDF mail box
16826 @item mmdf
16827 The MMDF mail box format.
16828
16829 @item news
16830 Several news articles appended into a file.
16831
16832 @item rnews
16833 @cindex rnews batch files
16834 The rnews batch transport format.
16835 @cindex forwarded messages
16836
16837 @item forward
16838 Forwarded articles.
16839
16840 @item nsmail
16841 Netscape mail boxes.
16842
16843 @item mime-parts
16844 @acronym{MIME} multipart messages.
16845
16846 @item standard-digest
16847 The standard (RFC 1153) digest format.
16848
16849 @item mime-digest
16850 A @acronym{MIME} digest of messages.
16851
16852 @item lanl-gov-announce
16853 Announcement messages from LANL Gov Announce.
16854
16855 @item rfc822-forward
16856 A message forwarded according to RFC822.
16857
16858 @item outlook
16859 The Outlook mail box.
16860
16861 @item oe-dbx
16862 The Outlook Express dbx mail box.
16863
16864 @item exim-bounce
16865 A bounce message from the Exim MTA.
16866
16867 @item forward
16868 A message forwarded according to informal rules.
16869
16870 @item rfc934
16871 An RFC934-forwarded message.
16872
16873 @item mailman
16874 A mailman digest.
16875
16876 @item clari-briefs
16877 A digest of Clarinet brief news items.
16878
16879 @item slack-digest
16880 Non-standard digest format---matches most things, but does it badly.
16881
16882 @item mail-in-mail
16883 The last resort.
16884 @end table
16885
16886 You can also use the special ``file type'' @code{guess}, which means
16887 that @code{nndoc} will try to guess what file type it is looking at.
16888 @code{digest} means that @code{nndoc} should guess what digest type the
16889 file is.
16890
16891 @code{nndoc} will not try to change the file or insert any extra headers into
16892 it---it will simply, like, let you use the file as the basis for a
16893 group.  And that's it.
16894
16895 If you have some old archived articles that you want to insert into your
16896 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16897 that.  Say you have an old @file{RMAIL} file with mail that you now want
16898 to split into your new @code{nnml} groups.  You look at that file using
16899 @code{nndoc} (using the @kbd{G f} command in the group buffer
16900 (@pxref{Foreign Groups})), set the process mark on all the articles in
16901 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16902 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16903 file is now also stored in lots of @code{nnml} directories, and you can
16904 delete that pesky @file{RMAIL} file.  If you have the guts!
16905
16906 Virtual server variables:
16907
16908 @table @code
16909 @item nndoc-article-type
16910 @vindex nndoc-article-type
16911 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16912 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16913 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16914 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16915 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16916
16917 @item nndoc-post-type
16918 @vindex nndoc-post-type
16919 This variable says whether Gnus is to consider the group a news group or
16920 a mail group.  There are two valid values:  @code{mail} (the default)
16921 and @code{news}.
16922 @end table
16923
16924 @menu
16925 * Document Server Internals::   How to add your own document types.
16926 @end menu
16927
16928
16929 @node Document Server Internals
16930 @subsubsection Document Server Internals
16931
16932 Adding new document types to be recognized by @code{nndoc} isn't
16933 difficult.  You just have to whip up a definition of what the document
16934 looks like, write a predicate function to recognize that document type,
16935 and then hook into @code{nndoc}.
16936
16937 First, here's an example document type definition:
16938
16939 @example
16940 (mmdf
16941  (article-begin .  "^\^A\^A\^A\^A\n")
16942  (body-end .  "^\^A\^A\^A\^A\n"))
16943 @end example
16944
16945 The definition is simply a unique @dfn{name} followed by a series of
16946 regexp pseudo-variable settings.  Below are the possible
16947 variables---don't be daunted by the number of variables; most document
16948 types can be defined with very few settings:
16949
16950 @table @code
16951 @item first-article
16952 If present, @code{nndoc} will skip past all text until it finds
16953 something that match this regexp.  All text before this will be
16954 totally ignored.
16955
16956 @item article-begin
16957 This setting has to be present in all document type definitions.  It
16958 says what the beginning of each article looks like.
16959
16960 @item head-begin-function
16961 If present, this should be a function that moves point to the head of
16962 the article.
16963
16964 @item nndoc-head-begin
16965 If present, this should be a regexp that matches the head of the
16966 article.
16967
16968 @item nndoc-head-end
16969 This should match the end of the head of the article.  It defaults to
16970 @samp{^$}---the empty line.
16971
16972 @item body-begin-function
16973 If present, this function should move point to the beginning of the body
16974 of the article.
16975
16976 @item body-begin
16977 This should match the beginning of the body of the article.  It defaults
16978 to @samp{^\n}.
16979
16980 @item body-end-function
16981 If present, this function should move point to the end of the body of
16982 the article.
16983
16984 @item body-end
16985 If present, this should match the end of the body of the article.
16986
16987 @item file-end
16988 If present, this should match the end of the file.  All text after this
16989 regexp will be totally ignored.
16990
16991 @end table
16992
16993 So, using these variables @code{nndoc} is able to dissect a document
16994 file into a series of articles, each with a head and a body.  However, a
16995 few more variables are needed since not all document types are all that
16996 news-like---variables needed to transform the head or the body into
16997 something that's palatable for Gnus:
16998
16999 @table @code
17000 @item prepare-body-function
17001 If present, this function will be called when requesting an article.  It
17002 will be called with point at the start of the body, and is useful if the
17003 document has encoded some parts of its contents.
17004
17005 @item article-transform-function
17006 If present, this function is called when requesting an article.  It's
17007 meant to be used for more wide-ranging transformation of both head and
17008 body of the article.
17009
17010 @item generate-head-function
17011 If present, this function is called to generate a head that Gnus can
17012 understand.  It is called with the article number as a parameter, and is
17013 expected to generate a nice head for the article in question.  It is
17014 called when requesting the headers of all articles.
17015
17016 @end table
17017
17018 Let's look at the most complicated example I can come up with---standard
17019 digests:
17020
17021 @example
17022 (standard-digest
17023  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
17024  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
17025  (prepare-body-function . nndoc-unquote-dashes)
17026  (body-end-function . nndoc-digest-body-end)
17027  (head-end . "^ ?$")
17028  (body-begin . "^ ?\n")
17029  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
17030  (subtype digest guess))
17031 @end example
17032
17033 We see that all text before a 70-width line of dashes is ignored; all
17034 text after a line that starts with that @samp{^End of} is also ignored;
17035 each article begins with a 30-width line of dashes; the line separating
17036 the head from the body may contain a single space; and that the body is
17037 run through @code{nndoc-unquote-dashes} before being delivered.
17038
17039 To hook your own document definition into @code{nndoc}, use the
17040 @code{nndoc-add-type} function.  It takes two parameters---the first
17041 is the definition itself and the second (optional) parameter says
17042 where in the document type definition alist to put this definition.
17043 The alist is traversed sequentially, and
17044 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
17045 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
17046 @code{mmdf} type, and so on.  These type predicates should return
17047 @code{nil} if the document is not of the correct type; @code{t} if it
17048 is of the correct type; and a number if the document might be of the
17049 correct type.  A high number means high probability; a low number
17050 means low probability with @samp{0} being the lowest valid number.
17051
17052
17053 @node SOUP
17054 @subsection SOUP
17055 @cindex SOUP
17056 @cindex offline
17057
17058 In the PC world people often talk about ``offline'' newsreaders.  These
17059 are thingies that are combined reader/news transport monstrosities.
17060 With built-in modem programs.  Yecchh!
17061
17062 Of course, us Unix Weenie types of human beans use things like
17063 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
17064 transport things like Ghod intended.  And then we just use normal
17065 newsreaders.
17066
17067 However, it can sometimes be convenient to do something that's a bit
17068 easier on the brain if you have a very slow modem, and you're not really
17069 that interested in doing things properly.
17070
17071 A file format called @sc{soup} has been developed for transporting news
17072 and mail from servers to home machines and back again.  It can be a bit
17073 fiddly.
17074
17075 First some terminology:
17076
17077 @table @dfn
17078
17079 @item server
17080 This is the machine that is connected to the outside world and where you
17081 get news and/or mail from.
17082
17083 @item home machine
17084 This is the machine that you want to do the actual reading and responding
17085 on.  It is typically not connected to the rest of the world in any way.
17086
17087 @item packet
17088 Something that contains messages and/or commands.  There are two kinds
17089 of packets:
17090
17091 @table @dfn
17092 @item message packets
17093 These are packets made at the server, and typically contain lots of
17094 messages for you to read.  These are called @file{SoupoutX.tgz} by
17095 default, where @var{x} is a number.
17096
17097 @item response packets
17098 These are packets made at the home machine, and typically contains
17099 replies that you've written.  These are called @file{SoupinX.tgz} by
17100 default, where @var{x} is a number.
17101
17102 @end table
17103
17104 @end table
17105
17106
17107 @enumerate
17108
17109 @item
17110 You log in on the server and create a @sc{soup} packet.  You can either
17111 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
17112 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
17113 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
17114
17115 @item
17116 You transfer the packet home.  Rail, boat, car or modem will do fine.
17117
17118 @item
17119 You put the packet in your home directory.
17120
17121 @item
17122 You fire up Gnus on your home machine using the @code{nnsoup} back end as
17123 the native or secondary server.
17124
17125 @item
17126 You read articles and mail and answer and followup to the things you
17127 want (@pxref{SOUP Replies}).
17128
17129 @item
17130 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
17131 packet.
17132
17133 @item
17134 You transfer this packet to the server.
17135
17136 @item
17137 You use Gnus to mail this packet out with the @kbd{G s s} command.
17138
17139 @item
17140 You then repeat until you die.
17141
17142 @end enumerate
17143
17144 So you basically have a bipartite system---you use @code{nnsoup} for
17145 reading and Gnus for packing/sending these @sc{soup} packets.
17146
17147 @menu
17148 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
17149 * SOUP Groups::                 A back end for reading @sc{soup} packets.
17150 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
17151 @end menu
17152
17153
17154 @node SOUP Commands
17155 @subsubsection SOUP Commands
17156
17157 These are commands for creating and manipulating @sc{soup} packets.
17158
17159 @table @kbd
17160 @item G s b
17161 @kindex G s b (Group)
17162 @findex gnus-group-brew-soup
17163 Pack all unread articles in the current group
17164 (@code{gnus-group-brew-soup}).  This command understands the
17165 process/prefix convention.
17166
17167 @item G s w
17168 @kindex G s w (Group)
17169 @findex gnus-soup-save-areas
17170 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
17171
17172 @item G s s
17173 @kindex G s s (Group)
17174 @findex gnus-soup-send-replies
17175 Send all replies from the replies packet
17176 (@code{gnus-soup-send-replies}).
17177
17178 @item G s p
17179 @kindex G s p (Group)
17180 @findex gnus-soup-pack-packet
17181 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
17182
17183 @item G s r
17184 @kindex G s r (Group)
17185 @findex nnsoup-pack-replies
17186 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
17187
17188 @item O s
17189 @kindex O s (Summary)
17190 @findex gnus-soup-add-article
17191 This summary-mode command adds the current article to a @sc{soup} packet
17192 (@code{gnus-soup-add-article}).  It understands the process/prefix
17193 convention (@pxref{Process/Prefix}).
17194
17195 @end table
17196
17197
17198 There are a few variables to customize where Gnus will put all these
17199 thingies:
17200
17201 @table @code
17202
17203 @item gnus-soup-directory
17204 @vindex gnus-soup-directory
17205 Directory where Gnus will save intermediate files while composing
17206 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
17207
17208 @item gnus-soup-replies-directory
17209 @vindex gnus-soup-replies-directory
17210 This is what Gnus will use as a temporary directory while sending our
17211 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
17212
17213 @item gnus-soup-prefix-file
17214 @vindex gnus-soup-prefix-file
17215 Name of the file where Gnus stores the last used prefix.  The default is
17216 @samp{gnus-prefix}.
17217
17218 @item gnus-soup-packer
17219 @vindex gnus-soup-packer
17220 A format string command for packing a @sc{soup} packet.  The default is
17221 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
17222
17223 @item gnus-soup-unpacker
17224 @vindex gnus-soup-unpacker
17225 Format string command for unpacking a @sc{soup} packet.  The default is
17226 @samp{gunzip -c %s | tar xvf -}.
17227
17228 @item gnus-soup-packet-directory
17229 @vindex gnus-soup-packet-directory
17230 Where Gnus will look for reply packets.  The default is @file{~/}.
17231
17232 @item gnus-soup-packet-regexp
17233 @vindex gnus-soup-packet-regexp
17234 Regular expression matching @sc{soup} reply packets in
17235 @code{gnus-soup-packet-directory}.
17236
17237 @end table
17238
17239
17240 @node SOUP Groups
17241 @subsubsection SOUP Groups
17242 @cindex nnsoup
17243
17244 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
17245 read incoming packets, unpack them, and put them in a directory where
17246 you can read them at leisure.
17247
17248 These are the variables you can use to customize its behavior:
17249
17250 @table @code
17251
17252 @item nnsoup-tmp-directory
17253 @vindex nnsoup-tmp-directory
17254 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17255 directory.  (@file{/tmp/} by default.)
17256
17257 @item nnsoup-directory
17258 @vindex nnsoup-directory
17259 @code{nnsoup} then moves each message and index file to this directory.
17260 The default is @file{~/SOUP/}.
17261
17262 @item nnsoup-replies-directory
17263 @vindex nnsoup-replies-directory
17264 All replies will be stored in this directory before being packed into a
17265 reply packet.  The default is @file{~/SOUP/replies/}.
17266
17267 @item nnsoup-replies-format-type
17268 @vindex nnsoup-replies-format-type
17269 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17270 (rnews), and I don't think you should touch that variable.  I probably
17271 shouldn't even have documented it.  Drats!  Too late!
17272
17273 @item nnsoup-replies-index-type
17274 @vindex nnsoup-replies-index-type
17275 The index type of the replies packet.  The default is @samp{?n}, which
17276 means ``none''.  Don't fiddle with this one either!
17277
17278 @item nnsoup-active-file
17279 @vindex nnsoup-active-file
17280 Where @code{nnsoup} stores lots of information.  This is not an ``active
17281 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17282 this file or mess it up in any way, you're dead.  The default is
17283 @file{~/SOUP/active}.
17284
17285 @item nnsoup-packer
17286 @vindex nnsoup-packer
17287 Format string command for packing a reply @sc{soup} packet.  The default
17288 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17289
17290 @item nnsoup-unpacker
17291 @vindex nnsoup-unpacker
17292 Format string command for unpacking incoming @sc{soup} packets.  The
17293 default is @samp{gunzip -c %s | tar xvf -}.
17294
17295 @item nnsoup-packet-directory
17296 @vindex nnsoup-packet-directory
17297 Where @code{nnsoup} will look for incoming packets.  The default is
17298 @file{~/}.
17299
17300 @item nnsoup-packet-regexp
17301 @vindex nnsoup-packet-regexp
17302 Regular expression matching incoming @sc{soup} packets.  The default is
17303 @samp{Soupout}.
17304
17305 @item nnsoup-always-save
17306 @vindex nnsoup-always-save
17307 If non-@code{nil}, save the replies buffer after each posted message.
17308
17309 @end table
17310
17311
17312 @node SOUP Replies
17313 @subsubsection SOUP Replies
17314
17315 Just using @code{nnsoup} won't mean that your postings and mailings end
17316 up in @sc{soup} reply packets automagically.  You have to work a bit
17317 more for that to happen.
17318
17319 @findex nnsoup-set-variables
17320 The @code{nnsoup-set-variables} command will set the appropriate
17321 variables to ensure that all your followups and replies end up in the
17322 @sc{soup} system.
17323
17324 In specific, this is what it does:
17325
17326 @lisp
17327 (setq message-send-news-function 'nnsoup-request-post)
17328 (setq message-send-mail-function 'nnsoup-request-mail)
17329 @end lisp
17330
17331 And that's it, really.  If you only want news to go into the @sc{soup}
17332 system you just use the first line.  If you only want mail to be
17333 @sc{soup}ed you use the second.
17334
17335
17336 @node Mail-To-News Gateways
17337 @subsection Mail-To-News Gateways
17338 @cindex mail-to-news gateways
17339 @cindex gateways
17340
17341 If your local @code{nntp} server doesn't allow posting, for some reason
17342 or other, you can post using one of the numerous mail-to-news gateways.
17343 The @code{nngateway} back end provides the interface.
17344
17345 Note that you can't read anything from this back end---it can only be
17346 used to post with.
17347
17348 Server variables:
17349
17350 @table @code
17351 @item nngateway-address
17352 @vindex nngateway-address
17353 This is the address of the mail-to-news gateway.
17354
17355 @item nngateway-header-transformation
17356 @vindex nngateway-header-transformation
17357 News headers often have to be transformed in some odd way or other
17358 for the mail-to-news gateway to accept it.  This variable says what
17359 transformation should be called, and defaults to
17360 @code{nngateway-simple-header-transformation}.  The function is called
17361 narrowed to the headers to be transformed and with one parameter---the
17362 gateway address.
17363
17364 This default function just inserts a new @code{To} header based on the
17365 @code{Newsgroups} header and the gateway address.
17366 For instance, an article with this @code{Newsgroups} header:
17367
17368 @example
17369 Newsgroups: alt.religion.emacs
17370 @end example
17371
17372 will get this @code{To} header inserted:
17373
17374 @example
17375 To: alt-religion-emacs@@GATEWAY
17376 @end example
17377
17378 The following pre-defined functions exist:
17379
17380 @findex nngateway-simple-header-transformation
17381 @table @code
17382
17383 @item nngateway-simple-header-transformation
17384 Creates a @code{To} header that looks like
17385 @var{newsgroup}@@@code{nngateway-address}.
17386
17387 @findex nngateway-mail2news-header-transformation
17388
17389 @item nngateway-mail2news-header-transformation
17390 Creates a @code{To} header that looks like
17391 @code{nngateway-address}.
17392 @end table
17393
17394 @end table
17395
17396 Here's an example:
17397
17398 @lisp
17399 (setq gnus-post-method
17400       '(nngateway
17401         "mail2news@@replay.com"
17402         (nngateway-header-transformation
17403          nngateway-mail2news-header-transformation)))
17404 @end lisp
17405
17406 So, to use this, simply say something like:
17407
17408 @lisp
17409 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17410 @end lisp
17411
17412
17413
17414 @node Combined Groups
17415 @section Combined Groups
17416
17417 Gnus allows combining a mixture of all the other group types into bigger
17418 groups.
17419
17420 @menu
17421 * Virtual Groups::              Combining articles from many groups.
17422 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17423 @end menu
17424
17425
17426 @node Virtual Groups
17427 @subsection Virtual Groups
17428 @cindex nnvirtual
17429 @cindex virtual groups
17430 @cindex merging groups
17431
17432 An @dfn{nnvirtual group} is really nothing more than a collection of
17433 other groups.
17434
17435 For instance, if you are tired of reading many small groups, you can
17436 put them all in one big group, and then grow tired of reading one
17437 big, unwieldy group.  The joys of computing!
17438
17439 You specify @code{nnvirtual} as the method.  The address should be a
17440 regexp to match component groups.
17441
17442 All marks in the virtual group will stick to the articles in the
17443 component groups.  So if you tick an article in a virtual group, the
17444 article will also be ticked in the component group from whence it
17445 came.  (And vice versa---marks from the component groups will also be
17446 shown in the virtual group.).  To create an empty virtual group, run
17447 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17448 and edit the method regexp with @kbd{M-e}
17449 (@code{gnus-group-edit-group-method})
17450
17451 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17452 newsgroups into one, big, happy newsgroup:
17453
17454 @lisp
17455 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17456 @end lisp
17457
17458 The component groups can be native or foreign; everything should work
17459 smoothly, but if your computer explodes, it was probably my fault.
17460
17461 Collecting the same group from several servers might actually be a good
17462 idea if users have set the Distribution header to limit distribution.
17463 If you would like to read @samp{soc.motss} both from a server in Japan
17464 and a server in Norway, you could use the following as the group regexp:
17465
17466 @example
17467 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17468 @end example
17469
17470 (Remember, though, that if you're creating the group with @kbd{G m}, you
17471 shouldn't double the backslashes, and you should leave off the quote
17472 characters at the beginning and the end of the string.)
17473
17474 This should work kinda smoothly---all articles from both groups should
17475 end up in this one, and there should be no duplicates.  Threading (and
17476 the rest) will still work as usual, but there might be problems with the
17477 sequence of articles.  Sorting on date might be an option here
17478 (@pxref{Selecting a Group}).
17479
17480 One limitation, however---all groups included in a virtual
17481 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17482 zombie groups can't be component groups for @code{nnvirtual} groups.
17483
17484 @vindex nnvirtual-always-rescan
17485 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17486 @code{nnvirtual} will always scan groups for unread articles when
17487 entering a virtual group.  If this variable is @code{nil} (which is the
17488 default) and you read articles in a component group after the virtual
17489 group has been activated, the read articles from the component group
17490 will show up when you enter the virtual group.  You'll also see this
17491 effect if you have two virtual groups that have a component group in
17492 common.  If that's the case, you should set this variable to @code{t}.
17493 Or you can just tap @code{M-g} on the virtual group every time before
17494 you enter it---it'll have much the same effect.
17495
17496 @code{nnvirtual} can have both mail and news groups as component groups.
17497 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17498 has to ask the back end of the component group the article comes from
17499 whether it is a news or mail back end.  However, when you do a @kbd{^},
17500 there is typically no sure way for the component back end to know this,
17501 and in that case @code{nnvirtual} tells Gnus that the article came from a
17502 not-news back end.  (Just to be on the safe side.)
17503
17504 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17505 line from the article you respond to in these cases.
17506
17507 @code{nnvirtual} groups do not inherit anything but articles and marks
17508 from component groups---group parameters, for instance, are not
17509 inherited.
17510
17511
17512 @node Kibozed Groups
17513 @subsection Kibozed Groups
17514 @cindex nnkiboze
17515 @cindex kibozing
17516
17517 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17518 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17519 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17520 down to a halt with useless requests!  Oh happiness!
17521
17522 @kindex G k (Group)
17523 To create a kibozed group, use the @kbd{G k} command in the group
17524 buffer.
17525
17526 The address field of the @code{nnkiboze} method is, as with
17527 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17528 @code{nnkiboze} group.  That's where most similarities between
17529 @code{nnkiboze} and @code{nnvirtual} end.
17530
17531 In addition to this regexp detailing component groups, an
17532 @code{nnkiboze} group must have a score file to say what articles are
17533 to be included in the group (@pxref{Scoring}).
17534
17535 @kindex M-x nnkiboze-generate-groups
17536 @findex nnkiboze-generate-groups
17537 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17538 @code{nnkiboze} groups you want to have.  This command will take time.
17539 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17540 headers from all the articles in all the component groups and run them
17541 through the scoring process to determine if there are any articles in
17542 the groups that are to be part of the @code{nnkiboze} groups.
17543
17544 Please limit the number of component groups by using restrictive
17545 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17546 @acronym{NNTP} site may throw you off and never let you back in again.
17547 Stranger things have happened.
17548
17549 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17550 and they can be foreign.  No restrictions.
17551
17552 @vindex nnkiboze-directory
17553 The generation of an @code{nnkiboze} group means writing two files in
17554 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17555 One contains the @acronym{NOV} header lines for all the articles in
17556 the group, and the other is an additional @file{.newsrc} file to store
17557 information on what groups have been searched through to find
17558 component articles.
17559
17560 Articles marked as read in the @code{nnkiboze} group will have
17561 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17562
17563
17564 @node Gnus Unplugged
17565 @section Gnus Unplugged
17566 @cindex offline
17567 @cindex unplugged
17568 @cindex agent
17569 @cindex Gnus agent
17570 @cindex Gnus unplugged
17571
17572 In olden times (ca. February '88), people used to run their newsreaders
17573 on big machines with permanent connections to the net.  News transport
17574 was dealt with by news servers, and all the newsreaders had to do was to
17575 read news.  Believe it or not.
17576
17577 Nowadays most people read news and mail at home, and use some sort of
17578 modem to connect to the net.  To avoid running up huge phone bills, it
17579 would be nice to have a way to slurp down all the news and mail, hang up
17580 the phone, read for several hours, and then upload any responses you
17581 have to make.  And then you repeat the procedure.
17582
17583 Of course, you can use news servers for doing this as well.  I've used
17584 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17585 for some years, but doing that's a bore.  Moving the news server
17586 functionality up to the newsreader makes sense if you're the only person
17587 reading news on a machine.
17588
17589 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17590 fact, you don't have to configure anything as the agent is now enabled
17591 by default (@pxref{Agent Variables, gnus-agent}).
17592
17593 Of course, to use it as such, you have to learn a few new commands.
17594
17595 @menu
17596 * Agent Basics::                How it all is supposed to work.
17597 * Agent Categories::            How to tell the Gnus Agent what to download.
17598 * Agent Commands::              New commands for all the buffers.
17599 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17600 * Agent as Cache::              The Agent is a big cache too.
17601 * Agent Expiry::                How to make old articles go away.
17602 * Agent Regeneration::          How to recover from lost connections and other accidents.
17603 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17604 * Outgoing Messages::           What happens when you post/mail something?
17605 * Agent Variables::             Customizing is fun.
17606 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17607 * Batching Agents::             How to fetch news from a @code{cron} job.
17608 * Agent Caveats::               What you think it'll do and what it does.
17609 @end menu
17610
17611
17612 @node Agent Basics
17613 @subsection Agent Basics
17614
17615 First, let's get some terminology out of the way.
17616
17617 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17618 connection to the net (and notified the Agent that this is the case).
17619 When the connection to the net is up again (and Gnus knows this), the
17620 Agent is @dfn{plugged}.
17621
17622 The @dfn{local} machine is the one you're running on, and which isn't
17623 connected to the net continuously.
17624
17625 @dfn{Downloading} means fetching things from the net to your local
17626 machine.  @dfn{Uploading} is doing the opposite.
17627
17628 You know that Gnus gives you all the opportunity you'd ever want for
17629 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17630 is also customizable to a great extent, which means that the user has a
17631 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17632 you in your foot, but with Gnus, you have a choice!
17633
17634 Gnus is never really in plugged or unplugged state.  Rather, it applies
17635 that state to each server individually.  This means that some servers
17636 can be plugged while others can be unplugged.  Additionally, some
17637 servers can be ignored by the Agent altogether (which means that
17638 they're kinda like plugged always).
17639
17640 So when you unplug the Agent and then wonder why is Gnus opening a
17641 connection to the Net, the next step to do is to look whether all
17642 servers are agentized.  If there is an unagentized server, you found
17643 the culprit.
17644
17645 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17646 reachable.  When Gnus notices this, it asks you whether you want the
17647 server to be switched to offline state.  If you say yes, then the
17648 server will behave somewhat as if it was unplugged, except that Gnus
17649 will ask you whether you want to switch it back online again.
17650
17651 Let's take a typical Gnus session using the Agent.
17652
17653 @itemize @bullet
17654
17655 @item
17656 @findex gnus-unplugged
17657 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17658 Agent in a disconnected state.  You can read all the news that you have
17659 already fetched while in this mode.
17660
17661 @item
17662 You then decide to see whether any new news has arrived.  You connect
17663 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17664 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17665 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17666 Source Specifiers}).
17667
17668 @item
17669 You can then read the new news immediately, or you can download the
17670 news onto your local machine.  If you want to do the latter, you press
17671 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17672 all the eligible articles in all the groups.  (To let Gnus know which
17673 articles you want to download, @pxref{Agent Categories}).
17674
17675 @item
17676 After fetching the articles, you press @kbd{J j} to make Gnus become
17677 unplugged again, and you shut down the PPP thing (or whatever).  And
17678 then you read the news offline.
17679
17680 @item
17681 And then you go to step 2.
17682 @end itemize
17683
17684 Here are some things you should do the first time (or so) that you use
17685 the Agent.
17686
17687 @itemize @bullet
17688
17689 @item
17690 Decide which servers should be covered by the Agent.  If you have a mail
17691 back end, it would probably be nonsensical to have it covered by the
17692 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17693 @kbd{J a} on the server (or servers) that you wish to have covered by the
17694 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17695 added servers you do not wish to have covered by the Agent.  By default,
17696 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17697 @code{gnus-secondary-select-methods} are agentized.
17698
17699 @item
17700 Decide on download policy.  It's fairly simple once you decide whether
17701 you are going to use agent categories, topic parameters, and/or group
17702 parameters to implement your policy.  If you're new to gnus, it
17703 is probably best to start with a category, @xref{Agent Categories}.
17704
17705 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17706 (@pxref{Agent Categories}) provide for setting a policy that applies
17707 to multiple groups.  Which you use is entirely up to you.  Topic
17708 parameters do override categories so, if you mix the two, you'll have
17709 to take that into account.  If you have a few groups that deviate from
17710 your policy, you can use group parameters (@pxref{Group Parameters}) to
17711 configure them.
17712
17713 @item
17714 Uhm@dots{} that's it.
17715 @end itemize
17716
17717
17718 @node Agent Categories
17719 @subsection Agent Categories
17720
17721 One of the main reasons to integrate the news transport layer into the
17722 newsreader is to allow greater control over what articles to download.
17723 There's not much point in downloading huge amounts of articles, just to
17724 find out that you're not interested in reading any of them.  It's better
17725 to be somewhat more conservative in choosing what to download, and then
17726 mark the articles for downloading manually if it should turn out that
17727 you're interested in the articles anyway.
17728
17729 One of the more effective methods for controlling what is to be
17730 downloaded is to create a @dfn{category} and then assign some (or all)
17731 groups to this category.  Groups that do not belong in any other
17732 category belong to the @code{default} category.  Gnus has its own
17733 buffer for creating and managing categories.
17734
17735 If you prefer, you can also use group parameters (@pxref{Group
17736 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17737 alternative approach to controlling the agent.  The only real
17738 difference is that categories are specific to the agent (so there is
17739 less to learn) while group and topic parameters include the kitchen
17740 sink.
17741
17742 Since you can set agent parameters in several different places we have
17743 a rule to decide which source to believe.  This rule specifies that
17744 the parameter sources are checked in the following order: group
17745 parameters, topic parameters, agent category, and finally customizable
17746 variables.  So you can mix all of these sources to produce a wide range
17747 of behavior, just don't blame me if you don't remember where you put
17748 your settings.
17749
17750 @menu
17751 * Category Syntax::             What a category looks like.
17752 * Category Buffer::             A buffer for maintaining categories.
17753 * Category Variables::          Customize'r'Us.
17754 @end menu
17755
17756
17757 @node Category Syntax
17758 @subsubsection Category Syntax
17759
17760 A category consists of a name, the list of groups belonging to the
17761 category, and a number of optional parameters that override the
17762 customizable variables.  The complete list of agent parameters are
17763 listed below.
17764
17765 @cindex Agent Parameters
17766 @table @code
17767 @item agent-cat-name
17768 The name of the category.
17769
17770 @item agent-groups
17771 The list of groups that are in this category.
17772
17773 @item agent-predicate
17774 A predicate which (generally) gives a rough outline of which articles
17775 are eligible for downloading; and
17776
17777 @item agent-score-file
17778 a score rule which (generally) gives you a finer granularity when
17779 deciding what articles to download.  (Note that this @dfn{download
17780 score} is not necessarily related to normal scores.)
17781
17782 @item agent-enable-expiration
17783 a boolean indicating whether the agent should expire old articles in
17784 this group.  Most groups should be expired to conserve disk space.  In
17785 fact, its probably safe to say that the gnus.* hierarchy contains the
17786 only groups that should not be expired.
17787
17788 @item agent-days-until-old
17789 an integer indicating the number of days that the agent should wait
17790 before deciding that a read article is safe to expire.
17791
17792 @item agent-low-score
17793 an integer that overrides the value of @code{gnus-agent-low-score}.
17794
17795 @item agent-high-score
17796 an integer that overrides the value of @code{gnus-agent-high-score}.
17797
17798 @item agent-length-when-short
17799 an integer that overrides the value of
17800 @code{gnus-agent-short-article}.
17801
17802 @item agent-length-when-long
17803 an integer that overrides the value of @code{gnus-agent-long-article}.
17804
17805 @item agent-enable-undownloaded-faces
17806 a symbol indicating whether the summary buffer should display
17807 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
17808 faces.  Any symbol other than @code{nil} will enable the use of
17809 undownloaded faces.
17810 @end table
17811
17812 The name of a category can not be changed once the category has been
17813 created.
17814
17815 Each category maintains a list of groups that are exclusive members of
17816 that category.  The exclusivity rule is automatically enforced, add a
17817 group to a new category and it is automatically removed from its old
17818 category.
17819
17820 A predicate in its simplest form can be a single predicate such as
17821 @code{true} or @code{false}.  These two will download every available
17822 article or nothing respectively.  In the case of these two special
17823 predicates an additional score rule is superfluous.
17824
17825 Predicates of @code{high} or @code{low} download articles in respect of
17826 their scores in relationship to @code{gnus-agent-high-score} and
17827 @code{gnus-agent-low-score} as described below.
17828
17829 To gain even finer control of what is to be regarded eligible for
17830 download a predicate can consist of a number of predicates with logical
17831 operators sprinkled in between.
17832
17833 Perhaps some examples are in order.
17834
17835 Here's a simple predicate.  (It's the default predicate, in fact, used
17836 for all groups that don't belong to any other category.)
17837
17838 @lisp
17839 short
17840 @end lisp
17841
17842 Quite simple, eh?  This predicate is true if and only if the article is
17843 short (for some value of ``short'').
17844
17845 Here's a more complex predicate:
17846
17847 @lisp
17848 (or high
17849     (and
17850      (not low)
17851      (not long)))
17852 @end lisp
17853
17854 This means that an article should be downloaded if it has a high score,
17855 or if the score is not low and the article is not long.  You get the
17856 drift.
17857
17858 The available logical operators are @code{or}, @code{and} and
17859 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17860 @samp{|}, @code{&} and @code{!} instead.)
17861
17862 The following predicates are pre-defined, but if none of these fit what
17863 you want to do, you can write your own.
17864
17865 When evaluating each of these predicates, the named constant will be
17866 bound to the value determined by calling
17867 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17868 example, gnus-agent-short-article will be bound to
17869 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17870 means that you can specify a predicate in your category then tune that
17871 predicate to individual groups.
17872
17873 @table @code
17874 @item short
17875 True iff the article is shorter than @code{gnus-agent-short-article}
17876 lines; default 100.
17877
17878 @item long
17879 True iff the article is longer than @code{gnus-agent-long-article}
17880 lines; default 200.
17881
17882 @item low
17883 True iff the article has a download score less than
17884 @code{gnus-agent-low-score}; default 0.
17885
17886 @item high
17887 True iff the article has a download score greater than
17888 @code{gnus-agent-high-score}; default 0.
17889
17890 @item spam
17891 True iff the Gnus Agent guesses that the article is spam.  The
17892 heuristics may change over time, but at present it just computes a
17893 checksum and sees whether articles match.
17894
17895 @item true
17896 Always true.
17897
17898 @item false
17899 Always false.
17900 @end table
17901
17902 If you want to create your own predicate function, here's what you have
17903 to know:  The functions are called with no parameters, but the
17904 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17905 useful values.
17906
17907 For example, you could decide that you don't want to download articles
17908 that were posted more than a certain number of days ago (e.g. posted
17909 more than @code{gnus-agent-expire-days} ago) you might write a function
17910 something along the lines of the following:
17911
17912 @lisp
17913 (defun my-article-old-p ()
17914   "Say whether an article is old."
17915   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17916      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17917 @end lisp
17918
17919 with the predicate then defined as:
17920
17921 @lisp
17922 (not my-article-old-p)
17923 @end lisp
17924
17925 or you could append your predicate to the predefined
17926 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17927 wherever.
17928
17929 @lisp
17930 (require 'gnus-agent)
17931 (setq  gnus-category-predicate-alist
17932   (append gnus-category-predicate-alist
17933          '((old . my-article-old-p))))
17934 @end lisp
17935
17936 and simply specify your predicate as:
17937
17938 @lisp
17939 (not old)
17940 @end lisp
17941
17942 If/when using something like the above, be aware that there are many
17943 misconfigured systems/mailers out there and so an article's date is not
17944 always a reliable indication of when it was posted.  Hell, some people
17945 just don't give a damn.
17946
17947 The above predicates apply to @emph{all} the groups which belong to the
17948 category.  However, if you wish to have a specific predicate for an
17949 individual group within a category, or you're just too lazy to set up a
17950 new category, you can enter a group's individual predicate in its group
17951 parameters like so:
17952
17953 @lisp
17954 (agent-predicate . short)
17955 @end lisp
17956
17957 This is the group/topic parameter equivalent of the agent category default.
17958 Note that when specifying a single word predicate like this, the
17959 @code{agent-predicate} specification must be in dotted pair notation.
17960
17961 The equivalent of the longer example from above would be:
17962
17963 @lisp
17964 (agent-predicate or high (and (not low) (not long)))
17965 @end lisp
17966
17967 The outer parenthesis required in the category specification are not
17968 entered here as, not being in dotted pair notation, the value of the
17969 predicate is assumed to be a list.
17970
17971
17972 Now, the syntax of the download score is the same as the syntax of
17973 normal score files, except that all elements that require actually
17974 seeing the article itself are verboten.  This means that only the
17975 following headers can be scored on: @code{Subject}, @code{From},
17976 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17977 @code{Lines}, and @code{Xref}.
17978
17979 As with predicates, the specification of the @code{download score rule}
17980 to use in respect of a group can be in either the category definition if
17981 it's to be applicable to all groups in therein, or a group's parameters
17982 if it's to be specific to that group.
17983
17984 In both of these places the @code{download score rule} can take one of
17985 three forms:
17986
17987 @enumerate
17988 @item
17989 Score rule
17990
17991 This has the same syntax as a normal Gnus score file except only a
17992 subset of scoring keywords are available as mentioned above.
17993
17994 example:
17995
17996 @itemize @bullet
17997 @item
17998 Category specification
17999
18000 @lisp
18001 (("from"
18002        ("Lars Ingebrigtsen" 1000000 nil s))
18003 ("lines"
18004        (500 -100 nil <)))
18005 @end lisp
18006
18007 @item
18008 Group/Topic Parameter specification
18009
18010 @lisp
18011 (agent-score ("from"
18012                    ("Lars Ingebrigtsen" 1000000 nil s))
18013              ("lines"
18014                    (500 -100 nil <)))
18015 @end lisp
18016
18017 Again, note the omission of the outermost parenthesis here.
18018 @end itemize
18019
18020 @item
18021 Agent score file
18022
18023 These score files must @emph{only} contain the permitted scoring
18024 keywords stated above.
18025
18026 example:
18027
18028 @itemize @bullet
18029 @item
18030 Category specification
18031
18032 @lisp
18033 ("~/News/agent.SCORE")
18034 @end lisp
18035
18036 or perhaps
18037
18038 @lisp
18039 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
18040 @end lisp
18041
18042 @item
18043 Group Parameter specification
18044
18045 @lisp
18046 (agent-score "~/News/agent.SCORE")
18047 @end lisp
18048
18049 Additional score files can be specified as above.  Need I say anything
18050 about parenthesis?
18051 @end itemize
18052
18053 @item
18054 Use @code{normal} score files
18055
18056 If you don't want to maintain two sets of scoring rules for a group, and
18057 your desired @code{downloading} criteria for a group are the same as your
18058 @code{reading} criteria then you can tell the agent to refer to your
18059 @code{normal} score files when deciding what to download.
18060
18061 These directives in either the category definition or a group's
18062 parameters will cause the agent to read in all the applicable score
18063 files for a group, @emph{filtering out} those sections that do not
18064 relate to one of the permitted subset of scoring keywords.
18065
18066 @itemize @bullet
18067 @item
18068 Category Specification
18069
18070 @lisp
18071 file
18072 @end lisp
18073
18074 @item
18075 Group Parameter specification
18076
18077 @lisp
18078 (agent-score . file)
18079 @end lisp
18080 @end itemize
18081 @end enumerate
18082
18083 @node Category Buffer
18084 @subsubsection Category Buffer
18085
18086 You'd normally do all category maintenance from the category buffer.
18087 When you enter it for the first time (with the @kbd{J c} command from
18088 the group buffer), you'll only see the @code{default} category.
18089
18090 The following commands are available in this buffer:
18091
18092 @table @kbd
18093 @item q
18094 @kindex q (Category)
18095 @findex gnus-category-exit
18096 Return to the group buffer (@code{gnus-category-exit}).
18097
18098 @item e
18099 @kindex e (Category)
18100 @findex gnus-category-customize-category
18101 Use a customization buffer to set all of the selected category's
18102 parameters at one time (@code{gnus-category-customize-category}).
18103
18104 @item k
18105 @kindex k (Category)
18106 @findex gnus-category-kill
18107 Kill the current category (@code{gnus-category-kill}).
18108
18109 @item c
18110 @kindex c (Category)
18111 @findex gnus-category-copy
18112 Copy the current category (@code{gnus-category-copy}).
18113
18114 @item a
18115 @kindex a (Category)
18116 @findex gnus-category-add
18117 Add a new category (@code{gnus-category-add}).
18118
18119 @item p
18120 @kindex p (Category)
18121 @findex gnus-category-edit-predicate
18122 Edit the predicate of the current category
18123 (@code{gnus-category-edit-predicate}).
18124
18125 @item g
18126 @kindex g (Category)
18127 @findex gnus-category-edit-groups
18128 Edit the list of groups belonging to the current category
18129 (@code{gnus-category-edit-groups}).
18130
18131 @item s
18132 @kindex s (Category)
18133 @findex gnus-category-edit-score
18134 Edit the download score rule of the current category
18135 (@code{gnus-category-edit-score}).
18136
18137 @item l
18138 @kindex l (Category)
18139 @findex gnus-category-list
18140 List all the categories (@code{gnus-category-list}).
18141 @end table
18142
18143
18144 @node Category Variables
18145 @subsubsection Category Variables
18146
18147 @table @code
18148 @item gnus-category-mode-hook
18149 @vindex gnus-category-mode-hook
18150 Hook run in category buffers.
18151
18152 @item gnus-category-line-format
18153 @vindex gnus-category-line-format
18154 Format of the lines in the category buffer (@pxref{Formatting
18155 Variables}).  Valid elements are:
18156
18157 @table @samp
18158 @item c
18159 The name of the category.
18160
18161 @item g
18162 The number of groups in the category.
18163 @end table
18164
18165 @item gnus-category-mode-line-format
18166 @vindex gnus-category-mode-line-format
18167 Format of the category mode line (@pxref{Mode Line Formatting}).
18168
18169 @item gnus-agent-short-article
18170 @vindex gnus-agent-short-article
18171 Articles that have fewer lines than this are short.  Default 100.
18172
18173 @item gnus-agent-long-article
18174 @vindex gnus-agent-long-article
18175 Articles that have more lines than this are long.  Default 200.
18176
18177 @item gnus-agent-low-score
18178 @vindex gnus-agent-low-score
18179 Articles that have a score lower than this have a low score.  Default
18180 0.
18181
18182 @item gnus-agent-high-score
18183 @vindex gnus-agent-high-score
18184 Articles that have a score higher than this have a high score.  Default
18185 0.
18186
18187 @item gnus-agent-expire-days
18188 @vindex gnus-agent-expire-days
18189 The number of days that a @samp{read} article must stay in the agent's
18190 local disk before becoming eligible for expiration (While the name is
18191 the same, this doesn't mean expiring the article on the server.  It
18192 just means deleting the local copy of the article).  What is also
18193 important to understand is that the counter starts with the time the
18194 article was written to the local disk and not the time the article was
18195 read.
18196 Default 7.
18197
18198 @item gnus-agent-enable-expiration
18199 @vindex gnus-agent-enable-expiration
18200 Determines whether articles in a group are, by default, expired or
18201 retained indefinitely.  The default is @code{ENABLE} which means that
18202 you'll have to disable expiration when desired.  On the other hand,
18203 you could set this to @code{DISABLE}.  In that case, you would then
18204 have to enable expiration in selected groups.
18205
18206 @end table
18207
18208
18209 @node Agent Commands
18210 @subsection Agent Commands
18211 @findex gnus-agent-toggle-plugged
18212 @kindex J j (Agent)
18213
18214 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
18215 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
18216 toggles the plugged/unplugged state of the Gnus Agent.
18217
18218
18219 @menu
18220 * Group Agent Commands::        Configure groups and fetch their contents.
18221 * Summary Agent Commands::      Manually select then fetch specific articles.
18222 * Server Agent Commands::       Select the servers that are supported by the agent.
18223 @end menu
18224
18225
18226
18227
18228 @node Group Agent Commands
18229 @subsubsection Group Agent Commands
18230
18231 @table @kbd
18232 @item J u
18233 @kindex J u (Agent Group)
18234 @findex gnus-agent-fetch-groups
18235 Fetch all eligible articles in the current group
18236 (@code{gnus-agent-fetch-groups}).
18237
18238 @item J c
18239 @kindex J c (Agent Group)
18240 @findex gnus-enter-category-buffer
18241 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18242
18243 @item J s
18244 @kindex J s (Agent Group)
18245 @findex gnus-agent-fetch-session
18246 Fetch all eligible articles in all groups
18247 (@code{gnus-agent-fetch-session}).
18248
18249 @item J S
18250 @kindex J S (Agent Group)
18251 @findex gnus-group-send-queue
18252 Send all sendable messages in the queue group
18253 (@code{gnus-group-send-queue}).  @xref{Drafts}.
18254
18255 @item J a
18256 @kindex J a (Agent Group)
18257 @findex gnus-agent-add-group
18258 Add the current group to an Agent category
18259 (@code{gnus-agent-add-group}).  This command understands the
18260 process/prefix convention (@pxref{Process/Prefix}).
18261
18262 @item J r
18263 @kindex J r (Agent Group)
18264 @findex gnus-agent-remove-group
18265 Remove the current group from its category, if any
18266 (@code{gnus-agent-remove-group}).  This command understands the
18267 process/prefix convention (@pxref{Process/Prefix}).
18268
18269 @item J Y
18270 @kindex J Y (Agent Group)
18271 @findex gnus-agent-synchronize-flags
18272 Synchronize flags changed while unplugged with remote server, if any.
18273
18274
18275 @end table
18276
18277
18278 @node Summary Agent Commands
18279 @subsubsection Summary Agent Commands
18280
18281 @table @kbd
18282 @item J #
18283 @kindex J # (Agent Summary)
18284 @findex gnus-agent-mark-article
18285 Mark the article for downloading (@code{gnus-agent-mark-article}).
18286
18287 @item J M-#
18288 @kindex J M-# (Agent Summary)
18289 @findex gnus-agent-unmark-article
18290 Remove the downloading mark from the article
18291 (@code{gnus-agent-unmark-article}).
18292
18293 @cindex %
18294 @item @@
18295 @kindex @@ (Agent Summary)
18296 @findex gnus-agent-toggle-mark
18297 Toggle whether to download the article
18298 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18299 default.
18300
18301 @item J c
18302 @kindex J c (Agent Summary)
18303 @findex gnus-agent-catchup
18304 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18305
18306 @item J S
18307 @kindex J S (Agent Summary)
18308 @findex gnus-agent-fetch-group
18309 Download all eligible (@pxref{Agent Categories}) articles in this group.
18310 (@code{gnus-agent-fetch-group}).
18311
18312 @item J s
18313 @kindex J s (Agent Summary)
18314 @findex gnus-agent-fetch-series
18315 Download all processable articles in this group.
18316 (@code{gnus-agent-fetch-series}).
18317
18318 @item J u
18319 @kindex J u (Agent Summary)
18320 @findex gnus-agent-summary-fetch-group
18321 Download all downloadable articles in the current group
18322 (@code{gnus-agent-summary-fetch-group}).
18323
18324 @end table
18325
18326
18327 @node Server Agent Commands
18328 @subsubsection Server Agent Commands
18329
18330 @table @kbd
18331 @item J a
18332 @kindex J a (Agent Server)
18333 @findex gnus-agent-add-server
18334 Add the current server to the list of servers covered by the Gnus Agent
18335 (@code{gnus-agent-add-server}).
18336
18337 @item J r
18338 @kindex J r (Agent Server)
18339 @findex gnus-agent-remove-server
18340 Remove the current server from the list of servers covered by the Gnus
18341 Agent (@code{gnus-agent-remove-server}).
18342
18343 @end table
18344
18345
18346 @node Agent Visuals
18347 @subsection Agent Visuals
18348
18349 If you open a summary while unplugged and, Gnus knows from the group's
18350 active range that there are more articles than the headers currently
18351 stored in the Agent, you may see some articles whose subject looks
18352 something like @samp{[Undownloaded article #####]}.  These are
18353 placeholders for the missing headers.  Aside from setting a mark,
18354 there is not much that can be done with one of these placeholders.
18355 When Gnus finally gets a chance to fetch the group's headers, the
18356 placeholders will automatically be replaced by the actual headers.
18357 You can configure the summary buffer's maneuvering to skip over the
18358 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18359
18360 While it may be obvious to all, the only headers and articles
18361 available while unplugged are those headers and articles that were
18362 fetched into the Agent while previously plugged.  To put it another
18363 way, ``If you forget to fetch something while plugged, you might have a
18364 less than satisfying unplugged session''.  For this reason, the Agent
18365 adds two visual effects to your summary buffer.  These effects display
18366 the download status of each article so that you always know which
18367 articles will be available when unplugged.
18368
18369 The first visual effect is the @samp{%O} spec.  If you customize
18370 @code{gnus-summary-line-format} to include this specifier, you will add
18371 a single character field that indicates an article's download status.
18372 Articles that have been fetched into either the Agent or the Cache,
18373 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18374 other articles will display @code{gnus-undownloaded-mark} (defaults to
18375 @samp{-}).  If you open a group that has not been agentized, a space
18376 (@samp{ }) will be displayed.
18377
18378 The second visual effect are the undownloaded faces.  The faces, there
18379 are three indicating the article's score (low, normal, high), seem to
18380 result in a love/hate response from many Gnus users.  The problem is
18381 that the face selection is controlled by a list of condition tests and
18382 face names (See @code{gnus-summary-highlight}).  Each condition is
18383 tested in the order in which it appears in the list so early
18384 conditions have precedence over later conditions.  All of this means
18385 that, if you tick an undownloaded article, the article will continue
18386 to be displayed in the undownloaded face rather than the ticked face.
18387
18388 If you use the Agent as a cache (to avoid downloading the same article
18389 each time you visit it or to minimize your connection time), the
18390 undownloaded face will probably seem like a good idea.  The reason
18391 being that you do all of our work (marking, reading, deleting) with
18392 downloaded articles so the normal faces always appear.  For those
18393 users using the agent to improve online performance by caching the NOV
18394 database (most users since 5.10.2), the undownloaded faces may appear
18395 to be an absolutely horrible idea.  The issue being that, since none
18396 of their articles have been fetched into the Agent, all of the
18397 normal faces will be obscured by the undownloaded faces.
18398
18399 If you would like to use the undownloaded faces, you must enable the
18400 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
18401 group parameter to t.  This parameter, like all other agent
18402 parameters, may be set on an Agent Category (@pxref{Agent
18403 Categories}), a Group Topic (@pxref{Topic Parameters}), or an
18404 individual group (@pxref{Group Parameters}).
18405
18406 The one problem common to all users using the agent is how quickly it
18407 can consume disk space.  If you using the agent on many groups, it is
18408 even more difficult to effectively recover disk space.  One solution
18409 is the @samp{%F} format available in @code{gnus-group-line-format}.
18410 This format will display the actual disk space used by articles
18411 fetched into both the agent and cache.  By knowing which groups use
18412 the most space, users know where to focus their efforts when ``agent
18413 expiring'' articles.
18414
18415 @node Agent as Cache
18416 @subsection Agent as Cache
18417
18418 When Gnus is plugged, it is not efficient to download headers or
18419 articles from the server again, if they are already stored in the
18420 Agent.  So, Gnus normally only downloads headers once, and stores them
18421 in the Agent.  These headers are later used when generating the summary
18422 buffer, regardless of whether you are plugged or unplugged.  Articles
18423 are not cached in the Agent by default though (that would potentially
18424 consume lots of disk space), but if you have already downloaded an
18425 article into the Agent, Gnus will not download the article from the
18426 server again but use the locally stored copy instead.
18427
18428 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18429 @pxref{Agent Variables}) to always download headers and articles while
18430 plugged.  Gnus will almost certainly be slower, but it will be kept
18431 synchronized with the server.  That last point probably won't make any
18432 sense if you are using a nntp or nnimap back end.
18433
18434 @node Agent Expiry
18435 @subsection Agent Expiry
18436
18437 @vindex gnus-agent-expire-days
18438 @findex gnus-agent-expire
18439 @kindex M-x gnus-agent-expire
18440 @kindex M-x gnus-agent-expire-group
18441 @findex gnus-agent-expire-group
18442 @cindex agent expiry
18443 @cindex Gnus agent expiry
18444 @cindex expiry
18445
18446 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18447 least it doesn't handle it like other back ends.  Instead, there are
18448 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18449 commands that will expire all read articles that are older than
18450 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18451 that you're running out of space.  Neither are particularly fast or
18452 efficient, and it's not a particularly good idea to interrupt them (with
18453 @kbd{C-g} or anything else) once you've started one of them.
18454
18455 Note that other functions, e.g. @code{gnus-request-expire-articles},
18456 might run @code{gnus-agent-expire} for you to keep the agent
18457 synchronized with the group.
18458
18459 The agent parameter @code{agent-enable-expiration} may be used to
18460 prevent expiration in selected groups.
18461
18462 @vindex gnus-agent-expire-all
18463 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18464 expiration commands will expire all articles---unread, read, ticked
18465 and dormant.  If @code{nil} (which is the default), only read articles
18466 are eligible for expiry, and unread, ticked and dormant articles will
18467 be kept indefinitely.
18468
18469 If you find that some articles eligible for expiry are never expired,
18470 perhaps some Gnus Agent files are corrupted.  There's are special
18471 commands, @code{gnus-agent-regenerate} and
18472 @code{gnus-agent-regenerate-group}, to fix possible problems.
18473
18474 @node Agent Regeneration
18475 @subsection Agent Regeneration
18476
18477 @cindex agent regeneration
18478 @cindex Gnus agent regeneration
18479 @cindex regeneration
18480
18481 The local data structures used by @code{nnagent} may become corrupted
18482 due to certain exceptional conditions.  When this happens,
18483 @code{nnagent} functionality may degrade or even fail.  The solution
18484 to this problem is to repair the local data structures by removing all
18485 internal inconsistencies.
18486
18487 For example, if your connection to your server is lost while
18488 downloaded articles into the agent, the local data structures will not
18489 know about articles successfully downloaded prior to the connection
18490 failure.  Running @code{gnus-agent-regenerate} or
18491 @code{gnus-agent-regenerate-group} will update the data structures
18492 such that you don't need to download these articles a second time.
18493
18494 @findex gnus-agent-regenerate
18495 @kindex M-x gnus-agent-regenerate
18496 The command @code{gnus-agent-regenerate} will perform
18497 @code{gnus-agent-regenerate-group} on every agentized group.  While
18498 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18499 recommended that you first close all summary buffers.
18500
18501 @findex gnus-agent-regenerate-group
18502 @kindex M-x gnus-agent-regenerate-group
18503 The command @code{gnus-agent-regenerate-group} uses the local copies
18504 of individual articles to repair the local @acronym{NOV}(header) database.  It
18505 then updates the internal data structures that document which articles
18506 are stored locally.  An optional argument will mark articles in the
18507 agent as unread.
18508
18509 @node Agent and IMAP
18510 @subsection Agent and IMAP
18511
18512 The Agent works with any Gnus back end, including nnimap.  However,
18513 since there are some conceptual differences between @acronym{NNTP} and
18514 @acronym{IMAP}, this section (should) provide you with some information to
18515 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18516
18517 The first thing to keep in mind is that all flags (read, ticked, etc)
18518 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18519 case for nntp.  Thus Gnus need to remember flag changes when
18520 disconnected, and synchronize these flags when you plug back in.
18521
18522 Gnus keeps track of flag changes when reading nnimap groups under the
18523 Agent.  When you plug back in, Gnus will check if you have any changed
18524 any flags and ask if you wish to synchronize these with the server.
18525 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18526
18527 @vindex gnus-agent-synchronize-flags
18528 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18529 never automatically synchronize flags.  If it is @code{ask}, which is
18530 the default, the Agent will check if you made any changes and if so
18531 ask if you wish to synchronize these when you re-connect.  If it has
18532 any other value, all flags will be synchronized automatically.
18533
18534 If you do not wish to synchronize flags automatically when you
18535 re-connect, you can do it manually with the
18536 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18537 in the group buffer.
18538
18539 Some things are currently not implemented in the Agent that you'd might
18540 expect from a disconnected @acronym{IMAP} client, including:
18541
18542 @itemize @bullet
18543
18544 @item
18545 Copying/moving articles into nnimap groups when unplugged.
18546
18547 @item
18548 Creating/deleting nnimap groups when unplugged.
18549
18550 @end itemize
18551
18552 Technical note: the synchronization algorithm does not work by ``pushing''
18553 all local flags to the server, but rather incrementally update the
18554 server view of flags by changing only those flags that were changed by
18555 the user.  Thus, if you set one flag on an article, quit the group and
18556 re-select the group and remove the flag; the flag will be set and
18557 removed from the server when you ``synchronize''.  The queued flag
18558 operations can be found in the per-server @code{flags} file in the Agent
18559 directory.  It's emptied when you synchronize flags.
18560
18561
18562 @node Outgoing Messages
18563 @subsection Outgoing Messages
18564
18565 By default, when Gnus is unplugged, all outgoing messages (both mail
18566 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
18567 You can view them there after posting, and edit them at will.
18568
18569 You can control the circumstances under which outgoing mail is queued
18570 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
18571 news is always queued when Gnus is unplugged, and never otherwise.
18572
18573 You can send the messages either from the draft group with the special
18574 commands available there, or you can use the @kbd{J S} command in the
18575 group buffer to send all the sendable messages in the draft group.
18576 Posting news will only work when Gnus is plugged, but you can send
18577 mail at any time.
18578
18579 If sending mail while unplugged does not work for you and you worry
18580 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
18581 ask you to confirm your action (see
18582 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
18583
18584 @node Agent Variables
18585 @subsection Agent Variables
18586
18587 @table @code
18588 @item gnus-agent
18589 @vindex gnus-agent
18590 Is the agent enabled?  The default is @code{t}.  When first enabled,
18591 the agent will use @code{gnus-agent-auto-agentize-methods} to
18592 automatically mark some backends as agentized.  You may change which
18593 backends are agentized using the agent commands in the server buffer.
18594
18595 To enter the server buffer, use the @kbd{^}
18596 (@code{gnus-group-enter-server-mode}) command in the group buffer.
18597
18598
18599 @item gnus-agent-directory
18600 @vindex gnus-agent-directory
18601 Where the Gnus Agent will store its files.  The default is
18602 @file{~/News/agent/}.
18603
18604 @item gnus-agent-handle-level
18605 @vindex gnus-agent-handle-level
18606 Groups on levels (@pxref{Group Levels}) higher than this variable will
18607 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18608 which means that only subscribed group will be considered by the Agent
18609 by default.
18610
18611 @item gnus-agent-plugged-hook
18612 @vindex gnus-agent-plugged-hook
18613 Hook run when connecting to the network.
18614
18615 @item gnus-agent-unplugged-hook
18616 @vindex gnus-agent-unplugged-hook
18617 Hook run when disconnecting from the network.
18618
18619 @item gnus-agent-fetched-hook
18620 @vindex gnus-agent-fetched-hook
18621 Hook run when finished fetching articles.
18622
18623 @item gnus-agent-cache
18624 @vindex gnus-agent-cache
18625 Variable to control whether use the locally stored @acronym{NOV} and
18626 articles when plugged, e.g. essentially using the Agent as a cache.
18627 The default is non-@code{nil}, which means to use the Agent as a cache.
18628
18629 @item gnus-agent-go-online
18630 @vindex gnus-agent-go-online
18631 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18632 automatically switch offline servers into online status.  If it is
18633 @code{ask}, the default, the Agent will ask if you wish to switch
18634 offline servers into online status when you re-connect.  If it has any
18635 other value, all offline servers will be automatically switched into
18636 online status.
18637
18638 @item gnus-agent-mark-unread-after-downloaded
18639 @vindex gnus-agent-mark-unread-after-downloaded
18640 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18641 mark articles as unread after downloading.  This is usually a safe
18642 thing to do as the newly downloaded article has obviously not been
18643 read.  The default is t.
18644
18645 @item gnus-agent-consider-all-articles
18646 @vindex gnus-agent-consider-all-articles
18647 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18648 agent will let the agent predicate decide whether articles need to be
18649 downloaded or not, for all articles.  When @code{nil}, the default,
18650 the agent will only let the predicate decide whether unread articles
18651 are downloaded or not.  If you enable this, you may also want to look
18652 into the agent expiry settings (@pxref{Category Variables}), so that
18653 the agent doesn't download articles which the agent will later expire,
18654 over and over again.
18655
18656 @item gnus-agent-max-fetch-size
18657 @vindex gnus-agent-max-fetch-size
18658 The agent fetches articles into a temporary buffer prior to parsing
18659 them into individual files.  To avoid exceeding the max. buffer size,
18660 the agent alternates between fetching and parsing until all articles
18661 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18662 limit to control how often the cycling occurs.  A large value improves
18663 performance.  A small value minimizes the time lost should the
18664 connection be lost while fetching (You may need to run
18665 @code{gnus-agent-regenerate-group} to update the group's state.
18666 However, all articles parsed prior to loosing the connection will be
18667 available while unplugged).  The default is 10M so it is unusual to
18668 see any cycling.
18669
18670 @item gnus-server-unopen-status
18671 @vindex gnus-server-unopen-status
18672 Perhaps not an Agent variable, but closely related to the Agent, this
18673 variable says what will happen if Gnus cannot open a server.  If the
18674 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18675 whether to deny the server or whether to unplug the agent.  If the
18676 Agent is disabled, Gnus always simply deny the server.  Other choices
18677 for this variable include @code{denied} and @code{offline} the latter
18678 is only valid if the Agent is used.
18679
18680 @item gnus-auto-goto-ignores
18681 @vindex gnus-auto-goto-ignores
18682 Another variable that isn't an Agent variable, yet so closely related
18683 that most will look for it here, this variable tells the summary
18684 buffer how to maneuver around undownloaded (only headers stored in the
18685 agent) and unfetched (neither article nor headers stored) articles.
18686
18687 The legal values are @code{nil} (maneuver to any article),
18688 @code{undownloaded} (maneuvering while unplugged ignores articles that
18689 have not been fetched), @code{always-undownloaded} (maneuvering always
18690 ignores articles that have not been fetched), @code{unfetched}
18691 (maneuvering ignores articles whose headers have not been fetched).
18692
18693 @item gnus-agent-queue-mail
18694 @vindex gnus-agent-queue-mail
18695 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
18696 queue mail rather than sending it straight away.  When @code{t}, Gnus
18697 will queue mail when unplugged only.  When @code{nil}, never queue
18698 mail.  The default is @code{t}.
18699
18700 @item gnus-agent-prompt-send-queue
18701 @vindex gnus-agent-prompt-send-queue
18702 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
18703 prompt you to confirm that you really wish to proceed if you hit
18704 @kbd{J S} while unplugged.  The default is @code{nil}.
18705
18706 @item gnus-agent-auto-agentize-methods
18707 @vindex gnus-agent-auto-agentize-methods
18708 If you have never used the Agent before (or more technically, if
18709 @file{~/News/agent/lib/servers} does not exist), Gnus will
18710 automatically agentize a few servers for you.  This variable control
18711 which backends should be auto-agentized.  It is typically only useful
18712 to agentize remote backends.  The auto-agentizing has the same effect
18713 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
18714 If the file exist, you must manage the servers manually by adding or
18715 removing them, this variable is only applicable the first time you
18716 start Gnus.  The default is @samp{(nntp nnimap)}.
18717
18718 @end table
18719
18720
18721 @node Example Setup
18722 @subsection Example Setup
18723
18724 If you don't want to read this manual, and you have a fairly standard
18725 setup, you may be able to use something like the following as your
18726 @file{~/.gnus.el} file to get started.
18727
18728 @lisp
18729 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18730 ;;; @r{from your ISP's server.}
18731 (setq gnus-select-method '(nntp "news.your-isp.com"))
18732
18733 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18734 ;;; @r{your ISP's @acronym{POP} server.}
18735 (setq mail-sources '((pop :server "pop.your-isp.com")))
18736
18737 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18738 (setq gnus-secondary-select-methods '((nnml "")))
18739
18740 ;;; @r{Make Gnus into an offline newsreader.}
18741 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18742 ;;; (setq gnus-agent t) ; @r{Now the default.}
18743 @end lisp
18744
18745 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18746 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18747 gnus}.
18748
18749 If this is the first time you've run Gnus, you will be subscribed
18750 automatically to a few default newsgroups.  You'll probably want to
18751 subscribe to more groups, and to do that, you have to query the
18752 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18753 command.  This usually takes quite a while, but you only have to do it
18754 once.
18755
18756 After reading and parsing a while, you'll be presented with a list of
18757 groups.  Subscribe to the ones you want to read with the @kbd{u}
18758 command.  @kbd{l} to make all the killed groups disappear after you've
18759 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18760 back all the killed groups.)
18761
18762 You can now read the groups at once, or you can download the articles
18763 with the @kbd{J s} command.  And then read the rest of this manual to
18764 find out which of the other gazillion things you want to customize.
18765
18766
18767 @node Batching Agents
18768 @subsection Batching Agents
18769 @findex gnus-agent-batch
18770
18771 Having the Gnus Agent fetch articles (and post whatever messages you've
18772 written) is quite easy once you've gotten things set up properly.  The
18773 following shell script will do everything that is necessary:
18774
18775 You can run a complete batch command from the command line with the
18776 following incantation:
18777
18778 @example
18779 #!/bin/sh
18780 emacs -batch -l ~/.emacs -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18781 @end example
18782
18783
18784 @node Agent Caveats
18785 @subsection Agent Caveats
18786
18787 The Gnus Agent doesn't seem to work like most other offline
18788 newsreaders.  Here are some common questions that some imaginary people
18789 may ask:
18790
18791 @table @dfn
18792 @item If I read an article while plugged, do they get entered into the Agent?
18793
18794 @strong{No}.  If you want this behaviour, add
18795 @code{gnus-agent-fetch-selected-article} to
18796 @code{gnus-select-article-hook}.
18797
18798 @item If I read an article while plugged, and the article already exists in
18799 the Agent, will it get downloaded once more?
18800
18801 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18802
18803 @end table
18804
18805 In short, when Gnus is unplugged, it only looks into the locally stored
18806 articles; when it's plugged, it talks to your ISP and may also use the
18807 locally stored articles.
18808
18809
18810 @node Scoring
18811 @chapter Scoring
18812 @cindex scoring
18813
18814 Other people use @dfn{kill files}, but we here at Gnus Towers like
18815 scoring better than killing, so we'd rather switch than fight.  They do
18816 something completely different as well, so sit up straight and pay
18817 attention!
18818
18819 @vindex gnus-summary-mark-below
18820 All articles have a default score (@code{gnus-summary-default-score}),
18821 which is 0 by default.  This score may be raised or lowered either
18822 interactively or by score files.  Articles that have a score lower than
18823 @code{gnus-summary-mark-below} are marked as read.
18824
18825 Gnus will read any @dfn{score files} that apply to the current group
18826 before generating the summary buffer.
18827
18828 There are several commands in the summary buffer that insert score
18829 entries based on the current article.  You can, for instance, ask Gnus to
18830 lower or increase the score of all articles with a certain subject.
18831
18832 There are two sorts of scoring entries: Permanent and temporary.
18833 Temporary score entries are self-expiring entries.  Any entries that are
18834 temporary and have not been used for, say, a week, will be removed
18835 silently to help keep the sizes of the score files down.
18836
18837 @menu
18838 * Summary Score Commands::      Adding score entries for the current group.
18839 * Group Score Commands::        General score commands.
18840 * Score Variables::             Customize your scoring.  (My, what terminology).
18841 * Score File Format::           What a score file may contain.
18842 * Score File Editing::          You can edit score files by hand as well.
18843 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18844 * Home Score File::             How to say where new score entries are to go.
18845 * Followups To Yourself::       Having Gnus notice when people answer you.
18846 * Scoring On Other Headers::    Scoring on non-standard headers.
18847 * Scoring Tips::                How to score effectively.
18848 * Reverse Scoring::             That problem child of old is not problem.
18849 * Global Score Files::          Earth-spanning, ear-splitting score files.
18850 * Kill Files::                  They are still here, but they can be ignored.
18851 * Converting Kill Files::       Translating kill files to score files.
18852 * Advanced Scoring::            Using logical expressions to build score rules.
18853 * Score Decays::                It can be useful to let scores wither away.
18854 @end menu
18855
18856
18857 @node Summary Score Commands
18858 @section Summary Score Commands
18859 @cindex score commands
18860
18861 The score commands that alter score entries do not actually modify real
18862 score files.  That would be too inefficient.  Gnus maintains a cache of
18863 previously loaded score files, one of which is considered the
18864 @dfn{current score file alist}.  The score commands simply insert
18865 entries into this list, and upon group exit, this list is saved.
18866
18867 The current score file is by default the group's local score file, even
18868 if no such score file actually exists.  To insert score commands into
18869 some other score file (e.g. @file{all.SCORE}), you must first make this
18870 score file the current one.
18871
18872 General score commands that don't actually change the score file:
18873
18874 @table @kbd
18875
18876 @item V s
18877 @kindex V s (Summary)
18878 @findex gnus-summary-set-score
18879 Set the score of the current article (@code{gnus-summary-set-score}).
18880
18881 @item V S
18882 @kindex V S (Summary)
18883 @findex gnus-summary-current-score
18884 Display the score of the current article
18885 (@code{gnus-summary-current-score}).
18886
18887 @item V t
18888 @kindex V t (Summary)
18889 @findex gnus-score-find-trace
18890 Display all score rules that have been used on the current article
18891 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18892 may type @kbd{e} to edit score file corresponding to the score rule on
18893 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
18894 score file and edit it.
18895
18896 @item V w
18897 @kindex V w (Summary)
18898 @findex gnus-score-find-favourite-words
18899 List words used in scoring (@code{gnus-score-find-favourite-words}).
18900
18901 @item V R
18902 @kindex V R (Summary)
18903 @findex gnus-summary-rescore
18904 Run the current summary through the scoring process
18905 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18906 around with your score files behind Gnus' back and want to see the
18907 effect you're having.
18908
18909 @item V c
18910 @kindex V c (Summary)
18911 @findex gnus-score-change-score-file
18912 Make a different score file the current
18913 (@code{gnus-score-change-score-file}).
18914
18915 @item V e
18916 @kindex V e (Summary)
18917 @findex gnus-score-edit-current-scores
18918 Edit the current score file (@code{gnus-score-edit-current-scores}).
18919 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18920 File Editing}).
18921
18922 @item V f
18923 @kindex V f (Summary)
18924 @findex gnus-score-edit-file
18925 Edit a score file and make this score file the current one
18926 (@code{gnus-score-edit-file}).
18927
18928 @item V F
18929 @kindex V F (Summary)
18930 @findex gnus-score-flush-cache
18931 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18932 after editing score files.
18933
18934 @item V C
18935 @kindex V C (Summary)
18936 @findex gnus-score-customize
18937 Customize a score file in a visually pleasing manner
18938 (@code{gnus-score-customize}).
18939
18940 @end table
18941
18942 The rest of these commands modify the local score file.
18943
18944 @table @kbd
18945
18946 @item V m
18947 @kindex V m (Summary)
18948 @findex gnus-score-set-mark-below
18949 Prompt for a score, and mark all articles with a score below this as
18950 read (@code{gnus-score-set-mark-below}).
18951
18952 @item V x
18953 @kindex V x (Summary)
18954 @findex gnus-score-set-expunge-below
18955 Prompt for a score, and add a score rule to the current score file to
18956 expunge all articles below this score
18957 (@code{gnus-score-set-expunge-below}).
18958 @end table
18959
18960 The keystrokes for actually making score entries follow a very regular
18961 pattern, so there's no need to list all the commands.  (Hundreds of
18962 them.)
18963
18964 @findex gnus-summary-increase-score
18965 @findex gnus-summary-lower-score
18966
18967 @enumerate
18968 @item
18969 The first key is either @kbd{I} (upper case i) for increasing the score
18970 or @kbd{L} for lowering the score.
18971 @item
18972 The second key says what header you want to score on.  The following
18973 keys are available:
18974 @table @kbd
18975
18976 @item a
18977 Score on the author name.
18978
18979 @item s
18980 Score on the subject line.
18981
18982 @item x
18983 Score on the @code{Xref} line---i.e., the cross-posting line.
18984
18985 @item r
18986 Score on the @code{References} line.
18987
18988 @item d
18989 Score on the date.
18990
18991 @item l
18992 Score on the number of lines.
18993
18994 @item i
18995 Score on the @code{Message-ID} header.
18996
18997 @item e
18998 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18999 if your @acronym{NNTP} server tracks additional header data in overviews.
19000
19001 @item f
19002 Score on followups---this matches the author name, and adds scores to
19003 the followups to this author.  (Using this key leads to the creation of
19004 @file{ADAPT} files.)
19005
19006 @item b
19007 Score on the body.
19008
19009 @item h
19010 Score on the head.
19011
19012 @item t
19013 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
19014 files.)
19015
19016 @end table
19017
19018 @item
19019 The third key is the match type.  Which match types are valid depends on
19020 what headers you are scoring on.
19021
19022 @table @code
19023
19024 @item strings
19025
19026 @table @kbd
19027
19028 @item e
19029 Exact matching.
19030
19031 @item s
19032 Substring matching.
19033
19034 @item f
19035 Fuzzy matching (@pxref{Fuzzy Matching}).
19036
19037 @item r
19038 Regexp matching
19039 @end table
19040
19041 @item date
19042 @table @kbd
19043
19044 @item b
19045 Before date.
19046
19047 @item a
19048 After date.
19049
19050 @item n
19051 This date.
19052 @end table
19053
19054 @item number
19055 @table @kbd
19056
19057 @item <
19058 Less than number.
19059
19060 @item =
19061 Equal to number.
19062
19063 @item >
19064 Greater than number.
19065 @end table
19066 @end table
19067
19068 @item
19069 The fourth and usually final key says whether this is a temporary (i.e.,
19070 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
19071 or whether it is to be done immediately, without adding to the score
19072 file.
19073 @table @kbd
19074
19075 @item t
19076 Temporary score entry.
19077
19078 @item p
19079 Permanent score entry.
19080
19081 @item i
19082 Immediately scoring.
19083 @end table
19084
19085 @item
19086 If you are scoring on `e' (extra) headers, you will then be prompted for
19087 the header name on which you wish to score.  This must be a header named
19088 in gnus-extra-headers, and @samp{TAB} completion is available.
19089
19090 @end enumerate
19091
19092 So, let's say you want to increase the score on the current author with
19093 exact matching permanently: @kbd{I a e p}.  If you want to lower the
19094 score based on the subject line, using substring matching, and make a
19095 temporary score entry: @kbd{L s s t}.  Pretty easy.
19096
19097 To make things a bit more complicated, there are shortcuts.  If you use
19098 a capital letter on either the second or third keys, Gnus will use
19099 defaults for the remaining one or two keystrokes.  The defaults are
19100 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
19101 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
19102
19103 These functions take both the numerical prefix and the symbolic prefix
19104 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
19105 (or increase) the score of the article.  A symbolic prefix of @code{a}
19106 says to use the @file{all.SCORE} file for the command instead of the
19107 current score file.
19108
19109 @vindex gnus-score-mimic-keymap
19110 The @code{gnus-score-mimic-keymap} says whether these commands will
19111 pretend they are keymaps or not.
19112
19113
19114 @node Group Score Commands
19115 @section Group Score Commands
19116 @cindex group score commands
19117
19118 There aren't many of these as yet, I'm afraid.
19119
19120 @table @kbd
19121
19122 @item W e
19123 @kindex W e (Group)
19124 @findex gnus-score-edit-all-score
19125 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
19126 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
19127
19128 @item W f
19129 @kindex W f (Group)
19130 @findex gnus-score-flush-cache
19131 Gnus maintains a cache of score alists to avoid having to reload them
19132 all the time.  This command will flush the cache
19133 (@code{gnus-score-flush-cache}).
19134
19135 @end table
19136
19137 You can do scoring from the command line by saying something like:
19138
19139 @findex gnus-batch-score
19140 @cindex batch scoring
19141 @example
19142 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
19143 @end example
19144
19145
19146 @node Score Variables
19147 @section Score Variables
19148 @cindex score variables
19149
19150 @table @code
19151
19152 @item gnus-use-scoring
19153 @vindex gnus-use-scoring
19154 If @code{nil}, Gnus will not check for score files, and will not, in
19155 general, do any score-related work.  This is @code{t} by default.
19156
19157 @item gnus-kill-killed
19158 @vindex gnus-kill-killed
19159 If this variable is @code{nil}, Gnus will never apply score files to
19160 articles that have already been through the kill process.  While this
19161 may save you lots of time, it also means that if you apply a kill file
19162 to a group, and then change the kill file and want to run it over you
19163 group again to kill more articles, it won't work.  You have to set this
19164 variable to @code{t} to do that.  (It is @code{t} by default.)
19165
19166 @item gnus-kill-files-directory
19167 @vindex gnus-kill-files-directory
19168 All kill and score files will be stored in this directory, which is
19169 initialized from the @env{SAVEDIR} environment variable by default.
19170 This is @file{~/News/} by default.
19171
19172 @item gnus-score-file-suffix
19173 @vindex gnus-score-file-suffix
19174 Suffix to add to the group name to arrive at the score file name
19175 (@file{SCORE} by default.)
19176
19177 @item gnus-score-uncacheable-files
19178 @vindex gnus-score-uncacheable-files
19179 @cindex score cache
19180 All score files are normally cached to avoid excessive re-loading of
19181 score files.  However, if this might make your Emacs grow big and
19182 bloated, so this regexp can be used to weed out score files unlikely
19183 to be needed again.  It would be a bad idea to deny caching of
19184 @file{all.SCORE}, while it might be a good idea to not cache
19185 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
19186 variable is @samp{ADAPT$} by default, so no adaptive score files will
19187 be cached.
19188
19189 @item gnus-save-score
19190 @vindex gnus-save-score
19191 If you have really complicated score files, and do lots of batch
19192 scoring, then you might set this variable to @code{t}.  This will make
19193 Gnus save the scores into the @file{.newsrc.eld} file.
19194
19195 If you do not set this to @code{t}, then manual scores (like those set
19196 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
19197 across group visits.
19198
19199 @item gnus-score-interactive-default-score
19200 @vindex gnus-score-interactive-default-score
19201 Score used by all the interactive raise/lower commands to raise/lower
19202 score with.  Default is 1000, which may seem excessive, but this is to
19203 ensure that the adaptive scoring scheme gets enough room to play with.
19204 We don't want the small changes from the adaptive scoring to overwrite
19205 manually entered data.
19206
19207 @item gnus-summary-default-score
19208 @vindex gnus-summary-default-score
19209 Default score of an article, which is 0 by default.
19210
19211 @item gnus-summary-expunge-below
19212 @vindex gnus-summary-expunge-below
19213 Don't display the summary lines of articles that have scores lower than
19214 this variable.  This is @code{nil} by default, which means that no
19215 articles will be hidden.  This variable is local to the summary buffers,
19216 and has to be set from @code{gnus-summary-mode-hook}.
19217
19218 @item gnus-score-over-mark
19219 @vindex gnus-score-over-mark
19220 Mark (in the third column) used for articles with a score over the
19221 default.  Default is @samp{+}.
19222
19223 @item gnus-score-below-mark
19224 @vindex gnus-score-below-mark
19225 Mark (in the third column) used for articles with a score below the
19226 default.  Default is @samp{-}.
19227
19228 @item gnus-score-find-score-files-function
19229 @vindex gnus-score-find-score-files-function
19230 Function used to find score files for the current group.  This function
19231 is called with the name of the group as the argument.
19232
19233 Predefined functions available are:
19234 @table @code
19235
19236 @item gnus-score-find-single
19237 @findex gnus-score-find-single
19238 Only apply the group's own score file.
19239
19240 @item gnus-score-find-bnews
19241 @findex gnus-score-find-bnews
19242 Apply all score files that match, using bnews syntax.  This is the
19243 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
19244 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
19245 @file{gnu.all.SCORE} would all apply.  In short, the instances of
19246 @samp{all} in the score file names are translated into @samp{.*}, and
19247 then a regexp match is done.
19248
19249 This means that if you have some score entries that you want to apply to
19250 all groups, then you put those entries in the @file{all.SCORE} file.
19251
19252 The score files are applied in a semi-random order, although Gnus will
19253 try to apply the more general score files before the more specific score
19254 files.  It does this by looking at the number of elements in the score
19255 file names---discarding the @samp{all} elements.
19256
19257 @item gnus-score-find-hierarchical
19258 @findex gnus-score-find-hierarchical
19259 Apply all score files from all the parent groups.  This means that you
19260 can't have score files like @file{all.SCORE}, but you can have
19261 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
19262 server.
19263
19264 @end table
19265 This variable can also be a list of functions.  In that case, all
19266 these functions will be called with the group name as argument, and
19267 all the returned lists of score files will be applied.  These
19268 functions can also return lists of lists of score alists directly.  In
19269 that case, the functions that return these non-file score alists
19270 should probably be placed before the ``real'' score file functions, to
19271 ensure that the last score file returned is the local score file.
19272 Phu.
19273
19274 For example, to do hierarchical scoring but use a non-server-specific
19275 overall score file, you could use the value
19276 @example
19277 (list (lambda (group) ("all.SCORE"))
19278       'gnus-score-find-hierarchical)
19279 @end example
19280
19281 @item gnus-score-expiry-days
19282 @vindex gnus-score-expiry-days
19283 This variable says how many days should pass before an unused score file
19284 entry is expired.  If this variable is @code{nil}, no score file entries
19285 are expired.  It's 7 by default.
19286
19287 @item gnus-update-score-entry-dates
19288 @vindex gnus-update-score-entry-dates
19289 If this variable is non-@code{nil}, temporary score entries that have
19290 been triggered (matched) will have their dates updated.  (This is how Gnus
19291 controls expiry---all non-matched-entries will become too old while
19292 matched entries will stay fresh and young.)  However, if you set this
19293 variable to @code{nil}, even matched entries will grow old and will
19294 have to face that oh-so grim reaper.
19295
19296 @item gnus-score-after-write-file-function
19297 @vindex gnus-score-after-write-file-function
19298 Function called with the name of the score file just written.
19299
19300 @item gnus-score-thread-simplify
19301 @vindex gnus-score-thread-simplify
19302 If this variable is non-@code{nil}, article subjects will be
19303 simplified for subject scoring purposes in the same manner as with
19304 threading---according to the current value of
19305 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
19306 @code{substring} or @code{exact} matching, the match will also be
19307 simplified in this manner.
19308
19309 @end table
19310
19311
19312 @node Score File Format
19313 @section Score File Format
19314 @cindex score file format
19315
19316 A score file is an @code{emacs-lisp} file that normally contains just a
19317 single form.  Casual users are not expected to edit these files;
19318 everything can be changed from the summary buffer.
19319
19320 Anyway, if you'd like to dig into it yourself, here's an example:
19321
19322 @lisp
19323 (("from"
19324   ("Lars Ingebrigtsen" -10000)
19325   ("Per Abrahamsen")
19326   ("larsi\\|lmi" -50000 nil R))
19327  ("subject"
19328   ("Ding is Badd" nil 728373))
19329  ("xref"
19330   ("alt.politics" -1000 728372 s))
19331  ("lines"
19332   (2 -100 nil <))
19333  (mark 0)
19334  (expunge -1000)
19335  (mark-and-expunge -10)
19336  (read-only nil)
19337  (orphan -10)
19338  (adapt t)
19339  (files "/hom/larsi/News/gnu.SCORE")
19340  (exclude-files "all.SCORE")
19341  (local (gnus-newsgroup-auto-expire t)
19342         (gnus-summary-make-false-root empty))
19343  (eval (ding)))
19344 @end lisp
19345
19346 This example demonstrates most score file elements.  @xref{Advanced
19347 Scoring}, for a different approach.
19348
19349 Even though this looks much like Lisp code, nothing here is actually
19350 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19351 has to be valid syntactically, if not semantically.
19352
19353 Six keys are supported by this alist:
19354
19355 @table @code
19356
19357 @item STRING
19358 If the key is a string, it is the name of the header to perform the
19359 match on.  Scoring can only be performed on these eight headers:
19360 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19361 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19362 these headers, there are three strings to tell Gnus to fetch the entire
19363 article and do the match on larger parts of the article: @code{Body}
19364 will perform the match on the body of the article, @code{Head} will
19365 perform the match on the head of the article, and @code{All} will
19366 perform the match on the entire article.  Note that using any of these
19367 last three keys will slow down group entry @emph{considerably}.  The
19368 final ``header'' you can score on is @code{Followup}.  These score
19369 entries will result in new score entries being added for all follow-ups
19370 to articles that matches these score entries.
19371
19372 Following this key is an arbitrary number of score entries, where each
19373 score entry has one to four elements.
19374 @enumerate
19375
19376 @item
19377 The first element is the @dfn{match element}.  On most headers this will
19378 be a string, but on the Lines and Chars headers, this must be an
19379 integer.
19380
19381 @item
19382 If the second element is present, it should be a number---the @dfn{score
19383 element}.  This number should be an integer in the neginf to posinf
19384 interval.  This number is added to the score of the article if the match
19385 is successful.  If this element is not present, the
19386 @code{gnus-score-interactive-default-score} number will be used
19387 instead.  This is 1000 by default.
19388
19389 @item
19390 If the third element is present, it should be a number---the @dfn{date
19391 element}.  This date says when the last time this score entry matched,
19392 which provides a mechanism for expiring the score entries.  It this
19393 element is not present, the score entry is permanent.  The date is
19394 represented by the number of days since December 31, 1 BCE.
19395
19396 @item
19397 If the fourth element is present, it should be a symbol---the @dfn{type
19398 element}.  This element specifies what function should be used to see
19399 whether this score entry matches the article.  What match types that can
19400 be used depends on what header you wish to perform the match on.
19401 @table @dfn
19402
19403 @item From, Subject, References, Xref, Message-ID
19404 For most header types, there are the @code{r} and @code{R} (regexp), as
19405 well as @code{s} and @code{S} (substring) types, and @code{e} and
19406 @code{E} (exact match), and @code{w} (word match) types.  If this
19407 element is not present, Gnus will assume that substring matching should
19408 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19409 that the matches will be done in a case-sensitive manner.  All these
19410 one-letter types are really just abbreviations for the @code{regexp},
19411 @code{string}, @code{exact}, and @code{word} types, which you can use
19412 instead, if you feel like.
19413
19414 @item Extra
19415 Just as for the standard string overview headers, if you are using
19416 gnus-extra-headers, you can score on these headers' values.  In this
19417 case, there is a 5th element in the score entry, being the name of the
19418 header to be scored.  The following entry is useful in your
19419 @file{all.SCORE} file in case of spam attacks from a single origin
19420 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19421 overviews:
19422
19423 @lisp
19424 ("111.222.333.444" -1000 nil s
19425  "NNTP-Posting-Host")
19426 @end lisp
19427
19428 @item Lines, Chars
19429 These two headers use different match types: @code{<}, @code{>},
19430 @code{=}, @code{>=} and @code{<=}.
19431
19432 These predicates are true if
19433
19434 @example
19435 (PREDICATE HEADER MATCH)
19436 @end example
19437
19438 evaluates to non-@code{nil}.  For instance, the advanced match
19439 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19440 following form:
19441
19442 @lisp
19443 (< header-value 4)
19444 @end lisp
19445
19446 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19447 the match, we get the score added if the article has less than 4 lines.
19448 (It's easy to get confused and think it's the other way around.  But
19449 it's not.  I think.)
19450
19451 When matching on @code{Lines}, be careful because some back ends (like
19452 @code{nndir}) do not generate @code{Lines} header, so every article ends
19453 up being marked as having 0 lines.  This can lead to strange results if
19454 you happen to lower score of the articles with few lines.
19455
19456 @item Date
19457 For the Date header we have three kinda silly match types:
19458 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19459 ever being useful, but, like, it would feel kinda silly not to provide
19460 this function.  Just in case.  You never know.  Better safe than sorry.
19461 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19462 sex on a first date.  (I have been told that at least one person, and I
19463 quote, ``found this function indispensable'', however.)
19464
19465 @cindex ISO8601
19466 @cindex date
19467 A more useful match type is @code{regexp}.  With it, you can match the
19468 date string using a regular expression.  The date is normalized to
19469 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19470 you want to match all articles that have been posted on April 1st in
19471 every year, you could use @samp{....0401.........} as a match string,
19472 for instance.  (Note that the date is kept in its original time zone, so
19473 this will match articles that were posted when it was April 1st where
19474 the article was posted from.  Time zones are such wholesome fun for the
19475 whole family, eh?)
19476
19477 @item Head, Body, All
19478 These three match keys use the same match types as the @code{From} (etc)
19479 header uses.
19480
19481 @item Followup
19482 This match key is somewhat special, in that it will match the
19483 @code{From} header, and affect the score of not only the matching
19484 articles, but also all followups to the matching articles.  This allows
19485 you e.g. increase the score of followups to your own articles, or
19486 decrease the score of followups to the articles of some known
19487 trouble-maker.  Uses the same match types as the @code{From} header
19488 uses.  (Using this match key will lead to creation of @file{ADAPT}
19489 files.)
19490
19491 @item Thread
19492 This match key works along the same lines as the @code{Followup} match
19493 key.  If you say that you want to score on a (sub-)thread started by an
19494 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19495 match.  This will add a new @samp{thread} match for each article that
19496 has @var{x} in its @code{References} header.  (These new @samp{thread}
19497 matches will use the @code{Message-ID}s of these matching articles.)
19498 This will ensure that you can raise/lower the score of an entire thread,
19499 even though some articles in the thread may not have complete
19500 @code{References} headers.  Note that using this may lead to
19501 undeterministic scores of the articles in the thread.  (Using this match
19502 key will lead to creation of @file{ADAPT} files.)
19503 @end table
19504 @end enumerate
19505
19506 @cindex score file atoms
19507 @item mark
19508 The value of this entry should be a number.  Any articles with a score
19509 lower than this number will be marked as read.
19510
19511 @item expunge
19512 The value of this entry should be a number.  Any articles with a score
19513 lower than this number will be removed from the summary buffer.
19514
19515 @item mark-and-expunge
19516 The value of this entry should be a number.  Any articles with a score
19517 lower than this number will be marked as read and removed from the
19518 summary buffer.
19519
19520 @item thread-mark-and-expunge
19521 The value of this entry should be a number.  All articles that belong to
19522 a thread that has a total score below this number will be marked as read
19523 and removed from the summary buffer.  @code{gnus-thread-score-function}
19524 says how to compute the total score for a thread.
19525
19526 @item files
19527 The value of this entry should be any number of file names.  These files
19528 are assumed to be score files as well, and will be loaded the same way
19529 this one was.
19530
19531 @item exclude-files
19532 The clue of this entry should be any number of files.  These files will
19533 not be loaded, even though they would normally be so, for some reason or
19534 other.
19535
19536 @item eval
19537 The value of this entry will be @code{eval}el.  This element will be
19538 ignored when handling global score files.
19539
19540 @item read-only
19541 Read-only score files will not be updated or saved.  Global score files
19542 should feature this atom (@pxref{Global Score Files}).  (Note:
19543 @dfn{Global} here really means @dfn{global}; not your personal
19544 apply-to-all-groups score files.)
19545
19546 @item orphan
19547 The value of this entry should be a number.  Articles that do not have
19548 parents will get this number added to their scores.  Imagine you follow
19549 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19550 will only follow a few of the threads, also want to see any new threads.
19551
19552 You can do this with the following two score file entries:
19553
19554 @example
19555         (orphan -500)
19556         (mark-and-expunge -100)
19557 @end example
19558
19559 When you enter the group the first time, you will only see the new
19560 threads.  You then raise the score of the threads that you find
19561 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19562 rest.  Next time you enter the group, you will see new articles in the
19563 interesting threads, plus any new threads.
19564
19565 I.e.---the orphan score atom is for high-volume groups where a few
19566 interesting threads which can't be found automatically by ordinary
19567 scoring rules exist.
19568
19569 @item adapt
19570 This entry controls the adaptive scoring.  If it is @code{t}, the
19571 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19572 adaptive scoring will be performed on this group.  If it is a list, this
19573 list will be used as the adaptive scoring rules.  If it isn't present,
19574 or is something other than @code{t} or @code{ignore}, the default
19575 adaptive scoring rules will be used.  If you want to use adaptive
19576 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19577 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19578 not want adaptive scoring.  If you only want adaptive scoring in a few
19579 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19580 insert @code{(adapt t)} in the score files of the groups where you want
19581 it.
19582
19583 @item adapt-file
19584 All adaptive score entries will go to the file named by this entry.  It
19585 will also be applied when entering the group.  This atom might be handy
19586 if you want to adapt on several groups at once, using the same adaptive
19587 file for a number of groups.
19588
19589 @item local
19590 @cindex local variables
19591 The value of this entry should be a list of @code{(@var{var}
19592 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19593 current summary buffer, and set to the value specified.  This is a
19594 convenient, if somewhat strange, way of setting variables in some
19595 groups if you don't like hooks much.  Note that the @var{value} won't
19596 be evaluated.
19597 @end table
19598
19599
19600 @node Score File Editing
19601 @section Score File Editing
19602
19603 You normally enter all scoring commands from the summary buffer, but you
19604 might feel the urge to edit them by hand as well, so we've supplied you
19605 with a mode for that.
19606
19607 It's simply a slightly customized @code{emacs-lisp} mode, with these
19608 additional commands:
19609
19610 @table @kbd
19611
19612 @item C-c C-c
19613 @kindex C-c C-c (Score)
19614 @findex gnus-score-edit-done
19615 Save the changes you have made and return to the summary buffer
19616 (@code{gnus-score-edit-done}).
19617
19618 @item C-c C-d
19619 @kindex C-c C-d (Score)
19620 @findex gnus-score-edit-insert-date
19621 Insert the current date in numerical format
19622 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19623 you were wondering.
19624
19625 @item C-c C-p
19626 @kindex C-c C-p (Score)
19627 @findex gnus-score-pretty-print
19628 The adaptive score files are saved in an unformatted fashion.  If you
19629 intend to read one of these files, you want to @dfn{pretty print} it
19630 first.  This command (@code{gnus-score-pretty-print}) does that for
19631 you.
19632
19633 @end table
19634
19635 Type @kbd{M-x gnus-score-mode} to use this mode.
19636
19637 @vindex gnus-score-mode-hook
19638 @code{gnus-score-menu-hook} is run in score mode buffers.
19639
19640 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
19641 @kbd{V t} to begin editing score files.
19642
19643
19644 @node Adaptive Scoring
19645 @section Adaptive Scoring
19646 @cindex adaptive scoring
19647
19648 If all this scoring is getting you down, Gnus has a way of making it all
19649 happen automatically---as if by magic.  Or rather, as if by artificial
19650 stupidity, to be precise.
19651
19652 @vindex gnus-use-adaptive-scoring
19653 When you read an article, or mark an article as read, or kill an
19654 article, you leave marks behind.  On exit from the group, Gnus can sniff
19655 these marks and add score elements depending on what marks it finds.
19656 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19657 @code{t} or @code{(line)}.  If you want score adaptively on separate
19658 words appearing in the subjects, you should set this variable to
19659 @code{(word)}.  If you want to use both adaptive methods, set this
19660 variable to @code{(word line)}.
19661
19662 @vindex gnus-default-adaptive-score-alist
19663 To give you complete control over the scoring process, you can customize
19664 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19665 might look something like this:
19666
19667 @lisp
19668 (setq gnus-default-adaptive-score-alist
19669   '((gnus-unread-mark)
19670     (gnus-ticked-mark (from 4))
19671     (gnus-dormant-mark (from 5))
19672     (gnus-del-mark (from -4) (subject -1))
19673     (gnus-read-mark (from 4) (subject 2))
19674     (gnus-expirable-mark (from -1) (subject -1))
19675     (gnus-killed-mark (from -1) (subject -3))
19676     (gnus-kill-file-mark)
19677     (gnus-ancient-mark)
19678     (gnus-low-score-mark)
19679     (gnus-catchup-mark (from -1) (subject -1))))
19680 @end lisp
19681
19682 As you see, each element in this alist has a mark as a key (either a
19683 variable name or a ``real'' mark---a character).  Following this key is
19684 a arbitrary number of header/score pairs.  If there are no header/score
19685 pairs following the key, no adaptive scoring will be done on articles
19686 that have that key as the article mark.  For instance, articles with
19687 @code{gnus-unread-mark} in the example above will not get adaptive score
19688 entries.
19689
19690 Each article can have only one mark, so just a single of these rules
19691 will be applied to each article.
19692
19693 To take @code{gnus-del-mark} as an example---this alist says that all
19694 articles that have that mark (i.e., are marked with @samp{e}) will have a
19695 score entry added to lower based on the @code{From} header by -4, and
19696 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19697
19698 If you have marked 10 articles with the same subject with
19699 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19700 That means that that subject will get a score of ten times -1, which
19701 should be, unless I'm much mistaken, -10.
19702
19703 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19704 the read articles will be marked with the @samp{E} mark.  This'll
19705 probably make adaptive scoring slightly impossible, so auto-expiring and
19706 adaptive scoring doesn't really mix very well.
19707
19708 The headers you can score on are @code{from}, @code{subject},
19709 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19710 @code{chars} and @code{date}.  In addition, you can score on
19711 @code{followup}, which will create an adaptive score entry that matches
19712 on the @code{References} header using the @code{Message-ID} of the
19713 current article, thereby matching the following thread.
19714
19715 If you use this scheme, you should set the score file atom @code{mark}
19716 to something small---like -300, perhaps, to avoid having small random
19717 changes result in articles getting marked as read.
19718
19719 After using adaptive scoring for a week or so, Gnus should start to
19720 become properly trained and enhance the authors you like best, and kill
19721 the authors you like least, without you having to say so explicitly.
19722
19723 You can control what groups the adaptive scoring is to be performed on
19724 by using the score files (@pxref{Score File Format}).  This will also
19725 let you use different rules in different groups.
19726
19727 @vindex gnus-adaptive-file-suffix
19728 The adaptive score entries will be put into a file where the name is the
19729 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19730 is @file{ADAPT}.
19731
19732 @vindex gnus-adaptive-pretty-print
19733 Adaptive score files can get huge and are not meant to be edited by
19734 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
19735 deafult) those files will not be written in a human readable way.
19736
19737 @vindex gnus-score-exact-adapt-limit
19738 When doing adaptive scoring, substring or fuzzy matching would probably
19739 give you the best results in most cases.  However, if the header one
19740 matches is short, the possibility for false positives is great, so if
19741 the length of the match is less than
19742 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19743 this variable is @code{nil}, exact matching will always be used to avoid
19744 this problem.
19745
19746 @vindex gnus-default-adaptive-word-score-alist
19747 As mentioned above, you can adapt either on individual words or entire
19748 headers.  If you adapt on words, the
19749 @code{gnus-default-adaptive-word-score-alist} variable says what score
19750 each instance of a word should add given a mark.
19751
19752 @lisp
19753 (setq gnus-default-adaptive-word-score-alist
19754       `((,gnus-read-mark . 30)
19755         (,gnus-catchup-mark . -10)
19756         (,gnus-killed-mark . -20)
19757         (,gnus-del-mark . -15)))
19758 @end lisp
19759
19760 This is the default value.  If you have adaption on words enabled, every
19761 word that appears in subjects of articles marked with
19762 @code{gnus-read-mark} will result in a score rule that increase the
19763 score with 30 points.
19764
19765 @vindex gnus-default-ignored-adaptive-words
19766 @vindex gnus-ignored-adaptive-words
19767 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19768 will be ignored.  If you wish to add more words to be ignored, use the
19769 @code{gnus-ignored-adaptive-words} list instead.
19770
19771 @vindex gnus-adaptive-word-length-limit
19772 Some may feel that short words shouldn't count when doing adaptive
19773 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19774 an integer.  Words shorter than this number will be ignored.  This
19775 variable defaults to @code{nil}.
19776
19777 @vindex gnus-adaptive-word-syntax-table
19778 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19779 syntax table in effect.  It is similar to the standard syntax table, but
19780 it considers numbers to be non-word-constituent characters.
19781
19782 @vindex gnus-adaptive-word-minimum
19783 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19784 word scoring process will never bring down the score of an article to
19785 below this number.  The default is @code{nil}.
19786
19787 @vindex gnus-adaptive-word-no-group-words
19788 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19789 won't adaptively word score any of the words in the group name.  Useful
19790 for groups like @samp{comp.editors.emacs}, where most of the subject
19791 lines contain the word @samp{emacs}.
19792
19793 After using this scheme for a while, it might be nice to write a
19794 @code{gnus-psychoanalyze-user} command to go through the rules and see
19795 what words you like and what words you don't like.  Or perhaps not.
19796
19797 Note that the adaptive word scoring thing is highly experimental and is
19798 likely to change in the future.  Initial impressions seem to indicate
19799 that it's totally useless as it stands.  Some more work (involving more
19800 rigorous statistical methods) will have to be done to make this useful.
19801
19802
19803 @node Home Score File
19804 @section Home Score File
19805
19806 The score file where new score file entries will go is called the
19807 @dfn{home score file}.  This is normally (and by default) the score file
19808 for the group itself.  For instance, the home score file for
19809 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19810
19811 However, this may not be what you want.  It is often convenient to share
19812 a common home score file among many groups---all @samp{emacs} groups
19813 could perhaps use the same home score file.
19814
19815 @vindex gnus-home-score-file
19816 The variable that controls this is @code{gnus-home-score-file}.  It can
19817 be:
19818
19819 @enumerate
19820 @item
19821 A string.  Then this file will be used as the home score file for all
19822 groups.
19823
19824 @item
19825 A function.  The result of this function will be used as the home score
19826 file.  The function will be called with the name of the group as the
19827 parameter.
19828
19829 @item
19830 A list.  The elements in this list can be:
19831
19832 @enumerate
19833 @item
19834 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19835 group name, the @var{file-name} will be used as the home score file.
19836
19837 @item
19838 A function.  If the function returns non-@code{nil}, the result will
19839 be used as the home score file.
19840
19841 @item
19842 A string.  Use the string as the home score file.
19843 @end enumerate
19844
19845 The list will be traversed from the beginning towards the end looking
19846 for matches.
19847
19848 @end enumerate
19849
19850 So, if you want to use just a single score file, you could say:
19851
19852 @lisp
19853 (setq gnus-home-score-file
19854       "my-total-score-file.SCORE")
19855 @end lisp
19856
19857 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19858 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19859
19860 @findex gnus-hierarchial-home-score-file
19861 @lisp
19862 (setq gnus-home-score-file
19863       'gnus-hierarchial-home-score-file)
19864 @end lisp
19865
19866 This is a ready-made function provided for your convenience.
19867 Other functions include
19868
19869 @table @code
19870 @item gnus-current-home-score-file
19871 @findex gnus-current-home-score-file
19872 Return the ``current'' regular score file.  This will make scoring
19873 commands add entry to the ``innermost'' matching score file.
19874
19875 @end table
19876
19877 If you want to have one score file for the @samp{emacs} groups and
19878 another for the @samp{comp} groups, while letting all other groups use
19879 their own home score files:
19880
19881 @lisp
19882 (setq gnus-home-score-file
19883       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19884       '(("\\.emacs" "emacs.SCORE")
19885         ;; @r{All the comp groups in one score file}
19886         ("^comp" "comp.SCORE")))
19887 @end lisp
19888
19889 @vindex gnus-home-adapt-file
19890 @code{gnus-home-adapt-file} works exactly the same way as
19891 @code{gnus-home-score-file}, but says what the home adaptive score file
19892 is instead.  All new adaptive file entries will go into the file
19893 specified by this variable, and the same syntax is allowed.
19894
19895 In addition to using @code{gnus-home-score-file} and
19896 @code{gnus-home-adapt-file}, you can also use group parameters
19897 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19898 Parameters}) to achieve much the same.  Group and topic parameters take
19899 precedence over this variable.
19900
19901
19902 @node Followups To Yourself
19903 @section Followups To Yourself
19904
19905 Gnus offers two commands for picking out the @code{Message-ID} header in
19906 the current buffer.  Gnus will then add a score rule that scores using
19907 this @code{Message-ID} on the @code{References} header of other
19908 articles.  This will, in effect, increase the score of all articles that
19909 respond to the article in the current buffer.  Quite useful if you want
19910 to easily note when people answer what you've said.
19911
19912 @table @code
19913
19914 @item gnus-score-followup-article
19915 @findex gnus-score-followup-article
19916 This will add a score to articles that directly follow up your own
19917 article.
19918
19919 @item gnus-score-followup-thread
19920 @findex gnus-score-followup-thread
19921 This will add a score to all articles that appear in a thread ``below''
19922 your own article.
19923 @end table
19924
19925 @vindex message-sent-hook
19926 These two functions are both primarily meant to be used in hooks like
19927 @code{message-sent-hook}, like this:
19928 @lisp
19929 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19930 @end lisp
19931
19932
19933 If you look closely at your own @code{Message-ID}, you'll notice that
19934 the first two or three characters are always the same.  Here's two of
19935 mine:
19936
19937 @example
19938 <x6u3u47icf.fsf@@eyesore.no>
19939 <x6sp9o7ibw.fsf@@eyesore.no>
19940 @end example
19941
19942 So ``my'' ident on this machine is @samp{x6}.  This can be
19943 exploited---the following rule will raise the score on all followups to
19944 myself:
19945
19946 @lisp
19947 ("references"
19948  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19949   1000 nil r))
19950 @end lisp
19951
19952 Whether it's the first two or first three characters that are ``yours''
19953 is system-dependent.
19954
19955
19956 @node Scoring On Other Headers
19957 @section Scoring On Other Headers
19958 @cindex scoring on other headers
19959
19960 Gnus is quite fast when scoring the ``traditional''
19961 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19962 other headers requires writing a @code{head} scoring rule, which means
19963 that Gnus has to request every single article from the back end to find
19964 matches.  This takes a long time in big groups.
19965
19966 Now, there's not much you can do about this for news groups, but for
19967 mail groups, you have greater control.  In @ref{To From Newsgroups},
19968 it's explained in greater detail what this mechanism does, but here's
19969 a cookbook example for @code{nnml} on how to allow scoring on the
19970 @samp{To} and @samp{Cc} headers.
19971
19972 Put the following in your @file{~/.gnus.el} file.
19973
19974 @lisp
19975 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19976       nnmail-extra-headers gnus-extra-headers)
19977 @end lisp
19978
19979 Restart Gnus and rebuild your @code{nnml} overview files with the
19980 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19981 time if you have much mail.
19982
19983 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19984 so: @kbd{I e s p To RET <your name> RET}.
19985
19986 See?  Simple.
19987
19988
19989 @node Scoring Tips
19990 @section Scoring Tips
19991 @cindex scoring tips
19992
19993 @table @dfn
19994
19995 @item Crossposts
19996 @cindex crossposts
19997 @cindex scoring crossposts
19998 If you want to lower the score of crossposts, the line to match on is
19999 the @code{Xref} header.
20000 @lisp
20001 ("xref" (" talk.politics.misc:" -1000))
20002 @end lisp
20003
20004 @item Multiple crossposts
20005 If you want to lower the score of articles that have been crossposted to
20006 more than, say, 3 groups:
20007 @lisp
20008 ("xref"
20009   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
20010    -1000 nil r))
20011 @end lisp
20012
20013 @item Matching on the body
20014 This is generally not a very good idea---it takes a very long time.
20015 Gnus actually has to fetch each individual article from the server.  But
20016 you might want to anyway, I guess.  Even though there are three match
20017 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
20018 and stick with it in each score file.  If you use any two, each article
20019 will be fetched @emph{twice}.  If you want to match a bit on the
20020 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
20021 the matches.
20022
20023 @item Marking as read
20024 You will probably want to mark articles that have scores below a certain
20025 number as read.  This is most easily achieved by putting the following
20026 in your @file{all.SCORE} file:
20027 @lisp
20028 ((mark -100))
20029 @end lisp
20030 You may also consider doing something similar with @code{expunge}.
20031
20032 @item Negated character classes
20033 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
20034 That will match newlines, which might lead to, well, The Unknown.  Say
20035 @code{[^abcd\n]*} instead.
20036 @end table
20037
20038
20039 @node Reverse Scoring
20040 @section Reverse Scoring
20041 @cindex reverse scoring
20042
20043 If you want to keep just articles that have @samp{Sex with Emacs} in the
20044 subject header, and expunge all other articles, you could put something
20045 like this in your score file:
20046
20047 @lisp
20048 (("subject"
20049   ("Sex with Emacs" 2))
20050  (mark 1)
20051  (expunge 1))
20052 @end lisp
20053
20054 So, you raise all articles that match @samp{Sex with Emacs} and mark the
20055 rest as read, and expunge them to boot.
20056
20057
20058 @node Global Score Files
20059 @section Global Score Files
20060 @cindex global score files
20061
20062 Sure, other newsreaders have ``global kill files''.  These are usually
20063 nothing more than a single kill file that applies to all groups, stored
20064 in the user's home directory.  Bah!  Puny, weak newsreaders!
20065
20066 What I'm talking about here are Global Score Files.  Score files from
20067 all over the world, from users everywhere, uniting all nations in one
20068 big, happy score file union!  Ange-score!  New and untested!
20069
20070 @vindex gnus-global-score-files
20071 All you have to do to use other people's score files is to set the
20072 @code{gnus-global-score-files} variable.  One entry for each score file,
20073 or each score file directory.  Gnus will decide by itself what score
20074 files are applicable to which group.
20075
20076 To use the score file
20077 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
20078 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
20079 say this:
20080
20081 @lisp
20082 (setq gnus-global-score-files
20083       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
20084         "/ftp@@ftp.some-where:/pub/score/"))
20085 @end lisp
20086
20087 @findex gnus-score-search-global-directories
20088 @noindent
20089 Simple, eh?  Directory names must end with a @samp{/}.  These
20090 directories are typically scanned only once during each Gnus session.
20091 If you feel the need to manually re-scan the remote directories, you can
20092 use the @code{gnus-score-search-global-directories} command.
20093
20094 Note that, at present, using this option will slow down group entry
20095 somewhat.  (That is---a lot.)
20096
20097 If you want to start maintaining score files for other people to use,
20098 just put your score file up for anonymous ftp and announce it to the
20099 world.  Become a retro-moderator!  Participate in the retro-moderator
20100 wars sure to ensue, where retro-moderators battle it out for the
20101 sympathy of the people, luring them to use their score files on false
20102 premises!  Yay!  The net is saved!
20103
20104 Here are some tips for the would-be retro-moderator, off the top of my
20105 head:
20106
20107 @itemize @bullet
20108
20109 @item
20110 Articles heavily crossposted are probably junk.
20111 @item
20112 To lower a single inappropriate article, lower by @code{Message-ID}.
20113 @item
20114 Particularly brilliant authors can be raised on a permanent basis.
20115 @item
20116 Authors that repeatedly post off-charter for the group can safely be
20117 lowered out of existence.
20118 @item
20119 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
20120 articles completely.
20121
20122 @item
20123 Use expiring score entries to keep the size of the file down.  You
20124 should probably have a long expiry period, though, as some sites keep
20125 old articles for a long time.
20126 @end itemize
20127
20128 @dots{} I wonder whether other newsreaders will support global score files
20129 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
20130 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
20131 holding our breath yet?
20132
20133
20134 @node Kill Files
20135 @section Kill Files
20136 @cindex kill files
20137
20138 Gnus still supports those pesky old kill files.  In fact, the kill file
20139 entries can now be expiring, which is something I wrote before Daniel
20140 Quinlan thought of doing score files, so I've left the code in there.
20141
20142 In short, kill processing is a lot slower (and I do mean @emph{a lot})
20143 than score processing, so it might be a good idea to rewrite your kill
20144 files into score files.
20145
20146 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
20147 forms into this file, which means that you can use kill files as some
20148 sort of primitive hook function to be run on group entry, even though
20149 that isn't a very good idea.
20150
20151 Normal kill files look like this:
20152
20153 @lisp
20154 (gnus-kill "From" "Lars Ingebrigtsen")
20155 (gnus-kill "Subject" "ding")
20156 (gnus-expunge "X")
20157 @end lisp
20158
20159 This will mark every article written by me as read, and remove the
20160 marked articles from the summary buffer.  Very useful, you'll agree.
20161
20162 Other programs use a totally different kill file syntax.  If Gnus
20163 encounters what looks like a @code{rn} kill file, it will take a stab at
20164 interpreting it.
20165
20166 Two summary functions for editing a @sc{gnus} kill file:
20167
20168 @table @kbd
20169
20170 @item M-k
20171 @kindex M-k (Summary)
20172 @findex gnus-summary-edit-local-kill
20173 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
20174
20175 @item M-K
20176 @kindex M-K (Summary)
20177 @findex gnus-summary-edit-global-kill
20178 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
20179 @end table
20180
20181 Two group mode functions for editing the kill files:
20182
20183 @table @kbd
20184
20185 @item M-k
20186 @kindex M-k (Group)
20187 @findex gnus-group-edit-local-kill
20188 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
20189
20190 @item M-K
20191 @kindex M-K (Group)
20192 @findex gnus-group-edit-global-kill
20193 Edit the general kill file (@code{gnus-group-edit-global-kill}).
20194 @end table
20195
20196 Kill file variables:
20197
20198 @table @code
20199 @item gnus-kill-file-name
20200 @vindex gnus-kill-file-name
20201 A kill file for the group @samp{soc.motss} is normally called
20202 @file{soc.motss.KILL}.  The suffix appended to the group name to get
20203 this file name is detailed by the @code{gnus-kill-file-name} variable.
20204 The ``global'' kill file (not in the score file sense of ``global'', of
20205 course) is just called @file{KILL}.
20206
20207 @vindex gnus-kill-save-kill-file
20208 @item gnus-kill-save-kill-file
20209 If this variable is non-@code{nil}, Gnus will save the
20210 kill file after processing, which is necessary if you use expiring
20211 kills.
20212
20213 @item gnus-apply-kill-hook
20214 @vindex gnus-apply-kill-hook
20215 @findex gnus-apply-kill-file-unless-scored
20216 @findex gnus-apply-kill-file
20217 A hook called to apply kill files to a group.  It is
20218 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
20219 kill file if you have a score file for the same group, you can set this
20220 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
20221 kill files to be processed, you should set this variable to @code{nil}.
20222
20223 @item gnus-kill-file-mode-hook
20224 @vindex gnus-kill-file-mode-hook
20225 A hook called in kill-file mode buffers.
20226
20227 @end table
20228
20229
20230 @node Converting Kill Files
20231 @section Converting Kill Files
20232 @cindex kill files
20233 @cindex converting kill files
20234
20235 If you have loads of old kill files, you may want to convert them into
20236 score files.  If they are ``regular'', you can use
20237 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
20238 by hand.
20239
20240 The kill to score conversion package isn't included in Gnus by default.
20241 You can fetch it from
20242 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
20243
20244 If your old kill files are very complex---if they contain more
20245 non-@code{gnus-kill} forms than not, you'll have to convert them by
20246 hand.  Or just let them be as they are.  Gnus will still use them as
20247 before.
20248
20249
20250 @node Advanced Scoring
20251 @section Advanced Scoring
20252
20253 Scoring on Subjects and From headers is nice enough, but what if you're
20254 really interested in what a person has to say only when she's talking
20255 about a particular subject?  Or what if you really don't want to
20256 read what person A has to say when she's following up to person B, but
20257 want to read what she says when she's following up to person C?
20258
20259 By using advanced scoring rules you may create arbitrarily complex
20260 scoring patterns.
20261
20262 @menu
20263 * Advanced Scoring Syntax::     A definition.
20264 * Advanced Scoring Examples::   What they look like.
20265 * Advanced Scoring Tips::       Getting the most out of it.
20266 @end menu
20267
20268
20269 @node Advanced Scoring Syntax
20270 @subsection Advanced Scoring Syntax
20271
20272 Ordinary scoring rules have a string as the first element in the rule.
20273 Advanced scoring rules have a list as the first element.  The second
20274 element is the score to be applied if the first element evaluated to a
20275 non-@code{nil} value.
20276
20277 These lists may consist of three logical operators, one redirection
20278 operator, and various match operators.
20279
20280 Logical operators:
20281
20282 @table @code
20283 @item &
20284 @itemx and
20285 This logical operator will evaluate each of its arguments until it finds
20286 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20287 evaluate to @code{true} values, then this operator will return
20288 @code{true}.
20289
20290 @item |
20291 @itemx or
20292 This logical operator will evaluate each of its arguments until it finds
20293 one that evaluates to @code{true}.  If no arguments are @code{true},
20294 then this operator will return @code{false}.
20295
20296 @item !
20297 @itemx not
20298 @itemx Â¬
20299 This logical operator only takes a single argument.  It returns the
20300 logical negation of the value of its argument.
20301
20302 @end table
20303
20304 There is an @dfn{indirection operator} that will make its arguments
20305 apply to the ancestors of the current article being scored.  For
20306 instance, @code{1-} will make score rules apply to the parent of the
20307 current article.  @code{2-} will make score rules apply to the
20308 grandparent of the current article.  Alternatively, you can write
20309 @code{^^}, where the number of @code{^}s (carets) says how far back into
20310 the ancestry you want to go.
20311
20312 Finally, we have the match operators.  These are the ones that do the
20313 real work.  Match operators are header name strings followed by a match
20314 and a match type.  A typical match operator looks like @samp{("from"
20315 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20316 simple scoring, and the match types are also the same.
20317
20318
20319 @node Advanced Scoring Examples
20320 @subsection Advanced Scoring Examples
20321
20322 Please note that the following examples are score file rules.  To
20323 make a complete score file from them, surround them with another pair
20324 of parentheses.
20325
20326 Let's say you want to increase the score of articles written by Lars
20327 when he's talking about Gnus:
20328
20329 @example
20330 @group
20331 ((&
20332   ("from" "Lars Ingebrigtsen")
20333   ("subject" "Gnus"))
20334  1000)
20335 @end group
20336 @end example
20337
20338 Quite simple, huh?
20339
20340 When he writes long articles, he sometimes has something nice to say:
20341
20342 @example
20343 ((&
20344   ("from" "Lars Ingebrigtsen")
20345   (|
20346    ("subject" "Gnus")
20347    ("lines" 100 >)))
20348  1000)
20349 @end example
20350
20351 However, when he responds to things written by Reig Eigil Logge, you
20352 really don't want to read what he's written:
20353
20354 @example
20355 ((&
20356   ("from" "Lars Ingebrigtsen")
20357   (1- ("from" "Reig Eigir Logge")))
20358  -100000)
20359 @end example
20360
20361 Everybody that follows up Redmondo when he writes about disappearing
20362 socks should have their scores raised, but only when they talk about
20363 white socks.  However, when Lars talks about socks, it's usually not
20364 very interesting:
20365
20366 @example
20367 ((&
20368   (1-
20369    (&
20370     ("from" "redmondo@@.*no" r)
20371     ("body" "disappearing.*socks" t)))
20372   (! ("from" "Lars Ingebrigtsen"))
20373   ("body" "white.*socks"))
20374  1000)
20375 @end example
20376
20377 The possibilities are endless.
20378
20379
20380 @node Advanced Scoring Tips
20381 @subsection Advanced Scoring Tips
20382
20383 The @code{&} and @code{|} logical operators do short-circuit logic.
20384 That is, they stop processing their arguments when it's clear what the
20385 result of the operation will be.  For instance, if one of the arguments
20386 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20387 the rest of the arguments.  This means that you should put slow matches
20388 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20389 @samp{subject}) first.
20390
20391 The indirection arguments (@code{1-} and so on) will make their
20392 arguments work on previous generations of the thread.  If you say
20393 something like:
20394
20395 @example
20396 ...
20397 (1-
20398  (1-
20399   ("from" "lars")))
20400 ...
20401 @end example
20402
20403 Then that means ``score on the from header of the grandparent of the
20404 current article''.  An indirection is quite fast, but it's better to say:
20405
20406 @example
20407 (1-
20408  (&
20409   ("from" "Lars")
20410   ("subject" "Gnus")))
20411 @end example
20412
20413 than it is to say:
20414
20415 @example
20416 (&
20417  (1- ("from" "Lars"))
20418  (1- ("subject" "Gnus")))
20419 @end example
20420
20421
20422 @node Score Decays
20423 @section Score Decays
20424 @cindex score decays
20425 @cindex decays
20426
20427 You may find that your scores have a tendency to grow without
20428 bounds, especially if you're using adaptive scoring.  If scores get too
20429 big, they lose all meaning---they simply max out and it's difficult to
20430 use them in any sensible way.
20431
20432 @vindex gnus-decay-scores
20433 @findex gnus-decay-score
20434 @vindex gnus-decay-score-function
20435 Gnus provides a mechanism for decaying scores to help with this problem.
20436 When score files are loaded and @code{gnus-decay-scores} is
20437 non-@code{nil}, Gnus will run the score files through the decaying
20438 mechanism thereby lowering the scores of all non-permanent score rules.
20439 The decay itself if performed by the @code{gnus-decay-score-function}
20440 function, which is @code{gnus-decay-score} by default.  Here's the
20441 definition of that function:
20442
20443 @lisp
20444 (defun gnus-decay-score (score)
20445   "Decay SCORE according to `gnus-score-decay-constant'
20446 and `gnus-score-decay-scale'."
20447   (let ((n (- score
20448               (* (if (< score 0) -1 1)
20449                  (min (abs score)
20450                       (max gnus-score-decay-constant
20451                            (* (abs score)
20452                               gnus-score-decay-scale)))))))
20453     (if (and (featurep 'xemacs)
20454              ;; XEmacs' floor can handle only the floating point
20455              ;; number below the half of the maximum integer.
20456              (> (abs n) (lsh -1 -2)))
20457         (string-to-number
20458          (car (split-string (number-to-string n) "\\.")))
20459       (floor n))))
20460 @end lisp
20461
20462 @vindex gnus-score-decay-scale
20463 @vindex gnus-score-decay-constant
20464 @code{gnus-score-decay-constant} is 3 by default and
20465 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20466
20467 @enumerate
20468 @item
20469 Scores between -3 and 3 will be set to 0 when this function is called.
20470
20471 @item
20472 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20473
20474 @item
20475 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20476 score.
20477 @end enumerate
20478
20479 If you don't like this decay function, write your own.  It is called
20480 with the score to be decayed as its only parameter, and it should return
20481 the new score, which should be an integer.
20482
20483 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20484 four days, Gnus will decay the scores four times, for instance.
20485
20486 @iftex
20487 @iflatex
20488 @chapter Message
20489 @include message.texi
20490 @chapter Emacs MIME
20491 @include emacs-mime.texi
20492 @chapter Sieve
20493 @include sieve.texi
20494 @chapter PGG
20495 @include pgg.texi
20496 @chapter SASL
20497 @include sasl.texi
20498 @end iflatex
20499 @end iftex
20500
20501 @node Various
20502 @chapter Various
20503
20504 @menu
20505 * Process/Prefix::              A convention used by many treatment commands.
20506 * Interactive::                 Making Gnus ask you many questions.
20507 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20508 * Formatting Variables::        You can specify what buffers should look like.
20509 * Window Layout::               Configuring the Gnus buffer windows.
20510 * Faces and Fonts::             How to change how faces look.
20511 * Compilation::                 How to speed Gnus up.
20512 * Mode Lines::                  Displaying information in the mode lines.
20513 * Highlighting and Menus::      Making buffers look all nice and cozy.
20514 * Buttons::                     Get tendinitis in ten easy steps!
20515 * Daemons::                     Gnus can do things behind your back.
20516 * NoCeM::                       How to avoid spam and other fatty foods.
20517 * Undo::                        Some actions can be undone.
20518 * Predicate Specifiers::        Specifying predicates.
20519 * Moderation::                  What to do if you're a moderator.
20520 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20521 * Fuzzy Matching::              What's the big fuzz?
20522 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20523 * Other modes::                 Interaction with other modes.
20524 * Various Various::             Things that are really various.
20525 @end menu
20526
20527
20528 @node Process/Prefix
20529 @section Process/Prefix
20530 @cindex process/prefix convention
20531
20532 Many functions, among them functions for moving, decoding and saving
20533 articles, use what is known as the @dfn{Process/Prefix convention}.
20534
20535 This is a method for figuring out what articles the user wants the
20536 command to be performed on.
20537
20538 It goes like this:
20539
20540 If the numeric prefix is N, perform the operation on the next N
20541 articles, starting with the current one.  If the numeric prefix is
20542 negative, perform the operation on the previous N articles, starting
20543 with the current one.
20544
20545 @vindex transient-mark-mode
20546 If @code{transient-mark-mode} in non-@code{nil} and the region is
20547 active, all articles in the region will be worked upon.
20548
20549 If there is no numeric prefix, but some articles are marked with the
20550 process mark, perform the operation on the articles marked with
20551 the process mark.
20552
20553 If there is neither a numeric prefix nor any articles marked with the
20554 process mark, just perform the operation on the current article.
20555
20556 Quite simple, really, but it needs to be made clear so that surprises
20557 are avoided.
20558
20559 Commands that react to the process mark will push the current list of
20560 process marked articles onto a stack and will then clear all process
20561 marked articles.  You can restore the previous configuration with the
20562 @kbd{M P y} command (@pxref{Setting Process Marks}).
20563
20564 @vindex gnus-summary-goto-unread
20565 One thing that seems to shock & horrify lots of people is that, for
20566 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20567 Since each @kbd{d} (which marks the current article as read) by default
20568 goes to the next unread article after marking, this means that @kbd{3 d}
20569 will mark the next three unread articles as read, no matter what the
20570 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20571 @code{nil} for a more straightforward action.
20572
20573 Many commands do not use the process/prefix convention.  All commands
20574 that do explicitly say so in this manual.  To apply the process/prefix
20575 convention to commands that do not use it, you can use the @kbd{M-&}
20576 command.  For instance, to mark all the articles in the group as
20577 expirable, you could say @kbd{M P b M-& E}.
20578
20579
20580 @node Interactive
20581 @section Interactive
20582 @cindex interaction
20583
20584 @table @code
20585
20586 @item gnus-novice-user
20587 @vindex gnus-novice-user
20588 If this variable is non-@code{nil}, you are either a newcomer to the
20589 World of Usenet, or you are very cautious, which is a nice thing to be,
20590 really.  You will be given questions of the type ``Are you sure you want
20591 to do this?'' before doing anything dangerous.  This is @code{t} by
20592 default.
20593
20594 @item gnus-expert-user
20595 @vindex gnus-expert-user
20596 If this variable is non-@code{nil}, you will seldom be asked any
20597 questions by Gnus.  It will simply assume you know what you're doing, no
20598 matter how strange.
20599
20600 @item gnus-interactive-catchup
20601 @vindex gnus-interactive-catchup
20602 Require confirmation before catching up a group if non-@code{nil}.  It
20603 is @code{t} by default.
20604
20605 @item gnus-interactive-exit
20606 @vindex gnus-interactive-exit
20607 Require confirmation before exiting Gnus.  This variable is @code{t} by
20608 default.
20609 @end table
20610
20611
20612 @node Symbolic Prefixes
20613 @section Symbolic Prefixes
20614 @cindex symbolic prefixes
20615
20616 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20617 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20618 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20619 rule of 900 to the current article.
20620
20621 This is all nice and well, but what if you want to give a command some
20622 additional information?  Well, what most commands do is interpret the
20623 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20624 doesn't want a backup file to be created when saving the current buffer,
20625 for instance.  But what if you want to save without making a backup
20626 file, and you want Emacs to flash lights and play a nice tune at the
20627 same time?  You can't, and you're probably perfectly happy that way.
20628
20629 @kindex M-i (Summary)
20630 @findex gnus-symbolic-argument
20631 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20632 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20633 character typed in is the value.  You can stack as many @kbd{M-i}
20634 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20635 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20636 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20637 @code{b}''.  You get the drift.
20638
20639 Typing in symbolic prefixes to commands that don't accept them doesn't
20640 hurt, but it doesn't do any good either.  Currently not many Gnus
20641 functions make use of the symbolic prefix.
20642
20643 If you're interested in how Gnus implements this, @pxref{Extended
20644 Interactive}.
20645
20646
20647 @node Formatting Variables
20648 @section Formatting Variables
20649 @cindex formatting variables
20650
20651 Throughout this manual you've probably noticed lots of variables called
20652 things like @code{gnus-group-line-format} and
20653 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20654 output lines in the various buffers.  There's quite a lot of them.
20655 Fortunately, they all use the same syntax, so there's not that much to
20656 be annoyed by.
20657
20658 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20659 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20660 lots of percentages everywhere.
20661
20662 @menu
20663 * Formatting Basics::           A formatting variable is basically a format string.
20664 * Mode Line Formatting::        Some rules about mode line formatting variables.
20665 * Advanced Formatting::         Modifying output in various ways.
20666 * User-Defined Specs::          Having Gnus call your own functions.
20667 * Formatting Fonts::            Making the formatting look colorful and nice.
20668 * Positioning Point::           Moving point to a position after an operation.
20669 * Tabulation::                  Tabulating your output.
20670 * Wide Characters::             Dealing with wide characters.
20671 @end menu
20672
20673 Currently Gnus uses the following formatting variables:
20674 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20675 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20676 @code{gnus-group-mode-line-format},
20677 @code{gnus-summary-mode-line-format},
20678 @code{gnus-article-mode-line-format},
20679 @code{gnus-server-mode-line-format}, and
20680 @code{gnus-summary-pick-line-format}.
20681
20682 All these format variables can also be arbitrary elisp forms.  In that
20683 case, they will be @code{eval}ed to insert the required lines.
20684
20685 @kindex M-x gnus-update-format
20686 @findex gnus-update-format
20687 Gnus includes a command to help you while creating your own format
20688 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20689 update the spec in question and pop you to a buffer where you can
20690 examine the resulting Lisp code to be run to generate the line.
20691
20692
20693
20694 @node Formatting Basics
20695 @subsection Formatting Basics
20696
20697 Each @samp{%} element will be replaced by some string or other when the
20698 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20699 spec, and pad with spaces to get a 5-character field''.
20700
20701 As with normal C and Emacs Lisp formatting strings, the numerical
20702 modifier between the @samp{%} and the formatting type character will
20703 @dfn{pad} the output so that it is always at least that long.
20704 @samp{%5y} will make the field always (at least) five characters wide by
20705 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20706 the right instead.
20707
20708 You may also wish to limit the length of the field to protect against
20709 particularly wide values.  For that you can say @samp{%4,6y}, which
20710 means that the field will never be more than 6 characters wide and never
20711 less than 4 characters wide.
20712
20713 Also Gnus supports some extended format specifications, such as
20714 @samp{%&user-date;}.
20715
20716
20717 @node Mode Line Formatting
20718 @subsection Mode Line Formatting
20719
20720 Mode line formatting variables (e.g.,
20721 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20722 buffer line oriented formatting variables (@pxref{Formatting Basics})
20723 with the following two differences:
20724
20725 @enumerate
20726
20727 @item
20728 There must be no newline (@samp{\n}) at the end.
20729
20730 @item
20731 The special @samp{%%b} spec can be used to display the buffer name.
20732 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20733 @samp{%} to allow it to pass through the formatting machinery unmangled,
20734 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20735 display interprets to mean ``show the buffer name''.  For a full list of
20736 mode line specs Emacs understands, see the documentation of the
20737 @code{mode-line-format} variable.
20738
20739 @end enumerate
20740
20741
20742 @node Advanced Formatting
20743 @subsection Advanced Formatting
20744
20745 It is frequently useful to post-process the fields in some way.
20746 Padding, limiting, cutting off parts and suppressing certain values can
20747 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20748 look like @samp{%~(cut 3)~(ignore "0")y}.
20749
20750 These are the valid modifiers:
20751
20752 @table @code
20753 @item pad
20754 @itemx pad-left
20755 Pad the field to the left with spaces until it reaches the required
20756 length.
20757
20758 @item pad-right
20759 Pad the field to the right with spaces until it reaches the required
20760 length.
20761
20762 @item max
20763 @itemx max-left
20764 Cut off characters from the left until it reaches the specified length.
20765
20766 @item max-right
20767 Cut off characters from the right until it reaches the specified
20768 length.
20769
20770 @item cut
20771 @itemx cut-left
20772 Cut off the specified number of characters from the left.
20773
20774 @item cut-right
20775 Cut off the specified number of characters from the right.
20776
20777 @item ignore
20778 Return an empty string if the field is equal to the specified value.
20779
20780 @item form
20781 Use the specified form as the field value when the @samp{@@} spec is
20782 used.
20783
20784 Here's an example:
20785
20786 @lisp
20787 "~(form (current-time-string))@@"
20788 @end lisp
20789
20790 @end table
20791
20792 Let's take an example.  The @samp{%o} spec in the summary mode lines
20793 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20794 This is quite a mouthful, so we want to shave off the century number and
20795 the time, leaving us with a six-character date.  That would be
20796 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20797 maxing, and we need the padding to ensure that the date is never less
20798 than 6 characters to make it look nice in columns.)
20799
20800 Ignoring is done first; then cutting; then maxing; and then as the very
20801 last operation, padding.
20802
20803 If you use lots of these advanced thingies, you'll find that Gnus gets
20804 quite slow.  This can be helped enormously by running @kbd{M-x
20805 gnus-compile} when you are satisfied with the look of your lines.
20806 @xref{Compilation}.
20807
20808
20809 @node User-Defined Specs
20810 @subsection User-Defined Specs
20811
20812 All the specs allow for inserting user defined specifiers---@samp{u}.
20813 The next character in the format string should be a letter.  Gnus
20814 will call the function @code{gnus-user-format-function-}@samp{X}, where
20815 @samp{X} is the letter following @samp{%u}.  The function will be passed
20816 a single parameter---what the parameter means depends on what buffer
20817 it's being called from.  The function should return a string, which will
20818 be inserted into the buffer just like information from any other
20819 specifier.  This function may also be called with dummy values, so it
20820 should protect against that.
20821
20822 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20823 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20824
20825 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20826 much the same without defining new functions.  Here's an example:
20827 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20828 given here will be evaluated to yield the current line number, and then
20829 inserted.
20830
20831
20832 @node Formatting Fonts
20833 @subsection Formatting Fonts
20834
20835 There are specs for highlighting, and these are shared by all the format
20836 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20837 the special @code{mouse-face} property set, which means that it will be
20838 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20839 over it.
20840
20841 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20842 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20843 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20844 and so on.  Create as many faces as you wish.  The same goes for the
20845 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20846 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20847
20848 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20849 special @code{balloon-help} property set to
20850 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20851 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20852 variables should be either strings or symbols naming functions that
20853 return a string.  When the mouse passes over text with this property
20854 set, a balloon window will appear and display the string.  Please
20855 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20856 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20857 XEmacs) for more information on this.  (For technical reasons, the
20858 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20859 paragraph.)
20860
20861 Here's an alternative recipe for the group buffer:
20862
20863 @lisp
20864 ;; @r{Create three face types.}
20865 (setq gnus-face-1 'bold)
20866 (setq gnus-face-3 'italic)
20867
20868 ;; @r{We want the article count to be in}
20869 ;; @r{a bold and green face.  So we create}
20870 ;; @r{a new face called @code{my-green-bold}.}
20871 (copy-face 'bold 'my-green-bold)
20872 ;; @r{Set the color.}
20873 (set-face-foreground 'my-green-bold "ForestGreen")
20874 (setq gnus-face-2 'my-green-bold)
20875
20876 ;; @r{Set the new & fancy format.}
20877 (setq gnus-group-line-format
20878       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20879 @end lisp
20880
20881 I'm sure you'll be able to use this scheme to create totally unreadable
20882 and extremely vulgar displays.  Have fun!
20883
20884 Note that the @samp{%(} specs (and friends) do not make any sense on the
20885 mode-line variables.
20886
20887 @node Positioning Point
20888 @subsection Positioning Point
20889
20890 Gnus usually moves point to a pre-defined place on each line in most
20891 buffers.  By default, point move to the first colon character on the
20892 line.  You can customize this behaviour in three different ways.
20893
20894 You can move the colon character to somewhere else on the line.
20895
20896 @findex gnus-goto-colon
20897 You can redefine the function that moves the point to the colon.  The
20898 function is called @code{gnus-goto-colon}.
20899
20900 But perhaps the most convenient way to deal with this, if you don't want
20901 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20902 put a @samp{%*} somewhere in your format line definition, Gnus will
20903 place point there.
20904
20905
20906 @node Tabulation
20907 @subsection Tabulation
20908
20909 You can usually line up your displays by padding and cutting your
20910 strings.  However, when combining various strings of different size, it
20911 can often be more convenient to just output the strings, and then worry
20912 about lining up the following text afterwards.
20913
20914 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20915 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20916
20917 @samp{%50=} will insert space characters to pad the line up to column
20918 50.  If the text is already past column 50, nothing will be inserted.
20919 This is the soft tabulator.
20920
20921 @samp{%-50=} will insert space characters to pad the line up to column
20922 50.  If the text is already past column 50, the excess text past column
20923 50 will be removed.  This is the hard tabulator.
20924
20925
20926 @node Wide Characters
20927 @subsection Wide Characters
20928
20929 Fixed width fonts in most countries have characters of the same width.
20930 Some countries, however, use Latin characters mixed with wider
20931 characters---most notable East Asian countries.
20932
20933 The problem is that when formatting, Gnus assumes that if a string is 10
20934 characters wide, it'll be 10 Latin characters wide on the screen.  In
20935 these countries, that's not true.
20936
20937 @vindex gnus-use-correct-string-widths
20938 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20939 @code{t}.  This makes buffer generation slower, but the results will be
20940 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20941 for Emacs.
20942
20943
20944 @node Window Layout
20945 @section Window Layout
20946 @cindex window layout
20947
20948 No, there's nothing here about X, so be quiet.
20949
20950 @vindex gnus-use-full-window
20951 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20952 other windows and occupy the entire Emacs screen by itself.  It is
20953 @code{t} by default.
20954
20955 Setting this variable to @code{nil} kinda works, but there are
20956 glitches.  Use at your own peril.
20957
20958 @vindex gnus-buffer-configuration
20959 @code{gnus-buffer-configuration} describes how much space each Gnus
20960 buffer should be given.  Here's an excerpt of this variable:
20961
20962 @lisp
20963 ((group (vertical 1.0 (group 1.0 point)
20964                       (if gnus-carpal (group-carpal 4))))
20965  (article (vertical 1.0 (summary 0.25 point)
20966                         (article 1.0))))
20967 @end lisp
20968
20969 This is an alist.  The @dfn{key} is a symbol that names some action or
20970 other.  For instance, when displaying the group buffer, the window
20971 configuration function will use @code{group} as the key.  A full list of
20972 possible names is listed below.
20973
20974 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20975 should occupy.  To take the @code{article} split as an example -
20976
20977 @lisp
20978 (article (vertical 1.0 (summary 0.25 point)
20979                        (article 1.0)))
20980 @end lisp
20981
20982 This @dfn{split} says that the summary buffer should occupy 25% of upper
20983 half of the screen, and that it is placed over the article buffer.  As
20984 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20985 reaching for that calculator there).  However, the special number
20986 @code{1.0} is used to signal that this buffer should soak up all the
20987 rest of the space available after the rest of the buffers have taken
20988 whatever they need.  There should be only one buffer with the @code{1.0}
20989 size spec per split.
20990
20991 Point will be put in the buffer that has the optional third element
20992 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20993 split where the tag @code{frame-focus} is a member (i.e. is the third or
20994 fourth element in the list, depending on whether the @code{point} tag is
20995 present) gets focus.
20996
20997 Here's a more complicated example:
20998
20999 @lisp
21000 (article (vertical 1.0 (group 4)
21001                        (summary 0.25 point)
21002                        (if gnus-carpal (summary-carpal 4))
21003                        (article 1.0)))
21004 @end lisp
21005
21006 If the size spec is an integer instead of a floating point number,
21007 then that number will be used to say how many lines a buffer should
21008 occupy, not a percentage.
21009
21010 If the @dfn{split} looks like something that can be @code{eval}ed (to be
21011 precise---if the @code{car} of the split is a function or a subr), this
21012 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
21013 be used as a split.  This means that there will be three buffers if
21014 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
21015 is non-@code{nil}.
21016
21017 Not complicated enough for you?  Well, try this on for size:
21018
21019 @lisp
21020 (article (horizontal 1.0
21021              (vertical 0.5
21022                  (group 1.0)
21023                  (gnus-carpal 4))
21024              (vertical 1.0
21025                  (summary 0.25 point)
21026                  (summary-carpal 4)
21027                  (article 1.0))))
21028 @end lisp
21029
21030 Whoops.  Two buffers with the mystery 100% tag.  And what's that
21031 @code{horizontal} thingie?
21032
21033 If the first element in one of the split is @code{horizontal}, Gnus will
21034 split the window horizontally, giving you two windows side-by-side.
21035 Inside each of these strips you may carry on all you like in the normal
21036 fashion.  The number following @code{horizontal} says what percentage of
21037 the screen is to be given to this strip.
21038
21039 For each split, there @emph{must} be one element that has the 100% tag.
21040 The splitting is never accurate, and this buffer will eat any leftover
21041 lines from the splits.
21042
21043 To be slightly more formal, here's a definition of what a valid split
21044 may look like:
21045
21046 @example
21047 @group
21048 split      = frame | horizontal | vertical | buffer | form
21049 frame      = "(frame " size *split ")"
21050 horizontal = "(horizontal " size *split ")"
21051 vertical   = "(vertical " size *split ")"
21052 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
21053 size       = number | frame-params
21054 buf-name   = group | article | summary ...
21055 @end group
21056 @end example
21057
21058 The limitations are that the @code{frame} split can only appear as the
21059 top-level split.  @var{form} should be an Emacs Lisp form that should
21060 return a valid split.  We see that each split is fully recursive, and
21061 may contain any number of @code{vertical} and @code{horizontal} splits.
21062
21063 @vindex gnus-window-min-width
21064 @vindex gnus-window-min-height
21065 @cindex window height
21066 @cindex window width
21067 Finding the right sizes can be a bit complicated.  No window may be less
21068 than @code{gnus-window-min-height} (default 1) characters high, and all
21069 windows must be at least @code{gnus-window-min-width} (default 1)
21070 characters wide.  Gnus will try to enforce this before applying the
21071 splits.  If you want to use the normal Emacs window width/height limit,
21072 you can just set these two variables to @code{nil}.
21073
21074 If you're not familiar with Emacs terminology, @code{horizontal} and
21075 @code{vertical} splits may work the opposite way of what you'd expect.
21076 Windows inside a @code{horizontal} split are shown side-by-side, and
21077 windows within a @code{vertical} split are shown above each other.
21078
21079 @findex gnus-configure-frame
21080 If you want to experiment with window placement, a good tip is to call
21081 @code{gnus-configure-frame} directly with a split.  This is the function
21082 that does all the real work when splitting buffers.  Below is a pretty
21083 nonsensical configuration with 5 windows; two for the group buffer and
21084 three for the article buffer.  (I said it was nonsensical.)  If you
21085 @code{eval} the statement below, you can get an idea of how that would
21086 look straight away, without going through the normal Gnus channels.
21087 Play with it until you're satisfied, and then use
21088 @code{gnus-add-configuration} to add your new creation to the buffer
21089 configuration list.
21090
21091 @lisp
21092 (gnus-configure-frame
21093  '(horizontal 1.0
21094     (vertical 10
21095       (group 1.0)
21096       (article 0.3 point))
21097     (vertical 1.0
21098       (article 1.0)
21099       (horizontal 4
21100         (group 1.0)
21101         (article 10)))))
21102 @end lisp
21103
21104 You might want to have several frames as well.  No prob---just use the
21105 @code{frame} split:
21106
21107 @lisp
21108 (gnus-configure-frame
21109  '(frame 1.0
21110          (vertical 1.0
21111                    (summary 0.25 point frame-focus)
21112                    (article 1.0))
21113          (vertical ((height . 5) (width . 15)
21114                     (user-position . t)
21115                     (left . -1) (top . 1))
21116                    (picon 1.0))))
21117
21118 @end lisp
21119
21120 This split will result in the familiar summary/article window
21121 configuration in the first (or ``main'') frame, while a small additional
21122 frame will be created where picons will be shown.  As you can see,
21123 instead of the normal @code{1.0} top-level spec, each additional split
21124 should have a frame parameter alist as the size spec.
21125 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
21126 Reference Manual}.  Under XEmacs, a frame property list will be
21127 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
21128 is such a plist.
21129 The list of all possible keys for @code{gnus-buffer-configuration} can
21130 be found in its default value.
21131
21132 Note that the @code{message} key is used for both
21133 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
21134 it is desirable to distinguish between the two, something like this
21135 might be used:
21136
21137 @lisp
21138 (message (horizontal 1.0
21139                      (vertical 1.0 (message 1.0 point))
21140                      (vertical 0.24
21141                                (if (buffer-live-p gnus-summary-buffer)
21142                                    '(summary 0.5))
21143                                (group 1.0))))
21144 @end lisp
21145
21146 One common desire for a multiple frame split is to have a separate frame
21147 for composing mail and news while leaving the original frame intact.  To
21148 accomplish that, something like the following can be done:
21149
21150 @lisp
21151 (message
21152   (frame 1.0
21153          (if (not (buffer-live-p gnus-summary-buffer))
21154              (car (cdr (assoc 'group gnus-buffer-configuration)))
21155            (car (cdr (assoc 'summary gnus-buffer-configuration))))
21156          (vertical ((user-position . t) (top . 1) (left . 1)
21157                     (name . "Message"))
21158                    (message 1.0 point))))
21159 @end lisp
21160
21161 @findex gnus-add-configuration
21162 Since the @code{gnus-buffer-configuration} variable is so long and
21163 complicated, there's a function you can use to ease changing the config
21164 of a single setting: @code{gnus-add-configuration}.  If, for instance,
21165 you want to change the @code{article} setting, you could say:
21166
21167 @lisp
21168 (gnus-add-configuration
21169  '(article (vertical 1.0
21170                (group 4)
21171                (summary .25 point)
21172                (article 1.0))))
21173 @end lisp
21174
21175 You'd typically stick these @code{gnus-add-configuration} calls in your
21176 @file{~/.gnus.el} file or in some startup hook---they should be run after
21177 Gnus has been loaded.
21178
21179 @vindex gnus-always-force-window-configuration
21180 If all windows mentioned in the configuration are already visible, Gnus
21181 won't change the window configuration.  If you always want to force the
21182 ``right'' window configuration, you can set
21183 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21184
21185 If you're using tree displays (@pxref{Tree Display}), and the tree
21186 window is displayed vertically next to another window, you may also want
21187 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21188 windows resized.
21189
21190 @subsection Example Window Configurations
21191
21192 @itemize @bullet
21193 @item
21194 Narrow left hand side occupied by group buffer.  Right hand side split
21195 between summary buffer (top one-sixth) and article buffer (bottom).
21196
21197 @ifinfo
21198 @example
21199 +---+---------+
21200 | G | Summary |
21201 | r +---------+
21202 | o |         |
21203 | u | Article |
21204 | p |         |
21205 +---+---------+
21206 @end example
21207 @end ifinfo
21208
21209 @lisp
21210 (gnus-add-configuration
21211  '(article
21212    (horizontal 1.0
21213                (vertical 25 (group 1.0))
21214                (vertical 1.0
21215                          (summary 0.16 point)
21216                          (article 1.0)))))
21217
21218 (gnus-add-configuration
21219  '(summary
21220    (horizontal 1.0
21221                (vertical 25 (group 1.0))
21222                (vertical 1.0 (summary 1.0 point)))))
21223 @end lisp
21224
21225 @end itemize
21226
21227
21228 @node Faces and Fonts
21229 @section Faces and Fonts
21230 @cindex faces
21231 @cindex fonts
21232 @cindex colors
21233
21234 Fiddling with fonts and faces used to be very difficult, but these days
21235 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21236 the face you want to alter, and alter it via the standard Customize
21237 interface.
21238
21239
21240 @node Compilation
21241 @section Compilation
21242 @cindex compilation
21243 @cindex byte-compilation
21244
21245 @findex gnus-compile
21246
21247 Remember all those line format specification variables?
21248 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21249 on.  Now, Gnus will of course heed whatever these variables are, but,
21250 unfortunately, changing them will mean a quite significant slow-down.
21251 (The default values of these variables have byte-compiled functions
21252 associated with them, while the user-generated versions do not, of
21253 course.)
21254
21255 To help with this, you can run @kbd{M-x gnus-compile} after you've
21256 fiddled around with the variables and feel that you're (kind of)
21257 satisfied.  This will result in the new specs being byte-compiled, and
21258 you'll get top speed again.  Gnus will save these compiled specs in the
21259 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21260 this function, though---you should compile them yourself by sticking
21261 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21262
21263
21264 @node Mode Lines
21265 @section Mode Lines
21266 @cindex mode lines
21267
21268 @vindex gnus-updated-mode-lines
21269 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21270 lines updated.  It is a list of symbols.  Supported symbols include
21271 @code{group}, @code{article}, @code{summary}, @code{server},
21272 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21273 Gnus will keep that mode line updated with information that may be
21274 pertinent.  If this variable is @code{nil}, screen refresh may be
21275 quicker.
21276
21277 @cindex display-time
21278
21279 @vindex gnus-mode-non-string-length
21280 By default, Gnus displays information on the current article in the mode
21281 lines of the summary and article buffers.  The information Gnus wishes
21282 to display (e.g. the subject of the article) is often longer than the
21283 mode lines, and therefore have to be cut off at some point.  The
21284 @code{gnus-mode-non-string-length} variable says how long the other
21285 elements on the line is (i.e., the non-info part).  If you put
21286 additional elements on the mode line (e.g. a clock), you should modify
21287 this variable:
21288
21289 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21290 @lisp
21291 (add-hook 'display-time-hook
21292           (lambda () (setq gnus-mode-non-string-length
21293                            (+ 21
21294                               (if line-number-mode 5 0)
21295                               (if column-number-mode 4 0)
21296                               (length display-time-string)))))
21297 @end lisp
21298
21299 If this variable is @code{nil} (which is the default), the mode line
21300 strings won't be chopped off, and they won't be padded either.  Note
21301 that the default is unlikely to be desirable, as even the percentage
21302 complete in the buffer may be crowded off the mode line; the user should
21303 configure this variable appropriately for her configuration.
21304
21305
21306 @node Highlighting and Menus
21307 @section Highlighting and Menus
21308 @cindex visual
21309 @cindex highlighting
21310 @cindex menus
21311
21312 @vindex gnus-visual
21313 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21314 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21315 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21316 file.
21317
21318 This variable can be a list of visual properties that are enabled.  The
21319 following elements are valid, and are all included by default:
21320
21321 @table @code
21322 @item group-highlight
21323 Do highlights in the group buffer.
21324 @item summary-highlight
21325 Do highlights in the summary buffer.
21326 @item article-highlight
21327 Do highlights in the article buffer.
21328 @item highlight
21329 Turn on highlighting in all buffers.
21330 @item group-menu
21331 Create menus in the group buffer.
21332 @item summary-menu
21333 Create menus in the summary buffers.
21334 @item article-menu
21335 Create menus in the article buffer.
21336 @item browse-menu
21337 Create menus in the browse buffer.
21338 @item server-menu
21339 Create menus in the server buffer.
21340 @item score-menu
21341 Create menus in the score buffers.
21342 @item menu
21343 Create menus in all buffers.
21344 @end table
21345
21346 So if you only want highlighting in the article buffer and menus in all
21347 buffers, you could say something like:
21348
21349 @lisp
21350 (setq gnus-visual '(article-highlight menu))
21351 @end lisp
21352
21353 If you want highlighting only and no menus whatsoever, you'd say:
21354
21355 @lisp
21356 (setq gnus-visual '(highlight))
21357 @end lisp
21358
21359 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21360 in all Gnus buffers.
21361
21362 Other general variables that influence the look of all buffers include:
21363
21364 @table @code
21365 @item gnus-mouse-face
21366 @vindex gnus-mouse-face
21367 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21368 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21369
21370 @end table
21371
21372 There are hooks associated with the creation of all the different menus:
21373
21374 @table @code
21375
21376 @item gnus-article-menu-hook
21377 @vindex gnus-article-menu-hook
21378 Hook called after creating the article mode menu.
21379
21380 @item gnus-group-menu-hook
21381 @vindex gnus-group-menu-hook
21382 Hook called after creating the group mode menu.
21383
21384 @item gnus-summary-menu-hook
21385 @vindex gnus-summary-menu-hook
21386 Hook called after creating the summary mode menu.
21387
21388 @item gnus-server-menu-hook
21389 @vindex gnus-server-menu-hook
21390 Hook called after creating the server mode menu.
21391
21392 @item gnus-browse-menu-hook
21393 @vindex gnus-browse-menu-hook
21394 Hook called after creating the browse mode menu.
21395
21396 @item gnus-score-menu-hook
21397 @vindex gnus-score-menu-hook
21398 Hook called after creating the score mode menu.
21399
21400 @end table
21401
21402
21403 @node Buttons
21404 @section Buttons
21405 @cindex buttons
21406 @cindex mouse
21407 @cindex click
21408
21409 Those new-fangled @dfn{mouse} contraptions is very popular with the
21410 young, hep kids who don't want to learn the proper way to do things
21411 these days.  Why, I remember way back in the summer of '89, when I was
21412 using Emacs on a Tops 20 system.  Three hundred users on one single
21413 machine, and every user was running Simula compilers.  Bah!
21414
21415 Right.
21416
21417 @vindex gnus-carpal
21418 Well, you can make Gnus display bufferfuls of buttons you can click to
21419 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21420 really.  Tell the chiropractor I sent you.
21421
21422
21423 @table @code
21424
21425 @item gnus-carpal-mode-hook
21426 @vindex gnus-carpal-mode-hook
21427 Hook run in all carpal mode buffers.
21428
21429 @item gnus-carpal-button-face
21430 @vindex gnus-carpal-button-face
21431 Face used on buttons.
21432
21433 @item gnus-carpal-header-face
21434 @vindex gnus-carpal-header-face
21435 Face used on carpal buffer headers.
21436
21437 @item gnus-carpal-group-buffer-buttons
21438 @vindex gnus-carpal-group-buffer-buttons
21439 Buttons in the group buffer.
21440
21441 @item gnus-carpal-summary-buffer-buttons
21442 @vindex gnus-carpal-summary-buffer-buttons
21443 Buttons in the summary buffer.
21444
21445 @item gnus-carpal-server-buffer-buttons
21446 @vindex gnus-carpal-server-buffer-buttons
21447 Buttons in the server buffer.
21448
21449 @item gnus-carpal-browse-buffer-buttons
21450 @vindex gnus-carpal-browse-buffer-buttons
21451 Buttons in the browse buffer.
21452 @end table
21453
21454 All the @code{buttons} variables are lists.  The elements in these list
21455 are either cons cells where the @code{car} contains a text to be displayed and
21456 the @code{cdr} contains a function symbol, or a simple string.
21457
21458
21459 @node Daemons
21460 @section Daemons
21461 @cindex demons
21462 @cindex daemons
21463
21464 Gnus, being larger than any program ever written (allegedly), does lots
21465 of strange stuff that you may wish to have done while you're not
21466 present.  For instance, you may want it to check for new mail once in a
21467 while.  Or you may want it to close down all connections to all servers
21468 when you leave Emacs idle.  And stuff like that.
21469
21470 Gnus will let you do stuff like that by defining various
21471 @dfn{handlers}.  Each handler consists of three elements:  A
21472 @var{function}, a @var{time}, and an @var{idle} parameter.
21473
21474 Here's an example of a handler that closes connections when Emacs has
21475 been idle for thirty minutes:
21476
21477 @lisp
21478 (gnus-demon-close-connections nil 30)
21479 @end lisp
21480
21481 Here's a handler that scans for @acronym{PGP} headers every hour when
21482 Emacs is idle:
21483
21484 @lisp
21485 (gnus-demon-scan-pgp 60 t)
21486 @end lisp
21487
21488 This @var{time} parameter and that @var{idle} parameter work together
21489 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21490 @code{nil}, then the function will be called every @var{time} minutes.
21491
21492 If @var{idle} is @code{t}, then the function will be called after
21493 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21494 the function will never be called.  But once Emacs goes idle, the
21495 function will be called every @var{time} minutes.
21496
21497 If @var{idle} is a number and @var{time} is a number, the function will
21498 be called every @var{time} minutes only when Emacs has been idle for
21499 @var{idle} minutes.
21500
21501 If @var{idle} is a number and @var{time} is @code{nil}, the function
21502 will be called once every time Emacs has been idle for @var{idle}
21503 minutes.
21504
21505 And if @var{time} is a string, it should look like @samp{07:31}, and
21506 the function will then be called once every day somewhere near that
21507 time.  Modified by the @var{idle} parameter, of course.
21508
21509 @vindex gnus-demon-timestep
21510 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21511 seconds.  This is 60 by default.  If you change that variable,
21512 all the timings in the handlers will be affected.)
21513
21514 So, if you want to add a handler, you could put something like this in
21515 your @file{~/.gnus.el} file:
21516
21517 @findex gnus-demon-add-handler
21518 @lisp
21519 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21520 @end lisp
21521
21522 @findex gnus-demon-add-nocem
21523 @findex gnus-demon-add-scanmail
21524 @findex gnus-demon-add-rescan
21525 @findex gnus-demon-add-scan-timestamps
21526 @findex gnus-demon-add-disconnection
21527 Some ready-made functions to do this have been created:
21528 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21529 @code{gnus-demon-add-nntp-close-connection},
21530 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21531 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21532 @file{~/.gnus.el} if you want those abilities.
21533
21534 @findex gnus-demon-init
21535 @findex gnus-demon-cancel
21536 @vindex gnus-demon-handlers
21537 If you add handlers to @code{gnus-demon-handlers} directly, you should
21538 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21539 daemons, you can use the @code{gnus-demon-cancel} function.
21540
21541 Note that adding daemons can be pretty naughty if you over do it.  Adding
21542 functions that scan all news and mail from all servers every two seconds
21543 is a sure-fire way of getting booted off any respectable system.  So
21544 behave.
21545
21546
21547 @node NoCeM
21548 @section NoCeM
21549 @cindex nocem
21550 @cindex spam
21551
21552 @dfn{Spamming} is posting the same article lots and lots of times.
21553 Spamming is bad.  Spamming is evil.
21554
21555 Spamming is usually canceled within a day or so by various anti-spamming
21556 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21557 NoCeM is pronounced ``no see-'em'', and means what the name
21558 implies---these are messages that make the offending articles, like, go
21559 away.
21560
21561 What use are these NoCeM messages if the articles are canceled anyway?
21562 Some sites do not honor cancel messages and some sites just honor cancels
21563 from a select few people.  Then you may wish to make use of the NoCeM
21564 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21565
21566 Gnus can read and parse the messages in this group automatically, and
21567 this will make spam disappear.
21568
21569 There are some variables to customize, of course:
21570
21571 @table @code
21572 @item gnus-use-nocem
21573 @vindex gnus-use-nocem
21574 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21575 by default.
21576
21577 @item gnus-nocem-groups
21578 @vindex gnus-nocem-groups
21579 Gnus will look for NoCeM messages in the groups in this list.  The
21580 default is
21581 @lisp
21582 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21583  "alt.nocem.misc" "news.admin.net-abuse.announce")
21584 @end lisp
21585
21586 @item gnus-nocem-issuers
21587 @vindex gnus-nocem-issuers
21588 There are many people issuing NoCeM messages.  This list says what
21589 people you want to listen to.  The default is
21590 @lisp
21591 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21592  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21593 @end lisp
21594 fine, upstanding citizens all of them.
21595
21596 Known despammers that you can put in this list are listed at@*
21597 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21598
21599 You do not have to heed NoCeM messages from all these people---just the
21600 ones you want to listen to.  You also don't have to accept all NoCeM
21601 messages from the people you like.  Each NoCeM message has a @dfn{type}
21602 header that gives the message a (more or less, usually less) rigorous
21603 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21604 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21605 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21606 Each condition is either a string (which is a regexp that matches types
21607 you want to use) or a list on the form @code{(not @var{string})}, where
21608 @var{string} is a regexp that matches types you don't want to use.
21609
21610 For instance, if you want all NoCeM messages from Chris Lewis except his
21611 @samp{troll} messages, you'd say:
21612
21613 @lisp
21614 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21615 @end lisp
21616
21617 On the other hand, if you just want nothing but his @samp{spam} and
21618 @samp{spew} messages, you'd say:
21619
21620 @lisp
21621 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21622 @end lisp
21623
21624 The specs are applied left-to-right.
21625
21626
21627 @item gnus-nocem-verifyer
21628 @vindex gnus-nocem-verifyer
21629 @findex mc-verify
21630 This should be a function for verifying that the NoCeM issuer is who she
21631 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21632 function.  If this is too slow and you don't care for verification
21633 (which may be dangerous), you can set this variable to @code{nil}.
21634
21635 If you want signed NoCeM messages to be verified and unsigned messages
21636 not to be verified (but used anyway), you could do something like:
21637
21638 @lisp
21639 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21640
21641 (defun my-gnus-mc-verify ()
21642   (not (eq 'forged
21643            (ignore-errors
21644              (if (mc-verify)
21645                  t
21646                'forged)))))
21647 @end lisp
21648
21649 This might be dangerous, though.
21650
21651 @item gnus-nocem-directory
21652 @vindex gnus-nocem-directory
21653 This is where Gnus will store its NoCeM cache files.  The default is@*
21654 @file{~/News/NoCeM/}.
21655
21656 @item gnus-nocem-expiry-wait
21657 @vindex gnus-nocem-expiry-wait
21658 The number of days before removing old NoCeM entries from the cache.
21659 The default is 15.  If you make it shorter Gnus will be faster, but you
21660 might then see old spam.
21661
21662 @item gnus-nocem-check-from
21663 @vindex gnus-nocem-check-from
21664 Non-@code{nil} means check for valid issuers in message bodies.
21665 Otherwise don't bother fetching articles unless their author matches a
21666 valid issuer; that is much faster if you are selective about the
21667 issuers.
21668
21669 @item gnus-nocem-check-article-limit
21670 @vindex gnus-nocem-check-article-limit
21671 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21672 group.  NoCeM groups can be huge and very slow to process.
21673
21674 @end table
21675
21676 Using NoCeM could potentially be a memory hog.  If you have many living
21677 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21678 big.  If this is a problem, you should kill off all (or most) of your
21679 unsubscribed groups (@pxref{Subscription Commands}).
21680
21681
21682 @node Undo
21683 @section Undo
21684 @cindex undo
21685
21686 It is very useful to be able to undo actions one has done.  In normal
21687 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21688 In Gnus buffers, however, it isn't that simple.
21689
21690 The things Gnus displays in its buffer is of no value whatsoever to
21691 Gnus---it's all just data designed to look nice to the user.
21692 Killing a group in the group buffer with @kbd{C-k} makes the line
21693 disappear, but that's just a side-effect of the real action---the
21694 removal of the group in question from the internal Gnus structures.
21695 Undoing something like that can't be done by the normal Emacs
21696 @code{undo} function.
21697
21698 Gnus tries to remedy this somewhat by keeping track of what the user
21699 does and coming up with actions that would reverse the actions the user
21700 takes.  When the user then presses the @code{undo} key, Gnus will run
21701 the code to reverse the previous action, or the previous actions.
21702 However, not all actions are easily reversible, so Gnus currently offers
21703 a few key functions to be undoable.  These include killing groups,
21704 yanking groups, and changing the list of read articles of groups.
21705 That's it, really.  More functions may be added in the future, but each
21706 added function means an increase in data to be stored, so Gnus will
21707 never be totally undoable.
21708
21709 @findex gnus-undo-mode
21710 @vindex gnus-use-undo
21711 @findex gnus-undo
21712 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21713 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21714 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21715 command, which should feel kinda like the normal Emacs @code{undo}
21716 command.
21717
21718
21719 @node Predicate Specifiers
21720 @section Predicate Specifiers
21721 @cindex predicate specifiers
21722
21723 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21724 form that allows flexible specification of predicates without having
21725 to type all that much.
21726
21727 These specifiers are lists consisting of functions, symbols and lists.
21728
21729 Here's an example:
21730
21731 @lisp
21732 (or gnus-article-unseen-p
21733     gnus-article-unread-p)
21734 @end lisp
21735
21736 The available symbols are @code{or}, @code{and} and @code{not}.  The
21737 functions all take one parameter.
21738
21739 @findex gnus-make-predicate
21740 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21741 to create a function that can be called.  This input parameter to this
21742 function will be passed along to all the functions in the predicate
21743 specifier.
21744
21745
21746 @node Moderation
21747 @section Moderation
21748 @cindex moderation
21749
21750 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21751 It is not included in the standard Gnus package.  Write a mail to
21752 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21753 get a copy.
21754
21755 The moderation package is implemented as a minor mode for summary
21756 buffers.  Put
21757
21758 @lisp
21759 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21760 @end lisp
21761
21762 in your @file{~/.gnus.el} file.
21763
21764 If you are the moderator of @samp{rec.zoofle}, this is how it's
21765 supposed to work:
21766
21767 @enumerate
21768 @item
21769 You split your incoming mail by matching on
21770 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21771 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21772
21773 @item
21774 You enter that group once in a while and post articles using the @kbd{e}
21775 (edit-and-post) or @kbd{s} (just send unedited) commands.
21776
21777 @item
21778 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21779 articles that weren't approved by you, you can cancel them with the
21780 @kbd{c} command.
21781 @end enumerate
21782
21783 To use moderation mode in these two groups, say:
21784
21785 @lisp
21786 (setq gnus-moderated-list
21787       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21788 @end lisp
21789
21790
21791 @node Image Enhancements
21792 @section Image Enhancements
21793
21794 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21795 support images yet.}, is able to display pictures and stuff, so Gnus has
21796 taken advantage of that.
21797
21798 @menu
21799 * X-Face::                      Display a funky, teensy black-and-white image.
21800 * Face::                        Display a funkier, teensier colored image.
21801 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21802 * Picons::                      How to display pictures of what you're reading.
21803 * XVarious::                    Other XEmacsy Gnusey variables.
21804 @end menu
21805
21806
21807 @node X-Face
21808 @subsection X-Face
21809 @cindex x-face
21810
21811 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21812 depth) image that's supposed to represent the author of the message.
21813 It seems to be supported by an ever-growing number of mail and news
21814 readers.
21815
21816 @cindex x-face
21817 @findex gnus-article-display-x-face
21818 @vindex gnus-article-x-face-command
21819 @vindex gnus-article-x-face-too-ugly
21820 @iftex
21821 @iflatex
21822 \include{xface}
21823 @end iflatex
21824 @end iftex
21825 @c @anchor{X-Face}
21826
21827 Decoding an @code{X-Face} header either requires an Emacs that has
21828 @samp{compface} support (which most XEmacs versions has), or that you
21829 have @samp{compface} installed on your system.  If either is true,
21830 Gnus will default to displaying @code{X-Face} headers.
21831
21832 The variable that controls this is the
21833 @code{gnus-article-x-face-command} variable.  If this variable is a
21834 string, this string will be executed in a sub-shell.  If it is a
21835 function, this function will be called with the face as the argument.
21836 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21837 the @code{From} header, the face will not be shown.
21838
21839 The default action under Emacs 20 is to fork off the @code{display}
21840 program@footnote{@code{display} is from the ImageMagick package.  For
21841 the @code{uncompface} and @code{icontopbm} programs look for a package
21842 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21843 view the face.
21844
21845 Under XEmacs or Emacs 21+ with suitable image support, the default
21846 action is to display the face before the @code{From} header.  (It's
21847 nicer if XEmacs has been compiled with @code{X-Face} support---that
21848 will make display somewhat faster.  If there's no native @code{X-Face}
21849 support, Gnus will try to convert the @code{X-Face} header using
21850 external programs from the @code{pbmplus} package and
21851 friends.@footnote{On a GNU/Linux system look for packages with names
21852 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21853
21854 (Note: @code{x-face} is used in the variable/function names, not
21855 @code{xface}).
21856
21857 @noindent
21858 Face and variable:
21859
21860 @table @code
21861 @item gnus-x-face
21862 @vindex gnus-x-face
21863 Face to show X-Face.  The colors from this face are used as the
21864 foreground and background colors of the displayed X-Faces.  The
21865 default colors are black and white.
21866
21867 @item gnus-face-properties-alist
21868 @vindex gnus-face-properties-alist
21869 Alist of image types and properties applied to Face (@pxref{Face}) and
21870 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
21871 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
21872 XEmacs.  Here are examples:
21873
21874 @lisp
21875 ;; Specify the altitude of Face and X-Face images in the From header.
21876 (setq gnus-face-properties-alist
21877       '((pbm . (:face gnus-x-face :ascent 80))
21878         (png . (:ascent 80))))
21879
21880 ;; Show Face and X-Face images as pressed buttons.
21881 (setq gnus-face-properties-alist
21882       '((pbm . (:face gnus-x-face :relief -2))
21883         (png . (:relief -2))))
21884 @end lisp
21885
21886 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
21887 Reference Manual} for the valid properties for various image types.
21888 Currently, @code{pbm} is used for X-Face images and @code{png} is used
21889 for Face images in Emacs.  Only the @code{:face} property is effective
21890 on the @code{xface} image type in XEmacs if it is built with the
21891 @samp{libcompface} library.
21892 @end table
21893
21894 Gnus provides a few convenience functions and variables to allow
21895 easier insertion of X-Face headers in outgoing messages.
21896
21897 @findex gnus-random-x-face
21898 @vindex gnus-convert-pbm-to-x-face-command
21899 @vindex gnus-x-face-directory
21900 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21901 @code{gnus-x-face-directory} and picks one at random, and then
21902 converts it to the X-Face format by using the
21903 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21904 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21905 header data as a string.
21906
21907 @findex gnus-insert-random-x-face-header
21908 @code{gnus-insert-random-x-face-header} calls
21909 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21910 randomly generated data.
21911
21912 @findex gnus-x-face-from-file
21913 @vindex gnus-convert-image-to-x-face-command
21914 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21915 converts the file to X-Face format by using the
21916 @code{gnus-convert-image-to-x-face-command} shell command.
21917
21918 Here's how you would typically use the first function.  Put something
21919 like the following in your @file{~/.gnus.el} file:
21920
21921 @lisp
21922 (setq message-required-news-headers
21923       (nconc message-required-news-headers
21924              (list '(X-Face . gnus-random-x-face))))
21925 @end lisp
21926
21927 Using the last function would be something like this:
21928
21929 @lisp
21930 (setq message-required-news-headers
21931       (nconc message-required-news-headers
21932              (list '(X-Face . (lambda ()
21933                                 (gnus-x-face-from-file
21934                                  "~/My-face.gif"))))))
21935 @end lisp
21936
21937
21938 @node Face
21939 @subsection Face
21940 @cindex face
21941
21942 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21943
21944 @code{Face} headers are essentially a funkier version of @code{X-Face}
21945 ones. They describe a 48x48 pixel colored image that's supposed to
21946 represent the author of the message.
21947
21948 @cindex face
21949 @findex gnus-article-display-face
21950 The contents of a @code{Face} header must be a base64 encoded PNG image.
21951 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21952 specifications.
21953
21954 The @code{gnus-face-properties-alist} variable affects the appearance of
21955 displayed Face images.  @xref{X-Face}.
21956
21957 Gnus provides a few convenience functions and variables to allow
21958 easier insertion of Face headers in outgoing messages.
21959
21960 @findex gnus-convert-png-to-face
21961 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21962 726 bytes long, and converts it to a face.
21963
21964 @findex gnus-face-from-file
21965 @vindex gnus-convert-image-to-face-command
21966 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21967 converts the file to Face format by using the
21968 @code{gnus-convert-image-to-face-command} shell command.
21969
21970 Here's how you would typically use this function. Put something like the
21971 following in your @file{~/.gnus.el} file:
21972
21973 @lisp
21974 (setq message-required-news-headers
21975       (nconc message-required-news-headers
21976              (list '(Face . (lambda ()
21977                               (gnus-face-from-file "~/face.jpg"))))))
21978 @end lisp
21979
21980
21981 @node Smileys
21982 @subsection Smileys
21983 @cindex smileys
21984
21985 @iftex
21986 @iflatex
21987 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21988 \input{smiley}
21989 @end iflatex
21990 @end iftex
21991
21992 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21993 currently the only package that uses Smiley, it is documented here.
21994
21995 In short---to use Smiley in Gnus, put the following in your
21996 @file{~/.gnus.el} file:
21997
21998 @lisp
21999 (setq gnus-treat-display-smileys t)
22000 @end lisp
22001
22002 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
22003 the like---to pictures and displays those instead of the text smiley
22004 faces.  The conversion is controlled by a list of regexps that matches
22005 text and maps that to file names.
22006
22007 @vindex smiley-regexp-alist
22008 The alist used is specified by the @code{smiley-regexp-alist}
22009 variable.  The first item in each element is the regexp to be matched;
22010 the second element is the regexp match group that is to be replaced by
22011 the picture; and the third element is the name of the file to be
22012 displayed.
22013
22014 The following variables customize where Smiley will look for these
22015 files:
22016
22017 @table @code
22018
22019 @item smiley-data-directory
22020 @vindex smiley-data-directory
22021 Where Smiley will look for smiley faces files.
22022
22023 @item gnus-smiley-file-types
22024 @vindex gnus-smiley-file-types
22025 List of suffixes on smiley file names to try.
22026
22027 @end table
22028
22029
22030 @node Picons
22031 @subsection Picons
22032
22033 @iftex
22034 @iflatex
22035 \include{picons}
22036 @end iflatex
22037 @end iftex
22038
22039 So@dots{}  You want to slow down your news reader even more!  This is a
22040 good way to do so.  It's also a great way to impress people staring
22041 over your shoulder as you read news.
22042
22043 What are Picons?  To quote directly from the Picons Web site:
22044
22045 @iftex
22046 @iflatex
22047 \margindex{}
22048 @end iflatex
22049 @end iftex
22050
22051 @quotation
22052 @dfn{Picons} is short for ``personal icons''.  They're small,
22053 constrained images used to represent users and domains on the net,
22054 organized into databases so that the appropriate image for a given
22055 e-mail address can be found.  Besides users and domains, there are picon
22056 databases for Usenet newsgroups and weather forecasts.  The picons are
22057 in either monochrome @code{XBM} format or color @code{XPM} and
22058 @code{GIF} formats.
22059 @end quotation
22060
22061 @vindex gnus-picon-databases
22062 For instructions on obtaining and installing the picons databases,
22063 point your Web browser at
22064 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
22065
22066 If you are using Debian GNU/Linux, saying @samp{apt-get install
22067 picons.*} will install the picons where Gnus can find them.
22068
22069 To enable displaying picons, simply make sure that
22070 @code{gnus-picon-databases} points to the directory containing the
22071 Picons databases.
22072
22073 The following variables offer control over where things are located.
22074
22075 @table @code
22076
22077 @item gnus-picon-databases
22078 @vindex gnus-picon-databases
22079 The location of the picons database.  This is a list of directories
22080 containing the @file{news}, @file{domains}, @file{users} (and so on)
22081 subdirectories.  Defaults to @code{("/usr/lib/picon"
22082 "/usr/local/faces")}.
22083
22084 @item gnus-picon-news-directories
22085 @vindex gnus-picon-news-directories
22086 List of subdirectories to search in @code{gnus-picon-databases} for
22087 newsgroups faces.  @code{("news")} is the default.
22088
22089 @item gnus-picon-user-directories
22090 @vindex gnus-picon-user-directories
22091 List of subdirectories to search in @code{gnus-picon-databases} for user
22092 faces.  @code{("users" "usenix" "local" "misc")} is the default.
22093
22094 @item gnus-picon-domain-directories
22095 @vindex gnus-picon-domain-directories
22096 List of subdirectories to search in @code{gnus-picon-databases} for
22097 domain name faces.  Defaults to @code{("domains")}.  Some people may
22098 want to add @samp{"unknown"} to this list.
22099
22100 @item gnus-picon-file-types
22101 @vindex gnus-picon-file-types
22102 Ordered list of suffixes on picon file names to try.  Defaults to
22103 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
22104
22105 @end table
22106
22107
22108 @node XVarious
22109 @subsection Various XEmacs Variables
22110
22111 @table @code
22112 @item gnus-xmas-glyph-directory
22113 @vindex gnus-xmas-glyph-directory
22114 This is where Gnus will look for pictures.  Gnus will normally
22115 auto-detect this directory, but you may set it manually if you have an
22116 unusual directory structure.
22117
22118 @item gnus-xmas-logo-color-alist
22119 @vindex gnus-xmas-logo-color-alist
22120 This is an alist where the key is a type symbol and the values are the
22121 foreground and background color of the splash page glyph.
22122
22123 @item gnus-xmas-logo-color-style
22124 @vindex gnus-xmas-logo-color-style
22125 This is the key used to look up the color in the alist described above.
22126 Valid values include @code{flame}, @code{pine}, @code{moss},
22127 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
22128 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
22129
22130 @item gnus-xmas-modeline-glyph
22131 @vindex gnus-xmas-modeline-glyph
22132 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
22133 default.
22134
22135 @end table
22136
22137 @subsubsection Toolbar
22138
22139 @table @code
22140
22141 @item gnus-use-toolbar
22142 @vindex gnus-use-toolbar
22143 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
22144 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
22145 @code{right-toolbar}, or @code{left-toolbar}.
22146
22147 @item gnus-group-toolbar
22148 @vindex gnus-group-toolbar
22149 The toolbar in the group buffer.
22150
22151 @item gnus-summary-toolbar
22152 @vindex gnus-summary-toolbar
22153 The toolbar in the summary buffer.
22154
22155 @item gnus-summary-mail-toolbar
22156 @vindex gnus-summary-mail-toolbar
22157 The toolbar in the summary buffer of mail groups.
22158
22159 @end table
22160
22161 @iftex
22162 @iflatex
22163 \margindex{}
22164 @end iflatex
22165 @end iftex
22166
22167
22168 @node Fuzzy Matching
22169 @section Fuzzy Matching
22170 @cindex fuzzy matching
22171
22172 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
22173 things like scoring, thread gathering and thread comparison.
22174
22175 As opposed to regular expression matching, fuzzy matching is very fuzzy.
22176 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
22177 means, and the implementation has changed over time.
22178
22179 Basically, it tries to remove all noise from lines before comparing.
22180 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
22181 out of the strings before comparing the results.  This often leads to
22182 adequate results---even when faced with strings generated by text
22183 manglers masquerading as newsreaders.
22184
22185
22186 @node Thwarting Email Spam
22187 @section Thwarting Email Spam
22188 @cindex email spam
22189 @cindex spam
22190 @cindex UCE
22191 @cindex unsolicited commercial email
22192
22193 In these last days of the Usenet, commercial vultures are hanging about
22194 and grepping through news like crazy to find email addresses they can
22195 foist off their scams and products to.  As a reaction to this, many
22196 people have started putting nonsense addresses into their @code{From}
22197 lines.  I think this is counterproductive---it makes it difficult for
22198 people to send you legitimate mail in response to things you write, as
22199 well as making it difficult to see who wrote what.  This rewriting may
22200 perhaps be a bigger menace than the unsolicited commercial email itself
22201 in the end.
22202
22203 The biggest problem I have with email spam is that it comes in under
22204 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
22205 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
22206 mail group, only to find two pyramid schemes, seven advertisements
22207 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
22208 and one mail asking me to repent and find some god.
22209
22210 This is annoying.  Here's what you can do about it.
22211
22212 @menu
22213 * The problem of spam::         Some background, and some solutions
22214 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
22215 * SpamAssassin::                How to use external anti-spam tools.
22216 * Hashcash::                    Reduce spam by burning CPU time.
22217 * Filtering Spam Using The Spam ELisp Package::
22218 * Filtering Spam Using Statistics with spam-stat::
22219 @end menu
22220
22221 @node The problem of spam
22222 @subsection The problem of spam
22223 @cindex email spam
22224 @cindex spam filtering approaches
22225 @cindex filtering approaches, spam
22226 @cindex UCE
22227 @cindex unsolicited commercial email
22228
22229 First, some background on spam.
22230
22231 If you have access to e-mail, you are familiar with spam (technically
22232 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
22233 exists because e-mail delivery is very cheap compared to paper mail,
22234 so only a very small percentage of people need to respond to an UCE to
22235 make it worthwhile to the advertiser.  Ironically, one of the most
22236 common spams is the one offering a database of e-mail addresses for
22237 further spamming.  Senders of spam are usually called @emph{spammers},
22238 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
22239 @emph{morons} are in common use as well.
22240
22241 Spam comes from a wide variety of sources.  It is simply impossible to
22242 dispose of all spam without discarding useful messages.  A good
22243 example is the TMDA system, which requires senders
22244 unknown to you to confirm themselves as legitimate senders before
22245 their e-mail can reach you.  Without getting into the technical side
22246 of TMDA, a downside is clearly that e-mail from legitimate sources may
22247 be discarded if those sources can't or won't confirm themselves
22248 through the TMDA system.  Another problem with TMDA is that it
22249 requires its users to have a basic understanding of e-mail delivery
22250 and processing.
22251
22252 The simplest approach to filtering spam is filtering, at the mail
22253 server or when you sort through incoming mail.  If you get 200 spam
22254 messages per day from @samp{random-address@@vmadmin.com}, you block
22255 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
22256 discard all messages with @samp{VIAGRA} in the message.  If you get
22257 lots of spam from Bulgaria, for example, you try to filter all mail
22258 from Bulgarian IPs.  
22259
22260 This, unfortunately, is a great way to discard legitimate e-mail.  The
22261 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
22262 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
22263 you should be obvious, so don't do it if you have the choice.
22264
22265 In another instance, the very informative and useful RISKS digest has
22266 been blocked by overzealous mail filters because it @strong{contained}
22267 words that were common in spam messages.  Nevertheless, in isolated
22268 cases, with great care, direct filtering of mail can be useful.
22269
22270 Another approach to filtering e-mail is the distributed spam
22271 processing, for instance DCC implements such a system.  In essence,
22272 @var{N} systems around the world agree that a machine @var{X} in
22273 Ghana, Estonia, or California is sending out spam e-mail, and these
22274 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
22275 database.  The criteria for spam detection vary---it may be the number
22276 of messages sent, the content of the messages, and so on.  When a user
22277 of the distributed processing system wants to find out if a message is
22278 spam, he consults one of those @var{N} systems.
22279
22280 Distributed spam processing works very well against spammers that send
22281 a large number of messages at once, but it requires the user to set up
22282 fairly complicated checks.  There are commercial and free distributed
22283 spam processing systems.  Distributed spam processing has its risks as
22284 well.  For instance legitimate e-mail senders have been accused of
22285 sending spam, and their web sites and mailing lists have been shut
22286 down for some time because of the incident.
22287
22288 The statistical approach to spam filtering is also popular.  It is
22289 based on a statistical analysis of previous spam messages.  Usually
22290 the analysis is a simple word frequency count, with perhaps pairs of
22291 words or 3-word combinations thrown into the mix.  Statistical
22292 analysis of spam works very well in most of the cases, but it can
22293 classify legitimate e-mail as spam in some cases.  It takes time to
22294 run the analysis, the full message must be analyzed, and the user has
22295 to store the database of spam analyses.  Statistical analysis on the
22296 server is gaining popularity.  This has the advantage of letting the
22297 user Just Read Mail, but has the disadvantage that it's harder to tell
22298 the server that it has misclassified mail.
22299
22300 Fighting spam is not easy, no matter what anyone says.  There is no
22301 magic switch that will distinguish Viagra ads from Mom's e-mails.
22302 Even people are having a hard time telling spam apart from non-spam,
22303 because spammers are actively looking to fool us into thinking they
22304 are Mom, essentially.  Spamming is irritating, irresponsible, and
22305 idiotic behavior from a bunch of people who think the world owes them
22306 a favor.  We hope the following sections will help you in fighting the
22307 spam plague.
22308
22309 @node Anti-Spam Basics
22310 @subsection Anti-Spam Basics
22311 @cindex email spam
22312 @cindex spam
22313 @cindex UCE
22314 @cindex unsolicited commercial email
22315
22316 One way of dealing with spam is having Gnus split out all spam into a
22317 @samp{spam} mail group (@pxref{Splitting Mail}).
22318
22319 First, pick one (1) valid mail address that you can be reached at, and
22320 put it in your @code{From} header of all your news articles.  (I've
22321 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22322 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22323 sysadmin whether your sendmail installation accepts keywords in the local
22324 part of the mail address.)
22325
22326 @lisp
22327 (setq message-default-news-headers
22328       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22329 @end lisp
22330
22331 Then put the following split rule in @code{nnmail-split-fancy}
22332 (@pxref{Fancy Mail Splitting}):
22333
22334 @lisp
22335 (...
22336  (to "larsi@@trym.ifi.uio.no"
22337      (| ("subject" "re:.*" "misc")
22338         ("references" ".*@@.*" "misc")
22339         "spam"))
22340  ...)
22341 @end lisp
22342
22343 This says that all mail to this address is suspect, but if it has a
22344 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22345 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22346 (This idea probably comes from Tim Pierce.)
22347
22348 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22349 and do not include your email address explicitly in the @code{To}
22350 header.  Why they do this is unknown---perhaps it's to thwart this
22351 thwarting scheme?  In any case, this is trivial to deal with---you just
22352 put anything not addressed to you in the @samp{spam} group by ending
22353 your fancy split rule in this way:
22354
22355 @lisp
22356 (
22357  ...
22358  (to "larsi" "misc")
22359  "spam")
22360 @end lisp
22361
22362 In my experience, this will sort virtually everything into the right
22363 group.  You still have to check the @samp{spam} group from time to time to
22364 check for legitimate mail, though.  If you feel like being a good net
22365 citizen, you can even send off complaints to the proper authorities on
22366 each unsolicited commercial email---at your leisure.
22367
22368 This works for me.  It allows people an easy way to contact me (they can
22369 just press @kbd{r} in the usual way), and I'm not bothered at all with
22370 spam.  It's a win-win situation.  Forging @code{From} headers to point
22371 to non-existent domains is yucky, in my opinion.
22372
22373 Be careful with this approach.  Spammers are wise to it.
22374
22375
22376 @node SpamAssassin
22377 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22378 @cindex SpamAssassin
22379 @cindex Vipul's Razor
22380 @cindex DCC
22381
22382 The days where the hints in the previous section were sufficient in
22383 avoiding spam are coming to an end.  There are many tools out there
22384 that claim to reduce the amount of spam you get.  This section could
22385 easily become outdated fast, as new products replace old, but
22386 fortunately most of these tools seem to have similar interfaces.  Even
22387 though this section will use SpamAssassin as an example, it should be
22388 easy to adapt it to most other tools.
22389
22390 Note that this section does not involve the @code{spam.el} package,
22391 which is discussed in the next section.  If you don't care for all
22392 the features of @code{spam.el}, you can make do with these simple
22393 recipes.
22394
22395 If the tool you are using is not installed on the mail server, you
22396 need to invoke it yourself.  Ideas on how to use the
22397 @code{:postscript} mail source parameter (@pxref{Mail Source
22398 Specifiers}) follow.
22399
22400 @lisp
22401 (setq mail-sources
22402       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22403         (pop :user "jrl"
22404              :server "pophost"
22405              :postscript
22406              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22407 @end lisp
22408
22409 Once you manage to process your incoming spool somehow, thus making
22410 the mail contain e.g.@: a header indicating it is spam, you are ready to
22411 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22412
22413 @lisp
22414 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22415                              ...))
22416 @end lisp
22417
22418 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22419
22420 @lisp
22421 (setq nnmail-split-methods 'nnmail-split-fancy
22422       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22423                              ...))
22424 @end lisp
22425
22426 Some people might not like the idea of piping the mail through various
22427 programs using a @code{:prescript} (if some program is buggy, you
22428 might lose all mail).  If you are one of them, another solution is to
22429 call the external tools during splitting.  Example fancy split method:
22430
22431 @lisp
22432 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22433                              ...))
22434 (defun kevin-spamassassin ()
22435   (save-excursion
22436     (save-restriction
22437       (widen)
22438       (if (eq 1 (call-process-region (point-min) (point-max)
22439                                      "spamc" nil nil nil "-c"))
22440           "spam"))))
22441 @end lisp
22442
22443 Note that with the nnimap backend, message bodies will not be
22444 downloaded by default.  You need to set
22445 @code{nnimap-split-download-body} to @code{t} to do that
22446 (@pxref{Splitting in IMAP}).
22447
22448 That is about it.  As some spam is likely to get through anyway, you
22449 might want to have a nifty function to call when you happen to read
22450 spam.  And here is the nifty function:
22451
22452 @lisp
22453  (defun my-gnus-raze-spam ()
22454   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22455   (interactive)
22456   (gnus-summary-show-raw-article)
22457   (gnus-summary-save-in-pipe "razor-report -f -d")
22458   (gnus-summary-mark-as-expirable 1))
22459 @end lisp
22460
22461 @node Hashcash
22462 @subsection Hashcash
22463 @cindex hashcash
22464
22465 A novel technique to fight spam is to require senders to do something
22466 costly and demonstrably unique for each message they send.  This has
22467 the obvious drawback that you cannot rely on everyone in the world
22468 using this technique, since it is not part of the Internet standards,
22469 but it may be useful in smaller communities.
22470
22471 While the tools in the previous section work well in practice, they
22472 work only because the tools are constantly maintained and updated as
22473 new form of spam appears.  This means that a small percentage of spam
22474 will always get through.  It also means that somewhere, someone needs
22475 to read lots of spam to update these tools.  Hashcash avoids that, but
22476 instead prefers that everyone you contact through e-mail supports the
22477 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22478 The approaches have their own advantages and disadvantages, but as
22479 often in the real world, a combination of them is stronger than either
22480 one of them separately.
22481
22482 @cindex X-Hashcash
22483 The ``something costly'' is to burn CPU time, more specifically to
22484 compute a hash collision up to a certain number of bits.  The
22485 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22486 header.  For more details, and for the external application
22487 @code{hashcash} you need to install to use this feature, see
22488 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22489 information can be found at @uref{http://www.camram.org/}.
22490
22491 If you wish to generate hashcash for each message you send, you can
22492 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
22493 Headers,message, The Message Manual}), as in:
22494
22495 @lisp
22496 (setq message-generate-hashcash t)
22497 @end lisp
22498
22499 You will need to set up some additional variables as well:
22500
22501 @table @code
22502
22503 @item hashcash-default-payment
22504 @vindex hashcash-default-payment
22505 This variable indicates the default number of bits the hash collision
22506 should consist of.  By default this is 10, which is a rather low
22507 value.  Suggested useful values include 17 to 29.
22508
22509 @item hashcash-payment-alist
22510 @vindex hashcash-payment-alist
22511 Some receivers may require you to spend burn more CPU time than the
22512 default.  This variable contains a list of @samp{(@var{addr}
22513 @var{amount})} cells, where @var{addr} is the receiver (email address
22514 or newsgroup) and @var{amount} is the number of bits in the collision
22515 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22516 @var{amount})} cells, where the @var{string} is the string to use
22517 (normally the email address or newsgroup name is used).
22518
22519 @item hashcash-path
22520 @vindex hashcash-path
22521 Where the @code{hashcash} binary is installed.  This variable should
22522 be automatically set by @code{executable-find}, but if it's nil
22523 (usually because the @code{hashcash} binary is not in your path)
22524 you'll get a warning when you check hashcash payments and an error
22525 when you generate hashcash payments.
22526
22527 @end table
22528
22529 Gnus can verify hashcash cookies, although this can also be done by
22530 hand customized mail filtering scripts.  To verify a hashcash cookie
22531 in a message, use the @code{mail-check-payment} function in the
22532 @code{hashcash.el} library.  You can also use the @code{spam.el}
22533 package with the @code{spam-use-hashcash} backend to validate hashcash
22534 cookies in incoming mail and filter mail accordingly.
22535
22536 @node Filtering Spam Using The Spam ELisp Package
22537 @subsection Filtering Spam Using The Spam ELisp Package
22538 @cindex spam filtering
22539 @cindex spam
22540
22541 The idea behind @file{spam.el} is to have a control center for spam detection
22542 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22543 filters new mail, and it analyzes mail known to be spam or ham.
22544 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22545 non-spam messages.
22546
22547 First of all, you @strong{must} run the function
22548 @code{spam-initialize} to autoload @code{spam.el} and to install the
22549 @code{spam.el} hooks.  There is one exception: if you use the
22550 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22551 should turn it on before @code{spam-initialize}:
22552
22553 @example
22554 (setq spam-use-stat t) ;; if needed
22555 (spam-initialize)
22556 @end example
22557
22558 So, what happens when you load @file{spam.el}?
22559
22560 First, some hooks will get installed by @code{spam-initialize}.  There
22561 are some hooks for @code{spam-stat} so it can save its databases, and
22562 there are hooks so interesting things will happen when you enter and
22563 leave a group.  More on the sequence of events later (@pxref{Spam
22564 ELisp Package Sequence of Events}).
22565
22566 You get the following keyboard commands:
22567
22568 @table @kbd
22569
22570 @item M-d
22571 @itemx M s x
22572 @itemx S x
22573 @kindex M-d
22574 @kindex S x
22575 @kindex M s x
22576 @findex gnus-summary-mark-as-spam
22577 @code{gnus-summary-mark-as-spam}.
22578
22579 Mark current article as spam, showing it with the @samp{$} mark.
22580 Whenever you see a spam article, make sure to mark its summary line
22581 with @kbd{M-d} before leaving the group.  This is done automatically
22582 for unread articles in @emph{spam} groups.
22583
22584 @item M s t
22585 @itemx S t
22586 @kindex M s t
22587 @kindex S t
22588 @findex spam-bogofilter-score
22589 @code{spam-bogofilter-score}.
22590
22591 You must have Bogofilter installed for that command to work properly.
22592
22593 @xref{Bogofilter}.
22594
22595 @end table
22596
22597 Also, when you load @file{spam.el}, you will be able to customize its
22598 variables.  Try @code{customize-group} on the @samp{spam} variable
22599 group.
22600
22601 @menu
22602 * Spam ELisp Package Sequence of Events::  
22603 * Spam ELisp Package Filtering of Incoming Mail::  
22604 * Spam ELisp Package Global Variables::  
22605 * Spam ELisp Package Configuration Examples::  
22606 * Blacklists and Whitelists::   
22607 * BBDB Whitelists::             
22608 * Gmane Spam Reporting::        
22609 * Anti-spam Hashcash Payments::  
22610 * Blackholes::                  
22611 * Regular Expressions Header Matching::  
22612 * Bogofilter::                  
22613 * SpamAssassin backend::        
22614 * ifile spam filtering::        
22615 * spam-stat spam filtering::    
22616 * SpamOracle::                  
22617 * Extending the Spam ELisp package::  
22618 @end menu 
22619
22620 @node Spam ELisp Package Sequence of Events
22621 @subsubsection Spam ELisp Package Sequence of Events
22622 @cindex spam filtering
22623 @cindex spam filtering sequence of events
22624 @cindex spam
22625
22626 You must read this section to understand how @code{spam.el} works.
22627 Do not skip, speed-read, or glance through this section.
22628
22629 There are two @emph{contact points}, if you will, between
22630 @code{spam.el} and the rest of Gnus: checking new mail for spam, and
22631 leaving a group.
22632
22633 Getting new mail is done in one of two ways.  You can either split
22634 your incoming mail or you can classify new articles as ham or spam
22635 when you enter the group.
22636
22637 Splitting incoming mail is better suited to mail backends such as
22638 @code{nnml} or @code{nnimap} where new mail appears in a single file
22639 called a @dfn{Spool File}.  See @xref{Spam ELisp Package Filtering of
22640 Incoming Mail}.
22641
22642 @vindex gnus-spam-autodetect
22643 @vindex gnus-spam-autodetect-methods
22644 For backends such as @code{nntp} there is no incoming mail spool, so
22645 an alternate mechanism must be used.  This may also happen for
22646 backends where the server is in charge of splitting incoming mail, and
22647 Gnus does not do further splitting.  The @code{spam-autodetect} and
22648 @code{spam-autodetect-methods} group parameters (accessible with
22649 @kbd{G c} and @kbd{G p} as usual), and the corresponding variables
22650 @code{gnus-spam-autodetect} and @code{gnus-spam-autodetect-methods}
22651 (accessible with @kbd{M-x customize-variable} as usual) can help.
22652
22653 When @code{spam-autodetect} is used (you can turn it on for a
22654 group/topic or wholesale by regex, as needed), it hooks into the
22655 process of entering a group.  Thus, entering a group with unseen or
22656 unread articles becomes the substitute for checking incoming mail.
22657 Whether only unseen articles or all unread articles will be processed
22658 is determined by the @code{spam-autodetect-recheck-messages}.  When
22659 set to @code{t}, unread messages will be rechecked.
22660
22661 @code{spam-autodetect} grants the user at once more and less control
22662 of spam filtering.  The user will have more control over each group's
22663 spam methods, so for instance the @samp{ding} group may have
22664 @code{spam-use-BBDB} as the autodetection method, while the
22665 @samp{suspect} group may have the @code{spam-use-blacklist} and
22666 @code{spam-use-bogofilter} methods enabled.  Every article detected to
22667 be spam will be marked with the spam mark @samp{$} and processed on
22668 exit from the group as normal spam.  The user has less control over
22669 the @emph{sequence} of checks, as he might with @code{spam-split}.
22670
22671 When the newly split mail goes into groups, or messages are
22672 autodetected to be ham or spam, those groups must be exited (after
22673 entering, if needed) for further spam processing to happen.  It
22674 matters whether the group is considered a ham group, a spam group, or
22675 is unclassified, based on its @code{spam-content} parameter
22676 (@pxref{Spam ELisp Package Global Variables}).  Spam groups have the
22677 additional characteristic that, when entered, any unseen or unread
22678 articles (depending on the @code{spam-mark-only-unseen-as-spam}
22679 variable) will be marked as spam.  Thus, mail split into a spam group
22680 gets automatically marked as spam when you enter the group.
22681
22682 So, when you exit a group, the @code{spam-processors} are applied, if
22683 any are set, and the processed mail is moved to the
22684 @code{ham-process-destination} or the @code{spam-process-destination}
22685 depending on the article's classification.  If the
22686 @code{ham-process-destination} or the @code{spam-process-destination},
22687 whichever is appropriate, are @code{nil}, the article is left in the
22688 current group.
22689
22690 If a spam is found in any group (this can be changed to only non-spam
22691 groups with @code{spam-move-spam-nonspam-groups-only}), it is
22692 processed by the active @code{spam-processors} (@pxref{Spam ELisp
22693 Package Global Variables}) when the group is exited.  Furthermore, the
22694 spam is moved to the @code{spam-process-destination} (@pxref{Spam
22695 ELisp Package Global Variables}) for further training or deletion.
22696 You have to load the @code{gnus-registry.el} package and enable the
22697 @code{spam-log-to-registry} variable if you want spam to be processed
22698 no more than once.  Thus, spam is detected and processed everywhere,
22699 which is what most people want.  If the
22700 @code{spam-process-destination} is @code{nil}, the spam is marked as
22701 expired, which is usually the right thing to do.
22702
22703 If spam can not be moved---because of a read-only backend such as
22704 @acronym{NNTP}, for example, it will be copied.
22705
22706 If a ham mail is found in a ham group, as determined by the
22707 @code{ham-marks} parameter, it is processed as ham by the active ham
22708 @code{spam-processor} when the group is exited.  With the variables
22709 @code{spam-process-ham-in-spam-groups} and
22710 @code{spam-process-ham-in-nonham-groups} the behavior can be further
22711 altered so ham found anywhere can be processed.  You have to load the
22712 @code{gnus-registry.el} package and enable the
22713 @code{spam-log-to-registry} variable if you want ham to be processed
22714 no more than once.  Thus, ham is detected and processed only when
22715 necessary, which is what most people want.  More on this in
22716 @xref{Spam ELisp Package Configuration Examples}.
22717
22718 If ham can not be moved---because of a read-only backend such as
22719 @acronym{NNTP}, for example, it will be copied.
22720
22721 If all this seems confusing, don't worry.  Soon it will be as natural
22722 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
22723 50 years in the future yet.  Just trust us, it's not so bad.
22724
22725 @node Spam ELisp Package Filtering of Incoming Mail
22726 @subsubsection Spam ELisp Package Filtering of Incoming Mail
22727 @cindex spam filtering
22728 @cindex spam filtering incoming mail
22729 @cindex spam
22730
22731 To use the @file{spam.el} facilities for incoming mail filtering, you
22732 must add the following to your fancy split list
22733 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22734
22735 @example
22736 (: spam-split)
22737 @end example
22738
22739 Note that the fancy split may be called @code{nnmail-split-fancy} or
22740 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22741 nnimap back ends to retrieve your mail.
22742
22743 Also, @code{spam-split} will not modify incoming mail in any way.
22744
22745 The @code{spam-split} function will process incoming mail and send the
22746 mail considered to be spam into the group name given by the variable
22747 @code{spam-split-group}.  By default that group name is @samp{spam},
22748 but you can customize @code{spam-split-group}.  Make sure the contents
22749 of @code{spam-split-group} are an @emph{unqualified} group name, for
22750 instance in an @code{nnimap} server @samp{your-server} the value
22751 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22752 value @samp{nnimap+server:spam}, therefore, is wrong and will
22753 actually give you the group
22754 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22755 work depending on your server's tolerance for strange group names.
22756
22757 You can also give @code{spam-split} a parameter,
22758 e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}.  Why is
22759 this useful?
22760
22761 Take these split rules (with @code{spam-use-regex-headers} and
22762 @code{spam-use-blackholes} set):
22763
22764 @example
22765  nnimap-split-fancy '(|
22766                       (any "ding" "ding")
22767                       (: spam-split)
22768                       ;; @r{default mailbox}
22769                       "mail")
22770 @end example
22771
22772 Now, the problem is that you want all ding messages to make it to the
22773 ding folder.  But that will let obvious spam (for example, spam
22774 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22775 when it's sent to the ding list.  On the other hand, some messages to
22776 the ding list are from a mail server in the blackhole list, so the
22777 invocation of @code{spam-split} can't be before the ding rule.
22778
22779 You can let SpamAssassin headers supersede ding rules, but all other
22780 @code{spam-split} rules (including a second invocation of the
22781 regex-headers check) will be after the ding rule:
22782
22783 @example
22784 nnimap-split-fancy
22785       '(|
22786         ;; @r{all spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
22787         (: spam-split "regex-spam" 'spam-use-regex-headers)
22788         (any "ding" "ding")
22789         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
22790         (: spam-split)
22791         ;; @r{default mailbox}
22792         "mail")
22793 @end example
22794
22795 This lets you invoke specific @code{spam-split} checks depending on
22796 your particular needs, and to target the results of those checks to a
22797 particular spam group.  You don't have to throw all mail into all the
22798 spam tests.  Another reason why this is nice is that messages to
22799 mailing lists you have rules for don't have to have resource-intensive
22800 blackhole checks performed on them.  You could also specify different
22801 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
22802
22803 You should still have specific checks such as
22804 @code{spam-use-regex-headers} set to @code{t}, even if you
22805 specifically invoke @code{spam-split} with the check.  The reason is
22806 that when loading @file{spam.el}, some conditional loading is done
22807 depending on what @code{spam-use-xyz} variables you have set.  This
22808 is usually not critical, though.
22809
22810 @emph{Note for IMAP users}
22811
22812 The boolean variable @code{nnimap-split-download-body} needs to be
22813 set, if you want to split based on the whole message instead of just
22814 the headers.  By default, the nnimap back end will only retrieve the
22815 message headers.  If you use @code{spam-check-bogofilter},
22816 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22817 can benefit from the full message body), you should set this variable.
22818 It is not set by default because it will slow @acronym{IMAP} down, and
22819 that is not an appropriate decision to make on behalf of the user.
22820
22821 @xref{Splitting in IMAP}.
22822
22823 @emph{TODO: spam.el needs to provide a uniform way of training all the
22824 statistical databases.  Some have that functionality built-in, others
22825 don't.}
22826
22827 @node Spam ELisp Package Global Variables
22828 @subsubsection Spam ELisp Package Global Variables
22829 @cindex spam filtering
22830 @cindex spam filtering variables
22831 @cindex spam variables
22832 @cindex spam
22833
22834 @vindex gnus-spam-process-newsgroups
22835 The concepts of ham processors and spam processors are very important.
22836 Ham processors and spam processors for a group can be set with the
22837 @code{spam-process} group parameter, or the
22838 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22839 mail known to be non-spam (@emph{ham}) and process it in some way so
22840 that later similar mail will also be considered non-spam.  Spam
22841 processors take mail known to be spam and process it so similar spam
22842 will be detected later.
22843
22844 The format of the spam or ham processor entry used to be a symbol,
22845 but now it is a @sc{cons} cell.  See the individual spam processor entries
22846 for more information.
22847
22848 @vindex gnus-spam-newsgroup-contents
22849 Gnus learns from the spam you get.  You have to collect your spam in
22850 one or more spam groups, and set or customize the variable
22851 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22852 groups to contain spam by setting their group parameter
22853 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22854 by customizing the corresponding variable
22855 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22856 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22857 also be used to declare groups as @emph{ham} groups if you set their
22858 classification to @code{gnus-group-spam-classification-ham}.  If
22859 groups are not classified by means of @code{spam-junk-mailgroups},
22860 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22861 considered @emph{unclassified}.  All groups are unclassified by
22862 default.
22863
22864 @vindex gnus-spam-mark
22865 @cindex $
22866 In spam groups, all messages are considered to be spam by default:
22867 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22868 group.  If you have seen a message, had it marked as spam, then
22869 unmarked it, it won't be marked as spam when you enter the group
22870 thereafter.  You can disable that behavior, so all unread messages
22871 will get the @samp{$} mark, if you set the
22872 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22873 should remove the @samp{$} mark when you are in the group summary
22874 buffer for every message that is not spam after all.  To remove the
22875 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22876 @kbd{d} for declaring it read the non-spam way.  When you leave a
22877 group, all spam-marked (@samp{$}) articles are sent to a spam
22878 processor which will study them as spam samples.
22879
22880 Messages may also be deleted in various other ways, and unless
22881 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22882 and @samp{r} for default read or explicit delete, marks @samp{X} and
22883 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22884 low scores, are all considered to be associated with articles which
22885 are not spam.  This assumption might be false, in particular if you
22886 use kill files or score files as means for detecting genuine spam, you
22887 should then adjust the @code{ham-marks} group parameter.
22888
22889 @defvar ham-marks
22890 You can customize this group or topic parameter to be the list of
22891 marks you want to consider ham.  By default, the list contains the
22892 deleted, read, killed, kill-filed, and low-score marks (the idea is
22893 that these articles have been read, but are not spam).  It can be
22894 useful to also include the tick mark in the ham marks.  It is not
22895 recommended to make the unread mark a ham mark, because it normally
22896 indicates a lack of classification.  But you can do it, and we'll be
22897 happy for you.
22898 @end defvar
22899
22900 @defvar spam-marks
22901 You can customize this group or topic parameter to be the list of
22902 marks you want to consider spam.  By default, the list contains only
22903 the spam mark.  It is not recommended to change that, but you can if
22904 you really want to.
22905 @end defvar
22906
22907 When you leave @emph{any} group, regardless of its
22908 @code{spam-contents} classification, all spam-marked articles are sent
22909 to a spam processor, which will study these as spam samples.  If you
22910 explicit kill a lot, you might sometimes end up with articles marked
22911 @samp{K} which you never saw, and which might accidentally contain
22912 spam.  Best is to make sure that real spam is marked with @samp{$},
22913 and nothing else.
22914
22915 @vindex gnus-ham-process-destinations
22916 When you leave a @emph{spam} group, all spam-marked articles are
22917 marked as expired after processing with the spam processor.  This is
22918 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22919 @strong{ham} articles in a spam group will be moved to a location
22920 determined by either the @code{ham-process-destination} group
22921 parameter or a match in the @code{gnus-ham-process-destinations}
22922 variable, which is a list of regular expressions matched with group
22923 names (it's easiest to customize this variable with @kbd{M-x
22924 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
22925 group name list is a standard Lisp list, if you prefer to customize
22926 the variable manually.  If the @code{ham-process-destination}
22927 parameter is not set, ham articles are left in place.  If the
22928 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22929 set, the ham articles are marked as unread before being moved.
22930
22931 If ham can not be moved---because of a read-only backend such as
22932 @acronym{NNTP}, for example, it will be copied.
22933
22934 Note that you can use multiples destinations per group or regular
22935 expression!  This enables you to send your ham to a regular mail
22936 group and to a @emph{ham training} group.
22937
22938 When you leave a @emph{ham} group, all ham-marked articles are sent to
22939 a ham processor, which will study these as non-spam samples.
22940
22941 @vindex spam-process-ham-in-spam-groups
22942 By default the variable @code{spam-process-ham-in-spam-groups} is
22943 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22944 to be processed.  Normally this is not done, you are expected instead
22945 to send your ham to a ham group and process it there.
22946
22947 @vindex spam-process-ham-in-nonham-groups
22948 By default the variable @code{spam-process-ham-in-nonham-groups} is
22949 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22950 or unclassified) groups to be processed.  Normally this is not done,
22951 you are expected instead to send your ham to a ham group and process
22952 it there.
22953
22954 @vindex gnus-spam-process-destinations
22955 When you leave a @emph{ham} or @emph{unclassified} group, all
22956 @strong{spam} articles are moved to a location determined by either
22957 the @code{spam-process-destination} group parameter or a match in the
22958 @code{gnus-spam-process-destinations} variable, which is a list of
22959 regular expressions matched with group names (it's easiest to
22960 customize this variable with @kbd{M-x customize-variable @key{RET}
22961 gnus-spam-process-destinations}).  Each group name list is a standard
22962 Lisp list, if you prefer to customize the variable manually.  If the
22963 @code{spam-process-destination} parameter is not set, the spam
22964 articles are only expired.  The group name is fully qualified, meaning
22965 that if you see @samp{nntp:servername} before the group name in the
22966 group buffer then you need it here as well.
22967
22968 If spam can not be moved---because of a read-only backend such as
22969 @acronym{NNTP}, for example, it will be copied.
22970
22971 Note that you can use multiples destinations per group or regular
22972 expression!  This enables you to send your spam to multiple @emph{spam
22973 training} groups.
22974
22975 @vindex spam-log-to-registry
22976 The problem with processing ham and spam is that Gnus doesn't track
22977 this processing by default.  Enable the @code{spam-log-to-registry}
22978 variable so @code{spam.el} will use @code{gnus-registry.el} to track
22979 what articles have been processed, and avoid processing articles
22980 multiple times.  Keep in mind that if you limit the number of registry
22981 entries, this won't work as well as it does without a limit.
22982
22983 @vindex spam-mark-only-unseen-as-spam
22984 Set this variable if you want only unseen articles in spam groups to
22985 be marked as spam.  By default, it is set.  If you set it to
22986 @code{nil}, unread articles will also be marked as spam.
22987
22988 @vindex spam-mark-ham-unread-before-move-from-spam-group
22989 Set this variable if you want ham to be unmarked before it is moved
22990 out of the spam group.  This is very useful when you use something
22991 like the tick mark @samp{!} to mark ham---the article will be placed
22992 in your @code{ham-process-destination}, unmarked as if it came fresh
22993 from the mail server.
22994
22995 @vindex spam-autodetect-recheck-messages
22996 When autodetecting spam, this variable tells @code{spam.el} whether
22997 only unseen articles or all unread articles should be checked for
22998 spam.  It is recommended that you leave it off.
22999
23000 @node Spam ELisp Package Configuration Examples
23001 @subsubsection Spam ELisp Package Configuration Examples
23002 @cindex spam filtering
23003 @cindex spam filtering configuration examples
23004 @cindex spam configuration examples
23005 @cindex spam
23006
23007 @subsubheading Ted's setup
23008
23009 From Ted Zlatanov <tzz@@lifelogs.com>.
23010 @example
23011 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
23012 ;; @r{see @file{gnus-registry.el} for more information}
23013 (gnus-registry-initialize)
23014 (spam-initialize)
23015
23016 ;; @r{I like @kbd{C-s} for marking spam}
23017 (define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
23018
23019 (setq
23020  spam-log-to-registry t     ; @r{for spam autodetection}
23021  spam-use-BBDB t
23022  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
23023  ;; @r{all groups with @samp{spam} in the name contain spam}
23024  gnus-spam-newsgroup-contents
23025   '(("spam" gnus-group-spam-classification-spam))
23026  ;; @r{see documentation for these}
23027  spam-move-spam-nonspam-groups-only nil
23028  spam-mark-only-unseen-as-spam t
23029  spam-mark-ham-unread-before-move-from-spam-group t
23030  nnimap-split-rule 'nnimap-split-fancy
23031  ;; @r{understand what this does before you copy it to your own setup!}
23032  nnimap-split-fancy '(|
23033                       ;; @r{trace references to parents and put in their group}
23034                       (: gnus-registry-split-fancy-with-parent)
23035                       ;; @r{this will catch server-side SpamAssassin tags}
23036                       (: spam-split 'spam-use-regex-headers)
23037                       (any "ding" "ding")
23038                       ;; @r{note that spam by default will go to @samp{spam}}
23039                       (: spam-split)
23040                       ;; @r{default mailbox}
23041                       "mail"))
23042
23043 ;; @r{my parameters, set with @kbd{G p}}
23044
23045 ;; @r{all nnml groups, and all nnimap groups except}
23046 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
23047 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
23048 ;; @r{because it must have been detected manually}
23049
23050 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23051
23052 ;; @r{all @acronym{NNTP} groups}
23053 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
23054 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
23055 ;; @r{send all spam to the training group}
23056  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23057
23058 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
23059 ((spam-autodetect . t))
23060
23061 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
23062
23063 ;; @r{this is a spam group}
23064 ((spam-contents gnus-group-spam-classification-spam)
23065
23066  ;; @r{any spam (which happens when I enter for all unseen messages,}
23067  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
23068  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
23069
23070  (spam-process-destination "nnimap+mail.lifelogs.com:train")
23071
23072  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
23073  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
23074
23075  (ham-process-destination "nnimap+mail.lifelogs.com:mail" 
23076                           "nnimap+mail.lifelogs.com:trainham")
23077  ;; @r{in this group, only @samp{!} marks are ham}
23078  (ham-marks
23079   (gnus-ticked-mark))
23080  ;; @r{remembers senders in the blacklist on the way out---this is}
23081  ;; @r{definitely not needed, it just makes me feel better}
23082  (spam-process (gnus-group-spam-exit-processor-blacklist)))
23083
23084 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
23085 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
23086 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
23087
23088 @end example
23089
23090 @subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
23091 From Reiner Steib <reiner.steib@@gmx.de>.
23092
23093 My provider has set up bogofilter (in combination with @acronym{DCC}) on
23094 the mail server (@acronym{IMAP}).  Recognized spam goes to
23095 @samp{spam.detected}, the rest goes through the normal filter rules,
23096 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
23097 positives or negatives is done by copying or moving the article to
23098 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
23099 the server feeds those to bogofilter with the suitable ham or spam
23100 options and deletes them from the @samp{training.ham} and
23101 @samp{training.spam} folders.
23102
23103 With the following entries in @code{gnus-parameters}, @code{spam.el}
23104 does most of the job for me:
23105
23106 @lisp
23107    ("nnimap:spam\\.detected"
23108     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
23109     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
23110     (spam-contents gnus-group-spam-classification-spam))
23111    ("nnimap:\\(INBOX\\|other-folders\\)"
23112     (spam-process-destination . "nnimap:training.spam")
23113     (spam-contents gnus-group-spam-classification-ham))
23114 @end lisp
23115
23116 @itemize 
23117
23118 @item @b{The Spam folder:}
23119
23120 In the folder @samp{spam.detected}, I have to check for false positives
23121 (i.e. legitimate mails, that were wrongly judged as spam by
23122 bogofilter or DCC).
23123
23124 Because of the @code{gnus-group-spam-classification-spam} entry, all
23125 messages are marked as spam (with @code{$}).  When I find a false
23126 positive, I mark the message with some other ham mark (@code{ham-marks},
23127 @ref{Spam ELisp Package Global Variables}).  On group exit, those
23128 messages are copied to both groups, @samp{INBOX} (where I want to have
23129 the article) and @samp{training.ham} (for training bogofilter) and
23130 deleted from the @samp{spam.detected} folder.
23131
23132 The @code{gnus-article-sort-by-chars} entry simplifies detection of
23133 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
23134 have a similar size.  Grouping them by size (i.e. chars) makes finding
23135 other false positives easier.  (Of course worms aren't @i{spam}
23136 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
23137 an excellent tool for filtering those unwanted mails for me.)
23138
23139 @item @b{Ham folders:}
23140
23141 In my ham folders, I just hit @kbd{S x}
23142 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
23143 mail (false negative).  On group exit, those messages are moved to
23144 @samp{training.ham}.
23145 @end itemize
23146
23147 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
23148
23149 From Reiner Steib <reiner.steib@@gmx.de>.
23150
23151 With following entry in @code{gnus-parameters}, @kbd{S x}
23152 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
23153 groups as spam and reports the to Gmane at group exit:
23154
23155 @lisp
23156    ("^gmane\\."
23157     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
23158 @end lisp
23159
23160 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
23161 because I don't read the groups directly from news.gmane.org, but
23162 through my local news server (leafnode).  I.e. the article numbers are
23163 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
23164 the @code{X-Report-Spam} header to find the correct number.
23165
23166 @node Blacklists and Whitelists
23167 @subsubsection Blacklists and Whitelists
23168 @cindex spam filtering
23169 @cindex whitelists, spam filtering
23170 @cindex blacklists, spam filtering
23171 @cindex spam
23172
23173 @defvar spam-use-blacklist
23174
23175 Set this variable to @code{t} if you want to use blacklists when
23176 splitting incoming mail.  Messages whose senders are in the blacklist
23177 will be sent to the @code{spam-split-group}.  This is an explicit
23178 filter, meaning that it acts only on mail senders @emph{declared} to
23179 be spammers.
23180
23181 @end defvar
23182
23183 @defvar spam-use-whitelist
23184
23185 Set this variable to @code{t} if you want to use whitelists when
23186 splitting incoming mail.  Messages whose senders are not in the
23187 whitelist will be sent to the next spam-split rule.  This is an
23188 explicit filter, meaning that unless someone is in the whitelist, their
23189 messages are not assumed to be spam or ham.
23190
23191 @end defvar
23192
23193 @defvar spam-use-whitelist-exclusive
23194
23195 Set this variable to @code{t} if you want to use whitelists as an
23196 implicit filter, meaning that every message will be considered spam
23197 unless the sender is in the whitelist.  Use with care.
23198
23199 @end defvar
23200
23201 @defvar gnus-group-spam-exit-processor-blacklist
23202
23203 Add this symbol to a group's @code{spam-process} parameter by
23204 customizing the group parameters or the
23205 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23206 added to a group's @code{spam-process} parameter, the senders of
23207 spam-marked articles will be added to the blacklist.
23208
23209 @emph{WARNING} 
23210
23211 Instead of the obsolete
23212 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
23213 that you use @code{'(spam spam-use-blacklist)}.  Everything will work
23214 the same way, we promise.
23215
23216 @end defvar
23217
23218 @defvar gnus-group-ham-exit-processor-whitelist
23219
23220 Add this symbol to a group's @code{spam-process} parameter by
23221 customizing the group parameters or the
23222 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23223 added to a group's @code{spam-process} parameter, the senders of
23224 ham-marked articles in @emph{ham} groups will be added to the
23225 whitelist.
23226
23227 @emph{WARNING} 
23228
23229 Instead of the obsolete
23230 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
23231 that you use @code{'(ham spam-use-whitelist)}.  Everything will work
23232 the same way, we promise.
23233
23234 @end defvar
23235
23236 Blacklists are lists of regular expressions matching addresses you
23237 consider to be spam senders.  For instance, to block mail from any
23238 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
23239 blacklist.  You start out with an empty blacklist.  Blacklist entries
23240 use the Emacs regular expression syntax.
23241
23242 Conversely, whitelists tell Gnus what addresses are considered
23243 legitimate.  All messages from whitelisted addresses are considered
23244 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
23245 Emacs regular expression syntax.
23246
23247 The blacklist and whitelist file locations can be customized with the
23248 @code{spam-directory} variable (@file{~/News/spam} by default), or
23249 the @code{spam-whitelist} and @code{spam-blacklist} variables
23250 directly.  The whitelist and blacklist files will by default be in the
23251 @code{spam-directory} directory, named @file{whitelist} and
23252 @file{blacklist} respectively.
23253
23254 @node BBDB Whitelists
23255 @subsubsection BBDB Whitelists
23256 @cindex spam filtering
23257 @cindex BBDB whitelists, spam filtering
23258 @cindex BBDB, spam filtering
23259 @cindex spam
23260
23261 @defvar spam-use-BBDB
23262
23263 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
23264 Whitelists}), but uses the BBDB as the source of whitelisted
23265 addresses, without regular expressions.  You must have the BBDB loaded
23266 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
23267 not in the BBDB will be sent to the next spam-split rule.  This is an
23268 explicit filter, meaning that unless someone is in the BBDB, their
23269 messages are not assumed to be spam or ham.
23270
23271 @end defvar
23272
23273 @defvar spam-use-BBDB-exclusive
23274
23275 Set this variable to @code{t} if you want to use the BBDB as an
23276 implicit filter, meaning that every message will be considered spam
23277 unless the sender is in the BBDB.  Use with care.  Only sender
23278 addresses in the BBDB will be allowed through; all others will be
23279 classified as spammers.
23280
23281 @end defvar
23282
23283 @defvar gnus-group-ham-exit-processor-BBDB
23284
23285 Add this symbol to a group's @code{spam-process} parameter by
23286 customizing the group parameters or the
23287 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23288 added to a group's @code{spam-process} parameter, the senders of
23289 ham-marked articles in @emph{ham} groups will be added to the
23290 BBDB.
23291
23292 @emph{WARNING} 
23293
23294 Instead of the obsolete
23295 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
23296 that you use @code{'(ham spam-use-BBDB)}.  Everything will work
23297 the same way, we promise.
23298
23299 @end defvar
23300
23301 @node Gmane Spam Reporting
23302 @subsubsection Gmane Spam Reporting
23303 @cindex spam reporting
23304 @cindex Gmane, spam reporting
23305 @cindex Gmane, spam reporting
23306 @cindex spam
23307
23308 @defvar gnus-group-spam-exit-processor-report-gmane
23309
23310 Add this symbol to a group's @code{spam-process} parameter by
23311 customizing the group parameters or the
23312 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23313 added to a group's @code{spam-process} parameter, the spam-marked
23314 articles groups will be reported to the Gmane administrators via a
23315 HTTP request.
23316
23317 Gmane can be found at @uref{http://gmane.org}.
23318
23319 @emph{WARNING} 
23320
23321 Instead of the obsolete
23322 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
23323 that you use @code{'(spam spam-use-gmane)}.  Everything will work the
23324 same way, we promise.
23325
23326 @end defvar
23327
23328 @defvar spam-report-gmane-use-article-number
23329
23330 This variable is @code{t} by default.  Set it to @code{nil} if you are
23331 running your own news server, for instance, and the local article
23332 numbers don't correspond to the Gmane article numbers.  When
23333 @code{spam-report-gmane-use-article-number} is @code{nil},
23334 @code{spam-report.el} will use the @code{X-Report-Spam} header that
23335 Gmane provides.
23336
23337 @end defvar
23338
23339 @node Anti-spam Hashcash Payments
23340 @subsubsection Anti-spam Hashcash Payments
23341 @cindex spam filtering
23342 @cindex hashcash, spam filtering
23343 @cindex spam
23344
23345 @defvar spam-use-hashcash
23346
23347 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
23348 Whitelists}), but uses hashcash tokens for whitelisting messages
23349 instead of the sender address.  You must have the @code{hashcash.el}
23350 package loaded for @code{spam-use-hashcash} to work properly.
23351 Messages without a hashcash payment token will be sent to the next
23352 spam-split rule.  This is an explicit filter, meaning that unless a
23353 hashcash token is found, the messages are not assumed to be spam or
23354 ham.
23355
23356 @end defvar
23357
23358 @node Blackholes
23359 @subsubsection Blackholes
23360 @cindex spam filtering
23361 @cindex blackholes, spam filtering
23362 @cindex spam
23363
23364 @defvar spam-use-blackholes
23365
23366 This option is disabled by default.  You can let Gnus consult the
23367 blackhole-type distributed spam processing systems (DCC, for instance)
23368 when you set this option.  The variable @code{spam-blackhole-servers}
23369 holds the list of blackhole servers Gnus will consult.  The current
23370 list is fairly comprehensive, but make sure to let us know if it
23371 contains outdated servers.
23372
23373 The blackhole check uses the @code{dig.el} package, but you can tell
23374 @file{spam.el} to use @code{dns.el} instead for better performance if
23375 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
23376 this time to set @code{spam-use-dig} to @code{nil} despite the
23377 possible performance improvements, because some users may be unable to
23378 use it, but you can try it and see if it works for you.
23379
23380 @end defvar
23381
23382 @defvar spam-blackhole-servers
23383
23384 The list of servers to consult for blackhole checks.
23385
23386 @end defvar
23387
23388 @defvar spam-blackhole-good-server-regex
23389
23390 A regular expression for IPs that should not be checked against the
23391 blackhole server list.  When set to @code{nil}, it has no effect.
23392
23393 @end defvar
23394
23395 @defvar spam-use-dig
23396
23397 Use the @code{dig.el} package instead of the @code{dns.el} package.
23398 The default setting of @code{t} is recommended.
23399
23400 @end defvar
23401
23402 Blackhole checks are done only on incoming mail.  There is no spam or
23403 ham processor for blackholes.
23404
23405 @node Regular Expressions Header Matching
23406 @subsubsection Regular Expressions Header Matching
23407 @cindex spam filtering
23408 @cindex regular expressions header matching, spam filtering
23409 @cindex spam
23410
23411 @defvar spam-use-regex-headers
23412
23413 This option is disabled by default.  You can let Gnus check the
23414 message headers against lists of regular expressions when you set this
23415 option.  The variables @code{spam-regex-headers-spam} and
23416 @code{spam-regex-headers-ham} hold the list of regular expressions.
23417 Gnus will check against the message headers to determine if the
23418 message is spam or ham, respectively.
23419
23420 @end defvar
23421
23422 @defvar spam-regex-headers-spam
23423
23424 The list of regular expressions that, when matched in the headers of
23425 the message, positively identify it as spam.
23426
23427 @end defvar
23428
23429 @defvar spam-regex-headers-ham
23430
23431 The list of regular expressions that, when matched in the headers of
23432 the message, positively identify it as ham.
23433
23434 @end defvar
23435
23436 Regular expression header checks are done only on incoming mail.
23437 There is no specific spam or ham processor for regular expressions.
23438
23439 @node Bogofilter
23440 @subsubsection Bogofilter
23441 @cindex spam filtering
23442 @cindex bogofilter, spam filtering
23443 @cindex spam
23444
23445 @defvar spam-use-bogofilter
23446
23447 Set this variable if you want @code{spam-split} to use Eric Raymond's
23448 speedy Bogofilter.
23449
23450 With a minimum of care for associating the @samp{$} mark for spam
23451 articles only, Bogofilter training all gets fairly automatic.  You
23452 should do this until you get a few hundreds of articles in each
23453 category, spam or not.  The command @kbd{S t} in summary mode, either
23454 for debugging or for curiosity, shows the @emph{spamicity} score of
23455 the current article (between 0.0 and 1.0).
23456
23457 Bogofilter determines if a message is spam based on a specific
23458 threshold.  That threshold can be customized, consult the Bogofilter
23459 documentation.
23460
23461 If the @code{bogofilter} executable is not in your path, Bogofilter
23462 processing will be turned off.
23463
23464 You should not enable this if you use @code{spam-use-bogofilter-headers}.
23465
23466 @end defvar
23467
23468 @defvar spam-use-bogofilter-headers
23469
23470 Set this variable if you want @code{spam-split} to use Eric Raymond's
23471 speedy Bogofilter, looking only at the message headers.  It works
23472 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
23473 must be in the message already.  Normally you would do this with a
23474 procmail recipe or something similar; consult the Bogofilter
23475 installation documents for details.
23476
23477 You should not enable this if you use @code{spam-use-bogofilter}.
23478
23479 @end defvar
23480
23481 @defvar gnus-group-spam-exit-processor-bogofilter
23482 Add this symbol to a group's @code{spam-process} parameter by
23483 customizing the group parameters or the
23484 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23485 added to a group's @code{spam-process} parameter, spam-marked articles
23486 will be added to the Bogofilter spam database.
23487
23488 @emph{WARNING} 
23489
23490 Instead of the obsolete
23491 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
23492 that you use @code{'(spam spam-use-bogofilter)}.  Everything will work
23493 the same way, we promise.
23494 @end defvar
23495
23496 @defvar gnus-group-ham-exit-processor-bogofilter
23497 Add this symbol to a group's @code{spam-process} parameter by
23498 customizing the group parameters or the
23499 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23500 added to a group's @code{spam-process} parameter, the ham-marked
23501 articles in @emph{ham} groups will be added to the Bogofilter database
23502 of non-spam messages.
23503
23504 @emph{WARNING} 
23505
23506 Instead of the obsolete
23507 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
23508 that you use @code{'(ham spam-use-bogofilter)}.  Everything will work
23509 the same way, we promise.
23510 @end defvar
23511
23512 @defvar spam-bogofilter-database-directory
23513
23514 This is the directory where Bogofilter will store its databases.  It
23515 is not specified by default, so Bogofilter will use its own default
23516 database directory.
23517
23518 @end defvar
23519
23520 The Bogofilter mail classifier is similar to @command{ifile} in intent and
23521 purpose.  A ham and a spam processor are provided, plus the
23522 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
23523 variables to indicate to spam-split that Bogofilter should either be
23524 used, or has already been used on the article.  The 0.9.2.1 version of
23525 Bogofilter was used to test this functionality.
23526
23527 @node SpamAssassin backend
23528 @subsubsection SpamAssassin backend
23529 @cindex spam filtering
23530 @cindex spamassassin, spam filtering
23531 @cindex spam
23532
23533 @defvar spam-use-spamassassin
23534
23535 Set this variable if you want @code{spam-split} to use SpamAssassin.
23536
23537 SpamAssassin assigns a score to each article based on a set of rules
23538 and tests, including a Bayesian filter.  The Bayesian filter can be
23539 trained by associating the @samp{$} mark for spam articles.  The
23540 spam score can be viewed by using the command @kbd{S t} in summary
23541 mode.
23542
23543 If you set this variable, each article will be processed by
23544 SpamAssassin when @code{spam-split} is called.  If your mail is
23545 preprocessed by SpamAssassin, and you want to just use the
23546 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
23547 instead.
23548
23549 You should not enable this is you use
23550 @code{spam-use-spamassassin-headers}.
23551
23552 @end defvar
23553
23554 @defvar spam-use-spamassassin-headers
23555
23556 Set this variable if your mail is preprocessed by SpamAssassin and
23557 want @code{spam-split} to split based on the SpamAssassin headers.
23558
23559 You should not enable this is you use @code{spam-use-spamassassin}.
23560
23561 @end defvar
23562
23563 @defvar spam-spamassassin-path
23564
23565 This variable points to the SpamAssassin executable.  If you have
23566 @code{spamd} running, you can set this variable to the @code{spamc}
23567 executable for faster processing.  See the SpamAssassin documentation
23568 for more information on @code{spamd}/@code{spamc}.
23569
23570 @end defvar
23571
23572 SpamAssassin is a powerful and flexible spam filter that uses a wide
23573 variety of tests to identify spam.  A ham and a spam processors are
23574 provided, plus the @code{spam-use-spamassassin} and
23575 @code{spam-use-spamassassin-headers} variables to indicate to
23576 spam-split that SpamAssassin should be either used, or has already
23577 been used on the article.  The 2.63 version of SpamAssassin was used
23578 to test this functionality.
23579
23580 @node ifile spam filtering
23581 @subsubsection ifile spam filtering
23582 @cindex spam filtering
23583 @cindex ifile, spam filtering
23584 @cindex spam
23585
23586 @defvar spam-use-ifile
23587
23588 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
23589 statistical analyzer similar to Bogofilter.
23590
23591 @end defvar
23592
23593 @defvar spam-ifile-all-categories
23594
23595 Enable this variable if you want @code{spam-use-ifile} to give you all
23596 the ifile categories, not just spam/non-spam.  If you use this, make
23597 sure you train ifile as described in its documentation.
23598
23599 @end defvar
23600
23601 @defvar spam-ifile-spam-category
23602
23603 This is the category of spam messages as far as ifile is concerned.
23604 The actual string used is irrelevant, but you probably want to leave
23605 the default value of @samp{spam}.
23606 @end defvar
23607
23608 @defvar spam-ifile-database-path
23609
23610 This is the filename for the ifile database.  It is not specified by
23611 default, so ifile will use its own default database name.
23612
23613 @end defvar
23614
23615 The ifile mail classifier is similar to Bogofilter in intent and
23616 purpose.  A ham and a spam processor are provided, plus the
23617 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23618 should be used.  The 1.2.1 version of ifile was used to test this
23619 functionality.
23620
23621 @node spam-stat spam filtering
23622 @subsubsection spam-stat spam filtering
23623 @cindex spam filtering
23624 @cindex spam-stat, spam filtering
23625 @cindex spam-stat
23626 @cindex spam
23627
23628 @xref{Filtering Spam Using Statistics with spam-stat}.
23629
23630 @defvar spam-use-stat
23631
23632 Enable this variable if you want @code{spam-split} to use
23633 spam-stat.el, an Emacs Lisp statistical analyzer.
23634
23635 @end defvar
23636
23637 @defvar gnus-group-spam-exit-processor-stat
23638 Add this symbol to a group's @code{spam-process} parameter by
23639 customizing the group parameters or the
23640 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23641 added to a group's @code{spam-process} parameter, the spam-marked
23642 articles will be added to the spam-stat database of spam messages.
23643
23644 @emph{WARNING} 
23645
23646 Instead of the obsolete
23647 @code{gnus-group-spam-exit-processor-stat}, it is recommended
23648 that you use @code{'(spam spam-use-stat)}.  Everything will work
23649 the same way, we promise.
23650 @end defvar
23651
23652 @defvar gnus-group-ham-exit-processor-stat
23653 Add this symbol to a group's @code{spam-process} parameter by
23654 customizing the group parameters or the
23655 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23656 added to a group's @code{spam-process} parameter, the ham-marked
23657 articles in @emph{ham} groups will be added to the spam-stat database
23658 of non-spam messages.
23659
23660 @emph{WARNING} 
23661
23662 Instead of the obsolete
23663 @code{gnus-group-ham-exit-processor-stat}, it is recommended
23664 that you use @code{'(ham spam-use-stat)}.  Everything will work
23665 the same way, we promise.
23666 @end defvar
23667
23668 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23669 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23670 which unlike ifile or Bogofilter does not require external programs.
23671 A spam and a ham processor, and the @code{spam-use-stat} variable for
23672 @code{spam-split} are provided.
23673
23674 @node SpamOracle
23675 @subsubsection Using SpamOracle with Gnus
23676 @cindex spam filtering
23677 @cindex SpamOracle
23678 @cindex spam
23679
23680 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23681 statistical mail filtering tool written by Xavier Leroy and needs to be
23682 installed separately.
23683
23684 There are several ways to use SpamOracle with Gnus.  In all cases, your
23685 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23686 then enter an @samp{X-Spam} header indicating whether it regards the
23687 mail as a spam mail or not.
23688
23689 One possibility is to run SpamOracle as a @code{:prescript} from the
23690 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23691 the advantage that the user can see the @emph{X-Spam} headers.
23692
23693 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23694 Using The Spam ELisp Package}) call SpamOracle.
23695
23696 @vindex spam-use-spamoracle
23697 To enable SpamOracle usage by @file{spam.el}, set the variable
23698 @code{spam-use-spamoracle} to @code{t} and configure the
23699 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23700 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23701 this example the @samp{INBOX} of an nnimap server is filtered using
23702 SpamOracle.  Mails recognized as spam mails will be moved to
23703 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23704 in @samp{INBOX}:
23705
23706 @example
23707 (setq spam-use-spamoracle t
23708       spam-split-group "Junk"
23709       nnimap-split-inbox '("INBOX")
23710       nnimap-split-rule 'nnimap-split-fancy
23711       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23712 @end example
23713
23714 @defvar spam-use-spamoracle
23715 Set to @code{t} if you want Gnus to enable spam filtering using
23716 SpamOracle.
23717 @end defvar
23718
23719 @defvar spam-spamoracle-binary
23720 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23721 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23722 can be customized.
23723 @end defvar
23724
23725 @defvar spam-spamoracle-database
23726 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23727 store its analyses.  This is controlled by the variable
23728 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23729 the default SpamOracle database will be used.  In case you want your
23730 database to live somewhere special, set
23731 @code{spam-spamoracle-database} to this path.
23732 @end defvar
23733
23734 SpamOracle employs a statistical algorithm to determine whether a
23735 message is spam or ham.  In order to get good results, meaning few
23736 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23737 characteristics of your spam mails.  Using the @emph{add} mode
23738 (training mode) one has to feed good (ham) and spam mails to
23739 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23740 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23741 spam- and ham-processors, which is much more convenient.  For a
23742 detailed description of spam- and ham-processors, @xref{Filtering Spam
23743 Using The Spam ELisp Package}.
23744
23745 @defvar gnus-group-spam-exit-processor-spamoracle
23746 Add this symbol to a group's @code{spam-process} parameter by
23747 customizing the group parameter or the
23748 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23749 to a group's @code{spam-process} parameter, spam-marked articles will be
23750 sent to SpamOracle as spam samples.
23751
23752 @emph{WARNING} 
23753
23754 Instead of the obsolete
23755 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
23756 that you use @code{'(spam spam-use-spamoracle)}.  Everything will work
23757 the same way, we promise.
23758 @end defvar
23759
23760 @defvar gnus-group-ham-exit-processor-spamoracle
23761 Add this symbol to a group's @code{spam-process} parameter by
23762 customizing the group parameter or the
23763 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23764 to a group's @code{spam-process} parameter, the ham-marked articles in
23765 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23766 messages.
23767
23768 @emph{WARNING} 
23769
23770 Instead of the obsolete
23771 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
23772 that you use @code{'(ham spam-use-spamoracle)}.  Everything will work
23773 the same way, we promise.
23774 @end defvar
23775
23776 @emph{Example:} These are the Group Parameters of a group that has been
23777 classified as a ham group, meaning that it should only contain ham
23778 messages.
23779 @example
23780  ((spam-contents gnus-group-spam-classification-ham)
23781   (spam-process ((ham spam-use-spamoracle)
23782                  (spam spam-use-spamoracle))))
23783 @end example
23784 For this group the @code{spam-use-spamoracle} is installed for both
23785 ham and spam processing.  If the group contains spam message
23786 (e.g. because SpamOracle has not had enough sample messages yet) and
23787 the user marks some messages as spam messages, these messages will be
23788 processed by SpamOracle.  The processor sends the messages to
23789 SpamOracle as new samples for spam.
23790
23791 @node Extending the Spam ELisp package
23792 @subsubsection Extending the Spam ELisp package
23793 @cindex spam filtering
23794 @cindex spam elisp package, extending
23795 @cindex extending the spam elisp package
23796
23797 Say you want to add a new back end called blackbox.  For filtering
23798 incoming mail, provide the following:
23799
23800 @enumerate
23801
23802 @item
23803 Code
23804
23805 @lisp
23806 (defvar spam-use-blackbox nil
23807   "True if blackbox should be used.")
23808 @end lisp
23809
23810 Add
23811 @lisp
23812 (spam-use-blackbox   . spam-check-blackbox)
23813 @end lisp
23814 to @code{spam-list-of-checks}.
23815
23816 Add
23817 @lisp
23818 (gnus-group-ham-exit-processor-blackbox  ham spam-use-blackbox)
23819 (gnus-group-spam-exit-processor-blackbox spam spam-use-blackbox)
23820 @end lisp
23821
23822 to @code{spam-list-of-processors}.
23823
23824 Add
23825 @lisp
23826 (spam-use-blackbox spam-blackbox-register-routine
23827                    nil
23828                    spam-blackbox-unregister-routine
23829                    nil)
23830 @end lisp
23831
23832 to @code{spam-registration-functions}.  Write the register/unregister
23833 routines using the bogofilter register/unregister routines as a
23834 start, or other restister/unregister routines more appropriate to
23835 Blackbox.
23836
23837 @item
23838 Functionality
23839
23840 Write the @code{spam-check-blackbox} function.  It should return
23841 @samp{nil} or @code{spam-split-group}, observing the other
23842 conventions.  See the existing @code{spam-check-*} functions for
23843 examples of what you can do, and stick to the template unless you
23844 fully understand the reasons why you aren't.
23845
23846 Make sure to add @code{spam-use-blackbox} to
23847 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23848 mail analyzer that needs the full message body to operate.
23849
23850 @end enumerate
23851
23852 For processing spam and ham messages, provide the following:
23853
23854 @enumerate
23855
23856 @item
23857 Code
23858
23859 Note you don't have to provide a spam or a ham processor.  Only
23860 provide them if Blackbox supports spam or ham processing.
23861
23862 Also, ham and spam processors are being phased out as single
23863 variables.  Instead the form @code{'(spam spam-use-blackbox)} or 
23864 @code{'(ham spam-use-blackbox)} is favored.  For now, spam/ham
23865 processor variables are still around but they won't be for long.
23866
23867 @lisp
23868 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
23869   "The Blackbox summary exit spam processor.
23870 Only applicable to spam groups.")
23871
23872 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
23873   "The whitelist summary exit ham processor.
23874 Only applicable to non-spam (unclassified and ham) groups.")
23875
23876 @end lisp
23877
23878 @item
23879 Gnus parameters
23880
23881 Add
23882 @lisp
23883 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
23884 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
23885 @end lisp
23886 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
23887 sure you do it twice, once for the parameter and once for the
23888 variable customization.
23889
23890 Add
23891 @lisp
23892 (variable-item spam-use-blackbox)
23893 @end lisp
23894 to the @code{spam-autodetect-methods} group parameter in
23895 @code{gnus.el}.
23896
23897 @end enumerate
23898
23899
23900 @node Filtering Spam Using Statistics with spam-stat
23901 @subsection Filtering Spam Using Statistics with spam-stat
23902 @cindex Paul Graham
23903 @cindex Graham, Paul
23904 @cindex naive Bayesian spam filtering
23905 @cindex Bayesian spam filtering, naive
23906 @cindex spam filtering, naive Bayesian
23907
23908 Paul Graham has written an excellent essay about spam filtering using
23909 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23910 Spam}.  In it he describes the inherent deficiency of rule-based
23911 filtering as used by SpamAssassin, for example: Somebody has to write
23912 the rules, and everybody else has to install these rules.  You are
23913 always late.  It would be much better, he argues, to filter mail based
23914 on whether it somehow resembles spam or non-spam.  One way to measure
23915 this is word distribution.  He then goes on to describe a solution
23916 that checks whether a new mail resembles any of your other spam mails
23917 or not.
23918
23919 The basic idea is this:  Create a two collections of your mail, one
23920 with spam, one with non-spam.  Count how often each word appears in
23921 either collection, weight this by the total number of mails in the
23922 collections, and store this information in a dictionary.  For every
23923 word in a new mail, determine its probability to belong to a spam or a
23924 non-spam mail.  Use the 15 most conspicuous words, compute the total
23925 probability of the mail being spam.  If this probability is higher
23926 than a certain threshold, the mail is considered to be spam.
23927
23928 Gnus supports this kind of filtering.  But it needs some setting up.
23929 First, you need two collections of your mail, one with spam, one with
23930 non-spam.  Then you need to create a dictionary using these two
23931 collections, and save it.  And last but not least, you need to use
23932 this dictionary in your fancy mail splitting rules.
23933
23934 @menu
23935 * Creating a spam-stat dictionary::
23936 * Splitting mail using spam-stat::
23937 * Low-level interface to the spam-stat dictionary::
23938 @end menu
23939
23940 @node Creating a spam-stat dictionary
23941 @subsubsection Creating a spam-stat dictionary
23942
23943 Before you can begin to filter spam based on statistics, you must
23944 create these statistics based on two mail collections, one with spam,
23945 one with non-spam.  These statistics are then stored in a dictionary
23946 for later use.  In order for these statistics to be meaningful, you
23947 need several hundred emails in both collections.
23948
23949 Gnus currently supports only the nnml back end for automated dictionary
23950 creation.  The nnml back end stores all mails in a directory, one file
23951 per mail.  Use the following:
23952
23953 @defun spam-stat-process-spam-directory
23954 Create spam statistics for every file in this directory.  Every file
23955 is treated as one spam mail.
23956 @end defun
23957
23958 @defun spam-stat-process-non-spam-directory
23959 Create non-spam statistics for every file in this directory.  Every
23960 file is treated as one non-spam mail.
23961 @end defun
23962
23963 Usually you would call @code{spam-stat-process-spam-directory} on a
23964 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23965 the the group @samp{nnml:mail.spam}), and you would call
23966 @code{spam-stat-process-non-spam-directory} on a directory such as
23967 @file{~/Mail/mail/misc} (this usually corresponds the the group
23968 @samp{nnml:mail.misc}).
23969
23970 When you are using @acronym{IMAP}, you won't have the mails available
23971 locally, so that will not work.  One solution is to use the Gnus Agent
23972 to cache the articles.  Then you can use directories such as
23973 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23974 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23975
23976 @defvar spam-stat
23977 This variable holds the hash-table with all the statistics---the
23978 dictionary we have been talking about.  For every word in either
23979 collection, this hash-table stores a vector describing how often the
23980 word appeared in spam and often it appeared in non-spam mails.
23981 @end defvar
23982
23983 If you want to regenerate the statistics from scratch, you need to
23984 reset the dictionary.
23985
23986 @defun spam-stat-reset
23987 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23988 @end defun
23989
23990 When you are done, you must save the dictionary.  The dictionary may
23991 be rather large.  If you will not update the dictionary incrementally
23992 (instead, you will recreate it once a month, for example), then you
23993 can reduce the size of the dictionary by deleting all words that did
23994 not appear often enough or that do not clearly belong to only spam or
23995 only non-spam mails.
23996
23997 @defun spam-stat-reduce-size
23998 Reduce the size of the dictionary.  Use this only if you do not want
23999 to update the dictionary incrementally.
24000 @end defun
24001
24002 @defun spam-stat-save
24003 Save the dictionary.
24004 @end defun
24005
24006 @defvar spam-stat-file
24007 The filename used to store the dictionary.  This defaults to
24008 @file{~/.spam-stat.el}.
24009 @end defvar
24010
24011 @node Splitting mail using spam-stat
24012 @subsubsection Splitting mail using spam-stat
24013
24014 In order to use @code{spam-stat} to split your mail, you need to add the
24015 following to your @file{~/.gnus.el} file:
24016
24017 @lisp
24018 (require 'spam-stat)
24019 (spam-stat-load)
24020 @end lisp
24021
24022 This will load the necessary Gnus code, and the dictionary you
24023 created.
24024
24025 Next, you need to adapt your fancy splitting rules:  You need to
24026 determine how to use @code{spam-stat}.  The following examples are for
24027 the nnml back end.  Using the nnimap back end works just as well.  Just
24028 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
24029
24030 In the simplest case, you only have two groups, @samp{mail.misc} and
24031 @samp{mail.spam}.  The following expression says that mail is either
24032 spam or it should go into @samp{mail.misc}.  If it is spam, then
24033 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
24034
24035 @lisp
24036 (setq nnmail-split-fancy
24037       `(| (: spam-stat-split-fancy)
24038           "mail.misc"))
24039 @end lisp
24040
24041 @defvar spam-stat-split-fancy-spam-group
24042 The group to use for spam.  Default is @samp{mail.spam}.
24043 @end defvar
24044
24045 If you also filter mail with specific subjects into other groups, use
24046 the following expression.  Only mails not matching the regular
24047 expression are considered potential spam.
24048
24049 @lisp
24050 (setq nnmail-split-fancy
24051       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
24052           (: spam-stat-split-fancy)
24053           "mail.misc"))
24054 @end lisp
24055
24056 If you want to filter for spam first, then you must be careful when
24057 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
24058 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
24059 non-spam, therefore both should be in your collection of non-spam
24060 mails, when creating the dictionary!
24061
24062 @lisp
24063 (setq nnmail-split-fancy
24064       `(| (: spam-stat-split-fancy)
24065           ("Subject" "\\bspam-stat\\b" "mail.emacs")
24066           "mail.misc"))
24067 @end lisp
24068
24069 You can combine this with traditional filtering.  Here, we move all
24070 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
24071 @code{spam-stat-split-fancy} will never see them, the mails in
24072 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
24073 nor in your collection of non-spam mails, when creating the
24074 dictionary!
24075
24076 @lisp
24077 (setq nnmail-split-fancy
24078       `(| ("Content-Type" "text/html" "mail.spam.filtered")
24079           (: spam-stat-split-fancy)
24080           ("Subject" "\\bspam-stat\\b" "mail.emacs")
24081           "mail.misc"))
24082 @end lisp
24083
24084
24085 @node Low-level interface to the spam-stat dictionary
24086 @subsubsection Low-level interface to the spam-stat dictionary
24087
24088 The main interface to using @code{spam-stat}, are the following functions:
24089
24090 @defun spam-stat-buffer-is-spam
24091 Called in a buffer, that buffer is considered to be a new spam mail.
24092 Use this for new mail that has not been processed before.
24093 @end defun
24094
24095 @defun spam-stat-buffer-is-no-spam
24096 Called in a buffer, that buffer is considered to be a new non-spam
24097 mail.  Use this for new mail that has not been processed before.
24098 @end defun
24099
24100 @defun spam-stat-buffer-change-to-spam
24101 Called in a buffer, that buffer is no longer considered to be normal
24102 mail but spam.  Use this to change the status of a mail that has
24103 already been processed as non-spam.
24104 @end defun
24105
24106 @defun spam-stat-buffer-change-to-non-spam
24107 Called in a buffer, that buffer is no longer considered to be spam but
24108 normal mail.  Use this to change the status of a mail that has already
24109 been processed as spam.
24110 @end defun
24111
24112 @defun spam-stat-save
24113 Save the hash table to the file.  The filename used is stored in the
24114 variable @code{spam-stat-file}.
24115 @end defun
24116
24117 @defun spam-stat-load
24118 Load the hash table from a file.  The filename used is stored in the
24119 variable @code{spam-stat-file}.
24120 @end defun
24121
24122 @defun spam-stat-score-word
24123 Return the spam score for a word.
24124 @end defun
24125
24126 @defun spam-stat-score-buffer
24127 Return the spam score for a buffer.
24128 @end defun
24129
24130 @defun spam-stat-split-fancy
24131 Use this function for fancy mail splitting.  Add the rule @samp{(:
24132 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
24133 @end defun
24134
24135 Make sure you load the dictionary before using it.  This requires the
24136 following in your @file{~/.gnus.el} file:
24137
24138 @lisp
24139 (require 'spam-stat)
24140 (spam-stat-load)
24141 @end lisp
24142
24143 Typical test will involve calls to the following functions:
24144
24145 @smallexample
24146 Reset: (setq spam-stat (make-hash-table :test 'equal))
24147 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24148 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24149 Save table: (spam-stat-save)
24150 File size: (nth 7 (file-attributes spam-stat-file))
24151 Number of words: (hash-table-count spam-stat)
24152 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24153 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24154 Reduce table size: (spam-stat-reduce-size)
24155 Save table: (spam-stat-save)
24156 File size: (nth 7 (file-attributes spam-stat-file))
24157 Number of words: (hash-table-count spam-stat)
24158 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24159 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24160 @end smallexample
24161
24162 Here is how you would create your dictionary:
24163
24164 @smallexample
24165 Reset: (setq spam-stat (make-hash-table :test 'equal))
24166 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24167 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24168 Repeat for any other non-spam group you need...
24169 Reduce table size: (spam-stat-reduce-size)
24170 Save table: (spam-stat-save)
24171 @end smallexample
24172
24173 @node Other modes
24174 @section Interaction with other modes
24175
24176 @subsection Dired
24177 @cindex dired
24178
24179 @code{gnus-dired-minor-mode} provided some useful functions for dired
24180 buffers.  It is enabled with
24181 @lisp
24182 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24183 @end lisp
24184
24185 @table @kbd
24186 @item C-c C-m C-a
24187 @findex gnus-dired-attach
24188 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
24189 You will be prompted for a message buffer.
24190
24191 @item C-c C-m C-l
24192 @findex gnus-dired-find-file-mailcap
24193 Visit a file according to the appropriate mailcap entry
24194 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
24195 buffer.
24196
24197 @item C-c C-m C-p
24198 @findex gnus-dired-print
24199 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
24200 there is no print command, print in a PostScript image.
24201 @end table
24202
24203 @node Various Various
24204 @section Various Various
24205 @cindex mode lines
24206 @cindex highlights
24207
24208 @table @code
24209
24210 @item gnus-home-directory
24211 @vindex gnus-home-directory
24212 All Gnus file and directory variables will be initialized from this
24213 variable, which defaults to @file{~/}.
24214
24215 @item gnus-directory
24216 @vindex gnus-directory
24217 Most Gnus storage file and directory variables will be initialized from
24218 this variable, which defaults to the @env{SAVEDIR} environment
24219 variable, or @file{~/News/} if that variable isn't set.
24220
24221 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
24222 This means that other directory variables that are initialized from this
24223 variable won't be set properly if you set this variable in
24224 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
24225
24226 @item gnus-default-directory
24227 @vindex gnus-default-directory
24228 Not related to the above variable at all---this variable says what the
24229 default directory of all Gnus buffers should be.  If you issue commands
24230 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
24231 default directory.  If this variable is @code{nil} (which is the
24232 default), the default directory will be the default directory of the
24233 buffer you were in when you started Gnus.
24234
24235 @item gnus-verbose
24236 @vindex gnus-verbose
24237 This variable is an integer between zero and ten.  The higher the value,
24238 the more messages will be displayed.  If this variable is zero, Gnus
24239 will never flash any messages, if it is seven (which is the default),
24240 most important messages will be shown, and if it is ten, Gnus won't ever
24241 shut up, but will flash so many messages it will make your head swim.
24242
24243 @item gnus-verbose-backends
24244 @vindex gnus-verbose-backends
24245 This variable works the same way as @code{gnus-verbose}, but it applies
24246 to the Gnus back ends instead of Gnus proper.
24247
24248 @item nnheader-max-head-length
24249 @vindex nnheader-max-head-length
24250 When the back ends read straight heads of articles, they all try to read
24251 as little as possible.  This variable (default 4096) specifies
24252 the absolute max length the back ends will try to read before giving up
24253 on finding a separator line between the head and the body.  If this
24254 variable is @code{nil}, there is no upper read bound.  If it is
24255 @code{t}, the back ends won't try to read the articles piece by piece,
24256 but read the entire articles.  This makes sense with some versions of
24257 @code{ange-ftp} or @code{efs}.
24258
24259 @item nnheader-head-chop-length
24260 @vindex nnheader-head-chop-length
24261 This variable (default 2048) says how big a piece of each article to
24262 read when doing the operation described above.
24263
24264 @item nnheader-file-name-translation-alist
24265 @vindex nnheader-file-name-translation-alist
24266 @cindex file names
24267 @cindex invalid characters in file names
24268 @cindex characters in file names
24269 This is an alist that says how to translate characters in file names.
24270 For instance, if @samp{:} is invalid as a file character in file names
24271 on your system (you OS/2 user you), you could say something like:
24272
24273 @lisp
24274 @group
24275 (setq nnheader-file-name-translation-alist
24276       '((?: . ?_)))
24277 @end group
24278 @end lisp
24279
24280 In fact, this is the default value for this variable on OS/2 and MS
24281 Windows (phooey) systems.
24282
24283 @item gnus-hidden-properties
24284 @vindex gnus-hidden-properties
24285 This is a list of properties to use to hide ``invisible'' text.  It is
24286 @code{(invisible t intangible t)} by default on most systems, which
24287 makes invisible text invisible and intangible.
24288
24289 @item gnus-parse-headers-hook
24290 @vindex gnus-parse-headers-hook
24291 A hook called before parsing headers.  It can be used, for instance, to
24292 gather statistics on the headers fetched, or perhaps you'd like to prune
24293 some headers.  I don't see why you'd want that, though.
24294
24295 @item gnus-shell-command-separator
24296 @vindex gnus-shell-command-separator
24297 String used to separate two shell commands.  The default is @samp{;}.
24298
24299 @item gnus-invalid-group-regexp
24300 @vindex gnus-invalid-group-regexp
24301
24302 Regexp to match ``invalid'' group names when querying user for a group
24303 name.  The default value catches some @strong{really} invalid group
24304 names who could possibly mess up Gnus internally (like allowing
24305 @samp{:} in a group name, which is normally used to delimit method and
24306 group).
24307
24308 @acronym{IMAP} users might want to allow @samp{/} in group names though.
24309
24310
24311 @end table
24312
24313 @node The End
24314 @chapter The End
24315
24316 Well, that's the manual---you can get on with your life now.  Keep in
24317 touch.  Say hello to your cats from me.
24318
24319 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
24320
24321 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
24322
24323 @quotation
24324 @strong{Te Deum}
24325
24326 @sp 1
24327 Not because of victories @*
24328 I sing,@*
24329 having none,@*
24330 but for the common sunshine,@*
24331 the breeze,@*
24332 the largess of the spring.
24333
24334 @sp 1
24335 Not for victory@*
24336 but for the day's work done@*
24337 as well as I was able;@*
24338 not for a seat upon the dais@*
24339 but at the common table.@*
24340 @end quotation
24341
24342
24343 @node Appendices
24344 @chapter Appendices
24345
24346 @menu
24347 * XEmacs::                      Requirements for installing under XEmacs.
24348 * History::                     How Gnus got where it is today.
24349 * On Writing Manuals::          Why this is not a beginner's guide.
24350 * Terminology::                 We use really difficult, like, words here.
24351 * Customization::               Tailoring Gnus to your needs.
24352 * Troubleshooting::             What you might try if things do not work.
24353 * Gnus Reference Guide::        Rilly, rilly technical stuff.
24354 * Emacs for Heathens::          A short introduction to Emacsian terms.
24355 * Frequently Asked Questions::  The Gnus FAQ
24356 @end menu
24357
24358
24359 @node XEmacs
24360 @section XEmacs
24361 @cindex XEmacs
24362 @cindex installing under XEmacs
24363
24364 XEmacs is distributed as a collection of packages.  You should install
24365 whatever packages the Gnus XEmacs package requires.  The current
24366 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
24367 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
24368 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{w3},
24369 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
24370
24371
24372 @node History
24373 @section History
24374
24375 @cindex history
24376 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
24377 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
24378
24379 If you want to investigate the person responsible for this outrage,
24380 you can point your (feh!) web browser to
24381 @uref{http://quimby.gnus.org/}.  This is also the primary
24382 distribution point for the new and spiffy versions of Gnus, and is
24383 known as The Site That Destroys Newsrcs And Drives People Mad.
24384
24385 During the first extended alpha period of development, the new Gnus was
24386 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
24387 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
24388 (Besides, the ``Gnus'' in this abbreviation should probably be
24389 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
24390 appropriate name, don't you think?)
24391
24392 In any case, after spending all that energy on coming up with a new and
24393 spunky name, we decided that the name was @emph{too} spunky, so we
24394 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
24395 ``@sc{gnus}''.  New vs. old.
24396
24397 @menu
24398 * Gnus Versions::               What Gnus versions have been released.
24399 * Other Gnus Versions::         Other Gnus versions that also have been released.
24400 * Why?::                        What's the point of Gnus?
24401 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
24402 * Conformity::                  Gnus tries to conform to all standards.
24403 * Emacsen::                     Gnus can be run on a few modern Emacsen.
24404 * Gnus Development::            How Gnus is developed.
24405 * Contributors::                Oodles of people.
24406 * New Features::                Pointers to some of the new stuff in Gnus.
24407 @end menu
24408
24409
24410 @node Gnus Versions
24411 @subsection Gnus Versions
24412 @cindex ding Gnus
24413 @cindex September Gnus
24414 @cindex Red Gnus
24415 @cindex Quassia Gnus
24416 @cindex Pterodactyl Gnus
24417 @cindex Oort Gnus
24418 @cindex No Gnus
24419 @cindex Gnus versions
24420
24421 The first ``proper'' release of Gnus 5 was done in November 1995 when it
24422 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
24423 plus 15 Gnus 5.0 releases).
24424
24425 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
24426 releases)) was released under the name ``Gnus 5.2'' (40 releases).
24427
24428 On July 28th 1996 work on Red Gnus was begun, and it was released on
24429 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
24430
24431 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
24432 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
24433
24434 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
24435 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
24436 1999.
24437
24438 On the 26th of October 2000, Oort Gnus was begun.
24439
24440 If you happen upon a version of Gnus that has a prefixed name --
24441 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
24442 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
24443 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
24444 run.  Walk away, calmly, until you're out of its reach.  Find a proper
24445 released version of Gnus and snuggle up to that instead.
24446
24447
24448 @node Other Gnus Versions
24449 @subsection Other Gnus Versions
24450 @cindex Semi-gnus
24451
24452 In addition to the versions of Gnus which have had their releases
24453 coordinated by Lars, one major development has been Semi-gnus from
24454 Japan.  It's based on a library called @acronym{SEMI}, which provides
24455 @acronym{MIME} capabilities.
24456
24457 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
24458 Collectively, they are called ``Semi-gnus'', and different strains are
24459 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
24460 @acronym{MIME} and multilingualization things, especially important for
24461 Japanese users.
24462
24463
24464 @node Why?
24465 @subsection Why?
24466
24467 What's the point of Gnus?
24468
24469 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
24470 newsreader, that lets you do anything you can think of.  That was my
24471 original motivation, but while working on Gnus, it has become clear to
24472 me that this generation of newsreaders really belong in the stone age.
24473 Newsreaders haven't developed much since the infancy of the net.  If the
24474 volume continues to rise with the current rate of increase, all current
24475 newsreaders will be pretty much useless.  How do you deal with
24476 newsgroups that have thousands of new articles each day?  How do you
24477 keep track of millions of people who post?
24478
24479 Gnus offers no real solutions to these questions, but I would very much
24480 like to see Gnus being used as a testing ground for new methods of
24481 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
24482 to separate the newsreader from the back ends, Gnus now offers a simple
24483 interface for anybody who wants to write new back ends for fetching mail
24484 and news from different sources.  I have added hooks for customizations
24485 everywhere I could imagine it being useful.  By doing so, I'm inviting
24486 every one of you to explore and invent.
24487
24488 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
24489 @kbd{C-u 100 M-x all-hail-xemacs}.
24490
24491
24492 @node Compatibility
24493 @subsection Compatibility
24494
24495 @cindex compatibility
24496 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
24497 bindings have been kept.  More key bindings have been added, of course,
24498 but only in one or two obscure cases have old bindings been changed.
24499
24500 Our motto is:
24501 @quotation
24502 @cartouche
24503 @center In a cloud bones of steel.
24504 @end cartouche
24505 @end quotation
24506
24507 All commands have kept their names.  Some internal functions have changed
24508 their names.
24509
24510 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
24511 Articles}.
24512
24513 One major compatibility question is the presence of several summary
24514 buffers.  All variables relevant while reading a group are
24515 buffer-local to the summary buffer they belong in.  Although many
24516 important variables have their values copied into their global
24517 counterparts whenever a command is executed in the summary buffer, this
24518 change might lead to incorrect values being used unless you are careful.
24519
24520 All code that relies on knowledge of @sc{gnus} internals will probably
24521 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
24522 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
24523 maintains a hash table that points to the entries in this alist (which
24524 speeds up many functions), and changing the alist directly will lead to
24525 peculiar results.
24526
24527 @cindex hilit19
24528 @cindex highlighting
24529 Old hilit19 code does not work at all.  In fact, you should probably
24530 remove all hilit code from all Gnus hooks
24531 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
24532 Gnus provides various integrated functions for highlighting.  These are
24533 faster and more accurate.  To make life easier for everybody, Gnus will
24534 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
24535 Away!
24536
24537 Packages like @code{expire-kill} will no longer work.  As a matter of
24538 fact, you should probably remove all old @sc{gnus} packages (and other
24539 code) when you start using Gnus.  More likely than not, Gnus already
24540 does what you have written code to make @sc{gnus} do.  (Snicker.)
24541
24542 Even though old methods of doing things are still supported, only the
24543 new methods are documented in this manual.  If you detect a new method of
24544 doing something while reading this manual, that does not mean you have
24545 to stop doing it the old way.
24546
24547 Gnus understands all @sc{gnus} startup files.
24548
24549 @kindex M-x gnus-bug
24550 @findex gnus-bug
24551 @cindex reporting bugs
24552 @cindex bugs
24553 Overall, a casual user who hasn't written much code that depends on
24554 @sc{gnus} internals should suffer no problems.  If problems occur,
24555 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
24556
24557 @vindex gnus-bug-create-help-buffer
24558 If you are in the habit of sending bug reports @emph{very} often, you
24559 may find the helpful help buffer annoying after a while.  If so, set
24560 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
24561 up at you.
24562
24563
24564 @node Conformity
24565 @subsection Conformity
24566
24567 No rebels without a clue here, ma'am.  We conform to all standards known
24568 to (wo)man.  Except for those standards and/or conventions we disagree
24569 with, of course.
24570
24571 @table @strong
24572
24573 @item RFC (2)822
24574 @cindex RFC 822
24575 @cindex RFC 2822
24576 There are no known breaches of this standard.
24577
24578 @item RFC 1036
24579 @cindex RFC 1036
24580 There are no known breaches of this standard, either.
24581
24582 @item Son-of-RFC 1036
24583 @cindex Son-of-RFC 1036
24584 We do have some breaches to this one.
24585
24586 @table @emph
24587
24588 @item X-Newsreader
24589 @itemx User-Agent
24590 These are considered to be ``vanity headers'', while I consider them
24591 to be consumer information.  After seeing so many badly formatted
24592 articles coming from @code{tin} and @code{Netscape} I know not to use
24593 either of those for posting articles.  I would not have known that if
24594 it wasn't for the @code{X-Newsreader} header.
24595 @end table
24596
24597 @item USEFOR
24598 @cindex USEFOR
24599 USEFOR is an IETF working group writing a successor to RFC 1036, based
24600 on Son-of-RFC 1036.  They have produced a number of drafts proposing
24601 various changes to the format of news articles.  The Gnus towers will
24602 look into implementing the changes when the draft is accepted as an RFC.
24603
24604 @item MIME - RFC 2045-2049 etc
24605 @cindex @acronym{MIME}
24606 All the various @acronym{MIME} RFCs are supported.
24607
24608 @item Disposition Notifications - RFC 2298
24609 Message Mode is able to request notifications from the receiver.
24610
24611 @item PGP - RFC 1991 and RFC 2440
24612 @cindex RFC 1991
24613 @cindex RFC 2440
24614 RFC 1991 is the original @acronym{PGP} message specification,
24615 published as an informational RFC.  RFC 2440 was the follow-up, now
24616 called Open PGP, and put on the Standards Track.  Both document a
24617 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
24618 encoding (signing and encryption) and decoding (verification and
24619 decryption).
24620
24621 @item PGP/MIME - RFC 2015/3156
24622 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
24623 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
24624 Gnus supports both encoding and decoding.
24625
24626 @item S/MIME - RFC 2633
24627 RFC 2633 describes the @acronym{S/MIME} format.
24628
24629 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
24630 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
24631 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
24632 authentication for @acronym{IMAP}.  RFC 2086 describes access control
24633 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
24634 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
24635 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
24636 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
24637
24638 @end table
24639
24640 If you ever notice Gnus acting non-compliant with regards to the texts
24641 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
24642 know.
24643
24644
24645 @node Emacsen
24646 @subsection Emacsen
24647 @cindex Emacsen
24648 @cindex XEmacs
24649 @cindex Mule
24650 @cindex Emacs
24651
24652 Gnus should work on:
24653
24654 @itemize @bullet
24655
24656 @item
24657 Emacs 21.1 and up.
24658
24659 @item
24660 XEmacs 21.4 and up.
24661
24662 @end itemize
24663
24664 This Gnus version will absolutely not work on any Emacsen older than
24665 that.  Not reliably, at least.  Older versions of Gnus may work on older
24666 Emacs versions.
24667
24668 There are some vague differences between Gnus on the various
24669 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24670 other than that, things should look pretty much the same under all
24671 Emacsen.
24672
24673
24674 @node Gnus Development
24675 @subsection Gnus Development
24676
24677 Gnus is developed in a two-phased cycle.  The first phase involves much
24678 discussion on the @samp{ding@@gnus.org} mailing list, where people
24679 propose changes and new features, post patches and new back ends.  This
24680 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24681 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24682 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
24683 unstable and should not be used by casual users.  Gnus alpha releases
24684 have names like ``Red Gnus'' and ``Quassia Gnus''.
24685
24686 After futzing around for 50-100 alpha releases, Gnus is declared
24687 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
24688 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
24689 supposed to be able to use these, and these are mostly discussed on the
24690 @samp{gnu.emacs.gnus} newsgroup.
24691
24692 @cindex Incoming*
24693 @vindex mail-source-delete-incoming
24694 Some variable defaults differ between alpha Gnusae and released Gnusae.
24695 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24696 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
24697 lossage of mail if an alpha release hiccups while handling the mail.
24698
24699 The division of discussion between the ding mailing list and the Gnus
24700 newsgroup is not purely based on publicity concerns.  It's true that
24701 having people write about the horrible things that an alpha Gnus release
24702 can do (sometimes) in a public forum may scare people off, but more
24703 importantly, talking about new experimental features that have been
24704 introduced may confuse casual users.  New features are frequently
24705 introduced, fiddled with, and judged to be found wanting, and then
24706 either discarded or totally rewritten.  People reading the mailing list
24707 usually keep up with these rapid changes, while people on the newsgroup
24708 can't be assumed to do so.
24709
24710
24711
24712 @node Contributors
24713 @subsection Contributors
24714 @cindex contributors
24715
24716 The new Gnus version couldn't have been done without the help of all the
24717 people on the (ding) mailing list.  Every day for over a year I have
24718 gotten billions of nice bug reports from them, filling me with joy,
24719 every single one of them.  Smooches.  The people on the list have been
24720 tried beyond endurance, what with my ``oh, that's a neat idea <type
24721 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24722 work at all <type type>, yup, I'll ship that one off right away <ship
24723 off> no, wait, that absolutely does not work'' policy for releases.
24724 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24725 ``worser''? ``much worser''?  ``worsest''?)
24726
24727 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24728 wrong show.
24729
24730 @itemize @bullet
24731
24732 @item
24733 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24734
24735 @item
24736 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24737 nnwarchive and many, many other things connected with @acronym{MIME} and
24738 other types of en/decoding, as well as general bug fixing, new
24739 functionality and stuff.
24740
24741 @item
24742 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24743 well as numerous other things).
24744
24745 @item
24746 Luis Fernandes---design and graphics.
24747
24748 @item
24749 Joe Reiss---creator of the smiley faces.
24750
24751 @item
24752 Justin Sheehy---the @acronym{FAQ} maintainer.
24753
24754 @item
24755 Erik Naggum---help, ideas, support, code and stuff.
24756
24757 @item
24758 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24759 @dfn{picons} (@pxref{Picons}).
24760
24761 @item
24762 Kim-Minh Kaplan---further work on the picon code.
24763
24764 @item
24765 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
24766
24767 @item
24768 Sudish Joseph---innumerable bug fixes.
24769
24770 @item
24771 Ilja Weis---@file{gnus-topic.el}.
24772
24773 @item
24774 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24775
24776 @item
24777 Vladimir Alexiev---the refcard and reference booklets.
24778
24779 @item
24780 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24781 distribution by Felix Lee and JWZ.
24782
24783 @item
24784 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24785
24786 @item
24787 Peter Mutsaers---orphan article scoring code.
24788
24789 @item
24790 Ken Raeburn---POP mail support.
24791
24792 @item
24793 Hallvard B Furuseth---various bits and pieces, especially dealing with
24794 .newsrc files.
24795
24796 @item
24797 Brian Edmonds---@file{gnus-bbdb.el}.
24798
24799 @item
24800 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24801
24802 @item
24803 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24804
24805 @item
24806 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
24807 well as autoconf support.
24808
24809 @end itemize
24810
24811 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24812 Borges, and Jost Krieger proof-reading parts of the manual.
24813
24814 The following people have contributed many patches and suggestions:
24815
24816 Christopher Davis,
24817 Andrew Eskilsson,
24818 Kai Grossjohann,
24819 Kevin Greiner,
24820 Jesper Harder,
24821 Paul Jarc,
24822 Simon Josefsson,
24823 David K@aa{}gedal,
24824 Richard Pieri,
24825 Fabrice Popineau,
24826 Daniel Quinlan,
24827 Michael Shields,
24828 Reiner Steib,
24829 Jason L. Tibbitts, III,
24830 Jack Vinson,
24831 Katsumi Yamaoka, @c Yamaoka
24832 and
24833 Teodor Zlatanov.
24834
24835 Also thanks to the following for patches and stuff:
24836
24837 Jari Aalto,
24838 Adrian Aichner,
24839 Vladimir Alexiev,
24840 Russ Allbery,
24841 Peter Arius,
24842 Matt Armstrong,
24843 Marc Auslander,
24844 Miles Bader,
24845 Alexei V. Barantsev,
24846 Frank Bennett,
24847 Robert Bihlmeyer,
24848 Chris Bone,
24849 Mark Borges,
24850 Mark Boyns,
24851 Lance A. Brown,
24852 Rob Browning,
24853 Kees de Bruin,
24854 Martin Buchholz,
24855 Joe Buehler,
24856 Kevin Buhr,
24857 Alastair Burt,
24858 Joao Cachopo,
24859 Zlatko Calusic,
24860 Massimo Campostrini,
24861 Castor,
24862 David Charlap,
24863 Dan Christensen,
24864 Kevin Christian,
24865 Jae-you Chung, @c ?
24866 James H. Cloos, Jr.,
24867 Laura Conrad,
24868 Michael R. Cook,
24869 Glenn Coombs,
24870 Andrew J. Cosgriff,
24871 Neil Crellin,
24872 Frank D. Cringle,
24873 Geoffrey T. Dairiki,
24874 Andre Deparade,
24875 Ulrik Dickow,
24876 Dave Disser,
24877 Rui-Tao Dong, @c ?
24878 Joev Dubach,
24879 Michael Welsh Duggan,
24880 Dave Edmondson,
24881 Paul Eggert,
24882 Mark W. Eichin,
24883 Karl Eichwalder,
24884 Enami Tsugutomo, @c Enami
24885 Michael Ernst,
24886 Luc Van Eycken,
24887 Sam Falkner,
24888 Nelson Jose dos Santos Ferreira,
24889 Sigbjorn Finne,
24890 Sven Fischer,
24891 Paul Fisher,
24892 Decklin Foster,
24893 Gary D. Foster,
24894 Paul Franklin,
24895 Guy Geens,
24896 Arne Georg Gleditsch,
24897 David S. Goldberg,
24898 Michelangelo Grigni,
24899 Dale Hagglund,
24900 D. Hall,
24901 Magnus Hammerin,
24902 Kenichi Handa, @c Handa
24903 Raja R. Harinath,
24904 Yoshiki Hayashi, @c Hayashi
24905 P. E. Jareth Hein,
24906 Hisashige Kenji, @c Hisashige
24907 Scott Hofmann,
24908 Marc Horowitz,
24909 Gunnar Horrigmo,
24910 Richard Hoskins,
24911 Brad Howes,
24912 Miguel de Icaza,
24913 Fran@,{c}ois Felix Ingrand,
24914 Tatsuya Ichikawa, @c Ichikawa
24915 Ishikawa Ichiro, @c Ishikawa
24916 Lee Iverson,
24917 Iwamuro Motonori, @c Iwamuro
24918 Rajappa Iyer,
24919 Andreas Jaeger,
24920 Adam P. Jenkins,
24921 Randell Jesup,
24922 Fred Johansen,
24923 Gareth Jones,
24924 Greg Klanderman,
24925 Karl Kleinpaste,
24926 Michael Klingbeil,
24927 Peter Skov Knudsen,
24928 Shuhei Kobayashi, @c Kobayashi
24929 Petr Konecny,
24930 Koseki Yoshinori, @c Koseki
24931 Thor Kristoffersen,
24932 Jens Lautenbacher,
24933 Martin Larose,
24934 Seokchan Lee, @c Lee
24935 Joerg Lenneis,
24936 Carsten Leonhardt,
24937 James LewisMoss,
24938 Christian Limpach,
24939 Markus Linnala,
24940 Dave Love,
24941 Mike McEwan,
24942 Tonny Madsen,
24943 Shlomo Mahlab,
24944 Nat Makarevitch,
24945 Istvan Marko,
24946 David Martin,
24947 Jason R. Mastaler,
24948 Gordon Matzigkeit,
24949 Timo Metzemakers,
24950 Richard Mlynarik,
24951 Lantz Moore,
24952 Morioka Tomohiko, @c Morioka
24953 Erik Toubro Nielsen,
24954 Hrvoje Niksic,
24955 Andy Norman,
24956 Fred Oberhauser,
24957 C. R. Oldham,
24958 Alexandre Oliva,
24959 Ken Olstad,
24960 Masaharu Onishi, @c Onishi
24961 Hideki Ono, @c Ono
24962 Ettore Perazzoli,
24963 William Perry,
24964 Stephen Peters,
24965 Jens-Ulrik Holger Petersen,
24966 Ulrich Pfeifer,
24967 Matt Pharr,
24968 Andy Piper,
24969 John McClary Prevost,
24970 Bill Pringlemeir,
24971 Mike Pullen,
24972 Jim Radford,
24973 Colin Rafferty,
24974 Lasse Rasinen,
24975 Lars Balker Rasmussen,
24976 Joe Reiss,
24977 Renaud Rioboo,
24978 Roland B. Roberts,
24979 Bart Robinson,
24980 Christian von Roques,
24981 Markus Rost,
24982 Jason Rumney,
24983 Wolfgang Rupprecht,
24984 Jay Sachs,
24985 Dewey M. Sasser,
24986 Conrad Sauerwald,
24987 Loren Schall,
24988 Dan Schmidt,
24989 Ralph Schleicher,
24990 Philippe Schnoebelen,
24991 Andreas Schwab,
24992 Randal L. Schwartz,
24993 Danny Siu,
24994 Matt Simmons,
24995 Paul D. Smith,
24996 Jeff Sparkes,
24997 Toby Speight,
24998 Michael Sperber,
24999 Darren Stalder,
25000 Richard Stallman,
25001 Greg Stark,
25002 Sam Steingold,
25003 Paul Stevenson,
25004 Jonas Steverud,
25005 Paul Stodghill,
25006 Kiyokazu Suto, @c Suto
25007 Kurt Swanson,
25008 Samuel Tardieu,
25009 Teddy,
25010 Chuck Thompson,
25011 Tozawa Akihiko, @c Tozawa
25012 Philippe Troin,
25013 James Troup,
25014 Trung Tran-Duc,
25015 Jack Twilley,
25016 Aaron M. Ucko,
25017 Aki Vehtari,
25018 Didier Verna,
25019 Vladimir Volovich,
25020 Jan Vroonhof,
25021 Stefan Waldherr,
25022 Pete Ware,
25023 Barry A. Warsaw,
25024 Christoph Wedler,
25025 Joe Wells,
25026 Lee Willis,
25027 and
25028 Lloyd Zusman.
25029
25030
25031 For a full overview of what each person has done, the ChangeLogs
25032 included in the Gnus alpha distributions should give ample reading
25033 (550kB and counting).
25034
25035 Apologies to everybody that I've forgotten, of which there are many, I'm
25036 sure.
25037
25038 Gee, that's quite a list of people.  I guess that must mean that there
25039 actually are people who are using Gnus.  Who'd'a thunk it!
25040
25041
25042 @node New Features
25043 @subsection New Features
25044 @cindex new features
25045
25046 @menu
25047 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
25048 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
25049 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
25050 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
25051 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
25052 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
25053 * No Gnus::                     Lars, FIXME!
25054 @end menu
25055
25056 These lists are, of course, just @emph{short} overviews of the
25057 @emph{most} important new features.  No, really.  There are tons more.
25058 Yes, we have feeping creaturism in full effect.
25059
25060 @node ding Gnus
25061 @subsubsection (ding) Gnus
25062
25063 New features in Gnus 5.0/5.1:
25064
25065 @itemize @bullet
25066
25067 @item
25068 The look of all buffers can be changed by setting format-like variables
25069 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
25070
25071 @item
25072 Local spool and several @acronym{NNTP} servers can be used at once
25073 (@pxref{Select Methods}).
25074
25075 @item
25076 You can combine groups into virtual groups (@pxref{Virtual Groups}).
25077
25078 @item
25079 You can read a number of different mail formats (@pxref{Getting Mail}).
25080 All the mail back ends implement a convenient mail expiry scheme
25081 (@pxref{Expiring Mail}).
25082
25083 @item
25084 Gnus can use various strategies for gathering threads that have lost
25085 their roots (thereby gathering loose sub-threads into one thread) or it
25086 can go back and retrieve enough headers to build a complete thread
25087 (@pxref{Customizing Threading}).
25088
25089 @item
25090 Killed groups can be displayed in the group buffer, and you can read
25091 them as well (@pxref{Listing Groups}).
25092
25093 @item
25094 Gnus can do partial group updates---you do not have to retrieve the
25095 entire active file just to check for new articles in a few groups
25096 (@pxref{The Active File}).
25097
25098 @item
25099 Gnus implements a sliding scale of subscribedness to groups
25100 (@pxref{Group Levels}).
25101
25102 @item
25103 You can score articles according to any number of criteria
25104 (@pxref{Scoring}).  You can even get Gnus to find out how to score
25105 articles for you (@pxref{Adaptive Scoring}).
25106
25107 @item
25108 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
25109 manner, so it should be difficult to lose much data on what you have
25110 read if your machine should go down (@pxref{Auto Save}).
25111
25112 @item
25113 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
25114 cluttering up the @file{.emacs} file.
25115
25116 @item
25117 You can set the process mark on both groups and articles and perform
25118 operations on all the marked items (@pxref{Process/Prefix}).
25119
25120 @item
25121 You can grep through a subset of groups and create a group from the
25122 results (@pxref{Kibozed Groups}).
25123
25124 @item
25125 You can list subsets of groups according to, well, anything
25126 (@pxref{Listing Groups}).
25127
25128 @item
25129 You can browse foreign servers and subscribe to groups from those
25130 servers (@pxref{Browse Foreign Server}).
25131
25132 @item
25133 Gnus can fetch articles, asynchronously, on a second connection to the
25134 server (@pxref{Asynchronous Fetching}).
25135
25136 @item
25137 You can cache articles locally (@pxref{Article Caching}).
25138
25139 @item
25140 The uudecode functions have been expanded and generalized
25141 (@pxref{Decoding Articles}).
25142
25143 @item
25144 You can still post uuencoded articles, which was a little-known feature
25145 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
25146
25147 @item
25148 Fetching parents (and other articles) now actually works without
25149 glitches (@pxref{Finding the Parent}).
25150
25151 @item
25152 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
25153
25154 @item
25155 Digests (and other files) can be used as the basis for groups
25156 (@pxref{Document Groups}).
25157
25158 @item
25159 Articles can be highlighted and customized (@pxref{Customizing
25160 Articles}).
25161
25162 @item
25163 URLs and other external references can be buttonized (@pxref{Article
25164 Buttons}).
25165
25166 @item
25167 You can do lots of strange stuff with the Gnus window & frame
25168 configuration (@pxref{Window Layout}).
25169
25170 @item
25171 You can click on buttons instead of using the keyboard
25172 (@pxref{Buttons}).
25173
25174 @end itemize
25175
25176
25177 @node September Gnus
25178 @subsubsection September Gnus
25179
25180 @iftex
25181 @iflatex
25182 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
25183 @end iflatex
25184 @end iftex
25185
25186 New features in Gnus 5.2/5.3:
25187
25188 @itemize @bullet
25189
25190 @item
25191 A new message composition mode is used.  All old customization variables
25192 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
25193 now obsolete.
25194
25195 @item
25196 Gnus is now able to generate @dfn{sparse} threads---threads where
25197 missing articles are represented by empty nodes (@pxref{Customizing
25198 Threading}).
25199
25200 @lisp
25201 (setq gnus-build-sparse-threads 'some)
25202 @end lisp
25203
25204 @item
25205 Outgoing articles are stored on a special archive server
25206 (@pxref{Archived Messages}).
25207
25208 @item
25209 Partial thread regeneration now happens when articles are
25210 referred.
25211
25212 @item
25213 Gnus can make use of GroupLens predictions.
25214
25215 @item
25216 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
25217
25218 @item
25219 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
25220
25221 @lisp
25222 (setq gnus-use-trees t)
25223 @end lisp
25224
25225 @item
25226 An @code{nn}-like pick-and-read minor mode is available for the summary
25227 buffers (@pxref{Pick and Read}).
25228
25229 @lisp
25230 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
25231 @end lisp
25232
25233 @item
25234 In binary groups you can use a special binary minor mode (@pxref{Binary
25235 Groups}).
25236
25237 @item
25238 Groups can be grouped in a folding topic hierarchy (@pxref{Group
25239 Topics}).
25240
25241 @lisp
25242 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
25243 @end lisp
25244
25245 @item
25246 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
25247
25248 @item
25249 Groups can now have a score, and bubbling based on entry frequency
25250 is possible (@pxref{Group Score}).
25251
25252 @lisp
25253 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
25254 @end lisp
25255
25256 @item
25257 Groups can be process-marked, and commands can be performed on
25258 groups of groups (@pxref{Marking Groups}).
25259
25260 @item
25261 Caching is possible in virtual groups.
25262
25263 @item
25264 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
25265 news batches, ClariNet briefs collections, and just about everything
25266 else (@pxref{Document Groups}).
25267
25268 @item
25269 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
25270 (@pxref{SOUP}).
25271
25272 @item
25273 The Gnus cache is much faster.
25274
25275 @item
25276 Groups can be sorted according to many criteria (@pxref{Sorting
25277 Groups}).
25278
25279 @item
25280 New group parameters have been introduced to set list-addresses and
25281 expiry times (@pxref{Group Parameters}).
25282
25283 @item
25284 All formatting specs allow specifying faces to be used
25285 (@pxref{Formatting Fonts}).
25286
25287 @item
25288 There are several more commands for setting/removing/acting on process
25289 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
25290
25291 @item
25292 The summary buffer can be limited to show parts of the available
25293 articles based on a wide range of criteria.  These commands have been
25294 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
25295
25296 @item
25297 Articles can be made persistent with the @kbd{*} command
25298 (@pxref{Persistent Articles}).
25299
25300 @item
25301 All functions for hiding article elements are now toggles.
25302
25303 @item
25304 Article headers can be buttonized (@pxref{Article Washing}).
25305
25306 @item
25307 All mail back ends support fetching articles by @code{Message-ID}.
25308
25309 @item
25310 Duplicate mail can now be treated properly (@pxref{Duplicates}).
25311
25312 @item
25313 All summary mode commands are available directly from the article
25314 buffer (@pxref{Article Keymap}).
25315
25316 @item
25317 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
25318 Layout}).
25319
25320 @item
25321 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
25322 @iftex
25323 @iflatex
25324 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
25325 @end iflatex
25326 @end iftex
25327
25328 @item
25329 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
25330
25331 @lisp
25332 (setq gnus-use-nocem t)
25333 @end lisp
25334
25335 @item
25336 Groups can be made permanently visible (@pxref{Listing Groups}).
25337
25338 @lisp
25339 (setq gnus-permanently-visible-groups "^nnml:")
25340 @end lisp
25341
25342 @item
25343 Many new hooks have been introduced to make customizing easier.
25344
25345 @item
25346 Gnus respects the @code{Mail-Copies-To} header.
25347
25348 @item
25349 Threads can be gathered by looking at the @code{References} header
25350 (@pxref{Customizing Threading}).
25351
25352 @lisp
25353 (setq gnus-summary-thread-gathering-function
25354       'gnus-gather-threads-by-references)
25355 @end lisp
25356
25357 @item
25358 Read articles can be stored in a special backlog buffer to avoid
25359 refetching (@pxref{Article Backlog}).
25360
25361 @lisp
25362 (setq gnus-keep-backlog 50)
25363 @end lisp
25364
25365 @item
25366 A clean copy of the current article is always stored in a separate
25367 buffer to allow easier treatment.
25368
25369 @item
25370 Gnus can suggest where to save articles (@pxref{Saving Articles}).
25371
25372 @item
25373 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
25374 Articles}).
25375
25376 @lisp
25377 (setq gnus-prompt-before-saving t)
25378 @end lisp
25379
25380 @item
25381 @code{gnus-uu} can view decoded files asynchronously while fetching
25382 articles (@pxref{Other Decode Variables}).
25383
25384 @lisp
25385 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
25386 @end lisp
25387
25388 @item
25389 Filling in the article buffer now works properly on cited text
25390 (@pxref{Article Washing}).
25391
25392 @item
25393 Hiding cited text adds buttons to toggle hiding, and how much
25394 cited text to hide is now customizable (@pxref{Article Hiding}).
25395
25396 @lisp
25397 (setq gnus-cited-lines-visible 2)
25398 @end lisp
25399
25400 @item
25401 Boring headers can be hidden (@pxref{Article Hiding}).
25402
25403 @item
25404 Default scoring values can now be set from the menu bar.
25405
25406 @item
25407 Further syntax checking of outgoing articles have been added.
25408
25409 @end itemize
25410
25411
25412 @node Red Gnus
25413 @subsubsection Red Gnus
25414
25415 New features in Gnus 5.4/5.5:
25416
25417 @iftex
25418 @iflatex
25419 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
25420 @end iflatex
25421 @end iftex
25422
25423 @itemize @bullet
25424
25425 @item
25426 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
25427
25428 @item
25429 Article prefetching functionality has been moved up into
25430 Gnus (@pxref{Asynchronous Fetching}).
25431
25432 @item
25433 Scoring can now be performed with logical operators like @code{and},
25434 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
25435 Scoring}).
25436
25437 @item
25438 Article washing status can be displayed in the
25439 article mode line (@pxref{Misc Article}).
25440
25441 @item
25442 @file{gnus.el} has been split into many smaller files.
25443
25444 @item
25445 Suppression of duplicate articles based on Message-ID can be done
25446 (@pxref{Duplicate Suppression}).
25447
25448 @lisp
25449 (setq gnus-suppress-duplicates t)
25450 @end lisp
25451
25452 @item
25453 New variables for specifying what score and adapt files are to be
25454 considered home score and adapt files (@pxref{Home Score File}) have
25455 been added.
25456
25457 @item
25458 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
25459 Server Internals}).
25460
25461 @item
25462 Groups can inherit group parameters from parent topics (@pxref{Topic
25463 Parameters}).
25464
25465 @item
25466 Article editing has been revamped and is now actually usable.
25467
25468 @item
25469 Signatures can be recognized in more intelligent fashions
25470 (@pxref{Article Signature}).
25471
25472 @item
25473 Summary pick mode has been made to look more @code{nn}-like.  Line
25474 numbers are displayed and the @kbd{.} command can be used to pick
25475 articles (@code{Pick and Read}).
25476
25477 @item
25478 Commands for moving the @file{.newsrc.eld} from one server to
25479 another have been added (@pxref{Changing Servers}).
25480
25481 @item
25482 There's a way now to specify that ``uninteresting'' fields be suppressed
25483 when generating lines in buffers (@pxref{Advanced Formatting}).
25484
25485 @item
25486 Several commands in the group buffer can be undone with @kbd{C-M-_}
25487 (@pxref{Undo}).
25488
25489 @item
25490 Scoring can be done on words using the new score type @code{w}
25491 (@pxref{Score File Format}).
25492
25493 @item
25494 Adaptive scoring can be done on a Subject word-by-word basis
25495 (@pxref{Adaptive Scoring}).
25496
25497 @lisp
25498 (setq gnus-use-adaptive-scoring '(word))
25499 @end lisp
25500
25501 @item
25502 Scores can be decayed (@pxref{Score Decays}).
25503
25504 @lisp
25505 (setq gnus-decay-scores t)
25506 @end lisp
25507
25508 @item
25509 Scoring can be performed using a regexp on the Date header.  The Date is
25510 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
25511
25512 @item
25513 A new command has been added to remove all data on articles from
25514 the native server (@pxref{Changing Servers}).
25515
25516 @item
25517 A new command for reading collections of documents
25518 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
25519 (@pxref{Really Various Summary Commands}).
25520
25521 @item
25522 Process mark sets can be pushed and popped (@pxref{Setting Process
25523 Marks}).
25524
25525 @item
25526 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
25527 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
25528
25529 @item
25530 A new back end for reading searches from Web search engines
25531 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
25532 (@pxref{Web Searches}).
25533
25534 @item
25535 Groups inside topics can now be sorted using the standard sorting
25536 functions, and each topic can be sorted independently (@pxref{Topic
25537 Sorting}).
25538
25539 @item
25540 Subsets of the groups can be sorted independently (@code{Sorting
25541 Groups}).
25542
25543 @item
25544 Cached articles can be pulled into the groups (@pxref{Summary Generation
25545 Commands}).
25546 @iftex
25547 @iflatex
25548 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
25549 @end iflatex
25550 @end iftex
25551
25552 @item
25553 Score files are now applied in a more reliable order (@pxref{Score
25554 Variables}).
25555
25556 @item
25557 Reports on where mail messages end up can be generated (@pxref{Splitting
25558 Mail}).
25559
25560 @item
25561 More hooks and functions have been added to remove junk from incoming
25562 mail before saving the mail (@pxref{Washing Mail}).
25563
25564 @item
25565 Emphasized text can be properly fontisized:
25566
25567 @end itemize
25568
25569
25570 @node Quassia Gnus
25571 @subsubsection Quassia Gnus
25572
25573 New features in Gnus 5.6:
25574
25575 @itemize @bullet
25576
25577 @item
25578 New functionality for using Gnus as an offline newsreader has been
25579 added.  A plethora of new commands and modes have been added.
25580 @xref{Gnus Unplugged}, for the full story.
25581
25582 @item
25583 The @code{nndraft} back end has returned, but works differently than
25584 before.  All Message buffers are now also articles in the @code{nndraft}
25585 group, which is created automatically.
25586
25587 @item
25588 @code{gnus-alter-header-function} can now be used to alter header
25589 values.
25590
25591 @item
25592 @code{gnus-summary-goto-article} now accept Message-ID's.
25593
25594 @item
25595 A new Message command for deleting text in the body of a message
25596 outside the region: @kbd{C-c C-v}.
25597
25598 @item
25599 You can now post to component group in @code{nnvirtual} groups with
25600 @kbd{C-u C-c C-c}.
25601
25602 @item
25603  @code{nntp-rlogin-program}---new variable to ease customization.
25604
25605 @item
25606 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
25607 re-highlighting of the article buffer.
25608
25609 @item
25610 New element in @code{gnus-boring-article-headers}---@code{long-to}.
25611
25612 @item
25613 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
25614 details.
25615
25616 @item
25617 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
25618 @kbd{a} to add the score rule to the @file{all.SCORE} file.
25619
25620 @item
25621 @code{gnus-simplify-subject-functions} variable to allow greater
25622 control over simplification.
25623
25624 @item
25625 @kbd{A T}---new command for fetching the current thread.
25626
25627 @item
25628 @kbd{/ T}---new command for including the current thread in the
25629 limit.
25630
25631 @item
25632 @kbd{M-RET} is a new Message command for breaking cited text.
25633
25634 @item
25635 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
25636
25637 @item
25638 The @code{custom-face-lookup} function has been removed.
25639 If you used this function in your initialization files, you must
25640 rewrite them to use @code{face-spec-set} instead.
25641
25642 @item
25643 Canceling now uses the current select method.  Symbolic prefix
25644 @kbd{a} forces normal posting method.
25645
25646 @item
25647 New command to translate M******** sm*rtq**t*s into proper
25648 text---@kbd{W d}.
25649
25650 @item
25651 For easier debugging of @code{nntp}, you can set
25652 @code{nntp-record-commands} to a non-@code{nil} value.
25653
25654 @item
25655 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
25656 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
25657
25658 @item
25659 A command for editing group parameters from the summary buffer
25660 has been added.
25661
25662 @item
25663 A history of where mails have been split is available.
25664
25665 @item
25666 A new article date command has been added---@code{article-date-iso8601}.
25667
25668 @item
25669 Subjects can be simplified when threading by setting
25670 @code{gnus-score-thread-simplify}.
25671
25672 @item
25673 A new function for citing in Message has been
25674 added---@code{message-cite-original-without-signature}.
25675
25676 @item
25677 @code{article-strip-all-blank-lines}---new article command.
25678
25679 @item
25680 A new Message command to kill to the end of the article has
25681 been added.
25682
25683 @item
25684 A minimum adaptive score can be specified by using the
25685 @code{gnus-adaptive-word-minimum} variable.
25686
25687 @item
25688 The ``lapsed date'' article header can be kept continually
25689 updated by the @code{gnus-start-date-timer} command.
25690
25691 @item
25692 Web listserv archives can be read with the @code{nnlistserv} back end.
25693
25694 @item
25695 Old dejanews archives can now be read by @code{nnweb}.
25696
25697 @end itemize
25698
25699 @node Pterodactyl Gnus
25700 @subsubsection Pterodactyl Gnus
25701
25702 New features in Gnus 5.8:
25703
25704 @itemize @bullet
25705
25706 @item
25707 The mail-fetching functions have changed.  See the manual for the
25708 many details.  In particular, all procmail fetching variables are gone.
25709
25710 If you used procmail like in
25711
25712 @lisp
25713 (setq nnmail-use-procmail t)
25714 (setq nnmail-spool-file 'procmail)
25715 (setq nnmail-procmail-directory "~/mail/incoming/")
25716 (setq nnmail-procmail-suffix "\\.in")
25717 @end lisp
25718
25719 this now has changed to
25720
25721 @lisp
25722 (setq mail-sources
25723       '((directory :path "~/mail/incoming/"
25724                    :suffix ".in")))
25725 @end lisp
25726
25727 @xref{Mail Source Specifiers}.
25728
25729 @item
25730 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25731 Gnus, and adds a slew of new commands.  See the manual for details.
25732
25733 @item
25734 Gnus has also been multilingualized.  This also affects too
25735 many parts of Gnus to summarize here, and adds many new variables.
25736
25737 @item
25738 @code{gnus-auto-select-first} can now be a function to be
25739 called to position point.
25740
25741 @item
25742 The user can now decide which extra headers should be included in
25743 summary buffers and @acronym{NOV} files.
25744
25745 @item
25746 @code{gnus-article-display-hook} has been removed.  Instead, a number
25747 of variables starting with @code{gnus-treat-} have been added.
25748
25749 @item
25750 The Gnus posting styles have been redone again and now works in a
25751 subtly different manner.
25752
25753 @item
25754 New web-based back ends have been added: @code{nnslashdot},
25755 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25756 again, to keep up with ever-changing layouts.
25757
25758 @item
25759 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25760
25761 @end itemize
25762
25763 @node Oort Gnus
25764 @subsubsection Oort Gnus
25765 @cindex Oort Gnus
25766
25767 New features in Gnus 5.10:
25768
25769 @itemize @bullet
25770
25771 @item
25772 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
25773 (@code{gnus-article-reply-with-original}) only yank the text in the
25774 region if the region is active.
25775
25776 @item
25777 @code{gnus-group-read-ephemeral-group} can be called interactively,
25778 using @kbd{G M}.
25779
25780 @item
25781 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
25782 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
25783
25784 @item
25785 The revised Gnus @acronym{FAQ} is included in the manual,
25786 @xref{Frequently Asked Questions}.
25787
25788 @item
25789 Upgrading from previous (stable) version if you have used Oort.
25790
25791 If you have tried Oort (the unstable Gnus branch leading to this
25792 release) but went back to a stable version, be careful when upgrading to
25793 this version.  In particular, you will probably want to remove all
25794 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25795 read from your @file{.newsrc.eld} instead of from the
25796 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25797 later entry for more information about marks.  Note that downgrading
25798 isn't save in general.
25799
25800 @item
25801 Article Buttons
25802
25803 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25804 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25805 variables @code{gnus-button-@var{*}-level} can be used to control the
25806 appearance of all article buttons.  @xref{Article Button Levels}.
25807
25808 @item
25809 Dired integration
25810
25811 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
25812 bindings in dired buffers to send a file as an attachment, open a file
25813 using the appropriate mailcap entry, and print a file using the mailcap
25814 entry.
25815
25816 @item
25817 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25818
25819 @item
25820 Single-part yenc encoded attachments can be decoded.
25821
25822 @item
25823 Picons
25824
25825 The picons code has been reimplemented to work in GNU Emacs---some of
25826 the previous options have been removed or renamed.
25827
25828 Picons are small ``personal icons'' representing users, domain and
25829 newsgroups, which can be displayed in the Article buffer.
25830 @xref{Picons}.
25831
25832 @item
25833 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25834 boundary line is drawn at the end of the headers.
25835
25836 @item
25837 Retrieval of charters and control messages
25838
25839 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25840 control messages (@kbd{H C}).
25841
25842 @item
25843 Delayed articles
25844
25845 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25846 buffer.  The messages are delivered at specified time.  This is useful
25847 for sending yourself reminders.  @xref{Delayed Articles}.
25848
25849 @item
25850 If @code{auto-compression-mode} is enabled, attachments are automatically
25851 decompressed when activated.
25852
25853 @item
25854 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25855 the nnml back end allows compressed message files.
25856
25857 @item
25858 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25859
25860 @item
25861 The Summary Buffer uses an arrow in the fringe to indicate the current
25862 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25863
25864 @item
25865 Warn about email replies to news
25866
25867 Do you often find yourself replying to news by email by mistake?  Then
25868 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25869 you.
25870
25871 @item
25872 If the new option @code{gnus-summary-display-while-building} is
25873 non-@code{nil}, the summary buffer is shown and updated as it's being
25874 built.
25875
25876 @item
25877 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25878 opposed to old but unread messages).
25879
25880 @item
25881 The new option @code{gnus-gcc-mark-as-read} automatically marks
25882 Gcc articles as read.
25883
25884 @item
25885 The nndoc back end now supports mailman digests and exim bounces.
25886
25887 @item
25888 Gnus supports RFC 2369 mailing list headers, and adds a number of
25889 related commands in mailing list groups.  @xref{Mailing List}.
25890
25891 @item
25892 The Date header can be displayed in a format that can be read aloud
25893 in English.  @xref{Article Date}.
25894
25895 @item
25896 The envelope sender address can be customized when using Sendmail.
25897 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25898
25899 @item
25900 diffs are automatically highlighted in groups matching
25901 @code{mm-uu-diff-groups-regexp}
25902
25903 @item
25904 @acronym{TLS} wrapper shipped with Gnus
25905
25906 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25907 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25908 @acronym{TLS}/@acronym{SSL} support via (external third party)
25909 @file{ssl.el} and OpenSSL still works.
25910
25911 @item
25912 New @file{make.bat} for compiling and installing Gnus under MS Windows
25913
25914 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25915 first argument to the batch-program should be the directory where
25916 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25917 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25918 the second parameter.
25919
25920 @file{make.bat} has been rewritten from scratch, it now features
25921 automatic recognition of XEmacs and GNU Emacs, generates
25922 @file{gnus-load.el}, checks if errors occur while compilation and
25923 generation of info files and reports them at the end of the build
25924 process.  It now uses @code{makeinfo} if it is available and falls
25925 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25926 install all files which are necessary to run Gnus and be generally a
25927 complete replacement for the @code{configure; make; make install}
25928 cycle used under Unix systems.
25929
25930 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25931 been removed.
25932
25933 @item
25934 Support for non-@acronym{ASCII} domain names
25935
25936 Message supports non-@acronym{ASCII} domain names in From:, To: and
25937 Cc: and will query you whether to perform encoding when you try to
25938 send a message.  The variable @code{message-use-idna} controls this.
25939 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25940 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25941 controls this.
25942
25943 @item
25944 Better handling of Microsoft citation styles
25945
25946 Gnus now tries to recognize the mangled header block that some Microsoft
25947 mailers use to indicate that the rest of the message is a citation, even
25948 though it is not quoted in any way.  The variable
25949 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25950 citations.
25951
25952 @item
25953 @code{gnus-article-skip-boring}
25954
25955 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25956 not scroll down to show you a page that contains only boring text,
25957 which by default means cited text and signature.  You can customize
25958 what is skippable using @code{gnus-article-boring-faces}.
25959
25960 This feature is especially useful if you read many articles that
25961 consist of a little new content at the top with a long, untrimmed
25962 message cited below.
25963
25964 @item
25965 The format spec @code{%C} for positioning point has changed to @code{%*}.
25966
25967 @item
25968 The new variable @code{gnus-parameters} can be used to set group parameters.
25969
25970 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25971 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25972 enjoy the powers of customize, and simplified backups since you set the
25973 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25974 variable maps regular expressions matching group names to group
25975 parameters, a'la:
25976 @lisp
25977 (setq gnus-parameters
25978       '(("mail\\..*"
25979          (gnus-show-threads nil)
25980          (gnus-use-scoring nil))
25981         ("^nnimap:\\(foo.bar\\)$"
25982          (to-group . "\\1"))))
25983 @end lisp
25984
25985 @item
25986 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25987
25988 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25989 disable it.
25990
25991 @item
25992 Gnus no longer generate the Sender: header automatically.
25993
25994 Earlier it was generated iff the user configurable email address was
25995 different from the Gnus guessed default user address.  As the guessing
25996 algorithm is rarely correct these days, and (more controversially) the
25997 only use of the Sender: header was to check if you are entitled to
25998 cancel/supersede news (which is now solved by Cancel Locks instead,
25999 see another entry), generation of the header has been disabled by
26000 default.  See the variables @code{message-required-headers},
26001 @code{message-required-news-headers}, and
26002 @code{message-required-mail-headers}.
26003
26004 @item
26005 Features from third party @file{message-utils.el} added to @file{message.el}.
26006
26007 Message now asks if you wish to remove @samp{(was: <old subject>)} from
26008 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
26009 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
26010 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
26011 appropriate headers and a note in the body for cross-postings and
26012 followups (see the variables @code{message-cross-post-@var{*}}).
26013
26014 @item
26015 References and X-Draft-Headers are no longer generated when you start
26016 composing messages and @code{message-generate-headers-first} is
26017 @code{nil}.
26018
26019 @item
26020 Improved anti-spam features.
26021
26022 Gnus is now able to take out spam from your mail and news streams
26023 using a wide variety of programs and filter rules.  Among the supported
26024 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
26025 for easy use of external packages such as SpamAssassin and Hashcash
26026 are also new.  @xref{Thwarting Email Spam}.
26027
26028 @item
26029 Easy inclusion of X-Faces headers.
26030
26031 @item
26032 Face headers handling.
26033
26034 @item
26035 In the summary buffer, the new command @kbd{/ N} inserts new messages
26036 and @kbd{/ o} inserts old messages.
26037
26038 @item
26039 Gnus decodes morse encoded messages if you press @kbd{W m}.
26040
26041 @item
26042 Unread count correct in nnimap groups.
26043
26044 The estimated number of unread articles in the group buffer should now
26045 be correct for nnimap groups.  This is achieved by calling
26046 @code{nnimap-fixup-unread-after-getting-new-news} from the
26047 @code{gnus-setup-news-hook} (called on startup) and
26048 @code{gnus-after-getting-new-news-hook}. (called after getting new
26049 mail).  If you have modified those variables from the default, you may
26050 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
26051 you were happy with the estimate and want to save some (minimal) time
26052 when getting new mail, remove the function.
26053
26054 @item
26055 Group Carbon Copy (GCC) quoting
26056
26057 To support groups that contains SPC and other weird characters, groups
26058 are quoted before they are placed in the Gcc: header.  This means
26059 variables such as @code{gnus-message-archive-group} should no longer
26060 contain quote characters to make groups containing SPC work.  Also, if
26061 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
26062 into two groups) you must change it to return the list
26063 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
26064 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
26065 was incorrect earlier, it just didn't generate any problems since it
26066 was inserted directly.
26067
26068 @item
26069 @file{~/News/overview/} not used.
26070
26071 As a result of the following change, the @file{~/News/overview/}
26072 directory is not used any more.  You can safely delete the entire
26073 hierarchy.
26074
26075 @item
26076 @code{gnus-agent}
26077
26078 The Gnus Agent has seen a major updated and is now enabled by default,
26079 and all nntp and nnimap servers from @code{gnus-select-method} and
26080 @code{gnus-secondary-select-method} are agentized by default.  Earlier
26081 only the server in @code{gnus-select-method} was agentized by the
26082 default, and the agent was disabled by default.  When the agent is
26083 enabled, headers are now also retrieved from the Agent cache instead
26084 of the back ends when possible.  Earlier this only happened in the
26085 unplugged state.  You can enroll or remove servers with @kbd{J a} and
26086 @kbd{J r} in the server buffer.  Gnus will not download articles into
26087 the Agent cache, unless you instruct it to do so, though, by using
26088 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
26089 behaviour of having the Agent disabled with @code{(setq gnus-agent
26090 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
26091 is not needed any more.
26092
26093 @item
26094 @code{gnus-summary-line-format}
26095
26096 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
26097 %s\n}.  Moreover @code{gnus-extra-headers},
26098 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
26099 changed their default so that the users name will be replaced by the
26100 recipient's name or the group name posting to for @acronym{NNTP}
26101 groups.
26102
26103 @item
26104 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
26105
26106 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
26107 broken Outlook (Express) articles.
26108
26109 @item
26110 @code{(require 'gnus-load)}
26111
26112 If you use a stand-alone Gnus distribution, you'd better add
26113 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
26114 lisp directory into load-path.
26115
26116 File @file{gnus-load.el} contains autoload commands, functions and variables,
26117 some of which may not be included in distributions of Emacsen.
26118
26119 @item
26120 @code{gnus-slave-unplugged}
26121
26122 A new command which starts Gnus offline in slave mode.
26123
26124 @item
26125 @code{message-insinuate-rmail}
26126
26127 Adding @code{(message-insinuate-rmail)} and @code{(setq
26128 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
26129 compose, reply and forward messages in message-mode, where you can
26130 enjoy the power of @acronym{MML}.
26131
26132 @item
26133 @code{message-minibuffer-local-map}
26134
26135 The line below enables BBDB in resending a message:
26136 @lisp
26137 (define-key message-minibuffer-local-map [(tab)]
26138   'bbdb-complete-name)
26139 @end lisp
26140
26141 @item
26142 Externalizing and deleting of attachments.
26143
26144 If @code{gnus-gcc-externalize-attachments} or
26145 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
26146 local files as external parts.
26147
26148 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
26149 on @acronym{MIME} buttons) saves a part and replaces the part with an
26150 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
26151 @acronym{MIME} buttons) removes a part.  It works only on back ends
26152 that support editing.
26153
26154 @item
26155 @code{gnus-default-charset}
26156
26157 The default value is determined from the
26158 @code{current-language-environment} variable, instead of
26159 @code{iso-8859-1}.  Also the @samp{.*} item in
26160 @code{gnus-group-charset-alist} is removed.
26161
26162 @item
26163 @code{gnus-posting-styles}
26164
26165 Add a new format of match like
26166 @lisp
26167 ((header "to" "larsi.*org")
26168  (Organization "Somewhere, Inc."))
26169 @end lisp
26170 The old format like the lines below is obsolete, but still accepted.
26171 @lisp
26172 (header "to" "larsi.*org"
26173         (Organization "Somewhere, Inc."))
26174 @end lisp
26175
26176 @item
26177 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
26178
26179 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
26180 added into these two variables.  If you customized those, perhaps you
26181 need add those two headers too.
26182
26183 @item
26184 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
26185
26186 If one reads an article while plugged, and the article already exists
26187 in the Agent, it won't get downloaded once more.  @code{(setq
26188 gnus-agent-cache nil)} reverts to the old behavior.
26189
26190 @item
26191 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
26192 composing messages, it is enabled by @code{use-hard-newlines}.
26193 Decoding format=flowed was present but not documented in earlier
26194 versions.
26195
26196 @item
26197 Gnus supports the generation of RFC 2298 Disposition Notification requests.
26198
26199 This is invoked with the @kbd{C-c M-n} key binding from message mode.
26200
26201 @item
26202 Gnus supports Maildir groups.
26203
26204 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
26205
26206 @item
26207 Printing capabilities are enhanced.
26208
26209 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
26210 Article buffers.  Also, each individual @acronym{MIME} part can be
26211 printed using @kbd{p} on the @acronym{MIME} button.
26212
26213 @item
26214 Message supports the Importance: (RFC 2156) header.
26215
26216 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
26217 the valid values.
26218
26219 @item
26220 Gnus supports Cancel Locks in News.
26221
26222 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
26223 used to determine if you wrote an article or not (for canceling and
26224 superseding).  Gnus generates a random password string the first time
26225 you post a message, and saves it in your @file{~/.emacs} using the Custom
26226 system.  While the variable is called @code{canlock-password}, it is not
26227 security sensitive data.  Publishing your canlock string on the web
26228 will not allow anyone to be able to anything she could not already do.
26229 The behaviour can be changed by customizing @code{message-insert-canlock}.
26230
26231 @item
26232 Gnus supports server-side mail filtering using Sieve.
26233
26234 Sieve rules can be added as Group Parameters for groups, and the
26235 complete Sieve script is generated using @kbd{D g} from the Group
26236 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
26237 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
26238 manual @ref{Top, , Top, sieve, Emacs Sieve}.
26239
26240 @item
26241 Extended format specs.
26242
26243 Format spec @samp{%&user-date;} is added into
26244 @code{gnus-summary-line-format-alist}.  Also, user defined extended
26245 format specs are supported.  The extended format specs look like
26246 @samp{%u&foo;}, which invokes function
26247 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
26248 escape character, old user defined format @samp{%u&} is no longer supported.
26249
26250 @item
26251 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
26252
26253 It was aliased to @kbd{Y c}
26254 (@code{gnus-summary-insert-cached-articles}).  The new function filters
26255 out other articles.
26256
26257 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
26258
26259 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
26260 s}, @kbd{/ a}, and @kbd{/ x}
26261 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
26262 result will be to display all articles that do not match the expression.
26263
26264 @item
26265 Group names are treated as UTF-8 by default.
26266
26267 This is supposedly what USEFOR wanted to migrate to.  See
26268 @code{gnus-group-name-charset-group-alist} and
26269 @code{gnus-group-name-charset-method-alist} for customization.
26270
26271 @item
26272 The nnml and nnfolder back ends store marks for each groups.
26273
26274 This makes it possible to take backup of nnml/nnfolder servers/groups
26275 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
26276 makes it possible to share articles and marks between users (without
26277 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
26278 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
26279 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
26280 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
26281 another machine, Gnus will automatically use the @file{.marks} or
26282 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
26283 The new server variables @code{nnml-marks-is-evil} and
26284 @code{nnfolder-marks-is-evil} can be used to disable this feature.
26285
26286 @item
26287 The menu bar item (in Group and Summary buffer) named ``Misc'' has
26288 been renamed to ``Gnus''.
26289
26290 @item
26291 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
26292 renamed to ``Attachments''.  Note that this menu also contains security
26293 related stuff, like signing and encryption (@pxref{Security, Security,,
26294 message, Message Manual}).
26295
26296 @item
26297 @code{gnus-group-charset-alist} and
26298 @code{gnus-group-ignored-charsets-alist}.
26299
26300 The regexps in these variables are compared with full group names
26301 instead of real group names in 5.8.  Users who customize these
26302 variables should change those regexps accordingly.  For example:
26303 @lisp
26304 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
26305 @end lisp
26306
26307 @item
26308 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
26309 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
26310
26311 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
26312 additional Lisp libraries.  This add several menu items to the
26313 Attachments menu, and @kbd{C-c RET} key bindings, when composing
26314 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
26315
26316 @item
26317 Gnus inlines external parts (message/external).
26318
26319 @item
26320 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
26321 C-m}.
26322
26323 This change was made to avoid conflict with the standard binding of
26324 @code{back-to-indentation}, which is also useful in message mode.
26325
26326 @item
26327 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
26328
26329 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
26330 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
26331 used when forwarding signed or encrypted messages, as the conversion
26332 invalidate the digital signature.
26333 @end itemize
26334
26335 @node No Gnus
26336 @subsubsection No Gnus
26337 @cindex No Gnus
26338
26339 New features in No Gnus:
26340 @c FIXME: Gnus 5.12?
26341
26342 @include gnus-news.texi
26343
26344 @iftex
26345
26346 @page
26347 @node The Manual
26348 @section The Manual
26349 @cindex colophon
26350 @cindex manual
26351
26352 This manual was generated from a TeXinfo file and then run through
26353 either @code{texi2dvi}
26354 @iflatex
26355 or my own home-brewed TeXinfo to \LaTeX\ transformer,
26356 and then run through @code{latex} and @code{dvips}
26357 @end iflatex
26358 to get what you hold in your hands now.
26359
26360 The following conventions have been used:
26361
26362 @enumerate
26363
26364 @item
26365 This is a @samp{string}
26366
26367 @item
26368 This is a @kbd{keystroke}
26369
26370 @item
26371 This is a @file{file}
26372
26373 @item
26374 This is a @code{symbol}
26375
26376 @end enumerate
26377
26378 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
26379 mean:
26380
26381 @lisp
26382 (setq flargnoze "yes")
26383 @end lisp
26384
26385 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
26386
26387 @lisp
26388 (setq flumphel 'yes)
26389 @end lisp
26390
26391 @samp{yes} and @code{yes} are two @emph{very} different things---don't
26392 ever get them confused.
26393
26394 @iflatex
26395 @c @head
26396 Of course, everything in this manual is of vital interest, so you should
26397 read it all.  Several times.  However, if you feel like skimming the
26398 manual, look for that gnu head you should see in the margin over
26399 there---it means that what's being discussed is of more importance than
26400 the rest of the stuff.  (On the other hand, if everything is infinitely
26401 important, how can anything be more important than that?  Just one more
26402 of the mysteries of this world, I guess.)
26403 @end iflatex
26404
26405 @end iftex
26406
26407
26408 @node On Writing Manuals
26409 @section On Writing Manuals
26410
26411 I guess most manuals are written after-the-fact; documenting a program
26412 that's already there.  This is not how this manual is written.  When
26413 implementing something, I write the manual entry for that something
26414 straight away.  I then see that it's difficult to explain the
26415 functionality, so I write how it's supposed to be, and then I change the
26416 implementation.  Writing the documentation and writing the code goes
26417 hand in hand.
26418
26419 This, of course, means that this manual has no, or little, flow.  It
26420 documents absolutely everything in Gnus, but often not where you're
26421 looking for it.  It is a reference manual, and not a guide to how to get
26422 started with Gnus.
26423
26424 That would be a totally different book, that should be written using the
26425 reference manual as source material.  It would look quite differently.
26426
26427
26428 @page
26429 @node Terminology
26430 @section Terminology
26431
26432 @cindex terminology
26433 @table @dfn
26434
26435 @item news
26436 @cindex news
26437 This is what you are supposed to use this thing for---reading news.
26438 News is generally fetched from a nearby @acronym{NNTP} server, and is
26439 generally publicly available to everybody.  If you post news, the entire
26440 world is likely to read just what you have written, and they'll all
26441 snigger mischievously.  Behind your back.
26442
26443 @item mail
26444 @cindex mail
26445 Everything that's delivered to you personally is mail.  Some news/mail
26446 readers (like Gnus) blur the distinction between mail and news, but
26447 there is a difference.  Mail is private.  News is public.  Mailing is
26448 not posting, and replying is not following up.
26449
26450 @item reply
26451 @cindex reply
26452 Send a mail to the person who has written what you are reading.
26453
26454 @item follow up
26455 @cindex follow up
26456 Post an article to the current newsgroup responding to the article you
26457 are reading.
26458
26459 @item back end
26460 @cindex back end
26461 Gnus considers mail and news to be mostly the same, really.  The only
26462 difference is how to access the actual articles.  News articles are
26463 commonly fetched via the protocol @acronym{NNTP}, whereas mail
26464 messages could be read from a file on the local disk.  The internal
26465 architecture of Gnus thus comprises a ``front end'' and a number of
26466 ``back ends''.  Internally, when you enter a group (by hitting
26467 @key{RET}, say), you thereby invoke a function in the front end in
26468 Gnus.  The front end then ``talks'' to a back end and says things like
26469 ``Give me the list of articles in the foo group'' or ``Show me article
26470 number 4711''.
26471
26472 So a back end mainly defines either a protocol (the @code{nntp} back
26473 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
26474 accesses mail via @acronym{IMAP}) or a file format and directory
26475 layout (the @code{nnspool} back end accesses news via the common
26476 ``spool directory'' format, the @code{nnml} back end access mail via a
26477 file format and directory layout that's quite similar).
26478
26479 Gnus does not handle the underlying media, so to speak---this is all
26480 done by the back ends.  A back end is a collection of functions to
26481 access the articles.
26482
26483 However, sometimes the term ``back end'' is also used where ``server''
26484 would have been more appropriate.  And then there is the term ``select
26485 method'' which can mean either.  The Gnus terminology can be quite
26486 confusing.
26487
26488 @item native
26489 @cindex native
26490 Gnus will always use one method (and back end) as the @dfn{native}, or
26491 default, way of getting news.
26492
26493 @item foreign
26494 @cindex foreign
26495 You can also have any number of foreign groups active at the same time.
26496 These are groups that use non-native non-secondary back ends for getting
26497 news.
26498
26499 @item secondary
26500 @cindex secondary
26501 Secondary back ends are somewhere half-way between being native and being
26502 foreign, but they mostly act like they are native.
26503
26504 @item article
26505 @cindex article
26506 A message that has been posted as news.
26507
26508 @item mail message
26509 @cindex mail message
26510 A message that has been mailed.
26511
26512 @item message
26513 @cindex message
26514 A mail message or news article
26515
26516 @item head
26517 @cindex head
26518 The top part of a message, where administrative information (etc.) is
26519 put.
26520
26521 @item body
26522 @cindex body
26523 The rest of an article.  Everything not in the head is in the
26524 body.
26525
26526 @item header
26527 @cindex header
26528 A line from the head of an article.
26529
26530 @item headers
26531 @cindex headers
26532 A collection of such lines, or a collection of heads.  Or even a
26533 collection of @acronym{NOV} lines.
26534
26535 @item @acronym{NOV}
26536 @cindex @acronym{NOV}
26537 When Gnus enters a group, it asks the back end for the headers of all
26538 unread articles in the group.  Most servers support the News OverView
26539 format, which is more compact and much faster to read and parse than the
26540 normal @sc{head} format.
26541
26542 @item level
26543 @cindex levels
26544 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
26545 that have a lower level are ``more'' subscribed than the groups with a
26546 higher level.  In fact, groups on levels 1-5 are considered
26547 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
26548 are @dfn{killed}.  Commands for listing groups and scanning for new
26549 articles will all use the numeric prefix as @dfn{working level}.
26550
26551 @item killed groups
26552 @cindex killed groups
26553 No information on killed groups is stored or updated, which makes killed
26554 groups much easier to handle than subscribed groups.
26555
26556 @item zombie groups
26557 @cindex zombie groups
26558 Just like killed groups, only slightly less dead.
26559
26560 @item active file
26561 @cindex active file
26562 The news server has to keep track of what articles it carries, and what
26563 groups exist.  All this information in stored in the active file, which
26564 is rather large, as you might surmise.
26565
26566 @item bogus groups
26567 @cindex bogus groups
26568 A group that exists in the @file{.newsrc} file, but isn't known to the
26569 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
26570 This means that the group probably doesn't exist (any more).
26571
26572 @item activating
26573 @cindex activating groups
26574 The act of asking the server for info on a group and computing the
26575 number of unread articles is called @dfn{activating the group}.
26576 Un-activated groups are listed with @samp{*} in the group buffer.
26577
26578 @item server
26579 @cindex server
26580 A machine one can connect to and get news (or mail) from.
26581
26582 @item select method
26583 @cindex select method
26584 A structure that specifies the back end, the server and the virtual
26585 server settings.
26586
26587 @item virtual server
26588 @cindex virtual server
26589 A named select method.  Since a select method defines all there is to
26590 know about connecting to a (physical) server, taking the thing as a
26591 whole is a virtual server.
26592
26593 @item washing
26594 @cindex washing
26595 Taking a buffer and running it through a filter of some sort.  The
26596 result will (more often than not) be cleaner and more pleasing than the
26597 original.
26598
26599 @item ephemeral groups
26600 @cindex ephemeral groups
26601 @cindex temporary groups
26602 Most groups store data on what articles you have read.  @dfn{Ephemeral}
26603 groups are groups that will have no data stored---when you exit the
26604 group, it'll disappear into the aether.
26605
26606 @item solid groups
26607 @cindex solid groups
26608 This is the opposite of ephemeral groups.  All groups listed in the
26609 group buffer are solid groups.
26610
26611 @item sparse articles
26612 @cindex sparse articles
26613 These are article placeholders shown in the summary buffer when
26614 @code{gnus-build-sparse-threads} has been switched on.
26615
26616 @item threading
26617 @cindex threading
26618 To put responses to articles directly after the articles they respond
26619 to---in a hierarchical fashion.
26620
26621 @item root
26622 @cindex root
26623 @cindex thread root
26624 The first article in a thread is the root.  It is the ancestor of all
26625 articles in the thread.
26626
26627 @item parent
26628 @cindex parent
26629 An article that has responses.
26630
26631 @item child
26632 @cindex child
26633 An article that responds to a different article---its parent.
26634
26635 @item digest
26636 @cindex digest
26637 A collection of messages in one file.  The most common digest format is
26638 specified by RFC 1153.
26639
26640 @item splitting
26641 @cindex splitting, terminolgy
26642 @cindex mail sorting
26643 @cindex mail filtering (splitting)
26644 The action of sorting your emails according to certain rules. Sometimes
26645 incorrectly called mail filtering.
26646
26647 @end table
26648
26649
26650 @page
26651 @node Customization
26652 @section Customization
26653 @cindex general customization
26654
26655 All variables are properly documented elsewhere in this manual.  This
26656 section is designed to give general pointers on how to customize Gnus
26657 for some quite common situations.
26658
26659 @menu
26660 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
26661 * Slow Terminal Connection::    You run a remote Emacs.
26662 * Little Disk Space::           You feel that having large setup files is icky.
26663 * Slow Machine::                You feel like buying a faster machine.
26664 @end menu
26665
26666
26667 @node Slow/Expensive Connection
26668 @subsection Slow/Expensive NNTP Connection
26669
26670 If you run Emacs on a machine locally, and get your news from a machine
26671 over some very thin strings, you want to cut down on the amount of data
26672 Gnus has to get from the @acronym{NNTP} server.
26673
26674 @table @code
26675
26676 @item gnus-read-active-file
26677 Set this to @code{nil}, which will inhibit Gnus from requesting the
26678 entire active file from the server.  This file is often v.  large.  You
26679 also have to set @code{gnus-check-new-newsgroups} and
26680 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
26681 doesn't suddenly decide to fetch the active file anyway.
26682
26683 @item gnus-nov-is-evil
26684 This one has to be @code{nil}.  If not, grabbing article headers from
26685 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
26686 support @sc{xover}; Gnus will detect this by itself.
26687 @end table
26688
26689
26690 @node Slow Terminal Connection
26691 @subsection Slow Terminal Connection
26692
26693 Let's say you use your home computer for dialing up the system that runs
26694 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
26695 possible) the amount of data sent over the wires.
26696
26697 @table @code
26698
26699 @item gnus-auto-center-summary
26700 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26701 buffer all the time.  If it is @code{vertical}, do only vertical
26702 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
26703 horizontal and vertical recentering.
26704
26705 @item gnus-visible-headers
26706 Cut down on the headers included in the articles to the
26707 minimum.  You can, in fact, make do without them altogether---most of the
26708 useful data is in the summary buffer, anyway.  Set this variable to
26709 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26710
26711 Set this hook to all the available hiding commands:
26712 @lisp
26713 (setq gnus-treat-hide-headers 'head
26714       gnus-treat-hide-signature t
26715       gnus-treat-hide-citation t)
26716 @end lisp
26717
26718 @item gnus-use-full-window
26719 By setting this to @code{nil}, you can make all the windows smaller.
26720 While this doesn't really cut down much generally, it means that you
26721 have to see smaller portions of articles before deciding that you didn't
26722 want to read them anyway.
26723
26724 @item gnus-thread-hide-subtree
26725 If this is non-@code{nil}, all threads in the summary buffer will be
26726 hidden initially.
26727
26728
26729 @item gnus-updated-mode-lines
26730 If this is @code{nil}, Gnus will not put information in the buffer mode
26731 lines, which might save some time.
26732 @end table
26733
26734
26735 @node Little Disk Space
26736 @subsection Little Disk Space
26737 @cindex disk space
26738
26739 The startup files can get rather large, so you may want to cut their
26740 sizes a bit if you are running out of space.
26741
26742 @table @code
26743
26744 @item gnus-save-newsrc-file
26745 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26746 only save @file{.newsrc.eld}.  This means that you will not be able to
26747 use any other newsreaders than Gnus.  This variable is @code{t} by
26748 default.
26749
26750 @item gnus-read-newsrc-file
26751 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26752 only read @file{.newsrc.eld}.  This means that you will not be able to
26753 use any other newsreaders than Gnus.  This variable is @code{t} by
26754 default.
26755
26756 @item gnus-save-killed-list
26757 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26758 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26759 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26760 variable to @code{nil}.  This variable is @code{t} by default.
26761
26762 @end table
26763
26764
26765 @node Slow Machine
26766 @subsection Slow Machine
26767 @cindex slow machine
26768
26769 If you have a slow machine, or are just really impatient, there are a
26770 few things you can do to make Gnus run faster.
26771
26772 Set @code{gnus-check-new-newsgroups} and
26773 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26774
26775 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26776 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26777 summary buffer faster.
26778
26779
26780 @page
26781 @node Troubleshooting
26782 @section Troubleshooting
26783 @cindex troubleshooting
26784
26785 Gnus works @emph{so} well straight out of the box---I can't imagine any
26786 problems, really.
26787
26788 Ahem.
26789
26790 @enumerate
26791
26792 @item
26793 Make sure your computer is switched on.
26794
26795 @item
26796 Make sure that you really load the current Gnus version.  If you have
26797 been running @sc{gnus}, you need to exit Emacs and start it up again before
26798 Gnus will work.
26799
26800 @item
26801 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26802 like @samp{Gnus v5.10.6} you have the right files loaded.  Otherwise
26803 you have some old @file{.el} files lying around.  Delete these.
26804
26805 @item
26806 Read the help group (@kbd{G h} in the group buffer) for a
26807 @acronym{FAQ} and a how-to.
26808
26809 @item
26810 @vindex max-lisp-eval-depth
26811 Gnus works on many recursive structures, and in some extreme (and very
26812 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26813 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26814 something like that.
26815 @end enumerate
26816
26817 If all else fails, report the problem as a bug.
26818
26819 @cindex bugs
26820 @cindex reporting bugs
26821
26822 @kindex M-x gnus-bug
26823 @findex gnus-bug
26824 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26825 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26826 me the backtrace.  I will fix bugs, but I can only fix them if you send
26827 me a precise description as to how to reproduce the bug.
26828
26829 You really can never be too detailed in a bug report.  Always use the
26830 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26831 a 10Kb mail each time you use it, and even if you have sent me your
26832 environment 500 times before.  I don't care.  I want the full info each
26833 time.
26834
26835 It is also important to remember that I have no memory whatsoever.  If
26836 you send a bug report, and I send you a reply, and then you just send
26837 back ``No, it's not! Moron!'', I will have no idea what you are
26838 insulting me about.  Always over-explain everything.  It's much easier
26839 for all of us---if I don't have all the information I need, I will just
26840 mail you and ask for more info, and everything takes more time.
26841
26842 If the problem you're seeing is very visual, and you can't quite explain
26843 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26844 it somewhere it can be reached, and include the URL of the picture in
26845 the bug report.
26846
26847 @cindex patches
26848 If you would like to contribute a patch to fix bugs or make
26849 improvements, please produce the patch using @samp{diff -u}.
26850
26851 @cindex edebug
26852 If you want to debug your problem further before reporting, possibly
26853 in order to solve the problem yourself and send a patch, you can use
26854 edebug.  Debugging Lisp code is documented in the Elisp manual
26855 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26856 Lisp Reference Manual}).  To get you started with edebug, consider if
26857 you discover some weird behaviour when pressing @kbd{c}, the first
26858 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26859 the documentation buffer that leads you to the function definition,
26860 then press @kbd{M-x edebug-defun RET} with point inside that function,
26861 return to Gnus and press @kbd{c} to invoke the code.  You will be
26862 placed in the lisp buffer and can single step using @kbd{SPC} and
26863 evaluate expressions using @kbd{M-:} or inspect variables using
26864 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26865 @kbd{c} or @kbd{g}.
26866
26867 @cindex elp
26868 @cindex profile
26869 @cindex slow
26870 Sometimes, a problem do not directly generate an elisp error but
26871 manifests itself by causing Gnus to be very slow.  In these cases, you
26872 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26873 slow, and then try to analyze the backtrace (repeating the procedure
26874 helps isolating the real problem areas).
26875
26876 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26877 (or should be) fully documented elsewhere, but to get you started
26878 there are a few steps that need to be followed.  First, instrument the
26879 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26880 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26881 RET message}.  Then perform the operation that is slow and press
26882 @kbd{M-x elp-results}.  You will then see which operations that takes
26883 time, and can debug them further.  If the entire operation takes much
26884 longer than the time spent in the slowest function in the profiler
26885 output, you probably profiled the wrong part of Gnus.  To reset
26886 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26887 elp-restore-all} is supposed to remove profiling, but given the
26888 complexities and dynamic code generation in Gnus, it might not always
26889 work perfectly.
26890
26891 @cindex gnu.emacs.gnus
26892 @cindex ding mailing list
26893 If you just need help, you are better off asking on
26894 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26895 @email{ding@@gnus.org, the ding mailing list}.  Write to
26896 @email{ding-request@@gnus.org} to subscribe.
26897
26898
26899 @page
26900 @node Gnus Reference Guide
26901 @section Gnus Reference Guide
26902
26903 It is my hope that other people will figure out smart stuff that Gnus
26904 can do, and that other people will write those smart things as well.  To
26905 facilitate that I thought it would be a good idea to describe the inner
26906 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26907 it.
26908
26909 You can never expect the internals of a program not to change, but I
26910 will be defining (in some details) the interface between Gnus and its
26911 back ends (this is written in stone), the format of the score files
26912 (ditto), data structures (some are less likely to change than others)
26913 and general methods of operation.
26914
26915 @menu
26916 * Gnus Utility Functions::      Common functions and variable to use.
26917 * Back End Interface::          How Gnus communicates with the servers.
26918 * Score File Syntax::           A BNF definition of the score file standard.
26919 * Headers::                     How Gnus stores headers internally.
26920 * Ranges::                      A handy format for storing mucho numbers.
26921 * Group Info::                  The group info format.
26922 * Extended Interactive::        Symbolic prefixes and stuff.
26923 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26924 * Various File Formats::        Formats of files that Gnus use.
26925 @end menu
26926
26927
26928 @node Gnus Utility Functions
26929 @subsection Gnus Utility Functions
26930 @cindex Gnus utility functions
26931 @cindex utility functions
26932 @cindex functions
26933 @cindex internal variables
26934
26935 When writing small functions to be run from hooks (and stuff), it's
26936 vital to have access to the Gnus internal functions and variables.
26937 Below is a list of the most common ones.
26938
26939 @table @code
26940
26941 @item gnus-newsgroup-name
26942 @vindex gnus-newsgroup-name
26943 This variable holds the name of the current newsgroup.
26944
26945 @item gnus-find-method-for-group
26946 @findex gnus-find-method-for-group
26947 A function that returns the select method for @var{group}.
26948
26949 @item gnus-group-real-name
26950 @findex gnus-group-real-name
26951 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26952 name.
26953
26954 @item gnus-group-prefixed-name
26955 @findex gnus-group-prefixed-name
26956 Takes an unprefixed group name and a select method, and returns the full
26957 (prefixed) Gnus group name.
26958
26959 @item gnus-get-info
26960 @findex gnus-get-info
26961 Returns the group info list for @var{group}.
26962
26963 @item gnus-group-unread
26964 @findex gnus-group-unread
26965 The number of unread articles in @var{group}, or @code{t} if that is
26966 unknown.
26967
26968 @item gnus-active
26969 @findex gnus-active
26970 The active entry for @var{group}.
26971
26972 @item gnus-set-active
26973 @findex gnus-set-active
26974 Set the active entry for @var{group}.
26975
26976 @item gnus-add-current-to-buffer-list
26977 @findex gnus-add-current-to-buffer-list
26978 Adds the current buffer to the list of buffers to be killed on Gnus
26979 exit.
26980
26981 @item gnus-continuum-version
26982 @findex gnus-continuum-version
26983 Takes a Gnus version string as a parameter and returns a floating point
26984 number.  Earlier versions will always get a lower number than later
26985 versions.
26986
26987 @item gnus-group-read-only-p
26988 @findex gnus-group-read-only-p
26989 Says whether @var{group} is read-only or not.
26990
26991 @item gnus-news-group-p
26992 @findex gnus-news-group-p
26993 Says whether @var{group} came from a news back end.
26994
26995 @item gnus-ephemeral-group-p
26996 @findex gnus-ephemeral-group-p
26997 Says whether @var{group} is ephemeral or not.
26998
26999 @item gnus-server-to-method
27000 @findex gnus-server-to-method
27001 Returns the select method corresponding to @var{server}.
27002
27003 @item gnus-server-equal
27004 @findex gnus-server-equal
27005 Says whether two virtual servers are equal.
27006
27007 @item gnus-group-native-p
27008 @findex gnus-group-native-p
27009 Says whether @var{group} is native or not.
27010
27011 @item gnus-group-secondary-p
27012 @findex gnus-group-secondary-p
27013 Says whether @var{group} is secondary or not.
27014
27015 @item gnus-group-foreign-p
27016 @findex gnus-group-foreign-p
27017 Says whether @var{group} is foreign or not.
27018
27019 @item gnus-group-find-parameter
27020 @findex gnus-group-find-parameter
27021 Returns the parameter list of @var{group}.  If given a second parameter,
27022 returns the value of that parameter for @var{group}.
27023
27024 @item gnus-group-set-parameter
27025 @findex gnus-group-set-parameter
27026 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
27027
27028 @item gnus-narrow-to-body
27029 @findex gnus-narrow-to-body
27030 Narrows the current buffer to the body of the article.
27031
27032 @item gnus-check-backend-function
27033 @findex gnus-check-backend-function
27034 Takes two parameters, @var{function} and @var{group}.  If the back end
27035 @var{group} comes from supports @var{function}, return non-@code{nil}.
27036
27037 @lisp
27038 (gnus-check-backend-function "request-scan" "nnml:misc")
27039 @result{} t
27040 @end lisp
27041
27042 @item gnus-read-method
27043 @findex gnus-read-method
27044 Prompts the user for a select method.
27045
27046 @end table
27047
27048
27049 @node Back End Interface
27050 @subsection Back End Interface
27051
27052 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
27053 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
27054 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
27055 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
27056 examples of the latter we have @code{nntp-port-number} and
27057 @code{nnmbox-directory}.
27058
27059 When Gnus asks for information from a back end---say @code{nntp}---on
27060 something, it will normally include a virtual server name in the
27061 function parameters.  (If not, the back end should use the ``current''
27062 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
27063 server as its only (optional) parameter.  If this virtual server hasn't
27064 been opened, the function should fail.
27065
27066 Note that a virtual server name has no relation to some physical server
27067 name.  Take this example:
27068
27069 @lisp
27070 (nntp "odd-one"
27071       (nntp-address "ifi.uio.no")
27072       (nntp-port-number 4324))
27073 @end lisp
27074
27075 Here the virtual server name is @samp{odd-one} while the name of
27076 the physical server is @samp{ifi.uio.no}.
27077
27078 The back ends should be able to switch between several virtual servers.
27079 The standard back ends implement this by keeping an alist of virtual
27080 server environments that they pull down/push up when needed.
27081
27082 There are two groups of interface functions: @dfn{required functions},
27083 which must be present, and @dfn{optional functions}, which Gnus will
27084 always check for presence before attempting to call 'em.
27085
27086 All these functions are expected to return data in the buffer
27087 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
27088 unfortunately named, but we'll have to live with it.  When I talk about
27089 @dfn{resulting data}, I always refer to the data in that buffer.  When I
27090 talk about @dfn{return value}, I talk about the function value returned by
27091 the function call.  Functions that fail should return @code{nil} as the
27092 return value.
27093
27094 Some back ends could be said to be @dfn{server-forming} back ends, and
27095 some might be said not to be.  The latter are back ends that generally
27096 only operate on one group at a time, and have no concept of ``server''
27097 ---they have a group, and they deliver info on that group and nothing
27098 more.
27099
27100 Gnus identifies each message by way of group name and article number.  A
27101 few remarks about these article numbers might be useful.  First of all,
27102 the numbers are positive integers.  Secondly, it is normally not
27103 possible for later articles to ``re-use'' older article numbers without
27104 confusing Gnus.  That is, if a group has ever contained a message
27105 numbered 42, then no other message may get that number, or Gnus will get
27106 mightily confused.@footnote{See the function
27107 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
27108 Third, article numbers must be assigned in order of arrival in the
27109 group; this is not necessarily the same as the date of the message.
27110
27111 The previous paragraph already mentions all the ``hard'' restrictions that
27112 article numbers must fulfill.  But it seems that it might be useful to
27113 assign @emph{consecutive} article numbers, for Gnus gets quite confused
27114 if there are holes in the article numbering sequence.  However, due to
27115 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
27116 also useful for the article numbers to start at 1 to avoid running out
27117 of numbers as long as possible.
27118
27119 Note that by convention, back ends are named @code{nnsomething}, but
27120 Gnus also comes with some @code{nnnotbackends}, such as
27121 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
27122
27123 In the examples and definitions I will refer to the imaginary back end
27124 @code{nnchoke}.
27125
27126 @cindex @code{nnchoke}
27127
27128 @menu
27129 * Required Back End Functions::  Functions that must be implemented.
27130 * Optional Back End Functions::  Functions that need not be implemented.
27131 * Error Messaging::             How to get messages and report errors.
27132 * Writing New Back Ends::       Extending old back ends.
27133 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
27134 * Mail-like Back Ends::         Some tips on mail back ends.
27135 @end menu
27136
27137
27138 @node Required Back End Functions
27139 @subsubsection Required Back End Functions
27140
27141 @table @code
27142
27143 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
27144
27145 @var{articles} is either a range of article numbers or a list of
27146 @code{Message-ID}s.  Current back ends do not fully support either---only
27147 sequences (lists) of article numbers, and most back ends do not support
27148 retrieval of @code{Message-ID}s.  But they should try for both.
27149
27150 The result data should either be HEADs or @acronym{NOV} lines, and the result
27151 value should either be @code{headers} or @code{nov} to reflect this.
27152 This might later be expanded to @code{various}, which will be a mixture
27153 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
27154
27155 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
27156 headers'', in some meaning of the word.  This is generally done by
27157 fetching (at most) @var{fetch-old} extra headers less than the smallest
27158 article number in @code{articles}, and filling the gaps as well.  The
27159 presence of this parameter can be ignored if the back end finds it
27160 cumbersome to follow the request.  If this is non-@code{nil} and not a
27161 number, do maximum fetches.
27162
27163 Here's an example HEAD:
27164
27165 @example
27166 221 1056 Article retrieved.
27167 Path: ifi.uio.no!sturles
27168 From: sturles@@ifi.uio.no (Sturle Sunde)
27169 Newsgroups: ifi.discussion
27170 Subject: Re: Something very droll
27171 Date: 27 Oct 1994 14:02:57 +0100
27172 Organization: Dept. of Informatics, University of Oslo, Norway
27173 Lines: 26
27174 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
27175 References: <38jdmq$4qu@@visbur.ifi.uio.no>
27176 NNTP-Posting-Host: holmenkollen.ifi.uio.no
27177 .
27178 @end example
27179
27180 So a @code{headers} return value would imply that there's a number of
27181 these in the data buffer.
27182
27183 Here's a BNF definition of such a buffer:
27184
27185 @example
27186 headers        = *head
27187 head           = error / valid-head
27188 error-message  = [ "4" / "5" ] 2number " " <error message> eol
27189 valid-head     = valid-message *header "." eol
27190 valid-message  = "221 " <number> " Article retrieved." eol
27191 header         = <text> eol
27192 @end example
27193
27194 @cindex BNF
27195 (The version of BNF used here is the one used in RFC822.)
27196
27197 If the return value is @code{nov}, the data buffer should contain
27198 @dfn{network overview database} lines.  These are basically fields
27199 separated by tabs.
27200
27201 @example
27202 nov-buffer = *nov-line
27203 nov-line   = field 7*8[ <TAB> field ] eol
27204 field      = <text except TAB>
27205 @end example
27206
27207 For a closer look at what should be in those fields,
27208 @pxref{Headers}.
27209
27210
27211 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
27212
27213 @var{server} is here the virtual server name.  @var{definitions} is a
27214 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
27215
27216 If the server can't be opened, no error should be signaled.  The back end
27217 may then choose to refuse further attempts at connecting to this
27218 server.  In fact, it should do so.
27219
27220 If the server is opened already, this function should return a
27221 non-@code{nil} value.  There should be no data returned.
27222
27223
27224 @item (nnchoke-close-server &optional SERVER)
27225
27226 Close connection to @var{server} and free all resources connected
27227 to it.  Return @code{nil} if the server couldn't be closed for some
27228 reason.
27229
27230 There should be no data returned.
27231
27232
27233 @item (nnchoke-request-close)
27234
27235 Close connection to all servers and free all resources that the back end
27236 have reserved.  All buffers that have been created by that back end
27237 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
27238 function is generally only called when Gnus is shutting down.
27239
27240 There should be no data returned.
27241
27242
27243 @item (nnchoke-server-opened &optional SERVER)
27244
27245 If @var{server} is the current virtual server, and the connection to the
27246 physical server is alive, then this function should return a
27247 non-@code{nil} value.  This function should under no circumstances
27248 attempt to reconnect to a server we have lost connection to.
27249
27250 There should be no data returned.
27251
27252
27253 @item (nnchoke-status-message &optional SERVER)
27254
27255 This function should return the last error message from @var{server}.
27256
27257 There should be no data returned.
27258
27259
27260 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
27261
27262 The result data from this function should be the article specified by
27263 @var{article}.  This might either be a @code{Message-ID} or a number.
27264 It is optional whether to implement retrieval by @code{Message-ID}, but
27265 it would be nice if that were possible.
27266
27267 If @var{to-buffer} is non-@code{nil}, the result data should be returned
27268 in this buffer instead of the normal data buffer.  This is to make it
27269 possible to avoid copying large amounts of data from one buffer to
27270 another, while Gnus mainly requests articles to be inserted directly
27271 into its article buffer.
27272
27273 If it is at all possible, this function should return a cons cell where
27274 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
27275 the article number.  This will enable Gnus to find out what the real
27276 group and article numbers are when fetching articles by
27277 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
27278 on successful article retrieval.
27279
27280
27281 @item (nnchoke-request-group GROUP &optional SERVER FAST)
27282
27283 Get data on @var{group}.  This function also has the side effect of
27284 making @var{group} the current group.
27285
27286 If @var{fast}, don't bother to return useful data, just make @var{group}
27287 the current group.
27288
27289 Here's an example of some result data and a definition of the same:
27290
27291 @example
27292 211 56 1000 1059 ifi.discussion
27293 @end example
27294
27295 The first number is the status, which should be 211.  Next is the
27296 total number of articles in the group, the lowest article number, the
27297 highest article number, and finally the group name.  Note that the total
27298 number of articles may be less than one might think while just
27299 considering the highest and lowest article numbers, but some articles
27300 may have been canceled.  Gnus just discards the total-number, so
27301 whether one should take the bother to generate it properly (if that is a
27302 problem) is left as an exercise to the reader.  If the group contains no
27303 articles, the lowest article number should be reported as 1 and the
27304 highest as 0.
27305
27306 @example
27307 group-status = [ error / info ] eol
27308 error        = [ "4" / "5" ] 2<number> " " <Error message>
27309 info         = "211 " 3* [ <number> " " ] <string>
27310 @end example
27311
27312
27313 @item (nnchoke-close-group GROUP &optional SERVER)
27314
27315 Close @var{group} and free any resources connected to it.  This will be
27316 a no-op on most back ends.
27317
27318 There should be no data returned.
27319
27320
27321 @item (nnchoke-request-list &optional SERVER)
27322
27323 Return a list of all groups available on @var{server}.  And that means
27324 @emph{all}.
27325
27326 Here's an example from a server that only carries two groups:
27327
27328 @example
27329 ifi.test 0000002200 0000002000 y
27330 ifi.discussion 3324 3300 n
27331 @end example
27332
27333 On each line we have a group name, then the highest article number in
27334 that group, the lowest article number, and finally a flag.  If the group
27335 contains no articles, the lowest article number should be reported as 1
27336 and the highest as 0.
27337
27338 @example
27339 active-file = *active-line
27340 active-line = name " " <number> " " <number> " " flags eol
27341 name        = <string>
27342 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
27343 @end example
27344
27345 The flag says whether the group is read-only (@samp{n}), is moderated
27346 (@samp{m}), is dead (@samp{x}), is aliased to some other group
27347 (@samp{=other-group}) or none of the above (@samp{y}).
27348
27349
27350 @item (nnchoke-request-post &optional SERVER)
27351
27352 This function should post the current buffer.  It might return whether
27353 the posting was successful or not, but that's not required.  If, for
27354 instance, the posting is done asynchronously, it has generally not been
27355 completed by the time this function concludes.  In that case, this
27356 function should set up some kind of sentinel to beep the user loud and
27357 clear if the posting could not be completed.
27358
27359 There should be no result data from this function.
27360
27361 @end table
27362
27363
27364 @node Optional Back End Functions
27365 @subsubsection Optional Back End Functions
27366
27367 @table @code
27368
27369 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
27370
27371 @var{groups} is a list of groups, and this function should request data
27372 on all those groups.  How it does it is of no concern to Gnus, but it
27373 should attempt to do this in a speedy fashion.
27374
27375 The return value of this function can be either @code{active} or
27376 @code{group}, which says what the format of the result data is.  The
27377 former is in the same format as the data from
27378 @code{nnchoke-request-list}, while the latter is a buffer full of lines
27379 in the same format as @code{nnchoke-request-group} gives.
27380
27381 @example
27382 group-buffer = *active-line / *group-status
27383 @end example
27384
27385
27386 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
27387
27388 A Gnus group info (@pxref{Group Info}) is handed to the back end for
27389 alterations.  This comes in handy if the back end really carries all
27390 the information (as is the case with virtual and imap groups).  This
27391 function should destructively alter the info to suit its needs, and
27392 should return a non-@code{nil} value.
27393
27394 There should be no result data from this function.
27395
27396
27397 @item (nnchoke-request-type GROUP &optional ARTICLE)
27398
27399 When the user issues commands for ``sending news'' (@kbd{F} in the
27400 summary buffer, for instance), Gnus has to know whether the article the
27401 user is following up on is news or mail.  This function should return
27402 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
27403 is mail and @code{unknown} if the type can't be decided.  (The
27404 @var{article} parameter is necessary in @code{nnvirtual} groups which
27405 might very well combine mail groups and news groups.)  Both @var{group}
27406 and @var{article} may be @code{nil}.
27407
27408 There should be no result data from this function.
27409
27410
27411 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
27412
27413 Set/remove/add marks on articles.  Normally Gnus handles the article
27414 marks (such as read, ticked, expired etc) internally, and store them in
27415 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
27416 all information about the articles on the server, so Gnus need to
27417 propagate the mark information to the server.
27418
27419 @var{action} is a list of mark setting requests, having this format:
27420
27421 @example
27422 (RANGE ACTION MARK)
27423 @end example
27424
27425 @var{range} is a range of articles you wish to update marks on.
27426 @var{action} is @code{add} or @code{del}, used to add marks or remove
27427 marks (preserving all marks not mentioned).  @var{mark} is a list of
27428 marks; where each mark is a symbol.  Currently used marks are
27429 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
27430 @code{dormant}, @code{save}, @code{download}, @code{unsend},
27431 @code{forward} and @code{recent}, but your back end should, if
27432 possible, not limit itself to these.
27433
27434 Given contradictory actions, the last action in the list should be the
27435 effective one.  That is, if your action contains a request to add the
27436 @code{tick} mark on article 1 and, later in the list, a request to
27437 remove the mark on the same article, the mark should in fact be removed.
27438
27439 An example action list:
27440
27441 @example
27442 (((5 12 30) 'del '(tick))
27443  ((10 . 90) 'add '(read expire))
27444  ((92 94) 'del '(read)))
27445 @end example
27446
27447 The function should return a range of articles it wasn't able to set the
27448 mark on (currently not used for anything).
27449
27450 There should be no result data from this function.
27451
27452 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
27453
27454 If the user tries to set a mark that the back end doesn't like, this
27455 function may change the mark.  Gnus will use whatever this function
27456 returns as the mark for @var{article} instead of the original
27457 @var{mark}.  If the back end doesn't care, it must return the original
27458 @var{mark}, and not @code{nil} or any other type of garbage.
27459
27460 The only use for this I can see is what @code{nnvirtual} does with
27461 it---if a component group is auto-expirable, marking an article as read
27462 in the virtual group should result in the article being marked as
27463 expirable.
27464
27465 There should be no result data from this function.
27466
27467
27468 @item (nnchoke-request-scan &optional GROUP SERVER)
27469
27470 This function may be called at any time (by Gnus or anything else) to
27471 request that the back end check for incoming articles, in one way or
27472 another.  A mail back end will typically read the spool file or query
27473 the @acronym{POP} server when this function is invoked.  The
27474 @var{group} doesn't have to be heeded---if the back end decides that
27475 it is too much work just scanning for a single group, it may do a
27476 total scan of all groups.  It would be nice, however, to keep things
27477 local if that's practical.
27478
27479 There should be no result data from this function.
27480
27481
27482 @item (nnchoke-request-group-description GROUP &optional SERVER)
27483
27484 The result data from this function should be a description of
27485 @var{group}.
27486
27487 @example
27488 description-line = name <TAB> description eol
27489 name             = <string>
27490 description      = <text>
27491 @end example
27492
27493 @item (nnchoke-request-list-newsgroups &optional SERVER)
27494
27495 The result data from this function should be the description of all
27496 groups available on the server.
27497
27498 @example
27499 description-buffer = *description-line
27500 @end example
27501
27502
27503 @item (nnchoke-request-newgroups DATE &optional SERVER)
27504
27505 The result data from this function should be all groups that were
27506 created after @samp{date}, which is in normal human-readable date format
27507 (i.e., the date format used in mail and news headers, and returned by
27508 the function @code{message-make-date} by default).  The data should be
27509 in the active buffer format.
27510
27511 It is okay for this function to return ``too many'' groups; some back ends
27512 might find it cheaper to return the full list of groups, rather than
27513 just the new groups.  But don't do this for back ends with many groups.
27514 Normally, if the user creates the groups herself, there won't be too
27515 many groups, so @code{nnml} and the like are probably safe.  But for
27516 back ends like @code{nntp}, where the groups have been created by the
27517 server, it is quite likely that there can be many groups.
27518
27519
27520 @item (nnchoke-request-create-group GROUP &optional SERVER)
27521
27522 This function should create an empty group with name @var{group}.
27523
27524 There should be no return data.
27525
27526
27527 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
27528
27529 This function should run the expiry process on all articles in the
27530 @var{articles} range (which is currently a simple list of article
27531 numbers.)  It is left up to the back end to decide how old articles
27532 should be before they are removed by this function.  If @var{force} is
27533 non-@code{nil}, all @var{articles} should be deleted, no matter how new
27534 they are.
27535
27536 This function should return a list of articles that it did not/was not
27537 able to delete.
27538
27539 There should be no result data returned.
27540
27541
27542 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
27543
27544 This function should move @var{article} (which is a number) from
27545 @var{group} by calling @var{accept-form}.
27546
27547 This function should ready the article in question for moving by
27548 removing any header lines it has added to the article, and generally
27549 should ``tidy up'' the article.  Then it should @code{eval}
27550 @var{accept-form} in the buffer where the ``tidy'' article is.  This
27551 will do the actual copying.  If this @code{eval} returns a
27552 non-@code{nil} value, the article should be removed.
27553
27554 If @var{last} is @code{nil}, that means that there is a high likelihood
27555 that there will be more requests issued shortly, so that allows some
27556 optimizations.
27557
27558 The function should return a cons where the @code{car} is the group name and
27559 the @code{cdr} is the article number that the article was entered as.
27560
27561 There should be no data returned.
27562
27563
27564 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
27565
27566 This function takes the current buffer and inserts it into @var{group}.
27567 If @var{last} in @code{nil}, that means that there will be more calls to
27568 this function in short order.
27569
27570 The function should return a cons where the @code{car} is the group name and
27571 the @code{cdr} is the article number that the article was entered as.
27572
27573 The group should exist before the back end is asked to accept the
27574 article for that group.
27575
27576 There should be no data returned.
27577
27578
27579 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
27580
27581 This function should remove @var{article} (which is a number) from
27582 @var{group} and insert @var{buffer} there instead.
27583
27584 There should be no data returned.
27585
27586
27587 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
27588
27589 This function should delete @var{group}.  If @var{force}, it should
27590 really delete all the articles in the group, and then delete the group
27591 itself.  (If there is such a thing as ``the group itself''.)
27592
27593 There should be no data returned.
27594
27595
27596 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
27597
27598 This function should rename @var{group} into @var{new-name}.  All
27599 articles in @var{group} should move to @var{new-name}.
27600
27601 There should be no data returned.
27602
27603 @end table
27604
27605
27606 @node Error Messaging
27607 @subsubsection Error Messaging
27608
27609 @findex nnheader-report
27610 @findex nnheader-get-report
27611 The back ends should use the function @code{nnheader-report} to report
27612 error conditions---they should not raise errors when they aren't able to
27613 perform a request.  The first argument to this function is the back end
27614 symbol, and the rest are interpreted as arguments to @code{format} if
27615 there are multiple of them, or just a string if there is one of them.
27616 This function must always returns @code{nil}.
27617
27618 @lisp
27619 (nnheader-report 'nnchoke "You did something totally bogus")
27620
27621 (nnheader-report 'nnchoke "Could not request group %s" group)
27622 @end lisp
27623
27624 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
27625 @code{nil} back from a server, and this function returns the most
27626 recently reported message for the back end in question.  This function
27627 takes one argument---the server symbol.
27628
27629 Internally, these functions access @var{back-end}@code{-status-string},
27630 so the @code{nnchoke} back end will have its error message stored in
27631 @code{nnchoke-status-string}.
27632
27633
27634 @node Writing New Back Ends
27635 @subsubsection Writing New Back Ends
27636
27637 Many back ends are quite similar.  @code{nnml} is just like
27638 @code{nnspool}, but it allows you to edit the articles on the server.
27639 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
27640 and it doesn't maintain overview databases.  @code{nndir} is just like
27641 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
27642 editing articles.
27643
27644 It would make sense if it were possible to ``inherit'' functions from
27645 back ends when writing new back ends.  And, indeed, you can do that if you
27646 want to.  (You don't have to if you don't want to, of course.)
27647
27648 All the back ends declare their public variables and functions by using a
27649 package called @code{nnoo}.
27650
27651 To inherit functions from other back ends (and allow other back ends to
27652 inherit functions from the current back end), you should use the
27653 following macros:
27654
27655 @table @code
27656
27657 @item nnoo-declare
27658 This macro declares the first parameter to be a child of the subsequent
27659 parameters.  For instance:
27660
27661 @lisp
27662 (nnoo-declare nndir
27663   nnml nnmh)
27664 @end lisp
27665
27666 @code{nndir} has declared here that it intends to inherit functions from
27667 both @code{nnml} and @code{nnmh}.
27668
27669 @item defvoo
27670 This macro is equivalent to @code{defvar}, but registers the variable as
27671 a public server variable.  Most state-oriented variables should be
27672 declared with @code{defvoo} instead of @code{defvar}.
27673
27674 In addition to the normal @code{defvar} parameters, it takes a list of
27675 variables in the parent back ends to map the variable to when executing
27676 a function in those back ends.
27677
27678 @lisp
27679 (defvoo nndir-directory nil
27680   "Where nndir will look for groups."
27681   nnml-current-directory nnmh-current-directory)
27682 @end lisp
27683
27684 This means that @code{nnml-current-directory} will be set to
27685 @code{nndir-directory} when an @code{nnml} function is called on behalf
27686 of @code{nndir}.  (The same with @code{nnmh}.)
27687
27688 @item nnoo-define-basics
27689 This macro defines some common functions that almost all back ends should
27690 have.
27691
27692 @lisp
27693 (nnoo-define-basics nndir)
27694 @end lisp
27695
27696 @item deffoo
27697 This macro is just like @code{defun} and takes the same parameters.  In
27698 addition to doing the normal @code{defun} things, it registers the
27699 function as being public so that other back ends can inherit it.
27700
27701 @item nnoo-map-functions
27702 This macro allows mapping of functions from the current back end to
27703 functions from the parent back ends.
27704
27705 @lisp
27706 (nnoo-map-functions nndir
27707   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27708   (nnmh-request-article 0 nndir-current-group 0 0))
27709 @end lisp
27710
27711 This means that when @code{nndir-retrieve-headers} is called, the first,
27712 third, and fourth parameters will be passed on to
27713 @code{nnml-retrieve-headers}, while the second parameter is set to the
27714 value of @code{nndir-current-group}.
27715
27716 @item nnoo-import
27717 This macro allows importing functions from back ends.  It should be the
27718 last thing in the source file, since it will only define functions that
27719 haven't already been defined.
27720
27721 @lisp
27722 (nnoo-import nndir
27723   (nnmh
27724    nnmh-request-list
27725    nnmh-request-newgroups)
27726   (nnml))
27727 @end lisp
27728
27729 This means that calls to @code{nndir-request-list} should just be passed
27730 on to @code{nnmh-request-list}, while all public functions from
27731 @code{nnml} that haven't been defined in @code{nndir} yet should be
27732 defined now.
27733
27734 @end table
27735
27736 Below is a slightly shortened version of the @code{nndir} back end.
27737
27738 @lisp
27739 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27740 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27741
27742 ;;; @r{Code:}
27743
27744 (require 'nnheader)
27745 (require 'nnmh)
27746 (require 'nnml)
27747 (require 'nnoo)
27748 (eval-when-compile (require 'cl))
27749
27750 (nnoo-declare nndir
27751   nnml nnmh)
27752
27753 (defvoo nndir-directory nil
27754   "Where nndir will look for groups."
27755   nnml-current-directory nnmh-current-directory)
27756
27757 (defvoo nndir-nov-is-evil nil
27758   "*Non-nil means that nndir will never retrieve NOV headers."
27759   nnml-nov-is-evil)
27760
27761 (defvoo nndir-current-group ""
27762   nil
27763   nnml-current-group nnmh-current-group)
27764 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27765 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27766
27767 (defvoo nndir-status-string "" nil nnmh-status-string)
27768 (defconst nndir-version "nndir 1.0")
27769
27770 ;;; @r{Interface functions.}
27771
27772 (nnoo-define-basics nndir)
27773
27774 (deffoo nndir-open-server (server &optional defs)
27775   (setq nndir-directory
27776         (or (cadr (assq 'nndir-directory defs))
27777             server))
27778   (unless (assq 'nndir-directory defs)
27779     (push `(nndir-directory ,server) defs))
27780   (push `(nndir-current-group
27781           ,(file-name-nondirectory
27782             (directory-file-name nndir-directory)))
27783         defs)
27784   (push `(nndir-top-directory
27785           ,(file-name-directory (directory-file-name nndir-directory)))
27786         defs)
27787   (nnoo-change-server 'nndir server defs))
27788
27789 (nnoo-map-functions nndir
27790   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27791   (nnmh-request-article 0 nndir-current-group 0 0)
27792   (nnmh-request-group nndir-current-group 0 0)
27793   (nnmh-close-group nndir-current-group 0))
27794
27795 (nnoo-import nndir
27796   (nnmh
27797    nnmh-status-message
27798    nnmh-request-list
27799    nnmh-request-newgroups))
27800
27801 (provide 'nndir)
27802 @end lisp
27803
27804
27805 @node Hooking New Back Ends Into Gnus
27806 @subsubsection Hooking New Back Ends Into Gnus
27807
27808 @vindex gnus-valid-select-methods
27809 @findex gnus-declare-backend
27810 Having Gnus start using your new back end is rather easy---you just
27811 declare it with the @code{gnus-declare-backend} functions.  This will
27812 enter the back end into the @code{gnus-valid-select-methods} variable.
27813
27814 @code{gnus-declare-backend} takes two parameters---the back end name and
27815 an arbitrary number of @dfn{abilities}.
27816
27817 Here's an example:
27818
27819 @lisp
27820 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27821 @end lisp
27822
27823 The above line would then go in the @file{nnchoke.el} file.
27824
27825 The abilities can be:
27826
27827 @table @code
27828 @item mail
27829 This is a mailish back end---followups should (probably) go via mail.
27830 @item post
27831 This is a newsish back end---followups should (probably) go via news.
27832 @item post-mail
27833 This back end supports both mail and news.
27834 @item none
27835 This is neither a post nor mail back end---it's something completely
27836 different.
27837 @item respool
27838 It supports respooling---or rather, it is able to modify its source
27839 articles and groups.
27840 @item address
27841 The name of the server should be in the virtual server name.  This is
27842 true for almost all back ends.
27843 @item prompt-address
27844 The user should be prompted for an address when doing commands like
27845 @kbd{B} in the group buffer.  This is true for back ends like
27846 @code{nntp}, but not @code{nnmbox}, for instance.
27847 @end table
27848
27849
27850 @node Mail-like Back Ends
27851 @subsubsection Mail-like Back Ends
27852
27853 One of the things that separate the mail back ends from the rest of the
27854 back ends is the heavy dependence by most of the mail back ends on
27855 common functions in @file{nnmail.el}.  For instance, here's the
27856 definition of @code{nnml-request-scan}:
27857
27858 @lisp
27859 (deffoo nnml-request-scan (&optional group server)
27860   (setq nnml-article-file-alist nil)
27861   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27862 @end lisp
27863
27864 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27865 and @code{nnmail} takes care of all the moving and splitting of the
27866 mail.
27867
27868 This function takes four parameters.
27869
27870 @table @var
27871 @item method
27872 This should be a symbol to designate which back end is responsible for
27873 the call.
27874
27875 @item exit-function
27876 This function should be called after the splitting has been performed.
27877
27878 @item temp-directory
27879 Where the temporary files should be stored.
27880
27881 @item group
27882 This optional argument should be a group name if the splitting is to be
27883 performed for one group only.
27884 @end table
27885
27886 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27887 save each article.  @var{back-end}@code{-active-number} will be called to
27888 find the article number assigned to this article.
27889
27890 The function also uses the following variables:
27891 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27892 this back end); and @var{back-end}@code{-group-alist} and
27893 @var{back-end}@code{-active-file} to generate the new active file.
27894 @var{back-end}@code{-group-alist} should be a group-active alist, like
27895 this:
27896
27897 @example
27898 (("a-group" (1 . 10))
27899  ("some-group" (34 . 39)))
27900 @end example
27901
27902
27903 @node Score File Syntax
27904 @subsection Score File Syntax
27905
27906 Score files are meant to be easily parseable, but yet extremely
27907 mallable.  It was decided that something that had the same read syntax
27908 as an Emacs Lisp list would fit that spec.
27909
27910 Here's a typical score file:
27911
27912 @lisp
27913 (("summary"
27914   ("win95" -10000 nil s)
27915   ("Gnus"))
27916  ("from"
27917   ("Lars" -1000))
27918  (mark -100))
27919 @end lisp
27920
27921 BNF definition of a score file:
27922
27923 @example
27924 score-file      = "" / "(" *element ")"
27925 element         = rule / atom
27926 rule            = string-rule / number-rule / date-rule
27927 string-rule     = "(" quote string-header quote space *string-match ")"
27928 number-rule     = "(" quote number-header quote space *number-match ")"
27929 date-rule       = "(" quote date-header quote space *date-match ")"
27930 quote           = <ascii 34>
27931 string-header   = "subject" / "from" / "references" / "message-id" /
27932                   "xref" / "body" / "head" / "all" / "followup"
27933 number-header   = "lines" / "chars"
27934 date-header     = "date"
27935 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27936                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27937 score           = "nil" / <integer>
27938 date            = "nil" / <natural number>
27939 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27940                   "r" / "regex" / "R" / "Regex" /
27941                   "e" / "exact" / "E" / "Exact" /
27942                   "f" / "fuzzy" / "F" / "Fuzzy"
27943 number-match    = "(" <integer> [ "" / [ space score [ "" /
27944                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27945 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27946 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27947                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27948 date-match-t    = "nil" / "at" / "before" / "after"
27949 atom            = "(" [ required-atom / optional-atom ] ")"
27950 required-atom   = mark / expunge / mark-and-expunge / files /
27951                   exclude-files / read-only / touched
27952 optional-atom   = adapt / local / eval
27953 mark            = "mark" space nil-or-number
27954 nil-or-number   = "nil" / <integer>
27955 expunge         = "expunge" space nil-or-number
27956 mark-and-expunge = "mark-and-expunge" space nil-or-number
27957 files           = "files" *[ space <string> ]
27958 exclude-files   = "exclude-files" *[ space <string> ]
27959 read-only       = "read-only" [ space "nil" / space "t" ]
27960 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27961 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27962 local           = "local" *[ space "(" <string> space <form> ")" ]
27963 eval            = "eval" space <form>
27964 space           = *[ " " / <TAB> / <NEWLINE> ]
27965 @end example
27966
27967 Any unrecognized elements in a score file should be ignored, but not
27968 discarded.
27969
27970 As you can see, white space is needed, but the type and amount of white
27971 space is irrelevant.  This means that formatting of the score file is
27972 left up to the programmer---if it's simpler to just spew it all out on
27973 one looong line, then that's ok.
27974
27975 The meaning of the various atoms are explained elsewhere in this
27976 manual (@pxref{Score File Format}).
27977
27978
27979 @node Headers
27980 @subsection Headers
27981
27982 Internally Gnus uses a format for storing article headers that
27983 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27984 almost suspect that the author looked at the @acronym{NOV} specification and
27985 just shamelessly @emph{stole} the entire thing, and one would be right.
27986
27987 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27988 RFC 1036 to talk about lines in the head of an article (e.g.,
27989 @code{From}).  It is used by many people as a synonym for
27990 ``head''---``the header and the body''.  (That should be avoided, in my
27991 opinion.)  And Gnus uses a format internally that it calls ``header'',
27992 which is what I'm talking about here.  This is a 9-element vector,
27993 basically, with each header (ouch) having one slot.
27994
27995 These slots are, in order: @code{number}, @code{subject}, @code{from},
27996 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27997 @code{xref}, and @code{extra}.  There are macros for accessing and
27998 setting these slots---they all have predictable names beginning with
27999 @code{mail-header-} and @code{mail-header-set-}, respectively.
28000
28001 All these slots contain strings, except the @code{extra} slot, which
28002 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
28003
28004
28005 @node Ranges
28006 @subsection Ranges
28007
28008 @sc{gnus} introduced a concept that I found so useful that I've started
28009 using it a lot and have elaborated on it greatly.
28010
28011 The question is simple: If you have a large amount of objects that are
28012 identified by numbers (say, articles, to take a @emph{wild} example)
28013 that you want to qualify as being ``included'', a normal sequence isn't
28014 very useful.  (A 200,000 length sequence is a bit long-winded.)
28015
28016 The solution is as simple as the question: You just collapse the
28017 sequence.
28018
28019 @example
28020 (1 2 3 4 5 6 10 11 12)
28021 @end example
28022
28023 is transformed into
28024
28025 @example
28026 ((1 . 6) (10 . 12))
28027 @end example
28028
28029 To avoid having those nasty @samp{(13 . 13)} elements to denote a
28030 lonesome object, a @samp{13} is a valid element:
28031
28032 @example
28033 ((1 . 6) 7 (10 . 12))
28034 @end example
28035
28036 This means that comparing two ranges to find out whether they are equal
28037 is slightly tricky:
28038
28039 @example
28040 ((1 . 5) 7 8 (10 . 12))
28041 @end example
28042
28043 and
28044
28045 @example
28046 ((1 . 5) (7 . 8) (10 . 12))
28047 @end example
28048
28049 are equal.  In fact, any non-descending list is a range:
28050
28051 @example
28052 (1 2 3 4 5)
28053 @end example
28054
28055 is a perfectly valid range, although a pretty long-winded one.  This is
28056 also valid:
28057
28058 @example
28059 (1 . 5)
28060 @end example
28061
28062 and is equal to the previous range.
28063
28064 Here's a BNF definition of ranges.  Of course, one must remember the
28065 semantic requirement that the numbers are non-descending.  (Any number
28066 of repetition of the same number is allowed, but apt to disappear in
28067 range handling.)
28068
28069 @example
28070 range           = simple-range / normal-range
28071 simple-range    = "(" number " . " number ")"
28072 normal-range    = "(" start-contents ")"
28073 contents        = "" / simple-range *[ " " contents ] /
28074                   number *[ " " contents ]
28075 @end example
28076
28077 Gnus currently uses ranges to keep track of read articles and article
28078 marks.  I plan on implementing a number of range operators in C if The
28079 Powers That Be are willing to let me.  (I haven't asked yet, because I
28080 need to do some more thinking on what operators I need to make life
28081 totally range-based without ever having to convert back to normal
28082 sequences.)
28083
28084
28085 @node Group Info
28086 @subsection Group Info
28087
28088 Gnus stores all permanent info on groups in a @dfn{group info} list.
28089 This list is from three to six elements (or more) long and exhaustively
28090 describes the group.
28091
28092 Here are two example group infos; one is a very simple group while the
28093 second is a more complex one:
28094
28095 @example
28096 ("no.group" 5 ((1 . 54324)))
28097
28098 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
28099                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
28100                 (nnml "")
28101                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
28102 @end example
28103
28104 The first element is the @dfn{group name}---as Gnus knows the group,
28105 anyway.  The second element is the @dfn{subscription level}, which
28106 normally is a small integer.  (It can also be the @dfn{rank}, which is a
28107 cons cell where the @code{car} is the level and the @code{cdr} is the
28108 score.)  The third element is a list of ranges of read articles.  The
28109 fourth element is a list of lists of article marks of various kinds.
28110 The fifth element is the select method (or virtual server, if you like).
28111 The sixth element is a list of @dfn{group parameters}, which is what
28112 this section is about.
28113
28114 Any of the last three elements may be missing if they are not required.
28115 In fact, the vast majority of groups will normally only have the first
28116 three elements, which saves quite a lot of cons cells.
28117
28118 Here's a BNF definition of the group info format:
28119
28120 @example
28121 info          = "(" group space ralevel space read
28122                 [ "" / [ space marks-list [ "" / [ space method [ "" /
28123                 space parameters ] ] ] ] ] ")"
28124 group         = quote <string> quote
28125 ralevel       = rank / level
28126 level         = <integer in the range of 1 to inf>
28127 rank          = "(" level "." score ")"
28128 score         = <integer in the range of 1 to inf>
28129 read          = range
28130 marks-lists   = nil / "(" *marks ")"
28131 marks         = "(" <string> range ")"
28132 method        = "(" <string> *elisp-forms ")"
28133 parameters    = "(" *elisp-forms ")"
28134 @end example
28135
28136 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
28137 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
28138 in pseudo-BNF.
28139
28140 If you have a Gnus info and want to access the elements, Gnus offers a
28141 series of macros for getting/setting these elements.
28142
28143 @table @code
28144 @item gnus-info-group
28145 @itemx gnus-info-set-group
28146 @findex gnus-info-group
28147 @findex gnus-info-set-group
28148 Get/set the group name.
28149
28150 @item gnus-info-rank
28151 @itemx gnus-info-set-rank
28152 @findex gnus-info-rank
28153 @findex gnus-info-set-rank
28154 Get/set the group rank (@pxref{Group Score}).
28155
28156 @item gnus-info-level
28157 @itemx gnus-info-set-level
28158 @findex gnus-info-level
28159 @findex gnus-info-set-level
28160 Get/set the group level.
28161
28162 @item gnus-info-score
28163 @itemx gnus-info-set-score
28164 @findex gnus-info-score
28165 @findex gnus-info-set-score
28166 Get/set the group score (@pxref{Group Score}).
28167
28168 @item gnus-info-read
28169 @itemx gnus-info-set-read
28170 @findex gnus-info-read
28171 @findex gnus-info-set-read
28172 Get/set the ranges of read articles.
28173
28174 @item gnus-info-marks
28175 @itemx gnus-info-set-marks
28176 @findex gnus-info-marks
28177 @findex gnus-info-set-marks
28178 Get/set the lists of ranges of marked articles.
28179
28180 @item gnus-info-method
28181 @itemx gnus-info-set-method
28182 @findex gnus-info-method
28183 @findex gnus-info-set-method
28184 Get/set the group select method.
28185
28186 @item gnus-info-params
28187 @itemx gnus-info-set-params
28188 @findex gnus-info-params
28189 @findex gnus-info-set-params
28190 Get/set the group parameters.
28191 @end table
28192
28193 All the getter functions take one parameter---the info list.  The setter
28194 functions take two parameters---the info list and the new value.
28195
28196 The last three elements in the group info aren't mandatory, so it may be
28197 necessary to extend the group info before setting the element.  If this
28198 is necessary, you can just pass on a non-@code{nil} third parameter to
28199 the three final setter functions to have this happen automatically.
28200
28201
28202 @node Extended Interactive
28203 @subsection Extended Interactive
28204 @cindex interactive
28205 @findex gnus-interactive
28206
28207 Gnus extends the standard Emacs @code{interactive} specification
28208 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
28209 Prefixes}).  Here's an example of how this is used:
28210
28211 @lisp
28212 (defun gnus-summary-increase-score (&optional score symp)
28213   (interactive (gnus-interactive "P\ny"))
28214   ...
28215   )
28216 @end lisp
28217
28218 The best thing to do would have been to implement
28219 @code{gnus-interactive} as a macro which would have returned an
28220 @code{interactive} form, but this isn't possible since Emacs checks
28221 whether a function is interactive or not by simply doing an @code{assq}
28222 on the lambda form.  So, instead we have @code{gnus-interactive}
28223 function that takes a string and returns values that are usable to
28224 @code{interactive}.
28225
28226 This function accepts (almost) all normal @code{interactive} specs, but
28227 adds a few more.
28228
28229 @table @samp
28230 @item y
28231 @vindex gnus-current-prefix-symbol
28232 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
28233 variable.
28234
28235 @item Y
28236 @vindex gnus-current-prefix-symbols
28237 A list of the current symbolic prefixes---the
28238 @code{gnus-current-prefix-symbol} variable.
28239
28240 @item A
28241 The current article number---the @code{gnus-summary-article-number}
28242 function.
28243
28244 @item H
28245 The current article header---the @code{gnus-summary-article-header}
28246 function.
28247
28248 @item g
28249 The current group name---the @code{gnus-group-group-name}
28250 function.
28251
28252 @end table
28253
28254
28255 @node Emacs/XEmacs Code
28256 @subsection Emacs/XEmacs Code
28257 @cindex XEmacs
28258 @cindex Emacsen
28259
28260 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
28261 platforms must be the primary one.  I chose Emacs.  Not because I don't
28262 like XEmacs or Mule, but because it comes first alphabetically.
28263
28264 This means that Gnus will byte-compile under Emacs with nary a warning,
28265 while XEmacs will pump out gigabytes of warnings while byte-compiling.
28266 As I use byte-compilation warnings to help me root out trivial errors in
28267 Gnus, that's very useful.
28268
28269 I've also consistently used Emacs function interfaces, but have used
28270 Gnusey aliases for the functions.  To take an example:  Emacs defines a
28271 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
28272 function.  I then define a function called @code{gnus-run-at-time} that
28273 takes the same parameters as the Emacs @code{run-at-time}.  When running
28274 Gnus under Emacs, the former function is just an alias for the latter.
28275 However, when running under XEmacs, the former is an alias for the
28276 following function:
28277
28278 @lisp
28279 (defun gnus-xmas-run-at-time (time repeat function &rest args)
28280   (start-itimer
28281    "gnus-run-at-time"
28282    `(lambda ()
28283       (,function ,@@args))
28284    time repeat))
28285 @end lisp
28286
28287 This sort of thing has been done for bunches of functions.  Gnus does
28288 not redefine any native Emacs functions while running under XEmacs---it
28289 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
28290 all over.
28291
28292 In the cases where the XEmacs function interface was obviously cleaner,
28293 I used it instead.  For example @code{gnus-region-active-p} is an alias
28294 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
28295
28296 Of course, I could have chosen XEmacs as my native platform and done
28297 mapping functions the other way around.  But I didn't.  The performance
28298 hit these indirections impose on Gnus under XEmacs should be slight.
28299
28300
28301 @node Various File Formats
28302 @subsection Various File Formats
28303
28304 @menu
28305 * Active File Format::          Information on articles and groups available.
28306 * Newsgroups File Format::      Group descriptions.
28307 @end menu
28308
28309
28310 @node Active File Format
28311 @subsubsection Active File Format
28312
28313 The active file lists all groups available on the server in
28314 question.  It also lists the highest and lowest current article numbers
28315 in each group.
28316
28317 Here's an excerpt from a typical active file:
28318
28319 @example
28320 soc.motss 296030 293865 y
28321 alt.binaries.pictures.fractals 3922 3913 n
28322 comp.sources.unix 1605 1593 m
28323 comp.binaries.ibm.pc 5097 5089 y
28324 no.general 1000 900 y
28325 @end example
28326
28327 Here's a pseudo-BNF definition of this file:
28328
28329 @example
28330 active      = *group-line
28331 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
28332 group       = <non-white-space string>
28333 spc         = " "
28334 high-number = <non-negative integer>
28335 low-number  = <positive integer>
28336 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
28337 @end example
28338
28339 For a full description of this file, see the manual pages for
28340 @samp{innd}, in particular @samp{active(5)}.
28341
28342
28343 @node Newsgroups File Format
28344 @subsubsection Newsgroups File Format
28345
28346 The newsgroups file lists groups along with their descriptions.  Not all
28347 groups on the server have to be listed,  and not all groups in the file
28348 have to exist on the server.  The file is meant purely as information to
28349 the user.
28350
28351 The format is quite simple; a group name, a tab, and the description.
28352 Here's the definition:
28353
28354 @example
28355 newsgroups    = *line
28356 line          = group tab description <NEWLINE>
28357 group         = <non-white-space string>
28358 tab           = <TAB>
28359 description   = <string>
28360 @end example
28361
28362
28363 @page
28364 @node Emacs for Heathens
28365 @section Emacs for Heathens
28366
28367 Believe it or not, but some people who use Gnus haven't really used
28368 Emacs much before they embarked on their journey on the Gnus Love Boat.
28369 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
28370 region'', and ``set @code{gnus-flargblossen} to an alist where the key
28371 is a regexp that is used for matching on the group name'' are magical
28372 phrases with little or no meaning, then this appendix is for you.  If
28373 you are already familiar with Emacs, just ignore this and go fondle your
28374 cat instead.
28375
28376 @menu
28377 * Keystrokes::                  Entering text and executing commands.
28378 * Emacs Lisp::                  The built-in Emacs programming language.
28379 @end menu
28380
28381
28382 @node Keystrokes
28383 @subsection Keystrokes
28384
28385 @itemize @bullet
28386 @item
28387 Q: What is an experienced Emacs user?
28388
28389 @item
28390 A: A person who wishes that the terminal had pedals.
28391 @end itemize
28392
28393 Yes, when you use Emacs, you are apt to use the control key, the shift
28394 key and the meta key a lot.  This is very annoying to some people
28395 (notably @code{vi}le users), and the rest of us just love the hell out
28396 of it.  Just give up and submit.  Emacs really does stand for
28397 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
28398 may have heard from other disreputable sources (like the Emacs author).
28399
28400 The shift keys are normally located near your pinky fingers, and are
28401 normally used to get capital letters and stuff.  You probably use it all
28402 the time.  The control key is normally marked ``CTRL'' or something like
28403 that.  The meta key is, funnily enough, never marked as such on any
28404 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
28405 which is the meta key on this keyboard.  It's usually located somewhere
28406 to the left hand side of the keyboard, usually on the bottom row.
28407
28408 Now, us Emacs people don't say ``press the meta-control-m key'',
28409 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
28410 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
28411 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
28412 down the control key, and hold it down while you press @kbd{k}''.
28413 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
28414 the control key and then press @kbd{k}''.  Simple, ay?
28415
28416 This is somewhat complicated by the fact that not all keyboards have a
28417 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
28418 means ``press escape, release escape, press @kbd{k}''.  That's much more
28419 work than if you have a meta key, so if that's the case, I respectfully
28420 suggest you get a real keyboard with a meta key.  You can't live without
28421 it.
28422
28423
28424
28425 @node Emacs Lisp
28426 @subsection Emacs Lisp
28427
28428 Emacs is the King of Editors because it's really a Lisp interpreter.
28429 Each and every key you tap runs some Emacs Lisp code snippet, and since
28430 Emacs Lisp is an interpreted language, that means that you can configure
28431 any key to run any arbitrary code.  You just, like, do it.
28432
28433 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
28434 functions.  (These are byte-compiled for speed, but it's still
28435 interpreted.)  If you decide that you don't like the way Gnus does
28436 certain things, it's trivial to have it do something a different way.
28437 (Well, at least if you know how to write Lisp code.)  However, that's
28438 beyond the scope of this manual, so we are simply going to talk about
28439 some common constructs that you normally use in your @file{.emacs} file
28440 to customize Gnus.
28441
28442 If you want to set the variable @code{gnus-florgbnize} to four (4), you
28443 write the following:
28444
28445 @lisp
28446 (setq gnus-florgbnize 4)
28447 @end lisp
28448
28449 This function (really ``special form'') @code{setq} is the one that can
28450 set a variable to some value.  This is really all you need to know.  Now
28451 you can go and fill your @file{.emacs} file with lots of these to change
28452 how Gnus works.
28453
28454 If you have put that thing in your @file{.emacs} file, it will be read
28455 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
28456 start Emacs.  If you want to change the variable right away, simply say
28457 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
28458 previous ``form'', which is a simple @code{setq} statement here.
28459
28460 Go ahead---just try it, if you're located at your Emacs.  After you
28461 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
28462 is the return value of the form you @code{eval}ed.
28463
28464 Some pitfalls:
28465
28466 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
28467 that means:
28468
28469 @lisp
28470 (setq gnus-read-active-file 'some)
28471 @end lisp
28472
28473 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
28474 @samp{nntp.ifi.uio.no}'', that means:
28475
28476 @lisp
28477 (setq gnus-nntp-server "nntp.ifi.uio.no")
28478 @end lisp
28479
28480 So be careful not to mix up strings (the latter) with symbols (the
28481 former).  The manual is unambiguous, but it can be confusing.
28482
28483 @page
28484 @include gnus-faq.texi
28485
28486 @node Index
28487 @chapter Index
28488 @printindex cp
28489
28490 @node Key Index
28491 @chapter Key Index
28492 @printindex ky
28493
28494 @summarycontents
28495 @contents
28496 @bye
28497
28498 @iftex
28499 @iflatex
28500 \end{document}
28501 @end iflatex
28502 @end iftex
28503
28504 @c Local Variables:
28505 @c mode: texinfo
28506 @c coding: iso-8859-1
28507 @c End:
28508
28509 @ignore
28510    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
28511 @end ignore