(Searching, nnir, nnmairix): New stub nodes.
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8
9 @documentencoding ISO-8859-1
10
11 @copying
12 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
13 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
14
15 @quotation
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.2 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover texts being ``A GNU
20 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
21 license is included in the section entitled ``GNU Free Documentation
22 License'' in the Emacs manual.
23
24 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
25 this GNU Manual, like GNU software.  Copies published by the Free
26 Software Foundation raise funds for GNU development.''
27
28 This document is part of a collection distributed under the GNU Free
29 Documentation License.  If you want to distribute this document
30 separately from the collection, you can do so by adding a copy of the
31 license to the document, as described in section 6 of the license.
32 @end quotation
33 @end copying
34
35 @iftex
36 @iflatex
37 \documentclass[twoside,a4paper,openright,11pt]{book}
38 \usepackage[latin1]{inputenc}
39 \usepackage{pagestyle}
40 \usepackage{epsfig}
41 \usepackage{pixidx}
42 \input{gnusconfig.tex}
43
44 \ifx\pdfoutput\undefined
45 \else
46 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
47 \usepackage{thumbpdf}
48 \pdfcompresslevel=9
49 \fi
50
51 \makeindex
52 \begin{document}
53
54 % Adjust ../Makefile.in if you change the following line:
55 \newcommand{\gnusversionname}{No Gnus v0.11}
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 @c Adjust ../Makefile.in if you change the following line:
365 This manual corresponds to No Gnus v0.11.
366
367 @end ifinfo
368
369 @iftex
370
371 @iflatex
372 \tableofcontents
373 \gnuscleardoublepage
374 @end iflatex
375
376 Gnus is the advanced, self-documenting, customizable, extensible
377 unreal-time newsreader for GNU Emacs.
378
379 Oops.  That sounds oddly familiar, so let's start over again to avoid
380 being accused of plagiarism:
381
382 Gnus is a message-reading laboratory.  It will let you look at just
383 about anything as if it were a newsgroup.  You can read mail with it,
384 you can browse directories with it, you can @code{ftp} with it---you
385 can even read news with it!
386
387 Gnus tries to empower people who read news the same way Emacs empowers
388 people who edit text.  Gnus sets no limits to what the user should be
389 allowed to do.  Users are encouraged to extend Gnus to make it behave
390 like they want it to behave.  A program should not control people;
391 people should be empowered to do what they want by using (or abusing)
392 the program.
393
394 @c Adjust ../Makefile.in if you change the following line:
395 This manual corresponds to No Gnus v0.11.
396
397 @heading Other related manuals
398 @itemize
399 @item Message manual: Composing messages
400 @item Emacs-MIME:     Composing messages; @acronym{MIME}-specific parts.
401 @item Sieve:          Managing Sieve scripts in Emacs.
402 @item PGG:            @acronym{PGP/MIME} with Gnus.
403 @item SASL:           @acronym{SASL} authentication in Emacs.
404 @end itemize
405
406 @end iftex
407
408 @menu
409 * Starting Up::              Finding news can be a pain.
410 * Group Buffer::             Selecting, subscribing and killing groups.
411 * Summary Buffer::           Reading, saving and posting articles.
412 * Article Buffer::           Displaying and handling articles.
413 * Composing Messages::       Information on sending mail and news.
414 * Select Methods::           Gnus reads all messages from various select methods.
415 * Scoring::                  Assigning values to articles.
416 * Various::                  General purpose settings.
417 * The End::                  Farewell and goodbye.
418 * Appendices::               Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
419 * GNU Free Documentation License:: The license for this documentation.
420 * Index::                    Variable, function and concept index.
421 * Key Index::                Key Index.
422
423 Other related manuals
424
425 * Message:(message).         Composing messages.
426 * Emacs-MIME:(emacs-mime).   Composing messages; @acronym{MIME}-specific parts.
427 * Sieve:(sieve).             Managing Sieve scripts in Emacs.
428 * PGG:(pgg).                 @acronym{PGP/MIME} with Gnus.
429 * SASL:(sasl).               @acronym{SASL} authentication in Emacs.
430
431 @detailmenu
432  --- The Detailed Node Listing ---
433
434 Starting Gnus
435
436 * Finding the News::            Choosing a method for getting news.
437 * The First Time::              What does Gnus do the first time you start it?
438 * The Server is Down::          How can I read my mail then?
439 * Slave Gnusae::                You can have more than one Gnus active at a time.
440 * Fetching a Group::            Starting Gnus just to read a group.
441 * New Groups::                  What is Gnus supposed to do with new groups?
442 * Changing Servers::            You may want to move from one server to another.
443 * Startup Files::               Those pesky startup files---@file{.newsrc}.
444 * Auto Save::                   Recovering from a crash.
445 * The Active File::             Reading the active file over a slow line Takes Time.
446 * Startup Variables::           Other variables you might change.
447
448 New Groups
449
450 * Checking New Groups::         Determining what groups are new.
451 * Subscription Methods::        What Gnus should do with new groups.
452 * Filtering New Groups::        Making Gnus ignore certain new groups.
453
454 Group Buffer
455
456 * Group Buffer Format::         Information listed and how you can change it.
457 * Group Maneuvering::           Commands for moving in the group buffer.
458 * Selecting a Group::           Actually reading news.
459 * Subscription Commands::       Unsubscribing, killing, subscribing.
460 * Group Data::                  Changing the info for a group.
461 * Group Levels::                Levels? What are those, then?
462 * Group Score::                 A mechanism for finding out what groups you like.
463 * Marking Groups::              You can mark groups for later processing.
464 * Foreign Groups::              Creating and editing groups.
465 * Group Parameters::            Each group may have different parameters set.
466 * Listing Groups::              Gnus can list various subsets of the groups.
467 * Sorting Groups::              Re-arrange the group order.
468 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
469 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
470 * Exiting Gnus::                Stop reading news and get some work done.
471 * Group Topics::                A folding group mode divided into topics.
472 * Non-ASCII Group Names::       Accessing groups of non-English names.
473 * Misc Group Stuff::            Other stuff that you can to do.
474
475 Group Buffer Format
476
477 * Group Line Specification::    Deciding how the group buffer is to look.
478 * Group Mode Line Specification::  The group buffer mode line.
479 * Group Highlighting::          Having nice colors in the group buffer.
480
481 Group Topics
482
483 * Topic Commands::              Interactive E-Z commands.
484 * Topic Variables::             How to customize the topics the Lisp Way.
485 * Topic Sorting::               Sorting each topic individually.
486 * Topic Topology::              A map of the world.
487 * Topic Parameters::            Parameters that apply to all groups in a topic.
488
489 Misc Group Stuff
490
491 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
492 * Group Information::           Information and help on groups and Gnus.
493 * Group Timestamp::             Making Gnus keep track of when you last read a group.
494 * File Commands::               Reading and writing the Gnus files.
495 * Sieve Commands::              Managing Sieve scripts.
496
497 Summary Buffer
498
499 * Summary Buffer Format::       Deciding how the summary buffer is to look.
500 * Summary Maneuvering::         Moving around the summary buffer.
501 * Choosing Articles::           Reading articles.
502 * Paging the Article::          Scrolling the current article.
503 * Reply Followup and Post::     Posting articles.
504 * Delayed Articles::            Send articles at a later time.
505 * Marking Articles::            Marking articles as read, expirable, etc.
506 * Limiting::                    You can limit the summary buffer.
507 * Threading::                   How threads are made.
508 * Sorting the Summary Buffer::  How articles and threads are sorted.
509 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
510 * Article Caching::             You may store articles in a cache.
511 * Persistent Articles::         Making articles expiry-resistant.
512 * Sticky Articles::             Article buffers that are not reused.
513 * Article Backlog::             Having already read articles hang around.
514 * Saving Articles::             Ways of customizing article saving.
515 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
516 * Article Treatment::           The article buffer can be mangled at will.
517 * MIME Commands::               Doing MIMEy things with the articles.
518 * Charsets::                    Character set issues.
519 * Article Commands::            Doing various things with the article buffer.
520 * Summary Sorting::             Sorting the summary buffer in various ways.
521 * Finding the Parent::          No child support? Get the parent.
522 * Alternative Approaches::      Reading using non-default summaries.
523 * Tree Display::                A more visual display of threads.
524 * Mail Group Commands::         Some commands can only be used in mail groups.
525 * Various Summary Stuff::       What didn't fit anywhere else.
526 * Exiting the Summary Buffer::  Returning to the Group buffer,
527                                 or reselecting the current group.
528 * Crosspost Handling::          How crossposted articles are dealt with.
529 * Duplicate Suppression::       An alternative when crosspost handling fails.
530 * Security::                    Decrypt and Verify.
531 * Mailing List::                Mailing list minor mode.
532
533 Summary Buffer Format
534
535 * Summary Buffer Lines::        You can specify how summary lines should look.
536 * To From Newsgroups::          How to not display your own name.
537 * Summary Buffer Mode Line::    You can say how the mode line should look.
538 * Summary Highlighting::        Making the summary buffer all pretty and nice.
539
540 Choosing Articles
541
542 * Choosing Commands::           Commands for choosing articles.
543 * Choosing Variables::          Variables that influence these commands.
544
545 Reply, Followup and Post
546
547 * Summary Mail Commands::       Sending mail.
548 * Summary Post Commands::       Sending news.
549 * Summary Message Commands::    Other Message-related commands.
550 * Canceling and Superseding::
551
552 Marking Articles
553
554 * Unread Articles::             Marks for unread articles.
555 * Read Articles::               Marks for read articles.
556 * Other Marks::                 Marks that do not affect readedness.
557 * Setting Marks::               How to set and remove marks.
558 * Generic Marking Commands::    How to customize the marking.
559 * Setting Process Marks::       How to mark articles for later processing.
560
561 Threading
562
563 * Customizing Threading::       Variables you can change to affect the threading.
564 * Thread Commands::             Thread based commands in the summary buffer.
565
566 Customizing Threading
567
568 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
569 * Filling In Threads::          Making the threads displayed look fuller.
570 * More Threading::              Even more variables for fiddling with threads.
571 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
572
573 Decoding Articles
574
575 * Uuencoded Articles::          Uudecode articles.
576 * Shell Archives::              Unshar articles.
577 * PostScript Files::            Split PostScript.
578 * Other Files::                 Plain save and binhex.
579 * Decoding Variables::          Variables for a happy decoding.
580 * Viewing Files::               You want to look at the result of the decoding?
581
582 Decoding Variables
583
584 * Rule Variables::              Variables that say how a file is to be viewed.
585 * Other Decode Variables::      Other decode variables.
586 * Uuencoding and Posting::      Variables for customizing uuencoding.
587
588 Article Treatment
589
590 * Article Highlighting::        You want to make the article look like fruit salad.
591 * Article Fontisizing::         Making emphasized text look nice.
592 * Article Hiding::              You also want to make certain info go away.
593 * Article Washing::             Lots of way-neat functions to make life better.
594 * Article Header::              Doing various header transformations.
595 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
596 * Article Button Levels::       Controlling appearance of buttons.
597 * Article Date::                Grumble, UT!
598 * Article Display::             Display various stuff---X-Face, Picons, Smileys
599 * Article Signature::           What is a signature?
600 * Article Miscellanea::         Various other stuff.
601
602 Alternative Approaches
603
604 * Pick and Read::               First mark articles and then read them.
605 * Binary Groups::               Auto-decode all articles.
606
607 Various Summary Stuff
608
609 * Summary Group Information::   Information oriented commands.
610 * Searching for Articles::      Multiple article commands.
611 * Summary Generation Commands::
612 * Really Various Summary Commands::  Those pesky non-conformant commands.
613
614 Article Buffer
615
616 * Hiding Headers::              Deciding what headers should be displayed.
617 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
618 * Customizing Articles::        Tailoring the look of the articles.
619 * Article Keymap::              Keystrokes available in the article buffer.
620 * Misc Article::                Other stuff.
621
622 Composing Messages
623
624 * Mail::                        Mailing and replying.
625 * Posting Server::              What server should you post and mail via?
626 * POP before SMTP::             You cannot send a mail unless you read a mail.
627 * Mail and Post::               Mailing and posting at the same time.
628 * Archived Messages::           Where Gnus stores the messages you've sent.
629 * Posting Styles::              An easier way to specify who you are.
630 * Drafts::                      Postponing messages and rejected messages.
631 * Rejected Articles::           What happens if the server doesn't like your article?
632 * Signing and encrypting::      How to compose secure messages.
633
634 Select Methods
635
636 * Server Buffer::               Making and editing virtual servers.
637 * Getting News::                Reading USENET news with Gnus.
638 * Getting Mail::                Reading your personal mail with Gnus.
639 * Browsing the Web::            Getting messages from a plethora of Web sources.
640 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
641 * Other Sources::               Reading directories, files, SOUP packets.
642 * Combined Groups::             Combining groups into one group.
643 * Email Based Diary::           Using mails to manage diary events in Gnus.
644 * Gnus Unplugged::              Reading news and mail offline.
645
646 Server Buffer
647
648 * Server Buffer Format::        You can customize the look of this buffer.
649 * Server Commands::             Commands to manipulate servers.
650 * Example Methods::             Examples server specifications.
651 * Creating a Virtual Server::   An example session.
652 * Server Variables::            Which variables to set.
653 * Servers and Methods::         You can use server names as select methods.
654 * Unavailable Servers::         Some servers you try to contact may be down.
655
656 Getting News
657
658 * NNTP::                        Reading news from an @acronym{NNTP} server.
659 * News Spool::                  Reading news from the local spool.
660
661 @acronym{NNTP}
662
663 * Direct Functions::            Connecting directly to the server.
664 * Indirect Functions::          Connecting indirectly to the server.
665 * Common Variables::            Understood by several connection functions.
666 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
667
668 Getting Mail
669
670 * Mail in a Newsreader::        Important introductory notes.
671 * Getting Started Reading Mail::  A simple cookbook example.
672 * Splitting Mail::              How to create mail groups.
673 * Mail Sources::                How to tell Gnus where to get mail from.
674 * Mail Back End Variables::     Variables for customizing mail handling.
675 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
676 * Group Mail Splitting::        Use group customize to drive mail splitting.
677 * Incorporating Old Mail::      What about the old mail you have?
678 * Expiring Mail::               Getting rid of unwanted mail.
679 * Washing Mail::                Removing cruft from the mail you get.
680 * Duplicates::                  Dealing with duplicated mail.
681 * Not Reading Mail::            Using mail back ends for reading other files.
682 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
683
684 Mail Sources
685
686 * Mail Source Specifiers::      How to specify what a mail source is.
687 * Mail Source Customization::   Some variables that influence things.
688 * Fetching Mail::               Using the mail source specifiers.
689
690 Choosing a Mail Back End
691
692 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
693 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
694 * Mail Spool::                  Store your mail in a private spool?
695 * MH Spool::                    An mhspool-like back end.
696 * Maildir::                     Another one-file-per-message format.
697 * Mail Folders::                Having one file for each group.
698 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
699
700 Browsing the Web
701
702 * Archiving Mail::
703 * Web Searches::                Creating groups from articles that match a string.
704 * Slashdot::                    Reading the Slashdot comments.
705 * Ultimate::                    The Ultimate Bulletin Board systems.
706 * Web Archive::                 Reading mailing list archived on web.
707 * RSS::                         Reading RDF site summary.
708 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
709
710 @acronym{IMAP}
711
712 * Splitting in IMAP::           Splitting mail with nnimap.
713 * Expiring in IMAP::            Expiring mail with nnimap.
714 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
715 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
716 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
717 * Debugging IMAP::              What to do when things don't work.
718
719 Other Sources
720
721 * Directory Groups::            You can read a directory as if it was a newsgroup.
722 * Anything Groups::             Dired?  Who needs dired?
723 * Document Groups::             Single files can be the basis of a group.
724 * SOUP::                        Reading @sc{soup} packets ``offline''.
725 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
726
727 Document Groups
728
729 * Document Server Internals::   How to add your own document types.
730
731 SOUP
732
733 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
734 * SOUP Groups::                 A back end for reading @sc{soup} packets.
735 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
736
737 Combined Groups
738
739 * Virtual Groups::              Combining articles from many groups.
740 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
741
742 Email Based Diary
743
744 * The NNDiary Back End::        Basic setup and usage.
745 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
746 * Sending or Not Sending::      A final note on sending diary messages.
747
748 The NNDiary Back End
749
750 * Diary Messages::              What makes a message valid for nndiary.
751 * Running NNDiary::             NNDiary has two modes of operation.
752 * Customizing NNDiary::         Bells and whistles.
753
754 The Gnus Diary Library
755
756 * Diary Summary Line Format::           A nicer summary buffer line format.
757 * Diary Articles Sorting::              A nicer way to sort messages.
758 * Diary Headers Generation::            Not doing it manually.
759 * Diary Group Parameters::              Not handling them manually.
760
761 Gnus Unplugged
762
763 * Agent Basics::                How it all is supposed to work.
764 * Agent Categories::            How to tell the Gnus Agent what to download.
765 * Agent Commands::              New commands for all the buffers.
766 * Agent Visuals::               Ways that the agent may effect your summary buffer.
767 * Agent as Cache::              The Agent is a big cache too.
768 * Agent Expiry::                How to make old articles go away.
769 * Agent Regeneration::          How to recover from lost connections and other accidents.
770 * Agent and flags::             How the Agent maintains flags.
771 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
772 * Outgoing Messages::           What happens when you post/mail something?
773 * Agent Variables::             Customizing is fun.
774 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
775 * Batching Agents::             How to fetch news from a @code{cron} job.
776 * Agent Caveats::               What you think it'll do and what it does.
777
778 Agent Categories
779
780 * Category Syntax::             What a category looks like.
781 * Category Buffer::             A buffer for maintaining categories.
782 * Category Variables::          Customize'r'Us.
783
784 Agent Commands
785
786 * Group Agent Commands::        Configure groups and fetch their contents.
787 * Summary Agent Commands::      Manually select then fetch specific articles.
788 * Server Agent Commands::       Select the servers that are supported by the agent.
789
790 Scoring
791
792 * Summary Score Commands::      Adding score entries for the current group.
793 * Group Score Commands::        General score commands.
794 * Score Variables::             Customize your scoring.  (My, what terminology).
795 * Score File Format::           What a score file may contain.
796 * Score File Editing::          You can edit score files by hand as well.
797 * Adaptive Scoring::            Big Sister Gnus knows what you read.
798 * Home Score File::             How to say where new score entries are to go.
799 * Followups To Yourself::       Having Gnus notice when people answer you.
800 * Scoring On Other Headers::    Scoring on non-standard headers.
801 * Scoring Tips::                How to score effectively.
802 * Reverse Scoring::             That problem child of old is not problem.
803 * Global Score Files::          Earth-spanning, ear-splitting score files.
804 * Kill Files::                  They are still here, but they can be ignored.
805 * Converting Kill Files::       Translating kill files to score files.
806 * Advanced Scoring::            Using logical expressions to build score rules.
807 * Score Decays::                It can be useful to let scores wither away.
808
809 Advanced Scoring
810
811 * Advanced Scoring Syntax::     A definition.
812 * Advanced Scoring Examples::   What they look like.
813 * Advanced Scoring Tips::       Getting the most out of it.
814
815 Various
816
817 * Process/Prefix::              A convention used by many treatment commands.
818 * Interactive::                 Making Gnus ask you many questions.
819 * Symbolic Prefixes::           How to supply some Gnus functions with options.
820 * Formatting Variables::        You can specify what buffers should look like.
821 * Window Layout::               Configuring the Gnus buffer windows.
822 * Faces and Fonts::             How to change how faces look.
823 * Compilation::                 How to speed Gnus up.
824 * Mode Lines::                  Displaying information in the mode lines.
825 * Highlighting and Menus::      Making buffers look all nice and cozy.
826 * Buttons::                     Get tendinitis in ten easy steps!
827 * Daemons::                     Gnus can do things behind your back.
828 * NoCeM::                       How to avoid spam and other fatty foods.
829 * Undo::                        Some actions can be undone.
830 * Predicate Specifiers::        Specifying predicates.
831 * Moderation::                  What to do if you're a moderator.
832 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
833 * Fuzzy Matching::              What's the big fuzz?
834 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
835 * Spam Package::                A package for filtering and processing spam.
836 * Other modes::                 Interaction with other modes.
837 * Various Various::             Things that are really various.
838
839 Formatting Variables
840
841 * Formatting Basics::           A formatting variable is basically a format string.
842 * Mode Line Formatting::        Some rules about mode line formatting variables.
843 * Advanced Formatting::         Modifying output in various ways.
844 * User-Defined Specs::          Having Gnus call your own functions.
845 * Formatting Fonts::            Making the formatting look colorful and nice.
846 * Positioning Point::           Moving point to a position after an operation.
847 * Tabulation::                  Tabulating your output.
848 * Wide Characters::             Dealing with wide characters.
849
850 Image Enhancements
851
852 * X-Face::                      Display a funky, teensy black-and-white image.
853 * Face::                        Display a funkier, teensier colored image.
854 * Smileys::                     Show all those happy faces the way they were
855                                   meant to be shown.
856 * Picons::                      How to display pictures of what you're reading.
857 * XVarious::                    Other XEmacsy Gnusey variables.
858
859 Thwarting Email Spam
860
861 * The problem of spam::         Some background, and some solutions
862 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
863 * SpamAssassin::                How to use external anti-spam tools.
864 * Hashcash::                    Reduce spam by burning CPU time.
865
866 Spam Package
867
868 * Spam Package Introduction::
869 * Filtering Incoming Mail::
870 * Detecting Spam in Groups::
871 * Spam and Ham Processors::
872 * Spam Package Configuration Examples::
873 * Spam Back Ends::
874 * Extending the Spam package::
875 * Spam Statistics Package::
876
877 Spam Statistics Package
878
879 * Creating a spam-stat dictionary::
880 * Splitting mail using spam-stat::
881 * Low-level interface to the spam-stat dictionary::
882
883 Appendices
884
885 * XEmacs::                      Requirements for installing under XEmacs.
886 * History::                     How Gnus got where it is today.
887 * On Writing Manuals::          Why this is not a beginner's guide.
888 * Terminology::                 We use really difficult, like, words here.
889 * Customization::               Tailoring Gnus to your needs.
890 * Troubleshooting::             What you might try if things do not work.
891 * Gnus Reference Guide::        Rilly, rilly technical stuff.
892 * Emacs for Heathens::          A short introduction to Emacsian terms.
893 * Frequently Asked Questions::  The Gnus FAQ
894
895 History
896
897 * Gnus Versions::               What Gnus versions have been released.
898 * Other Gnus Versions::         Other Gnus versions that also have been released.
899 * Why?::                        What's the point of Gnus?
900 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
901 * Conformity::                  Gnus tries to conform to all standards.
902 * Emacsen::                     Gnus can be run on a few modern Emacsen.
903 * Gnus Development::            How Gnus is developed.
904 * Contributors::                Oodles of people.
905 * New Features::                Pointers to some of the new stuff in Gnus.
906
907 New Features
908
909 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
910 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
911 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
912 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
913 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
914 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
915 * No Gnus::                     Very punny.
916
917 Customization
918
919 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
920 * Slow Terminal Connection::    You run a remote Emacs.
921 * Little Disk Space::           You feel that having large setup files is icky.
922 * Slow Machine::                You feel like buying a faster machine.
923
924 Gnus Reference Guide
925
926 * Gnus Utility Functions::      Common functions and variable to use.
927 * Back End Interface::          How Gnus communicates with the servers.
928 * Score File Syntax::           A BNF definition of the score file standard.
929 * Headers::                     How Gnus stores headers internally.
930 * Ranges::                      A handy format for storing mucho numbers.
931 * Group Info::                  The group info format.
932 * Extended Interactive::        Symbolic prefixes and stuff.
933 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
934 * Various File Formats::        Formats of files that Gnus use.
935
936 Back End Interface
937
938 * Required Back End Functions::  Functions that must be implemented.
939 * Optional Back End Functions::  Functions that need not be implemented.
940 * Error Messaging::             How to get messages and report errors.
941 * Writing New Back Ends::       Extending old back ends.
942 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
943 * Mail-like Back Ends::         Some tips on mail back ends.
944
945 Various File Formats
946
947 * Active File Format::          Information on articles and groups available.
948 * Newsgroups File Format::      Group descriptions.
949
950 Emacs for Heathens
951
952 * Keystrokes::                  Entering text and executing commands.
953 * Emacs Lisp::                  The built-in Emacs programming language.
954
955 @end detailmenu
956 @end menu
957
958 @node Starting Up
959 @chapter Starting Gnus
960 @cindex starting up
961
962 If you haven't used Emacs much before using Gnus, read @ref{Emacs for
963 Heathens} first.
964
965 @kindex M-x gnus
966 @findex gnus
967 If your system administrator has set things up properly, starting Gnus
968 and reading news is extremely easy---you just type @kbd{M-x gnus} in
969 your Emacs.  If not, you should customize the variable
970 @code{gnus-select-method} as described in @ref{Finding the News}.  For a
971 minimal setup for posting should also customize the variables
972 @code{user-full-name} and @code{user-mail-address}.
973
974 @findex gnus-other-frame
975 @kindex M-x gnus-other-frame
976 If you want to start Gnus in a different frame, you can use the command
977 @kbd{M-x gnus-other-frame} instead.
978
979 If things do not go smoothly at startup, you have to twiddle some
980 variables in your @file{~/.gnus.el} file.  This file is similar to
981 @file{~/.emacs}, but is read when Gnus starts.
982
983 If you puzzle at any terms used in this manual, please refer to the
984 terminology section (@pxref{Terminology}).
985
986 @menu
987 * Finding the News::      Choosing a method for getting news.
988 * The First Time::        What does Gnus do the first time you start it?
989 * The Server is Down::    How can I read my mail then?
990 * Slave Gnusae::          You can have more than one Gnus active at a time.
991 * New Groups::            What is Gnus supposed to do with new groups?
992 * Changing Servers::      You may want to move from one server to another.
993 * Startup Files::         Those pesky startup files---@file{.newsrc}.
994 * Auto Save::             Recovering from a crash.
995 * The Active File::       Reading the active file over a slow line Takes Time.
996 * Startup Variables::     Other variables you might change.
997 @end menu
998
999
1000 @node Finding the News
1001 @section Finding the News
1002 @cindex finding news
1003
1004 @vindex gnus-select-method
1005 @c @head
1006 The @code{gnus-select-method} variable says where Gnus should look for
1007 news.  This variable should be a list where the first element says
1008 @dfn{how} and the second element says @dfn{where}.  This method is your
1009 native method.  All groups not fetched with this method are
1010 foreign groups.
1011
1012 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1013 you want to get your daily dosage of news from, you'd say:
1014
1015 @lisp
1016 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1017 @end lisp
1018
1019 If you want to read directly from the local spool, say:
1020
1021 @lisp
1022 (setq gnus-select-method '(nnspool ""))
1023 @end lisp
1024
1025 If you can use a local spool, you probably should, as it will almost
1026 certainly be much faster.  But do not use the local spool if your
1027 server is running Leafnode (which is a simple, standalone private news
1028 server); in this case, use @code{(nntp "localhost")}.
1029
1030 @vindex gnus-nntpserver-file
1031 @cindex NNTPSERVER
1032 @cindex @acronym{NNTP} server
1033 If this variable is not set, Gnus will take a look at the
1034 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1035 Gnus will see whether @code{gnus-nntpserver-file}
1036 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1037 If that fails as well, Gnus will try to use the machine running Emacs
1038 as an @acronym{NNTP} server.  That's a long shot, though.
1039
1040 @vindex gnus-nntp-server
1041 If @code{gnus-nntp-server} is set, this variable will override
1042 @code{gnus-select-method}.  You should therefore set
1043 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1044
1045 @vindex gnus-secondary-servers
1046 @vindex gnus-nntp-server
1047 You can also make Gnus prompt you interactively for the name of an
1048 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1049 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1050 in the @code{gnus-secondary-servers} list (if any).  You can also just
1051 type in the name of any server you feel like visiting.  (Note that this
1052 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1053 gnus} later in the same Emacs session, Gnus will contact the same
1054 server.)
1055
1056 @findex gnus-group-browse-foreign-server
1057 @kindex B (Group)
1058 However, if you use one @acronym{NNTP} server regularly and are just
1059 interested in a couple of groups from a different server, you would be
1060 better served by using the @kbd{B} command in the group buffer.  It will
1061 let you have a look at what groups are available, and you can subscribe
1062 to any of the groups you want to.  This also makes @file{.newsrc}
1063 maintenance much tidier.  @xref{Foreign Groups}.
1064
1065 @vindex gnus-secondary-select-methods
1066 @c @head
1067 A slightly different approach to foreign groups is to set the
1068 @code{gnus-secondary-select-methods} variable.  The select methods
1069 listed in this variable are in many ways just as native as the
1070 @code{gnus-select-method} server.  They will also be queried for active
1071 files during startup (if that's required), and new newsgroups that
1072 appear on these servers will be subscribed (or not) just as native
1073 groups are.
1074
1075 For instance, if you use the @code{nnmbox} back end to read your mail,
1076 you would typically set this variable to
1077
1078 @lisp
1079 (setq gnus-secondary-select-methods '((nnmbox "")))
1080 @end lisp
1081
1082 Note: the @acronym{NNTP} back end stores marks in marks files
1083 (@pxref{NNTP marks}).  This feature makes it easy to share marks between
1084 several Gnus installations, but may slow down things a bit when fetching
1085 new articles.  @xref{NNTP marks}, for more information.
1086
1087
1088 @node The First Time
1089 @section The First Time
1090 @cindex first time usage
1091
1092 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1093 determine what groups should be subscribed by default.
1094
1095 @vindex gnus-default-subscribed-newsgroups
1096 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1097 will subscribe you to just those groups in that list, leaving the rest
1098 killed.  Your system administrator should have set this variable to
1099 something useful.
1100
1101 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1102 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1103 here as @dfn{whatever Lars thinks you should read}.)
1104
1105 You'll also be subscribed to the Gnus documentation group, which should
1106 help you with most common problems.
1107
1108 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1109 use the normal functions for handling new groups, and not do anything
1110 special.
1111
1112
1113 @node The Server is Down
1114 @section The Server is Down
1115 @cindex server errors
1116
1117 If the default server is down, Gnus will understandably have some
1118 problems starting.  However, if you have some mail groups in addition to
1119 the news groups, you may want to start Gnus anyway.
1120
1121 Gnus, being the trusting sort of program, will ask whether to proceed
1122 without a native select method if that server can't be contacted.  This
1123 will happen whether the server doesn't actually exist (i.e., you have
1124 given the wrong address) or the server has just momentarily taken ill
1125 for some reason or other.  If you decide to continue and have no foreign
1126 groups, you'll find it difficult to actually do anything in the group
1127 buffer.  But, hey, that's your problem.  Blllrph!
1128
1129 @findex gnus-no-server
1130 @kindex M-x gnus-no-server
1131 @c @head
1132 If you know that the server is definitely down, or you just want to read
1133 your mail without bothering with the server at all, you can use the
1134 @code{gnus-no-server} command to start Gnus.  That might come in handy
1135 if you're in a hurry as well.  This command will not attempt to contact
1136 your primary server---instead, it will just activate all groups on level
1137 1 and 2.  (You should preferably keep no native groups on those two
1138 levels.) Also @pxref{Group Levels}.
1139
1140
1141 @node Slave Gnusae
1142 @section Slave Gnusae
1143 @cindex slave
1144
1145 You might want to run more than one Emacs with more than one Gnus at the
1146 same time.  If you are using different @file{.newsrc} files (e.g., if you
1147 are using the two different Gnusae to read from two different servers),
1148 that is no problem whatsoever.  You just do it.
1149
1150 The problem appears when you want to run two Gnusae that use the same
1151 @file{.newsrc} file.
1152
1153 To work around that problem some, we here at the Think-Tank at the Gnus
1154 Towers have come up with a new concept: @dfn{Masters} and
1155 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1156 taken out a copyright on those words.  If you wish to use those words in
1157 conjunction with each other, you have to send $1 per usage instance to
1158 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1159 Applications}) will be much more expensive, of course.)
1160
1161 @findex gnus-slave
1162 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1163 however you do it).  Each subsequent slave Gnusae should be started with
1164 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1165 files, but instead save @dfn{slave files} that contain information only
1166 on what groups have been read in the slave session.  When a master Gnus
1167 starts, it will read (and delete) these slave files, incorporating all
1168 information from them.  (The slave files will be read in the sequence
1169 they were created, so the latest changes will have precedence.)
1170
1171 Information from the slave files has, of course, precedence over the
1172 information in the normal (i.e., master) @file{.newsrc} file.
1173
1174 If the @file{.newsrc*} files have not been saved in the master when the
1175 slave starts, you may be prompted as to whether to read an auto-save
1176 file.  If you answer ``yes'', the unsaved changes to the master will be
1177 incorporated into the slave.  If you answer ``no'', the slave may see some
1178 messages as unread that have been read in the master.
1179
1180
1181
1182 @node New Groups
1183 @section New Groups
1184 @cindex new groups
1185 @cindex subscription
1186
1187 @vindex gnus-check-new-newsgroups
1188 If you are satisfied that you really never want to see any new groups,
1189 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1190 also save you some time at startup.  Even if this variable is
1191 @code{nil}, you can always subscribe to the new groups just by pressing
1192 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1193 is @code{ask-server} by default.  If you set this variable to
1194 @code{always}, then Gnus will query the back ends for new groups even
1195 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1196
1197 @menu
1198 * Checking New Groups::         Determining what groups are new.
1199 * Subscription Methods::        What Gnus should do with new groups.
1200 * Filtering New Groups::        Making Gnus ignore certain new groups.
1201 @end menu
1202
1203
1204 @node Checking New Groups
1205 @subsection Checking New Groups
1206
1207 Gnus normally determines whether a group is new or not by comparing the
1208 list of groups from the active file(s) with the lists of subscribed and
1209 dead groups.  This isn't a particularly fast method.  If
1210 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1211 server for new groups since the last time.  This is both faster and
1212 cheaper.  This also means that you can get rid of the list of killed
1213 groups altogether, so you may set @code{gnus-save-killed-list} to
1214 @code{nil}, which will save time both at startup, at exit, and all over.
1215 Saves disk space, too.  Why isn't this the default, then?
1216 Unfortunately, not all servers support this command.
1217
1218 I bet I know what you're thinking now: How do I find out whether my
1219 server supports @code{ask-server}?  No?  Good, because I don't have a
1220 fail-safe answer.  I would suggest just setting this variable to
1221 @code{ask-server} and see whether any new groups appear within the next
1222 few days.  If any do, then it works.  If none do, then it doesn't
1223 work.  I could write a function to make Gnus guess whether the server
1224 supports @code{ask-server}, but it would just be a guess.  So I won't.
1225 You could @code{telnet} to the server and say @code{HELP} and see
1226 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1227 it does, then it might work.  (But there are servers that lists
1228 @samp{NEWGROUPS} without supporting the function properly.)
1229
1230 This variable can also be a list of select methods.  If so, Gnus will
1231 issue an @code{ask-server} command to each of the select methods, and
1232 subscribe them (or not) using the normal methods.  This might be handy
1233 if you are monitoring a few servers for new groups.  A side effect is
1234 that startup will take much longer, so you can meditate while waiting.
1235 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1236
1237
1238 @node Subscription Methods
1239 @subsection Subscription Methods
1240
1241 @vindex gnus-subscribe-newsgroup-method
1242 What Gnus does when it encounters a new group is determined by the
1243 @code{gnus-subscribe-newsgroup-method} variable.
1244
1245 This variable should contain a function.  This function will be called
1246 with the name of the new group as the only parameter.
1247
1248 Some handy pre-fab functions are:
1249
1250 @table @code
1251
1252 @item gnus-subscribe-zombies
1253 @vindex gnus-subscribe-zombies
1254 Make all new groups zombies.  This is the default.  You can browse the
1255 zombies later (with @kbd{A z}) and either kill them all off properly
1256 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1257
1258 @item gnus-subscribe-randomly
1259 @vindex gnus-subscribe-randomly
1260 Subscribe all new groups in arbitrary order.  This really means that all
1261 new groups will be added at ``the top'' of the group buffer.
1262
1263 @item gnus-subscribe-alphabetically
1264 @vindex gnus-subscribe-alphabetically
1265 Subscribe all new groups in alphabetical order.
1266
1267 @item gnus-subscribe-hierarchically
1268 @vindex gnus-subscribe-hierarchically
1269 Subscribe all new groups hierarchically.  The difference between this
1270 function and @code{gnus-subscribe-alphabetically} is slight.
1271 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1272 alphabetical fashion, while this function will enter groups into its
1273 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1274 @samp{comp} hierarchy, this function will not mess that configuration
1275 up.  Or something like that.
1276
1277 @item gnus-subscribe-interactively
1278 @vindex gnus-subscribe-interactively
1279 Subscribe new groups interactively.  This means that Gnus will ask
1280 you about @strong{all} new groups.  The groups you choose to subscribe
1281 to will be subscribed hierarchically.
1282
1283 @item gnus-subscribe-killed
1284 @vindex gnus-subscribe-killed
1285 Kill all new groups.
1286
1287 @item gnus-subscribe-topics
1288 @vindex gnus-subscribe-topics
1289 Put the groups into the topic that has a matching @code{subscribe} topic
1290 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1291 topic parameter that looks like
1292
1293 @example
1294 "nnslashdot"
1295 @end example
1296
1297 will mean that all groups that match that regex will be subscribed under
1298 that topic.
1299
1300 If no topics match the groups, the groups will be subscribed in the
1301 top-level topic.
1302
1303 @end table
1304
1305 @vindex gnus-subscribe-hierarchical-interactive
1306 A closely related variable is
1307 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1308 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1309 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1310 will ask you for each sub-hierarchy whether you want to descend the
1311 hierarchy or not.
1312
1313 One common mistake is to set the variable a few paragraphs above
1314 (@code{gnus-subscribe-newsgroup-method}) to
1315 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1316 will not work.  This is ga-ga.  So don't do it.
1317
1318
1319 @node Filtering New Groups
1320 @subsection Filtering New Groups
1321
1322 A nice and portable way to control which new newsgroups should be
1323 subscribed (or ignored) is to put an @dfn{options} line at the start of
1324 the @file{.newsrc} file.  Here's an example:
1325
1326 @example
1327 options -n !alt.all !rec.all sci.all
1328 @end example
1329
1330 @vindex gnus-subscribe-options-newsgroup-method
1331 This line obviously belongs to a serious-minded intellectual scientific
1332 person (or she may just be plain old boring), because it says that all
1333 groups that have names beginning with @samp{alt} and @samp{rec} should
1334 be ignored, and all groups with names beginning with @samp{sci} should
1335 be subscribed.  Gnus will not use the normal subscription method for
1336 subscribing these groups.
1337 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1338 variable defaults to @code{gnus-subscribe-alphabetically}.
1339
1340 @vindex gnus-options-not-subscribe
1341 @vindex gnus-options-subscribe
1342 If you don't want to mess with your @file{.newsrc} file, you can just
1343 set the two variables @code{gnus-options-subscribe} and
1344 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1345 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1346 and if the new group matches the former, it will be unconditionally
1347 subscribed, and if it matches the latter, it will be ignored.
1348
1349 @vindex gnus-auto-subscribed-groups
1350 Yet another variable that meddles here is
1351 @code{gnus-auto-subscribed-groups}.  It works exactly like
1352 @code{gnus-options-subscribe}, and is therefore really superfluous,
1353 but I thought it would be nice to have two of these.  This variable is
1354 more meant for setting some ground rules, while the other variable is
1355 used more for user fiddling.  By default this variable makes all new
1356 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1357 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1358 subscribed.  If you don't like that, just set this variable to
1359 @code{nil}.
1360
1361 New groups that match this regexp are subscribed using
1362 @code{gnus-subscribe-options-newsgroup-method}.
1363
1364
1365 @node Changing Servers
1366 @section Changing Servers
1367 @cindex changing servers
1368
1369 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1370 This happens very rarely, but perhaps you change jobs, or one server is
1371 very flaky and you want to use another.
1372
1373 Changing the server is pretty easy, right?  You just change
1374 @code{gnus-select-method} to point to the new server?
1375
1376 @emph{Wrong!}
1377
1378 Article numbers are not (in any way) kept synchronized between different
1379 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1380 you have read is by keeping track of article numbers.  So when you
1381 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1382 worthless.
1383
1384 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1385 file from one server to another.  They all have one thing in
1386 common---they take a looong time to run.  You don't want to use these
1387 functions more than absolutely necessary.
1388
1389 @kindex M-x gnus-change-server
1390 @findex gnus-change-server
1391 If you have access to both servers, Gnus can request the headers for all
1392 the articles you have read and compare @code{Message-ID}s and map the
1393 article numbers of the read articles and article marks.  The @kbd{M-x
1394 gnus-change-server} command will do this for all your native groups.  It
1395 will prompt for the method you want to move to.
1396
1397 @kindex M-x gnus-group-move-group-to-server
1398 @findex gnus-group-move-group-to-server
1399 You can also move individual groups with the @kbd{M-x
1400 gnus-group-move-group-to-server} command.  This is useful if you want to
1401 move a (foreign) group from one server to another.
1402
1403 @kindex M-x gnus-group-clear-data-on-native-groups
1404 @findex gnus-group-clear-data-on-native-groups
1405 If you don't have access to both the old and new server, all your marks
1406 and read ranges have become worthless.  You can use the @kbd{M-x
1407 gnus-group-clear-data-on-native-groups} command to clear out all data
1408 that you have on your native groups.  Use with caution.
1409
1410 @kindex M-x gnus-group-clear-data
1411 @findex gnus-group-clear-data
1412 Clear the data from the current group only---nix out marks and the
1413 list of read articles (@code{gnus-group-clear-data}).
1414
1415 After changing servers, you @strong{must} move the cache hierarchy away,
1416 since the cached articles will have wrong article numbers, which will
1417 affect which articles Gnus thinks are read.
1418 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1419 to have it done automatically; for @code{gnus-group-clear-data}, you
1420 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1421 cache for all groups).
1422
1423
1424 @node Startup Files
1425 @section Startup Files
1426 @cindex startup files
1427 @cindex .newsrc
1428 @cindex .newsrc.el
1429 @cindex .newsrc.eld
1430
1431 Most common Unix news readers use a shared startup file called
1432 @file{.newsrc}.  This file contains all the information about what
1433 groups are subscribed, and which articles in these groups have been
1434 read.
1435
1436 Things got a bit more complicated with @sc{gnus}.  In addition to
1437 keeping the @file{.newsrc} file updated, it also used a file called
1438 @file{.newsrc.el} for storing all the information that didn't fit into
1439 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1440 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1441 files was the most recently saved, which enabled people to swap between
1442 @sc{gnus} and other newsreaders.
1443
1444 That was kinda silly, so Gnus went one better: In addition to the
1445 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1446 @file{.newsrc.eld}.  It will read whichever of these files that are most
1447 recent, but it will never write a @file{.newsrc.el} file.  You should
1448 never delete the @file{.newsrc.eld} file---it contains much information
1449 not stored in the @file{.newsrc} file.
1450
1451 @vindex gnus-save-newsrc-file
1452 @vindex gnus-read-newsrc-file
1453 You can turn off writing the @file{.newsrc} file by setting
1454 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1455 the file and save some space, as well as exiting from Gnus faster.
1456 However, this will make it impossible to use other newsreaders than
1457 Gnus.  But hey, who would want to, right?  Similarly, setting
1458 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1459 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1460 convenient if you use a different news reader occasionally, and you
1461 want to read a different subset of the available groups with that
1462 news reader.
1463
1464 @vindex gnus-save-killed-list
1465 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1466 will not save the list of killed groups to the startup file.  This will
1467 save both time (when starting and quitting) and space (on disk).  It
1468 will also mean that Gnus has no record of what groups are new or old,
1469 so the automatic new groups subscription methods become meaningless.
1470 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1471 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1472 Groups}).  This variable can also be a regular expression.  If that's
1473 the case, remove all groups that do not match this regexp before
1474 saving.  This can be useful in certain obscure situations that involve
1475 several servers where not all servers support @code{ask-server}.
1476
1477 @vindex gnus-startup-file
1478 @vindex gnus-backup-startup-file
1479 @vindex version-control
1480 The @code{gnus-startup-file} variable says where the startup files are.
1481 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1482 file being whatever that one is, with a @samp{.eld} appended.
1483 If you want version control for this file, set
1484 @code{gnus-backup-startup-file}.  It respects the same values as the
1485 @code{version-control} variable.
1486
1487 @vindex gnus-save-newsrc-hook
1488 @vindex gnus-save-quick-newsrc-hook
1489 @vindex gnus-save-standard-newsrc-hook
1490 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1491 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1492 saving the @file{.newsrc.eld} file, and
1493 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1494 @file{.newsrc} file.  The latter two are commonly used to turn version
1495 control on or off.  Version control is on by default when saving the
1496 startup files.  If you want to turn backup creation off, say something like:
1497
1498 @lisp
1499 (defun turn-off-backup ()
1500   (set (make-local-variable 'backup-inhibited) t))
1501
1502 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1503 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1504 @end lisp
1505
1506 @vindex gnus-init-file
1507 @vindex gnus-site-init-file
1508 When Gnus starts, it will read the @code{gnus-site-init-file}
1509 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1510 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1511 and can be used to avoid cluttering your @file{~/.emacs} and
1512 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1513 with the same names as these, but with @file{.elc} and @file{.el}
1514 suffixes.  In other words, if you have set @code{gnus-init-file} to
1515 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1516 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1517 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1518 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1519 @code{gnus-init-file}.
1520
1521
1522 @node Auto Save
1523 @section Auto Save
1524 @cindex dribble file
1525 @cindex auto-save
1526
1527 Whenever you do something that changes the Gnus data (reading articles,
1528 catching up, killing/subscribing groups), the change is added to a
1529 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1530 Emacs way.  If your Emacs should crash before you have saved the
1531 @file{.newsrc} files, all changes you have made can be recovered from
1532 this file.
1533
1534 If Gnus detects this file at startup, it will ask the user whether to
1535 read it.  The auto save file is deleted whenever the real startup file is
1536 saved.
1537
1538 @vindex gnus-use-dribble-file
1539 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1540 maintain a dribble buffer.  The default is @code{t}.
1541
1542 @vindex gnus-dribble-directory
1543 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1544 this variable is @code{nil}, which it is by default, Gnus will dribble
1545 into the directory where the @file{.newsrc} file is located.  (This is
1546 normally the user's home directory.)  The dribble file will get the same
1547 file permissions as the @file{.newsrc} file.
1548
1549 @vindex gnus-always-read-dribble-file
1550 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1551 read the dribble file on startup without querying the user.
1552
1553
1554 @node The Active File
1555 @section The Active File
1556 @cindex active file
1557 @cindex ignored groups
1558
1559 When Gnus starts, or indeed whenever it tries to determine whether new
1560 articles have arrived, it reads the active file.  This is a very large
1561 file that lists all the active groups and articles on the server.
1562
1563 @vindex gnus-ignored-newsgroups
1564 Before examining the active file, Gnus deletes all lines that match the
1565 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1566 any groups with bogus names, but you can use this variable to make Gnus
1567 ignore hierarchies you aren't ever interested in.  However, this is not
1568 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1569 Groups} for an overview of other variables that can be used instead.
1570
1571 @c This variable is
1572 @c @code{nil} by default, and will slow down active file handling somewhat
1573 @c if you set it to anything else.
1574
1575 @vindex gnus-read-active-file
1576 @c @head
1577 The active file can be rather Huge, so if you have a slow network, you
1578 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1579 reading the active file.  This variable is @code{some} by default.
1580
1581 Gnus will try to make do by getting information just on the groups that
1582 you actually subscribe to.
1583
1584 Note that if you subscribe to lots and lots of groups, setting this
1585 variable to @code{nil} will probably make Gnus slower, not faster.  At
1586 present, having this variable @code{nil} will slow Gnus down
1587 considerably, unless you read news over a 2400 baud modem.
1588
1589 This variable can also have the value @code{some}.  Gnus will then
1590 attempt to read active info only on the subscribed groups.  On some
1591 servers this is quite fast (on sparkling, brand new INN servers that
1592 support the @code{LIST ACTIVE group} command), on others this isn't fast
1593 at all.  In any case, @code{some} should be faster than @code{nil}, and
1594 is certainly faster than @code{t} over slow lines.
1595
1596 Some news servers (old versions of Leafnode and old versions of INN, for
1597 instance) do not support the @code{LIST ACTIVE group}.  For these
1598 servers, @code{nil} is probably the most efficient value for this
1599 variable.
1600
1601 If this variable is @code{nil}, Gnus will ask for group info in total
1602 lock-step, which isn't very fast.  If it is @code{some} and you use an
1603 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1604 read all the replies in one swoop.  This will normally result in better
1605 performance, but if the server does not support the aforementioned
1606 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1607
1608 If you think that starting up Gnus takes too long, try all the three
1609 different values for this variable and see what works best for you.
1610
1611 In any case, if you use @code{some} or @code{nil}, you should definitely
1612 kill all groups that you aren't interested in to speed things up.
1613
1614 Note that this variable also affects active file retrieval from
1615 secondary select methods.
1616
1617
1618 @node Startup Variables
1619 @section Startup Variables
1620
1621 @table @code
1622
1623 @item gnus-load-hook
1624 @vindex gnus-load-hook
1625 A hook run while Gnus is being loaded.  Note that this hook will
1626 normally be run just once in each Emacs session, no matter how many
1627 times you start Gnus.
1628
1629 @item gnus-before-startup-hook
1630 @vindex gnus-before-startup-hook
1631 A hook run after starting up Gnus successfully.
1632
1633 @item gnus-startup-hook
1634 @vindex gnus-startup-hook
1635 A hook run as the very last thing after starting up Gnus
1636
1637 @item gnus-started-hook
1638 @vindex gnus-started-hook
1639 A hook that is run as the very last thing after starting up Gnus
1640 successfully.
1641
1642 @item gnus-setup-news-hook
1643 @vindex gnus-setup-news-hook
1644 A hook that is run after reading the @file{.newsrc} file(s), but before
1645 generating the group buffer.
1646
1647 @item gnus-check-bogus-newsgroups
1648 @vindex gnus-check-bogus-newsgroups
1649 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1650 startup.  A @dfn{bogus group} is a group that you have in your
1651 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1652 bogus groups can take quite a while, so to save time and resources it's
1653 best to leave this option off, and do the checking for bogus groups once
1654 in a while from the group buffer instead (@pxref{Group Maintenance}).
1655
1656 @item gnus-inhibit-startup-message
1657 @vindex gnus-inhibit-startup-message
1658 If non-@code{nil}, the startup message won't be displayed.  That way,
1659 your boss might not notice as easily that you are reading news instead
1660 of doing your job.  Note that this variable is used before
1661 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1662
1663 @item gnus-no-groups-message
1664 @vindex gnus-no-groups-message
1665 Message displayed by Gnus when no groups are available.
1666
1667 @item gnus-play-startup-jingle
1668 @vindex gnus-play-startup-jingle
1669 If non-@code{nil}, play the Gnus jingle at startup.
1670
1671 @item gnus-startup-jingle
1672 @vindex gnus-startup-jingle
1673 Jingle to be played if the above variable is non-@code{nil}.  The
1674 default is @samp{Tuxedomoon.Jingle4.au}.
1675
1676 @end table
1677
1678
1679 @node Group Buffer
1680 @chapter Group Buffer
1681 @cindex group buffer
1682
1683 @c Alex Schroeder suggests to rearrange this as follows:
1684 @c
1685 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1686 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1687 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1688 @c   7. Group Score, 8. Group Buffer Format
1689 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1690 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1691 @c <kensanata> First, "Gnus considers groups... (default 9)."
1692 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1693 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1694 @c <kensanata> Then expand the next paragraph or add some more to it.
1695 @c    This short one sentence explains levels 1 and 2, therefore I understand
1696 @c    that I should keep important news at 3 and boring news at 4.
1697 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1698 @c    Maybe keep those that you don't want to read temporarily at 6,
1699 @c    those that you never want to read at 8, those that offend your
1700 @c    human rights at 9...
1701
1702
1703 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1704 is the first buffer shown when Gnus starts, and will never be killed as
1705 long as Gnus is active.
1706
1707 @iftex
1708 @iflatex
1709 \gnusfigure{The Group Buffer}{320}{
1710 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1711 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1712 \put(120,38){\vector(1,2){10}}
1713 \put(40,60){\makebox(0,0)[r]{Mode line}}
1714 \put(40,58){\vector(1,0){30}}
1715 \put(200,28){\makebox(0,0)[t]{Native select method}}
1716 \put(200,26){\vector(-1,2){15}}
1717 }
1718 @end iflatex
1719 @end iftex
1720
1721 @menu
1722 * Group Buffer Format::         Information listed and how you can change it.
1723 * Group Maneuvering::           Commands for moving in the group buffer.
1724 * Selecting a Group::           Actually reading news.
1725 * Subscription Commands::       Unsubscribing, killing, subscribing.
1726 * Group Data::                  Changing the info for a group.
1727 * Group Levels::                Levels? What are those, then?
1728 * Group Score::                 A mechanism for finding out what groups you like.
1729 * Marking Groups::              You can mark groups for later processing.
1730 * Foreign Groups::              Creating and editing groups.
1731 * Group Parameters::            Each group may have different parameters set.
1732 * Listing Groups::              Gnus can list various subsets of the groups.
1733 * Sorting Groups::              Re-arrange the group order.
1734 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1735 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1736 * Exiting Gnus::                Stop reading news and get some work done.
1737 * Group Topics::                A folding group mode divided into topics.
1738 * Non-ASCII Group Names::       Accessing groups of non-English names.
1739 * Searching::                   Mail search engines.
1740 * Misc Group Stuff::            Other stuff that you can to do.
1741 @end menu
1742
1743
1744 @node Group Buffer Format
1745 @section Group Buffer Format
1746
1747 @menu
1748 * Group Line Specification::    Deciding how the group buffer is to look.
1749 * Group Mode Line Specification::  The group buffer mode line.
1750 * Group Highlighting::          Having nice colors in the group buffer.
1751 @end menu
1752
1753 You can customize the Group Mode tool bar, see @kbd{M-x
1754 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1755 available in Emacs.
1756
1757 The tool bar icons are now (de)activated correctly depending on the
1758 cursor position.  Therefore, moving around in the Group Buffer is
1759 slower.  You can disable this via the variable
1760 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1761 Emacs version.
1762
1763 @node Group Line Specification
1764 @subsection Group Line Specification
1765 @cindex group buffer format
1766
1767 The default format of the group buffer is nice and dull, but you can
1768 make it as exciting and ugly as you feel like.
1769
1770 Here's a couple of example group lines:
1771
1772 @example
1773      25: news.announce.newusers
1774  *    0: alt.fan.andrea-dworkin
1775 @end example
1776
1777 Quite simple, huh?
1778
1779 You can see that there are 25 unread articles in
1780 @samp{news.announce.newusers}.  There are no unread articles, but some
1781 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1782 asterisk at the beginning of the line?).
1783
1784 @vindex gnus-group-line-format
1785 You can change that format to whatever you want by fiddling with the
1786 @code{gnus-group-line-format} variable.  This variable works along the
1787 lines of a @code{format} specification, which is pretty much the same as
1788 a @code{printf} specifications, for those of you who use (feh!) C.
1789 @xref{Formatting Variables}.
1790
1791 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1792
1793 There should always be a colon on the line; the cursor always moves to
1794 the colon after performing an operation.  @xref{Positioning
1795 Point}.  Nothing else is required---not even the group name.  All
1796 displayed text is just window dressing, and is never examined by Gnus.
1797 Gnus stores all real information it needs using text properties.
1798
1799 (Note that if you make a really strange, wonderful, spreadsheet-like
1800 layout, everybody will believe you are hard at work with the accounting
1801 instead of wasting time reading news.)
1802
1803 Here's a list of all available format characters:
1804
1805 @table @samp
1806
1807 @item M
1808 An asterisk if the group only has marked articles.
1809
1810 @item S
1811 Whether the group is subscribed.
1812
1813 @item L
1814 Level of subscribedness.
1815
1816 @item N
1817 Number of unread articles.
1818
1819 @item I
1820 Number of dormant articles.
1821
1822 @item T
1823 Number of ticked articles.
1824
1825 @item R
1826 Number of read articles.
1827
1828 @item U
1829 Number of unseen articles.
1830
1831 @item t
1832 Estimated total number of articles.  (This is really @var{max-number}
1833 minus @var{min-number} plus 1.)
1834
1835 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1836 efficient access to @var{max-number} and @var{min-number} but getting
1837 the true unread message count is not possible efficiently.  For
1838 hysterical raisins, even the mail back ends, where the true number of
1839 unread messages might be available efficiently, use the same limited
1840 interface.  To remove this restriction from Gnus means that the back
1841 end interface has to be changed, which is not an easy job.
1842
1843 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1844 compaction'' which circumvents this deficiency: the idea is to
1845 renumber all articles from 1, removing all gaps between numbers, hence
1846 getting a correct total count.  Other backends may support this in the
1847 future.  In order to keep your total article count relatively up to
1848 date, you might want to compact your groups (or even directly your
1849 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1850
1851 @item y
1852 Number of unread, unticked, non-dormant articles.
1853
1854 @item i
1855 Number of ticked and dormant articles.
1856
1857 @item g
1858 Full group name.
1859
1860 @item G
1861 Group name.
1862
1863 @item C
1864 Group comment (@pxref{Group Parameters}) or group name if there is no
1865 comment element in the group parameters.
1866
1867 @item D
1868 Newsgroup description.  You need to read the group descriptions
1869 before these will appear, and to do that, you either have to set
1870 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1871 command.
1872
1873 @item o
1874 @samp{m} if moderated.
1875
1876 @item O
1877 @samp{(m)} if moderated.
1878
1879 @item s
1880 Select method.
1881
1882 @item B
1883 If the summary buffer for the group is open or not.
1884
1885 @item n
1886 Select from where.
1887
1888 @item z
1889 A string that looks like @samp{<%s:%n>} if a foreign select method is
1890 used.
1891
1892 @item P
1893 Indentation based on the level of the topic (@pxref{Group Topics}).
1894
1895 @item c
1896 @vindex gnus-group-uncollapsed-levels
1897 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1898 variable says how many levels to leave at the end of the group name.
1899 The default is 1---this will mean that group names like
1900 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1901
1902 @item m
1903 @vindex gnus-new-mail-mark
1904 @cindex %
1905 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1906 the group lately.
1907
1908 @item p
1909 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1910
1911 @item d
1912 A string that says when you last read the group (@pxref{Group
1913 Timestamp}).
1914
1915 @item F
1916 The disk space used by the articles fetched by both the cache and
1917 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1918 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1919 of %7F is sufficient for a fixed-width column.
1920
1921 @item u
1922 User defined specifier.  The next character in the format string should
1923 be a letter.  Gnus will call the function
1924 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1925 following @samp{%u}.  The function will be passed a single dummy
1926 parameter as argument.  The function should return a string, which will
1927 be inserted into the buffer just like information from any other
1928 specifier.
1929 @end table
1930
1931 @cindex *
1932 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1933 if no info is available---for instance, if it is a non-activated foreign
1934 group, or a bogus native group.
1935
1936
1937 @node Group Mode Line Specification
1938 @subsection Group Mode Line Specification
1939 @cindex group mode line
1940
1941 @vindex gnus-group-mode-line-format
1942 The mode line can be changed by setting
1943 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1944 doesn't understand that many format specifiers:
1945
1946 @table @samp
1947 @item S
1948 The native news server.
1949 @item M
1950 The native select method.
1951 @end table
1952
1953
1954 @node Group Highlighting
1955 @subsection Group Highlighting
1956 @cindex highlighting
1957 @cindex group highlighting
1958
1959 @vindex gnus-group-highlight
1960 Highlighting in the group buffer is controlled by the
1961 @code{gnus-group-highlight} variable.  This is an alist with elements
1962 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1963 something non-@code{nil}, the @var{face} will be used on the line.
1964
1965 Here's an example value for this variable that might look nice if the
1966 background is dark:
1967
1968 @lisp
1969 (cond (window-system
1970        (setq custom-background-mode 'light)
1971        (defface my-group-face-1
1972          '((t (:foreground "Red" :bold t))) "First group face")
1973        (defface my-group-face-2
1974          '((t (:foreground "DarkSeaGreen4" :bold t)))
1975          "Second group face")
1976        (defface my-group-face-3
1977          '((t (:foreground "Green4" :bold t))) "Third group face")
1978        (defface my-group-face-4
1979          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1980        (defface my-group-face-5
1981          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1982
1983 (setq gnus-group-highlight
1984       '(((> unread 200) . my-group-face-1)
1985         ((and (< level 3) (zerop unread)) . my-group-face-2)
1986         ((< level 3) . my-group-face-3)
1987         ((zerop unread) . my-group-face-4)
1988         (t . my-group-face-5)))
1989 @end lisp
1990
1991 Also @pxref{Faces and Fonts}.
1992
1993 Variables that are dynamically bound when the forms are evaluated
1994 include:
1995
1996 @table @code
1997 @item group
1998 The group name.
1999 @item unread
2000 The number of unread articles in the group.
2001 @item method
2002 The select method.
2003 @item mailp
2004 Whether the group is a mail group.
2005 @item level
2006 The level of the group.
2007 @item score
2008 The score of the group.
2009 @item ticked
2010 The number of ticked articles in the group.
2011 @item total
2012 The total number of articles in the group.  Or rather,
2013 @var{max-number} minus @var{min-number} plus one.
2014 @item topic
2015 When using the topic minor mode, this variable is bound to the current
2016 topic being inserted.
2017 @end table
2018
2019 When the forms are @code{eval}ed, point is at the beginning of the line
2020 of the group in question, so you can use many of the normal Gnus
2021 functions for snarfing info on the group.
2022
2023 @vindex gnus-group-update-hook
2024 @findex gnus-group-highlight-line
2025 @code{gnus-group-update-hook} is called when a group line is changed.
2026 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2027 calls @code{gnus-group-highlight-line} by default.
2028
2029
2030 @node Group Maneuvering
2031 @section Group Maneuvering
2032 @cindex group movement
2033
2034 All movement commands understand the numeric prefix and will behave as
2035 expected, hopefully.
2036
2037 @table @kbd
2038
2039 @item n
2040 @kindex n (Group)
2041 @findex gnus-group-next-unread-group
2042 Go to the next group that has unread articles
2043 (@code{gnus-group-next-unread-group}).
2044
2045 @item p
2046 @itemx DEL
2047 @kindex DEL (Group)
2048 @kindex p (Group)
2049 @findex gnus-group-prev-unread-group
2050 Go to the previous group that has unread articles
2051 (@code{gnus-group-prev-unread-group}).
2052
2053 @item N
2054 @kindex N (Group)
2055 @findex gnus-group-next-group
2056 Go to the next group (@code{gnus-group-next-group}).
2057
2058 @item P
2059 @kindex P (Group)
2060 @findex gnus-group-prev-group
2061 Go to the previous group (@code{gnus-group-prev-group}).
2062
2063 @item M-n
2064 @kindex M-n (Group)
2065 @findex gnus-group-next-unread-group-same-level
2066 Go to the next unread group on the same (or lower) level
2067 (@code{gnus-group-next-unread-group-same-level}).
2068
2069 @item M-p
2070 @kindex M-p (Group)
2071 @findex gnus-group-prev-unread-group-same-level
2072 Go to the previous unread group on the same (or lower) level
2073 (@code{gnus-group-prev-unread-group-same-level}).
2074 @end table
2075
2076 Three commands for jumping to groups:
2077
2078 @table @kbd
2079
2080 @item j
2081 @kindex j (Group)
2082 @findex gnus-group-jump-to-group
2083 Jump to a group (and make it visible if it isn't already)
2084 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2085 like living groups.
2086
2087 @item ,
2088 @kindex , (Group)
2089 @findex gnus-group-best-unread-group
2090 Jump to the unread group with the lowest level
2091 (@code{gnus-group-best-unread-group}).
2092
2093 @item .
2094 @kindex . (Group)
2095 @findex gnus-group-first-unread-group
2096 Jump to the first group with unread articles
2097 (@code{gnus-group-first-unread-group}).
2098 @end table
2099
2100 @vindex gnus-group-goto-unread
2101 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2102 commands will move to the next group, not the next unread group.  Even
2103 the commands that say they move to the next unread group.  The default
2104 is @code{t}.
2105
2106 @vindex gnus-summary-next-group-on-exit
2107 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2108 exited, the point in the group buffer is moved to the next unread group.
2109 Otherwise, the point is set to the group just exited.  The default is
2110 @code{t}.
2111
2112 @node Selecting a Group
2113 @section Selecting a Group
2114 @cindex group selection
2115
2116 @table @kbd
2117
2118 @item SPACE
2119 @kindex SPACE (Group)
2120 @findex gnus-group-read-group
2121 Select the current group, switch to the summary buffer and display the
2122 first unread article (@code{gnus-group-read-group}).  If there are no
2123 unread articles in the group, or if you give a non-numerical prefix to
2124 this command, Gnus will offer to fetch all the old articles in this
2125 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2126 determines the number of articles Gnus will fetch.  If @var{n} is
2127 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2128 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2129
2130 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2131 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2132 - 4 2 SPC} fetches the 42 oldest ones.
2133
2134 When you are in the group (in the Summary buffer), you can type
2135 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2136 ones.
2137
2138 @item RET
2139 @kindex RET (Group)
2140 @findex gnus-group-select-group
2141 Select the current group and switch to the summary buffer
2142 (@code{gnus-group-select-group}).  Takes the same arguments as
2143 @code{gnus-group-read-group}---the only difference is that this command
2144 does not display the first unread article automatically upon group
2145 entry.
2146
2147 @item M-RET
2148 @kindex M-RET (Group)
2149 @findex gnus-group-quick-select-group
2150 This does the same as the command above, but tries to do it with the
2151 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2152 scoring/killing will be performed, there will be no highlights and no
2153 expunging.  This might be useful if you're in a real hurry and have to
2154 enter some humongous group.  If you give a 0 prefix to this command
2155 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2156 which is useful if you want to toggle threading before generating the
2157 summary buffer (@pxref{Summary Generation Commands}).
2158
2159 @item M-SPACE
2160 @kindex M-SPACE (Group)
2161 @findex gnus-group-visible-select-group
2162 This is yet one more command that does the same as the @kbd{RET}
2163 command, but this one does it without expunging and hiding dormants
2164 (@code{gnus-group-visible-select-group}).
2165
2166 @item C-M-RET
2167 @kindex C-M-RET (Group)
2168 @findex gnus-group-select-group-ephemerally
2169 Finally, this command selects the current group ephemerally without
2170 doing any processing of its contents
2171 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2172 turned off.  Everything you do in the group after selecting it in this
2173 manner will have no permanent effects.
2174
2175 @end table
2176
2177 @vindex gnus-large-newsgroup
2178 The @code{gnus-large-newsgroup} variable says what Gnus should
2179 consider to be a big group.  If it is @code{nil}, no groups are
2180 considered big.  The default value is 200.  If the group has more
2181 (unread and/or ticked) articles than this, Gnus will query the user
2182 before entering the group.  The user can then specify how many
2183 articles should be fetched from the server.  If the user specifies a
2184 negative number (@var{-n}), the @var{n} oldest articles will be
2185 fetched.  If it is positive, the @var{n} articles that have arrived
2186 most recently will be fetched.
2187
2188 @vindex gnus-large-ephemeral-newsgroup
2189 @code{gnus-large-ephemeral-newsgroup} is the same as
2190 @code{gnus-large-newsgroup}, but is only used for ephemeral
2191 newsgroups.
2192
2193 @vindex gnus-newsgroup-maximum-articles
2194 In groups in some news servers, there might be a big gap between a few
2195 very old articles that will never be expired and the recent ones.  In
2196 such a case, the server will return the data like @code{(1 . 30000000)}
2197 for the @code{LIST ACTIVE group} command, for example.  Even if there
2198 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2199 know it at first and prepares for getting 30000000 articles.  However,
2200 it will consume hundreds megabytes of memories and might make Emacs get
2201 stuck as the case may be.  If you use such news servers, set the
2202 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2203 The value means that Gnus ignores articles other than this number of the
2204 latest ones in every group.  For instance, the value 10000 makes Gnus
2205 get only the articles 29990001-30000000 (if the latest article number is
2206 30000000 in a group).  Note that setting this variable to a number might
2207 prevent you from reading very old articles.  The default value of the
2208 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2209 means Gnus never ignores old articles.
2210
2211 @vindex gnus-select-group-hook
2212 @vindex gnus-auto-select-first
2213 @vindex gnus-auto-select-subject
2214 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2215 automatically when entering a group with the @kbd{SPACE} command.
2216 Which article this is is controlled by the
2217 @code{gnus-auto-select-subject} variable.  Valid values for this
2218 variable are:
2219
2220 @table @code
2221
2222 @item unread
2223 Place point on the subject line of the first unread article.
2224
2225 @item first
2226 Place point on the subject line of the first article.
2227
2228 @item unseen
2229 Place point on the subject line of the first unseen article.
2230
2231 @item unseen-or-unread
2232 Place point on the subject line of the first unseen article, and if
2233 there is no such article, place point on the subject line of the first
2234 unread article.
2235
2236 @item best
2237 Place point on the subject line of the highest-scored unread article.
2238
2239 @end table
2240
2241 This variable can also be a function.  In that case, that function
2242 will be called to place point on a subject line.
2243
2244 If you want to prevent automatic selection in some group (say, in a
2245 binary group with Huge articles) you can set the
2246 @code{gnus-auto-select-first} variable to @code{nil} in
2247 @code{gnus-select-group-hook}, which is called when a group is
2248 selected.
2249
2250
2251 @node Subscription Commands
2252 @section Subscription Commands
2253 @cindex subscription
2254
2255 @table @kbd
2256
2257 @item S t
2258 @itemx u
2259 @kindex S t (Group)
2260 @kindex u (Group)
2261 @findex gnus-group-unsubscribe-current-group
2262 @c @icon{gnus-group-unsubscribe}
2263 Toggle subscription to the current group
2264 (@code{gnus-group-unsubscribe-current-group}).
2265
2266 @item S s
2267 @itemx U
2268 @kindex S s (Group)
2269 @kindex U (Group)
2270 @findex gnus-group-unsubscribe-group
2271 Prompt for a group to subscribe, and then subscribe it.  If it was
2272 subscribed already, unsubscribe it instead
2273 (@code{gnus-group-unsubscribe-group}).
2274
2275 @item S k
2276 @itemx C-k
2277 @kindex S k (Group)
2278 @kindex C-k (Group)
2279 @findex gnus-group-kill-group
2280 @c @icon{gnus-group-kill-group}
2281 Kill the current group (@code{gnus-group-kill-group}).
2282
2283 @item S y
2284 @itemx C-y
2285 @kindex S y (Group)
2286 @kindex C-y (Group)
2287 @findex gnus-group-yank-group
2288 Yank the last killed group (@code{gnus-group-yank-group}).
2289
2290 @item C-x C-t
2291 @kindex C-x C-t (Group)
2292 @findex gnus-group-transpose-groups
2293 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2294 really a subscription command, but you can use it instead of a
2295 kill-and-yank sequence sometimes.
2296
2297 @item S w
2298 @itemx C-w
2299 @kindex S w (Group)
2300 @kindex C-w (Group)
2301 @findex gnus-group-kill-region
2302 Kill all groups in the region (@code{gnus-group-kill-region}).
2303
2304 @item S z
2305 @kindex S z (Group)
2306 @findex gnus-group-kill-all-zombies
2307 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2308
2309 @item S C-k
2310 @kindex S C-k (Group)
2311 @findex gnus-group-kill-level
2312 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2313 These groups can't be yanked back after killing, so this command should
2314 be used with some caution.  The only time where this command comes in
2315 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2316 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2317 kill off all unsubscribed groups that do not have message numbers in the
2318 @file{.newsrc} file.
2319
2320 @end table
2321
2322 Also @pxref{Group Levels}.
2323
2324
2325 @node Group Data
2326 @section Group Data
2327
2328 @table @kbd
2329
2330 @item c
2331 @kindex c (Group)
2332 @findex gnus-group-catchup-current
2333 @vindex gnus-group-catchup-group-hook
2334 @c @icon{gnus-group-catchup-current}
2335 Mark all unticked articles in this group as read
2336 (@code{gnus-group-catchup-current}).
2337 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2338 the group buffer.
2339
2340 @item C
2341 @kindex C (Group)
2342 @findex gnus-group-catchup-current-all
2343 Mark all articles in this group, even the ticked ones, as read
2344 (@code{gnus-group-catchup-current-all}).
2345
2346 @item M-c
2347 @kindex M-c (Group)
2348 @findex gnus-group-clear-data
2349 Clear the data from the current group---nix out marks and the list of
2350 read articles (@code{gnus-group-clear-data}).
2351
2352 @item M-x gnus-group-clear-data-on-native-groups
2353 @kindex M-x gnus-group-clear-data-on-native-groups
2354 @findex gnus-group-clear-data-on-native-groups
2355 If you have switched from one @acronym{NNTP} server to another, all your marks
2356 and read ranges have become worthless.  You can use this command to
2357 clear out all data that you have on your native groups.  Use with
2358 caution.
2359
2360 @end table
2361
2362
2363 @node Group Levels
2364 @section Group Levels
2365 @cindex group level
2366 @cindex level
2367
2368 All groups have a level of @dfn{subscribedness}.  For instance, if a
2369 group is on level 2, it is more subscribed than a group on level 5.  You
2370 can ask Gnus to just list groups on a given level or lower
2371 (@pxref{Listing Groups}), or to just check for new articles in groups on
2372 a given level or lower (@pxref{Scanning New Messages}).
2373
2374 Remember:  The higher the level of the group, the less important it is.
2375
2376 @table @kbd
2377
2378 @item S l
2379 @kindex S l (Group)
2380 @findex gnus-group-set-current-level
2381 Set the level of the current group.  If a numeric prefix is given, the
2382 next @var{n} groups will have their levels set.  The user will be
2383 prompted for a level.
2384 @end table
2385
2386 @vindex gnus-level-killed
2387 @vindex gnus-level-zombie
2388 @vindex gnus-level-unsubscribed
2389 @vindex gnus-level-subscribed
2390 Gnus considers groups from levels 1 to
2391 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2392 @code{gnus-level-subscribed} (exclusive) and
2393 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2394 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2395 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2396 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2397 same, but zombie and killed groups have no information on what articles
2398 you have read, etc, stored.  This distinction between dead and living
2399 groups isn't done because it is nice or clever, it is done purely for
2400 reasons of efficiency.
2401
2402 It is recommended that you keep all your mail groups (if any) on quite
2403 low levels (e.g. 1 or 2).
2404
2405 Maybe the following description of the default behavior of Gnus helps to
2406 understand what these levels are all about.  By default, Gnus shows you
2407 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2408 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2409 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2410 groups are hidden, in a way.
2411
2412 Zombie and killed groups are similar to unsubscribed groups in that they
2413 are hidden by default.  But they are different from subscribed and
2414 unsubscribed groups in that Gnus doesn't ask the news server for
2415 information (number of messages, number of unread messages) on zombie
2416 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2417 aren't interested in.  If most groups are killed, Gnus is faster.
2418
2419 Why does Gnus distinguish between zombie and killed groups?  Well, when
2420 a new group arrives on the server, Gnus by default makes it a zombie
2421 group.  This means that you are normally not bothered with new groups,
2422 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2423 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2424 list of killed groups.)
2425
2426 If you want to play with the level variables, you should show some care.
2427 Set them once, and don't touch them ever again.  Better yet, don't touch
2428 them at all unless you know exactly what you're doing.
2429
2430 @vindex gnus-level-default-unsubscribed
2431 @vindex gnus-level-default-subscribed
2432 Two closely related variables are @code{gnus-level-default-subscribed}
2433 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2434 which are the levels that new groups will be put on if they are
2435 (un)subscribed.  These two variables should, of course, be inside the
2436 relevant valid ranges.
2437
2438 @vindex gnus-keep-same-level
2439 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2440 will only move to groups of the same level (or lower).  In
2441 particular, going from the last article in one group to the next group
2442 will go to the next group of the same level (or lower).  This might be
2443 handy if you want to read the most important groups before you read the
2444 rest.
2445
2446 If this variable is @code{best}, Gnus will make the next newsgroup the
2447 one with the best level.
2448
2449 @vindex gnus-group-default-list-level
2450 All groups with a level less than or equal to
2451 @code{gnus-group-default-list-level} will be listed in the group buffer
2452 by default.
2453
2454 @vindex gnus-group-list-inactive-groups
2455 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2456 groups will be listed along with the unread groups.  This variable is
2457 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2458 listed.
2459
2460 @vindex gnus-group-use-permanent-levels
2461 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2462 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2463 use this level as the ``work'' level.
2464
2465 @vindex gnus-activate-level
2466 Gnus will normally just activate (i. e., query the server about) groups
2467 on level @code{gnus-activate-level} or less.  If you don't want to
2468 activate unsubscribed groups, for instance, you might set this variable
2469 to 5.  The default is 6.
2470
2471
2472 @node Group Score
2473 @section Group Score
2474 @cindex group score
2475 @cindex group rank
2476 @cindex rank
2477
2478 You would normally keep important groups on high levels, but that scheme
2479 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2480 group buffer according to how often you read groups, perhaps?  Within
2481 reason?
2482
2483 This is what @dfn{group score} is for.  You can have Gnus assign a score
2484 to each group through the mechanism described below.  You can then sort
2485 the group buffer based on this score.  Alternatively, you can sort on
2486 score and then level.  (Taken together, the level and the score is
2487 called the @dfn{rank} of the group.  A group that is on level 4 and has
2488 a score of 1 has a higher rank than a group on level 5 that has a score
2489 of 300.  (The level is the most significant part and the score is the
2490 least significant part.))
2491
2492 @findex gnus-summary-bubble-group
2493 If you want groups you read often to get higher scores than groups you
2494 read seldom you can add the @code{gnus-summary-bubble-group} function to
2495 the @code{gnus-summary-exit-hook} hook.  This will result (after
2496 sorting) in a bubbling sort of action.  If you want to see that in
2497 action after each summary exit, you can add
2498 @code{gnus-group-sort-groups-by-rank} or
2499 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2500 slow things down somewhat.
2501
2502
2503 @node Marking Groups
2504 @section Marking Groups
2505 @cindex marking groups
2506
2507 If you want to perform some command on several groups, and they appear
2508 subsequently in the group buffer, you would normally just give a
2509 numerical prefix to the command.  Most group commands will then do your
2510 bidding on those groups.
2511
2512 However, if the groups are not in sequential order, you can still
2513 perform a command on several groups.  You simply mark the groups first
2514 with the process mark and then execute the command.
2515
2516 @table @kbd
2517
2518 @item #
2519 @kindex # (Group)
2520 @itemx M m
2521 @kindex M m (Group)
2522 @findex gnus-group-mark-group
2523 Set the mark on the current group (@code{gnus-group-mark-group}).
2524
2525 @item M-#
2526 @kindex M-# (Group)
2527 @itemx M u
2528 @kindex M u (Group)
2529 @findex gnus-group-unmark-group
2530 Remove the mark from the current group
2531 (@code{gnus-group-unmark-group}).
2532
2533 @item M U
2534 @kindex M U (Group)
2535 @findex gnus-group-unmark-all-groups
2536 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2537
2538 @item M w
2539 @kindex M w (Group)
2540 @findex gnus-group-mark-region
2541 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2542
2543 @item M b
2544 @kindex M b (Group)
2545 @findex gnus-group-mark-buffer
2546 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2547
2548 @item M r
2549 @kindex M r (Group)
2550 @findex gnus-group-mark-regexp
2551 Mark all groups that match some regular expression
2552 (@code{gnus-group-mark-regexp}).
2553 @end table
2554
2555 Also @pxref{Process/Prefix}.
2556
2557 @findex gnus-group-universal-argument
2558 If you want to execute some command on all groups that have been marked
2559 with the process mark, you can use the @kbd{M-&}
2560 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2561 the command to be executed.
2562
2563
2564 @node Foreign Groups
2565 @section Foreign Groups
2566 @cindex foreign groups
2567
2568 Below are some group mode commands for making and editing general foreign
2569 groups, as well as commands to ease the creation of a few
2570 special-purpose groups.  All these commands insert the newly created
2571 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2572 consulted.
2573
2574 Changes from the group editing commands are stored in
2575 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2576 variable @code{gnus-parameters}, @xref{Group Parameters}.
2577
2578 @table @kbd
2579
2580 @item G m
2581 @kindex G m (Group)
2582 @findex gnus-group-make-group
2583 @cindex making groups
2584 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2585 for a name, a method and possibly an @dfn{address}.  For an easier way
2586 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2587
2588 @item G M
2589 @kindex G M (Group)
2590 @findex gnus-group-read-ephemeral-group
2591 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2592 will prompt you for a name, a method and an @dfn{address}.
2593
2594 @item G r
2595 @kindex G r (Group)
2596 @findex gnus-group-rename-group
2597 @cindex renaming groups
2598 Rename the current group to something else
2599 (@code{gnus-group-rename-group}).  This is valid only on some
2600 groups---mail groups mostly.  This command might very well be quite slow
2601 on some back ends.
2602
2603 @item G c
2604 @kindex G c (Group)
2605 @cindex customizing
2606 @findex gnus-group-customize
2607 Customize the group parameters (@code{gnus-group-customize}).
2608
2609 @item G e
2610 @kindex G e (Group)
2611 @findex gnus-group-edit-group-method
2612 @cindex renaming groups
2613 Enter a buffer where you can edit the select method of the current
2614 group (@code{gnus-group-edit-group-method}).
2615
2616 @item G p
2617 @kindex G p (Group)
2618 @findex gnus-group-edit-group-parameters
2619 Enter a buffer where you can edit the group parameters
2620 (@code{gnus-group-edit-group-parameters}).
2621
2622 @item G E
2623 @kindex G E (Group)
2624 @findex gnus-group-edit-group
2625 Enter a buffer where you can edit the group info
2626 (@code{gnus-group-edit-group}).
2627
2628 @item G d
2629 @kindex G d (Group)
2630 @findex gnus-group-make-directory-group
2631 @cindex nndir
2632 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2633 for a directory name (@code{gnus-group-make-directory-group}).
2634
2635 @item G h
2636 @kindex G h (Group)
2637 @cindex help group
2638 @findex gnus-group-make-help-group
2639 Make the Gnus help group (@code{gnus-group-make-help-group}).
2640
2641 @item G a
2642 @kindex G a (Group)
2643 @cindex (ding) archive
2644 @cindex archive group
2645 @findex gnus-group-make-archive-group
2646 @vindex gnus-group-archive-directory
2647 @vindex gnus-group-recent-archive-directory
2648 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2649 default a group pointing to the most recent articles will be created
2650 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2651 group will be created from @code{gnus-group-archive-directory}.
2652
2653 @item G k
2654 @kindex G k (Group)
2655 @findex gnus-group-make-kiboze-group
2656 @cindex nnkiboze
2657 Make a kiboze group.  You will be prompted for a name, for a regexp to
2658 match groups to be ``included'' in the kiboze group, and a series of
2659 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2660 @xref{Kibozed Groups}.
2661
2662 @item G D
2663 @kindex G D (Group)
2664 @findex gnus-group-enter-directory
2665 @cindex nneething
2666 Read an arbitrary directory as if it were a newsgroup with the
2667 @code{nneething} back end (@code{gnus-group-enter-directory}).
2668 @xref{Anything Groups}.
2669
2670 @item G f
2671 @kindex G f (Group)
2672 @findex gnus-group-make-doc-group
2673 @cindex ClariNet Briefs
2674 @cindex nndoc
2675 Make a group based on some file or other
2676 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2677 command, you will be prompted for a file name and a file type.
2678 Currently supported types are @code{mbox}, @code{babyl},
2679 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2680 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2681 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2682 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2683 you run this command without a prefix, Gnus will guess at the file
2684 type.  @xref{Document Groups}.
2685
2686 @item G u
2687 @kindex G u (Group)
2688 @vindex gnus-useful-groups
2689 @findex gnus-group-make-useful-group
2690 Create one of the groups mentioned in @code{gnus-useful-groups}
2691 (@code{gnus-group-make-useful-group}).
2692
2693 @item G w
2694 @kindex G w (Group)
2695 @findex gnus-group-make-web-group
2696 @cindex Google
2697 @cindex nnweb
2698 @cindex gmane
2699 Make an ephemeral group based on a web search
2700 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2701 command, make a solid group instead.  You will be prompted for the
2702 search engine type and the search string.  Valid search engine types
2703 include @code{google}, @code{dejanews}, and @code{gmane}.
2704 @xref{Web Searches}.
2705
2706 If you use the @code{google} search engine, you can limit the search
2707 to a particular group by using a match string like
2708 @samp{shaving group:alt.sysadmin.recovery}.
2709
2710 @item G R
2711 @kindex G R (Group)
2712 @findex gnus-group-make-rss-group
2713 Make a group based on an @acronym{RSS} feed
2714 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2715 @xref{RSS}.
2716
2717 @item G DEL
2718 @kindex G DEL (Group)
2719 @findex gnus-group-delete-group
2720 This function will delete the current group
2721 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2722 actually delete all the articles in the group, and forcibly remove the
2723 group itself from the face of the Earth.  Use a prefix only if you are
2724 absolutely sure of what you are doing.  This command can't be used on
2725 read-only groups (like @code{nntp} groups), though.
2726
2727 @item G V
2728 @kindex G V (Group)
2729 @findex gnus-group-make-empty-virtual
2730 Make a new, fresh, empty @code{nnvirtual} group
2731 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2732
2733 @item G v
2734 @kindex G v (Group)
2735 @findex gnus-group-add-to-virtual
2736 Add the current group to an @code{nnvirtual} group
2737 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2738 @end table
2739
2740 @xref{Select Methods}, for more information on the various select
2741 methods.
2742
2743 @vindex gnus-activate-foreign-newsgroups
2744 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2745 Gnus will check all foreign groups with this level or lower at startup.
2746 This might take quite a while, especially if you subscribe to lots of
2747 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2748 @code{gnus-activate-level} also affects activation of foreign
2749 newsgroups.
2750
2751
2752 The following commands create ephemeral groups.  They can be called not
2753 only from the Group buffer, but in any Gnus buffer.
2754
2755 @table @code
2756 @item gnus-read-ephemeral-gmane-group
2757 @findex gnus-read-ephemeral-gmane-group
2758 @vindex gnus-gmane-group-download-format
2759 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2760 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2761 Gnus will prompt you for a group name, the start article number and an
2762 the article range.
2763
2764 @item gnus-read-ephemeral-gmane-group-url
2765 @findex gnus-read-ephemeral-gmane-group-url
2766 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2767 the group name and the article number and range are constructed from a
2768 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2769 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2770 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2771 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2772 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2773 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2774
2775 @item gnus-read-ephemeral-emacs-bug-group
2776 @findex gnus-read-ephemeral-emacs-bug-group
2777 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2778 bug number.  The default is the number at point.  The @acronym{URL} is
2779 specified in @code{gnus-bug-group-download-format-alist}.
2780
2781 @item gnus-read-ephemeral-debian-bug-group
2782 @findex gnus-read-ephemeral-debian-bug-group
2783 Read a Debian bug report in an ephemeral group.  Analog to
2784 @code{gnus-read-ephemeral-emacs-bug-group}.
2785 @end table
2786
2787 Some of these command are also useful for article buttons, @xref{Article
2788 Buttons}.
2789
2790 Here is an example:
2791 @lisp
2792 (require 'gnus-art)
2793 (add-to-list
2794  'gnus-button-alist
2795  '("#\\([0-9]+\\)\\>" 1
2796    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2797    gnus-read-ephemeral-emacs-bug-group 1))
2798 @end lisp
2799
2800
2801 @node Group Parameters
2802 @section Group Parameters
2803 @cindex group parameters
2804
2805 The group parameters store information local to a particular group.
2806
2807 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2808 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2809 presents you with a Customize-like interface.  The latter helps avoid
2810 silly Lisp errors.)  You might also be interested in reading about topic
2811 parameters (@pxref{Topic Parameters}).
2812 Additionally, you can set group parameters via the
2813 @code{gnus-parameters} variable, see below.
2814
2815 Here's an example group parameter list:
2816
2817 @example
2818 ((to-address . "ding@@gnus.org")
2819  (auto-expire . t))
2820 @end example
2821
2822 We see that each element consists of a ``dotted pair''---the thing before
2823 the dot is the key, while the thing after the dot is the value.  All the
2824 parameters have this form @emph{except} local variable specs, which are
2825 not dotted pairs, but proper lists.
2826
2827 Some parameters have correspondent customizable variables, each of which
2828 is an alist of regexps and values.
2829
2830 The following group parameters can be used:
2831
2832 @table @code
2833 @item to-address
2834 @cindex to-address
2835 Address used by when doing followups and new posts.
2836
2837 @example
2838 (to-address . "some@@where.com")
2839 @end example
2840
2841 This is primarily useful in mail groups that represent closed mailing
2842 lists---mailing lists where it's expected that everybody that writes to
2843 the mailing list is subscribed to it.  Since using this parameter
2844 ensures that the mail only goes to the mailing list itself, it means
2845 that members won't receive two copies of your followups.
2846
2847 Using @code{to-address} will actually work whether the group is foreign
2848 or not.  Let's say there's a group on the server that is called
2849 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2850 the articles from a mail-to-news gateway.  Posting directly to this
2851 group is therefore impossible---you have to send mail to the mailing
2852 list address instead.
2853
2854 See also @code{gnus-parameter-to-address-alist}.
2855
2856 @item to-list
2857 @cindex to-list
2858 Address used when doing @kbd{a} in that group.
2859
2860 @example
2861 (to-list . "some@@where.com")
2862 @end example
2863
2864 It is totally ignored
2865 when doing a followup---except that if it is present in a news group,
2866 you'll get mail group semantics when doing @kbd{f}.
2867
2868 If you do an @kbd{a} command in a mail group and you have neither a
2869 @code{to-list} group parameter nor a @code{to-address} group parameter,
2870 then a @code{to-list} group parameter will be added automatically upon
2871 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2872 @vindex gnus-add-to-list
2873
2874 @findex gnus-mailing-list-mode
2875 @cindex mail list groups
2876 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2877 entering summary buffer.
2878
2879 See also @code{gnus-parameter-to-list-alist}.
2880
2881 @anchor{subscribed}
2882 @item subscribed
2883 @cindex subscribed
2884 @cindex Mail-Followup-To
2885 @findex gnus-find-subscribed-addresses
2886 If this parameter is set to @code{t}, Gnus will consider the
2887 to-address and to-list parameters for this group as addresses of
2888 mailing lists you are subscribed to.  Giving Gnus this information is
2889 (only) a first step in getting it to generate correct Mail-Followup-To
2890 headers for your posts to these lists.  The second step is to put the
2891 following in your @file{.gnus.el}
2892
2893 @lisp
2894 (setq message-subscribed-address-functions
2895       '(gnus-find-subscribed-addresses))
2896 @end lisp
2897
2898 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2899 a complete treatment of available MFT support.
2900
2901 @item visible
2902 @cindex visible
2903 If the group parameter list has the element @code{(visible . t)},
2904 that group will always be visible in the Group buffer, regardless
2905 of whether it has any unread articles.
2906
2907 This parameter cannot be set via @code{gnus-parameters}. See
2908 @code{gnus-permanently-visible-groups} as an alternative.
2909
2910 @item broken-reply-to
2911 @cindex broken-reply-to
2912 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2913 headers in this group are to be ignored, and for the header to be hidden
2914 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2915 can be useful if you're reading a mailing list group where the listserv
2916 has inserted @code{Reply-To} headers that point back to the listserv
2917 itself.  That is broken behavior.  So there!
2918
2919 @item to-group
2920 @cindex to-group
2921 Elements like @code{(to-group . "some.group.name")} means that all
2922 posts in that group will be sent to @code{some.group.name}.
2923
2924 @item newsgroup
2925 @cindex newsgroup
2926 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2927 will treat all responses as if they were responses to news articles.
2928 This can be useful if you have a mail group that's really a mirror of a
2929 news group.
2930
2931 @item gcc-self
2932 @cindex gcc-self
2933 If @code{(gcc-self . t)} is present in the group parameter list, newly
2934 composed messages will be @code{Gcc}'d to the current group.  If
2935 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2936 generated, if @code{(gcc-self . "string")} is present, this string will
2937 be inserted literally as a @code{gcc} header.  This parameter takes
2938 precedence over any default @code{Gcc} rules as described later
2939 (@pxref{Archived Messages}).
2940
2941 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2942 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2943 doesn't accept articles.
2944
2945 @item auto-expire
2946 @cindex auto-expire
2947 @cindex expiring mail
2948 If the group parameter has an element that looks like @code{(auto-expire
2949 . t)}, all articles read will be marked as expirable.  For an
2950 alternative approach, @pxref{Expiring Mail}.
2951
2952 See also @code{gnus-auto-expirable-newsgroups}.
2953
2954 @item total-expire
2955 @cindex total-expire
2956 @cindex expiring mail
2957 If the group parameter has an element that looks like
2958 @code{(total-expire . t)}, all read articles will be put through the
2959 expiry process, even if they are not marked as expirable.  Use with
2960 caution.  Unread, ticked and dormant articles are not eligible for
2961 expiry.
2962
2963 See also @code{gnus-total-expirable-newsgroups}.
2964
2965 @item expiry-wait
2966 @cindex expiry-wait
2967 @vindex nnmail-expiry-wait-function
2968 If the group parameter has an element that looks like
2969 @code{(expiry-wait . 10)}, this value will override any
2970 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2971 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2972 can either be a number of days (not necessarily an integer) or the
2973 symbols @code{never} or @code{immediate}.
2974
2975 @item expiry-target
2976 @cindex expiry-target
2977 Where expired messages end up.  This parameter overrides
2978 @code{nnmail-expiry-target}.
2979
2980 @item score-file
2981 @cindex score file group parameter
2982 Elements that look like @code{(score-file . "file")} will make
2983 @file{file} into the current score file for the group in question.  All
2984 interactive score entries will be put into this file.
2985
2986 @item adapt-file
2987 @cindex adapt file group parameter
2988 Elements that look like @code{(adapt-file . "file")} will make
2989 @file{file} into the current adaptive file for the group in question.
2990 All adaptive score entries will be put into this file.
2991
2992 @item admin-address
2993 @cindex admin-address
2994 When unsubscribing from a mailing list you should never send the
2995 unsubscription notice to the mailing list itself.  Instead, you'd send
2996 messages to the administrative address.  This parameter allows you to
2997 put the admin address somewhere convenient.
2998
2999 @item display
3000 @cindex display
3001 Elements that look like @code{(display . MODE)} say which articles to
3002 display on entering the group.  Valid values are:
3003
3004 @table @code
3005 @item all
3006 Display all articles, both read and unread.
3007
3008 @item an integer
3009 Display the last @var{integer} articles in the group.  This is the same as
3010 entering the group with @kbd{C-u @var{integer}}.
3011
3012 @item default
3013 Display the default visible articles, which normally includes unread and
3014 ticked articles.
3015
3016 @item an array
3017 Display articles that satisfy a predicate.
3018
3019 Here are some examples:
3020
3021 @table @code
3022 @item [unread]
3023 Display only unread articles.
3024
3025 @item [not expire]
3026 Display everything except expirable articles.
3027
3028 @item [and (not reply) (not expire)]
3029 Display everything except expirable and articles you've already
3030 responded to.
3031 @end table
3032
3033 The available operators are @code{not}, @code{and} and @code{or}.
3034 Predicates include @code{tick}, @code{unsend}, @code{undownload},
3035 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3036 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3037 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3038
3039 @end table
3040
3041 The @code{display} parameter works by limiting the summary buffer to
3042 the subset specified.  You can pop the limit by using the @kbd{/ w}
3043 command (@pxref{Limiting}).
3044
3045 @item comment
3046 @cindex comment
3047 Elements that look like @code{(comment . "This is a comment")} are
3048 arbitrary comments on the group.  You can display comments in the
3049 group line (@pxref{Group Line Specification}).
3050
3051 @item charset
3052 @cindex charset
3053 Elements that look like @code{(charset . iso-8859-1)} will make
3054 @code{iso-8859-1} the default charset; that is, the charset that will be
3055 used for all articles that do not specify a charset.
3056
3057 See also @code{gnus-group-charset-alist}.
3058
3059 @item ignored-charsets
3060 @cindex ignored-charset
3061 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3062 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3063 default charset will be used for decoding articles.
3064
3065 See also @code{gnus-group-ignored-charsets-alist}.
3066
3067 @item posting-style
3068 @cindex posting-style
3069 You can store additional posting style information for this group
3070 here (@pxref{Posting Styles}).  The format is that of an entry in the
3071 @code{gnus-posting-styles} alist, except that there's no regexp matching
3072 the group name (of course).  Style elements in this group parameter will
3073 take precedence over the ones found in @code{gnus-posting-styles}.
3074
3075 For instance, if you want a funky name and signature in this group only,
3076 instead of hacking @code{gnus-posting-styles}, you could put something
3077 like this in the group parameters:
3078
3079 @example
3080 (posting-style
3081   (name "Funky Name")
3082   ("X-My-Header" "Funky Value")
3083   (signature "Funky Signature"))
3084 @end example
3085
3086 If you're using topics to organize your group buffer
3087 (@pxref{Group Topics}), note that posting styles can also be set in
3088 the topics parameters. Posting styles in topic parameters apply to all
3089 groups in this topic. More precisely, the posting-style settings for a
3090 group result from the hierarchical merging of all posting-style
3091 entries in the parameters of this group and all the topics it belongs
3092 to.
3093
3094
3095 @item post-method
3096 @cindex post-method
3097 If it is set, the value is used as the method for posting message
3098 instead of @code{gnus-post-method}.
3099
3100 @item mail-source
3101 @cindex mail-source
3102 If it is set, and the setting of @code{mail-sources} includes a
3103 @code{group} mail source (@pxref{Mail Sources}), the value is a
3104 mail source for this group.
3105
3106 @item banner
3107 @cindex banner
3108 An item like @code{(banner . @var{regexp})} causes any part of an article
3109 that matches the regular expression @var{regexp} to be stripped.  Instead of
3110 @var{regexp}, you can also use the symbol @code{signature} which strips the
3111 last signature or any of the elements of the alist
3112 @code{gnus-article-banner-alist}.
3113
3114 @item sieve
3115 @cindex sieve
3116 This parameter contains a Sieve test that should match incoming mail
3117 that should be placed in this group.  From this group parameter, a
3118 Sieve @samp{IF} control structure is generated, having the test as the
3119 condition and @samp{fileinto "group.name";} as the body.
3120
3121 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3122 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3123 translating the group parameter into a Sieve script (@pxref{Sieve
3124 Commands}) the following Sieve code is generated:
3125
3126 @example
3127 if address "sender" "sieve-admin@@extundo.com" @{
3128         fileinto "INBOX.list.sieve";
3129 @}
3130 @end example
3131
3132 To generate tests for multiple email-addresses use a group parameter
3133 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3134 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3135 like the following is generated:
3136
3137 @example
3138 if address "sender" ["name@@one.org", "else@@two.org"] @{
3139         fileinto "INBOX.list.sieve";
3140 @}
3141 @end example
3142
3143 See @pxref{Sieve Commands} for commands and variables that might be of
3144 interest in relation to the sieve parameter.
3145
3146 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3147 Top, sieve, Emacs Sieve}.
3148
3149 @item (agent parameters)
3150 If the agent has been enabled, you can set any of the its parameters
3151 to control the behavior of the agent in individual groups. See Agent
3152 Parameters in @ref{Category Syntax}.  Most users will choose to set
3153 agent parameters in either an agent category or group topic to
3154 minimize the configuration effort.
3155
3156 @item (@var{variable} @var{form})
3157 You can use the group parameters to set variables local to the group you
3158 are entering.  If you want to turn threading off in @samp{news.answers},
3159 you could put @code{(gnus-show-threads nil)} in the group parameters of
3160 that group.  @code{gnus-show-threads} will be made into a local variable
3161 in the summary buffer you enter, and the form @code{nil} will be
3162 @code{eval}ed there.
3163
3164 Note that this feature sets the variable locally to the summary buffer.
3165 But some variables are evaluated in the article buffer, or in the
3166 message buffer (of a reply or followup or otherwise newly created
3167 message).  As a workaround, it might help to add the variable in
3168 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3169 Stuff}.  So if you want to set @code{message-from-style} via the group
3170 parameters, then you may need the following statement elsewhere in your
3171 @file{~/.gnus.el} file:
3172
3173 @lisp
3174 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3175 @end lisp
3176
3177 @vindex gnus-list-identifiers
3178 A use for this feature is to remove a mailing list identifier tag in
3179 the subject fields of articles.  E.g. if the news group
3180
3181 @example
3182 nntp+news.gnus.org:gmane.text.docbook.apps
3183 @end example
3184
3185 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3186 tag can be removed from the article subjects in the summary buffer for
3187 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3188 into the group parameters for the group.
3189
3190 This can also be used as a group-specific hook function.  If you want to
3191 hear a beep when you enter a group, you could put something like
3192 @code{(dummy-variable (ding))} in the parameters of that group.
3193 @code{dummy-variable} will be set to the (meaningless) result of the
3194 @code{(ding)} form.
3195
3196 Alternatively, since the VARIABLE becomes local to the group, this
3197 pattern can be used to temporarily change a hook.  For example, if the
3198 following is added to a group parameter
3199
3200 @lisp
3201 (gnus-summary-prepared-hook
3202   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3203 @end lisp
3204
3205 when the group is entered, the 'd' key will not mark the article as
3206 expired.
3207
3208 @end table
3209
3210 @vindex gnus-parameters
3211 Group parameters can be set via the @code{gnus-parameters} variable too.
3212 But some variables, such as @code{visible}, have no effect (For this
3213 case see @code{gnus-permanently-visible-groups} as an alternative.).
3214 For example:
3215
3216 @lisp
3217 (setq gnus-parameters
3218       '(("mail\\..*"
3219          (gnus-show-threads nil)
3220          (gnus-use-scoring nil)
3221          (gnus-summary-line-format
3222           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3223          (gcc-self . t)
3224          (display . all))
3225
3226         ("^nnimap:\\(foo.bar\\)$"
3227          (to-group . "\\1"))
3228
3229         ("mail\\.me"
3230          (gnus-use-scoring  t))
3231
3232         ("list\\..*"
3233          (total-expire . t)
3234          (broken-reply-to . t))))
3235 @end lisp
3236
3237 String value of parameters will be subjected to regexp substitution, as
3238 the @code{to-group} example shows.
3239
3240 @vindex gnus-parameters-case-fold-search
3241 By default, whether comparing the group name and one of those regexps
3242 specified in @code{gnus-parameters} is done in a case-sensitive manner
3243 or a case-insensitive manner depends on the value of
3244 @code{case-fold-search} at the time when the comparison is done.  The
3245 value of @code{case-fold-search} is typically @code{t}; it means, for
3246 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3247 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3248 group.  If you want to make those regexps always case-sensitive, set the
3249 value of the @code{gnus-parameters-case-fold-search} variable to
3250 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3251 always in a case-insensitive manner.
3252
3253 You can define different sorting to different groups via
3254 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3255 group by reverse date to see the latest news at the top and an
3256 @acronym{RSS} group by subject.  In this example, the first group is the
3257 Debian daily news group @code{gmane.linux.debian.user.news} from
3258 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3259 weekly news RSS feed
3260 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3261 @xref{RSS}.
3262
3263 @lisp
3264 (setq
3265  gnus-parameters
3266  '(("nntp.*gmane\\.debian\\.user\\.news"
3267     (gnus-show-threads nil)
3268     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3269     (gnus-use-adaptive-scoring nil)
3270     (gnus-use-scoring nil))
3271    ("nnrss.*debian"
3272     (gnus-show-threads nil)
3273     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3274     (gnus-use-adaptive-scoring nil)
3275     (gnus-use-scoring t)
3276     (gnus-score-find-score-files-function 'gnus-score-find-single)
3277     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3278 @end lisp
3279
3280
3281 @node Listing Groups
3282 @section Listing Groups
3283 @cindex group listing
3284
3285 These commands all list various slices of the groups available.
3286
3287 @table @kbd
3288
3289 @item l
3290 @itemx A s
3291 @kindex A s (Group)
3292 @kindex l (Group)
3293 @findex gnus-group-list-groups
3294 List all groups that have unread articles
3295 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3296 command will list only groups of level ARG and lower.  By default, it
3297 only lists groups of level five (i.e.,
3298 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3299 groups).
3300
3301 @item L
3302 @itemx A u
3303 @kindex A u (Group)
3304 @kindex L (Group)
3305 @findex gnus-group-list-all-groups
3306 List all groups, whether they have unread articles or not
3307 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3308 this command will list only groups of level ARG and lower.  By default,
3309 it lists groups of level seven or lower (i.e., just subscribed and
3310 unsubscribed groups).
3311
3312 @item A l
3313 @kindex A l (Group)
3314 @findex gnus-group-list-level
3315 List all unread groups on a specific level
3316 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3317 with no unread articles.
3318
3319 @item A k
3320 @kindex A k (Group)
3321 @findex gnus-group-list-killed
3322 List all killed groups (@code{gnus-group-list-killed}).  If given a
3323 prefix argument, really list all groups that are available, but aren't
3324 currently (un)subscribed.  This could entail reading the active file
3325 from the server.
3326
3327 @item A z
3328 @kindex A z (Group)
3329 @findex gnus-group-list-zombies
3330 List all zombie groups (@code{gnus-group-list-zombies}).
3331
3332 @item A m
3333 @kindex A m (Group)
3334 @findex gnus-group-list-matching
3335 List all unread, subscribed groups with names that match a regexp
3336 (@code{gnus-group-list-matching}).
3337
3338 @item A M
3339 @kindex A M (Group)
3340 @findex gnus-group-list-all-matching
3341 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3342
3343 @item A A
3344 @kindex A A (Group)
3345 @findex gnus-group-list-active
3346 List absolutely all groups in the active file(s) of the
3347 server(s) you are connected to (@code{gnus-group-list-active}).  This
3348 might very well take quite a while.  It might actually be a better idea
3349 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3350 thing to match on.  Also note that this command may list groups that
3351 don't exist (yet)---these will be listed as if they were killed groups.
3352 Take the output with some grains of salt.
3353
3354 @item A a
3355 @kindex A a (Group)
3356 @findex gnus-group-apropos
3357 List all groups that have names that match a regexp
3358 (@code{gnus-group-apropos}).
3359
3360 @item A d
3361 @kindex A d (Group)
3362 @findex gnus-group-description-apropos
3363 List all groups that have names or descriptions that match a regexp
3364 (@code{gnus-group-description-apropos}).
3365
3366 @item A c
3367 @kindex A c (Group)
3368 @findex gnus-group-list-cached
3369 List all groups with cached articles (@code{gnus-group-list-cached}).
3370
3371 @item A ?
3372 @kindex A ? (Group)
3373 @findex gnus-group-list-dormant
3374 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3375
3376 @item A /
3377 @kindex A / (Group)
3378 @findex gnus-group-list-limit
3379 List groups limited within the current selection
3380 (@code{gnus-group-list-limit}).
3381
3382 @item A f
3383 @kindex A f (Group)
3384 @findex gnus-group-list-flush
3385 Flush groups from the current selection (@code{gnus-group-list-flush}).
3386
3387 @item A p
3388 @kindex A p (Group)
3389 @findex gnus-group-list-plus
3390 List groups plus the current selection (@code{gnus-group-list-plus}).
3391
3392 @end table
3393
3394 @vindex gnus-permanently-visible-groups
3395 @cindex visible group parameter
3396 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3397 always be shown, whether they have unread articles or not.  You can also
3398 add the @code{visible} element to the group parameters in question to
3399 get the same effect.
3400
3401 @vindex gnus-list-groups-with-ticked-articles
3402 Groups that have just ticked articles in it are normally listed in the
3403 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3404 @code{nil}, these groups will be treated just like totally empty
3405 groups.  It is @code{t} by default.
3406
3407
3408 @node Sorting Groups
3409 @section Sorting Groups
3410 @cindex sorting groups
3411
3412 @kindex C-c C-s (Group)
3413 @findex gnus-group-sort-groups
3414 @vindex gnus-group-sort-function
3415 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3416 group buffer according to the function(s) given by the
3417 @code{gnus-group-sort-function} variable.  Available sorting functions
3418 include:
3419
3420 @table @code
3421
3422 @item gnus-group-sort-by-alphabet
3423 @findex gnus-group-sort-by-alphabet
3424 Sort the group names alphabetically.  This is the default.
3425
3426 @item gnus-group-sort-by-real-name
3427 @findex gnus-group-sort-by-real-name
3428 Sort the group alphabetically on the real (unprefixed) group names.
3429
3430 @item gnus-group-sort-by-level
3431 @findex gnus-group-sort-by-level
3432 Sort by group level.
3433
3434 @item gnus-group-sort-by-score
3435 @findex gnus-group-sort-by-score
3436 Sort by group score.  @xref{Group Score}.
3437
3438 @item gnus-group-sort-by-rank
3439 @findex gnus-group-sort-by-rank
3440 Sort by group score and then the group level.  The level and the score
3441 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3442
3443 @item gnus-group-sort-by-unread
3444 @findex gnus-group-sort-by-unread
3445 Sort by number of unread articles.
3446
3447 @item gnus-group-sort-by-method
3448 @findex gnus-group-sort-by-method
3449 Sort alphabetically on the select method.
3450
3451 @item gnus-group-sort-by-server
3452 @findex gnus-group-sort-by-server
3453 Sort alphabetically on the Gnus server name.
3454
3455
3456 @end table
3457
3458 @code{gnus-group-sort-function} can also be a list of sorting
3459 functions.  In that case, the most significant sort key function must be
3460 the last one.
3461
3462
3463 There are also a number of commands for sorting directly according to
3464 some sorting criteria:
3465
3466 @table @kbd
3467 @item G S a
3468 @kindex G S a (Group)
3469 @findex gnus-group-sort-groups-by-alphabet
3470 Sort the group buffer alphabetically by group name
3471 (@code{gnus-group-sort-groups-by-alphabet}).
3472
3473 @item G S u
3474 @kindex G S u (Group)
3475 @findex gnus-group-sort-groups-by-unread
3476 Sort the group buffer by the number of unread articles
3477 (@code{gnus-group-sort-groups-by-unread}).
3478
3479 @item G S l
3480 @kindex G S l (Group)
3481 @findex gnus-group-sort-groups-by-level
3482 Sort the group buffer by group level
3483 (@code{gnus-group-sort-groups-by-level}).
3484
3485 @item G S v
3486 @kindex G S v (Group)
3487 @findex gnus-group-sort-groups-by-score
3488 Sort the group buffer by group score
3489 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3490
3491 @item G S r
3492 @kindex G S r (Group)
3493 @findex gnus-group-sort-groups-by-rank
3494 Sort the group buffer by group rank
3495 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3496
3497 @item G S m
3498 @kindex G S m (Group)
3499 @findex gnus-group-sort-groups-by-method
3500 Sort the group buffer alphabetically by back end name@*
3501 (@code{gnus-group-sort-groups-by-method}).
3502
3503 @item G S n
3504 @kindex G S n (Group)
3505 @findex gnus-group-sort-groups-by-real-name
3506 Sort the group buffer alphabetically by real (unprefixed) group name
3507 (@code{gnus-group-sort-groups-by-real-name}).
3508
3509 @end table
3510
3511 All the commands below obey the process/prefix convention
3512 (@pxref{Process/Prefix}).
3513
3514 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3515 commands will sort in reverse order.
3516
3517 You can also sort a subset of the groups:
3518
3519 @table @kbd
3520 @item G P a
3521 @kindex G P a (Group)
3522 @findex gnus-group-sort-selected-groups-by-alphabet
3523 Sort the groups alphabetically by group name
3524 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3525
3526 @item G P u
3527 @kindex G P u (Group)
3528 @findex gnus-group-sort-selected-groups-by-unread
3529 Sort the groups by the number of unread articles
3530 (@code{gnus-group-sort-selected-groups-by-unread}).
3531
3532 @item G P l
3533 @kindex G P l (Group)
3534 @findex gnus-group-sort-selected-groups-by-level
3535 Sort the groups by group level
3536 (@code{gnus-group-sort-selected-groups-by-level}).
3537
3538 @item G P v
3539 @kindex G P v (Group)
3540 @findex gnus-group-sort-selected-groups-by-score
3541 Sort the groups by group score
3542 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3543
3544 @item G P r
3545 @kindex G P r (Group)
3546 @findex gnus-group-sort-selected-groups-by-rank
3547 Sort the groups by group rank
3548 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3549
3550 @item G P m
3551 @kindex G P m (Group)
3552 @findex gnus-group-sort-selected-groups-by-method
3553 Sort the groups alphabetically by back end name@*
3554 (@code{gnus-group-sort-selected-groups-by-method}).
3555
3556 @item G P n
3557 @kindex G P n (Group)
3558 @findex gnus-group-sort-selected-groups-by-real-name
3559 Sort the groups alphabetically by real (unprefixed) group name
3560 (@code{gnus-group-sort-selected-groups-by-real-name}).
3561
3562 @item G P s
3563 @kindex G P s (Group)
3564 @findex gnus-group-sort-selected-groups
3565 Sort the groups according to @code{gnus-group-sort-function}.
3566
3567 @end table
3568
3569 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3570 move groups around.
3571
3572
3573 @node Group Maintenance
3574 @section Group Maintenance
3575 @cindex bogus groups
3576
3577 @table @kbd
3578 @item b
3579 @kindex b (Group)
3580 @findex gnus-group-check-bogus-groups
3581 Find bogus groups and delete them
3582 (@code{gnus-group-check-bogus-groups}).
3583
3584 @item F
3585 @kindex F (Group)
3586 @findex gnus-group-find-new-groups
3587 Find new groups and process them (@code{gnus-group-find-new-groups}).
3588 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3589 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3590 to query the server for new groups, and subscribe the new groups as
3591 zombies.
3592
3593 @item C-c C-x
3594 @kindex C-c C-x (Group)
3595 @findex gnus-group-expire-articles
3596 @cindex expiring mail
3597 Run all expirable articles in the current group through the expiry
3598 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3599 all expirable articles in the group that have been around for a while.
3600 (@pxref{Expiring Mail}).
3601
3602 @item C-c C-M-x
3603 @kindex C-c C-M-x (Group)
3604 @findex gnus-group-expire-all-groups
3605 @cindex expiring mail
3606 Run all expirable articles in all groups through the expiry process
3607 (@code{gnus-group-expire-all-groups}).
3608
3609 @end table
3610
3611
3612 @node Browse Foreign Server
3613 @section Browse Foreign Server
3614 @cindex foreign servers
3615 @cindex browsing servers
3616
3617 @table @kbd
3618 @item B
3619 @kindex B (Group)
3620 @findex gnus-group-browse-foreign-server
3621 You will be queried for a select method and a server name.  Gnus will
3622 then attempt to contact this server and let you browse the groups there
3623 (@code{gnus-group-browse-foreign-server}).
3624 @end table
3625
3626 @findex gnus-browse-mode
3627 A new buffer with a list of available groups will appear.  This buffer
3628 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3629 a lot) like a normal group buffer.
3630
3631 Here's a list of keystrokes available in the browse mode:
3632
3633 @table @kbd
3634 @item n
3635 @kindex n (Browse)
3636 @findex gnus-group-next-group
3637 Go to the next group (@code{gnus-group-next-group}).
3638
3639 @item p
3640 @kindex p (Browse)
3641 @findex gnus-group-prev-group
3642 Go to the previous group (@code{gnus-group-prev-group}).
3643
3644 @item SPACE
3645 @kindex SPACE (Browse)
3646 @findex gnus-browse-read-group
3647 Enter the current group and display the first article
3648 (@code{gnus-browse-read-group}).
3649
3650 @item RET
3651 @kindex RET (Browse)
3652 @findex gnus-browse-select-group
3653 Enter the current group (@code{gnus-browse-select-group}).
3654
3655 @item u
3656 @kindex u (Browse)
3657 @findex gnus-browse-unsubscribe-current-group
3658 Unsubscribe to the current group, or, as will be the case here,
3659 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3660
3661 @item l
3662 @itemx q
3663 @kindex q (Browse)
3664 @kindex l (Browse)
3665 @findex gnus-browse-exit
3666 Exit browse mode (@code{gnus-browse-exit}).
3667
3668 @item d
3669 @kindex d (Browse)
3670 @findex gnus-browse-describe-group
3671 Describe the current group (@code{gnus-browse-describe-group}).
3672
3673 @item ?
3674 @kindex ? (Browse)
3675 @findex gnus-browse-describe-briefly
3676 Describe browse mode briefly (well, there's not much to describe, is
3677 there) (@code{gnus-browse-describe-briefly}).
3678 @end table
3679
3680
3681 @node Exiting Gnus
3682 @section Exiting Gnus
3683 @cindex exiting Gnus
3684
3685 Yes, Gnus is ex(c)iting.
3686
3687 @table @kbd
3688 @item z
3689 @kindex z (Group)
3690 @findex gnus-group-suspend
3691 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3692 but it kills all buffers except the Group buffer.  I'm not sure why this
3693 is a gain, but then who am I to judge?
3694
3695 @item q
3696 @kindex q (Group)
3697 @findex gnus-group-exit
3698 @c @icon{gnus-group-exit}
3699 Quit Gnus (@code{gnus-group-exit}).
3700
3701 @item Q
3702 @kindex Q (Group)
3703 @findex gnus-group-quit
3704 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3705 The dribble file will be saved, though (@pxref{Auto Save}).
3706 @end table
3707
3708 @vindex gnus-exit-gnus-hook
3709 @vindex gnus-suspend-gnus-hook
3710 @vindex gnus-after-exiting-gnus-hook
3711 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3712 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3713 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3714 exiting Gnus.
3715
3716 Note:
3717
3718 @quotation
3719 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3720 numbly heavy and herself fall into a hazy trance as the boy sitting
3721 behind her drew repeated lines with his pencil across the back of her
3722 plastic chair.
3723 @end quotation
3724
3725
3726 @node Group Topics
3727 @section Group Topics
3728 @cindex topics
3729
3730 If you read lots and lots of groups, it might be convenient to group
3731 them hierarchically according to topics.  You put your Emacs groups over
3732 here, your sex groups over there, and the rest (what, two groups or so?)
3733 you put in some misc section that you never bother with anyway.  You can
3734 even group the Emacs sex groups as a sub-topic to either the Emacs
3735 groups or the sex groups---or both!  Go wild!
3736
3737 @iftex
3738 @iflatex
3739 \gnusfigure{Group Topics}{400}{
3740 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3741 }
3742 @end iflatex
3743 @end iftex
3744
3745 Here's an example:
3746
3747 @example
3748 Gnus
3749   Emacs -- I wuw it!
3750      3: comp.emacs
3751      2: alt.religion.emacs
3752     Naughty Emacs
3753      452: alt.sex.emacs
3754        0: comp.talk.emacs.recovery
3755   Misc
3756      8: comp.binaries.fractals
3757     13: comp.sources.unix
3758 @end example
3759
3760 @findex gnus-topic-mode
3761 @kindex t (Group)
3762 To get this @emph{fab} functionality you simply turn on (ooh!) the
3763 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3764 is a toggling command.)
3765
3766 Go ahead, just try it.  I'll still be here when you get back.  La de
3767 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3768 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3769 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3770 Hot and bothered?
3771
3772 If you want this permanently enabled, you should add that minor mode to
3773 the hook for the group mode.  Put the following line in your
3774 @file{~/.gnus.el} file:
3775
3776 @lisp
3777 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3778 @end lisp
3779
3780 @menu
3781 * Topic Commands::              Interactive E-Z commands.
3782 * Topic Variables::             How to customize the topics the Lisp Way.
3783 * Topic Sorting::               Sorting each topic individually.
3784 * Topic Topology::              A map of the world.
3785 * Topic Parameters::            Parameters that apply to all groups in a topic.
3786 @end menu
3787
3788
3789 @node Topic Commands
3790 @subsection Topic Commands
3791 @cindex topic commands
3792
3793 When the topic minor mode is turned on, a new @kbd{T} submap will be
3794 available.  In addition, a few of the standard keys change their
3795 definitions slightly.
3796
3797 In general, the following kinds of operations are possible on topics.
3798 First of all, you want to create topics.  Secondly, you want to put
3799 groups in topics and to move them around until you have an order you
3800 like.  The third kind of operation is to show/hide parts of the whole
3801 shebang.  You might want to hide a topic including its subtopics and
3802 groups, to get a better overview of the other groups.
3803
3804 Here is a list of the basic keys that you might need to set up topics
3805 the way you like.
3806
3807 @table @kbd
3808
3809 @item T n
3810 @kindex T n (Topic)
3811 @findex gnus-topic-create-topic
3812 Prompt for a new topic name and create it
3813 (@code{gnus-topic-create-topic}).
3814
3815 @item T TAB
3816 @itemx TAB
3817 @kindex T TAB (Topic)
3818 @kindex TAB (Topic)
3819 @findex gnus-topic-indent
3820 ``Indent'' the current topic so that it becomes a sub-topic of the
3821 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3822 ``un-indent'' the topic instead.
3823
3824 @item M-TAB
3825 @kindex M-TAB (Topic)
3826 @findex gnus-topic-unindent
3827 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3828 parent of its current parent (@code{gnus-topic-unindent}).
3829
3830 @end table
3831
3832 The following two keys can be used to move groups and topics around.
3833 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3834 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3835 kill and yank rather than cut and paste.
3836
3837 @table @kbd
3838
3839 @item C-k
3840 @kindex C-k (Topic)
3841 @findex gnus-topic-kill-group
3842 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3843 topic will be removed along with the topic.
3844
3845 @item C-y
3846 @kindex C-y (Topic)
3847 @findex gnus-topic-yank-group
3848 Yank the previously killed group or topic
3849 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3850 before all groups.
3851
3852 So, to move a topic to the beginning of the list of topics, just hit
3853 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3854 move the cursor to the beginning of the buffer (just below the ``Gnus''
3855 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3856 paste.  Like I said -- E-Z.
3857
3858 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3859 you can move topics around as well as groups.
3860
3861 @end table
3862
3863 After setting up the topics the way you like them, you might wish to
3864 hide a topic, or to show it again.  That's why we have the following
3865 key.
3866
3867 @table @kbd
3868
3869 @item RET
3870 @kindex RET (Topic)
3871 @findex gnus-topic-select-group
3872 @itemx SPACE
3873 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3874 When you perform this command on a group, you'll enter the group, as
3875 usual.  When done on a topic line, the topic will be folded (if it was
3876 visible) or unfolded (if it was folded already).  So it's basically a
3877 toggling command on topics.  In addition, if you give a numerical
3878 prefix, group on that level (and lower) will be displayed.
3879
3880 @end table
3881
3882 Now for a list of other commands, in no particular order.
3883
3884 @table @kbd
3885
3886 @item T m
3887 @kindex T m (Topic)
3888 @findex gnus-topic-move-group
3889 Move the current group to some other topic
3890 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3891 convention (@pxref{Process/Prefix}).
3892
3893 @item T j
3894 @kindex T j (Topic)
3895 @findex gnus-topic-jump-to-topic
3896 Go to a topic (@code{gnus-topic-jump-to-topic}).
3897
3898 @item T c
3899 @kindex T c (Topic)
3900 @findex gnus-topic-copy-group
3901 Copy the current group to some other topic
3902 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3903 convention (@pxref{Process/Prefix}).
3904
3905 @item T h
3906 @kindex T h (Topic)
3907 @findex gnus-topic-hide-topic
3908 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3909 a prefix, hide the topic permanently.
3910
3911 @item T s
3912 @kindex T s (Topic)
3913 @findex gnus-topic-show-topic
3914 Show the current topic (@code{gnus-topic-show-topic}).  If given
3915 a prefix, show the topic permanently.
3916
3917 @item T D
3918 @kindex T D (Topic)
3919 @findex gnus-topic-remove-group
3920 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3921 This command is mainly useful if you have the same group in several
3922 topics and wish to remove it from one of the topics.  You may also
3923 remove a group from all topics, but in that case, Gnus will add it to
3924 the root topic the next time you start Gnus.  In fact, all new groups
3925 (which, naturally, don't belong to any topic) will show up in the root
3926 topic.
3927
3928 This command uses the process/prefix convention
3929 (@pxref{Process/Prefix}).
3930
3931 @item T M
3932 @kindex T M (Topic)
3933 @findex gnus-topic-move-matching
3934 Move all groups that match some regular expression to a topic
3935 (@code{gnus-topic-move-matching}).
3936
3937 @item T C
3938 @kindex T C (Topic)
3939 @findex gnus-topic-copy-matching
3940 Copy all groups that match some regular expression to a topic
3941 (@code{gnus-topic-copy-matching}).
3942
3943 @item T H
3944 @kindex T H (Topic)
3945 @findex gnus-topic-toggle-display-empty-topics
3946 Toggle hiding empty topics
3947 (@code{gnus-topic-toggle-display-empty-topics}).
3948
3949 @item T #
3950 @kindex T # (Topic)
3951 @findex gnus-topic-mark-topic
3952 Mark all groups in the current topic with the process mark
3953 (@code{gnus-topic-mark-topic}).  This command works recursively on
3954 sub-topics unless given a prefix.
3955
3956 @item T M-#
3957 @kindex T M-# (Topic)
3958 @findex gnus-topic-unmark-topic
3959 Remove the process mark from all groups in the current topic
3960 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3961 sub-topics unless given a prefix.
3962
3963 @item C-c C-x
3964 @kindex C-c C-x (Topic)
3965 @findex gnus-topic-expire-articles
3966 @cindex expiring mail
3967 Run all expirable articles in the current group or topic through the
3968 expiry process (if any)
3969 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3970
3971 @item T r
3972 @kindex T r (Topic)
3973 @findex gnus-topic-rename
3974 Rename a topic (@code{gnus-topic-rename}).
3975
3976 @item T DEL
3977 @kindex T DEL (Topic)
3978 @findex gnus-topic-delete
3979 Delete an empty topic (@code{gnus-topic-delete}).
3980
3981 @item A T
3982 @kindex A T (Topic)
3983 @findex gnus-topic-list-active
3984 List all groups that Gnus knows about in a topics-ified way
3985 (@code{gnus-topic-list-active}).
3986
3987 @item T M-n
3988 @kindex T M-n (Topic)
3989 @findex gnus-topic-goto-next-topic
3990 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3991
3992 @item T M-p
3993 @kindex T M-p (Topic)
3994 @findex gnus-topic-goto-previous-topic
3995 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3996
3997 @item G p
3998 @kindex G p (Topic)
3999 @findex gnus-topic-edit-parameters
4000 @cindex group parameters
4001 @cindex topic parameters
4002 @cindex parameters
4003 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
4004 @xref{Topic Parameters}.
4005
4006 @end table
4007
4008
4009 @node Topic Variables
4010 @subsection Topic Variables
4011 @cindex topic variables
4012
4013 The previous section told you how to tell Gnus which topics to display.
4014 This section explains how to tell Gnus what to display about each topic.
4015
4016 @vindex gnus-topic-line-format
4017 The topic lines themselves are created according to the
4018 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4019 Valid elements are:
4020
4021 @table @samp
4022 @item i
4023 Indentation.
4024 @item n
4025 Topic name.
4026 @item v
4027 Visibility.
4028 @item l
4029 Level.
4030 @item g
4031 Number of groups in the topic.
4032 @item a
4033 Number of unread articles in the topic.
4034 @item A
4035 Number of unread articles in the topic and all its subtopics.
4036 @end table
4037
4038 @vindex gnus-topic-indent-level
4039 Each sub-topic (and the groups in the sub-topics) will be indented with
4040 @code{gnus-topic-indent-level} times the topic level number of spaces.
4041 The default is 2.
4042
4043 @vindex gnus-topic-mode-hook
4044 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4045
4046 @vindex gnus-topic-display-empty-topics
4047 The @code{gnus-topic-display-empty-topics} says whether to display even
4048 topics that have no unread articles in them.  The default is @code{t}.
4049
4050
4051 @node Topic Sorting
4052 @subsection Topic Sorting
4053 @cindex topic sorting
4054
4055 You can sort the groups in each topic individually with the following
4056 commands:
4057
4058
4059 @table @kbd
4060 @item T S a
4061 @kindex T S a (Topic)
4062 @findex gnus-topic-sort-groups-by-alphabet
4063 Sort the current topic alphabetically by group name
4064 (@code{gnus-topic-sort-groups-by-alphabet}).
4065
4066 @item T S u
4067 @kindex T S u (Topic)
4068 @findex gnus-topic-sort-groups-by-unread
4069 Sort the current topic by the number of unread articles
4070 (@code{gnus-topic-sort-groups-by-unread}).
4071
4072 @item T S l
4073 @kindex T S l (Topic)
4074 @findex gnus-topic-sort-groups-by-level
4075 Sort the current topic by group level
4076 (@code{gnus-topic-sort-groups-by-level}).
4077
4078 @item T S v
4079 @kindex T S v (Topic)
4080 @findex gnus-topic-sort-groups-by-score
4081 Sort the current topic by group score
4082 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4083
4084 @item T S r
4085 @kindex T S r (Topic)
4086 @findex gnus-topic-sort-groups-by-rank
4087 Sort the current topic by group rank
4088 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4089
4090 @item T S m
4091 @kindex T S m (Topic)
4092 @findex gnus-topic-sort-groups-by-method
4093 Sort the current topic alphabetically by back end name
4094 (@code{gnus-topic-sort-groups-by-method}).
4095
4096 @item T S e
4097 @kindex T S e (Topic)
4098 @findex gnus-topic-sort-groups-by-server
4099 Sort the current topic alphabetically by server name
4100 (@code{gnus-topic-sort-groups-by-server}).
4101
4102 @item T S s
4103 @kindex T S s (Topic)
4104 @findex gnus-topic-sort-groups
4105 Sort the current topic according to the function(s) given by the
4106 @code{gnus-group-sort-function} variable
4107 (@code{gnus-topic-sort-groups}).
4108
4109 @end table
4110
4111 When given a prefix argument, all these commands will sort in reverse
4112 order.  @xref{Sorting Groups}, for more information about group
4113 sorting.
4114
4115
4116 @node Topic Topology
4117 @subsection Topic Topology
4118 @cindex topic topology
4119 @cindex topology
4120
4121 So, let's have a look at an example group buffer:
4122
4123 @example
4124 @group
4125 Gnus
4126   Emacs -- I wuw it!
4127      3: comp.emacs
4128      2: alt.religion.emacs
4129     Naughty Emacs
4130      452: alt.sex.emacs
4131        0: comp.talk.emacs.recovery
4132   Misc
4133      8: comp.binaries.fractals
4134     13: comp.sources.unix
4135 @end group
4136 @end example
4137
4138 So, here we have one top-level topic (@samp{Gnus}), two topics under
4139 that, and one sub-topic under one of the sub-topics.  (There is always
4140 just one (1) top-level topic).  This topology can be expressed as
4141 follows:
4142
4143 @lisp
4144 (("Gnus" visible)
4145  (("Emacs -- I wuw it!" visible)
4146   (("Naughty Emacs" visible)))
4147  (("Misc" visible)))
4148 @end lisp
4149
4150 @vindex gnus-topic-topology
4151 This is in fact how the variable @code{gnus-topic-topology} would look
4152 for the display above.  That variable is saved in the @file{.newsrc.eld}
4153 file, and shouldn't be messed with manually---unless you really want
4154 to.  Since this variable is read from the @file{.newsrc.eld} file,
4155 setting it in any other startup files will have no effect.
4156
4157 This topology shows what topics are sub-topics of what topics (right),
4158 and which topics are visible.  Two settings are currently
4159 allowed---@code{visible} and @code{invisible}.
4160
4161
4162 @node Topic Parameters
4163 @subsection Topic Parameters
4164 @cindex topic parameters
4165
4166 All groups in a topic will inherit group parameters from the parent
4167 (and ancestor) topic parameters.  All valid group parameters are valid
4168 topic parameters (@pxref{Group Parameters}).  When the agent is
4169 enabled, all agent parameters (See Agent Parameters in @ref{Category
4170 Syntax}) are also valid topic parameters.
4171
4172 In addition, the following parameters are only valid as topic
4173 parameters:
4174
4175 @table @code
4176 @item subscribe
4177 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4178 @code{subscribe} topic parameter says what groups go in what topic.  Its
4179 value should be a regexp to match the groups that should go in that
4180 topic.
4181
4182 @item subscribe-level
4183 When subscribing new groups by topic (see the @code{subscribe} parameter),
4184 the group will be subscribed with the level specified in the
4185 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4186
4187 @end table
4188
4189 Group parameters (of course) override topic parameters, and topic
4190 parameters in sub-topics override topic parameters in super-topics.  You
4191 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4192 verb, although you may feel free to disagree with me here.)
4193
4194 @example
4195 @group
4196 Gnus
4197   Emacs
4198      3: comp.emacs
4199      2: alt.religion.emacs
4200    452: alt.sex.emacs
4201     Relief
4202      452: alt.sex.emacs
4203        0: comp.talk.emacs.recovery
4204   Misc
4205      8: comp.binaries.fractals
4206     13: comp.sources.unix
4207    452: alt.sex.emacs
4208 @end group
4209 @end example
4210
4211 The @samp{Emacs} topic has the topic parameter @code{(score-file
4212 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4213 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4214 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4215 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4216 . "religion.SCORE")}.
4217
4218 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4219 will get the @file{relief.SCORE} home score file.  If you enter the same
4220 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4221 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4222 get the @file{religion.SCORE} home score file.
4223
4224 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4225 there are some problems, especially with the @code{total-expiry}
4226 parameter.  Say you have a mail group in two topics; one with
4227 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4228 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4229 of these topics you mean to expire articles from, so anything may
4230 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4231 happens.  You just have to be careful if you do stuff like that.
4232
4233
4234 @node Non-ASCII Group Names
4235 @section Accessing groups of non-English names
4236 @cindex non-ascii group names
4237
4238 There are some news servers that provide groups of which the names are
4239 expressed with their native languages in the world.  For instance, in a
4240 certain news server there are some newsgroups of which the names are
4241 spelled in Chinese, where people are talking in Chinese.  You can, of
4242 course, subscribe to such news groups using Gnus.  Currently Gnus
4243 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4244 back end but also with the @code{nnml} back end and the @code{nnrss}
4245 back end.
4246
4247 Every such group name is encoded by a certain charset in the server
4248 side (in an @acronym{NNTP} server its administrator determines the
4249 charset, but for groups in the other back ends it is determined by you).
4250 Gnus has to display the decoded ones for you in the group buffer and the
4251 article buffer, and needs to use the encoded ones when communicating
4252 with servers.  However, Gnus doesn't know what charset is used for each
4253 non-@acronym{ASCII} group name.  The following two variables are just
4254 the ones for telling Gnus what charset should be used for each group:
4255
4256 @table @code
4257 @item gnus-group-name-charset-method-alist
4258 @vindex gnus-group-name-charset-method-alist
4259 An alist of select methods and charsets.  The default value is
4260 @code{nil}.  The names of groups in the server specified by that select
4261 method are all supposed to use the corresponding charset.  For example:
4262
4263 @lisp
4264 (setq gnus-group-name-charset-method-alist
4265       '(((nntp "news.com.cn") . cn-gb-2312)))
4266 @end lisp
4267
4268 Charsets specified for groups with this variable are preferred to the
4269 ones specified for the same groups with the
4270 @code{gnus-group-name-charset-group-alist} variable (see below).
4271
4272 A select method can be very long, like:
4273
4274 @lisp
4275 (nntp "gmane"
4276       (nntp-address "news.gmane.org")
4277       (nntp-end-of-line "\n")
4278       (nntp-open-connection-function
4279        nntp-open-via-rlogin-and-telnet)
4280       (nntp-via-rlogin-command "ssh")
4281       (nntp-via-rlogin-command-switches
4282        ("-C" "-t" "-e" "none"))
4283       (nntp-via-address @dots{}))
4284 @end lisp
4285
4286 In that case, you can truncate it into @code{(nntp "gmane")} in this
4287 variable.  That is, it is enough to contain only the back end name and
4288 the server name.
4289
4290 @item gnus-group-name-charset-group-alist
4291 @cindex UTF-8 group names
4292 @vindex gnus-group-name-charset-group-alist
4293 An alist of regexp of group name and the charset for group names.
4294 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4295 otherwise the default is @code{nil}.  For example:
4296
4297 @lisp
4298 (setq gnus-group-name-charset-group-alist
4299       '(("\\.com\\.cn:" . cn-gb-2312)
4300         (".*" . utf-8)))
4301 @end lisp
4302
4303 Note that this variable is ignored if the match is made with
4304 @code{gnus-group-name-charset-method-alist}.
4305 @end table
4306
4307 Those two variables are used also to determine the charset for encoding
4308 and decoding non-@acronym{ASCII} group names that are in the back ends
4309 other than @code{nntp}.  It means that it is you who determine it.  If
4310 you do nothing, the charset used for group names in those back ends will
4311 all be @code{utf-8} because of the last element of
4312 @code{gnus-group-name-charset-group-alist}.
4313
4314 There is one more important variable for non-@acronym{ASCII} group
4315 names.  @emph{XEmacs users must set this}.  Emacs users necessarily need
4316 not do:
4317
4318 @table @code
4319 @item nnmail-pathname-coding-system
4320 The value of this variable should be a coding system or @code{nil}
4321 (which is the default).  The @code{nnml} back end, the @code{nnrss} back
4322 end, the @acronym{NNTP} marks feature (@pxref{NNTP marks}), the agent,
4323 and the cache use non-@acronym{ASCII} group names in those files and
4324 directories.  This variable overrides the value of
4325 @code{file-name-coding-system} which specifies the coding system used
4326 when encoding and decoding those file names and directory names.
4327
4328 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4329 is the only means to specify the coding system used to encode and decode
4330 file names.  Therefore, @emph{you, XEmacs users, have to set it} to the
4331 coding system that is suitable to encode and decode non-@acronym{ASCII}
4332 group names.  On the other hand, Emacs uses the value of
4333 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4334 is @code{nil}.  Normally the value of
4335 @code{default-file-name-coding-system} is initialized according to the
4336 locale, so you will need to do nothing if the value is suitable to
4337 encode and decode non-@acronym{ASCII} group names.
4338
4339 The value of this variable (or @code{default-file-name-coding-system})
4340 does not necessarily need to be the same value that is determined by
4341 @code{gnus-group-name-charset-method-alist} and
4342 @code{gnus-group-name-charset-group-alist}.
4343
4344 If you want to subscribe to the groups spelled in Chinese but
4345 @code{default-file-name-coding-system} is initialized by default to
4346 @code{iso-latin-1} for example, that is the most typical case where you
4347 have to set @code{nnmail-pathname-coding-system} even if you are an
4348 Emacs user.  The @code{utf-8} coding system is a good candidate for it.
4349 Otherwise, you may change the locale in your system so that
4350 @code{default-file-name-coding-system} may be initialized to an
4351 appropriate value, instead of specifying this variable.
4352 @end table
4353
4354 Note that when you copy or move articles from a non-@acronym{ASCII}
4355 group to another group, the charset used to encode and decode group
4356 names should be the same in both groups.  Otherwise the Newsgroups
4357 header will be displayed incorrectly in the article buffer.
4358
4359
4360 @node Searching
4361 @section Searching
4362
4363 @menu
4364 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4365 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4366 @end menu
4367
4368 @cindex Searching
4369
4370 FIXME: This node is a stub.
4371
4372 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4373 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4374 as well.
4375
4376 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4377 and back-reference.
4378
4379 @node nnir
4380 @subsection nnir
4381
4382 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4383 @cindex nnir
4384
4385 @node nnmairix
4386 @subsection nnmairix
4387
4388 FIXME: As a first step, convert commentary and/or
4389 @url{http://www.emacswiki.org/cgi-bin/wiki/GnusMairix} to texi.
4390
4391 @c http://www.rpcurnow.force9.co.uk/mairix/
4392 @c mairix is a program for indexing and searching email messages stored in
4393 @c Maildir (see the documentation section below), MH or mbox folders.
4394
4395 @node Misc Group Stuff
4396 @section Misc Group Stuff
4397
4398 @menu
4399 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4400 * Group Information::           Information and help on groups and Gnus.
4401 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4402 * File Commands::               Reading and writing the Gnus files.
4403 * Sieve Commands::              Managing Sieve scripts.
4404 @end menu
4405
4406 @table @kbd
4407
4408 @item v
4409 @kindex v (Group)
4410 @cindex keys, reserved for users (Group)
4411 The key @kbd{v} is reserved for users.  You can bind it to some
4412 command or better use it as a prefix key.  For example:
4413
4414 @lisp
4415 (define-key gnus-group-mode-map (kbd "v j d")
4416   (lambda ()
4417     (interactive)
4418     (gnus-group-jump-to-group "nndraft:drafts")))
4419 @end lisp
4420
4421 On keys reserved for users in Emacs and on keybindings in general
4422 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
4423
4424 @item ^
4425 @kindex ^ (Group)
4426 @findex gnus-group-enter-server-mode
4427 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4428 @xref{Server Buffer}.
4429
4430 @item a
4431 @kindex a (Group)
4432 @findex gnus-group-post-news
4433 Start composing a message (a news by default)
4434 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4435 under the point.  If the prefix is 1, prompt for a group to post to.
4436 Contrary to what the name of this function suggests, the prepared
4437 article might be a mail instead of a news, if a mail group is specified
4438 with the prefix argument.  @xref{Composing Messages}.
4439
4440 @item m
4441 @kindex m (Group)
4442 @findex gnus-group-mail
4443 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4444 use the posting style of the group under the point.  If the prefix is 1,
4445 prompt for a group name to find the posting style.
4446 @xref{Composing Messages}.
4447
4448 @item i
4449 @kindex i (Group)
4450 @findex gnus-group-news
4451 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4452 post to the group under the point.  If the prefix is 1, prompt
4453 for group to post to.  @xref{Composing Messages}.
4454
4455 This function actually prepares a news even when using mail groups.
4456 This is useful for ``posting'' messages to mail groups without actually
4457 sending them over the network: they're just saved directly to the group
4458 in question.  The corresponding back end must have a request-post method
4459 for this to work though.
4460
4461 @item G z
4462 @kindex G z (Group)
4463 @findex gnus-group-compact-group
4464
4465 Compact the group under point (@code{gnus-group-compact-group}).
4466 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
4467 gaps between article numbers, hence getting a correct total article
4468 count.
4469
4470 @end table
4471
4472 Variables for the group buffer:
4473
4474 @table @code
4475
4476 @item gnus-group-mode-hook
4477 @vindex gnus-group-mode-hook
4478 is called after the group buffer has been
4479 created.
4480
4481 @item gnus-group-prepare-hook
4482 @vindex gnus-group-prepare-hook
4483 is called after the group buffer is
4484 generated.  It may be used to modify the buffer in some strange,
4485 unnatural way.
4486
4487 @item gnus-group-prepared-hook
4488 @vindex gnus-group-prepare-hook
4489 is called as the very last thing after the group buffer has been
4490 generated.  It may be used to move point around, for instance.
4491
4492 @item gnus-permanently-visible-groups
4493 @vindex gnus-permanently-visible-groups
4494 Groups matching this regexp will always be listed in the group buffer,
4495 whether they are empty or not.
4496
4497 @end table
4498
4499 @node Scanning New Messages
4500 @subsection Scanning New Messages
4501 @cindex new messages
4502 @cindex scanning new news
4503
4504 @table @kbd
4505
4506 @item g
4507 @kindex g (Group)
4508 @findex gnus-group-get-new-news
4509 @c @icon{gnus-group-get-new-news}
4510 Check the server(s) for new articles.  If the numerical prefix is used,
4511 this command will check only groups of level @var{arg} and lower
4512 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4513 command will force a total re-reading of the active file(s) from the
4514 back end(s).
4515
4516 @item M-g
4517 @kindex M-g (Group)
4518 @findex gnus-group-get-new-news-this-group
4519 @vindex gnus-goto-next-group-when-activating
4520 @c @icon{gnus-group-get-new-news-this-group}
4521 Check whether new articles have arrived in the current group
4522 (@code{gnus-group-get-new-news-this-group}).
4523 @code{gnus-goto-next-group-when-activating} says whether this command is
4524 to move point to the next group or not.  It is @code{t} by default.
4525
4526 @findex gnus-activate-all-groups
4527 @cindex activating groups
4528 @item C-c M-g
4529 @kindex C-c M-g (Group)
4530 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4531
4532 @item R
4533 @kindex R (Group)
4534 @cindex restarting
4535 @findex gnus-group-restart
4536 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4537 file(s), closes the connection to all servers, clears up all run-time
4538 Gnus variables, and then starts Gnus all over again.
4539
4540 @end table
4541
4542 @vindex gnus-get-new-news-hook
4543 @code{gnus-get-new-news-hook} is run just before checking for new news.
4544
4545 @vindex gnus-after-getting-new-news-hook
4546 @code{gnus-after-getting-new-news-hook} is run after checking for new
4547 news.
4548
4549
4550 @node Group Information
4551 @subsection Group Information
4552 @cindex group information
4553 @cindex information on groups
4554
4555 @table @kbd
4556
4557
4558 @item H f
4559 @kindex H f (Group)
4560 @findex gnus-group-fetch-faq
4561 @vindex gnus-group-faq-directory
4562 @cindex FAQ
4563 @cindex ange-ftp
4564 Try to fetch the @acronym{FAQ} for the current group
4565 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4566 from @code{gnus-group-faq-directory}, which is usually a directory on
4567 a remote machine.  This variable can also be a list of directories.
4568 In that case, giving a prefix to this command will allow you to choose
4569 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4570 used for fetching the file.
4571
4572 If fetching from the first site is unsuccessful, Gnus will attempt to go
4573 through @code{gnus-group-faq-directory} and try to open them one by one.
4574
4575 @item H c
4576 @kindex H c (Group)
4577 @findex gnus-group-fetch-charter
4578 @vindex gnus-group-charter-alist
4579 @cindex charter
4580 Try to open the charter for the current group in a web browser
4581 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4582 prefix argument.
4583
4584 Gnus will use @code{gnus-group-charter-alist} to find the location of
4585 the charter.  If no location is known, Gnus will fetch the control
4586 messages for the group, which in some cases includes the charter.
4587
4588 @item H C
4589 @kindex H C (Group)
4590 @findex gnus-group-fetch-control
4591 @vindex gnus-group-fetch-control-use-browse-url
4592 @cindex control message
4593 Fetch the control messages for the group from the archive at
4594 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4595 group if given a prefix argument.
4596
4597 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4598 Gnus will open the control messages in a browser using
4599 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4600 and displayed in an ephemeral group.
4601
4602 Note that the control messages are compressed.  To use this command
4603 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4604 Files, ,Compressed Files, emacs, The Emacs Manual}).
4605
4606 @item H d
4607 @itemx C-c C-d
4608 @c @icon{gnus-group-describe-group}
4609 @kindex H d (Group)
4610 @kindex C-c C-d (Group)
4611 @cindex describing groups
4612 @cindex group description
4613 @findex gnus-group-describe-group
4614 Describe the current group (@code{gnus-group-describe-group}).  If given
4615 a prefix, force Gnus to re-read the description from the server.
4616
4617 @item M-d
4618 @kindex M-d (Group)
4619 @findex gnus-group-describe-all-groups
4620 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4621 prefix, force Gnus to re-read the description file from the server.
4622
4623 @item H v
4624 @itemx V
4625 @kindex V (Group)
4626 @kindex H v (Group)
4627 @cindex version
4628 @findex gnus-version
4629 Display current Gnus version numbers (@code{gnus-version}).
4630
4631 @item ?
4632 @kindex ? (Group)
4633 @findex gnus-group-describe-briefly
4634 Give a very short help message (@code{gnus-group-describe-briefly}).
4635
4636 @item C-c C-i
4637 @kindex C-c C-i (Group)
4638 @cindex info
4639 @cindex manual
4640 @findex gnus-info-find-node
4641 Go to the Gnus info node (@code{gnus-info-find-node}).
4642 @end table
4643
4644
4645 @node Group Timestamp
4646 @subsection Group Timestamp
4647 @cindex timestamps
4648 @cindex group timestamps
4649
4650 It can be convenient to let Gnus keep track of when you last read a
4651 group.  To set the ball rolling, you should add
4652 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4653
4654 @lisp
4655 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4656 @end lisp
4657
4658 After doing this, each time you enter a group, it'll be recorded.
4659
4660 This information can be displayed in various ways---the easiest is to
4661 use the @samp{%d} spec in the group line format:
4662
4663 @lisp
4664 (setq gnus-group-line-format
4665       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4666 @end lisp
4667
4668 This will result in lines looking like:
4669
4670 @example
4671 *        0: mail.ding                                19961002T012943
4672          0: custom                                   19961002T012713
4673 @end example
4674
4675 As you can see, the date is displayed in compact ISO 8601 format.  This
4676 may be a bit too much, so to just display the date, you could say
4677 something like:
4678
4679 @lisp
4680 (setq gnus-group-line-format
4681       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4682 @end lisp
4683
4684 If you would like greater control of the time format, you can use a
4685 user-defined format spec.  Something like the following should do the
4686 trick:
4687
4688 @lisp
4689 (setq gnus-group-line-format
4690       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4691 (defun gnus-user-format-function-d (headers)
4692   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4693     (if time
4694         (format-time-string "%b %d  %H:%M" time)
4695       "")))
4696 @end lisp
4697
4698
4699 @node File Commands
4700 @subsection File Commands
4701 @cindex file commands
4702
4703 @table @kbd
4704
4705 @item r
4706 @kindex r (Group)
4707 @findex gnus-group-read-init-file
4708 @vindex gnus-init-file
4709 @cindex reading init file
4710 Re-read the init file (@code{gnus-init-file}, which defaults to
4711 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4712
4713 @item s
4714 @kindex s (Group)
4715 @findex gnus-group-save-newsrc
4716 @cindex saving .newsrc
4717 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4718 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4719 file(s) whether Gnus thinks it is necessary or not.
4720
4721 @c @item Z
4722 @c @kindex Z (Group)
4723 @c @findex gnus-group-clear-dribble
4724 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4725
4726 @end table
4727
4728
4729 @node Sieve Commands
4730 @subsection Sieve Commands
4731 @cindex group sieve commands
4732
4733 Sieve is a server-side mail filtering language.  In Gnus you can use
4734 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4735 sieve rules that should apply to each group.  Gnus provides two
4736 commands to translate all these group parameters into a proper Sieve
4737 script that can be transfered to the server somehow.
4738
4739 @vindex gnus-sieve-file
4740 @vindex gnus-sieve-region-start
4741 @vindex gnus-sieve-region-end
4742 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4743 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4744 between two delimiters, @code{gnus-sieve-region-start} and
4745 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4746 outside these delimiters that will not be removed the next time you
4747 regenerate the Sieve script.
4748
4749 @vindex gnus-sieve-crosspost
4750 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4751 is generated.  If it is non-@code{nil} (the default) articles is
4752 placed in all groups that have matching rules, otherwise the article
4753 is only placed in the group with the first matching rule.  For
4754 example, the group parameter @samp{(sieve address "sender"
4755 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4756 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4757 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4758 except that the line containing the call to @code{stop} is removed.)
4759
4760 @example
4761 if address "sender" "owner-ding@@hpc.uh.edu" @{
4762         fileinto "INBOX.ding";
4763         stop;
4764 @}
4765 @end example
4766
4767 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4768
4769 @table @kbd
4770
4771 @item D g
4772 @kindex D g (Group)
4773 @findex gnus-sieve-generate
4774 @vindex gnus-sieve-file
4775 @cindex generating sieve script
4776 Regenerate a Sieve script from the @code{sieve} group parameters and
4777 put you into the @code{gnus-sieve-file} without saving it.
4778
4779 @item D u
4780 @kindex D u (Group)
4781 @findex gnus-sieve-update
4782 @vindex gnus-sieve-file
4783 @cindex updating sieve script
4784 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4785 @code{sieve} group parameters, save the file and upload it to the
4786 server using the @code{sieveshell} program.
4787
4788 @end table
4789
4790
4791 @node Summary Buffer
4792 @chapter Summary Buffer
4793 @cindex summary buffer
4794
4795 A line for each article is displayed in the summary buffer.  You can
4796 move around, read articles, post articles and reply to articles.
4797
4798 The most common way to a summary buffer is to select a group from the
4799 group buffer (@pxref{Selecting a Group}).
4800
4801 You can have as many summary buffers open as you wish.
4802
4803 You can customize the Summary Mode tool bar, see @kbd{M-x
4804 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
4805 available in Emacs.
4806
4807 @kindex v (Summary)
4808 @cindex keys, reserved for users (Summary)
4809 The key @kbd{v} is reserved for users.  You can bind it to some
4810 command or better use it as a prefix key.  For example:
4811 @lisp
4812 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
4813 @end lisp
4814
4815 @menu
4816 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4817 * Summary Maneuvering::         Moving around the summary buffer.
4818 * Choosing Articles::           Reading articles.
4819 * Paging the Article::          Scrolling the current article.
4820 * Reply Followup and Post::     Posting articles.
4821 * Delayed Articles::            Send articles at a later time.
4822 * Marking Articles::            Marking articles as read, expirable, etc.
4823 * Limiting::                    You can limit the summary buffer.
4824 * Threading::                   How threads are made.
4825 * Sorting the Summary Buffer::  How articles and threads are sorted.
4826 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4827 * Article Caching::             You may store articles in a cache.
4828 * Persistent Articles::         Making articles expiry-resistant.
4829 * Sticky Articles::             Article buffers that are not reused.
4830 * Article Backlog::             Having already read articles hang around.
4831 * Saving Articles::             Ways of customizing article saving.
4832 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4833 * Article Treatment::           The article buffer can be mangled at will.
4834 * MIME Commands::               Doing MIMEy things with the articles.
4835 * Charsets::                    Character set issues.
4836 * Article Commands::            Doing various things with the article buffer.
4837 * Summary Sorting::             Sorting the summary buffer in various ways.
4838 * Finding the Parent::          No child support? Get the parent.
4839 * Alternative Approaches::      Reading using non-default summaries.
4840 * Tree Display::                A more visual display of threads.
4841 * Mail Group Commands::         Some commands can only be used in mail groups.
4842 * Various Summary Stuff::       What didn't fit anywhere else.
4843 * Exiting the Summary Buffer::  Returning to the Group buffer,
4844                                 or reselecting the current group.
4845 * Crosspost Handling::          How crossposted articles are dealt with.
4846 * Duplicate Suppression::       An alternative when crosspost handling fails.
4847 * Security::                    Decrypt and Verify.
4848 * Mailing List::                Mailing list minor mode.
4849 @end menu
4850
4851
4852 @node Summary Buffer Format
4853 @section Summary Buffer Format
4854 @cindex summary buffer format
4855
4856 @iftex
4857 @iflatex
4858 \gnusfigure{The Summary Buffer}{180}{
4859 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4860 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4861 }
4862 @end iflatex
4863 @end iftex
4864
4865 @menu
4866 * Summary Buffer Lines::        You can specify how summary lines should look.
4867 * To From Newsgroups::          How to not display your own name.
4868 * Summary Buffer Mode Line::    You can say how the mode line should look.
4869 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4870 @end menu
4871
4872 @findex mail-extract-address-components
4873 @findex gnus-extract-address-components
4874 @vindex gnus-extract-address-components
4875 Gnus will use the value of the @code{gnus-extract-address-components}
4876 variable as a function for getting the name and address parts of a
4877 @code{From} header.  Two pre-defined functions exist:
4878 @code{gnus-extract-address-components}, which is the default, quite
4879 fast, and too simplistic solution; and
4880 @code{mail-extract-address-components}, which works very nicely, but is
4881 slower.  The default function will return the wrong answer in 5% of the
4882 cases.  If this is unacceptable to you, use the other function instead:
4883
4884 @lisp
4885 (setq gnus-extract-address-components
4886       'mail-extract-address-components)
4887 @end lisp
4888
4889 @vindex gnus-summary-same-subject
4890 @code{gnus-summary-same-subject} is a string indicating that the current
4891 article has the same subject as the previous.  This string will be used
4892 with those specs that require it.  The default is @code{""}.
4893
4894
4895 @node Summary Buffer Lines
4896 @subsection Summary Buffer Lines
4897
4898 @vindex gnus-summary-line-format
4899 You can change the format of the lines in the summary buffer by changing
4900 the @code{gnus-summary-line-format} variable.  It works along the same
4901 lines as a normal @code{format} string, with some extensions
4902 (@pxref{Formatting Variables}).
4903
4904 There should always be a colon or a point position marker on the line;
4905 the cursor always moves to the point position marker or the colon after
4906 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4907 possible to change this.  Just write a new function
4908 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4909 @xref{Positioning Point}.
4910
4911 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4912
4913 The following format specification characters and extended format
4914 specification(s) are understood:
4915
4916 @table @samp
4917 @item N
4918 Article number.
4919 @item S
4920 Subject string.  List identifiers stripped,
4921 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
4922 @item s
4923 Subject if the article is the root of the thread or the previous article
4924 had a different subject, @code{gnus-summary-same-subject} otherwise.
4925 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4926 @item F
4927 Full @code{From} header.
4928 @item n
4929 The name (from the @code{From} header).
4930 @item f
4931 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4932 From Newsgroups}).
4933 @item a
4934 The name (from the @code{From} header).  This differs from the @code{n}
4935 spec in that it uses the function designated by the
4936 @code{gnus-extract-address-components} variable, which is slower, but
4937 may be more thorough.
4938 @item A
4939 The address (from the @code{From} header).  This works the same way as
4940 the @code{a} spec.
4941 @item L
4942 Number of lines in the article.
4943 @item c
4944 Number of characters in the article.  This specifier is not supported
4945 in some methods (like nnfolder).
4946 @item k
4947 Pretty-printed version of the number of characters in the article;
4948 for example, @samp{1.2k} or @samp{0.4M}.
4949 @item I
4950 Indentation based on thread level (@pxref{Customizing Threading}).
4951 @item B
4952 A complex trn-style thread tree, showing response-connecting trace
4953 lines.  A thread could be drawn like this:
4954
4955 @example
4956 >
4957 +->
4958 | +->
4959 | | \->
4960 | |   \->
4961 | \->
4962 +->
4963 \->
4964 @end example
4965
4966 You can customize the appearance with the following options.  Note
4967 that it is possible to make the thread display look really neat by
4968 replacing the default @acronym{ASCII} characters with graphic
4969 line-drawing glyphs.
4970 @table @code
4971 @item gnus-sum-thread-tree-root
4972 @vindex gnus-sum-thread-tree-root
4973 Used for the root of a thread.  If @code{nil}, use subject
4974 instead.  The default is @samp{> }.
4975
4976 @item gnus-sum-thread-tree-false-root
4977 @vindex gnus-sum-thread-tree-false-root
4978 Used for the false root of a thread (@pxref{Loose Threads}).  If
4979 @code{nil}, use subject instead.  The default is @samp{> }.
4980
4981 @item gnus-sum-thread-tree-single-indent
4982 @vindex gnus-sum-thread-tree-single-indent
4983 Used for a thread with just one message.  If @code{nil}, use subject
4984 instead.  The default is @samp{}.
4985
4986 @item gnus-sum-thread-tree-vertical
4987 @vindex gnus-sum-thread-tree-vertical
4988 Used for drawing a vertical line.  The default is @samp{| }.
4989
4990 @item gnus-sum-thread-tree-indent
4991 @vindex gnus-sum-thread-tree-indent
4992 Used for indenting.  The default is @samp{  }.
4993
4994 @item gnus-sum-thread-tree-leaf-with-other
4995 @vindex gnus-sum-thread-tree-leaf-with-other
4996 Used for a leaf with brothers.  The default is @samp{+-> }.
4997
4998 @item gnus-sum-thread-tree-single-leaf
4999 @vindex gnus-sum-thread-tree-single-leaf
5000 Used for a leaf without brothers.  The default is @samp{\-> }
5001
5002 @end table
5003
5004 @item T
5005 Nothing if the article is a root and lots of spaces if it isn't (it
5006 pushes everything after it off the screen).
5007 @item [
5008 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5009 for adopted articles (@pxref{Customizing Threading}).
5010 @item ]
5011 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5012 for adopted articles.
5013 @item >
5014 One space for each thread level.
5015 @item <
5016 Twenty minus thread level spaces.
5017 @item U
5018 Unread.  @xref{Read Articles}.
5019
5020 @item R
5021 This misleadingly named specifier is the @dfn{secondary mark}.  This
5022 mark will say whether the article has been replied to, has been cached,
5023 or has been saved.  @xref{Other Marks}.
5024
5025 @item i
5026 Score as a number (@pxref{Scoring}).
5027 @item z
5028 @vindex gnus-summary-zcore-fuzz
5029 Zcore, @samp{+} if above the default level and @samp{-} if below the
5030 default level.  If the difference between
5031 @code{gnus-summary-default-score} and the score is less than
5032 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5033 @item V
5034 Total thread score.
5035 @item x
5036 @code{Xref}.
5037 @item D
5038 @code{Date}.
5039 @item d
5040 The @code{Date} in @code{DD-MMM} format.
5041 @item o
5042 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5043 @item M
5044 @code{Message-ID}.
5045 @item r
5046 @code{References}.
5047 @item t
5048 Number of articles in the current sub-thread.  Using this spec will slow
5049 down summary buffer generation somewhat.
5050 @item e
5051 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5052 article has any children.
5053 @item P
5054 The line number.
5055 @item O
5056 Download mark.
5057 @item *
5058 Desired cursor position (instead of after first colon).
5059 @item &user-date;
5060 Age sensitive date format.  Various date format is defined in
5061 @code{gnus-user-date-format-alist}.
5062 @item u
5063 User defined specifier.  The next character in the format string should
5064 be a letter.  Gnus will call the function
5065 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5066 following @samp{%u}.  The function will be passed the current header as
5067 argument.  The function should return a string, which will be inserted
5068 into the summary just like information from any other summary specifier.
5069 @end table
5070
5071 Text between @samp{%(} and @samp{%)} will be highlighted with
5072 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5073 There can only be one such area.
5074
5075 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5076 have to be handled with care.  For reasons of efficiency, Gnus will
5077 compute what column these characters will end up in, and ``hard-code''
5078 that.  This means that it is invalid to have these specs after a
5079 variable-length spec.  Well, you might not be arrested, but your summary
5080 buffer will look strange, which is bad enough.
5081
5082 The smart choice is to have these specs as far to the left as possible.
5083 (Isn't that the case with everything, though?  But I digress.)
5084
5085 This restriction may disappear in later versions of Gnus.
5086
5087
5088 @node To From Newsgroups
5089 @subsection To From Newsgroups
5090 @cindex To
5091 @cindex Newsgroups
5092
5093 In some groups (particularly in archive groups), the @code{From} header
5094 isn't very interesting, since all the articles there are written by
5095 you.  To display the information in the @code{To} or @code{Newsgroups}
5096 headers instead, you need to decide three things: What information to
5097 gather; where to display it; and when to display it.
5098
5099 @enumerate
5100 @item
5101 @vindex gnus-extra-headers
5102 The reading of extra header information is controlled by the
5103 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5104 instance:
5105
5106 @lisp
5107 (setq gnus-extra-headers
5108       '(To Newsgroups X-Newsreader))
5109 @end lisp
5110
5111 This will result in Gnus trying to obtain these three headers, and
5112 storing it in header structures for later easy retrieval.
5113
5114 @item
5115 @findex gnus-extra-header
5116 The value of these extra headers can be accessed via the
5117 @code{gnus-extra-header} function.  Here's a format line spec that will
5118 access the @code{X-Newsreader} header:
5119
5120 @example
5121 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5122 @end example
5123
5124 @item
5125 @vindex gnus-ignored-from-addresses
5126 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5127 summary line spec returns the @code{To}, @code{Newsreader} or
5128 @code{From} header.  If this regexp matches the contents of the
5129 @code{From} header, the value of the @code{To} or @code{Newsreader}
5130 headers are used instead.
5131
5132 To distinguish regular articles from those where the @code{From} field
5133 has been swapped, a string is prefixed to the @code{To} or
5134 @code{Newsgroups} header in the summary line.  By default the string is
5135 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5136 customize these strings with @code{gnus-summary-to-prefix} and
5137 @code{gnus-summary-newsgroup-prefix}.
5138
5139 @end enumerate
5140
5141 @vindex nnmail-extra-headers
5142 A related variable is @code{nnmail-extra-headers}, which controls when
5143 to include extra headers when generating overview (@acronym{NOV}) files.
5144 If you have old overview files, you should regenerate them after
5145 changing this variable, by entering the server buffer using @kbd{^},
5146 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5147 regeneration.
5148
5149 @vindex gnus-summary-line-format
5150 You also have to instruct Gnus to display the data by changing the
5151 @code{%n} spec to the @code{%f} spec in the
5152 @code{gnus-summary-line-format} variable.
5153
5154 In summary, you'd typically put something like the following in
5155 @file{~/.gnus.el}:
5156
5157 @lisp
5158 (setq gnus-extra-headers
5159       '(To Newsgroups))
5160 (setq nnmail-extra-headers gnus-extra-headers)
5161 (setq gnus-summary-line-format
5162       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5163 (setq gnus-ignored-from-addresses
5164       "Your Name Here")
5165 @end lisp
5166
5167 (The values listed above are the default values in Gnus.  Alter them
5168 to fit your needs.)
5169
5170 A note for news server administrators, or for users who wish to try to
5171 convince their news server administrator to provide some additional
5172 support:
5173
5174 The above is mostly useful for mail groups, where you have control over
5175 the @acronym{NOV} files that are created.  However, if you can persuade your
5176 nntp admin to add (in the usual implementation, notably INN):
5177
5178 @example
5179 Newsgroups:full
5180 @end example
5181
5182 to the end of her @file{overview.fmt} file, then you can use that just
5183 as you would the extra headers from the mail groups.
5184
5185
5186 @node Summary Buffer Mode Line
5187 @subsection Summary Buffer Mode Line
5188
5189 @vindex gnus-summary-mode-line-format
5190 You can also change the format of the summary mode bar (@pxref{Mode Line
5191 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5192 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5193
5194 Here are the elements you can play with:
5195
5196 @table @samp
5197 @item G
5198 Group name.
5199 @item p
5200 Unprefixed group name.
5201 @item A
5202 Current article number.
5203 @item z
5204 Current article score.
5205 @item V
5206 Gnus version.
5207 @item U
5208 Number of unread articles in this group.
5209 @item e
5210 Number of unread articles in this group that aren't displayed in the
5211 summary buffer.
5212 @item Z
5213 A string with the number of unread and unselected articles represented
5214 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5215 articles, and just as @samp{<%U more>} if there are just unread articles
5216 and no unselected ones.
5217 @item g
5218 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5219 shortened to @samp{r.a.anime}.
5220 @item S
5221 Subject of the current article.
5222 @item u
5223 User-defined spec (@pxref{User-Defined Specs}).
5224 @item s
5225 Name of the current score file (@pxref{Scoring}).
5226 @item d
5227 Number of dormant articles (@pxref{Unread Articles}).
5228 @item t
5229 Number of ticked articles (@pxref{Unread Articles}).
5230 @item r
5231 Number of articles that have been marked as read in this session.
5232 @item E
5233 Number of articles expunged by the score files.
5234 @end table
5235
5236
5237 @node Summary Highlighting
5238 @subsection Summary Highlighting
5239
5240 @table @code
5241
5242 @item gnus-visual-mark-article-hook
5243 @vindex gnus-visual-mark-article-hook
5244 This hook is run after selecting an article.  It is meant to be used for
5245 highlighting the article in some way.  It is not run if
5246 @code{gnus-visual} is @code{nil}.
5247
5248 @item gnus-summary-update-hook
5249 @vindex gnus-summary-update-hook
5250 This hook is called when a summary line is changed.  It is not run if
5251 @code{gnus-visual} is @code{nil}.
5252
5253 @item gnus-summary-selected-face
5254 @vindex gnus-summary-selected-face
5255 This is the face (or @dfn{font} as some people call it) used to
5256 highlight the current article in the summary buffer.
5257
5258 @item gnus-summary-highlight
5259 @vindex gnus-summary-highlight
5260 Summary lines are highlighted according to this variable, which is a
5261 list where the elements are of the format @code{(@var{form}
5262 . @var{face})}.  If you would, for instance, like ticked articles to be
5263 italic and high-scored articles to be bold, you could set this variable
5264 to something like
5265 @lisp
5266 (((eq mark gnus-ticked-mark) . italic)
5267  ((> score default) . bold))
5268 @end lisp
5269 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5270 @var{face} will be applied to the line.
5271 @end table
5272
5273
5274 @node Summary Maneuvering
5275 @section Summary Maneuvering
5276 @cindex summary movement
5277
5278 All the straight movement commands understand the numeric prefix and
5279 behave pretty much as you'd expect.
5280
5281 None of these commands select articles.
5282
5283 @table @kbd
5284 @item G M-n
5285 @itemx M-n
5286 @kindex M-n (Summary)
5287 @kindex G M-n (Summary)
5288 @findex gnus-summary-next-unread-subject
5289 Go to the next summary line of an unread article
5290 (@code{gnus-summary-next-unread-subject}).
5291
5292 @item G M-p
5293 @itemx M-p
5294 @kindex M-p (Summary)
5295 @kindex G M-p (Summary)
5296 @findex gnus-summary-prev-unread-subject
5297 Go to the previous summary line of an unread article
5298 (@code{gnus-summary-prev-unread-subject}).
5299
5300 @item G g
5301 @kindex G g (Summary)
5302 @findex gnus-summary-goto-subject
5303 Ask for an article number and then go to the summary line of that article
5304 without displaying the article (@code{gnus-summary-goto-subject}).
5305 @end table
5306
5307 If Gnus asks you to press a key to confirm going to the next group, you
5308 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5309 buffer, searching for the next group to read without actually returning
5310 to the group buffer.
5311
5312 Variables related to summary movement:
5313
5314 @table @code
5315
5316 @vindex gnus-auto-select-next
5317 @item gnus-auto-select-next
5318 If you issue one of the movement commands (like @kbd{n}) and there are
5319 no more unread articles after the current one, Gnus will offer to go to
5320 the next group.  If this variable is @code{t} and the next group is
5321 empty, Gnus will exit summary mode and return to the group buffer.  If
5322 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5323 next group with unread articles.  As a special case, if this variable
5324 is @code{quietly}, Gnus will select the next group without asking for
5325 confirmation.  If this variable is @code{almost-quietly}, the same
5326 will happen only if you are located on the last article in the group.
5327 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5328 command will go to the next group without confirmation.  Also
5329 @pxref{Group Levels}.
5330
5331 @item gnus-auto-select-same
5332 @vindex gnus-auto-select-same
5333 If non-@code{nil}, all the movement commands will try to go to the next
5334 article with the same subject as the current.  (@dfn{Same} here might
5335 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
5336 for details (@pxref{Customizing Threading}).)  If there are no more
5337 articles with the same subject, go to the first unread article.
5338
5339 This variable is not particularly useful if you use a threaded display.
5340
5341 @item gnus-summary-check-current
5342 @vindex gnus-summary-check-current
5343 If non-@code{nil}, all the ``unread'' movement commands will not proceed
5344 to the next (or previous) article if the current article is unread.
5345 Instead, they will choose the current article.
5346
5347 @item gnus-auto-center-summary
5348 @vindex gnus-auto-center-summary
5349 If non-@code{nil}, Gnus will keep the point in the summary buffer
5350 centered at all times.  This makes things quite tidy, but if you have a
5351 slow network connection, or simply do not like this un-Emacsism, you can
5352 set this variable to @code{nil} to get the normal Emacs scrolling
5353 action.  This will also inhibit horizontal re-centering of the summary
5354 buffer, which might make it more inconvenient to read extremely long
5355 threads.
5356
5357 This variable can also be a number.  In that case, center the window at
5358 the given number of lines from the top.
5359
5360 @end table
5361
5362
5363 @node Choosing Articles
5364 @section Choosing Articles
5365 @cindex selecting articles
5366
5367 @menu
5368 * Choosing Commands::           Commands for choosing articles.
5369 * Choosing Variables::          Variables that influence these commands.
5370 @end menu
5371
5372
5373 @node Choosing Commands
5374 @subsection Choosing Commands
5375
5376 None of the following movement commands understand the numeric prefix,
5377 and they all select and display an article.
5378
5379 If you want to fetch new articles or redisplay the group, see
5380 @ref{Exiting the Summary Buffer}.
5381
5382 @table @kbd
5383 @item SPACE
5384 @kindex SPACE (Summary)
5385 @findex gnus-summary-next-page
5386 Select the current article, or, if that one's read already, the next
5387 unread article (@code{gnus-summary-next-page}).
5388
5389 If you have an article window open already and you press @kbd{SPACE}
5390 again, the article will be scrolled.  This lets you conveniently
5391 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
5392
5393 @item G n
5394 @itemx n
5395 @kindex n (Summary)
5396 @kindex G n (Summary)
5397 @findex gnus-summary-next-unread-article
5398 @c @icon{gnus-summary-next-unread}
5399 Go to next unread article (@code{gnus-summary-next-unread-article}).
5400
5401 @item G p
5402 @itemx p
5403 @kindex p (Summary)
5404 @findex gnus-summary-prev-unread-article
5405 @c @icon{gnus-summary-prev-unread}
5406 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5407
5408 @item G N
5409 @itemx N
5410 @kindex N (Summary)
5411 @kindex G N (Summary)
5412 @findex gnus-summary-next-article
5413 Go to the next article (@code{gnus-summary-next-article}).
5414
5415 @item G P
5416 @itemx P
5417 @kindex P (Summary)
5418 @kindex G P (Summary)
5419 @findex gnus-summary-prev-article
5420 Go to the previous article (@code{gnus-summary-prev-article}).
5421
5422 @item G C-n
5423 @kindex G C-n (Summary)
5424 @findex gnus-summary-next-same-subject
5425 Go to the next article with the same subject
5426 (@code{gnus-summary-next-same-subject}).
5427
5428 @item G C-p
5429 @kindex G C-p (Summary)
5430 @findex gnus-summary-prev-same-subject
5431 Go to the previous article with the same subject
5432 (@code{gnus-summary-prev-same-subject}).
5433
5434 @item G f
5435 @itemx .
5436 @kindex G f  (Summary)
5437 @kindex .  (Summary)
5438 @findex gnus-summary-first-unread-article
5439 Go to the first unread article
5440 (@code{gnus-summary-first-unread-article}).
5441
5442 @item G b
5443 @itemx ,
5444 @kindex G b (Summary)
5445 @kindex , (Summary)
5446 @findex gnus-summary-best-unread-article
5447 Go to the unread article with the highest score
5448 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5449 go to the first unread article that has a score over the default score.
5450
5451 @item G l
5452 @itemx l
5453 @kindex l (Summary)
5454 @kindex G l (Summary)
5455 @findex gnus-summary-goto-last-article
5456 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5457
5458 @item G o
5459 @kindex G o (Summary)
5460 @findex gnus-summary-pop-article
5461 @cindex history
5462 @cindex article history
5463 Pop an article off the summary history and go to this article
5464 (@code{gnus-summary-pop-article}).  This command differs from the
5465 command above in that you can pop as many previous articles off the
5466 history as you like, while @kbd{l} toggles the two last read articles.
5467 For a somewhat related issue (if you use these commands a lot),
5468 @pxref{Article Backlog}.
5469
5470 @item G j
5471 @itemx j
5472 @kindex j (Summary)
5473 @kindex G j (Summary)
5474 @findex gnus-summary-goto-article
5475 Ask for an article number or @code{Message-ID}, and then go to that
5476 article (@code{gnus-summary-goto-article}).
5477
5478 @end table
5479
5480
5481 @node Choosing Variables
5482 @subsection Choosing Variables
5483
5484 Some variables relevant for moving and selecting articles:
5485
5486 @table @code
5487 @item gnus-auto-extend-newsgroup
5488 @vindex gnus-auto-extend-newsgroup
5489 All the movement commands will try to go to the previous (or next)
5490 article, even if that article isn't displayed in the Summary buffer if
5491 this variable is non-@code{nil}.  Gnus will then fetch the article from
5492 the server and display it in the article buffer.
5493
5494 @item gnus-select-article-hook
5495 @vindex gnus-select-article-hook
5496 This hook is called whenever an article is selected.  The default is
5497 @code{nil}.  If you would like each article to be saved in the Agent as
5498 you read it, putting @code{gnus-agent-fetch-selected-article} on this
5499 hook will do so.
5500
5501 @item gnus-mark-article-hook
5502 @vindex gnus-mark-article-hook
5503 @findex gnus-summary-mark-unread-as-read
5504 @findex gnus-summary-mark-read-and-unread-as-read
5505 @findex gnus-unread-mark
5506 This hook is called whenever an article is selected.  It is intended to
5507 be used for marking articles as read.  The default value is
5508 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5509 mark of almost any article you read to @code{gnus-read-mark}.  The only
5510 articles not affected by this function are ticked, dormant, and
5511 expirable articles.  If you'd instead like to just have unread articles
5512 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5513 instead.  It will leave marks like @code{gnus-low-score-mark},
5514 @code{gnus-del-mark} (and so on) alone.
5515
5516 @end table
5517
5518
5519 @node Paging the Article
5520 @section Scrolling the Article
5521 @cindex article scrolling
5522
5523 @table @kbd
5524
5525 @item SPACE
5526 @kindex SPACE (Summary)
5527 @findex gnus-summary-next-page
5528 Pressing @kbd{SPACE} will scroll the current article forward one page,
5529 or, if you have come to the end of the current article, will choose the
5530 next article (@code{gnus-summary-next-page}).
5531
5532 @vindex gnus-article-boring-faces
5533 @vindex gnus-article-skip-boring
5534 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5535 the article consists only of citations and signature, then it will be
5536 skipped; the next article will be shown instead.  You can customize
5537 what is considered uninteresting with
5538 @code{gnus-article-boring-faces}.  You can manually view the article's
5539 pages, no matter how boring, using @kbd{C-M-v}.
5540
5541 @item DEL
5542 @kindex DEL (Summary)
5543 @findex gnus-summary-prev-page
5544 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5545
5546 @item RET
5547 @kindex RET (Summary)
5548 @findex gnus-summary-scroll-up
5549 Scroll the current article one line forward
5550 (@code{gnus-summary-scroll-up}).
5551
5552 @item M-RET
5553 @kindex M-RET (Summary)
5554 @findex gnus-summary-scroll-down
5555 Scroll the current article one line backward
5556 (@code{gnus-summary-scroll-down}).
5557
5558 @item A g
5559 @itemx g
5560 @kindex A g (Summary)
5561 @kindex g (Summary)
5562 @findex gnus-summary-show-article
5563 @vindex gnus-summary-show-article-charset-alist
5564 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5565 given a prefix, fetch the current article, but don't run any of the
5566 article treatment functions.  This will give you a ``raw'' article, just
5567 the way it came from the server.
5568
5569 If given a numerical prefix, you can do semi-manual charset stuff.
5570 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5571 encoded in the @code{cn-gb-2312} charset.  If you have
5572
5573 @lisp
5574 (setq gnus-summary-show-article-charset-alist
5575       '((1 . cn-gb-2312)
5576         (2 . big5)))
5577 @end lisp
5578
5579 then you can say @kbd{C-u 1 g} to get the same effect.
5580
5581 @item A <
5582 @itemx <
5583 @kindex < (Summary)
5584 @kindex A < (Summary)
5585 @findex gnus-summary-beginning-of-article
5586 Scroll to the beginning of the article
5587 (@code{gnus-summary-beginning-of-article}).
5588
5589 @item A >
5590 @itemx >
5591 @kindex > (Summary)
5592 @kindex A > (Summary)
5593 @findex gnus-summary-end-of-article
5594 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5595
5596 @item A s
5597 @itemx s
5598 @kindex A s (Summary)
5599 @kindex s (Summary)
5600 @findex gnus-summary-isearch-article
5601 Perform an isearch in the article buffer
5602 (@code{gnus-summary-isearch-article}).
5603
5604 @item h
5605 @kindex h (Summary)
5606 @findex gnus-summary-select-article-buffer
5607 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5608
5609 @end table
5610
5611
5612 @node Reply Followup and Post
5613 @section Reply, Followup and Post
5614
5615 @menu
5616 * Summary Mail Commands::       Sending mail.
5617 * Summary Post Commands::       Sending news.
5618 * Summary Message Commands::    Other Message-related commands.
5619 * Canceling and Superseding::
5620 @end menu
5621
5622
5623 @node Summary Mail Commands
5624 @subsection Summary Mail Commands
5625 @cindex mail
5626 @cindex composing mail
5627
5628 Commands for composing a mail message:
5629
5630 @table @kbd
5631
5632 @item S r
5633 @itemx r
5634 @kindex S r (Summary)
5635 @kindex r (Summary)
5636 @findex gnus-summary-reply
5637 @c @icon{gnus-summary-mail-reply}
5638 @c @icon{gnus-summary-reply}
5639 Mail a reply to the author of the current article
5640 (@code{gnus-summary-reply}).
5641
5642 @item S R
5643 @itemx R
5644 @kindex R (Summary)
5645 @kindex S R (Summary)
5646 @findex gnus-summary-reply-with-original
5647 @c @icon{gnus-summary-reply-with-original}
5648 Mail a reply to the author of the current article and include the
5649 original message (@code{gnus-summary-reply-with-original}).  This
5650 command uses the process/prefix convention.
5651
5652 @item S w
5653 @kindex S w (Summary)
5654 @findex gnus-summary-wide-reply
5655 Mail a wide reply to the author of the current article
5656 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5657 goes out to all people listed in the @code{To}, @code{From} (or
5658 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5659 present, that's used instead.
5660
5661 @item S W
5662 @kindex S W (Summary)
5663 @findex gnus-summary-wide-reply-with-original
5664 Mail a wide reply to the current article and include the original
5665 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5666 the process/prefix convention.
5667
5668 @item S v
5669 @kindex S v (Summary)
5670 @findex gnus-summary-very-wide-reply
5671 Mail a very wide reply to the author of the current article
5672 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5673 that goes out to all people listed in the @code{To}, @code{From} (or
5674 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5675 articles.  This command uses the process/prefix convention.
5676
5677 @item S V
5678 @kindex S V (Summary)
5679 @findex gnus-summary-very-wide-reply-with-original
5680 Mail a very wide reply to the author of the current article and include the
5681 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5682 command uses the process/prefix convention.
5683
5684 @item S B r
5685 @kindex S B r (Summary)
5686 @findex gnus-summary-reply-broken-reply-to
5687 Mail a reply to the author of the current article but ignore the
5688 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5689 If you need this because a mailing list incorrectly sets a
5690 @code{Reply-To} header pointing to the list, you probably want to set
5691 the @code{broken-reply-to} group parameter instead, so things will work
5692 correctly.  @xref{Group Parameters}.
5693
5694 @item S B R
5695 @kindex S B R (Summary)
5696 @findex gnus-summary-reply-broken-reply-to-with-original
5697 Mail a reply to the author of the current article and include the
5698 original message but ignore the @code{Reply-To} field
5699 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5700
5701 @item S o m
5702 @itemx C-c C-f
5703 @kindex S o m (Summary)
5704 @kindex C-c C-f (Summary)
5705 @findex gnus-summary-mail-forward
5706 @c @icon{gnus-summary-mail-forward}
5707 Forward the current article to some other person
5708 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5709 is forwarded according to the value of (@code{message-forward-as-mime})
5710 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5711 message and forward directly inline; if the prefix is 2, forward message
5712 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5713 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5714 directly inline; otherwise, the message is forwarded as no prefix given
5715 but use the flipped value of (@code{message-forward-as-mime}).  By
5716 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5717 section.
5718
5719 @item S m
5720 @itemx m
5721 @kindex m (Summary)
5722 @kindex S m (Summary)
5723 @findex gnus-summary-mail-other-window
5724 @c @icon{gnus-summary-mail-originate}
5725 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5726 the posting style of the current group.  If given a prefix, disable that.
5727 If the prefix is 1, prompt for a group name to find the posting style.
5728
5729 @item S i
5730 @itemx i
5731 @kindex i (Summary)
5732 @kindex S i (Summary)
5733 @findex gnus-summary-news-other-window
5734 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5735 post to the current group.  If given a prefix, disable that.  If the
5736 prefix is 1, prompt for a group to post to.
5737
5738 This function actually prepares a news even when using mail groups.
5739 This is useful for ``posting'' messages to mail groups without actually
5740 sending them over the network: they're just saved directly to the group
5741 in question.  The corresponding back end must have a request-post method
5742 for this to work though.
5743
5744 @item S D b
5745 @kindex S D b (Summary)
5746 @findex gnus-summary-resend-bounced-mail
5747 @cindex bouncing mail
5748 If you have sent a mail, but the mail was bounced back to you for some
5749 reason (wrong address, transient failure), you can use this command to
5750 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5751 will be popped into a mail buffer where you can edit the headers before
5752 sending the mail off again.  If you give a prefix to this command, and
5753 the bounced mail is a reply to some other mail, Gnus will try to fetch
5754 that mail and display it for easy perusal of its headers.  This might
5755 very well fail, though.
5756
5757 @item S D r
5758 @kindex S D r (Summary)
5759 @findex gnus-summary-resend-message
5760 Not to be confused with the previous command,
5761 @code{gnus-summary-resend-message} will prompt you for an address to
5762 send the current message off to, and then send it to that place.  The
5763 headers of the message won't be altered---but lots of headers that say
5764 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5765 means that you actually send a mail to someone that has a @code{To}
5766 header that (probably) points to yourself.  This will confuse people.
5767 So, natcherly you'll only do that if you're really eVIl.
5768
5769 This command is mainly used if you have several accounts and want to
5770 ship a mail to a different account of yours.  (If you're both
5771 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5772 to the @code{root} account, you may want to resend it to
5773 @code{postmaster}.  Ordnung muss sein!
5774
5775 This command understands the process/prefix convention
5776 (@pxref{Process/Prefix}).
5777
5778 @item S D e
5779 @kindex S D e (Summary)
5780 @findex gnus-summary-resend-message-edit
5781
5782 Like the previous command, but will allow you to edit the message as
5783 if it were a new message before resending.
5784
5785 @item S O m
5786 @kindex S O m (Summary)
5787 @findex gnus-uu-digest-mail-forward
5788 Digest the current series (@pxref{Decoding Articles}) and forward the
5789 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5790 uses the process/prefix convention (@pxref{Process/Prefix}).
5791
5792 @item S M-c
5793 @kindex S M-c (Summary)
5794 @findex gnus-summary-mail-crosspost-complaint
5795 @cindex crossposting
5796 @cindex excessive crossposting
5797 Send a complaint about excessive crossposting to the author of the
5798 current article (@code{gnus-summary-mail-crosspost-complaint}).
5799
5800 @findex gnus-crosspost-complaint
5801 This command is provided as a way to fight back against the current
5802 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5803 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5804 command understands the process/prefix convention
5805 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5806
5807 @end table
5808
5809 Also @xref{Header Commands, ,Header Commands, message, The Message
5810 Manual}, for more information.
5811
5812
5813 @node Summary Post Commands
5814 @subsection Summary Post Commands
5815 @cindex post
5816 @cindex composing news
5817
5818 Commands for posting a news article:
5819
5820 @table @kbd
5821 @item S p
5822 @itemx a
5823 @kindex a (Summary)
5824 @kindex S p (Summary)
5825 @findex gnus-summary-post-news
5826 @c @icon{gnus-summary-post-news}
5827 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5828 default, post to the current group.  If given a prefix, disable that.
5829 If the prefix is 1, prompt for another group instead.
5830
5831 @item S f
5832 @itemx f
5833 @kindex f (Summary)
5834 @kindex S f (Summary)
5835 @findex gnus-summary-followup
5836 @c @icon{gnus-summary-followup}
5837 Post a followup to the current article (@code{gnus-summary-followup}).
5838
5839 @item S F
5840 @itemx F
5841 @kindex S F (Summary)
5842 @kindex F (Summary)
5843 @c @icon{gnus-summary-followup-with-original}
5844 @findex gnus-summary-followup-with-original
5845 Post a followup to the current article and include the original message
5846 (@code{gnus-summary-followup-with-original}).  This command uses the
5847 process/prefix convention.
5848
5849 @item S n
5850 @kindex S n (Summary)
5851 @findex gnus-summary-followup-to-mail
5852 Post a followup to the current article via news, even if you got the
5853 message through mail (@code{gnus-summary-followup-to-mail}).
5854
5855 @item S N
5856 @kindex S N (Summary)
5857 @findex gnus-summary-followup-to-mail-with-original
5858 Post a followup to the current article via news, even if you got the
5859 message through mail and include the original message
5860 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5861 the process/prefix convention.
5862
5863 @item S o p
5864 @kindex S o p (Summary)
5865 @findex gnus-summary-post-forward
5866 Forward the current article to a newsgroup
5867 (@code{gnus-summary-post-forward}).
5868  If no prefix is given, the message is forwarded according to the value
5869 of (@code{message-forward-as-mime}) and
5870 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5871 message and forward directly inline; if the prefix is 2, forward message
5872 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5873 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5874 directly inline; otherwise, the message is forwarded as no prefix given
5875 but use the flipped value of (@code{message-forward-as-mime}).  By
5876 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5877
5878 @item S O p
5879 @kindex S O p (Summary)
5880 @findex gnus-uu-digest-post-forward
5881 @cindex digests
5882 @cindex making digests
5883 Digest the current series and forward the result to a newsgroup
5884 (@code{gnus-uu-digest-post-forward}).  This command uses the
5885 process/prefix convention.
5886
5887 @item S u
5888 @kindex S u (Summary)
5889 @findex gnus-uu-post-news
5890 @c @icon{gnus-uu-post-news}
5891 Uuencode a file, split it into parts, and post it as a series
5892 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5893 @end table
5894
5895 Also @xref{Header Commands, ,Header Commands, message, The Message
5896 Manual}, for more information.
5897
5898
5899 @node Summary Message Commands
5900 @subsection Summary Message Commands
5901
5902 @table @kbd
5903 @item S y
5904 @kindex S y (Summary)
5905 @findex gnus-summary-yank-message
5906 Yank the current article into an already existing Message composition
5907 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5908 what message buffer you want to yank into, and understands the
5909 process/prefix convention (@pxref{Process/Prefix}).
5910
5911 @end table
5912
5913
5914 @node Canceling and Superseding
5915 @subsection Canceling Articles
5916 @cindex canceling articles
5917 @cindex superseding articles
5918
5919 Have you ever written something, and then decided that you really,
5920 really, really wish you hadn't posted that?
5921
5922 Well, you can't cancel mail, but you can cancel posts.
5923
5924 @findex gnus-summary-cancel-article
5925 @kindex C (Summary)
5926 @c @icon{gnus-summary-cancel-article}
5927 Find the article you wish to cancel (you can only cancel your own
5928 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5929 c} (@code{gnus-summary-cancel-article}).  Your article will be
5930 canceled---machines all over the world will be deleting your article.
5931 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5932
5933 Be aware, however, that not all sites honor cancels, so your article may
5934 live on here and there, while most sites will delete the article in
5935 question.
5936
5937 Gnus will use the ``current'' select method when canceling.  If you
5938 want to use the standard posting method, use the @samp{a} symbolic
5939 prefix (@pxref{Symbolic Prefixes}).
5940
5941 Gnus ensures that only you can cancel your own messages using a
5942 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5943 message, Message Manual}).
5944
5945 If you discover that you have made some mistakes and want to do some
5946 corrections, you can post a @dfn{superseding} article that will replace
5947 your original article.
5948
5949 @findex gnus-summary-supersede-article
5950 @kindex S (Summary)
5951 Go to the original article and press @kbd{S s}
5952 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5953 where you can edit the article all you want before sending it off the
5954 usual way.
5955
5956 The same goes for superseding as for canceling, only more so: Some
5957 sites do not honor superseding.  On those sites, it will appear that you
5958 have posted almost the same article twice.
5959
5960 If you have just posted the article, and change your mind right away,
5961 there is a trick you can use to cancel/supersede the article without
5962 waiting for the article to appear on your site first.  You simply return
5963 to the post buffer (which is called @code{*sent ...*}).  There you will
5964 find the article you just posted, with all the headers intact.  Change
5965 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5966 header by substituting one of those words for the word
5967 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5968 you would do normally.  The previous article will be
5969 canceled/superseded.
5970
5971 Just remember, kids: There is no 'c' in 'supersede'.
5972
5973 @node Delayed Articles
5974 @section Delayed Articles
5975 @cindex delayed sending
5976 @cindex send delayed
5977
5978 Sometimes, you might wish to delay the sending of a message.  For
5979 example, you might wish to arrange for a message to turn up just in time
5980 to remind your about the birthday of your Significant Other.  For this,
5981 there is the @code{gnus-delay} package.  Setup is simple:
5982
5983 @lisp
5984 (gnus-delay-initialize)
5985 @end lisp
5986
5987 @findex gnus-delay-article
5988 Normally, to send a message you use the @kbd{C-c C-c} command from
5989 Message mode.  To delay a message, use @kbd{C-c C-j}
5990 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5991 message should be delayed.  Possible answers are:
5992
5993 @itemize @bullet
5994 @item
5995 A time span.  Consists of an integer and a letter.  For example,
5996 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5997 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5998 (months) and @code{Y} (years).
5999
6000 @item
6001 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6002 delayed until that day, at a specific time (eight o'clock by default).
6003 See also @code{gnus-delay-default-hour}.
6004
6005 @item
6006 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6007 stuff.  The deadline will be at that time today, except if that time has
6008 already passed, then it's at the given time tomorrow.  So if it's ten
6009 o'clock in the morning and you specify @code{11:15}, then the deadline
6010 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6011 that means a time tomorrow.
6012 @end itemize
6013
6014 The action of the @code{gnus-delay-article} command is influenced by a
6015 couple of variables:
6016
6017 @table @code
6018 @item gnus-delay-default-hour
6019 @vindex gnus-delay-default-hour
6020 When you specify a specific date, the message will be due on that hour
6021 on the given date.  Possible values are integers 0 through 23.
6022
6023 @item gnus-delay-default-delay
6024 @vindex gnus-delay-default-delay
6025 This is a string and gives the default delay.  It can be of any of the
6026 formats described above.
6027
6028 @item gnus-delay-group
6029 @vindex gnus-delay-group
6030 Delayed articles will be kept in this group on the drafts server until
6031 they are due.  You probably don't need to change this.  The default
6032 value is @code{"delayed"}.
6033
6034 @item gnus-delay-header
6035 @vindex gnus-delay-header
6036 The deadline for each article will be stored in a header.  This variable
6037 is a string and gives the header name.  You probably don't need to
6038 change this.  The default value is @code{"X-Gnus-Delayed"}.
6039 @end table
6040
6041 The way delaying works is like this: when you use the
6042 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6043 calculates the deadline of the message and stores it in the
6044 @code{X-Gnus-Delayed} header and puts the message in the
6045 @code{nndraft:delayed} group.
6046
6047 @findex gnus-delay-send-queue
6048 And whenever you get new news, Gnus looks through the group for articles
6049 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6050 function for this.  By default, this function is added to the hook
6051 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6052 Maybe you want to use the demon to send drafts?  Just tell the demon to
6053 execute the @code{gnus-delay-send-queue} function.
6054
6055 @table @code
6056 @item gnus-delay-initialize
6057 @findex gnus-delay-initialize
6058 By default, this function installs @code{gnus-delay-send-queue} in
6059 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6060 argument @code{no-check}.  If it is non-@code{nil},
6061 @code{gnus-get-new-news-hook} is not changed.  The optional first
6062 argument is ignored.
6063
6064 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6065 Presumably, you want to use the demon for sending due delayed articles.
6066 Just don't forget to set that up :-)
6067 @end table
6068
6069
6070 @node Marking Articles
6071 @section Marking Articles
6072 @cindex article marking
6073 @cindex article ticking
6074 @cindex marks
6075
6076 There are several marks you can set on an article.
6077
6078 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6079 neologism ohoy!) of the article.  Alphabetic marks generally mean
6080 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6081
6082 In addition, you also have marks that do not affect readedness.
6083
6084 @ifinfo
6085 There's a plethora of commands for manipulating these marks.
6086 @end ifinfo
6087
6088 @menu
6089 * Unread Articles::             Marks for unread articles.
6090 * Read Articles::               Marks for read articles.
6091 * Other Marks::                 Marks that do not affect readedness.
6092 * Setting Marks::               How to set and remove marks.
6093 * Generic Marking Commands::    How to customize the marking.
6094 * Setting Process Marks::       How to mark articles for later processing.
6095 @end menu
6096
6097
6098 @node Unread Articles
6099 @subsection Unread Articles
6100
6101 The following marks mark articles as (kinda) unread, in one form or
6102 other.
6103
6104 @table @samp
6105 @item !
6106 @vindex gnus-ticked-mark
6107 Marked as ticked (@code{gnus-ticked-mark}).
6108
6109 @dfn{Ticked articles} are articles that will remain visible always.  If
6110 you see an article that you find interesting, or you want to put off
6111 reading it, or replying to it, until sometime later, you'd typically
6112 tick it.  However, articles can be expired (from news servers by the
6113 news server software, Gnus itself never expires ticked messages), so if
6114 you want to keep an article forever, you'll have to make it persistent
6115 (@pxref{Persistent Articles}).
6116
6117 @item ?
6118 @vindex gnus-dormant-mark
6119 Marked as dormant (@code{gnus-dormant-mark}).
6120
6121 @dfn{Dormant articles} will only appear in the summary buffer if there
6122 are followups to it.  If you want to see them even if they don't have
6123 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6124 Otherwise (except for the visibility issue), they are just like ticked
6125 messages.
6126
6127 @item SPACE
6128 @vindex gnus-unread-mark
6129 Marked as unread (@code{gnus-unread-mark}).
6130
6131 @dfn{Unread articles} are articles that haven't been read at all yet.
6132 @end table
6133
6134
6135 @node Read Articles
6136 @subsection Read Articles
6137 @cindex expirable mark
6138
6139 All the following marks mark articles as read.
6140
6141 @table @samp
6142
6143 @item r
6144 @vindex gnus-del-mark
6145 These are articles that the user has marked as read with the @kbd{d}
6146 command manually, more or less (@code{gnus-del-mark}).
6147
6148 @item R
6149 @vindex gnus-read-mark
6150 Articles that have actually been read (@code{gnus-read-mark}).
6151
6152 @item O
6153 @vindex gnus-ancient-mark
6154 Articles that were marked as read in previous sessions and are now
6155 @dfn{old} (@code{gnus-ancient-mark}).
6156
6157 @item K
6158 @vindex gnus-killed-mark
6159 Marked as killed (@code{gnus-killed-mark}).
6160
6161 @item X
6162 @vindex gnus-kill-file-mark
6163 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6164
6165 @item Y
6166 @vindex gnus-low-score-mark
6167 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6168
6169 @item C
6170 @vindex gnus-catchup-mark
6171 Marked as read by a catchup (@code{gnus-catchup-mark}).
6172
6173 @item G
6174 @vindex gnus-canceled-mark
6175 Canceled article (@code{gnus-canceled-mark})
6176
6177 @item F
6178 @vindex gnus-souped-mark
6179 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
6180
6181 @item Q
6182 @vindex gnus-sparse-mark
6183 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6184 Threading}.
6185
6186 @item M
6187 @vindex gnus-duplicate-mark
6188 Article marked as read by duplicate suppression
6189 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6190
6191 @end table
6192
6193 All these marks just mean that the article is marked as read, really.
6194 They are interpreted differently when doing adaptive scoring, though.
6195
6196 One more special mark, though:
6197
6198 @table @samp
6199 @item E
6200 @vindex gnus-expirable-mark
6201 Marked as expirable (@code{gnus-expirable-mark}).
6202
6203 Marking articles as @dfn{expirable} (or have them marked as such
6204 automatically) doesn't make much sense in normal groups---a user doesn't
6205 control expiring of news articles, but in mail groups, for instance,
6206 articles marked as @dfn{expirable} can be deleted by Gnus at
6207 any time.
6208 @end table
6209
6210
6211 @node Other Marks
6212 @subsection Other Marks
6213 @cindex process mark
6214 @cindex bookmarks
6215
6216 There are some marks that have nothing to do with whether the article is
6217 read or not.
6218
6219 @itemize @bullet
6220
6221 @item
6222 You can set a bookmark in the current article.  Say you are reading a
6223 long thesis on cats' urinary tracts, and have to go home for dinner
6224 before you've finished reading the thesis.  You can then set a bookmark
6225 in the article, and Gnus will jump to this bookmark the next time it
6226 encounters the article.  @xref{Setting Marks}.
6227
6228 @item
6229 @vindex gnus-replied-mark
6230 All articles that you have replied to or made a followup to (i.e., have
6231 answered) will be marked with an @samp{A} in the second column
6232 (@code{gnus-replied-mark}).
6233
6234 @item
6235 @vindex gnus-forwarded-mark
6236 All articles that you have forwarded will be marked with an @samp{F} in
6237 the second column (@code{gnus-forwarded-mark}).
6238
6239 @item
6240 @vindex gnus-cached-mark
6241 Articles stored in the article cache will be marked with an @samp{*} in
6242 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6243
6244 @item
6245 @vindex gnus-saved-mark
6246 Articles ``saved'' (in some manner or other; not necessarily
6247 religiously) are marked with an @samp{S} in the second column
6248 (@code{gnus-saved-mark}).
6249
6250 @item
6251 @vindex gnus-recent-mark
6252 Articles that according to the server haven't been shown to the user
6253 before are marked with a @samp{N} in the second column
6254 (@code{gnus-recent-mark}).  Note that not all servers support this
6255 mark, in which case it simply never appears.  Compare with
6256 @code{gnus-unseen-mark}.
6257
6258 @item
6259 @vindex gnus-unseen-mark
6260 Articles that haven't been seen before in Gnus by the user are marked
6261 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6262 Compare with @code{gnus-recent-mark}.
6263
6264 @item
6265 @vindex gnus-downloaded-mark
6266 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6267 downloaded for unplugged (offline) viewing.  If you are using the
6268 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6269 (The variable @code{gnus-downloaded-mark} controls which character to
6270 use.)
6271
6272 @item
6273 @vindex gnus-undownloaded-mark
6274 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6275 not have been downloaded.  Such articles cannot be viewed while you
6276 are unplugged (offline).  If you are using the @samp{%O} spec, these
6277 articles get the @samp{-} mark in that spec.  (The variable
6278 @code{gnus-undownloaded-mark} controls which character to use.)
6279
6280 @item
6281 @vindex gnus-downloadable-mark
6282 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6283 automatically, but it is also possible to explicitly mark articles for
6284 download, even if they would not be downloaded automatically.  Such
6285 explicitly-marked articles get the @samp{%} mark in the first column.
6286 (The variable @code{gnus-downloadable-mark} controls which character to
6287 use.)
6288
6289 @item
6290 @vindex gnus-not-empty-thread-mark
6291 @vindex gnus-empty-thread-mark
6292 If the @samp{%e} spec is used, the presence of threads or not will be
6293 marked with @code{gnus-not-empty-thread-mark} and
6294 @code{gnus-empty-thread-mark} in the third column, respectively.
6295
6296 @item
6297 @vindex gnus-process-mark
6298 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6299 variety of commands react to the presence of the process mark.  For
6300 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6301 all articles that have been marked with the process mark.  Articles
6302 marked with the process mark have a @samp{#} in the second column.
6303
6304 @end itemize
6305
6306 You might have noticed that most of these ``non-readedness'' marks
6307 appear in the second column by default.  So if you have a cached, saved,
6308 replied article that you have process-marked, what will that look like?
6309
6310 Nothing much.  The precedence rules go as follows: process -> cache ->
6311 replied -> saved.  So if the article is in the cache and is replied,
6312 you'll only see the cache mark and not the replied mark.
6313
6314
6315 @node Setting Marks
6316 @subsection Setting Marks
6317 @cindex setting marks
6318
6319 All the marking commands understand the numeric prefix.
6320
6321 @table @kbd
6322 @item M c
6323 @itemx M-u
6324 @kindex M c (Summary)
6325 @kindex M-u (Summary)
6326 @findex gnus-summary-clear-mark-forward
6327 @cindex mark as unread
6328 Clear all readedness-marks from the current article
6329 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
6330 article as unread.
6331
6332 @item M t
6333 @itemx !
6334 @kindex ! (Summary)
6335 @kindex M t (Summary)
6336 @findex gnus-summary-tick-article-forward
6337 Tick the current article (@code{gnus-summary-tick-article-forward}).
6338 @xref{Article Caching}.
6339
6340 @item M ?
6341 @itemx ?
6342 @kindex ? (Summary)
6343 @kindex M ? (Summary)
6344 @findex gnus-summary-mark-as-dormant
6345 Mark the current article as dormant
6346 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
6347
6348 @item M d
6349 @itemx d
6350 @kindex M d (Summary)
6351 @kindex d (Summary)
6352 @findex gnus-summary-mark-as-read-forward
6353 Mark the current article as read
6354 (@code{gnus-summary-mark-as-read-forward}).
6355
6356 @item D
6357 @kindex D (Summary)
6358 @findex gnus-summary-mark-as-read-backward
6359 Mark the current article as read and move point to the previous line
6360 (@code{gnus-summary-mark-as-read-backward}).
6361
6362 @item M k
6363 @itemx k
6364 @kindex k (Summary)
6365 @kindex M k (Summary)
6366 @findex gnus-summary-kill-same-subject-and-select
6367 Mark all articles that have the same subject as the current one as read,
6368 and then select the next unread article
6369 (@code{gnus-summary-kill-same-subject-and-select}).
6370
6371 @item M K
6372 @itemx C-k
6373 @kindex M K (Summary)
6374 @kindex C-k (Summary)
6375 @findex gnus-summary-kill-same-subject
6376 Mark all articles that have the same subject as the current one as read
6377 (@code{gnus-summary-kill-same-subject}).
6378
6379 @item M C
6380 @kindex M C (Summary)
6381 @findex gnus-summary-catchup
6382 @c @icon{gnus-summary-catchup}
6383 Mark all unread articles as read (@code{gnus-summary-catchup}).
6384
6385 @item M C-c
6386 @kindex M C-c (Summary)
6387 @findex gnus-summary-catchup-all
6388 Mark all articles in the group as read---even the ticked and dormant
6389 articles (@code{gnus-summary-catchup-all}).
6390
6391 @item M H
6392 @kindex M H (Summary)
6393 @findex gnus-summary-catchup-to-here
6394 Catchup the current group to point (before the point)
6395 (@code{gnus-summary-catchup-to-here}).
6396
6397 @item M h
6398 @kindex M h (Summary)
6399 @findex gnus-summary-catchup-from-here
6400 Catchup the current group from point (after the point)
6401 (@code{gnus-summary-catchup-from-here}).
6402
6403 @item C-w
6404 @kindex C-w (Summary)
6405 @findex gnus-summary-mark-region-as-read
6406 Mark all articles between point and mark as read
6407 (@code{gnus-summary-mark-region-as-read}).
6408
6409 @item M V k
6410 @kindex M V k (Summary)
6411 @findex gnus-summary-kill-below
6412 Kill all articles with scores below the default score (or below the
6413 numeric prefix) (@code{gnus-summary-kill-below}).
6414
6415 @item M e
6416 @itemx E
6417 @kindex M e (Summary)
6418 @kindex E (Summary)
6419 @findex gnus-summary-mark-as-expirable
6420 Mark the current article as expirable
6421 (@code{gnus-summary-mark-as-expirable}).
6422
6423 @item M b
6424 @kindex M b (Summary)
6425 @findex gnus-summary-set-bookmark
6426 Set a bookmark in the current article
6427 (@code{gnus-summary-set-bookmark}).
6428
6429 @item M B
6430 @kindex M B (Summary)
6431 @findex gnus-summary-remove-bookmark
6432 Remove the bookmark from the current article
6433 (@code{gnus-summary-remove-bookmark}).
6434
6435 @item M V c
6436 @kindex M V c (Summary)
6437 @findex gnus-summary-clear-above
6438 Clear all marks from articles with scores over the default score (or
6439 over the numeric prefix) (@code{gnus-summary-clear-above}).
6440
6441 @item M V u
6442 @kindex M V u (Summary)
6443 @findex gnus-summary-tick-above
6444 Tick all articles with scores over the default score (or over the
6445 numeric prefix) (@code{gnus-summary-tick-above}).
6446
6447 @item M V m
6448 @kindex M V m (Summary)
6449 @findex gnus-summary-mark-above
6450 Prompt for a mark, and mark all articles with scores over the default
6451 score (or over the numeric prefix) with this mark
6452 (@code{gnus-summary-clear-above}).
6453 @end table
6454
6455 @vindex gnus-summary-goto-unread
6456 The @code{gnus-summary-goto-unread} variable controls what action should
6457 be taken after setting a mark.  If non-@code{nil}, point will move to
6458 the next/previous unread article.  If @code{nil}, point will just move
6459 one line up or down.  As a special case, if this variable is
6460 @code{never}, all the marking commands as well as other commands (like
6461 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6462 The default is @code{t}.
6463
6464
6465 @node Generic Marking Commands
6466 @subsection Generic Marking Commands
6467
6468 Some people would like the command that ticks an article (@kbd{!}) go to
6469 the next article.  Others would like it to go to the next unread
6470 article.  Yet others would like it to stay on the current article.  And
6471 even though I haven't heard of anybody wanting it to go to the
6472 previous (unread) article, I'm sure there are people that want that as
6473 well.
6474
6475 Multiply these five behaviors with five different marking commands, and
6476 you get a potentially complex set of variable to control what each
6477 command should do.
6478
6479 To sidestep that mess, Gnus provides commands that do all these
6480 different things.  They can be found on the @kbd{M M} map in the summary
6481 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6482 to list in this manual.
6483
6484 While you can use these commands directly, most users would prefer
6485 altering the summary mode keymap.  For instance, if you would like the
6486 @kbd{!} command to go to the next article instead of the next unread
6487 article, you could say something like:
6488
6489 @lisp
6490 @group
6491 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6492 (defun my-alter-summary-map ()
6493   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6494 @end group
6495 @end lisp
6496
6497 @noindent
6498 or
6499
6500 @lisp
6501 (defun my-alter-summary-map ()
6502   (local-set-key "!" "MM!n"))
6503 @end lisp
6504
6505
6506 @node Setting Process Marks
6507 @subsection Setting Process Marks
6508 @cindex setting process marks
6509
6510 Process marks are displayed as @code{#} in the summary buffer, and are
6511 used for marking articles in such a way that other commands will
6512 process these articles.  For instance, if you process mark four
6513 articles and then use the @kbd{*} command, Gnus will enter these four
6514 articles into the cache.  For more information,
6515 @pxref{Process/Prefix}.
6516
6517 @table @kbd
6518
6519 @item M P p
6520 @itemx #
6521 @kindex # (Summary)
6522 @kindex M P p (Summary)
6523 @findex gnus-summary-mark-as-processable
6524 Mark the current article with the process mark
6525 (@code{gnus-summary-mark-as-processable}).
6526 @findex gnus-summary-unmark-as-processable
6527
6528 @item M P u
6529 @itemx M-#
6530 @kindex M P u (Summary)
6531 @kindex M-# (Summary)
6532 Remove the process mark, if any, from the current article
6533 (@code{gnus-summary-unmark-as-processable}).
6534
6535 @item M P U
6536 @kindex M P U (Summary)
6537 @findex gnus-summary-unmark-all-processable
6538 Remove the process mark from all articles
6539 (@code{gnus-summary-unmark-all-processable}).
6540
6541 @item M P i
6542 @kindex M P i (Summary)
6543 @findex gnus-uu-invert-processable
6544 Invert the list of process marked articles
6545 (@code{gnus-uu-invert-processable}).
6546
6547 @item M P R
6548 @kindex M P R (Summary)
6549 @findex gnus-uu-mark-by-regexp
6550 Mark articles that have a @code{Subject} header that matches a regular
6551 expression (@code{gnus-uu-mark-by-regexp}).
6552
6553 @item M P G
6554 @kindex M P G (Summary)
6555 @findex gnus-uu-unmark-by-regexp
6556 Unmark articles that have a @code{Subject} header that matches a regular
6557 expression (@code{gnus-uu-unmark-by-regexp}).
6558
6559 @item M P r
6560 @kindex M P r (Summary)
6561 @findex gnus-uu-mark-region
6562 Mark articles in region (@code{gnus-uu-mark-region}).
6563
6564 @item M P g
6565 @kindex M P g (Summary)
6566 @findex gnus-uu-unmark-region
6567 Unmark articles in region (@code{gnus-uu-unmark-region}).
6568
6569 @item M P t
6570 @kindex M P t (Summary)
6571 @findex gnus-uu-mark-thread
6572 Mark all articles in the current (sub)thread
6573 (@code{gnus-uu-mark-thread}).
6574
6575 @item M P T
6576 @kindex M P T (Summary)
6577 @findex gnus-uu-unmark-thread
6578 Unmark all articles in the current (sub)thread
6579 (@code{gnus-uu-unmark-thread}).
6580
6581 @item M P v
6582 @kindex M P v (Summary)
6583 @findex gnus-uu-mark-over
6584 Mark all articles that have a score above the prefix argument
6585 (@code{gnus-uu-mark-over}).
6586
6587 @item M P s
6588 @kindex M P s (Summary)
6589 @findex gnus-uu-mark-series
6590 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6591
6592 @item M P S
6593 @kindex M P S (Summary)
6594 @findex gnus-uu-mark-sparse
6595 Mark all series that have already had some articles marked
6596 (@code{gnus-uu-mark-sparse}).
6597
6598 @item M P a
6599 @kindex M P a (Summary)
6600 @findex gnus-uu-mark-all
6601 Mark all articles in series order (@code{gnus-uu-mark-all}).
6602
6603 @item M P b
6604 @kindex M P b (Summary)
6605 @findex gnus-uu-mark-buffer
6606 Mark all articles in the buffer in the order they appear
6607 (@code{gnus-uu-mark-buffer}).
6608
6609 @item M P k
6610 @kindex M P k (Summary)
6611 @findex gnus-summary-kill-process-mark
6612 Push the current process mark set onto the stack and unmark all articles
6613 (@code{gnus-summary-kill-process-mark}).
6614
6615 @item M P y
6616 @kindex M P y (Summary)
6617 @findex gnus-summary-yank-process-mark
6618 Pop the previous process mark set from the stack and restore it
6619 (@code{gnus-summary-yank-process-mark}).
6620
6621 @item M P w
6622 @kindex M P w (Summary)
6623 @findex gnus-summary-save-process-mark
6624 Push the current process mark set onto the stack
6625 (@code{gnus-summary-save-process-mark}).
6626
6627 @end table
6628
6629 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6630 set process marks based on article body contents.
6631
6632
6633 @node Limiting
6634 @section Limiting
6635 @cindex limiting
6636
6637 It can be convenient to limit the summary buffer to just show some
6638 subset of the articles currently in the group.  The effect most limit
6639 commands have is to remove a few (or many) articles from the summary
6640 buffer.
6641
6642 All limiting commands work on subsets of the articles already fetched
6643 from the servers.  None of these commands query the server for
6644 additional articles.
6645
6646 @table @kbd
6647
6648 @item / /
6649 @itemx / s
6650 @kindex / / (Summary)
6651 @findex gnus-summary-limit-to-subject
6652 Limit the summary buffer to articles that match some subject
6653 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6654 matching articles.
6655
6656 @item / a
6657 @kindex / a (Summary)
6658 @findex gnus-summary-limit-to-author
6659 Limit the summary buffer to articles that match some author
6660 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6661 matching articles.
6662
6663 @item / R
6664 @kindex / R (Summary)
6665 @findex gnus-summary-limit-to-recipient
6666 Limit the summary buffer to articles that match some recipient
6667 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
6668 matching articles.
6669
6670 @item / A
6671 @kindex / A (Summary)
6672 @findex gnus-summary-limit-to-address
6673 Limit the summary buffer to articles in which contents of From, To or Cc
6674 header match a given address (@code{gnus-summary-limit-to-address}).  If
6675 given a prefix, exclude matching articles.
6676
6677 @item / S
6678 @kindex / S (Summary)
6679 @findex gnus-summary-limit-to-singletons
6680 Limit the summary buffer to articles that aren't part of any displayed
6681 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
6682 limit to articles that are part of displayed threads.
6683
6684 @item / x
6685 @kindex / x (Summary)
6686 @findex gnus-summary-limit-to-extra
6687 Limit the summary buffer to articles that match one of the ``extra''
6688 headers (@pxref{To From Newsgroups})
6689 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6690 matching articles.
6691
6692 @item / u
6693 @itemx x
6694 @kindex / u (Summary)
6695 @kindex x (Summary)
6696 @findex gnus-summary-limit-to-unread
6697 Limit the summary buffer to articles not marked as read
6698 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6699 buffer to articles strictly unread.  This means that ticked and
6700 dormant articles will also be excluded.
6701
6702 @item / m
6703 @kindex / m (Summary)
6704 @findex gnus-summary-limit-to-marks
6705 Ask for a mark and then limit to all articles that have been marked
6706 with that mark (@code{gnus-summary-limit-to-marks}).
6707
6708 @item / t
6709 @kindex / t (Summary)
6710 @findex gnus-summary-limit-to-age
6711 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6712 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6713 articles younger than that number of days.
6714
6715 @item / n
6716 @kindex / n (Summary)
6717 @findex gnus-summary-limit-to-articles
6718 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
6719 articles.  If not given a prefix, use the process marked articles
6720 instead.  (@code{gnus-summary-limit-to-articles}).
6721
6722 @item / w
6723 @kindex / w (Summary)
6724 @findex gnus-summary-pop-limit
6725 Pop the previous limit off the stack and restore it
6726 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6727 the stack.
6728
6729 @item / .
6730 @kindex / . (Summary)
6731 @findex gnus-summary-limit-to-unseen
6732 Limit the summary buffer to the unseen articles
6733 (@code{gnus-summary-limit-to-unseen}).
6734
6735 @item / v
6736 @kindex / v (Summary)
6737 @findex gnus-summary-limit-to-score
6738 Limit the summary buffer to articles that have a score at or above some
6739 score (@code{gnus-summary-limit-to-score}).
6740
6741 @item / p
6742 @kindex / p (Summary)
6743 @findex gnus-summary-limit-to-display-predicate
6744 Limit the summary buffer to articles that satisfy the @code{display}
6745 group parameter predicate
6746 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6747 Parameters}, for more on this predicate.
6748
6749 @item / r
6750 @kindex / r (Summary)
6751 @findex gnus-summary-limit-to-replied
6752 Limit the summary buffer to replied articles
6753 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
6754 replied articles.
6755
6756 @item / E
6757 @itemx M S
6758 @kindex M S (Summary)
6759 @kindex / E (Summary)
6760 @findex gnus-summary-limit-include-expunged
6761 Include all expunged articles in the limit
6762 (@code{gnus-summary-limit-include-expunged}).
6763
6764 @item / D
6765 @kindex / D (Summary)
6766 @findex gnus-summary-limit-include-dormant
6767 Include all dormant articles in the limit
6768 (@code{gnus-summary-limit-include-dormant}).
6769
6770 @item / *
6771 @kindex / * (Summary)
6772 @findex gnus-summary-limit-include-cached
6773 Include all cached articles in the limit
6774 (@code{gnus-summary-limit-include-cached}).
6775
6776 @item / d
6777 @kindex / d (Summary)
6778 @findex gnus-summary-limit-exclude-dormant
6779 Exclude all dormant articles from the limit
6780 (@code{gnus-summary-limit-exclude-dormant}).
6781
6782 @item / M
6783 @kindex / M (Summary)
6784 @findex gnus-summary-limit-exclude-marks
6785 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6786
6787 @item / T
6788 @kindex / T (Summary)
6789 @findex gnus-summary-limit-include-thread
6790 Include all the articles in the current thread in the limit.
6791
6792 @item / c
6793 @kindex / c (Summary)
6794 @findex gnus-summary-limit-exclude-childless-dormant
6795 Exclude all dormant articles that have no children from the limit@*
6796 (@code{gnus-summary-limit-exclude-childless-dormant}).
6797
6798 @item / C
6799 @kindex / C (Summary)
6800 @findex gnus-summary-limit-mark-excluded-as-read
6801 Mark all excluded unread articles as read
6802 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6803 also mark excluded ticked and dormant articles as read.
6804
6805 @item / N
6806 @kindex / N (Summary)
6807 @findex gnus-summary-insert-new-articles
6808 Insert all new articles in the summary buffer.  It scans for new emails
6809 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6810
6811 @item / o
6812 @kindex / o (Summary)
6813 @findex gnus-summary-insert-old-articles
6814 Insert all old articles in the summary buffer.  If given a numbered
6815 prefix, fetch this number of articles.
6816
6817 @item / b
6818 @kindex / b (Summary)
6819 @findex gnus-summary-limit-to-bodies
6820 Limit the summary buffer to articles that have bodies that match a
6821 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
6822 prefix, reverse the limit.  This command is quite slow since it
6823 requires selecting each article to find the matches.
6824
6825 @item / h
6826 @kindex / h (Summary)
6827 @findex gnus-summary-limit-to-headers
6828 Like the previous command, only limit to headers instead
6829 (@code{gnus-summary-limit-to-headers}).
6830
6831 @end table
6832
6833
6834 @node Threading
6835 @section Threading
6836 @cindex threading
6837 @cindex article threading
6838
6839 Gnus threads articles by default.  @dfn{To thread} is to put responses
6840 to articles directly after the articles they respond to---in a
6841 hierarchical fashion.
6842
6843 Threading is done by looking at the @code{References} headers of the
6844 articles.  In a perfect world, this would be enough to build pretty
6845 trees, but unfortunately, the @code{References} header is often broken
6846 or simply missing.  Weird news propagation exacerbates the problem,
6847 so one has to employ other heuristics to get pleasing results.  A
6848 plethora of approaches exists, as detailed in horrible detail in
6849 @ref{Customizing Threading}.
6850
6851 First, a quick overview of the concepts:
6852
6853 @table @dfn
6854 @item root
6855 The top-most article in a thread; the first article in the thread.
6856
6857 @item thread
6858 A tree-like article structure.
6859
6860 @item sub-thread
6861 A small(er) section of this tree-like structure.
6862
6863 @item loose threads
6864 Threads often lose their roots due to article expiry, or due to the root
6865 already having been read in a previous session, and not displayed in the
6866 summary buffer.  We then typically have many sub-threads that really
6867 belong to one thread, but are without connecting roots.  These are
6868 called loose threads.
6869
6870 @item thread gathering
6871 An attempt to gather loose threads into bigger threads.
6872
6873 @item sparse threads
6874 A thread where the missing articles have been ``guessed'' at, and are
6875 displayed as empty lines in the summary buffer.
6876
6877 @end table
6878
6879
6880 @menu
6881 * Customizing Threading::       Variables you can change to affect the threading.
6882 * Thread Commands::             Thread based commands in the summary buffer.
6883 @end menu
6884
6885
6886 @node Customizing Threading
6887 @subsection Customizing Threading
6888 @cindex customizing threading
6889
6890 @menu
6891 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6892 * Filling In Threads::          Making the threads displayed look fuller.
6893 * More Threading::              Even more variables for fiddling with threads.
6894 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6895 @end menu
6896
6897
6898 @node Loose Threads
6899 @subsubsection Loose Threads
6900 @cindex <
6901 @cindex >
6902 @cindex loose threads
6903
6904 @table @code
6905 @item gnus-summary-make-false-root
6906 @vindex gnus-summary-make-false-root
6907 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6908 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6909 Yup.)  Loose subtrees occur when the real root has expired, or you've
6910 read or killed the root in a previous session.
6911
6912 When there is no real root of a thread, Gnus will have to fudge
6913 something.  This variable says what fudging method Gnus should use.
6914 There are four possible values:
6915
6916 @iftex
6917 @iflatex
6918 \gnusfigure{The Summary Buffer}{390}{
6919 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6920 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6921 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6922 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6923 }
6924 @end iflatex
6925 @end iftex
6926
6927 @cindex adopting articles
6928
6929 @table @code
6930
6931 @item adopt
6932 Gnus will make the first of the orphaned articles the parent.  This
6933 parent will adopt all the other articles.  The adopted articles will be
6934 marked as such by pointy brackets (@samp{<>}) instead of the standard
6935 square brackets (@samp{[]}).  This is the default method.
6936
6937 @item dummy
6938 @vindex gnus-summary-dummy-line-format
6939 @vindex gnus-summary-make-false-root-always
6940 Gnus will create a dummy summary line that will pretend to be the
6941 parent.  This dummy line does not correspond to any real article, so
6942 selecting it will just select the first real article after the dummy
6943 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6944 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6945 which is the subject of the article.  @xref{Formatting Variables}.
6946 If you want all threads to have a dummy root, even the non-gathered
6947 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6948
6949 @item empty
6950 Gnus won't actually make any article the parent, but simply leave the
6951 subject field of all orphans except the first empty.  (Actually, it will
6952 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6953 Buffer Format}).)
6954
6955 @item none
6956 Don't make any article parent at all.  Just gather the threads and
6957 display them after one another.
6958
6959 @item nil
6960 Don't gather loose threads.
6961 @end table
6962
6963 @item gnus-summary-gather-subject-limit
6964 @vindex gnus-summary-gather-subject-limit
6965 Loose threads are gathered by comparing subjects of articles.  If this
6966 variable is @code{nil}, Gnus requires an exact match between the
6967 subjects of the loose threads before gathering them into one big
6968 super-thread.  This might be too strict a requirement, what with the
6969 presence of stupid newsreaders that chop off long subject lines.  If
6970 you think so, set this variable to, say, 20 to require that only the
6971 first 20 characters of the subjects have to match.  If you set this
6972 variable to a really low number, you'll find that Gnus will gather
6973 everything in sight into one thread, which isn't very helpful.
6974
6975 @cindex fuzzy article gathering
6976 If you set this variable to the special value @code{fuzzy}, Gnus will
6977 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6978 Matching}).
6979
6980 @item gnus-simplify-subject-fuzzy-regexp
6981 @vindex gnus-simplify-subject-fuzzy-regexp
6982 This can either be a regular expression or list of regular expressions
6983 that match strings that will be removed from subjects if fuzzy subject
6984 simplification is used.
6985
6986 @item gnus-simplify-ignored-prefixes
6987 @vindex gnus-simplify-ignored-prefixes
6988 If you set @code{gnus-summary-gather-subject-limit} to something as low
6989 as 10, you might consider setting this variable to something sensible:
6990
6991 @c Written by Michael Ernst <mernst@cs.rice.edu>
6992 @lisp
6993 (setq gnus-simplify-ignored-prefixes
6994       (concat
6995        "\\`\\[?\\("
6996        (mapconcat
6997         'identity
6998         '("looking"
6999           "wanted" "followup" "summary\\( of\\)?"
7000           "help" "query" "problem" "question"
7001           "answer" "reference" "announce"
7002           "How can I" "How to" "Comparison of"
7003           ;; ...
7004           )
7005         "\\|")
7006        "\\)\\s *\\("
7007        (mapconcat 'identity
7008                   '("for" "for reference" "with" "about")
7009                   "\\|")
7010        "\\)?\\]?:?[ \t]*"))
7011 @end lisp
7012
7013 All words that match this regexp will be removed before comparing two
7014 subjects.
7015
7016 @item gnus-simplify-subject-functions
7017 @vindex gnus-simplify-subject-functions
7018 If non-@code{nil}, this variable overrides
7019 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7020 list of functions to apply to the @code{Subject} string iteratively to
7021 arrive at the simplified version of the string.
7022
7023 Useful functions to put in this list include:
7024
7025 @table @code
7026 @item gnus-simplify-subject-re
7027 @findex gnus-simplify-subject-re
7028 Strip the leading @samp{Re:}.
7029
7030 @item gnus-simplify-subject-fuzzy
7031 @findex gnus-simplify-subject-fuzzy
7032 Simplify fuzzily.
7033
7034 @item gnus-simplify-whitespace
7035 @findex gnus-simplify-whitespace
7036 Remove excessive whitespace.
7037
7038 @item gnus-simplify-all-whitespace
7039 @findex gnus-simplify-all-whitespace
7040 Remove all whitespace.
7041 @end table
7042
7043 You may also write your own functions, of course.
7044
7045
7046 @item gnus-summary-gather-exclude-subject
7047 @vindex gnus-summary-gather-exclude-subject
7048 Since loose thread gathering is done on subjects only, that might lead
7049 to many false hits, especially with certain common subjects like
7050 @samp{} and @samp{(none)}.  To make the situation slightly better,
7051 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7052 what subjects should be excluded from the gathering process.@*
7053 The default is @samp{^ *$\\|^(none)$}.
7054
7055 @item gnus-summary-thread-gathering-function
7056 @vindex gnus-summary-thread-gathering-function
7057 Gnus gathers threads by looking at @code{Subject} headers.  This means
7058 that totally unrelated articles may end up in the same ``thread'', which
7059 is confusing.  An alternate approach is to look at all the
7060 @code{Message-ID}s in all the @code{References} headers to find matches.
7061 This will ensure that no gathered threads ever include unrelated
7062 articles, but it also means that people who have posted with broken
7063 newsreaders won't be gathered properly.  The choice is yours---plague or
7064 cholera:
7065
7066 @table @code
7067 @item gnus-gather-threads-by-subject
7068 @findex gnus-gather-threads-by-subject
7069 This function is the default gathering function and looks at
7070 @code{Subject}s exclusively.
7071
7072 @item gnus-gather-threads-by-references
7073 @findex gnus-gather-threads-by-references
7074 This function looks at @code{References} headers exclusively.
7075 @end table
7076
7077 If you want to test gathering by @code{References}, you could say
7078 something like:
7079
7080 @lisp
7081 (setq gnus-summary-thread-gathering-function
7082       'gnus-gather-threads-by-references)
7083 @end lisp
7084
7085 @end table
7086
7087
7088 @node Filling In Threads
7089 @subsubsection Filling In Threads
7090
7091 @table @code
7092 @item gnus-fetch-old-headers
7093 @vindex gnus-fetch-old-headers
7094 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7095 more old headers---headers to articles marked as read.  If you would
7096 like to display as few summary lines as possible, but still connect as
7097 many loose threads as possible, you should set this variable to
7098 @code{some} or a number.  If you set it to a number, no more than that
7099 number of extra old headers will be fetched.  In either case, fetching
7100 old headers only works if the back end you are using carries overview
7101 files---this would normally be @code{nntp}, @code{nnspool},
7102 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7103 the thread has been expired by the server, there's not much Gnus can
7104 do about that.
7105
7106 This variable can also be set to @code{invisible}.  This won't have any
7107 visible effects, but is useful if you use the @kbd{A T} command a lot
7108 (@pxref{Finding the Parent}).
7109
7110 The server has to support @acronym{NOV} for any of this to work.
7111
7112 @cindex Gmane, gnus-fetch-old-headers
7113 This feature can seriously impact performance it ignores all locally
7114 cached header entries.  Setting it to @code{t} for groups for a server
7115 that doesn't expire articles (such as news.gmane.org), leads to very
7116 slow summary generation.
7117
7118 @item gnus-fetch-old-ephemeral-headers
7119 @vindex gnus-fetch-old-ephemeral-headers
7120 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7121 newsgroups.
7122
7123 @item gnus-build-sparse-threads
7124 @vindex gnus-build-sparse-threads
7125 Fetching old headers can be slow.  A low-rent similar effect can be
7126 gotten by setting this variable to @code{some}.  Gnus will then look at
7127 the complete @code{References} headers of all articles and try to string
7128 together articles that belong in the same thread.  This will leave
7129 @dfn{gaps} in the threading display where Gnus guesses that an article
7130 is missing from the thread.  (These gaps appear like normal summary
7131 lines.  If you select a gap, Gnus will try to fetch the article in
7132 question.)  If this variable is @code{t}, Gnus will display all these
7133 ``gaps'' without regard for whether they are useful for completing the
7134 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7135 off sparse leaf nodes that don't lead anywhere.  This variable is
7136 @code{nil} by default.
7137
7138 @item gnus-read-all-available-headers
7139 @vindex gnus-read-all-available-headers
7140 This is a rather obscure variable that few will find useful.  It's
7141 intended for those non-news newsgroups where the back end has to fetch
7142 quite a lot to present the summary buffer, and where it's impossible to
7143 go back to parents of articles.  This is mostly the case in the
7144 web-based groups, like the @code{nnultimate} groups.
7145
7146 If you don't use those, then it's safe to leave this as the default
7147 @code{nil}.  If you want to use this variable, it should be a regexp
7148 that matches the group name, or @code{t} for all groups.
7149
7150 @end table
7151
7152
7153 @node More Threading
7154 @subsubsection More Threading
7155
7156 @table @code
7157 @item gnus-show-threads
7158 @vindex gnus-show-threads
7159 If this variable is @code{nil}, no threading will be done, and all of
7160 the rest of the variables here will have no effect.  Turning threading
7161 off will speed group selection up a bit, but it is sure to make reading
7162 slower and more awkward.
7163
7164 @item gnus-thread-hide-subtree
7165 @vindex gnus-thread-hide-subtree
7166 If non-@code{nil}, all threads will be hidden when the summary buffer is
7167 generated.
7168
7169 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7170 Available predicates are @code{gnus-article-unread-p} and
7171 @code{gnus-article-unseen-p}.
7172
7173 Here's an example:
7174
7175 @lisp
7176 (setq gnus-thread-hide-subtree
7177       '(or gnus-article-unread-p
7178            gnus-article-unseen-p))
7179 @end lisp
7180
7181 (It's a pretty nonsensical example, since all unseen articles are also
7182 unread, but you get my drift.)
7183
7184
7185 @item gnus-thread-expunge-below
7186 @vindex gnus-thread-expunge-below
7187 All threads that have a total score (as defined by
7188 @code{gnus-thread-score-function}) less than this number will be
7189 expunged.  This variable is @code{nil} by default, which means that no
7190 threads are expunged.
7191
7192 @item gnus-thread-hide-killed
7193 @vindex gnus-thread-hide-killed
7194 if you kill a thread and this variable is non-@code{nil}, the subtree
7195 will be hidden.
7196
7197 @item gnus-thread-ignore-subject
7198 @vindex gnus-thread-ignore-subject
7199 Sometimes somebody changes the subject in the middle of a thread.  If
7200 this variable is non-@code{nil}, which is the default, the subject
7201 change is ignored.  If it is @code{nil}, a change in the subject will
7202 result in a new thread.
7203
7204 @item gnus-thread-indent-level
7205 @vindex gnus-thread-indent-level
7206 This is a number that says how much each sub-thread should be indented.
7207 The default is 4.
7208
7209 @item gnus-sort-gathered-threads-function
7210 @vindex gnus-sort-gathered-threads-function
7211 Sometimes, particularly with mailing lists, the order in which mails
7212 arrive locally is not necessarily the same as the order in which they
7213 arrived on the mailing list.  Consequently, when sorting sub-threads
7214 using the default @code{gnus-thread-sort-by-number}, responses can end
7215 up appearing before the article to which they are responding to.
7216 Setting this variable to an alternate value
7217 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7218 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7219 more logical sub-thread ordering in such instances.
7220
7221 @end table
7222
7223
7224 @node Low-Level Threading
7225 @subsubsection Low-Level Threading
7226
7227 @table @code
7228
7229 @item gnus-parse-headers-hook
7230 @vindex gnus-parse-headers-hook
7231 Hook run before parsing any headers.
7232
7233 @item gnus-alter-header-function
7234 @vindex gnus-alter-header-function
7235 If non-@code{nil}, this function will be called to allow alteration of
7236 article header structures.  The function is called with one parameter,
7237 the article header vector, which it may alter in any way.  For instance,
7238 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7239 in systematic ways (by adding prefixes and such), you can use this
7240 variable to un-scramble the @code{Message-ID}s so that they are more
7241 meaningful.  Here's one example:
7242
7243 @lisp
7244 (setq gnus-alter-header-function 'my-alter-message-id)
7245
7246 (defun my-alter-message-id (header)
7247   (let ((id (mail-header-id header)))
7248     (when (string-match
7249            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7250       (mail-header-set-id
7251        (concat (match-string 1 id) "@@" (match-string 2 id))
7252        header))))
7253 @end lisp
7254
7255 @end table
7256
7257
7258 @node Thread Commands
7259 @subsection Thread Commands
7260 @cindex thread commands
7261
7262 @table @kbd
7263
7264 @item T k
7265 @itemx C-M-k
7266 @kindex T k (Summary)
7267 @kindex C-M-k (Summary)
7268 @findex gnus-summary-kill-thread
7269 Mark all articles in the current (sub-)thread as read
7270 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7271 remove all marks instead.  If the prefix argument is negative, tick
7272 articles instead.
7273
7274 @item T l
7275 @itemx C-M-l
7276 @kindex T l (Summary)
7277 @kindex C-M-l (Summary)
7278 @findex gnus-summary-lower-thread
7279 Lower the score of the current (sub-)thread
7280 (@code{gnus-summary-lower-thread}).
7281
7282 @item T i
7283 @kindex T i (Summary)
7284 @findex gnus-summary-raise-thread
7285 Increase the score of the current (sub-)thread
7286 (@code{gnus-summary-raise-thread}).
7287
7288 @item T #
7289 @kindex T # (Summary)
7290 @findex gnus-uu-mark-thread
7291 Set the process mark on the current (sub-)thread
7292 (@code{gnus-uu-mark-thread}).
7293
7294 @item T M-#
7295 @kindex T M-# (Summary)
7296 @findex gnus-uu-unmark-thread
7297 Remove the process mark from the current (sub-)thread
7298 (@code{gnus-uu-unmark-thread}).
7299
7300 @item T T
7301 @kindex T T (Summary)
7302 @findex gnus-summary-toggle-threads
7303 Toggle threading (@code{gnus-summary-toggle-threads}).
7304
7305 @item T s
7306 @kindex T s (Summary)
7307 @findex gnus-summary-show-thread
7308 Expose the (sub-)thread hidden under the current article, if any@*
7309 (@code{gnus-summary-show-thread}).
7310
7311 @item T h
7312 @kindex T h (Summary)
7313 @findex gnus-summary-hide-thread
7314 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
7315
7316 @item T S
7317 @kindex T S (Summary)
7318 @findex gnus-summary-show-all-threads
7319 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
7320
7321 @item T H
7322 @kindex T H (Summary)
7323 @findex gnus-summary-hide-all-threads
7324 Hide all threads (@code{gnus-summary-hide-all-threads}).
7325
7326 @item T t
7327 @kindex T t (Summary)
7328 @findex gnus-summary-rethread-current
7329 Re-thread the current article's thread
7330 (@code{gnus-summary-rethread-current}).  This works even when the
7331 summary buffer is otherwise unthreaded.
7332
7333 @item T ^
7334 @kindex T ^ (Summary)
7335 @findex gnus-summary-reparent-thread
7336 Make the current article the child of the marked (or previous) article
7337 (@code{gnus-summary-reparent-thread}).
7338
7339 @item T M-^
7340 @kindex T M-^ (Summary)
7341 @findex gnus-summary-reparent-children
7342 Make the current article the parent of the marked articles
7343 (@code{gnus-summary-reparent-children}).
7344
7345 @end table
7346
7347 The following commands are thread movement commands.  They all
7348 understand the numeric prefix.
7349
7350 @table @kbd
7351
7352 @item T n
7353 @kindex T n (Summary)
7354 @itemx C-M-f
7355 @kindex C-M-n (Summary)
7356 @itemx M-down
7357 @kindex M-down (Summary)
7358 @findex gnus-summary-next-thread
7359 Go to the next thread (@code{gnus-summary-next-thread}).
7360
7361 @item T p
7362 @kindex T p (Summary)
7363 @itemx C-M-b
7364 @kindex C-M-p (Summary)
7365 @itemx M-up
7366 @kindex M-up (Summary)
7367 @findex gnus-summary-prev-thread
7368 Go to the previous thread (@code{gnus-summary-prev-thread}).
7369
7370 @item T d
7371 @kindex T d (Summary)
7372 @findex gnus-summary-down-thread
7373 Descend the thread (@code{gnus-summary-down-thread}).
7374
7375 @item T u
7376 @kindex T u (Summary)
7377 @findex gnus-summary-up-thread
7378 Ascend the thread (@code{gnus-summary-up-thread}).
7379
7380 @item T o
7381 @kindex T o (Summary)
7382 @findex gnus-summary-top-thread
7383 Go to the top of the thread (@code{gnus-summary-top-thread}).
7384 @end table
7385
7386 @vindex gnus-thread-operation-ignore-subject
7387 If you ignore subject while threading, you'll naturally end up with
7388 threads that have several different subjects in them.  If you then issue
7389 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
7390 wish to kill the entire thread, but just those parts of the thread that
7391 have the same subject as the current article.  If you like this idea,
7392 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
7393 is non-@code{nil} (which it is by default), subjects will be ignored
7394 when doing thread commands.  If this variable is @code{nil}, articles in
7395 the same thread with different subjects will not be included in the
7396 operation in question.  If this variable is @code{fuzzy}, only articles
7397 that have subjects fuzzily equal will be included (@pxref{Fuzzy
7398 Matching}).
7399
7400
7401 @node Sorting the Summary Buffer
7402 @section Sorting the Summary Buffer
7403
7404 @findex gnus-thread-sort-by-total-score
7405 @findex gnus-thread-sort-by-date
7406 @findex gnus-thread-sort-by-score
7407 @findex gnus-thread-sort-by-subject
7408 @findex gnus-thread-sort-by-author
7409 @findex gnus-thread-sort-by-recipient
7410 @findex gnus-thread-sort-by-number
7411 @findex gnus-thread-sort-by-random
7412 @vindex gnus-thread-sort-functions
7413 @findex gnus-thread-sort-by-most-recent-number
7414 @findex gnus-thread-sort-by-most-recent-date
7415 If you are using a threaded summary display, you can sort the threads by
7416 setting @code{gnus-thread-sort-functions}, which can be either a single
7417 function, a list of functions, or a list containing functions and
7418 @code{(not some-function)} elements.
7419
7420 By default, sorting is done on article numbers.  Ready-made sorting
7421 predicate functions include @code{gnus-thread-sort-by-number},
7422 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
7423 @code{gnus-thread-sort-by-subject},
7424 @code{gnus-thread-sort-by-date},
7425 @code{gnus-thread-sort-by-score},
7426 @code{gnus-thread-sort-by-most-recent-number},
7427 @code{gnus-thread-sort-by-most-recent-date},
7428 @code{gnus-thread-sort-by-random} and
7429 @code{gnus-thread-sort-by-total-score}.
7430
7431 Each function takes two threads and returns non-@code{nil} if the first
7432 thread should be sorted before the other.  Note that sorting really is
7433 normally done by looking only at the roots of each thread.
7434
7435 If you use more than one function, the primary sort key should be the
7436 last function in the list.  You should probably always include
7437 @code{gnus-thread-sort-by-number} in the list of sorting
7438 functions---preferably first.  This will ensure that threads that are
7439 equal with respect to the other sort criteria will be displayed in
7440 ascending article order.
7441
7442 If you would like to sort by reverse score, then by subject, and finally
7443 by number, you could do something like:
7444
7445 @lisp
7446 (setq gnus-thread-sort-functions
7447       '(gnus-thread-sort-by-number
7448         gnus-thread-sort-by-subject
7449         (not gnus-thread-sort-by-total-score)))
7450 @end lisp
7451
7452 The threads that have highest score will be displayed first in the
7453 summary buffer.  When threads have the same score, they will be sorted
7454 alphabetically.  The threads that have the same score and the same
7455 subject will be sorted by number, which is (normally) the sequence in
7456 which the articles arrived.
7457
7458 If you want to sort by score and then reverse arrival order, you could
7459 say something like:
7460
7461 @lisp
7462 (setq gnus-thread-sort-functions
7463       '((not gnus-thread-sort-by-number)
7464         gnus-thread-sort-by-score))
7465 @end lisp
7466
7467 @vindex gnus-thread-score-function
7468 The function in the @code{gnus-thread-score-function} variable (default
7469 @code{+}) is used for calculating the total score of a thread.  Useful
7470 functions might be @code{max}, @code{min}, or squared means, or whatever
7471 tickles your fancy.
7472
7473 @findex gnus-article-sort-functions
7474 @findex gnus-article-sort-by-date
7475 @findex gnus-article-sort-by-score
7476 @findex gnus-article-sort-by-subject
7477 @findex gnus-article-sort-by-author
7478 @findex gnus-article-sort-by-random
7479 @findex gnus-article-sort-by-number
7480 If you are using an unthreaded display for some strange reason or
7481 other, you have to fiddle with the @code{gnus-article-sort-functions}
7482 variable.  It is very similar to the
7483 @code{gnus-thread-sort-functions}, except that it uses slightly
7484 different functions for article comparison.  Available sorting
7485 predicate functions are @code{gnus-article-sort-by-number},
7486 @code{gnus-article-sort-by-author},
7487 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7488 @code{gnus-article-sort-by-random}, and
7489 @code{gnus-article-sort-by-score}.
7490
7491 If you want to sort an unthreaded summary display by subject, you could
7492 say something like:
7493
7494 @lisp
7495 (setq gnus-article-sort-functions
7496       '(gnus-article-sort-by-number
7497         gnus-article-sort-by-subject))
7498 @end lisp
7499
7500 You can define group specific sorting via @code{gnus-parameters},
7501 @xref{Group Parameters}.
7502
7503
7504 @node Asynchronous Fetching
7505 @section Asynchronous Article Fetching
7506 @cindex asynchronous article fetching
7507 @cindex article pre-fetch
7508 @cindex pre-fetch
7509
7510 If you read your news from an @acronym{NNTP} server that's far away, the
7511 network latencies may make reading articles a chore.  You have to wait
7512 for a while after pressing @kbd{n} to go to the next article before the
7513 article appears.  Why can't Gnus just go ahead and fetch the article
7514 while you are reading the previous one?  Why not, indeed.
7515
7516 First, some caveats.  There are some pitfalls to using asynchronous
7517 article fetching, especially the way Gnus does it.
7518
7519 Let's say you are reading article 1, which is short, and article 2 is
7520 quite long, and you are not interested in reading that.  Gnus does not
7521 know this, so it goes ahead and fetches article 2.  You decide to read
7522 article 3, but since Gnus is in the process of fetching article 2, the
7523 connection is blocked.
7524
7525 To avoid these situations, Gnus will open two (count 'em two)
7526 connections to the server.  Some people may think this isn't a very nice
7527 thing to do, but I don't see any real alternatives.  Setting up that
7528 extra connection takes some time, so Gnus startup will be slower.
7529
7530 Gnus will fetch more articles than you will read.  This will mean that
7531 the link between your machine and the @acronym{NNTP} server will become more
7532 loaded than if you didn't use article pre-fetch.  The server itself will
7533 also become more loaded---both with the extra article requests, and the
7534 extra connection.
7535
7536 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7537 you really want to.
7538
7539 @vindex gnus-asynchronous
7540 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7541 happen automatically.
7542
7543 @vindex gnus-use-article-prefetch
7544 You can control how many articles are to be pre-fetched by setting
7545 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7546 that when you read an article in the group, the back end will pre-fetch
7547 the next 30 articles.  If this variable is @code{t}, the back end will
7548 pre-fetch all the articles it can without bound.  If it is
7549 @code{nil}, no pre-fetching will be done.
7550
7551 @vindex gnus-async-prefetch-article-p
7552 @findex gnus-async-unread-p
7553 There are probably some articles that you don't want to pre-fetch---read
7554 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7555 variable controls whether an article is to be pre-fetched.  This
7556 function should return non-@code{nil} when the article in question is
7557 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
7558 returns @code{nil} on read articles.  The function is called with an
7559 article data structure as the only parameter.
7560
7561 If, for instance, you wish to pre-fetch only unread articles shorter
7562 than 100 lines, you could say something like:
7563
7564 @lisp
7565 (defun my-async-short-unread-p (data)
7566   "Return non-nil for short, unread articles."
7567   (and (gnus-data-unread-p data)
7568        (< (mail-header-lines (gnus-data-header data))
7569           100)))
7570
7571 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7572 @end lisp
7573
7574 These functions will be called many, many times, so they should
7575 preferably be short and sweet to avoid slowing down Gnus too much.
7576 It's probably a good idea to byte-compile things like this.
7577
7578 @vindex gnus-prefetched-article-deletion-strategy
7579 Articles have to be removed from the asynch buffer sooner or later.  The
7580 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7581 articles.  This is a list that may contain the following elements:
7582
7583 @table @code
7584 @item read
7585 Remove articles when they are read.
7586
7587 @item exit
7588 Remove articles when exiting the group.
7589 @end table
7590
7591 The default value is @code{(read exit)}.
7592
7593 @c @vindex gnus-use-header-prefetch
7594 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7595 @c from the next group.
7596
7597
7598 @node Article Caching
7599 @section Article Caching
7600 @cindex article caching
7601 @cindex caching
7602
7603 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7604 consider turning article caching on.  Each article will then be stored
7605 locally under your home directory.  As you may surmise, this could
7606 potentially use @emph{huge} amounts of disk space, as well as eat up all
7607 your inodes so fast it will make your head swim.  In vodka.
7608
7609 Used carefully, though, it could be just an easier way to save articles.
7610
7611 @vindex gnus-use-long-file-name
7612 @vindex gnus-cache-directory
7613 @vindex gnus-use-cache
7614 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7615 all articles ticked or marked as dormant will then be copied
7616 over to your local cache (@code{gnus-cache-directory}).  Whether this
7617 cache is flat or hierarchical is controlled by the
7618 @code{gnus-use-long-file-name} variable, as usual.
7619
7620 When re-selecting a ticked or dormant article, it will be fetched from the
7621 cache instead of from the server.  As articles in your cache will never
7622 expire, this might serve as a method of saving articles while still
7623 keeping them where they belong.  Just mark all articles you want to save
7624 as dormant, and don't worry.
7625
7626 When an article is marked as read, is it removed from the cache.
7627
7628 @vindex gnus-cache-remove-articles
7629 @vindex gnus-cache-enter-articles
7630 The entering/removal of articles from the cache is controlled by the
7631 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7632 variables.  Both are lists of symbols.  The first is @code{(ticked
7633 dormant)} by default, meaning that ticked and dormant articles will be
7634 put in the cache.  The latter is @code{(read)} by default, meaning that
7635 articles marked as read are removed from the cache.  Possibly
7636 symbols in these two lists are @code{ticked}, @code{dormant},
7637 @code{unread} and @code{read}.
7638
7639 @findex gnus-jog-cache
7640 So where does the massive article-fetching and storing come into the
7641 picture?  The @code{gnus-jog-cache} command will go through all
7642 subscribed newsgroups, request all unread articles, score them, and
7643 store them in the cache.  You should only ever, ever ever ever, use this
7644 command if 1) your connection to the @acronym{NNTP} server is really, really,
7645 really slow and 2) you have a really, really, really huge disk.
7646 Seriously.  One way to cut down on the number of articles downloaded is
7647 to score unwanted articles down and have them marked as read.  They will
7648 not then be downloaded by this command.
7649
7650 @vindex gnus-uncacheable-groups
7651 @vindex gnus-cacheable-groups
7652 It is likely that you do not want caching on all groups.  For instance,
7653 if your @code{nnml} mail is located under your home directory, it makes no
7654 sense to cache it somewhere else under your home directory.  Unless you
7655 feel that it's neat to use twice as much space.
7656
7657 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7658 regexp of groups to cache, @samp{^nntp} for instance, or set the
7659 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7660 Both variables are @code{nil} by default.  If a group matches both
7661 variables, the group is not cached.
7662
7663 @findex gnus-cache-generate-nov-databases
7664 @findex gnus-cache-generate-active
7665 @vindex gnus-cache-active-file
7666 The cache stores information on what articles it contains in its active
7667 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7668 of the cache) becomes all messed up for some reason or other, Gnus
7669 offers two functions that will try to set things right.  @kbd{M-x
7670 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7671 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7672 file.
7673
7674 @findex gnus-cache-move-cache
7675 @code{gnus-cache-move-cache} will move your whole
7676 @code{gnus-cache-directory} to some other location.  You get asked to
7677 where, isn't that cool?
7678
7679 @node Persistent Articles
7680 @section Persistent Articles
7681 @cindex persistent articles
7682
7683 Closely related to article caching, we have @dfn{persistent articles}.
7684 In fact, it's just a different way of looking at caching, and much more
7685 useful in my opinion.
7686
7687 Say you're reading a newsgroup, and you happen on to some valuable gem
7688 that you want to keep and treasure forever.  You'd normally just save it
7689 (using one of the many saving commands) in some file.  The problem with
7690 that is that it's just, well, yucky.  Ideally you'd prefer just having
7691 the article remain in the group where you found it forever; untouched by
7692 the expiry going on at the news server.
7693
7694 This is what a @dfn{persistent article} is---an article that just won't
7695 be deleted.  It's implemented using the normal cache functions, but
7696 you use two explicit commands for managing persistent articles:
7697
7698 @table @kbd
7699
7700 @item *
7701 @kindex * (Summary)
7702 @findex gnus-cache-enter-article
7703 Make the current article persistent (@code{gnus-cache-enter-article}).
7704
7705 @item M-*
7706 @kindex M-* (Summary)
7707 @findex gnus-cache-remove-article
7708 Remove the current article from the persistent articles
7709 (@code{gnus-cache-remove-article}).  This will normally delete the
7710 article.
7711 @end table
7712
7713 Both these commands understand the process/prefix convention.
7714
7715 To avoid having all ticked articles (and stuff) entered into the cache,
7716 you should set @code{gnus-use-cache} to @code{passive} if you're just
7717 interested in persistent articles:
7718
7719 @lisp
7720 (setq gnus-use-cache 'passive)
7721 @end lisp
7722
7723 @node Sticky Articles
7724 @section Sticky Articles
7725 @cindex sticky articles
7726
7727 When you select an article the current article buffer will be reused
7728 according to the value of the variable
7729 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
7730 default) all articles reuse the same article buffer.  Else each group
7731 has its own article buffer.
7732
7733 This implies that it's not possible to have more than one article buffer
7734 in a group at a time.  But sometimes you might want to display all the
7735 latest emails from your mother, your father, your aunt, your uncle and
7736 your 17 cousins to coordinate the next christmas party.
7737
7738 That's where sticky articles come in handy.  A sticky article buffer
7739 basically is a normal article buffer, but it won't be reused when you
7740 select another article.  You can make an article sticky with:
7741
7742 @table @kbd
7743 @item A S
7744 @kindex A S (Summary)
7745 @findex gnus-sticky-article
7746 Make the current article sticky.  If a prefix arg is given, ask for a
7747 name for this sticky article buffer.
7748 @end table
7749
7750 To close a sticky article buffer you can use these commands:
7751
7752 @table @kbd
7753 @item q
7754 @kindex q (Article)
7755 @findex bury-buffer
7756 Puts this sticky article buffer at the end of the list of all buffers.
7757
7758 @item k
7759 @kindex k (Article)
7760 @findex gnus-kill-sticky-article-buffer
7761 Kills this sticky article buffer.
7762 @end table
7763
7764 To kill all sticky article buffers you can use:
7765
7766 @defun gnus-kill-sticky-article-buffers ARG
7767 Kill all sticky article buffers.
7768 If a prefix ARG is given, ask for confirmation.
7769 @end defun
7770
7771 @node Article Backlog
7772 @section Article Backlog
7773 @cindex backlog
7774 @cindex article backlog
7775
7776 If you have a slow connection, but the idea of using caching seems
7777 unappealing to you (and it is, really), you can help the situation some
7778 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7779 already read articles so that it doesn't have to re-fetch articles
7780 you've already read.  This only helps if you are in the habit of
7781 re-selecting articles you've recently read, of course.  If you never do
7782 that, turning the backlog on will slow Gnus down a little bit, and
7783 increase memory usage some.
7784
7785 @vindex gnus-keep-backlog
7786 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7787 at most @var{n} old articles in a buffer for later re-fetching.  If this
7788 variable is non-@code{nil} and is not a number, Gnus will store
7789 @emph{all} read articles, which means that your Emacs will grow without
7790 bound before exploding and taking your machine down with you.  I put
7791 that in there just to keep y'all on your toes.
7792
7793 The default value is 20.
7794
7795
7796 @node Saving Articles
7797 @section Saving Articles
7798 @cindex saving articles
7799
7800 Gnus can save articles in a number of ways.  Below is the documentation
7801 for saving articles in a fairly straight-forward fashion (i.e., little
7802 processing of the article is done before it is saved).  For a different
7803 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7804 (@pxref{Decoding Articles}).
7805
7806 For the commands listed here, the target is a file.  If you want to
7807 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7808 command (@pxref{Mail Group Commands}).
7809
7810 @vindex gnus-save-all-headers
7811 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7812 unwanted headers before saving the article.
7813
7814 @vindex gnus-saved-headers
7815 If the preceding variable is @code{nil}, all headers that match the
7816 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7817 deleted before saving.
7818
7819 @table @kbd
7820
7821 @item O o
7822 @itemx o
7823 @kindex O o (Summary)
7824 @kindex o (Summary)
7825 @findex gnus-summary-save-article
7826 @c @icon{gnus-summary-save-article}
7827 Save the current article using the default article saver
7828 (@code{gnus-summary-save-article}).
7829
7830 @item O m
7831 @kindex O m (Summary)
7832 @findex gnus-summary-save-article-mail
7833 Save the current article in a Unix mail box (mbox) file
7834 (@code{gnus-summary-save-article-mail}).
7835
7836 @item O r
7837 @kindex O r (Summary)
7838 @findex gnus-summary-save-article-rmail
7839 Save the current article in Rmail format
7840 (@code{gnus-summary-save-article-rmail}).
7841
7842 @item O f
7843 @kindex O f (Summary)
7844 @findex gnus-summary-save-article-file
7845 @c @icon{gnus-summary-save-article-file}
7846 Save the current article in plain file format
7847 (@code{gnus-summary-save-article-file}).
7848
7849 @item O F
7850 @kindex O F (Summary)
7851 @findex gnus-summary-write-article-file
7852 Write the current article in plain file format, overwriting any previous
7853 file contents (@code{gnus-summary-write-article-file}).
7854
7855 @item O b
7856 @kindex O b (Summary)
7857 @findex gnus-summary-save-article-body-file
7858 Save the current article body in plain file format
7859 (@code{gnus-summary-save-article-body-file}).
7860
7861 @item O h
7862 @kindex O h (Summary)
7863 @findex gnus-summary-save-article-folder
7864 Save the current article in mh folder format
7865 (@code{gnus-summary-save-article-folder}).
7866
7867 @item O v
7868 @kindex O v (Summary)
7869 @findex gnus-summary-save-article-vm
7870 Save the current article in a VM folder
7871 (@code{gnus-summary-save-article-vm}).
7872
7873 @item O p
7874 @itemx |
7875 @kindex O p (Summary)
7876 @kindex | (Summary)
7877 @findex gnus-summary-pipe-output
7878 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7879 the current article to a process (@code{gnus-summary-pipe-output}).
7880 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7881 complete headers in the piped output.
7882
7883 @item O P
7884 @kindex O P (Summary)
7885 @findex gnus-summary-muttprint
7886 @vindex gnus-summary-muttprint-program
7887 Save the current article into muttprint.  That is, print it using the
7888 external program @uref{http://muttprint.sourceforge.net/,
7889 Muttprint}.  The program name and options to use is controlled by the
7890 variable @code{gnus-summary-muttprint-program}.
7891 (@code{gnus-summary-muttprint}).
7892
7893 @end table
7894
7895 @vindex gnus-prompt-before-saving
7896 All these commands use the process/prefix convention
7897 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7898 functions, you might get tired of being prompted for files to save each
7899 and every article in.  The prompting action is controlled by
7900 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7901 default, giving you that excessive prompting action you know and
7902 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7903 just once for each series of articles you save.  If you like to really
7904 have Gnus do all your thinking for you, you can even set this variable
7905 to @code{nil}, which means that you will never be prompted for files to
7906 save articles in.  Gnus will simply save all the articles in the default
7907 files.
7908
7909
7910 @vindex gnus-default-article-saver
7911 You can customize the @code{gnus-default-article-saver} variable to make
7912 Gnus do what you want it to.  You can use any of the eight ready-made
7913 functions below, or you can create your own.
7914
7915 @table @code
7916
7917 @item gnus-summary-save-in-rmail
7918 @findex gnus-summary-save-in-rmail
7919 @vindex gnus-rmail-save-name
7920 @findex gnus-plain-save-name
7921 This is the default format, @dfn{Babyl}.  Uses the function in the
7922 @code{gnus-rmail-save-name} variable to get a file name to save the
7923 article in.  The default is @code{gnus-plain-save-name}.
7924
7925 @item gnus-summary-save-in-mail
7926 @findex gnus-summary-save-in-mail
7927 @vindex gnus-mail-save-name
7928 Save in a Unix mail (mbox) file.  Uses the function in the
7929 @code{gnus-mail-save-name} variable to get a file name to save the
7930 article in.  The default is @code{gnus-plain-save-name}.
7931
7932 @item gnus-summary-save-in-file
7933 @findex gnus-summary-save-in-file
7934 @vindex gnus-file-save-name
7935 @findex gnus-numeric-save-name
7936 Append the article straight to an ordinary file.  Uses the function in
7937 the @code{gnus-file-save-name} variable to get a file name to save the
7938 article in.  The default is @code{gnus-numeric-save-name}.
7939
7940 @item gnus-summary-write-to-file
7941 @findex gnus-summary-write-to-file
7942 Write the article straight to an ordinary file.  The file is
7943 overwritten if it exists.  Uses the function in the
7944 @code{gnus-file-save-name} variable to get a file name to save the
7945 article in.  The default is @code{gnus-numeric-save-name}.
7946
7947 @item gnus-summary-save-body-in-file
7948 @findex gnus-summary-save-body-in-file
7949 Append the article body to an ordinary file.  Uses the function in the
7950 @code{gnus-file-save-name} variable to get a file name to save the
7951 article in.  The default is @code{gnus-numeric-save-name}.
7952
7953 @item gnus-summary-write-body-to-file
7954 @findex gnus-summary-write-body-to-file
7955 Write the article body straight to an ordinary file.  The file is
7956 overwritten if it exists.  Uses the function in the
7957 @code{gnus-file-save-name} variable to get a file name to save the
7958 article in.  The default is @code{gnus-numeric-save-name}.
7959
7960 @item gnus-summary-save-in-folder
7961 @findex gnus-summary-save-in-folder
7962 @findex gnus-folder-save-name
7963 @findex gnus-Folder-save-name
7964 @vindex gnus-folder-save-name
7965 @cindex rcvstore
7966 @cindex MH folders
7967 Save the article to an MH folder using @code{rcvstore} from the MH
7968 library.  Uses the function in the @code{gnus-folder-save-name} variable
7969 to get a file name to save the article in.  The default is
7970 @code{gnus-folder-save-name}, but you can also use
7971 @code{gnus-Folder-save-name}, which creates capitalized names.
7972
7973 @item gnus-summary-save-in-vm
7974 @findex gnus-summary-save-in-vm
7975 Save the article in a VM folder.  You have to have the VM mail
7976 reader to use this setting.
7977 @end table
7978
7979 The symbol of each function may have the following properties:
7980
7981 @table @code
7982 @item :decode
7983 The value non-@code{nil} means save decoded articles.  This is
7984 meaningful only with @code{gnus-summary-save-in-file},
7985 @code{gnus-summary-save-body-in-file},
7986 @code{gnus-summary-write-to-file}, and
7987 @code{gnus-summary-write-body-to-file}.
7988
7989 @item :function
7990 The value specifies an alternative function which appends, not
7991 overwrites, articles to a file.  This implies that when saving many
7992 articles at a time, @code{gnus-prompt-before-saving} is bound to
7993 @code{t} and all articles are saved in a single file.  This is
7994 meaningful only with @code{gnus-summary-write-to-file} and
7995 @code{gnus-summary-write-body-to-file}.
7996
7997 @item :headers
7998 The value specifies the symbol of a variable of which the value
7999 specifies headers to be saved.  If it is omitted,
8000 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8001 headers should be saved.
8002 @end table
8003
8004 @vindex gnus-article-save-directory
8005 All of these functions, except for the last one, will save the article
8006 in the @code{gnus-article-save-directory}, which is initialized from the
8007 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8008 default.
8009
8010 As you can see above, the functions use different functions to find a
8011 suitable name of a file to save the article in.  Below is a list of
8012 available functions that generate names:
8013
8014 @table @code
8015
8016 @item gnus-Numeric-save-name
8017 @findex gnus-Numeric-save-name
8018 File names like @file{~/News/Alt.andrea-dworkin/45}.
8019
8020 @item gnus-numeric-save-name
8021 @findex gnus-numeric-save-name
8022 File names like @file{~/News/alt.andrea-dworkin/45}.
8023
8024 @item gnus-Plain-save-name
8025 @findex gnus-Plain-save-name
8026 File names like @file{~/News/Alt.andrea-dworkin}.
8027
8028 @item gnus-plain-save-name
8029 @findex gnus-plain-save-name
8030 File names like @file{~/News/alt.andrea-dworkin}.
8031
8032 @item gnus-sender-save-name
8033 @findex gnus-sender-save-name
8034 File names like @file{~/News/larsi}.
8035 @end table
8036
8037 @vindex gnus-split-methods
8038 You can have Gnus suggest where to save articles by plonking a regexp into
8039 the @code{gnus-split-methods} alist.  For instance, if you would like to
8040 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8041 related to VM in @file{vm-stuff}, you could set this variable to something
8042 like:
8043
8044 @lisp
8045 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8046  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8047  (my-choosing-function "../other-dir/my-stuff")
8048  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8049 @end lisp
8050
8051 We see that this is a list where each element is a list that has two
8052 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8053 a string (in which case it is used as a regexp to match on the article
8054 head); it can be a symbol (which will be called as a function with the
8055 group name as a parameter); or it can be a list (which will be
8056 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8057 the @dfn{file} will be used as a default prompt.  In addition, the
8058 result of the operation itself will be used if the function or form
8059 called returns a string or a list of strings.
8060
8061 You basically end up with a list of file names that might be used when
8062 saving the current article.  (All ``matches'' will be used.)  You will
8063 then be prompted for what you really want to use as a name, with file
8064 name completion over the results from applying this variable.
8065
8066 This variable is @code{((gnus-article-archive-name))} by default, which
8067 means that Gnus will look at the articles it saves for an
8068 @code{Archive-name} line and use that as a suggestion for the file
8069 name.
8070
8071 Here's an example function to clean up file names somewhat.  If you have
8072 lots of mail groups called things like
8073 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8074 these group names before creating the file name to save to.  The
8075 following will do just that:
8076
8077 @lisp
8078 (defun my-save-name (group)
8079   (when (string-match "^nnml:mail." group)
8080     (substring group (match-end 0))))
8081
8082 (setq gnus-split-methods
8083       '((gnus-article-archive-name)
8084         (my-save-name)))
8085 @end lisp
8086
8087
8088 @vindex gnus-use-long-file-name
8089 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8090 @code{nil}, all the preceding functions will replace all periods
8091 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8092 the functions will generate hierarchies of directories instead of having
8093 all the files in the top level directory
8094 (@file{~/News/alt/andrea-dworkin} instead of
8095 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8096 on most systems.  However, for historical reasons, this is @code{nil} on
8097 Xenix and usg-unix-v machines by default.
8098
8099 This function also affects kill and score file names.  If this variable
8100 is a list, and the list contains the element @code{not-score}, long file
8101 names will not be used for score files, if it contains the element
8102 @code{not-save}, long file names will not be used for saving, and if it
8103 contains the element @code{not-kill}, long file names will not be used
8104 for kill files.
8105
8106 If you'd like to save articles in a hierarchy that looks something like
8107 a spool, you could
8108
8109 @lisp
8110 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8111 (setq gnus-default-article-saver
8112       'gnus-summary-save-in-file)          ; @r{no encoding}
8113 @end lisp
8114
8115 Then just save with @kbd{o}.  You'd then read this hierarchy with
8116 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8117 the top level directory as the argument (@file{~/News/}).  Then just walk
8118 around to the groups/directories with @code{nneething}.
8119
8120
8121 @node Decoding Articles
8122 @section Decoding Articles
8123 @cindex decoding articles
8124
8125 Sometime users post articles (or series of articles) that have been
8126 encoded in some way or other.  Gnus can decode them for you.
8127
8128 @menu
8129 * Uuencoded Articles::          Uudecode articles.
8130 * Shell Archives::              Unshar articles.
8131 * PostScript Files::            Split PostScript.
8132 * Other Files::                 Plain save and binhex.
8133 * Decoding Variables::          Variables for a happy decoding.
8134 * Viewing Files::               You want to look at the result of the decoding?
8135 @end menu
8136
8137 @cindex series
8138 @cindex article series
8139 All these functions use the process/prefix convention
8140 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8141 the extension that a ``single article'' means ``a single series''.  Gnus
8142 can find out by itself what articles belong to a series, decode all the
8143 articles and unpack/view/save the resulting file(s).
8144
8145 Gnus guesses what articles are in the series according to the following
8146 simplish rule: The subjects must be (nearly) identical, except for the
8147 last two numbers of the line.  (Spaces are largely ignored, however.)
8148
8149 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8150 will find all the articles that match the regexp @samp{^cat.gif
8151 ([0-9]+/[0-9]+).*$}.
8152
8153 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8154 series}, will not be properly recognized by any of the automatic viewing
8155 commands, and you have to mark the articles manually with @kbd{#}.
8156
8157
8158 @node Uuencoded Articles
8159 @subsection Uuencoded Articles
8160 @cindex uudecode
8161 @cindex uuencoded articles
8162
8163 @table @kbd
8164
8165 @item X u
8166 @kindex X u (Summary)
8167 @findex gnus-uu-decode-uu
8168 @c @icon{gnus-uu-decode-uu}
8169 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8170
8171 @item X U
8172 @kindex X U (Summary)
8173 @findex gnus-uu-decode-uu-and-save
8174 Uudecodes and saves the current series
8175 (@code{gnus-uu-decode-uu-and-save}).
8176
8177 @item X v u
8178 @kindex X v u (Summary)
8179 @findex gnus-uu-decode-uu-view
8180 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8181
8182 @item X v U
8183 @kindex X v U (Summary)
8184 @findex gnus-uu-decode-uu-and-save-view
8185 Uudecodes, views and saves the current series
8186 (@code{gnus-uu-decode-uu-and-save-view}).
8187
8188 @end table
8189
8190 Remember that these all react to the presence of articles marked with
8191 the process mark.  If, for instance, you'd like to decode and save an
8192 entire newsgroup, you'd typically do @kbd{M P a}
8193 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8194 (@code{gnus-uu-decode-uu-and-save}).
8195
8196 All this is very much different from how @code{gnus-uu} worked with
8197 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8198 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8199 articles in some way (@pxref{Setting Process Marks}) and then press
8200 @kbd{X u}.
8201
8202 @vindex gnus-uu-notify-files
8203 Note: When trying to decode articles that have names matching
8204 @code{gnus-uu-notify-files}, which is hard-coded to
8205 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8206 automatically post an article on @samp{comp.unix.wizards} saying that
8207 you have just viewed the file in question.  This feature can't be turned
8208 off.
8209
8210
8211 @node Shell Archives
8212 @subsection Shell Archives
8213 @cindex unshar
8214 @cindex shell archives
8215 @cindex shared articles
8216
8217 Shell archives (``shar files'') used to be a popular way to distribute
8218 sources, but it isn't used all that much today.  In any case, we have
8219 some commands to deal with these:
8220
8221 @table @kbd
8222
8223 @item X s
8224 @kindex X s (Summary)
8225 @findex gnus-uu-decode-unshar
8226 Unshars the current series (@code{gnus-uu-decode-unshar}).
8227
8228 @item X S
8229 @kindex X S (Summary)
8230 @findex gnus-uu-decode-unshar-and-save
8231 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8232
8233 @item X v s
8234 @kindex X v s (Summary)
8235 @findex gnus-uu-decode-unshar-view
8236 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8237
8238 @item X v S
8239 @kindex X v S (Summary)
8240 @findex gnus-uu-decode-unshar-and-save-view
8241 Unshars, views and saves the current series
8242 (@code{gnus-uu-decode-unshar-and-save-view}).
8243 @end table
8244
8245
8246 @node PostScript Files
8247 @subsection PostScript Files
8248 @cindex PostScript
8249
8250 @table @kbd
8251
8252 @item X p
8253 @kindex X p (Summary)
8254 @findex gnus-uu-decode-postscript
8255 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8256
8257 @item X P
8258 @kindex X P (Summary)
8259 @findex gnus-uu-decode-postscript-and-save
8260 Unpack and save the current PostScript series
8261 (@code{gnus-uu-decode-postscript-and-save}).
8262
8263 @item X v p
8264 @kindex X v p (Summary)
8265 @findex gnus-uu-decode-postscript-view
8266 View the current PostScript series
8267 (@code{gnus-uu-decode-postscript-view}).
8268
8269 @item X v P
8270 @kindex X v P (Summary)
8271 @findex gnus-uu-decode-postscript-and-save-view
8272 View and save the current PostScript series
8273 (@code{gnus-uu-decode-postscript-and-save-view}).
8274 @end table
8275
8276
8277 @node Other Files
8278 @subsection Other Files
8279
8280 @table @kbd
8281 @item X o
8282 @kindex X o (Summary)
8283 @findex gnus-uu-decode-save
8284 Save the current series
8285 (@code{gnus-uu-decode-save}).
8286
8287 @item X b
8288 @kindex X b (Summary)
8289 @findex gnus-uu-decode-binhex
8290 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
8291 doesn't really work yet.
8292
8293 @item X Y
8294 @kindex X Y (Summary)
8295 @findex gnus-uu-decode-yenc
8296 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8297 @end table
8298
8299
8300 @node Decoding Variables
8301 @subsection Decoding Variables
8302
8303 Adjective, not verb.
8304
8305 @menu
8306 * Rule Variables::              Variables that say how a file is to be viewed.
8307 * Other Decode Variables::      Other decode variables.
8308 * Uuencoding and Posting::      Variables for customizing uuencoding.
8309 @end menu
8310
8311
8312 @node Rule Variables
8313 @subsubsection Rule Variables
8314 @cindex rule variables
8315
8316 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
8317 variables are of the form
8318
8319 @lisp
8320       (list '(regexp1 command2)
8321             '(regexp2 command2)
8322             ...)
8323 @end lisp
8324
8325 @table @code
8326
8327 @item gnus-uu-user-view-rules
8328 @vindex gnus-uu-user-view-rules
8329 @cindex sox
8330 This variable is consulted first when viewing files.  If you wish to use,
8331 for instance, @code{sox} to convert an @file{.au} sound file, you could
8332 say something like:
8333 @lisp
8334 (setq gnus-uu-user-view-rules
8335       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
8336 @end lisp
8337
8338 @item gnus-uu-user-view-rules-end
8339 @vindex gnus-uu-user-view-rules-end
8340 This variable is consulted if Gnus couldn't make any matches from the
8341 user and default view rules.
8342
8343 @item gnus-uu-user-archive-rules
8344 @vindex gnus-uu-user-archive-rules
8345 This variable can be used to say what commands should be used to unpack
8346 archives.
8347 @end table
8348
8349
8350 @node Other Decode Variables
8351 @subsubsection Other Decode Variables
8352
8353 @table @code
8354 @vindex gnus-uu-grabbed-file-functions
8355
8356 @item gnus-uu-grabbed-file-functions
8357 All functions in this list will be called right after each file has been
8358 successfully decoded---so that you can move or view files right away,
8359 and don't have to wait for all files to be decoded before you can do
8360 anything.  Ready-made functions you can put in this list are:
8361
8362 @table @code
8363
8364 @item gnus-uu-grab-view
8365 @findex gnus-uu-grab-view
8366 View the file.
8367
8368 @item gnus-uu-grab-move
8369 @findex gnus-uu-grab-move
8370 Move the file (if you're using a saving function.)
8371 @end table
8372
8373 @item gnus-uu-be-dangerous
8374 @vindex gnus-uu-be-dangerous
8375 Specifies what to do if unusual situations arise during decoding.  If
8376 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
8377 that didn't work, and overwrite existing files.  Otherwise, ask each
8378 time.
8379
8380 @item gnus-uu-ignore-files-by-name
8381 @vindex gnus-uu-ignore-files-by-name
8382 Files with name matching this regular expression won't be viewed.
8383
8384 @item gnus-uu-ignore-files-by-type
8385 @vindex gnus-uu-ignore-files-by-type
8386 Files with a @acronym{MIME} type matching this variable won't be viewed.
8387 Note that Gnus tries to guess what type the file is based on the name.
8388 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
8389 kludgey.
8390
8391 @item gnus-uu-tmp-dir
8392 @vindex gnus-uu-tmp-dir
8393 Where @code{gnus-uu} does its work.
8394
8395 @item gnus-uu-do-not-unpack-archives
8396 @vindex gnus-uu-do-not-unpack-archives
8397 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
8398 looking for files to display.
8399
8400 @item gnus-uu-view-and-save
8401 @vindex gnus-uu-view-and-save
8402 Non-@code{nil} means that the user will always be asked to save a file
8403 after viewing it.
8404
8405 @item gnus-uu-ignore-default-view-rules
8406 @vindex gnus-uu-ignore-default-view-rules
8407 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
8408 rules.
8409
8410 @item gnus-uu-ignore-default-archive-rules
8411 @vindex gnus-uu-ignore-default-archive-rules
8412 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
8413 unpacking commands.
8414
8415 @item gnus-uu-kill-carriage-return
8416 @vindex gnus-uu-kill-carriage-return
8417 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
8418 from articles.
8419
8420 @item gnus-uu-unmark-articles-not-decoded
8421 @vindex gnus-uu-unmark-articles-not-decoded
8422 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
8423 decoded articles as unread.
8424
8425 @item gnus-uu-correct-stripped-uucode
8426 @vindex gnus-uu-correct-stripped-uucode
8427 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
8428 uuencoded files that have had trailing spaces deleted.
8429
8430 @item gnus-uu-pre-uudecode-hook
8431 @vindex gnus-uu-pre-uudecode-hook
8432 Hook run before sending a message to @code{uudecode}.
8433
8434 @item gnus-uu-view-with-metamail
8435 @vindex gnus-uu-view-with-metamail
8436 @cindex metamail
8437 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
8438 commands defined by the rule variables and just fudge a @acronym{MIME}
8439 content type based on the file name.  The result will be fed to
8440 @code{metamail} for viewing.
8441
8442 @item gnus-uu-save-in-digest
8443 @vindex gnus-uu-save-in-digest
8444 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
8445 decoding, will save in digests.  If this variable is @code{nil},
8446 @code{gnus-uu} will just save everything in a file without any
8447 embellishments.  The digesting almost conforms to RFC 1153---no easy way
8448 to specify any meaningful volume and issue numbers were found, so I
8449 simply dropped them.
8450
8451 @end table
8452
8453
8454 @node Uuencoding and Posting
8455 @subsubsection Uuencoding and Posting
8456
8457 @table @code
8458
8459 @item gnus-uu-post-include-before-composing
8460 @vindex gnus-uu-post-include-before-composing
8461 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
8462 before you compose the article.  If this variable is @code{t}, you can
8463 either include an encoded file with @kbd{C-c C-i} or have one included
8464 for you when you post the article.
8465
8466 @item gnus-uu-post-length
8467 @vindex gnus-uu-post-length
8468 Maximum length of an article.  The encoded file will be split into how
8469 many articles it takes to post the entire file.
8470
8471 @item gnus-uu-post-threaded
8472 @vindex gnus-uu-post-threaded
8473 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
8474 thread.  This may not be smart, as no other decoder I have seen is able
8475 to follow threads when collecting uuencoded articles.  (Well, I have
8476 seen one package that does that---@code{gnus-uu}, but somehow, I don't
8477 think that counts@dots{}) Default is @code{nil}.
8478
8479 @item gnus-uu-post-separate-description
8480 @vindex gnus-uu-post-separate-description
8481 Non-@code{nil} means that the description will be posted in a separate
8482 article.  The first article will typically be numbered (0/x).  If this
8483 variable is @code{nil}, the description the user enters will be included
8484 at the beginning of the first article, which will be numbered (1/x).
8485 Default is @code{t}.
8486
8487 @end table
8488
8489
8490 @node Viewing Files
8491 @subsection Viewing Files
8492 @cindex viewing files
8493 @cindex pseudo-articles
8494
8495 After decoding, if the file is some sort of archive, Gnus will attempt
8496 to unpack the archive and see if any of the files in the archive can be
8497 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
8498 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
8499 uncompress and de-tar the main file, and then view the two pictures.
8500 This unpacking process is recursive, so if the archive contains archives
8501 of archives, it'll all be unpacked.
8502
8503 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
8504 extracted file into the summary buffer.  If you go to these
8505 ``articles'', you will be prompted for a command to run (usually Gnus
8506 will make a suggestion), and then the command will be run.
8507
8508 @vindex gnus-view-pseudo-asynchronously
8509 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
8510 until the viewing is done before proceeding.
8511
8512 @vindex gnus-view-pseudos
8513 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
8514 the pseudo-articles into the summary buffer, but view them
8515 immediately.  If this variable is @code{not-confirm}, the user won't even
8516 be asked for a confirmation before viewing is done.
8517
8518 @vindex gnus-view-pseudos-separately
8519 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
8520 pseudo-article will be created for each file to be viewed.  If
8521 @code{nil}, all files that use the same viewing command will be given as
8522 a list of parameters to that command.
8523
8524 @vindex gnus-insert-pseudo-articles
8525 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
8526 pseudo-articles when decoding.  It is @code{t} by default.
8527
8528 So; there you are, reading your @emph{pseudo-articles} in your
8529 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
8530 Why isn't anything real anymore? How did we get here?
8531
8532
8533 @node Article Treatment
8534 @section Article Treatment
8535
8536 Reading through this huge manual, you may have quite forgotten that the
8537 object of newsreaders is to actually, like, read what people have
8538 written.  Reading articles.  Unfortunately, people are quite bad at
8539 writing, so there are tons of functions and variables to make reading
8540 these articles easier.
8541
8542 @menu
8543 * Article Highlighting::        You want to make the article look like fruit salad.
8544 * Article Fontisizing::         Making emphasized text look nice.
8545 * Article Hiding::              You also want to make certain info go away.
8546 * Article Washing::             Lots of way-neat functions to make life better.
8547 * Article Header::              Doing various header transformations.
8548 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
8549 * Article Button Levels::       Controlling appearance of buttons.
8550 * Article Date::                Grumble, UT!
8551 * Article Display::             Display various stuff---X-Face, Picons, Smileys
8552 * Article Signature::           What is a signature?
8553 * Article Miscellanea::         Various other stuff.
8554 @end menu
8555
8556
8557 @node Article Highlighting
8558 @subsection Article Highlighting
8559 @cindex highlighting
8560
8561 Not only do you want your article buffer to look like fruit salad, but
8562 you want it to look like technicolor fruit salad.
8563
8564 @table @kbd
8565
8566 @item W H a
8567 @kindex W H a (Summary)
8568 @findex gnus-article-highlight
8569 @findex gnus-article-maybe-highlight
8570 Do much highlighting of the current article
8571 (@code{gnus-article-highlight}).  This function highlights header, cited
8572 text, the signature, and adds buttons to the body and the head.
8573
8574 @item W H h
8575 @kindex W H h (Summary)
8576 @findex gnus-article-highlight-headers
8577 @vindex gnus-header-face-alist
8578 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8579 highlighting will be done according to the @code{gnus-header-face-alist}
8580 variable, which is a list where each element has the form
8581 @code{(@var{regexp} @var{name} @var{content})}.
8582 @var{regexp} is a regular expression for matching the
8583 header, @var{name} is the face used for highlighting the header name
8584 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8585 the header value.  The first match made will be used.  Note that
8586 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8587
8588 @item W H c
8589 @kindex W H c (Summary)
8590 @findex gnus-article-highlight-citation
8591 Highlight cited text (@code{gnus-article-highlight-citation}).
8592
8593 Some variables to customize the citation highlights:
8594
8595 @table @code
8596 @vindex gnus-cite-parse-max-size
8597
8598 @item gnus-cite-parse-max-size
8599 If the article size in bytes is bigger than this variable (which is
8600 25000 by default), no citation highlighting will be performed.
8601
8602 @item gnus-cite-max-prefix
8603 @vindex gnus-cite-max-prefix
8604 Maximum possible length for a citation prefix (default 20).
8605
8606 @item gnus-cite-face-list
8607 @vindex gnus-cite-face-list
8608 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8609 When there are citations from multiple articles in the same message,
8610 Gnus will try to give each citation from each article its own face.
8611 This should make it easier to see who wrote what.
8612
8613 @item gnus-supercite-regexp
8614 @vindex gnus-supercite-regexp
8615 Regexp matching normal Supercite attribution lines.
8616
8617 @item gnus-supercite-secondary-regexp
8618 @vindex gnus-supercite-secondary-regexp
8619 Regexp matching mangled Supercite attribution lines.
8620
8621 @item gnus-cite-minimum-match-count
8622 @vindex gnus-cite-minimum-match-count
8623 Minimum number of identical prefixes we have to see before we believe
8624 that it's a citation.
8625
8626 @item gnus-cite-attribution-prefix
8627 @vindex gnus-cite-attribution-prefix
8628 Regexp matching the beginning of an attribution line.
8629
8630 @item gnus-cite-attribution-suffix
8631 @vindex gnus-cite-attribution-suffix
8632 Regexp matching the end of an attribution line.
8633
8634 @item gnus-cite-attribution-face
8635 @vindex gnus-cite-attribution-face
8636 Face used for attribution lines.  It is merged with the face for the
8637 cited text belonging to the attribution.
8638
8639 @item gnus-cite-ignore-quoted-from
8640 @vindex gnus-cite-ignore-quoted-from
8641 If non-@code{nil}, no citation highlighting will be performed on lines
8642 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
8643 in order not to mix up with the envelope From line.  The default value
8644 is @code{t}.
8645
8646 @end table
8647
8648
8649 @item W H s
8650 @kindex W H s (Summary)
8651 @vindex gnus-signature-separator
8652 @vindex gnus-signature-face
8653 @findex gnus-article-highlight-signature
8654 Highlight the signature (@code{gnus-article-highlight-signature}).
8655 Everything after @code{gnus-signature-separator} (@pxref{Article
8656 Signature}) in an article will be considered a signature and will be
8657 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8658 default.
8659
8660 @end table
8661
8662 @xref{Customizing Articles}, for how to highlight articles automatically.
8663
8664
8665 @node Article Fontisizing
8666 @subsection Article Fontisizing
8667 @cindex emphasis
8668 @cindex article emphasis
8669
8670 @findex gnus-article-emphasize
8671 @kindex W e (Summary)
8672 People commonly add emphasis to words in news articles by writing things
8673 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8674 this look nicer by running the article through the @kbd{W e}
8675 (@code{gnus-article-emphasize}) command.
8676
8677 @vindex gnus-emphasis-alist
8678 How the emphasis is computed is controlled by the
8679 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8680 element is a regular expression to be matched.  The second is a number
8681 that says what regular expression grouping is used to find the entire
8682 emphasized word.  The third is a number that says what regexp grouping
8683 should be displayed and highlighted.  (The text between these two
8684 groupings will be hidden.)  The fourth is the face used for
8685 highlighting.
8686
8687 @lisp
8688 (setq gnus-emphasis-alist
8689       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8690         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8691 @end lisp
8692
8693 @cindex slash
8694 @cindex asterisk
8695 @cindex underline
8696 @cindex /
8697 @cindex *
8698
8699 @vindex gnus-emphasis-underline
8700 @vindex gnus-emphasis-bold
8701 @vindex gnus-emphasis-italic
8702 @vindex gnus-emphasis-underline-bold
8703 @vindex gnus-emphasis-underline-italic
8704 @vindex gnus-emphasis-bold-italic
8705 @vindex gnus-emphasis-underline-bold-italic
8706 By default, there are seven rules, and they use the following faces:
8707 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8708 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8709 @code{gnus-emphasis-underline-italic},
8710 @code{gnus-emphasis-underline-bold}, and
8711 @code{gnus-emphasis-underline-bold-italic}.
8712
8713 If you want to change these faces, you can either use @kbd{M-x
8714 customize}, or you can use @code{copy-face}.  For instance, if you want
8715 to make @code{gnus-emphasis-italic} use a red face instead, you could
8716 say something like:
8717
8718 @lisp
8719 (copy-face 'red 'gnus-emphasis-italic)
8720 @end lisp
8721
8722 @vindex gnus-group-highlight-words-alist
8723
8724 If you want to highlight arbitrary words, you can use the
8725 @code{gnus-group-highlight-words-alist} variable, which uses the same
8726 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8727 parameter (@pxref{Group Parameters}) can also be used.
8728
8729 @xref{Customizing Articles}, for how to fontize articles automatically.
8730
8731
8732 @node Article Hiding
8733 @subsection Article Hiding
8734 @cindex article hiding
8735
8736 Or rather, hiding certain things in each article.  There usually is much
8737 too much cruft in most articles.
8738
8739 @table @kbd
8740
8741 @item W W a
8742 @kindex W W a (Summary)
8743 @findex gnus-article-hide
8744 Do quite a lot of hiding on the article buffer
8745 (@kbd{gnus-article-hide}).  In particular, this function will hide
8746 headers, @acronym{PGP}, cited text and the signature.
8747
8748 @item W W h
8749 @kindex W W h (Summary)
8750 @findex gnus-article-hide-headers
8751 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8752 Headers}.
8753
8754 @item W W b
8755 @kindex W W b (Summary)
8756 @findex gnus-article-hide-boring-headers
8757 Hide headers that aren't particularly interesting
8758 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8759
8760 @item W W s
8761 @kindex W W s (Summary)
8762 @findex gnus-article-hide-signature
8763 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8764 Signature}.
8765
8766 @item W W l
8767 @kindex W W l (Summary)
8768 @findex gnus-article-hide-list-identifiers
8769 @vindex gnus-list-identifiers
8770 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8771 are strings some mailing list servers add to the beginning of all
8772 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8773 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8774 may not contain @code{\\(..\\)}.
8775
8776 @table @code
8777
8778 @item gnus-list-identifiers
8779 @vindex gnus-list-identifiers
8780 A regular expression that matches list identifiers to be removed from
8781 subject.  This can also be a list of regular expressions.
8782
8783 @end table
8784
8785 @item W W P
8786 @kindex W W P (Summary)
8787 @findex gnus-article-hide-pem
8788 Hide @acronym{PEM} (privacy enhanced messages) cruft
8789 (@code{gnus-article-hide-pem}).
8790
8791 @item W W B
8792 @kindex W W B (Summary)
8793 @findex gnus-article-strip-banner
8794 @vindex gnus-article-banner-alist
8795 @vindex gnus-article-address-banner-alist
8796 @cindex banner
8797 @cindex OneList
8798 @cindex stripping advertisements
8799 @cindex advertisements
8800 Strip the banner specified by the @code{banner} group parameter
8801 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8802 annoying banners and/or signatures that some mailing lists and moderated
8803 groups adds to all the messages.  The way to use this function is to add
8804 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8805 group you want banners stripped from.  The parameter either be a string,
8806 which will be interpreted as a regular expression matching text to be
8807 removed, or the symbol @code{signature}, meaning that the (last)
8808 signature should be removed, or other symbol, meaning that the
8809 corresponding regular expression in @code{gnus-article-banner-alist} is
8810 used.
8811
8812 Regardless of a group, you can hide things like advertisements only when
8813 the sender of an article has a certain mail address specified in
8814 @code{gnus-article-address-banner-alist}.
8815
8816 @table @code
8817
8818 @item gnus-article-address-banner-alist
8819 @vindex gnus-article-address-banner-alist
8820 Alist of mail addresses and banners.  Each element has the form
8821 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8822 matching a mail address in the From header, @var{banner} is one of a
8823 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8824 a regexp and @code{nil}.  If @var{address} matches author's mail
8825 address, it will remove things like advertisements.  For example, if a
8826 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8827 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8828 sends, you can use the following element to remove them:
8829
8830 @lisp
8831 ("@@yoo-hoo\\.co\\.jp\\'" .
8832  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8833 @end lisp
8834
8835 @end table
8836
8837 @item W W c
8838 @kindex W W c (Summary)
8839 @findex gnus-article-hide-citation
8840 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8841 customizing the hiding:
8842
8843 @table @code
8844
8845 @item gnus-cited-opened-text-button-line-format
8846 @itemx gnus-cited-closed-text-button-line-format
8847 @vindex gnus-cited-closed-text-button-line-format
8848 @vindex gnus-cited-opened-text-button-line-format
8849 Gnus adds buttons to show where the cited text has been hidden, and to
8850 allow toggle hiding the text.  The format of the variable is specified
8851 by these format-like variable (@pxref{Formatting Variables}).  These
8852 specs are valid:
8853
8854 @table @samp
8855 @item b
8856 Starting point of the hidden text.
8857 @item e
8858 Ending point of the hidden text.
8859 @item l
8860 Number of characters in the hidden region.
8861 @item n
8862 Number of lines of hidden text.
8863 @end table
8864
8865 @item gnus-cited-lines-visible
8866 @vindex gnus-cited-lines-visible
8867 The number of lines at the beginning of the cited text to leave
8868 shown.  This can also be a cons cell with the number of lines at the top
8869 and bottom of the text, respectively, to remain visible.
8870
8871 @end table
8872
8873 @item W W C-c
8874 @kindex W W C-c (Summary)
8875 @findex gnus-article-hide-citation-maybe
8876
8877 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8878 following two variables:
8879
8880 @table @code
8881 @item gnus-cite-hide-percentage
8882 @vindex gnus-cite-hide-percentage
8883 If the cited text is of a bigger percentage than this variable (default
8884 50), hide the cited text.
8885
8886 @item gnus-cite-hide-absolute
8887 @vindex gnus-cite-hide-absolute
8888 The cited text must have at least this length (default 10) before it
8889 is hidden.
8890 @end table
8891
8892 @item W W C
8893 @kindex W W C (Summary)
8894 @findex gnus-article-hide-citation-in-followups
8895 Hide cited text in articles that aren't roots
8896 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8897 useful as an interactive command, but might be a handy function to stick
8898 have happen automatically (@pxref{Customizing Articles}).
8899
8900 @end table
8901
8902 All these ``hiding'' commands are toggles, but if you give a negative
8903 prefix to these commands, they will show what they have previously
8904 hidden.  If you give a positive prefix, they will always hide.
8905
8906 Also @pxref{Article Highlighting} for further variables for
8907 citation customization.
8908
8909 @xref{Customizing Articles}, for how to hide article elements
8910 automatically.
8911
8912
8913 @node Article Washing
8914 @subsection Article Washing
8915 @cindex washing
8916 @cindex article washing
8917
8918 We call this ``article washing'' for a really good reason.  Namely, the
8919 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8920
8921 @dfn{Washing} is defined by us as ``changing something from something to
8922 something else'', but normally results in something looking better.
8923 Cleaner, perhaps.
8924
8925 @xref{Customizing Articles}, if you want to change how Gnus displays
8926 articles by default.
8927
8928 @table @kbd
8929
8930 @item C-u g
8931 This is not really washing, it's sort of the opposite of washing.  If
8932 you type this, you see the article exactly as it exists on disk or on
8933 the server.
8934
8935 @item g
8936 Force redisplaying of the current article
8937 (@code{gnus-summary-show-article}).  This is also not really washing.
8938 If you type this, you see the article without any previously applied
8939 interactive Washing functions but with all default treatments
8940 (@pxref{Customizing Articles}).
8941
8942 @item W l
8943 @kindex W l (Summary)
8944 @findex gnus-summary-stop-page-breaking
8945 Remove page breaks from the current article
8946 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8947 delimiters.
8948
8949 @item W r
8950 @kindex W r (Summary)
8951 @findex gnus-summary-caesar-message
8952 @c @icon{gnus-summary-caesar-message}
8953 Do a Caesar rotate (rot13) on the article buffer
8954 (@code{gnus-summary-caesar-message}).
8955 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8956 (Typically offensive jokes and such.)
8957
8958 It's commonly called ``rot13'' because each letter is rotated 13
8959 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8960 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8961 is rumored to have employed this form of, uh, somewhat weak encryption.
8962
8963 @item W m
8964 @kindex W m (Summary)
8965 @findex gnus-summary-morse-message
8966 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8967
8968 @item W i
8969 @kindex W i (Summary)
8970 @findex gnus-summary-idna-message
8971 Decode IDNA encoded domain names in the current articles.  IDNA
8972 encoded domain names looks like @samp{xn--bar}.  If a string remain
8973 unencoded after running invoking this, it is likely an invalid IDNA
8974 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
8975 (@url{http://www.gnu.org/software/libidn/}) installed for this command
8976 to work.
8977
8978 @item W t
8979 @item t
8980 @kindex W t (Summary)
8981 @kindex t (Summary)
8982 @findex gnus-summary-toggle-header
8983 Toggle whether to display all headers in the article buffer
8984 (@code{gnus-summary-toggle-header}).
8985
8986 @item W v
8987 @kindex W v (Summary)
8988 @findex gnus-summary-verbose-headers
8989 Toggle whether to display all headers in the article buffer permanently
8990 (@code{gnus-summary-verbose-headers}).
8991
8992 @item W o
8993 @kindex W o (Summary)
8994 @findex gnus-article-treat-overstrike
8995 Treat overstrike (@code{gnus-article-treat-overstrike}).
8996
8997 @item W d
8998 @kindex W d (Summary)
8999 @findex gnus-article-treat-dumbquotes
9000 @vindex gnus-article-dumbquotes-map
9001 @cindex Smartquotes
9002 @cindex M****s*** sm*rtq**t*s
9003 @cindex Latin 1
9004 Treat M****s*** sm*rtq**t*s according to
9005 @code{gnus-article-dumbquotes-map}
9006 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9007 whether a character is a sm*rtq**t* or not, so it should only be used
9008 interactively.
9009
9010 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9011 an attempt to provide more quoting characters.  If you see something
9012 like @code{\222} or @code{\264} where you're expecting some kind of
9013 apostrophe or quotation mark, then try this wash.
9014
9015 @item W Y f
9016 @kindex W Y f (Summary)
9017 @findex gnus-article-outlook-deuglify-article
9018 @cindex Outlook Express
9019 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9020 unwrap lines, repair attribution and rearrange citation.
9021 (@code{gnus-article-outlook-deuglify-article}).
9022
9023 @item W Y u
9024 @kindex W Y u (Summary)
9025 @findex gnus-article-outlook-unwrap-lines
9026 @vindex gnus-outlook-deuglify-unwrap-min
9027 @vindex gnus-outlook-deuglify-unwrap-max
9028 Unwrap lines that appear to be wrapped citation lines.  You can control
9029 what lines will be unwrapped by frobbing
9030 @code{gnus-outlook-deuglify-unwrap-min} and
9031 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9032 maximum length of an unwrapped citation line.
9033 (@code{gnus-article-outlook-unwrap-lines}).
9034
9035 @item W Y a
9036 @kindex W Y a (Summary)
9037 @findex gnus-article-outlook-repair-attribution
9038 Repair a broken attribution line.@*
9039 (@code{gnus-article-outlook-repair-attribution}).
9040
9041 @item W Y c
9042 @kindex W Y c (Summary)
9043 @findex gnus-article-outlook-rearrange-citation
9044 Repair broken citations by rearranging the text.
9045 (@code{gnus-article-outlook-rearrange-citation}).
9046
9047 @item W w
9048 @kindex W w (Summary)
9049 @findex gnus-article-fill-cited-article
9050 Do word wrap (@code{gnus-article-fill-cited-article}).
9051
9052 You can give the command a numerical prefix to specify the width to use
9053 when filling.
9054
9055 @item W Q
9056 @kindex W Q (Summary)
9057 @findex gnus-article-fill-long-lines
9058 Fill long lines (@code{gnus-article-fill-long-lines}).
9059
9060 @item W C
9061 @kindex W C (Summary)
9062 @findex gnus-article-capitalize-sentences
9063 Capitalize the first word in each sentence
9064 (@code{gnus-article-capitalize-sentences}).
9065
9066 @item W c
9067 @kindex W c (Summary)
9068 @findex gnus-article-remove-cr
9069 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9070 (this takes care of DOS line endings), and then translate any remaining
9071 CRs into LF (this takes care of Mac line endings)
9072 (@code{gnus-article-remove-cr}).
9073
9074 @item W q
9075 @kindex W q (Summary)
9076 @findex gnus-article-de-quoted-unreadable
9077 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9078 Quoted-Printable is one common @acronym{MIME} encoding employed when
9079 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9080 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9081 which doesn't look very readable to me.  Note that this is usually
9082 done automatically by Gnus if the message in question has a
9083 @code{Content-Transfer-Encoding} header that says that this encoding
9084 has been done.  If a prefix is given, a charset will be asked for.
9085
9086 @item W 6
9087 @kindex W 6 (Summary)
9088 @findex gnus-article-de-base64-unreadable
9089 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9090 one common @acronym{MIME} encoding employed when sending
9091 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9092 usually done automatically by Gnus if the message in question has a
9093 @code{Content-Transfer-Encoding} header that says that this encoding
9094 has been done.  If a prefix is given, a charset will be asked for.
9095
9096 @item W Z
9097 @kindex W Z (Summary)
9098 @findex gnus-article-decode-HZ
9099 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9100 common encoding employed when sending Chinese articles.  It typically
9101 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9102
9103 @item W A
9104 @kindex W A (Summary)
9105 @findex gnus-article-treat-ansi-sequences
9106 @cindex @acronym{ANSI} control sequences
9107 Translate @acronym{ANSI} SGR control sequences into overlays or
9108 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9109 sequences are used in some Chinese hierarchies for highlighting.
9110
9111 @item W u
9112 @kindex W u (Summary)
9113 @findex gnus-article-unsplit-urls
9114 Remove newlines from within URLs.  Some mailers insert newlines into
9115 outgoing email messages to keep lines short.  This reformatting can
9116 split long URLs onto multiple lines.  Repair those URLs by removing
9117 the newlines (@code{gnus-article-unsplit-urls}).
9118
9119 @item W h
9120 @kindex W h (Summary)
9121 @findex gnus-article-wash-html
9122 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9123 usually done automatically by Gnus if the message in question has a
9124 @code{Content-Type} header that says that the message is @acronym{HTML}.
9125
9126 If a prefix is given, a charset will be asked for.  If it is a number,
9127 the charset defined in @code{gnus-summary-show-article-charset-alist}
9128 (@pxref{Paging the Article}) will be used.
9129
9130 @vindex gnus-article-wash-function
9131 The default is to use the function specified by
9132 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9133 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9134 @acronym{HTML}, but this is controlled by the
9135 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9136 can use include:
9137
9138 @table @code
9139 @item w3
9140 Use Emacs/W3.
9141
9142 @item w3m
9143 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9144
9145 @item w3m-standalone
9146 Use @uref{http://w3m.sourceforge.net/, w3m}.
9147
9148 @item links
9149 Use @uref{http://links.sf.net/, Links}.
9150
9151 @item lynx
9152 Use @uref{http://lynx.isc.org/, Lynx}.
9153
9154 @item html2text
9155 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9156
9157 @end table
9158
9159 @item W b
9160 @kindex W b (Summary)
9161 @findex gnus-article-add-buttons
9162 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9163 @xref{Article Buttons}.
9164
9165 @item W B
9166 @kindex W B (Summary)
9167 @findex gnus-article-add-buttons-to-head
9168 Add clickable buttons to the article headers
9169 (@code{gnus-article-add-buttons-to-head}).
9170
9171 @item W p
9172 @kindex W p (Summary)
9173 @findex gnus-article-verify-x-pgp-sig
9174 Verify a signed control message
9175 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9176 @code{newgroup} and @code{checkgroups} are usually signed by the
9177 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9178 the maintainer to your keyring to verify the
9179 message.@footnote{@acronym{PGP} keys for many hierarchies are
9180 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9181
9182 @item W s
9183 @kindex W s (Summary)
9184 @findex gnus-summary-force-verify-and-decrypt
9185 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9186 @acronym{S/MIME}) message
9187 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9188
9189 @item W a
9190 @kindex W a (Summary)
9191 @findex gnus-article-strip-headers-in-body
9192 Strip headers like the @code{X-No-Archive} header from the beginning of
9193 article bodies (@code{gnus-article-strip-headers-in-body}).
9194
9195 @item W E l
9196 @kindex W E l (Summary)
9197 @findex gnus-article-strip-leading-blank-lines
9198 Remove all blank lines from the beginning of the article
9199 (@code{gnus-article-strip-leading-blank-lines}).
9200
9201 @item W E m
9202 @kindex W E m (Summary)
9203 @findex gnus-article-strip-multiple-blank-lines
9204 Replace all blank lines with empty lines and then all multiple empty
9205 lines with a single empty line.
9206 (@code{gnus-article-strip-multiple-blank-lines}).
9207
9208 @item W E t
9209 @kindex W E t (Summary)
9210 @findex gnus-article-remove-trailing-blank-lines
9211 Remove all blank lines at the end of the article
9212 (@code{gnus-article-remove-trailing-blank-lines}).
9213
9214 @item W E a
9215 @kindex W E a (Summary)
9216 @findex gnus-article-strip-blank-lines
9217 Do all the three commands above
9218 (@code{gnus-article-strip-blank-lines}).
9219
9220 @item W E A
9221 @kindex W E A (Summary)
9222 @findex gnus-article-strip-all-blank-lines
9223 Remove all blank lines
9224 (@code{gnus-article-strip-all-blank-lines}).
9225
9226 @item W E s
9227 @kindex W E s (Summary)
9228 @findex gnus-article-strip-leading-space
9229 Remove all white space from the beginning of all lines of the article
9230 body (@code{gnus-article-strip-leading-space}).
9231
9232 @item W E e
9233 @kindex W E e (Summary)
9234 @findex gnus-article-strip-trailing-space
9235 Remove all white space from the end of all lines of the article
9236 body (@code{gnus-article-strip-trailing-space}).
9237
9238 @end table
9239
9240 @xref{Customizing Articles}, for how to wash articles automatically.
9241
9242
9243 @node Article Header
9244 @subsection Article Header
9245
9246 These commands perform various transformations of article header.
9247
9248 @table @kbd
9249
9250 @item W G u
9251 @kindex W G u (Summary)
9252 @findex gnus-article-treat-unfold-headers
9253 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9254
9255 @item W G n
9256 @kindex W G n (Summary)
9257 @findex gnus-article-treat-fold-newsgroups
9258 Fold the @code{Newsgroups} and @code{Followup-To} headers
9259 (@code{gnus-article-treat-fold-newsgroups}).
9260
9261 @item W G f
9262 @kindex W G f (Summary)
9263 @findex gnus-article-treat-fold-headers
9264 Fold all the message headers
9265 (@code{gnus-article-treat-fold-headers}).
9266
9267 @item W E w
9268 @kindex W E w (Summary)
9269 @findex gnus-article-remove-leading-whitespace
9270 Remove excessive whitespace from all headers
9271 (@code{gnus-article-remove-leading-whitespace}).
9272
9273 @end table
9274
9275
9276 @node Article Buttons
9277 @subsection Article Buttons
9278 @cindex buttons
9279
9280 People often include references to other stuff in articles, and it would
9281 be nice if Gnus could just fetch whatever it is that people talk about
9282 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
9283 button on these references.
9284
9285 @vindex gnus-button-man-handler
9286 Gnus adds @dfn{buttons} to certain standard references by default:
9287 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
9288 Emacs or Gnus related references.  This is controlled by two variables,
9289 one that handles article bodies and one that handles article heads:
9290
9291 @table @code
9292
9293 @item gnus-button-alist
9294 @vindex gnus-button-alist
9295 This is an alist where each entry has this form:
9296
9297 @lisp
9298 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9299 @end lisp
9300
9301 @table @var
9302
9303 @item regexp
9304 All text that match this regular expression (case insensitive) will be
9305 considered an external reference.  Here's a typical regexp that matches
9306 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
9307 variable containing a regexp, useful variables to use include
9308 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
9309
9310 @item button-par
9311 Gnus has to know which parts of the matches is to be highlighted.  This
9312 is a number that says what sub-expression of the regexp is to be
9313 highlighted.  If you want it all highlighted, you use 0 here.
9314
9315 @item use-p
9316 This form will be @code{eval}ed, and if the result is non-@code{nil},
9317 this is considered a match.  This is useful if you want extra sifting to
9318 avoid false matches.  Often variables named
9319 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
9320 Levels}, but any other form may be used too.
9321
9322 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
9323
9324 @item function
9325 This function will be called when you click on this button.
9326
9327 @item data-par
9328 As with @var{button-par}, this is a sub-expression number, but this one
9329 says which part of the match is to be sent as data to @var{function}.
9330
9331 @end table
9332
9333 So the full entry for buttonizing URLs is then
9334
9335 @lisp
9336 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
9337 @end lisp
9338
9339 @item gnus-header-button-alist
9340 @vindex gnus-header-button-alist
9341 This is just like the other alist, except that it is applied to the
9342 article head only, and that each entry has an additional element that is
9343 used to say what headers to apply the buttonize coding to:
9344
9345 @lisp
9346 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9347 @end lisp
9348
9349 @var{header} is a regular expression.
9350 @end table
9351
9352 @subsubsection Related variables and functions
9353
9354 @table @code
9355 @item gnus-button-@var{*}-level
9356 @xref{Article Button Levels}.
9357
9358 @c Stuff related to gnus-button-browse-level
9359
9360 @item gnus-button-url-regexp
9361 @vindex gnus-button-url-regexp
9362 A regular expression that matches embedded URLs.  It is used in the
9363 default values of the variables above.
9364
9365 @c Stuff related to gnus-button-man-level
9366
9367 @item gnus-button-man-handler
9368 @vindex gnus-button-man-handler
9369 The function to use for displaying man pages.  It must take at least one
9370 argument with a string naming the man page.
9371
9372 @c Stuff related to gnus-button-message-level
9373
9374 @item gnus-button-mid-or-mail-regexp
9375 @vindex gnus-button-mid-or-mail-regexp
9376 Regular expression that matches a message ID or a mail address.
9377
9378 @item gnus-button-prefer-mid-or-mail
9379 @vindex gnus-button-prefer-mid-or-mail
9380 This variable determines what to do when the button on a string as
9381 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
9382 message ID or a mail address.  If it is one of the symbols @code{mid} or
9383 @code{mail}, Gnus will always assume that the string is a message ID or
9384 a mail address, respectively.  If this variable is set to the symbol
9385 @code{ask}, always query the user what to do.  If it is a function, this
9386 function will be called with the string as its only argument.  The
9387 function must return @code{mid}, @code{mail}, @code{invalid} or
9388 @code{ask}.  The default value is the function
9389 @code{gnus-button-mid-or-mail-heuristic}.
9390
9391 @item gnus-button-mid-or-mail-heuristic
9392 @findex gnus-button-mid-or-mail-heuristic
9393 Function that guesses whether its argument is a message ID or a mail
9394 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
9395 it's a mail address, @code{ask} if unsure and @code{invalid} if the
9396 string is invalid.
9397
9398 @item gnus-button-mid-or-mail-heuristic-alist
9399 @vindex gnus-button-mid-or-mail-heuristic-alist
9400 An alist of @code{(RATE . REGEXP)} pairs used by the function
9401 @code{gnus-button-mid-or-mail-heuristic}.
9402
9403 @c Stuff related to gnus-button-tex-level
9404
9405 @item gnus-button-ctan-handler
9406 @findex gnus-button-ctan-handler
9407 The function to use for displaying CTAN links.  It must take one
9408 argument, the string naming the URL.
9409
9410 @item gnus-ctan-url
9411 @vindex gnus-ctan-url
9412 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
9413 by @code{gnus-button-ctan-handler}.
9414
9415 @c Misc stuff
9416
9417 @item gnus-article-button-face
9418 @vindex gnus-article-button-face
9419 Face used on buttons.
9420
9421 @item gnus-article-mouse-face
9422 @vindex gnus-article-mouse-face
9423 Face used when the mouse cursor is over a button.
9424
9425 @end table
9426
9427 @xref{Customizing Articles}, for how to buttonize articles automatically.
9428
9429
9430 @node Article Button Levels
9431 @subsection Article button levels
9432 @cindex button levels
9433 The higher the value of the variables @code{gnus-button-@var{*}-level},
9434 the more buttons will appear.  If the level is zero, no corresponding
9435 buttons are displayed.  With the default value (which is 5) you should
9436 already see quite a lot of buttons.  With higher levels, you will see
9437 more buttons, but you may also get more false positives.  To avoid them,
9438 you can set the variables @code{gnus-button-@var{*}-level} local to
9439 specific groups (@pxref{Group Parameters}).  Here's an example for the
9440 variable @code{gnus-parameters}:
9441
9442 @lisp
9443 ;; @r{increase @code{gnus-button-*-level} in some groups:}
9444 (setq gnus-parameters
9445       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
9446         ("\\<unix\\>"               (gnus-button-man-level 10))
9447         ("\\<tex\\>"                (gnus-button-tex-level 10))))
9448 @end lisp
9449
9450 @table @code
9451
9452 @item gnus-button-browse-level
9453 @vindex gnus-button-browse-level
9454 Controls the display of references to message IDs, mail addresses and
9455 news URLs.  Related variables and functions include
9456 @code{gnus-button-url-regexp}, @code{browse-url}, and
9457 @code{browse-url-browser-function}.
9458
9459 @item gnus-button-emacs-level
9460 @vindex gnus-button-emacs-level
9461 Controls the display of Emacs or Gnus references.  Related functions are
9462 @code{gnus-button-handle-custom},
9463 @code{gnus-button-handle-describe-function},
9464 @code{gnus-button-handle-describe-variable},
9465 @code{gnus-button-handle-symbol},
9466 @code{gnus-button-handle-describe-key},
9467 @code{gnus-button-handle-apropos},
9468 @code{gnus-button-handle-apropos-command},
9469 @code{gnus-button-handle-apropos-variable},
9470 @code{gnus-button-handle-apropos-documentation}, and
9471 @code{gnus-button-handle-library}.
9472
9473 @item gnus-button-man-level
9474 @vindex gnus-button-man-level
9475 Controls the display of references to (Unix) man pages.
9476 See @code{gnus-button-man-handler}.
9477
9478 @item gnus-button-message-level
9479 @vindex gnus-button-message-level
9480 Controls the display of message IDs, mail addresses and news URLs.
9481 Related variables and functions include
9482 @code{gnus-button-mid-or-mail-regexp},
9483 @code{gnus-button-prefer-mid-or-mail},
9484 @code{gnus-button-mid-or-mail-heuristic}, and
9485 @code{gnus-button-mid-or-mail-heuristic-alist}.
9486
9487 @item gnus-button-tex-level
9488 @vindex gnus-button-tex-level
9489 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
9490 URLs.  See the variables @code{gnus-ctan-url},
9491 @code{gnus-button-ctan-handler},
9492 @code{gnus-button-ctan-directory-regexp}, and
9493 @code{gnus-button-handle-ctan-bogus-regexp}.
9494
9495 @end table
9496
9497
9498 @node Article Date
9499 @subsection Article Date
9500
9501 The date is most likely generated in some obscure timezone you've never
9502 heard of, so it's quite nice to be able to find out what the time was
9503 when the article was sent.
9504
9505 @table @kbd
9506
9507 @item W T u
9508 @kindex W T u (Summary)
9509 @findex gnus-article-date-ut
9510 Display the date in UT (aka. GMT, aka ZULU)
9511 (@code{gnus-article-date-ut}).
9512
9513 @item W T i
9514 @kindex W T i (Summary)
9515 @findex gnus-article-date-iso8601
9516 @cindex ISO 8601
9517 Display the date in international format, aka. ISO 8601
9518 (@code{gnus-article-date-iso8601}).
9519
9520 @item W T l
9521 @kindex W T l (Summary)
9522 @findex gnus-article-date-local
9523 Display the date in the local timezone (@code{gnus-article-date-local}).
9524
9525 @item W T p
9526 @kindex W T p (Summary)
9527 @findex gnus-article-date-english
9528 Display the date in a format that's easily pronounceable in English
9529 (@code{gnus-article-date-english}).
9530
9531 @item W T s
9532 @kindex W T s (Summary)
9533 @vindex gnus-article-time-format
9534 @findex gnus-article-date-user
9535 @findex format-time-string
9536 Display the date using a user-defined format
9537 (@code{gnus-article-date-user}).  The format is specified by the
9538 @code{gnus-article-time-format} variable, and is a string that's passed
9539 to @code{format-time-string}.  See the documentation of that variable
9540 for a list of possible format specs.
9541
9542 @item W T e
9543 @kindex W T e (Summary)
9544 @findex gnus-article-date-lapsed
9545 @findex gnus-start-date-timer
9546 @findex gnus-stop-date-timer
9547 Say how much time has elapsed between the article was posted and now
9548 (@code{gnus-article-date-lapsed}).  It looks something like:
9549
9550 @example
9551 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9552 @end example
9553
9554 @vindex gnus-article-date-lapsed-new-header
9555 The value of @code{gnus-article-date-lapsed-new-header} determines
9556 whether this header will just be added below the old Date one, or will
9557 replace it.
9558
9559 An advantage of using Gnus to read mail is that it converts simple bugs
9560 into wonderful absurdities.
9561
9562 If you want to have this line updated continually, you can put
9563
9564 @lisp
9565 (gnus-start-date-timer)
9566 @end lisp
9567
9568 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
9569 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
9570 command.
9571
9572 @item W T o
9573 @kindex W T o (Summary)
9574 @findex gnus-article-date-original
9575 Display the original date (@code{gnus-article-date-original}).  This can
9576 be useful if you normally use some other conversion function and are
9577 worried that it might be doing something totally wrong.  Say, claiming
9578 that the article was posted in 1854.  Although something like that is
9579 @emph{totally} impossible.  Don't you trust me? *titter*
9580
9581 @end table
9582
9583 @xref{Customizing Articles}, for how to display the date in your
9584 preferred format automatically.
9585
9586
9587 @node Article Display
9588 @subsection Article Display
9589 @cindex picons
9590 @cindex x-face
9591 @cindex smileys
9592
9593 These commands add various frivolous display gimmicks to the article
9594 buffer in Emacs versions that support them.
9595
9596 @code{X-Face} headers are small black-and-white images supplied by the
9597 message headers (@pxref{X-Face}).
9598
9599 @code{Face} headers are small colored images supplied by the message
9600 headers (@pxref{Face}).
9601
9602 Smileys are those little @samp{:-)} symbols that people like to litter
9603 their messages with (@pxref{Smileys}).
9604
9605 Picons, on the other hand, reside on your own system, and Gnus will
9606 try to match the headers to what you have (@pxref{Picons}).
9607
9608 All these functions are toggles---if the elements already exist,
9609 they'll be removed.
9610
9611 @table @kbd
9612 @item W D x
9613 @kindex W D x (Summary)
9614 @findex gnus-article-display-x-face
9615 Display an @code{X-Face} in the @code{From} header.
9616 (@code{gnus-article-display-x-face}).
9617
9618 @item W D d
9619 @kindex W D d (Summary)
9620 @findex gnus-article-display-face
9621 Display a @code{Face} in the @code{From} header.
9622 (@code{gnus-article-display-face}).
9623
9624 @item W D s
9625 @kindex W D s (Summary)
9626 @findex gnus-treat-smiley
9627 Display smileys (@code{gnus-treat-smiley}).
9628
9629 @item W D f
9630 @kindex W D f (Summary)
9631 @findex gnus-treat-from-picon
9632 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9633
9634 @item W D m
9635 @kindex W D m (Summary)
9636 @findex gnus-treat-mail-picon
9637 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9638 (@code{gnus-treat-mail-picon}).
9639
9640 @item W D n
9641 @kindex W D n (Summary)
9642 @findex gnus-treat-newsgroups-picon
9643 Piconify all news headers (i. e., @code{Newsgroups} and
9644 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9645
9646 @item W D D
9647 @kindex W D D (Summary)
9648 @findex gnus-article-remove-images
9649 Remove all images from the article buffer
9650 (@code{gnus-article-remove-images}).
9651
9652 @end table
9653
9654
9655
9656 @node Article Signature
9657 @subsection Article Signature
9658 @cindex signatures
9659 @cindex article signature
9660
9661 @vindex gnus-signature-separator
9662 Each article is divided into two parts---the head and the body.  The
9663 body can be divided into a signature part and a text part.  The variable
9664 that says what is to be considered a signature is
9665 @code{gnus-signature-separator}.  This is normally the standard
9666 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9667 non-standard signature separators, so this variable can also be a list
9668 of regular expressions to be tested, one by one.  (Searches are done
9669 from the end of the body towards the beginning.)  One likely value is:
9670
9671 @lisp
9672 (setq gnus-signature-separator
9673       '("^-- $"         ; @r{The standard}
9674         "^-- *$"        ; @r{A common mangling}
9675         "^-------*$"    ; @r{Many people just use a looong}
9676                         ; @r{line of dashes.  Shame!}
9677         "^ *--------*$" ; @r{Double-shame!}
9678         "^________*$"   ; @r{Underscores are also popular}
9679         "^========*$")) ; @r{Pervert!}
9680 @end lisp
9681
9682 The more permissive you are, the more likely it is that you'll get false
9683 positives.
9684
9685 @vindex gnus-signature-limit
9686 @code{gnus-signature-limit} provides a limit to what is considered a
9687 signature when displaying articles.
9688
9689 @enumerate
9690 @item
9691 If it is an integer, no signature may be longer (in characters) than
9692 that integer.
9693 @item
9694 If it is a floating point number, no signature may be longer (in lines)
9695 than that number.
9696 @item
9697 If it is a function, the function will be called without any parameters,
9698 and if it returns @code{nil}, there is no signature in the buffer.
9699 @item
9700 If it is a string, it will be used as a regexp.  If it matches, the text
9701 in question is not a signature.
9702 @end enumerate
9703
9704 This variable can also be a list where the elements may be of the types
9705 listed above.  Here's an example:
9706
9707 @lisp
9708 (setq gnus-signature-limit
9709       '(200.0 "^---*Forwarded article"))
9710 @end lisp
9711
9712 This means that if there are more than 200 lines after the signature
9713 separator, or the text after the signature separator is matched by
9714 the regular expression @samp{^---*Forwarded article}, then it isn't a
9715 signature after all.
9716
9717
9718 @node Article Miscellanea
9719 @subsection Article Miscellanea
9720
9721 @table @kbd
9722 @item A t
9723 @kindex A t (Summary)
9724 @findex gnus-article-babel
9725 Translate the article from one language to another
9726 (@code{gnus-article-babel}).
9727
9728 @end table
9729
9730
9731 @node MIME Commands
9732 @section MIME Commands
9733 @cindex MIME decoding
9734 @cindex attachments
9735 @cindex viewing attachments
9736
9737 The following commands all understand the numerical prefix.  For
9738 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
9739
9740 @table @kbd
9741 @item b
9742 @itemx K v
9743 @kindex b (Summary)
9744 @kindex K v (Summary)
9745 View the @acronym{MIME} part.
9746
9747 @item K o
9748 @kindex K o (Summary)
9749 Save the @acronym{MIME} part.
9750
9751 @item K O
9752 @kindex K O (Summary)
9753 Prompt for a file name, then save the @acronym{MIME} part and strip it
9754 from the article.  The stripped @acronym{MIME} object will be referred
9755 via the message/external-body @acronym{MIME} type.
9756
9757 @item K r
9758 @kindex K r (Summary)
9759 Replace the @acronym{MIME} part with an external body.
9760
9761 @item K d
9762 @kindex K d (Summary)
9763 Delete the @acronym{MIME} part and add some information about the
9764 removed part.
9765
9766 @item K c
9767 @kindex K c (Summary)
9768 Copy the @acronym{MIME} part.
9769
9770 @item K e
9771 @kindex K e (Summary)
9772 View the @acronym{MIME} part externally.
9773
9774 @item K i
9775 @kindex K i (Summary)
9776 View the @acronym{MIME} part internally.
9777
9778 @item K |
9779 @kindex K | (Summary)
9780 Pipe the @acronym{MIME} part to an external command.
9781 @end table
9782
9783 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9784 the same manner:
9785
9786 @table @kbd
9787 @item K H
9788 @kindex K H (Summary)
9789 @findex gnus-article-browse-html-article
9790 View @samp{text/html} parts of the current article with a WWW browser.
9791 The message header is added to the beginning of every html part unless
9792 the prefix argument is given.
9793
9794 Warning: Spammers use links to images in HTML articles to verify whether
9795 you have read the message.  As this command passes the @acronym{HTML}
9796 content to the browser without eliminating these ``web bugs'' you should
9797 only use it for mails from trusted senders.
9798
9799 If you always want to display @acronym{HTML} parts in the browser, set
9800 @code{mm-text-html-renderer} to @code{nil}.
9801
9802 @item K b
9803 @kindex K b (Summary)
9804 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9805 mostly useful if you wish to save (or perform other actions) on inlined
9806 parts.
9807
9808 @item K m
9809 @kindex K m (Summary)
9810 @findex gnus-summary-repair-multipart
9811 Some multipart messages are transmitted with missing or faulty headers.
9812 This command will attempt to ``repair'' these messages so that they can
9813 be viewed in a more pleasant manner
9814 (@code{gnus-summary-repair-multipart}).
9815
9816 @item X m
9817 @kindex X m (Summary)
9818 @findex gnus-summary-save-parts
9819 Save all parts matching a @acronym{MIME} type to a directory
9820 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9821 convention (@pxref{Process/Prefix}).
9822
9823 @item M-t
9824 @kindex M-t (Summary)
9825 @findex gnus-summary-toggle-display-buttonized
9826 Toggle the buttonized display of the article buffer
9827 (@code{gnus-summary-toggle-display-buttonized}).
9828
9829 @item W M w
9830 @kindex W M w (Summary)
9831 @findex gnus-article-decode-mime-words
9832 Decode RFC 2047-encoded words in the article headers
9833 (@code{gnus-article-decode-mime-words}).
9834
9835 @item W M c
9836 @kindex W M c (Summary)
9837 @findex gnus-article-decode-charset
9838 Decode encoded article bodies as well as charsets
9839 (@code{gnus-article-decode-charset}).
9840
9841 This command looks in the @code{Content-Type} header to determine the
9842 charset.  If there is no such header in the article, you can give it a
9843 prefix, which will prompt for the charset to decode as.  In regional
9844 groups where people post using some common encoding (but do not
9845 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9846 parameter to the required charset (@pxref{Group Parameters}).
9847
9848 @item W M v
9849 @kindex W M v (Summary)
9850 @findex gnus-mime-view-all-parts
9851 View all the @acronym{MIME} parts in the current article
9852 (@code{gnus-mime-view-all-parts}).
9853
9854 @end table
9855
9856 Relevant variables:
9857
9858 @table @code
9859 @item gnus-ignored-mime-types
9860 @vindex gnus-ignored-mime-types
9861 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9862 this list will be completely ignored by Gnus.  The default value is
9863 @code{nil}.
9864
9865 To have all Vcards be ignored, you'd say something like this:
9866
9867 @lisp
9868 (setq gnus-ignored-mime-types
9869       '("text/x-vcard"))
9870 @end lisp
9871
9872 @item gnus-article-loose-mime
9873 @vindex gnus-article-loose-mime
9874 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9875 before interpreting the message as a @acronym{MIME} message.  This helps
9876 when reading messages from certain broken mail user agents.  The
9877 default is @code{t}.
9878
9879 @item gnus-article-emulate-mime
9880 @vindex gnus-article-emulate-mime
9881 @cindex uuencode
9882 @cindex yEnc
9883 There are other, non-@acronym{MIME} encoding methods used.  The most common
9884 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9885 this variable is non-@code{nil}, Gnus will look in message bodies to
9886 see if it finds these encodings, and if so, it'll run them through the
9887 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
9888 single-part yEnc encoded attachments can be decoded.  There's no support
9889 for encoding in Gnus.
9890
9891 @item gnus-unbuttonized-mime-types
9892 @vindex gnus-unbuttonized-mime-types
9893 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9894 this list won't have @acronym{MIME} buttons inserted unless they aren't
9895 displayed or this variable is overridden by
9896 @code{gnus-buttonized-mime-types}.  The default value is
9897 @code{(".*/.*")}.  This variable is only used when
9898 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9899
9900 @item gnus-buttonized-mime-types
9901 @vindex gnus-buttonized-mime-types
9902 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9903 this list will have @acronym{MIME} buttons inserted unless they aren't
9904 displayed.  This variable overrides
9905 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9906 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9907 is @code{nil}.
9908
9909 To see e.g. security buttons but no other buttons, you could set this
9910 variable to @code{("multipart/signed")} and leave
9911 @code{gnus-unbuttonized-mime-types} at the default value.
9912
9913 You could also add @code{"multipart/alternative"} to this list to
9914 display radio buttons that allow you to choose one of two media types
9915 those mails include.  See also @code{mm-discouraged-alternatives}
9916 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
9917 Emacs MIME Manual}).
9918
9919 @item gnus-inhibit-mime-unbuttonizing
9920 @vindex gnus-inhibit-mime-unbuttonizing
9921 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9922 default value is @code{nil}.
9923
9924 @item gnus-article-mime-part-function
9925 @vindex gnus-article-mime-part-function
9926 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9927 handle as the parameter.  The function is meant to be used to allow
9928 users to gather information from the article (e. g., add Vcard info to
9929 the bbdb database) or to do actions based on parts (e. g., automatically
9930 save all jpegs into some directory).
9931
9932 Here's an example function the does the latter:
9933
9934 @lisp
9935 (defun my-save-all-jpeg-parts (handle)
9936   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9937     (with-temp-buffer
9938       (insert (mm-get-part handle))
9939       (write-region (point-min) (point-max)
9940                     (read-file-name "Save jpeg to: ")))))
9941 (setq gnus-article-mime-part-function
9942       'my-save-all-jpeg-parts)
9943 @end lisp
9944
9945 @vindex gnus-mime-multipart-functions
9946 @item gnus-mime-multipart-functions
9947 Alist of @acronym{MIME} multipart types and functions to handle them.
9948
9949 @vindex gnus-mime-display-multipart-alternative-as-mixed
9950 @item gnus-mime-display-multipart-alternative-as-mixed
9951 Display "multipart/alternative" parts as "multipart/mixed".
9952
9953 @vindex gnus-mime-display-multipart-related-as-mixed
9954 @item gnus-mime-display-multipart-related-as-mixed
9955 Display "multipart/related" parts as "multipart/mixed".
9956
9957 If displaying @samp{text/html} is discouraged, see
9958 @code{mm-discouraged-alternatives}, images or other material inside a
9959 "multipart/related" part might be overlooked when this variable is
9960 @code{nil}.  @ref{Display Customization, Display Customization, ,
9961 emacs-mime, Emacs-Mime Manual}.
9962
9963 @vindex gnus-mime-display-multipart-as-mixed
9964 @item gnus-mime-display-multipart-as-mixed
9965 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
9966 overrides @code{nil} values of
9967 @code{gnus-mime-display-multipart-alternative-as-mixed} and
9968 @code{gnus-mime-display-multipart-related-as-mixed}.
9969
9970 @vindex mm-file-name-rewrite-functions
9971 @item mm-file-name-rewrite-functions
9972 List of functions used for rewriting file names of @acronym{MIME} parts.
9973 Each function takes a file name as input and returns a file name.
9974
9975 Ready-made functions include@*
9976 @code{mm-file-name-delete-whitespace},
9977 @code{mm-file-name-trim-whitespace},
9978 @code{mm-file-name-collapse-whitespace}, and
9979 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9980 the variable @code{mm-file-name-replace-whitespace} to replace each
9981 whitespace character in a file name with that string; default value
9982 is @code{"_"} (a single underscore).
9983 @findex mm-file-name-delete-whitespace
9984 @findex mm-file-name-trim-whitespace
9985 @findex mm-file-name-collapse-whitespace
9986 @findex mm-file-name-replace-whitespace
9987 @vindex mm-file-name-replace-whitespace
9988
9989 The standard functions @code{capitalize}, @code{downcase},
9990 @code{upcase}, and @code{upcase-initials} may be useful, too.
9991
9992 Everybody knows that whitespace characters in file names are evil,
9993 except those who don't know.  If you receive lots of attachments from
9994 such unenlightened users, you can make live easier by adding
9995
9996 @lisp
9997 (setq mm-file-name-rewrite-functions
9998       '(mm-file-name-trim-whitespace
9999         mm-file-name-collapse-whitespace
10000         mm-file-name-replace-whitespace))
10001 @end lisp
10002
10003 @noindent
10004 to your @file{~/.gnus.el} file.
10005
10006 @end table
10007
10008
10009 @node Charsets
10010 @section Charsets
10011 @cindex charsets
10012
10013 People use different charsets, and we have @acronym{MIME} to let us know what
10014 charsets they use.  Or rather, we wish we had.  Many people use
10015 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10016 just send out messages without saying what character sets they use.  To
10017 help a bit with this, some local news hierarchies have policies that say
10018 what character set is the default.  For instance, the @samp{fj}
10019 hierarchy uses @code{iso-2022-jp}.
10020
10021 @vindex gnus-group-charset-alist
10022 This knowledge is encoded in the @code{gnus-group-charset-alist}
10023 variable, which is an alist of regexps (use the first item to match full
10024 group names) and default charsets to be used when reading these groups.
10025
10026 @vindex gnus-newsgroup-ignored-charsets
10027 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10028 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10029 even if they really are in @code{koi-8}.  To help here, the
10030 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10031 charsets that are listed here will be ignored.  The variable can be
10032 set on a group-by-group basis using the group parameters (@pxref{Group
10033 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10034 which includes values some agents insist on having in there.
10035
10036 @vindex gnus-group-posting-charset-alist
10037 When posting, @code{gnus-group-posting-charset-alist} is used to
10038 determine which charsets should not be encoded using the @acronym{MIME}
10039 encodings.  For instance, some hierarchies discourage using
10040 quoted-printable header encoding.
10041
10042 This variable is an alist of regexps and permitted unencoded charsets
10043 for posting.  Each element of the alist has the form @code{(}@var{test
10044 header body-list}@code{)}, where:
10045
10046 @table @var
10047 @item test
10048 is either a regular expression matching the newsgroup header or a
10049 variable to query,
10050 @item header
10051 is the charset which may be left unencoded in the header (@code{nil}
10052 means encode all charsets),
10053 @item body-list
10054 is a list of charsets which may be encoded using 8bit content-transfer
10055 encoding in the body, or one of the special values @code{nil} (always
10056 encode using quoted-printable) or @code{t} (always use 8bit).
10057 @end table
10058
10059 @cindex Russian
10060 @cindex koi8-r
10061 @cindex koi8-u
10062 @cindex iso-8859-5
10063 @cindex coding system aliases
10064 @cindex preferred charset
10065
10066 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10067 The Emacs MIME Manual}, for additional variables that control which
10068 MIME charsets are used when sending messages.
10069
10070 Other charset tricks that may be useful, although not Gnus-specific:
10071
10072 If there are several @acronym{MIME} charsets that encode the same Emacs
10073 charset, you can choose what charset to use by saying the following:
10074
10075 @lisp
10076 (put-charset-property 'cyrillic-iso8859-5
10077                       'preferred-coding-system 'koi8-r)
10078 @end lisp
10079
10080 This means that Russian will be encoded using @code{koi8-r} instead of
10081 the default @code{iso-8859-5} @acronym{MIME} charset.
10082
10083 If you want to read messages in @code{koi8-u}, you can cheat and say
10084
10085 @lisp
10086 (define-coding-system-alias 'koi8-u 'koi8-r)
10087 @end lisp
10088
10089 This will almost do the right thing.
10090
10091 And finally, to read charsets like @code{windows-1251}, you can say
10092 something like
10093
10094 @lisp
10095 (codepage-setup 1251)
10096 (define-coding-system-alias 'windows-1251 'cp1251)
10097 @end lisp
10098
10099
10100 @node Article Commands
10101 @section Article Commands
10102
10103 @table @kbd
10104
10105 @item A P
10106 @cindex PostScript
10107 @cindex printing
10108 @kindex A P (Summary)
10109 @vindex gnus-ps-print-hook
10110 @findex gnus-summary-print-article
10111 Generate and print a PostScript image of the article buffer
10112 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10113 be run just before printing the buffer.  An alternative way to print
10114 article is to use Muttprint (@pxref{Saving Articles}).
10115
10116 @end table
10117
10118
10119 @node Summary Sorting
10120 @section Summary Sorting
10121 @cindex summary sorting
10122
10123 You can have the summary buffer sorted in various ways, even though I
10124 can't really see why you'd want that.
10125
10126 @table @kbd
10127
10128 @item C-c C-s C-n
10129 @kindex C-c C-s C-n (Summary)
10130 @findex gnus-summary-sort-by-number
10131 Sort by article number (@code{gnus-summary-sort-by-number}).
10132
10133 @item C-c C-s C-a
10134 @kindex C-c C-s C-a (Summary)
10135 @findex gnus-summary-sort-by-author
10136 Sort by author (@code{gnus-summary-sort-by-author}).
10137
10138 @item C-c C-s C-t
10139 @kindex C-c C-s C-t (Summary)
10140 @findex gnus-summary-sort-by-recipient
10141 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10142
10143 @item C-c C-s C-s
10144 @kindex C-c C-s C-s (Summary)
10145 @findex gnus-summary-sort-by-subject
10146 Sort by subject (@code{gnus-summary-sort-by-subject}).
10147
10148 @item C-c C-s C-d
10149 @kindex C-c C-s C-d (Summary)
10150 @findex gnus-summary-sort-by-date
10151 Sort by date (@code{gnus-summary-sort-by-date}).
10152
10153 @item C-c C-s C-l
10154 @kindex C-c C-s C-l (Summary)
10155 @findex gnus-summary-sort-by-lines
10156 Sort by lines (@code{gnus-summary-sort-by-lines}).
10157
10158 @item C-c C-s C-c
10159 @kindex C-c C-s C-c (Summary)
10160 @findex gnus-summary-sort-by-chars
10161 Sort by article length (@code{gnus-summary-sort-by-chars}).
10162
10163 @item C-c C-s C-i
10164 @kindex C-c C-s C-i (Summary)
10165 @findex gnus-summary-sort-by-score
10166 Sort by score (@code{gnus-summary-sort-by-score}).
10167
10168 @item C-c C-s C-r
10169 @kindex C-c C-s C-r (Summary)
10170 @findex gnus-summary-sort-by-random
10171 Randomize (@code{gnus-summary-sort-by-random}).
10172
10173 @item C-c C-s C-o
10174 @kindex C-c C-s C-o (Summary)
10175 @findex gnus-summary-sort-by-original
10176 Sort using the default sorting method
10177 (@code{gnus-summary-sort-by-original}).
10178 @end table
10179
10180 These functions will work both when you use threading and when you don't
10181 use threading.  In the latter case, all summary lines will be sorted,
10182 line by line.  In the former case, sorting will be done on a
10183 root-by-root basis, which might not be what you were looking for.  To
10184 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10185 Commands}).
10186
10187
10188 @node Finding the Parent
10189 @section Finding the Parent
10190 @cindex parent articles
10191 @cindex referring articles
10192
10193 @table @kbd
10194 @item ^
10195 @kindex ^ (Summary)
10196 @findex gnus-summary-refer-parent-article
10197 If you'd like to read the parent of the current article, and it is not
10198 displayed in the summary buffer, you might still be able to.  That is,
10199 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10200 and the @code{References} in the current article are not mangled, you
10201 can just press @kbd{^} or @kbd{A r}
10202 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10203 you'll get the parent.  If the parent is already displayed in the
10204 summary buffer, point will just move to this article.
10205
10206 If given a positive numerical prefix, fetch that many articles back into
10207 the ancestry.  If given a negative numerical prefix, fetch just that
10208 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10209 grandparent and the grandgrandparent of the current article.  If you say
10210 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10211 article.
10212
10213 @item A R (Summary)
10214 @findex gnus-summary-refer-references
10215 @kindex A R (Summary)
10216 Fetch all articles mentioned in the @code{References} header of the
10217 article (@code{gnus-summary-refer-references}).
10218
10219 @item A T (Summary)
10220 @findex gnus-summary-refer-thread
10221 @kindex A T (Summary)
10222 Display the full thread where the current article appears
10223 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10224 headers in the current group to work, so it usually takes a while.  If
10225 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10226 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10227 visible effects normally, but it'll make this command work a whole lot
10228 faster.  Of course, it'll make group entry somewhat slow.
10229
10230 @vindex gnus-refer-thread-limit
10231 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10232 articles before the first displayed in the current group) headers to
10233 fetch when doing this command.  The default is 200.  If @code{t}, all
10234 the available headers will be fetched.  This variable can be overridden
10235 by giving the @kbd{A T} command a numerical prefix.
10236
10237 @item M-^ (Summary)
10238 @findex gnus-summary-refer-article
10239 @kindex M-^ (Summary)
10240 @cindex Message-ID
10241 @cindex fetching by Message-ID
10242 You can also ask Gnus for an arbitrary article, no matter what group it
10243 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10244 for a @code{Message-ID}, which is one of those long, hard-to-read
10245 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10246 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10247
10248 Gnus looks for the @code{Message-ID} in the headers that have already
10249 been fetched, but also tries all the select methods specified by
10250 @code{gnus-refer-article-method} if it is not found.
10251 @end table
10252
10253 @vindex gnus-refer-article-method
10254 If the group you are reading is located on a back end that does not
10255 support fetching by @code{Message-ID} very well (like @code{nnspool}),
10256 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
10257 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
10258 updating the spool you are reading from, but that's not really
10259 necessary.
10260
10261 It can also be a list of select methods, as well as the special symbol
10262 @code{current}, which means to use the current select method.  If it
10263 is a list, Gnus will try all the methods in the list until it finds a
10264 match.
10265
10266 Here's an example setting that will first try the current method, and
10267 then ask Google if that fails:
10268
10269 @lisp
10270 (setq gnus-refer-article-method
10271       '(current
10272         (nnweb "google" (nnweb-type google))))
10273 @end lisp
10274
10275 Most of the mail back ends support fetching by @code{Message-ID}, but
10276 do not do a particularly excellent job at it.  That is, @code{nnmbox},
10277 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
10278 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
10279 only able to locate articles that have been posted to the current
10280 group.  (Anything else would be too time consuming.)  @code{nnmh} does
10281 not support this at all.
10282
10283
10284 @node Alternative Approaches
10285 @section Alternative Approaches
10286
10287 Different people like to read news using different methods.  This being
10288 Gnus, we offer a small selection of minor modes for the summary buffers.
10289
10290 @menu
10291 * Pick and Read::               First mark articles and then read them.
10292 * Binary Groups::               Auto-decode all articles.
10293 @end menu
10294
10295
10296 @node Pick and Read
10297 @subsection Pick and Read
10298 @cindex pick and read
10299
10300 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
10301 a two-phased reading interface.  The user first marks in a summary
10302 buffer the articles she wants to read.  Then she starts reading the
10303 articles with just an article buffer displayed.
10304
10305 @findex gnus-pick-mode
10306 @kindex M-x gnus-pick-mode
10307 Gnus provides a summary buffer minor mode that allows
10308 this---@code{gnus-pick-mode}.  This basically means that a few process
10309 mark commands become one-keystroke commands to allow easy marking, and
10310 it provides one additional command for switching to the summary buffer.
10311
10312 Here are the available keystrokes when using pick mode:
10313
10314 @table @kbd
10315 @item .
10316 @kindex . (Pick)
10317 @findex gnus-pick-article-or-thread
10318 Pick the article or thread on the current line
10319 (@code{gnus-pick-article-or-thread}).  If the variable
10320 @code{gnus-thread-hide-subtree} is true, then this key selects the
10321 entire thread when used at the first article of the thread.  Otherwise,
10322 it selects just the article.  If given a numerical prefix, go to that
10323 thread or article and pick it.  (The line number is normally displayed
10324 at the beginning of the summary pick lines.)
10325
10326 @item SPACE
10327 @kindex SPACE (Pick)
10328 @findex gnus-pick-next-page
10329 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
10330 at the end of the buffer, start reading the picked articles.
10331
10332 @item u
10333 @kindex u (Pick)
10334 @findex gnus-pick-unmark-article-or-thread.
10335 Unpick the thread or article
10336 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
10337 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
10338 thread if used at the first article of the thread.  Otherwise it unpicks
10339 just the article.  You can give this key a numerical prefix to unpick
10340 the thread or article at that line.
10341
10342 @item RET
10343 @kindex RET (Pick)
10344 @findex gnus-pick-start-reading
10345 @vindex gnus-pick-display-summary
10346 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
10347 given a prefix, mark all unpicked articles as read first.  If
10348 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
10349 will still be visible when you are reading.
10350
10351 @end table
10352
10353 All the normal summary mode commands are still available in the
10354 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
10355 which is mapped to the same function
10356 @code{gnus-summary-tick-article-forward}.
10357
10358 If this sounds like a good idea to you, you could say:
10359
10360 @lisp
10361 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
10362 @end lisp
10363
10364 @vindex gnus-pick-mode-hook
10365 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
10366
10367 @vindex gnus-mark-unpicked-articles-as-read
10368 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
10369 all unpicked articles as read.  The default is @code{nil}.
10370
10371 @vindex gnus-summary-pick-line-format
10372 The summary line format in pick mode is slightly different from the
10373 standard format.  At the beginning of each line the line number is
10374 displayed.  The pick mode line format is controlled by the
10375 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
10376 Variables}).  It accepts the same format specs that
10377 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
10378
10379
10380 @node Binary Groups
10381 @subsection Binary Groups
10382 @cindex binary groups
10383
10384 @findex gnus-binary-mode
10385 @kindex M-x gnus-binary-mode
10386 If you spend much time in binary groups, you may grow tired of hitting
10387 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
10388 is a minor mode for summary buffers that makes all ordinary Gnus article
10389 selection functions uudecode series of articles and display the result
10390 instead of just displaying the articles the normal way.
10391
10392 @kindex g (Binary)
10393 @findex gnus-binary-show-article
10394 The only way, in fact, to see the actual articles is the @kbd{g}
10395 command, when you have turned on this mode
10396 (@code{gnus-binary-show-article}).
10397
10398 @vindex gnus-binary-mode-hook
10399 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
10400
10401
10402 @node Tree Display
10403 @section Tree Display
10404 @cindex trees
10405
10406 @vindex gnus-use-trees
10407 If you don't like the normal Gnus summary display, you might try setting
10408 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
10409 additional @dfn{tree buffer}.  You can execute all summary mode commands
10410 in the tree buffer.
10411
10412 There are a few variables to customize the tree display, of course:
10413
10414 @table @code
10415 @item gnus-tree-mode-hook
10416 @vindex gnus-tree-mode-hook
10417 A hook called in all tree mode buffers.
10418
10419 @item gnus-tree-mode-line-format
10420 @vindex gnus-tree-mode-line-format
10421 A format string for the mode bar in the tree mode buffers (@pxref{Mode
10422 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
10423 of valid specs, @pxref{Summary Buffer Mode Line}.
10424
10425 @item gnus-selected-tree-face
10426 @vindex gnus-selected-tree-face
10427 Face used for highlighting the selected article in the tree buffer.  The
10428 default is @code{modeline}.
10429
10430 @item gnus-tree-line-format
10431 @vindex gnus-tree-line-format
10432 A format string for the tree nodes.  The name is a bit of a misnomer,
10433 though---it doesn't define a line, but just the node.  The default value
10434 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
10435 the name of the poster.  It is vital that all nodes are of the same
10436 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
10437
10438 Valid specs are:
10439
10440 @table @samp
10441 @item n
10442 The name of the poster.
10443 @item f
10444 The @code{From} header.
10445 @item N
10446 The number of the article.
10447 @item [
10448 The opening bracket.
10449 @item ]
10450 The closing bracket.
10451 @item s
10452 The subject.
10453 @end table
10454
10455 @xref{Formatting Variables}.
10456
10457 Variables related to the display are:
10458
10459 @table @code
10460 @item gnus-tree-brackets
10461 @vindex gnus-tree-brackets
10462 This is used for differentiating between ``real'' articles and
10463 ``sparse'' articles.  The format is
10464 @example
10465 ((@var{real-open} . @var{real-close})
10466  (@var{sparse-open} . @var{sparse-close})
10467  (@var{dummy-open} . @var{dummy-close}))
10468 @end example
10469 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
10470
10471 @item gnus-tree-parent-child-edges
10472 @vindex gnus-tree-parent-child-edges
10473 This is a list that contains the characters used for connecting parent
10474 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
10475
10476 @end table
10477
10478 @item gnus-tree-minimize-window
10479 @vindex gnus-tree-minimize-window
10480 If this variable is non-@code{nil}, Gnus will try to keep the tree
10481 buffer as small as possible to allow more room for the other Gnus
10482 windows.  If this variable is a number, the tree buffer will never be
10483 higher than that number.  The default is @code{t}.  Note that if you
10484 have several windows displayed side-by-side in a frame and the tree
10485 buffer is one of these, minimizing the tree window will also resize all
10486 other windows displayed next to it.
10487
10488 You may also wish to add the following hook to keep the window minimized
10489 at all times:
10490
10491 @lisp
10492 (add-hook 'gnus-configure-windows-hook
10493           'gnus-tree-perhaps-minimize)
10494 @end lisp
10495
10496 @item gnus-generate-tree-function
10497 @vindex gnus-generate-tree-function
10498 @findex gnus-generate-horizontal-tree
10499 @findex gnus-generate-vertical-tree
10500 The function that actually generates the thread tree.  Two predefined
10501 functions are available: @code{gnus-generate-horizontal-tree} and
10502 @code{gnus-generate-vertical-tree} (which is the default).
10503
10504 @end table
10505
10506 Here's an example from a horizontal tree buffer:
10507
10508 @example
10509 @{***@}-(***)-[odd]-[Gun]
10510      |      \[Jan]
10511      |      \[odd]-[Eri]
10512      |      \(***)-[Eri]
10513      |            \[odd]-[Paa]
10514      \[Bjo]
10515      \[Gun]
10516      \[Gun]-[Jor]
10517 @end example
10518
10519 Here's the same thread displayed in a vertical tree buffer:
10520
10521 @example
10522 @group
10523 @{***@}
10524   |--------------------------\-----\-----\
10525 (***)                         [Bjo] [Gun] [Gun]
10526   |--\-----\-----\                          |
10527 [odd] [Jan] [odd] (***)                   [Jor]
10528   |           |     |--\
10529 [Gun]       [Eri] [Eri] [odd]
10530                           |
10531                         [Paa]
10532 @end group
10533 @end example
10534
10535 If you're using horizontal trees, it might be nice to display the trees
10536 side-by-side with the summary buffer.  You could add something like the
10537 following to your @file{~/.gnus.el} file:
10538
10539 @lisp
10540 (setq gnus-use-trees t
10541       gnus-generate-tree-function 'gnus-generate-horizontal-tree
10542       gnus-tree-minimize-window nil)
10543 (gnus-add-configuration
10544  '(article
10545    (vertical 1.0
10546              (horizontal 0.25
10547                          (summary 0.75 point)
10548                          (tree 1.0))
10549              (article 1.0))))
10550 @end lisp
10551
10552 @xref{Window Layout}.
10553
10554
10555 @node Mail Group Commands
10556 @section Mail Group Commands
10557 @cindex mail group commands
10558
10559 Some commands only make sense in mail groups.  If these commands are
10560 invalid in the current group, they will raise a hell and let you know.
10561
10562 All these commands (except the expiry and edit commands) use the
10563 process/prefix convention (@pxref{Process/Prefix}).
10564
10565 @table @kbd
10566
10567 @item B e
10568 @kindex B e (Summary)
10569 @findex gnus-summary-expire-articles
10570 @cindex expiring mail
10571 Run all expirable articles in the current group through the expiry
10572 process (@code{gnus-summary-expire-articles}).  That is, delete all
10573 expirable articles in the group that have been around for a while.
10574 (@pxref{Expiring Mail}).
10575
10576 @item B C-M-e
10577 @kindex B C-M-e (Summary)
10578 @findex gnus-summary-expire-articles-now
10579 @cindex expiring mail
10580 Delete all the expirable articles in the group
10581 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
10582 articles eligible for expiry in the current group will
10583 disappear forever into that big @file{/dev/null} in the sky.
10584
10585 @item B DEL
10586 @kindex B DEL (Summary)
10587 @findex gnus-summary-delete-article
10588 @c @icon{gnus-summary-mail-delete}
10589 Delete the mail article.  This is ``delete'' as in ``delete it from your
10590 disk forever and ever, never to return again.'' Use with caution.
10591 (@code{gnus-summary-delete-article}).
10592
10593 @item B m
10594 @kindex B m (Summary)
10595 @cindex move mail
10596 @findex gnus-summary-move-article
10597 @vindex gnus-preserve-marks
10598 Move the article from one mail group to another
10599 (@code{gnus-summary-move-article}).  Marks will be preserved if
10600 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10601
10602 @item B c
10603 @kindex B c (Summary)
10604 @cindex copy mail
10605 @findex gnus-summary-copy-article
10606 @c @icon{gnus-summary-mail-copy}
10607 Copy the article from one group (mail group or not) to a mail group
10608 (@code{gnus-summary-copy-article}).  Marks will be preserved if
10609 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10610
10611 @item B B
10612 @kindex B B (Summary)
10613 @cindex crosspost mail
10614 @findex gnus-summary-crosspost-article
10615 Crosspost the current article to some other group
10616 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
10617 the article in the other group, and the Xref headers of the article will
10618 be properly updated.
10619
10620 @item B i
10621 @kindex B i (Summary)
10622 @findex gnus-summary-import-article
10623 Import an arbitrary file into the current mail newsgroup
10624 (@code{gnus-summary-import-article}).  You will be prompted for a file
10625 name, a @code{From} header and a @code{Subject} header.
10626
10627 @item B I
10628 @kindex B I (Summary)
10629 @findex gnus-summary-create-article
10630 Create an empty article in the current mail newsgroups
10631 (@code{gnus-summary-create-article}).  You will be prompted for a
10632 @code{From} header and a @code{Subject} header.
10633
10634 @item B r
10635 @kindex B r (Summary)
10636 @findex gnus-summary-respool-article
10637 @vindex gnus-summary-respool-default-method
10638 Respool the mail article (@code{gnus-summary-respool-article}).
10639 @code{gnus-summary-respool-default-method} will be used as the default
10640 select method when respooling.  This variable is @code{nil} by default,
10641 which means that the current group select method will be used instead.
10642 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10643 (which is the default).
10644
10645 @item B w
10646 @itemx e
10647 @kindex B w (Summary)
10648 @kindex e (Summary)
10649 @findex gnus-summary-edit-article
10650 @kindex C-c C-c (Article)
10651 @findex gnus-summary-edit-article-done
10652 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10653 editing and make the changes permanent, type @kbd{C-c C-c}
10654 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10655 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10656
10657 @item B q
10658 @kindex B q (Summary)
10659 @findex gnus-summary-respool-query
10660 If you want to re-spool an article, you might be curious as to what group
10661 the article will end up in before you do the re-spooling.  This command
10662 will tell you (@code{gnus-summary-respool-query}).
10663
10664 @item B t
10665 @kindex B t (Summary)
10666 @findex gnus-summary-respool-trace
10667 Similarly, this command will display all fancy splitting patterns used
10668 when respooling, if any (@code{gnus-summary-respool-trace}).
10669
10670 @item B p
10671 @kindex B p (Summary)
10672 @findex gnus-summary-article-posted-p
10673 Some people have a tendency to send you ``courtesy'' copies when they
10674 follow up to articles you have posted.  These usually have a
10675 @code{Newsgroups} header in them, but not always.  This command
10676 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10677 article from your news server (or rather, from
10678 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10679 report back whether it found the article or not.  Even if it says that
10680 it didn't find the article, it may have been posted anyway---mail
10681 propagation is much faster than news propagation, and the news copy may
10682 just not have arrived yet.
10683
10684 @item K E
10685 @kindex K E (Summary)
10686 @findex gnus-article-encrypt-body
10687 @vindex gnus-article-encrypt-protocol
10688 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10689 The body is encrypted with the encryption protocol specified by the
10690 variable @code{gnus-article-encrypt-protocol}.
10691
10692 @end table
10693
10694 @vindex gnus-move-split-methods
10695 @cindex moving articles
10696 If you move (or copy) articles regularly, you might wish to have Gnus
10697 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10698 variable that uses the same syntax as @code{gnus-split-methods}
10699 (@pxref{Saving Articles}).  You may customize that variable to create
10700 suggestions you find reasonable.  (Note that
10701 @code{gnus-move-split-methods} uses group names where
10702 @code{gnus-split-methods} uses file names.)
10703
10704 @lisp
10705 (setq gnus-move-split-methods
10706       '(("^From:.*Lars Magne" "nnml:junk")
10707         ("^Subject:.*gnus" "nnfolder:important")
10708         (".*" "nnml:misc")))
10709 @end lisp
10710
10711
10712 @node Various Summary Stuff
10713 @section Various Summary Stuff
10714
10715 @menu
10716 * Summary Group Information::   Information oriented commands.
10717 * Searching for Articles::      Multiple article commands.
10718 * Summary Generation Commands::
10719 * Really Various Summary Commands::  Those pesky non-conformant commands.
10720 @end menu
10721
10722 @table @code
10723 @vindex gnus-summary-display-while-building
10724 @item gnus-summary-display-while-building
10725 If non-@code{nil}, show and update the summary buffer as it's being
10726 built.  If @code{t}, update the buffer after every line is inserted.
10727 If the value is an integer, @var{n}, update the display every @var{n}
10728 lines.  The default is @code{nil}.
10729
10730 @vindex gnus-summary-display-arrow
10731 @item gnus-summary-display-arrow
10732 If non-@code{nil}, display an arrow in the fringe to indicate the
10733 current article.
10734
10735 @vindex gnus-summary-mode-hook
10736 @item gnus-summary-mode-hook
10737 This hook is called when creating a summary mode buffer.
10738
10739 @vindex gnus-summary-generate-hook
10740 @item gnus-summary-generate-hook
10741 This is called as the last thing before doing the threading and the
10742 generation of the summary buffer.  It's quite convenient for customizing
10743 the threading variables based on what data the newsgroup has.  This hook
10744 is called from the summary buffer after most summary buffer variables
10745 have been set.
10746
10747 @vindex gnus-summary-prepare-hook
10748 @item gnus-summary-prepare-hook
10749 It is called after the summary buffer has been generated.  You might use
10750 it to, for instance, highlight lines or modify the look of the buffer in
10751 some other ungodly manner.  I don't care.
10752
10753 @vindex gnus-summary-prepared-hook
10754 @item gnus-summary-prepared-hook
10755 A hook called as the very last thing after the summary buffer has been
10756 generated.
10757
10758 @vindex gnus-summary-ignore-duplicates
10759 @item gnus-summary-ignore-duplicates
10760 When Gnus discovers two articles that have the same @code{Message-ID},
10761 it has to do something drastic.  No articles are allowed to have the
10762 same @code{Message-ID}, but this may happen when reading mail from some
10763 sources.  Gnus allows you to customize what happens with this variable.
10764 If it is @code{nil} (which is the default), Gnus will rename the
10765 @code{Message-ID} (for display purposes only) and display the article as
10766 any other article.  If this variable is @code{t}, it won't display the
10767 article---it'll be as if it never existed.
10768
10769 @vindex gnus-alter-articles-to-read-function
10770 @item gnus-alter-articles-to-read-function
10771 This function, which takes two parameters (the group name and the list
10772 of articles to be selected), is called to allow the user to alter the
10773 list of articles to be selected.
10774
10775 For instance, the following function adds the list of cached articles to
10776 the list in one particular group:
10777
10778 @lisp
10779 (defun my-add-cached-articles (group articles)
10780   (if (string= group "some.group")
10781       (append gnus-newsgroup-cached articles)
10782     articles))
10783 @end lisp
10784
10785 @vindex gnus-newsgroup-variables
10786 @item gnus-newsgroup-variables
10787 A list of newsgroup (summary buffer) local variables, or cons of
10788 variables and their default expressions to be evalled (when the default
10789 values are not @code{nil}), that should be made global while the summary
10790 buffer is active.
10791
10792 Note: The default expressions will be evaluated (using function
10793 @code{eval}) before assignment to the local variable rather than just
10794 assigned to it.  If the default expression is the symbol @code{global},
10795 that symbol will not be evaluated but the global value of the local
10796 variable will be used instead.
10797
10798 These variables can be used to set variables in the group parameters
10799 while still allowing them to affect operations done in other
10800 buffers.  For example:
10801
10802 @lisp
10803 (setq gnus-newsgroup-variables
10804       '(message-use-followup-to
10805         (gnus-visible-headers .
10806  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10807 @end lisp
10808
10809 Also @pxref{Group Parameters}.
10810
10811 @vindex gnus-propagate-marks
10812 @item gnus-propagate-marks
10813 If non-@code{nil}, propagate marks to the backends for possible
10814 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
10815 sieve.
10816
10817 @end table
10818
10819
10820 @node Summary Group Information
10821 @subsection Summary Group Information
10822
10823 @table @kbd
10824
10825 @item H f
10826 @kindex H f (Summary)
10827 @findex gnus-summary-fetch-faq
10828 @vindex gnus-group-faq-directory
10829 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10830 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10831 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10832 is usually a directory on a remote machine.  This variable can also be
10833 a list of directories.  In that case, giving a prefix to this command
10834 will allow you to choose between the various sites.  @code{ange-ftp}
10835 or @code{efs} will probably be used for fetching the file.
10836
10837 @item H d
10838 @kindex H d (Summary)
10839 @findex gnus-summary-describe-group
10840 Give a brief description of the current group
10841 (@code{gnus-summary-describe-group}).  If given a prefix, force
10842 rereading the description from the server.
10843
10844 @item H h
10845 @kindex H h (Summary)
10846 @findex gnus-summary-describe-briefly
10847 Give an extremely brief description of the most important summary
10848 keystrokes (@code{gnus-summary-describe-briefly}).
10849
10850 @item H i
10851 @kindex H i (Summary)
10852 @findex gnus-info-find-node
10853 Go to the Gnus info node (@code{gnus-info-find-node}).
10854 @end table
10855
10856
10857 @node Searching for Articles
10858 @subsection Searching for Articles
10859
10860 @table @kbd
10861
10862 @item M-s
10863 @kindex M-s (Summary)
10864 @findex gnus-summary-search-article-forward
10865 Search through all subsequent (raw) articles for a regexp
10866 (@code{gnus-summary-search-article-forward}).
10867
10868 @item M-r
10869 @kindex M-r (Summary)
10870 @findex gnus-summary-search-article-backward
10871 Search through all previous (raw) articles for a regexp
10872 (@code{gnus-summary-search-article-backward}).
10873
10874 @item M-S
10875 @kindex M-S (Summary)
10876 @findex gnus-summary-repeat-search-article-forward
10877 Repeat the previous search forwards
10878 (@code{gnus-summary-repeat-search-article-forward}).
10879
10880 @item M-R
10881 @kindex M-R (Summary)
10882 @findex gnus-summary-repeat-search-article-backward
10883 Repeat the previous search backwards
10884 (@code{gnus-summary-repeat-search-article-backward}).
10885
10886 @item &
10887 @kindex & (Summary)
10888 @findex gnus-summary-execute-command
10889 This command will prompt you for a header, a regular expression to match
10890 on this field, and a command to be executed if the match is made
10891 (@code{gnus-summary-execute-command}).  If the header is an empty
10892 string, the match is done on the entire article.  If given a prefix,
10893 search backward instead.
10894
10895 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10896 all articles that have heads or bodies that match @samp{some.*string}.
10897
10898 @item M-&
10899 @kindex M-& (Summary)
10900 @findex gnus-summary-universal-argument
10901 Perform any operation on all articles that have been marked with
10902 the process mark (@code{gnus-summary-universal-argument}).
10903 @end table
10904
10905 @node Summary Generation Commands
10906 @subsection Summary Generation Commands
10907
10908 @table @kbd
10909
10910 @item Y g
10911 @kindex Y g (Summary)
10912 @findex gnus-summary-prepare
10913 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10914
10915 @item Y c
10916 @kindex Y c (Summary)
10917 @findex gnus-summary-insert-cached-articles
10918 Pull all cached articles (for the current group) into the summary buffer
10919 (@code{gnus-summary-insert-cached-articles}).
10920
10921 @item Y d
10922 @kindex Y d (Summary)
10923 @findex gnus-summary-insert-dormant-articles
10924 Pull all dormant articles (for the current group) into the summary buffer
10925 (@code{gnus-summary-insert-dormant-articles}).
10926
10927 @item Y t
10928 @kindex Y t (Summary)
10929 @findex gnus-summary-insert-ticked-articles
10930 Pull all ticked articles (for the current group) into the summary buffer
10931 (@code{gnus-summary-insert-ticked-articles}).
10932
10933 @end table
10934
10935
10936 @node Really Various Summary Commands
10937 @subsection Really Various Summary Commands
10938
10939 @table @kbd
10940
10941 @item A D
10942 @itemx C-d
10943 @kindex C-d (Summary)
10944 @kindex A D (Summary)
10945 @findex gnus-summary-enter-digest-group
10946 If the current article is a collection of other articles (for instance,
10947 a digest), you might use this command to enter a group based on the that
10948 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10949 guess what article type is currently displayed unless you give a prefix
10950 to this command, which forces a ``digest'' interpretation.  Basically,
10951 whenever you see a message that is a collection of other messages of
10952 some format, you @kbd{C-d} and read these messages in a more convenient
10953 fashion.
10954
10955 @vindex gnus-auto-select-on-ephemeral-exit
10956 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
10957 article should be selected after exiting a digest group.  Valid values
10958 include:
10959
10960 @table @code
10961 @item next
10962 Select the next article.
10963
10964 @item next-unread
10965 Select the next unread article.
10966
10967 @item next-noselect
10968 Move the cursor to the next article.  This is the default.
10969
10970 @item next-unread-noselect
10971 Move the cursor to the next unread article.
10972 @end table
10973
10974 If it has any other value or there is no next (unread) article, the
10975 article selected before entering to the digest group will appear.
10976
10977 @item C-M-d
10978 @kindex C-M-d (Summary)
10979 @findex gnus-summary-read-document
10980 This command is very similar to the one above, but lets you gather
10981 several documents into one biiig group
10982 (@code{gnus-summary-read-document}).  It does this by opening several
10983 @code{nndoc} groups for each document, and then opening an
10984 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10985 command understands the process/prefix convention
10986 (@pxref{Process/Prefix}).
10987
10988 @item C-t
10989 @kindex C-t (Summary)
10990 @findex gnus-summary-toggle-truncation
10991 Toggle truncation of summary lines
10992 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10993 line centering function in the summary buffer, so it's not a good idea
10994 to have truncation switched off while reading articles.
10995
10996 @item =
10997 @kindex = (Summary)
10998 @findex gnus-summary-expand-window
10999 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11000 If given a prefix, force an @code{article} window configuration.
11001
11002 @item C-M-e
11003 @kindex C-M-e (Summary)
11004 @findex gnus-summary-edit-parameters
11005 Edit the group parameters (@pxref{Group Parameters}) of the current
11006 group (@code{gnus-summary-edit-parameters}).
11007
11008 @item C-M-a
11009 @kindex C-M-a (Summary)
11010 @findex gnus-summary-customize-parameters
11011 Customize the group parameters (@pxref{Group Parameters}) of the current
11012 group (@code{gnus-summary-customize-parameters}).
11013
11014 @end table
11015
11016
11017 @node Exiting the Summary Buffer
11018 @section Exiting the Summary Buffer
11019 @cindex summary exit
11020 @cindex exiting groups
11021
11022 Exiting from the summary buffer will normally update all info on the
11023 group and return you to the group buffer.
11024
11025 @table @kbd
11026
11027 @item Z Z
11028 @itemx Z Q
11029 @itemx q
11030 @kindex Z Z (Summary)
11031 @kindex Z Q (Summary)
11032 @kindex q (Summary)
11033 @findex gnus-summary-exit
11034 @vindex gnus-summary-exit-hook
11035 @vindex gnus-summary-prepare-exit-hook
11036 @vindex gnus-group-no-more-groups-hook
11037 @c @icon{gnus-summary-exit}
11038 Exit the current group and update all information on the group
11039 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11040 called before doing much of the exiting, which calls
11041 @code{gnus-summary-expire-articles} by default.
11042 @code{gnus-summary-exit-hook} is called after finishing the exit
11043 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11044 group mode having no more (unread) groups.
11045
11046 @item Z E
11047 @itemx Q
11048 @kindex Z E (Summary)
11049 @kindex Q (Summary)
11050 @findex gnus-summary-exit-no-update
11051 Exit the current group without updating any information on the group
11052 (@code{gnus-summary-exit-no-update}).
11053
11054 @item Z c
11055 @itemx c
11056 @kindex Z c (Summary)
11057 @kindex c (Summary)
11058 @findex gnus-summary-catchup-and-exit
11059 @c @icon{gnus-summary-catchup-and-exit}
11060 Mark all unticked articles in the group as read and then exit
11061 (@code{gnus-summary-catchup-and-exit}).
11062
11063 @item Z C
11064 @kindex Z C (Summary)
11065 @findex gnus-summary-catchup-all-and-exit
11066 Mark all articles, even the ticked ones, as read and then exit
11067 (@code{gnus-summary-catchup-all-and-exit}).
11068
11069 @item Z n
11070 @kindex Z n (Summary)
11071 @findex gnus-summary-catchup-and-goto-next-group
11072 Mark all articles as read and go to the next group
11073 (@code{gnus-summary-catchup-and-goto-next-group}).
11074
11075 @item Z p
11076 @kindex Z p (Summary)
11077 @findex gnus-summary-catchup-and-goto-prev-group
11078 Mark all articles as read and go to the previous group
11079 (@code{gnus-summary-catchup-and-goto-prev-group}).
11080
11081 @item Z R
11082 @itemx C-x C-s
11083 @kindex Z R (Summary)
11084 @kindex C-x C-s (Summary)
11085 @findex gnus-summary-reselect-current-group
11086 Exit this group, and then enter it again
11087 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11088 all articles, both read and unread.
11089
11090 @item Z G
11091 @itemx M-g
11092 @kindex Z G (Summary)
11093 @kindex M-g (Summary)
11094 @findex gnus-summary-rescan-group
11095 @c @icon{gnus-summary-mail-get}
11096 Exit the group, check for new articles in the group, and select the
11097 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11098 articles, both read and unread.
11099
11100 @item Z N
11101 @kindex Z N (Summary)
11102 @findex gnus-summary-next-group
11103 Exit the group and go to the next group
11104 (@code{gnus-summary-next-group}).
11105
11106 @item Z P
11107 @kindex Z P (Summary)
11108 @findex gnus-summary-prev-group
11109 Exit the group and go to the previous group
11110 (@code{gnus-summary-prev-group}).
11111
11112 @item Z s
11113 @kindex Z s (Summary)
11114 @findex gnus-summary-save-newsrc
11115 Save the current number of read/marked articles in the dribble buffer
11116 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11117 given a prefix, also save the @file{.newsrc} file(s).  Using this
11118 command will make exit without updating (the @kbd{Q} command) worthless.
11119 @end table
11120
11121 @vindex gnus-exit-group-hook
11122 @code{gnus-exit-group-hook} is called when you exit the current group
11123 with an ``updating'' exit.  For instance @kbd{Q}
11124 (@code{gnus-summary-exit-no-update}) does not call this hook.
11125
11126 @findex gnus-summary-wake-up-the-dead
11127 @findex gnus-dead-summary-mode
11128 @vindex gnus-kill-summary-on-exit
11129 If you're in the habit of exiting groups, and then changing your mind
11130 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11131 If you do that, Gnus won't kill the summary buffer when you exit it.
11132 (Quelle surprise!)  Instead it will change the name of the buffer to
11133 something like @samp{*Dead Summary ... *} and install a minor mode
11134 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11135 buffer, you'll find that all keys are mapped to a function called
11136 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11137 summary buffer will result in a live, normal summary buffer.
11138
11139 There will never be more than one dead summary buffer at any one time.
11140
11141 @vindex gnus-use-cross-reference
11142 The data on the current group will be updated (which articles you have
11143 read, which articles you have replied to, etc.) when you exit the
11144 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11145 @code{t} (which is the default), articles that are cross-referenced to
11146 this group and are marked as read, will also be marked as read in the
11147 other subscribed groups they were cross-posted to.  If this variable is
11148 neither @code{nil} nor @code{t}, the article will be marked as read in
11149 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11150
11151
11152 @node Crosspost Handling
11153 @section Crosspost Handling
11154
11155 @cindex velveeta
11156 @cindex spamming
11157 Marking cross-posted articles as read ensures that you'll never have to
11158 read the same article more than once.  Unless, of course, somebody has
11159 posted it to several groups separately.  Posting the same article to
11160 several groups (not cross-posting) is called @dfn{spamming}, and you are
11161 by law required to send nasty-grams to anyone who perpetrates such a
11162 heinous crime.  You may want to try NoCeM handling to filter out spam
11163 (@pxref{NoCeM}).
11164
11165 Remember: Cross-posting is kinda ok, but posting the same article
11166 separately to several groups is not.  Massive cross-posting (aka.
11167 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11168 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11169 excessive crossposting (@pxref{Summary Mail Commands}).
11170
11171 @cindex cross-posting
11172 @cindex Xref
11173 @cindex @acronym{NOV}
11174 One thing that may cause Gnus to not do the cross-posting thing
11175 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11176 (which is very nice, because it speeds things up considerably) which
11177 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11178 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11179 even with @sc{xover} by registering the @code{Xref} lines of all
11180 articles you actually read, but if you kill the articles, or just mark
11181 them as read without reading them, Gnus will not get a chance to snoop
11182 the @code{Xref} lines out of these articles, and will be unable to use
11183 the cross reference mechanism.
11184
11185 @cindex LIST overview.fmt
11186 @cindex overview.fmt
11187 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11188 in its overview files, try @samp{telnet your.nntp.server nntp},
11189 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11190 overview.fmt}.  This may not work, but if it does, and the last line you
11191 get does not read @samp{Xref:full}, then you should shout and whine at
11192 your news admin until she includes the @code{Xref} header in the
11193 overview files.
11194
11195 If you want Gnus to get the @code{Xref}s right all the time, you have to
11196 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11197 considerably.  Also @pxref{Slow/Expensive Connection}.
11198
11199 C'est la vie.
11200
11201 For an alternative approach, @pxref{Duplicate Suppression}.
11202
11203
11204 @node Duplicate Suppression
11205 @section Duplicate Suppression
11206
11207 By default, Gnus tries to make sure that you don't have to read the same
11208 article more than once by utilizing the crossposting mechanism
11209 (@pxref{Crosspost Handling}).  However, that simple and efficient
11210 approach may not work satisfactory for some users for various
11211 reasons.
11212
11213 @enumerate
11214 @item
11215 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11216 is evil and not very common.
11217
11218 @item
11219 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11220 @file{.overview} data bases.  This is evil and all too common, alas.
11221
11222 @item
11223 You may be reading the same group (or several related groups) from
11224 different @acronym{NNTP} servers.
11225
11226 @item
11227 You may be getting mail that duplicates articles posted to groups.
11228 @end enumerate
11229
11230 I'm sure there are other situations where @code{Xref} handling fails as
11231 well, but these four are the most common situations.
11232
11233 If, and only if, @code{Xref} handling fails for you, then you may
11234 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11235 will remember the @code{Message-ID}s of all articles you have read or
11236 otherwise marked as read, and then, as if by magic, mark them as read
11237 all subsequent times you see them---in @emph{all} groups.  Using this
11238 mechanism is quite likely to be somewhat inefficient, but not overly
11239 so.  It's certainly preferable to reading the same articles more than
11240 once.
11241
11242 Duplicate suppression is not a very subtle instrument.  It's more like a
11243 sledge hammer than anything else.  It works in a very simple
11244 fashion---if you have marked an article as read, it adds this Message-ID
11245 to a cache.  The next time it sees this Message-ID, it will mark the
11246 article as read with the @samp{M} mark.  It doesn't care what group it
11247 saw the article in.
11248
11249 @table @code
11250 @item gnus-suppress-duplicates
11251 @vindex gnus-suppress-duplicates
11252 If non-@code{nil}, suppress duplicates.
11253
11254 @item gnus-save-duplicate-list
11255 @vindex gnus-save-duplicate-list
11256 If non-@code{nil}, save the list of duplicates to a file.  This will
11257 make startup and shutdown take longer, so the default is @code{nil}.
11258 However, this means that only duplicate articles read in a single Gnus
11259 session are suppressed.
11260
11261 @item gnus-duplicate-list-length
11262 @vindex gnus-duplicate-list-length
11263 This variable says how many @code{Message-ID}s to keep in the duplicate
11264 suppression list.  The default is 10000.
11265
11266 @item gnus-duplicate-file
11267 @vindex gnus-duplicate-file
11268 The name of the file to store the duplicate suppression list in.  The
11269 default is @file{~/News/suppression}.
11270 @end table
11271
11272 If you have a tendency to stop and start Gnus often, setting
11273 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
11274 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
11275 the other hand, saving the list makes startup and shutdown much slower,
11276 so that means that if you stop and start Gnus often, you should set
11277 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
11278 to you to figure out, I think.
11279
11280 @node Security
11281 @section Security
11282
11283 Gnus is able to verify signed messages or decrypt encrypted messages.
11284 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
11285 and @acronym{S/MIME}, however you need some external programs to get
11286 things to work:
11287
11288 @enumerate
11289 @item
11290 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
11291 install an OpenPGP implementation such as GnuPG.  The Lisp interface
11292 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
11293 Manual}), but Mailcrypt and gpg.el are also supported.
11294
11295 @item
11296 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
11297 or newer is recommended.
11298
11299 @end enumerate
11300
11301 The variables that control security functionality on reading messages
11302 include:
11303
11304 @table @code
11305 @item mm-verify-option
11306 @vindex mm-verify-option
11307 Option of verifying signed parts.  @code{never}, not verify;
11308 @code{always}, always verify; @code{known}, only verify known
11309 protocols.  Otherwise, ask user.
11310
11311 @item mm-decrypt-option
11312 @vindex mm-decrypt-option
11313 Option of decrypting encrypted parts.  @code{never}, no decryption;
11314 @code{always}, always decrypt; @code{known}, only decrypt known
11315 protocols.  Otherwise, ask user.
11316
11317 @item mml1991-use
11318 @vindex mml1991-use
11319 Symbol indicating elisp interface to OpenPGP implementation for
11320 @acronym{PGP} messages.  The default is @code{pgg}, but
11321 @code{mailcrypt} and @code{gpg} are also supported although
11322 deprecated.
11323
11324 @item mml2015-use
11325 @vindex mml2015-use
11326 Symbol indicating elisp interface to OpenPGP implementation for
11327 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
11328 @code{mailcrypt} and @code{gpg} are also supported although
11329 deprecated.
11330
11331 @end table
11332
11333 By default the buttons that display security information are not
11334 shown, because they clutter reading the actual e-mail.  You can type
11335 @kbd{K b} manually to display the information.  Use the
11336 @code{gnus-buttonized-mime-types} and
11337 @code{gnus-unbuttonized-mime-types} variables to control this
11338 permanently.  @ref{MIME Commands} for further details, and hints on
11339 how to customize these variables to always display security
11340 information.
11341
11342 @cindex snarfing keys
11343 @cindex importing PGP keys
11344 @cindex PGP key ring import
11345 Snarfing OpenPGP keys (i.e., importing keys from articles into your
11346 key ring) is not supported explicitly through a menu item or command,
11347 rather Gnus do detect and label keys as @samp{application/pgp-keys},
11348 allowing you to specify whatever action you think is appropriate
11349 through the usual @acronym{MIME} infrastructure.  You can use a
11350 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
11351 Emacs MIME Manual}) such as the following to import keys using GNU
11352 Privacy Guard when you click on the @acronym{MIME} button
11353 (@pxref{Using MIME}).
11354
11355 @example
11356 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
11357 @end example
11358 @noindent
11359 This happens to also be the default action defined in
11360 @code{mailcap-mime-data}.
11361
11362 More information on how to set things for sending outgoing signed and
11363 encrypted messages up can be found in the message manual
11364 (@pxref{Security, ,Security, message, Message Manual}).
11365
11366 @node Mailing List
11367 @section Mailing List
11368 @cindex mailing list
11369 @cindex RFC 2396
11370
11371 @kindex A M (summary)
11372 @findex gnus-mailing-list-insinuate
11373 Gnus understands some mailing list fields of RFC 2369.  To enable it,
11374 add a @code{to-list} group parameter (@pxref{Group Parameters}),
11375 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
11376 summary buffer.
11377
11378 That enables the following commands to the summary buffer:
11379
11380 @table @kbd
11381
11382 @item C-c C-n h
11383 @kindex C-c C-n h (Summary)
11384 @findex gnus-mailing-list-help
11385 Send a message to fetch mailing list help, if List-Help field exists.
11386
11387 @item C-c C-n s
11388 @kindex C-c C-n s (Summary)
11389 @findex gnus-mailing-list-subscribe
11390 Send a message to subscribe the mailing list, if List-Subscribe field exists.
11391
11392 @item C-c C-n u
11393 @kindex C-c C-n u (Summary)
11394 @findex gnus-mailing-list-unsubscribe
11395 Send a message to unsubscribe the mailing list, if List-Unsubscribe
11396 field exists.
11397
11398 @item C-c C-n p
11399 @kindex C-c C-n p (Summary)
11400 @findex gnus-mailing-list-post
11401 Post to the mailing list, if List-Post field exists.
11402
11403 @item C-c C-n o
11404 @kindex C-c C-n o (Summary)
11405 @findex gnus-mailing-list-owner
11406 Send a message to the mailing list owner, if List-Owner field exists.
11407
11408 @item C-c C-n a
11409 @kindex C-c C-n a (Summary)
11410 @findex gnus-mailing-list-archive
11411 Browse the mailing list archive, if List-Archive field exists.
11412
11413 @end table
11414
11415
11416 @node Article Buffer
11417 @chapter Article Buffer
11418 @cindex article buffer
11419
11420 The articles are displayed in the article buffer, of which there is only
11421 one.  All the summary buffers share the same article buffer unless you
11422 tell Gnus otherwise.
11423
11424 @menu
11425 * Hiding Headers::              Deciding what headers should be displayed.
11426 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
11427 * Customizing Articles::        Tailoring the look of the articles.
11428 * Article Keymap::              Keystrokes available in the article buffer.
11429 * Misc Article::                Other stuff.
11430 @end menu
11431
11432
11433 @node Hiding Headers
11434 @section Hiding Headers
11435 @cindex hiding headers
11436 @cindex deleting headers
11437
11438 The top section of each article is the @dfn{head}.  (The rest is the
11439 @dfn{body}, but you may have guessed that already.)
11440
11441 @vindex gnus-show-all-headers
11442 There is a lot of useful information in the head: the name of the person
11443 who wrote the article, the date it was written and the subject of the
11444 article.  That's well and nice, but there's also lots of information
11445 most people do not want to see---what systems the article has passed
11446 through before reaching you, the @code{Message-ID}, the
11447 @code{References}, etc. ad nauseam---and you'll probably want to get rid
11448 of some of those lines.  If you want to keep all those lines in the
11449 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
11450
11451 Gnus provides you with two variables for sifting headers:
11452
11453 @table @code
11454
11455 @item gnus-visible-headers
11456 @vindex gnus-visible-headers
11457 If this variable is non-@code{nil}, it should be a regular expression
11458 that says what headers you wish to keep in the article buffer.  All
11459 headers that do not match this variable will be hidden.
11460
11461 For instance, if you only want to see the name of the person who wrote
11462 the article and the subject, you'd say:
11463
11464 @lisp
11465 (setq gnus-visible-headers "^From:\\|^Subject:")
11466 @end lisp
11467
11468 This variable can also be a list of regexps to match headers to
11469 remain visible.
11470
11471 @item gnus-ignored-headers
11472 @vindex gnus-ignored-headers
11473 This variable is the reverse of @code{gnus-visible-headers}.  If this
11474 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
11475 should be a regular expression that matches all lines that you want to
11476 hide.  All lines that do not match this variable will remain visible.
11477
11478 For instance, if you just want to get rid of the @code{References} line
11479 and the @code{Xref} line, you might say:
11480
11481 @lisp
11482 (setq gnus-ignored-headers "^References:\\|^Xref:")
11483 @end lisp
11484
11485 This variable can also be a list of regexps to match headers to
11486 be removed.
11487
11488 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
11489 variable will have no effect.
11490
11491 @end table
11492
11493 @vindex gnus-sorted-header-list
11494 Gnus can also sort the headers for you.  (It does this by default.)  You
11495 can control the sorting by setting the @code{gnus-sorted-header-list}
11496 variable.  It is a list of regular expressions that says in what order
11497 the headers are to be displayed.
11498
11499 For instance, if you want the name of the author of the article first,
11500 and then the subject, you might say something like:
11501
11502 @lisp
11503 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
11504 @end lisp
11505
11506 Any headers that are to remain visible, but are not listed in this
11507 variable, will be displayed in random order after all the headers listed in this variable.
11508
11509 @findex gnus-article-hide-boring-headers
11510 @vindex gnus-boring-article-headers
11511 You can hide further boring headers by setting
11512 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
11513 does depends on the @code{gnus-boring-article-headers} variable.  It's a
11514 list, but this list doesn't actually contain header names.  Instead it
11515 lists various @dfn{boring conditions} that Gnus can check and remove
11516 from sight.
11517
11518 These conditions are:
11519 @table @code
11520 @item empty
11521 Remove all empty headers.
11522 @item followup-to
11523 Remove the @code{Followup-To} header if it is identical to the
11524 @code{Newsgroups} header.
11525 @item reply-to
11526 Remove the @code{Reply-To} header if it lists the same addresses as
11527 the @code{From} header, or if the @code{broken-reply-to} group
11528 parameter is set.
11529 @item newsgroups
11530 Remove the @code{Newsgroups} header if it only contains the current group
11531 name.
11532 @item to-address
11533 Remove the @code{To} header if it only contains the address identical to
11534 the current group's @code{to-address} parameter.
11535 @item to-list
11536 Remove the @code{To} header if it only contains the address identical to
11537 the current group's @code{to-list} parameter.
11538 @item cc-list
11539 Remove the @code{Cc} header if it only contains the address identical to
11540 the current group's @code{to-list} parameter.
11541 @item date
11542 Remove the @code{Date} header if the article is less than three days
11543 old.
11544 @item long-to
11545 Remove the @code{To} and/or @code{Cc} header if it is very long.
11546 @item many-to
11547 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
11548 @end table
11549
11550 To include these three elements, you could say something like:
11551
11552 @lisp
11553 (setq gnus-boring-article-headers
11554       '(empty followup-to reply-to))
11555 @end lisp
11556
11557 This is also the default value for this variable.
11558
11559
11560 @node Using MIME
11561 @section Using MIME
11562 @cindex @acronym{MIME}
11563
11564 Mime is a standard for waving your hands through the air, aimlessly,
11565 while people stand around yawning.
11566
11567 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
11568 while all newsreaders die of fear.
11569
11570 @acronym{MIME} may specify what character set the article uses, the encoding
11571 of the characters, and it also makes it possible to embed pictures and
11572 other naughty stuff in innocent-looking articles.
11573
11574 @vindex gnus-display-mime-function
11575 @findex gnus-display-mime
11576 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
11577 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
11578 default, which creates a bundle of clickable buttons that can be used to
11579 display, save and manipulate the @acronym{MIME} objects.
11580
11581 The following commands are available when you have placed point over a
11582 @acronym{MIME} button:
11583
11584 @table @kbd
11585 @findex gnus-article-press-button
11586 @item RET (Article)
11587 @kindex RET (Article)
11588 @itemx BUTTON-2 (Article)
11589 Toggle displaying of the @acronym{MIME} object
11590 (@code{gnus-article-press-button}).  If built-in viewers can not display
11591 the object, Gnus resorts to external viewers in the @file{mailcap}
11592 files.  If a viewer has the @samp{copiousoutput} specification, the
11593 object is displayed inline.
11594
11595 @findex gnus-mime-view-part
11596 @item M-RET (Article)
11597 @kindex M-RET (Article)
11598 @itemx v (Article)
11599 Prompt for a method, and then view the @acronym{MIME} object using this
11600 method (@code{gnus-mime-view-part}).
11601
11602 @findex gnus-mime-view-part-as-type
11603 @item t (Article)
11604 @kindex t (Article)
11605 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
11606 (@code{gnus-mime-view-part-as-type}).
11607
11608 @findex gnus-mime-view-part-as-charset
11609 @item C (Article)
11610 @kindex C (Article)
11611 Prompt for a charset, and then view the @acronym{MIME} object using this
11612 charset (@code{gnus-mime-view-part-as-charset}).
11613
11614 @findex gnus-mime-save-part
11615 @item o (Article)
11616 @kindex o (Article)
11617 Prompt for a file name, and then save the @acronym{MIME} object
11618 (@code{gnus-mime-save-part}).
11619
11620 @findex gnus-mime-save-part-and-strip
11621 @item C-o (Article)
11622 @kindex C-o (Article)
11623 Prompt for a file name, then save the @acronym{MIME} object and strip it from
11624 the article.  Then proceed to article editing, where a reasonable
11625 suggestion is being made on how the altered article should look
11626 like.  The stripped @acronym{MIME} object will be referred via the
11627 message/external-body @acronym{MIME} type.
11628 (@code{gnus-mime-save-part-and-strip}).
11629
11630 @findex gnus-mime-replace-part
11631 @item r (Article)
11632 @kindex r (Article)
11633 Prompt for a file name, replace the @acronym{MIME} object with an
11634 external body refering to the file via the message/external-body
11635 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
11636
11637 @findex gnus-mime-delete-part
11638 @item d (Article)
11639 @kindex d (Article)
11640 Delete the @acronym{MIME} object from the article and replace it with some
11641 information about the removed @acronym{MIME} object
11642 (@code{gnus-mime-delete-part}).
11643
11644 @c FIXME: gnus-auto-select-part should be documented here
11645
11646 @findex gnus-mime-copy-part
11647 @item c (Article)
11648 @kindex c (Article)
11649 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
11650 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
11651 without decoding.  If given a numerical prefix, you can do semi-manual
11652 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
11653 @ref{Paging the Article}).  Compressed files like @file{.gz} and
11654 @file{.bz2} are automatically decompressed if
11655 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
11656 Accessing Compressed Files, emacs, The Emacs Editor}).
11657
11658 @findex gnus-mime-print-part
11659 @item p (Article)
11660 @kindex p (Article)
11661 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
11662 command respects the @samp{print=} specifications in the
11663 @file{.mailcap} file.
11664
11665 @findex gnus-mime-inline-part
11666 @item i (Article)
11667 @kindex i (Article)
11668 Insert the contents of the @acronym{MIME} object into the buffer
11669 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
11670 the raw contents without decoding.  If given a numerical prefix, you can
11671 do semi-manual charset stuff (see
11672 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
11673 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
11674 automatically decompressed depending on @code{jka-compr} regardless of
11675 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
11676 Compressed Files, emacs, The Emacs Editor}).
11677
11678 @findex gnus-mime-view-part-internally
11679 @item E (Article)
11680 @kindex E (Article)
11681 View the @acronym{MIME} object with an internal viewer.  If no internal
11682 viewer is available, use an external viewer
11683 (@code{gnus-mime-view-part-internally}).
11684
11685 @findex gnus-mime-view-part-externally
11686 @item e (Article)
11687 @kindex e (Article)
11688 View the @acronym{MIME} object with an external viewer.
11689 (@code{gnus-mime-view-part-externally}).
11690
11691 @findex gnus-mime-pipe-part
11692 @item | (Article)
11693 @kindex | (Article)
11694 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11695
11696 @findex gnus-mime-action-on-part
11697 @item . (Article)
11698 @kindex . (Article)
11699 Interactively run an action on the @acronym{MIME} object
11700 (@code{gnus-mime-action-on-part}).
11701
11702 @end table
11703
11704 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
11705 determines which parts to do this with is described in the Emacs
11706 @acronym{MIME} manual.
11707
11708 It might be best to just use the toggling functions from the article
11709 buffer to avoid getting nasty surprises.  (For instance, you enter the
11710 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11711 decoded the sound file in the article and some horrible sing-a-long song
11712 comes screaming out your speakers, and you can't find the volume button,
11713 because there isn't one, and people are starting to look at you, and you
11714 try to stop the program, but you can't, and you can't find the program
11715 to control the volume, and everybody else in the room suddenly decides
11716 to look at you disdainfully, and you'll feel rather stupid.)
11717
11718 Any similarity to real events and people is purely coincidental.  Ahem.
11719
11720 Also @pxref{MIME Commands}.
11721
11722
11723 @node Customizing Articles
11724 @section Customizing Articles
11725 @cindex article customization
11726
11727 A slew of functions for customizing how the articles are to look like
11728 exist.  You can call these functions interactively
11729 (@pxref{Article Washing}), or you can have them
11730 called automatically when you select the articles.
11731
11732 To have them called automatically, you should set the corresponding
11733 ``treatment'' variable.  For instance, to have headers hidden, you'd set
11734 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
11735 be set, but first we discuss the values these variables can have.
11736
11737 Note: Some values, while valid, make little sense.  Check the list below
11738 for sensible values.
11739
11740 @enumerate
11741 @item
11742 @code{nil}: Don't do this treatment.
11743
11744 @item
11745 @code{t}: Do this treatment on all body parts.
11746
11747 @item
11748 @code{head}: Do the treatment on the headers.
11749
11750 @item
11751 @code{first}: Do this treatment on the first body part.
11752
11753 @item
11754 @code{last}: Do this treatment on the last body part.
11755
11756 @item
11757 An integer: Do this treatment on all body parts that have a length less
11758 than this number.
11759
11760 @item
11761 A list of strings: Do this treatment on all body parts that are in
11762 articles that are read in groups that have names that match one of the
11763 regexps in the list.
11764
11765 @item
11766 A list where the first element is not a string:
11767
11768 The list is evaluated recursively.  The first element of the list is a
11769 predicate.  The following predicates are recognized: @code{or},
11770 @code{and}, @code{not} and @code{typep}.  Here's an example:
11771
11772 @lisp
11773 (or last
11774     (typep "text/x-vcard"))
11775 @end lisp
11776
11777 @end enumerate
11778
11779 You may have noticed that the word @dfn{part} is used here.  This refers
11780 to the fact that some messages are @acronym{MIME} multipart articles that may
11781 be divided into several parts.  Articles that are not multiparts are
11782 considered to contain just a single part.
11783
11784 @vindex gnus-article-treat-types
11785 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11786 want to, but by default, only @samp{text/plain} parts are given the
11787 treatment.  This is controlled by the @code{gnus-article-treat-types}
11788 variable, which is a list of regular expressions that are matched to the
11789 type of the part.  This variable is ignored if the value of the
11790 controlling variable is a predicate list, as described above.
11791
11792 @ifinfo
11793 @c Avoid sort of redundant entries in the same section for the printed
11794 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
11795 @c `i foo-bar'.
11796 @vindex gnus-treat-buttonize
11797 @vindex gnus-treat-buttonize-head
11798 @vindex gnus-treat-capitalize-sentences
11799 @vindex gnus-treat-overstrike
11800 @vindex gnus-treat-strip-cr
11801 @vindex gnus-treat-strip-headers-in-body
11802 @vindex gnus-treat-strip-leading-blank-lines
11803 @vindex gnus-treat-strip-multiple-blank-lines
11804 @vindex gnus-treat-strip-pem
11805 @vindex gnus-treat-strip-trailing-blank-lines
11806 @vindex gnus-treat-unsplit-urls
11807 @vindex gnus-treat-wash-html
11808 @vindex gnus-treat-date-english
11809 @vindex gnus-treat-date-iso8601
11810 @vindex gnus-treat-date-lapsed
11811 @vindex gnus-treat-date-local
11812 @vindex gnus-treat-date-original
11813 @vindex gnus-treat-date-user-defined
11814 @vindex gnus-treat-date-ut
11815 @vindex gnus-treat-from-picon
11816 @vindex gnus-treat-mail-picon
11817 @vindex gnus-treat-newsgroups-picon
11818 @vindex gnus-treat-display-smileys
11819 @vindex gnus-treat-body-boundary
11820 @vindex gnus-treat-display-x-face
11821 @vindex gnus-treat-display-face
11822 @vindex gnus-treat-emphasize
11823 @vindex gnus-treat-fill-article
11824 @vindex gnus-treat-fill-long-lines
11825 @vindex gnus-treat-hide-boring-headers
11826 @vindex gnus-treat-hide-citation
11827 @vindex gnus-treat-hide-citation-maybe
11828 @vindex gnus-treat-hide-headers
11829 @vindex gnus-treat-hide-signature
11830 @vindex gnus-treat-strip-banner
11831 @vindex gnus-treat-strip-list-identifiers
11832 @vindex gnus-treat-highlight-citation
11833 @vindex gnus-treat-highlight-headers
11834 @vindex gnus-treat-highlight-signature
11835 @vindex gnus-treat-play-sounds
11836 @vindex gnus-treat-translate
11837 @vindex gnus-treat-x-pgp-sig
11838 @vindex gnus-treat-unfold-headers
11839 @vindex gnus-treat-fold-headers
11840 @vindex gnus-treat-fold-newsgroups
11841 @vindex gnus-treat-leading-whitespace
11842 @end ifinfo
11843
11844 The following treatment options are available.  The easiest way to
11845 customize this is to examine the @code{gnus-article-treat} customization
11846 group.  Values in parenthesis are suggested sensible values.  Others are
11847 possible but those listed are probably sufficient for most people.
11848
11849 @table @code
11850 @item gnus-treat-buttonize (t, integer)
11851 @item gnus-treat-buttonize-head (head)
11852
11853 @xref{Article Buttons}.
11854
11855 @item gnus-treat-capitalize-sentences (t, integer)
11856 @item gnus-treat-overstrike (t, integer)
11857 @item gnus-treat-strip-cr (t, integer)
11858 @item gnus-treat-strip-headers-in-body (t, integer)
11859 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
11860 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11861 @item gnus-treat-strip-pem (t, last, integer)
11862 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11863 @item gnus-treat-unsplit-urls (t, integer)
11864 @item gnus-treat-wash-html (t, integer)
11865
11866 @xref{Article Washing}.
11867
11868 @item gnus-treat-date-english (head)
11869 @item gnus-treat-date-iso8601 (head)
11870 @item gnus-treat-date-lapsed (head)
11871 @item gnus-treat-date-local (head)
11872 @item gnus-treat-date-original (head)
11873 @item gnus-treat-date-user-defined (head)
11874 @item gnus-treat-date-ut (head)
11875
11876 @xref{Article Date}.
11877
11878 @item gnus-treat-from-picon (head)
11879 @item gnus-treat-mail-picon (head)
11880 @item gnus-treat-newsgroups-picon (head)
11881
11882 @xref{Picons}.
11883
11884 @item gnus-treat-display-smileys (t, integer)
11885
11886 @item gnus-treat-body-boundary (head)
11887
11888 @vindex gnus-body-boundary-delimiter
11889 Adds a delimiter between header and body, the string used as delimiter
11890 is controlled by @code{gnus-body-boundary-delimiter}.
11891
11892 @xref{Smileys}.
11893
11894 @vindex gnus-treat-display-x-face
11895 @item gnus-treat-display-x-face (head)
11896
11897 @xref{X-Face}.
11898
11899 @vindex gnus-treat-display-face
11900 @item gnus-treat-display-face (head)
11901
11902 @xref{Face}.
11903
11904 @vindex gnus-treat-emphasize
11905 @item gnus-treat-emphasize (t, head, integer)
11906 @vindex gnus-treat-fill-article
11907 @item gnus-treat-fill-article (t, integer)
11908 @vindex gnus-treat-fill-long-lines
11909 @item gnus-treat-fill-long-lines (t, integer)
11910 @vindex gnus-treat-hide-boring-headers
11911 @item gnus-treat-hide-boring-headers (head)
11912 @vindex gnus-treat-hide-citation
11913 @item gnus-treat-hide-citation (t, integer)
11914 @vindex gnus-treat-hide-citation-maybe
11915 @item gnus-treat-hide-citation-maybe (t, integer)
11916 @vindex gnus-treat-hide-headers
11917 @item gnus-treat-hide-headers (head)
11918 @vindex gnus-treat-hide-signature
11919 @item gnus-treat-hide-signature (t, last)
11920 @vindex gnus-treat-strip-banner
11921 @item gnus-treat-strip-banner (t, last)
11922 @vindex gnus-treat-strip-list-identifiers
11923 @item gnus-treat-strip-list-identifiers (head)
11924
11925 @xref{Article Hiding}.
11926
11927 @vindex gnus-treat-highlight-citation
11928 @item gnus-treat-highlight-citation (t, integer)
11929 @vindex gnus-treat-highlight-headers
11930 @item gnus-treat-highlight-headers (head)
11931 @vindex gnus-treat-highlight-signature
11932 @item gnus-treat-highlight-signature (t, last, integer)
11933
11934 @xref{Article Highlighting}.
11935
11936 @vindex gnus-treat-play-sounds
11937 @item gnus-treat-play-sounds
11938 @vindex gnus-treat-translate
11939 @item gnus-treat-translate
11940 @item gnus-treat-ansi-sequences (t)
11941 @vindex gnus-treat-x-pgp-sig
11942 @item gnus-treat-x-pgp-sig (head)
11943
11944 @vindex gnus-treat-unfold-headers
11945 @item gnus-treat-unfold-headers (head)
11946 @vindex gnus-treat-fold-headers
11947 @item gnus-treat-fold-headers (head)
11948 @vindex gnus-treat-fold-newsgroups
11949 @item gnus-treat-fold-newsgroups (head)
11950 @vindex gnus-treat-leading-whitespace
11951 @item gnus-treat-leading-whitespace (head)
11952
11953 @xref{Article Header}.
11954
11955
11956 @end table
11957
11958 @vindex gnus-part-display-hook
11959 You can, of course, write your own functions to be called from
11960 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11961 part, and you can do anything you like, pretty much.  There is no
11962 information that you have to keep in the buffer---you can change
11963 everything.
11964
11965
11966 @node Article Keymap
11967 @section Article Keymap
11968
11969 Most of the keystrokes in the summary buffer can also be used in the
11970 article buffer.  They should behave as if you typed them in the summary
11971 buffer, which means that you don't actually have to have a summary
11972 buffer displayed while reading.  You can do it all from the article
11973 buffer.
11974
11975 @kindex v (Article)
11976 @cindex keys, reserved for users (Article)
11977 The key @kbd{v} is reserved for users.  You can bind it to some
11978 command or better use it as a prefix key.
11979
11980 A few additional keystrokes are available:
11981
11982 @table @kbd
11983
11984 @item SPACE
11985 @kindex SPACE (Article)
11986 @findex gnus-article-next-page
11987 Scroll forwards one page (@code{gnus-article-next-page}).
11988 This is exactly the same as @kbd{h SPACE h}.
11989
11990 @item DEL
11991 @kindex DEL (Article)
11992 @findex gnus-article-prev-page
11993 Scroll backwards one page (@code{gnus-article-prev-page}).
11994 This is exactly the same as @kbd{h DEL h}.
11995
11996 @item C-c ^
11997 @kindex C-c ^ (Article)
11998 @findex gnus-article-refer-article
11999 If point is in the neighborhood of a @code{Message-ID} and you press
12000 @kbd{C-c ^}, Gnus will try to get that article from the server
12001 (@code{gnus-article-refer-article}).
12002
12003 @item C-c C-m
12004 @kindex C-c C-m (Article)
12005 @findex gnus-article-mail
12006 Send a reply to the address near point (@code{gnus-article-mail}).  If
12007 given a prefix, include the mail.
12008
12009 @item s
12010 @kindex s (Article)
12011 @findex gnus-article-show-summary
12012 Reconfigure the buffers so that the summary buffer becomes visible
12013 (@code{gnus-article-show-summary}).
12014
12015 @item ?
12016 @kindex ? (Article)
12017 @findex gnus-article-describe-briefly
12018 Give a very brief description of the available keystrokes
12019 (@code{gnus-article-describe-briefly}).
12020
12021 @item TAB
12022 @kindex TAB (Article)
12023 @findex gnus-article-next-button
12024 Go to the next button, if any (@code{gnus-article-next-button}).  This
12025 only makes sense if you have buttonizing turned on.
12026
12027 @item M-TAB
12028 @kindex M-TAB (Article)
12029 @findex gnus-article-prev-button
12030 Go to the previous button, if any (@code{gnus-article-prev-button}).
12031
12032 @item R
12033 @kindex R (Article)
12034 @findex gnus-article-reply-with-original
12035 Send a reply to the current article and yank the current article
12036 (@code{gnus-article-reply-with-original}).  If the region is active,
12037 only yank the text in the region.
12038
12039 @item S W
12040 @kindex S W (Article)
12041 @findex gnus-article-wide-reply-with-original
12042 Send a wide reply to the current article and yank the current article
12043 (@code{gnus-article-wide-reply-with-original}).  If the region is
12044 active, only yank the text in the region.
12045
12046 @item F
12047 @kindex F (Article)
12048 @findex gnus-article-followup-with-original
12049 Send a followup to the current article and yank the current article
12050 (@code{gnus-article-followup-with-original}).  If the region is active,
12051 only yank the text in the region.
12052
12053
12054 @end table
12055
12056
12057 @node Misc Article
12058 @section Misc Article
12059
12060 @table @code
12061
12062 @item gnus-single-article-buffer
12063 @vindex gnus-single-article-buffer
12064 @cindex article buffers, several
12065 If non-@code{nil}, use the same article buffer for all the groups.
12066 (This is the default.)  If @code{nil}, each group will have its own
12067 article buffer.
12068
12069 @vindex gnus-article-decode-hook
12070 @item gnus-article-decode-hook
12071 @cindex @acronym{MIME}
12072 Hook used to decode @acronym{MIME} articles.  The default value is
12073 @code{(article-decode-charset article-decode-encoded-words)}
12074
12075 @vindex gnus-article-prepare-hook
12076 @item gnus-article-prepare-hook
12077 This hook is called right after the article has been inserted into the
12078 article buffer.  It is mainly intended for functions that do something
12079 depending on the contents; it should probably not be used for changing
12080 the contents of the article buffer.
12081
12082 @item gnus-article-mode-hook
12083 @vindex gnus-article-mode-hook
12084 Hook called in article mode buffers.
12085
12086 @item gnus-article-mode-syntax-table
12087 @vindex gnus-article-mode-syntax-table
12088 Syntax table used in article buffers.  It is initialized from
12089 @code{text-mode-syntax-table}.
12090
12091 @vindex gnus-article-over-scroll
12092 @item gnus-article-over-scroll
12093 If non-@code{nil}, allow scrolling the article buffer even when there
12094 no more new text to scroll in.  The default is @code{nil}.
12095
12096 @vindex gnus-article-mode-line-format
12097 @item gnus-article-mode-line-format
12098 This variable is a format string along the same lines as
12099 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12100 Line}).  It accepts the same format specifications as that variable,
12101 with two extensions:
12102
12103 @table @samp
12104
12105 @item w
12106 The @dfn{wash status} of the article.  This is a short string with one
12107 character for each possible article wash operation that may have been
12108 performed.  The characters and their meaning:
12109
12110 @table @samp
12111
12112 @item c
12113 Displayed when cited text may be hidden in the article buffer.
12114
12115 @item h
12116 Displayed when headers are hidden in the article buffer.
12117
12118 @item p
12119 Displayed when article is digitally signed or encrypted, and Gnus has
12120 hidden the security headers.  (N.B. does not tell anything about
12121 security status, i.e. good or bad signature.)
12122
12123 @item s
12124 Displayed when the signature has been hidden in the Article buffer.
12125
12126 @item o
12127 Displayed when Gnus has treated overstrike characters in the article buffer.
12128
12129 @item e
12130 Displayed when Gnus has treated emphasised strings in the article buffer.
12131
12132 @end table
12133
12134 @item m
12135 The number of @acronym{MIME} parts in the article.
12136
12137 @end table
12138
12139 @vindex gnus-break-pages
12140
12141 @item gnus-break-pages
12142 Controls whether @dfn{page breaking} is to take place.  If this variable
12143 is non-@code{nil}, the articles will be divided into pages whenever a
12144 page delimiter appears in the article.  If this variable is @code{nil},
12145 paging will not be done.
12146
12147 @item gnus-page-delimiter
12148 @vindex gnus-page-delimiter
12149 This is the delimiter mentioned above.  By default, it is @samp{^L}
12150 (formfeed).
12151
12152 @cindex IDNA
12153 @cindex internationalized domain names
12154 @vindex gnus-use-idna
12155 @item gnus-use-idna
12156 This variable controls whether Gnus performs IDNA decoding of
12157 internationalized domain names inside @samp{From}, @samp{To} and
12158 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12159 for how to compose such messages.  This requires
12160 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12161 variable is only enabled if you have installed it.
12162
12163 @end table
12164
12165
12166 @node Composing Messages
12167 @chapter Composing Messages
12168 @cindex composing messages
12169 @cindex messages
12170 @cindex mail
12171 @cindex sending mail
12172 @cindex reply
12173 @cindex followup
12174 @cindex post
12175 @cindex using gpg
12176 @cindex using s/mime
12177 @cindex using smime
12178
12179 @kindex C-c C-c (Post)
12180 All commands for posting and mailing will put you in a message buffer
12181 where you can edit the article all you like, before you send the
12182 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12183 Message Manual}.  Where the message will be posted/mailed to depends
12184 on your setup (@pxref{Posting Server}).
12185
12186 @menu
12187 * Mail::                        Mailing and replying.
12188 * Posting Server::              What server should you post and mail via?
12189 * POP before SMTP::             You cannot send a mail unless you read a mail.
12190 * Mail and Post::               Mailing and posting at the same time.
12191 * Archived Messages::           Where Gnus stores the messages you've sent.
12192 * Posting Styles::              An easier way to specify who you are.
12193 * Drafts::                      Postponing messages and rejected messages.
12194 * Rejected Articles::           What happens if the server doesn't like your article?
12195 * Signing and encrypting::      How to compose secure messages.
12196 @end menu
12197
12198 Also @pxref{Canceling and Superseding} for information on how to
12199 remove articles you shouldn't have posted.
12200
12201
12202 @node Mail
12203 @section Mail
12204
12205 Variables for customizing outgoing mail:
12206
12207 @table @code
12208 @item gnus-uu-digest-headers
12209 @vindex gnus-uu-digest-headers
12210 List of regexps to match headers included in digested messages.  The
12211 headers will be included in the sequence they are matched.  If
12212 @code{nil} include all headers.
12213
12214 @item gnus-add-to-list
12215 @vindex gnus-add-to-list
12216 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
12217 that have none when you do a @kbd{a}.
12218
12219 @item gnus-confirm-mail-reply-to-news
12220 @vindex gnus-confirm-mail-reply-to-news
12221 If non-@code{nil}, Gnus will ask you for a confirmation when you are
12222 about to reply to news articles by mail.  If it is @code{nil}, nothing
12223 interferes in what you want to do.  This can also be a function
12224 receiving the group name as the only parameter which should return
12225 non-@code{nil} if a confirmation is needed, or a regular expression
12226 matching group names, where confirmation should be asked for.
12227
12228 If you find yourself never wanting to reply to mail, but occasionally
12229 press @kbd{R} anyway, this variable might be for you.
12230
12231 @item gnus-confirm-treat-mail-like-news
12232 @vindex gnus-confirm-treat-mail-like-news
12233 If non-@code{nil}, Gnus also requests confirmation according to
12234 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
12235 useful for treating mailing lists like newsgroups.
12236
12237 @end table
12238
12239
12240 @node Posting Server
12241 @section Posting Server
12242
12243 When you press those magical @kbd{C-c C-c} keys to ship off your latest
12244 (extremely intelligent, of course) article, where does it go?
12245
12246 Thank you for asking.  I hate you.
12247
12248 It can be quite complicated.
12249
12250 @vindex gnus-post-method
12251 When posting news, Message usually invokes @code{message-send-news}
12252 (@pxref{News Variables, , News Variables, message, Message Manual}).
12253 Normally, Gnus will post using the same select method as you're
12254 reading from (which might be convenient if you're reading lots of
12255 groups from different private servers).  However.  If the server
12256 you're reading from doesn't allow posting, just reading, you probably
12257 want to use some other server to post your (extremely intelligent and
12258 fabulously interesting) articles.  You can then set the
12259 @code{gnus-post-method} to some other method:
12260
12261 @lisp
12262 (setq gnus-post-method '(nnspool ""))
12263 @end lisp
12264
12265 Now, if you've done this, and then this server rejects your article, or
12266 this server is down, what do you do then?  To override this variable you
12267 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
12268 the ``current'' server, to get back the default behavior, for posting.
12269
12270 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
12271 Gnus will prompt you for what method to use for posting.
12272
12273 You can also set @code{gnus-post-method} to a list of select methods.
12274 If that's the case, Gnus will always prompt you for what method to use
12275 for posting.
12276
12277 Finally, if you want to always post using the native select method,
12278 you can set this variable to @code{native}.
12279
12280 @vindex message-send-mail-function
12281 When sending mail, Message invokes the function specified by the
12282 variable @code{message-send-mail-function}.  Gnus tries to set it to a
12283 value suitable for your system.
12284 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
12285 information.
12286
12287 @node POP before SMTP
12288 @section POP before SMTP
12289 @cindex pop before smtp
12290 @findex message-smtpmail-send-it
12291 @findex mail-source-touch-pop
12292
12293 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
12294 authentication?  It is whether you need to connect to the @acronym{POP}
12295 mail server within a certain time before sending mails.  If so, there is
12296 a convenient way.  To do that, put the following lines in your
12297 @file{~/.gnus.el} file:
12298
12299 @lisp
12300 (setq message-send-mail-function 'message-smtpmail-send-it)
12301 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
12302 @end lisp
12303
12304 @noindent
12305 It means to let Gnus connect to the @acronym{POP} mail server in advance
12306 whenever you send a mail.  The @code{mail-source-touch-pop} function
12307 does only a @acronym{POP} authentication according to the value of
12308 @code{mail-sources} without fetching mails, just before sending a mail.
12309 Note that you have to use @code{message-smtpmail-send-it} which runs
12310 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
12311 set the value of @code{mail-sources} for a @acronym{POP} connection
12312 correctly.  @xref{Mail Sources}.
12313
12314 If you have two or more @acronym{POP} mail servers set in
12315 @code{mail-sources}, you may want to specify one of them to
12316 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
12317 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
12318 is your primary @acronym{POP} mail server (i.e., you are fetching mails
12319 mainly from that server), you can set it permanently as follows:
12320
12321 @lisp
12322 (setq mail-source-primary-source
12323       '(pop :server "pop3.mail.server"
12324             :password "secret"))
12325 @end lisp
12326
12327 @noindent
12328 Otherwise, bind it dynamically only when performing the
12329 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
12330
12331 @lisp
12332 (add-hook 'message-send-mail-hook
12333           (lambda ()
12334             (let ((mail-source-primary-source
12335                    '(pop :server "pop3.mail.server"
12336                          :password "secret")))
12337               (mail-source-touch-pop))))
12338 @end lisp
12339
12340 @node Mail and Post
12341 @section Mail and Post
12342
12343 Here's a list of variables relevant to both mailing and
12344 posting:
12345
12346 @table @code
12347 @item gnus-mailing-list-groups
12348 @findex gnus-mailing-list-groups
12349 @cindex mailing lists
12350
12351 If your news server offers groups that are really mailing lists
12352 gatewayed to the @acronym{NNTP} server, you can read those groups without
12353 problems, but you can't post/followup to them without some difficulty.
12354 One solution is to add a @code{to-address} to the group parameters
12355 (@pxref{Group Parameters}).  An easier thing to do is set the
12356 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
12357 really are mailing lists.  Then, at least, followups to the mailing
12358 lists will work most of the time.  Posting to these groups (@kbd{a}) is
12359 still a pain, though.
12360
12361 @item gnus-user-agent
12362 @vindex gnus-user-agent
12363 @cindex User-Agent
12364
12365 This variable controls which information should be exposed in the
12366 User-Agent header.  It can be a list of symbols or a string.  Valid
12367 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
12368 version).  In addition to the Emacs version, you can add @code{codename}
12369 (show (S)XEmacs codename) or either @code{config} (show system
12370 configuration) or @code{type} (show system type).  If you set it to a
12371 string, be sure to use a valid format, see RFC 2616.
12372
12373 @end table
12374
12375 You may want to do spell-checking on messages that you send out.  Or, if
12376 you don't want to spell-check by hand, you could add automatic
12377 spell-checking via the @code{ispell} package:
12378
12379 @cindex ispell
12380 @findex ispell-message
12381 @lisp
12382 (add-hook 'message-send-hook 'ispell-message)
12383 @end lisp
12384
12385 If you want to change the @code{ispell} dictionary based on what group
12386 you're in, you could say something like the following:
12387
12388 @lisp
12389 (add-hook 'gnus-select-group-hook
12390           (lambda ()
12391             (cond
12392              ((string-match
12393                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
12394               (ispell-change-dictionary "deutsch"))
12395              (t
12396               (ispell-change-dictionary "english")))))
12397 @end lisp
12398
12399 Modify to suit your needs.
12400
12401 @vindex gnus-message-highlight-citation
12402 If @code{gnus-message-highlight-citation} is t, different levels of
12403 citations are highlighted like in Gnus article buffers also in message
12404 mode buffers.
12405
12406 @node Archived Messages
12407 @section Archived Messages
12408 @cindex archived messages
12409 @cindex sent messages
12410
12411 Gnus provides a few different methods for storing the mail and news you
12412 send.  The default method is to use the @dfn{archive virtual server} to
12413 store the messages.  If you want to disable this completely, the
12414 @code{gnus-message-archive-group} variable should be @code{nil}, which
12415 is the default.
12416
12417 For archiving interesting messages in a group you read, see the
12418 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
12419 Group Commands}).
12420
12421 @vindex gnus-message-archive-method
12422 @code{gnus-message-archive-method} says what virtual server Gnus is to
12423 use to store sent messages.  The default is @code{"archive"}, and when
12424 actually being used it is expanded into:
12425
12426 @lisp
12427 (nnfolder "archive"
12428           (nnfolder-directory   "~/Mail/archive")
12429           (nnfolder-active-file "~/Mail/archive/active")
12430           (nnfolder-get-new-mail nil)
12431           (nnfolder-inhibit-expiry t))
12432 @end lisp
12433
12434 @quotation
12435 @vindex gnus-update-message-archive-method
12436 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
12437 so that it may be used as a real method of the server which is named
12438 @code{"archive"} (that is, for the case where
12439 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
12440 since.  If it once has been saved, it will never be updated by default
12441 even if you change the value of @code{gnus-message-archive-method}
12442 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
12443 mean the @code{nnfolder} server like this at all times.  If you want the
12444 saved method to reflect always the value of
12445 @code{gnus-message-archive-method}, set the
12446 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
12447 value.  The default value of this variable is @code{nil}.
12448 @end quotation
12449
12450 You can, however, use any mail select method (@code{nnml},
12451 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
12452 for doing this sort of thing, though.  If you don't like the default
12453 directory chosen, you could say something like:
12454
12455 @lisp
12456 (setq gnus-message-archive-method
12457       '(nnfolder "archive"
12458                  (nnfolder-inhibit-expiry t)
12459                  (nnfolder-active-file "~/News/sent-mail/active")
12460                  (nnfolder-directory "~/News/sent-mail/")))
12461 @end lisp
12462
12463 @vindex gnus-message-archive-group
12464 @cindex Gcc
12465 Gnus will insert @code{Gcc} headers in all outgoing messages that point
12466 to one or more group(s) on that server.  Which group to use is
12467 determined by the @code{gnus-message-archive-group} variable.
12468
12469 This variable can be used to do the following:
12470
12471 @table @asis
12472 @item a string
12473 Messages will be saved in that group.
12474
12475 Note that you can include a select method in the group name, then the
12476 message will not be stored in the select method given by
12477 @code{gnus-message-archive-method}, but in the select method specified
12478 by the group name, instead.  Suppose @code{gnus-message-archive-method}
12479 has the default value shown above.  Then setting
12480 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
12481 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
12482 value @code{"nnml:foo"}, then outgoing messages will be stored in
12483 @samp{nnml:foo}.
12484
12485 @item a list of strings
12486 Messages will be saved in all those groups.
12487
12488 @item an alist of regexps, functions and forms
12489 When a key ``matches'', the result is used.
12490
12491 @item @code{nil}
12492 No message archiving will take place.  This is the default.
12493 @end table
12494
12495 Let's illustrate:
12496
12497 Just saving to a single group called @samp{MisK}:
12498 @lisp
12499 (setq gnus-message-archive-group "MisK")
12500 @end lisp
12501
12502 Saving to two groups, @samp{MisK} and @samp{safe}:
12503 @lisp
12504 (setq gnus-message-archive-group '("MisK" "safe"))
12505 @end lisp
12506
12507 Save to different groups based on what group you are in:
12508 @lisp
12509 (setq gnus-message-archive-group
12510       '(("^alt" "sent-to-alt")
12511         ("mail" "sent-to-mail")
12512         (".*" "sent-to-misc")))
12513 @end lisp
12514
12515 More complex stuff:
12516 @lisp
12517 (setq gnus-message-archive-group
12518       '((if (message-news-p)
12519             "misc-news"
12520           "misc-mail")))
12521 @end lisp
12522
12523 How about storing all news messages in one file, but storing all mail
12524 messages in one file per month:
12525
12526 @lisp
12527 (setq gnus-message-archive-group
12528       '((if (message-news-p)
12529             "misc-news"
12530           (concat "mail." (format-time-string "%Y-%m")))))
12531 @end lisp
12532
12533 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
12534 @c use a different value for @code{gnus-message-archive-group} there.)
12535
12536 Now, when you send a message off, it will be stored in the appropriate
12537 group.  (If you want to disable storing for just one particular message,
12538 you can just remove the @code{Gcc} header that has been inserted.)  The
12539 archive group will appear in the group buffer the next time you start
12540 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
12541 enter it and read the articles in it just like you'd read any other
12542 group.  If the group gets really big and annoying, you can simply rename
12543 if (using @kbd{G r} in the group buffer) to something
12544 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
12545 continue to be stored in the old (now empty) group.
12546
12547 That's the default method of archiving sent messages.  Gnus offers a
12548 different way for the people who don't like the default method.  In that
12549 case you should set @code{gnus-message-archive-group} to @code{nil};
12550 this will disable archiving.
12551
12552 @table @code
12553 @item gnus-outgoing-message-group
12554 @vindex gnus-outgoing-message-group
12555 All outgoing messages will be put in this group.  If you want to store
12556 all your outgoing mail and articles in the group @samp{nnml:archive},
12557 you set this variable to that value.  This variable can also be a list of
12558 group names.
12559
12560 If you want to have greater control over what group to put each
12561 message in, you can set this variable to a function that checks the
12562 current newsgroup name and then returns a suitable group name (or list
12563 of names).
12564
12565 This variable can be used instead of @code{gnus-message-archive-group},
12566 but the latter is the preferred method.
12567
12568 @item gnus-gcc-mark-as-read
12569 @vindex gnus-gcc-mark-as-read
12570 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
12571
12572 @item gnus-gcc-externalize-attachments
12573 @vindex gnus-gcc-externalize-attachments
12574 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
12575 and matches the Gcc group name, attach files as external parts; if it is
12576 @code{all}, attach local files as external parts; if it is other
12577 non-@code{nil}, the behavior is the same as @code{all}, but it may be
12578 changed in the future.
12579
12580 @end table
12581
12582
12583 @node Posting Styles
12584 @section Posting Styles
12585 @cindex posting styles
12586 @cindex styles
12587
12588 All them variables, they make my head swim.
12589
12590 So what if you want a different @code{Organization} and signature based
12591 on what groups you post to?  And you post both from your home machine
12592 and your work machine, and you want different @code{From} lines, and so
12593 on?
12594
12595 @vindex gnus-posting-styles
12596 One way to do stuff like that is to write clever hooks that change the
12597 variables you need to have changed.  That's a bit boring, so somebody
12598 came up with the bright idea of letting the user specify these things in
12599 a handy alist.  Here's an example of a @code{gnus-posting-styles}
12600 variable:
12601
12602 @lisp
12603 ((".*"
12604   (signature "Peace and happiness")
12605   (organization "What me?"))
12606  ("^comp"
12607   (signature "Death to everybody"))
12608  ("comp.emacs.i-love-it"
12609   (organization "Emacs is it")))
12610 @end lisp
12611
12612 As you might surmise from this example, this alist consists of several
12613 @dfn{styles}.  Each style will be applicable if the first element
12614 ``matches'', in some form or other.  The entire alist will be iterated
12615 over, from the beginning towards the end, and each match will be
12616 applied, which means that attributes in later styles that match override
12617 the same attributes in earlier matching styles.  So
12618 @samp{comp.programming.literate} will have the @samp{Death to everybody}
12619 signature and the @samp{What me?} @code{Organization} header.
12620
12621 The first element in each style is called the @code{match}.  If it's a
12622 string, then Gnus will try to regexp match it against the group name.
12623 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
12624 will look in the original article for a header whose name is
12625 @var{match} and compare that @var{regexp}.  @var{match} and
12626 @var{regexp} are strings.  (The original article is the one you are
12627 replying or following up to.  If you are not composing a reply or a
12628 followup, then there is nothing to match against.)  If the
12629 @code{match} is a function symbol, that function will be called with
12630 no arguments.  If it's a variable symbol, then the variable will be
12631 referenced.  If it's a list, then that list will be @code{eval}ed.  In
12632 any case, if this returns a non-@code{nil} value, then the style is
12633 said to @dfn{match}.
12634
12635 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
12636 attribute consists of a @code{(@var{name} @var{value})} pair.  In
12637 addition, you can also use the @code{(@var{name} :file @var{value})}
12638 form or the @code{(@var{name} :value @var{value})} form.  Where
12639 @code{:file} signifies @var{value} represents a file name and its
12640 contents should be used as the attribute value, @code{:value} signifies
12641 @var{value} does not represent a file name explicitly.  The attribute
12642 name can be one of:
12643
12644 @itemize @bullet
12645 @item @code{signature}
12646 @item @code{signature-file}
12647 @item @code{x-face-file}
12648 @item @code{address}, overriding @code{user-mail-address}
12649 @item @code{name}, overriding @code{(user-full-name)}
12650 @item @code{body}
12651 @end itemize
12652
12653 Note that the @code{signature-file} attribute honors the variable
12654 @code{message-signature-directory}.
12655
12656 The attribute name can also be a string or a symbol.  In that case,
12657 this will be used as a header name, and the value will be inserted in
12658 the headers of the article; if the value is @code{nil}, the header
12659 name will be removed.  If the attribute name is @code{eval}, the form
12660 is evaluated, and the result is thrown away.
12661
12662 The attribute value can be a string (used verbatim), a function with
12663 zero arguments (the return value will be used), a variable (its value
12664 will be used) or a list (it will be @code{eval}ed and the return value
12665 will be used).  The functions and sexps are called/@code{eval}ed in the
12666 message buffer that is being set up.  The headers of the current article
12667 are available through the @code{message-reply-headers} variable, which
12668 is a vector of the following headers: number subject from date id
12669 references chars lines xref extra.
12670
12671 @vindex message-reply-headers
12672
12673 If you wish to check whether the message you are about to compose is
12674 meant to be a news article or a mail message, you can check the values
12675 of the @code{message-news-p} and @code{message-mail-p} functions.
12676
12677 @findex message-mail-p
12678 @findex message-news-p
12679
12680 So here's a new example:
12681
12682 @lisp
12683 (setq gnus-posting-styles
12684       '((".*"
12685          (signature-file "~/.signature")
12686          (name "User Name")
12687          (x-face-file "~/.xface")
12688          (x-url (getenv "WWW_HOME"))
12689          (organization "People's Front Against MWM"))
12690         ("^rec.humor"
12691          (signature my-funny-signature-randomizer))
12692         ((equal (system-name) "gnarly")  ;; @r{A form}
12693          (signature my-quote-randomizer))
12694         (message-news-p        ;; @r{A function symbol}
12695          (signature my-news-signature))
12696         (window-system         ;; @r{A value symbol}
12697          ("X-Window-System" (format "%s" window-system)))
12698         ;; @r{If I'm replying to Larsi, set the Organization header.}
12699         ((header "from" "larsi.*org")
12700          (Organization "Somewhere, Inc."))
12701         ((posting-from-work-p) ;; @r{A user defined function}
12702          (signature-file "~/.work-signature")
12703          (address "user@@bar.foo")
12704          (body "You are fired.\n\nSincerely, your boss.")
12705          (organization "Important Work, Inc"))
12706         ("nnml:.*"
12707          (From (save-excursion
12708                  (set-buffer gnus-article-buffer)
12709                  (message-fetch-field "to"))))
12710         ("^nn.+:"
12711          (signature-file "~/.mail-signature"))))
12712 @end lisp
12713
12714 The @samp{nnml:.*} rule means that you use the @code{To} address as the
12715 @code{From} address in all your outgoing replies, which might be handy
12716 if you fill many roles.
12717 You may also use @code{message-alternative-emails} instead.
12718 @xref{Message Headers, ,Message Headers, message, Message Manual}.
12719
12720 @node Drafts
12721 @section Drafts
12722 @cindex drafts
12723
12724 If you are writing a message (mail or news) and suddenly remember that
12725 you have a steak in the oven (or some pesto in the food processor, you
12726 craaazy vegetarians), you'll probably wish there was a method to save
12727 the message you are writing so that you can continue editing it some
12728 other day, and send it when you feel its finished.
12729
12730 Well, don't worry about it.  Whenever you start composing a message of
12731 some sort using the Gnus mail and post commands, the buffer you get will
12732 automatically associate to an article in a special @dfn{draft} group.
12733 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
12734 article will be saved there.  (Auto-save files also go to the draft
12735 group.)
12736
12737 @cindex nndraft
12738 @vindex nndraft-directory
12739 The draft group is a special group (which is implemented as an
12740 @code{nndraft} group, if you absolutely have to know) called
12741 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
12742 @code{nndraft} is to store its files.  What makes this group special is
12743 that you can't tick any articles in it or mark any articles as
12744 read---all articles in the group are permanently unread.
12745
12746 If the group doesn't exist, it will be created and you'll be subscribed
12747 to it.  The only way to make it disappear from the Group buffer is to
12748 unsubscribe it.  The special properties of the draft group comes from
12749 a group property (@pxref{Group Parameters}), and if lost the group
12750 behaves like any other group.  This means the commands below will not
12751 be available.  To restore the special properties of the group, the
12752 simplest way is to kill the group, using @kbd{C-k}, and restart
12753 Gnus.  The group is automatically created again with the
12754 correct parameters.  The content of the group is not lost.
12755
12756 @c @findex gnus-dissociate-buffer-from-draft
12757 @c @kindex C-c M-d (Mail)
12758 @c @kindex C-c M-d (Post)
12759 @c @findex gnus-associate-buffer-with-draft
12760 @c @kindex C-c C-d (Mail)
12761 @c @kindex C-c C-d (Post)
12762 @c If you're writing some super-secret message that you later want to
12763 @c encode with PGP before sending, you may wish to turn the auto-saving
12764 @c (and association with the draft group) off.  You never know who might be
12765 @c interested in reading all your extremely valuable and terribly horrible
12766 @c and interesting secrets.  The @kbd{C-c M-d}
12767 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
12768 @c If you change your mind and want to turn the auto-saving back on again,
12769 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
12770 @c
12771 @c @vindex gnus-use-draft
12772 @c To leave association with the draft group off by default, set
12773 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
12774
12775 @findex gnus-draft-edit-message
12776 @kindex D e (Draft)
12777 When you want to continue editing the article, you simply enter the
12778 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
12779 that.  You will be placed in a buffer where you left off.
12780
12781 Rejected articles will also be put in this draft group (@pxref{Rejected
12782 Articles}).
12783
12784 @findex gnus-draft-send-all-messages
12785 @kindex D s (Draft)
12786 @findex gnus-draft-send-message
12787 @kindex D S (Draft)
12788 If you have lots of rejected messages you want to post (or mail) without
12789 doing further editing, you can use the @kbd{D s} command
12790 (@code{gnus-draft-send-message}).  This command understands the
12791 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
12792 command (@code{gnus-draft-send-all-messages}) will ship off all messages
12793 in the buffer.
12794
12795 @findex gnus-draft-toggle-sending
12796 @kindex D t (Draft)
12797 If you have some messages that you wish not to send, you can use the
12798 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
12799 as unsendable.  This is a toggling command.
12800
12801
12802 @node Rejected Articles
12803 @section Rejected Articles
12804 @cindex rejected articles
12805
12806 Sometimes a news server will reject an article.  Perhaps the server
12807 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
12808 @emph{there be demons}.  Perhaps you have included too much cited text.
12809 Perhaps the disk is full.  Perhaps the server is down.
12810
12811 These situations are, of course, totally beyond the control of Gnus.
12812 (Gnus, of course, loves the way you look, always feels great, has angels
12813 fluttering around inside of it, doesn't care about how much cited text
12814 you include, never runs full and never goes down.)  So Gnus saves these
12815 articles until some later time when the server feels better.
12816
12817 The rejected articles will automatically be put in a special draft group
12818 (@pxref{Drafts}).  When the server comes back up again, you'd then
12819 typically enter that group and send all the articles off.
12820
12821 @node Signing and encrypting
12822 @section Signing and encrypting
12823 @cindex using gpg
12824 @cindex using s/mime
12825 @cindex using smime
12826
12827 Gnus can digitally sign and encrypt your messages, using vanilla
12828 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
12829 decoding such messages, see the @code{mm-verify-option} and
12830 @code{mm-decrypt-option} options (@pxref{Security}).
12831
12832 @vindex gnus-message-replysign
12833 @vindex gnus-message-replyencrypt
12834 @vindex gnus-message-replysignencrypted
12835 Often, you would like to sign replies to people who send you signed
12836 messages.  Even more often, you might want to encrypt messages which
12837 are in reply to encrypted messages.  Gnus offers
12838 @code{gnus-message-replysign} to enable the former, and
12839 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
12840 @code{gnus-message-replysignencrypted} (on by default) will sign
12841 automatically encrypted messages.
12842
12843 Instructing @acronym{MML} to perform security operations on a
12844 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
12845 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
12846
12847 @table @kbd
12848
12849 @item C-c C-m s s
12850 @kindex C-c C-m s s (Message)
12851 @findex mml-secure-message-sign-smime
12852
12853 Digitally sign current message using @acronym{S/MIME}.
12854
12855 @item C-c C-m s o
12856 @kindex C-c C-m s o (Message)
12857 @findex mml-secure-message-sign-pgp
12858
12859 Digitally sign current message using @acronym{PGP}.
12860
12861 @item C-c C-m s p
12862 @kindex C-c C-m s p (Message)
12863 @findex mml-secure-message-sign-pgp
12864
12865 Digitally sign current message using @acronym{PGP/MIME}.
12866
12867 @item C-c C-m c s
12868 @kindex C-c C-m c s (Message)
12869 @findex mml-secure-message-encrypt-smime
12870
12871 Digitally encrypt current message using @acronym{S/MIME}.
12872
12873 @item C-c C-m c o
12874 @kindex C-c C-m c o (Message)
12875 @findex mml-secure-message-encrypt-pgp
12876
12877 Digitally encrypt current message using @acronym{PGP}.
12878
12879 @item C-c C-m c p
12880 @kindex C-c C-m c p (Message)
12881 @findex mml-secure-message-encrypt-pgpmime
12882
12883 Digitally encrypt current message using @acronym{PGP/MIME}.
12884
12885 @item C-c C-m C-n
12886 @kindex C-c C-m C-n (Message)
12887 @findex mml-unsecure-message
12888 Remove security related @acronym{MML} tags from message.
12889
12890 @end table
12891
12892 @xref{Security, ,Security, message, Message Manual}, for more information.
12893
12894 @node Select Methods
12895 @chapter Select Methods
12896 @cindex foreign groups
12897 @cindex select methods
12898
12899 A @dfn{foreign group} is a group not read by the usual (or
12900 default) means.  It could be, for instance, a group from a different
12901 @acronym{NNTP} server, it could be a virtual group, or it could be your own
12902 personal mail group.
12903
12904 A foreign group (or any group, really) is specified by a @dfn{name} and
12905 a @dfn{select method}.  To take the latter first, a select method is a
12906 list where the first element says what back end to use (e.g. @code{nntp},
12907 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12908 name}.  There may be additional elements in the select method, where the
12909 value may have special meaning for the back end in question.
12910
12911 One could say that a select method defines a @dfn{virtual server}---so
12912 we do just that (@pxref{Server Buffer}).
12913
12914 The @dfn{name} of the group is the name the back end will recognize the
12915 group as.
12916
12917 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12918 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12919 method @code{(nntp "some.where.edu")}.  Gnus will call this group
12920 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12921 back end just knows this group as @samp{soc.motss}.
12922
12923 The different methods all have their peculiarities, of course.
12924
12925 @menu
12926 * Server Buffer::               Making and editing virtual servers.
12927 * Getting News::                Reading USENET news with Gnus.
12928 * Getting Mail::                Reading your personal mail with Gnus.
12929 * Browsing the Web::            Getting messages from a plethora of Web sources.
12930 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
12931 * Other Sources::               Reading directories, files, SOUP packets.
12932 * Combined Groups::             Combining groups into one group.
12933 * Email Based Diary::           Using mails to manage diary events in Gnus.
12934 * Gnus Unplugged::              Reading news and mail offline.
12935 @end menu
12936
12937
12938 @node Server Buffer
12939 @section Server Buffer
12940
12941 Traditionally, a @dfn{server} is a machine or a piece of software that
12942 one connects to, and then requests information from.  Gnus does not
12943 connect directly to any real servers, but does all transactions through
12944 one back end or other.  But that's just putting one layer more between
12945 the actual media and Gnus, so we might just as well say that each
12946 back end represents a virtual server.
12947
12948 For instance, the @code{nntp} back end may be used to connect to several
12949 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12950 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12951 use, and what parameters to set by specifying a @dfn{select method}.
12952
12953 These select method specifications can sometimes become quite
12954 complicated---say, for instance, that you want to read from the
12955 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12956 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12957 Anyway, if you had to specify that for each group that used this
12958 server, that would be too much work, so Gnus offers a way of naming
12959 select methods, which is what you do in the server buffer.
12960
12961 To enter the server buffer, use the @kbd{^}
12962 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12963
12964 @menu
12965 * Server Buffer Format::        You can customize the look of this buffer.
12966 * Server Commands::             Commands to manipulate servers.
12967 * Example Methods::             Examples server specifications.
12968 * Creating a Virtual Server::   An example session.
12969 * Server Variables::            Which variables to set.
12970 * Servers and Methods::         You can use server names as select methods.
12971 * Unavailable Servers::         Some servers you try to contact may be down.
12972 @end menu
12973
12974 @vindex gnus-server-mode-hook
12975 @code{gnus-server-mode-hook} is run when creating the server buffer.
12976
12977
12978 @node Server Buffer Format
12979 @subsection Server Buffer Format
12980 @cindex server buffer format
12981
12982 @vindex gnus-server-line-format
12983 You can change the look of the server buffer lines by changing the
12984 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12985 variable, with some simple extensions:
12986
12987 @table @samp
12988
12989 @item h
12990 How the news is fetched---the back end name.
12991
12992 @item n
12993 The name of this server.
12994
12995 @item w
12996 Where the news is to be fetched from---the address.
12997
12998 @item s
12999 The opened/closed/denied status of the server.
13000
13001 @item a
13002 Whether this server is agentized.
13003 @end table
13004
13005 @vindex gnus-server-mode-line-format
13006 The mode line can also be customized by using the
13007 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13008 Formatting}).  The following specs are understood:
13009
13010 @table @samp
13011 @item S
13012 Server name.
13013
13014 @item M
13015 Server method.
13016 @end table
13017
13018 Also @pxref{Formatting Variables}.
13019
13020
13021 @node Server Commands
13022 @subsection Server Commands
13023 @cindex server commands
13024
13025 @table @kbd
13026
13027 @item v
13028 @kindex v (Server)
13029 @cindex keys, reserved for users (Server)
13030 The key @kbd{v} is reserved for users.  You can bind it to some
13031 command or better use it as a prefix key.
13032
13033 @item a
13034 @kindex a (Server)
13035 @findex gnus-server-add-server
13036 Add a new server (@code{gnus-server-add-server}).
13037
13038 @item e
13039 @kindex e (Server)
13040 @findex gnus-server-edit-server
13041 Edit a server (@code{gnus-server-edit-server}).
13042
13043 @item SPACE
13044 @kindex SPACE (Server)
13045 @findex gnus-server-read-server
13046 Browse the current server (@code{gnus-server-read-server}).
13047
13048 @item q
13049 @kindex q (Server)
13050 @findex gnus-server-exit
13051 Return to the group buffer (@code{gnus-server-exit}).
13052
13053 @item k
13054 @kindex k (Server)
13055 @findex gnus-server-kill-server
13056 Kill the current server (@code{gnus-server-kill-server}).
13057
13058 @item y
13059 @kindex y (Server)
13060 @findex gnus-server-yank-server
13061 Yank the previously killed server (@code{gnus-server-yank-server}).
13062
13063 @item c
13064 @kindex c (Server)
13065 @findex gnus-server-copy-server
13066 Copy the current server (@code{gnus-server-copy-server}).
13067
13068 @item l
13069 @kindex l (Server)
13070 @findex gnus-server-list-servers
13071 List all servers (@code{gnus-server-list-servers}).
13072
13073 @item s
13074 @kindex s (Server)
13075 @findex gnus-server-scan-server
13076 Request that the server scan its sources for new articles
13077 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13078 servers.
13079
13080 @item g
13081 @kindex g (Server)
13082 @findex gnus-server-regenerate-server
13083 Request that the server regenerate all its data structures
13084 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13085 a mail back end that has gotten out of sync.
13086
13087 @item z
13088 @kindex z (Server)
13089 @findex gnus-server-compact-server
13090
13091 Compact all groups in the server under point
13092 (@code{gnus-server-compact-server}).  Currently implemented only in
13093 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13094 hence getting a correct total article count.
13095
13096 @end table
13097
13098
13099 @node Example Methods
13100 @subsection Example Methods
13101
13102 Most select methods are pretty simple and self-explanatory:
13103
13104 @lisp
13105 (nntp "news.funet.fi")
13106 @end lisp
13107
13108 Reading directly from the spool is even simpler:
13109
13110 @lisp
13111 (nnspool "")
13112 @end lisp
13113
13114 As you can see, the first element in a select method is the name of the
13115 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13116 will.
13117
13118 After these two elements, there may be an arbitrary number of
13119 @code{(@var{variable} @var{form})} pairs.
13120
13121 To go back to the first example---imagine that you want to read from
13122 port 15 on that machine.  This is what the select method should
13123 look like then:
13124
13125 @lisp
13126 (nntp "news.funet.fi" (nntp-port-number 15))
13127 @end lisp
13128
13129 You should read the documentation to each back end to find out what
13130 variables are relevant, but here's an @code{nnmh} example:
13131
13132 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13133 you have two structures that you wish to access: One is your private
13134 mail spool, and the other is a public one.  Here's the possible spec for
13135 your private mail:
13136
13137 @lisp
13138 (nnmh "private" (nnmh-directory "~/private/mail/"))
13139 @end lisp
13140
13141 (This server is then called @samp{private}, but you may have guessed
13142 that.)
13143
13144 Here's the method for a public spool:
13145
13146 @lisp
13147 (nnmh "public"
13148       (nnmh-directory "/usr/information/spool/")
13149       (nnmh-get-new-mail nil))
13150 @end lisp
13151
13152 @cindex proxy
13153 @cindex firewall
13154
13155 If you are behind a firewall and only have access to the @acronym{NNTP}
13156 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13157 on the firewall machine and connect with
13158 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13159 @acronym{NNTP} server.
13160 Doing this can be rather fiddly, but your virtual server definition
13161 should probably look something like this:
13162
13163 @lisp
13164 (nntp "firewall"
13165       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13166       (nntp-via-address "the.firewall.machine")
13167       (nntp-address "the.real.nntp.host"))
13168 @end lisp
13169
13170 If you want to use the wonderful @code{ssh} program to provide a
13171 compressed connection over the modem line, you could add the following
13172 configuration to the example above:
13173
13174 @lisp
13175       (nntp-via-rlogin-command "ssh")
13176 @end lisp
13177
13178 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13179 an indirect connection:
13180
13181 @lisp
13182 (setq gnus-select-method
13183       '(nntp "indirect"
13184              (nntp-address "news.server.example")
13185              (nntp-via-user-name "intermediate_user_name")
13186              (nntp-via-address "intermediate.host.example")
13187              (nntp-via-rlogin-command "ssh")
13188              (nntp-via-rlogin-command-switches ("-C"))
13189              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
13190 @end lisp
13191
13192 This means that you have to have set up @code{ssh-agent} correctly to
13193 provide automatic authorization, of course.
13194
13195 If you're behind a firewall, but have direct access to the outside world
13196 through a wrapper command like "runsocks", you could open a socksified
13197 netcat connection to the news server as follows:
13198
13199 @lisp
13200 (nntp "outside"
13201       (nntp-pre-command "runsocks")
13202       (nntp-open-connection-function nntp-open-netcat-stream)
13203       (nntp-address "the.news.server"))
13204 @end lisp
13205
13206
13207 @node Creating a Virtual Server
13208 @subsection Creating a Virtual Server
13209
13210 If you're saving lots of articles in the cache by using persistent
13211 articles, you may want to create a virtual server to read the cache.
13212
13213 First you need to add a new server.  The @kbd{a} command does that.  It
13214 would probably be best to use @code{nnml} to read the cache.  You
13215 could also use @code{nnspool} or @code{nnmh}, though.
13216
13217 Type @kbd{a nnml RET cache RET}.
13218
13219 You should now have a brand new @code{nnml} virtual server called
13220 @samp{cache}.  You now need to edit it to have the right definitions.
13221 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
13222 will contain the following:
13223
13224 @lisp
13225 (nnml "cache")
13226 @end lisp
13227
13228 Change that to:
13229
13230 @lisp
13231 (nnml "cache"
13232          (nnml-directory "~/News/cache/")
13233          (nnml-active-file "~/News/cache/active"))
13234 @end lisp
13235
13236 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
13237 @kbd{RET} over this virtual server, you should be entered into a browse
13238 buffer, and you should be able to enter any of the groups displayed.
13239
13240
13241 @node Server Variables
13242 @subsection Server Variables
13243 @cindex server variables
13244 @cindex server parameters
13245
13246 One sticky point when defining variables (both on back ends and in Emacs
13247 in general) is that some variables are typically initialized from other
13248 variables when the definition of the variables is being loaded.  If you
13249 change the ``base'' variable after the variables have been loaded, you
13250 won't change the ``derived'' variables.
13251
13252 This typically affects directory and file variables.  For instance,
13253 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
13254 directory variables are initialized from that variable, so
13255 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
13256 new virtual @code{nnml} server, it will @emph{not} suffice to set just
13257 @code{nnml-directory}---you have to explicitly set all the file
13258 variables to be what you want them to be.  For a complete list of
13259 variables for each back end, see each back end's section later in this
13260 manual, but here's an example @code{nnml} definition:
13261
13262 @lisp
13263 (nnml "public"
13264       (nnml-directory "~/my-mail/")
13265       (nnml-active-file "~/my-mail/active")
13266       (nnml-newsgroups-file "~/my-mail/newsgroups"))
13267 @end lisp
13268
13269 Server variables are often called @dfn{server parameters}.
13270
13271 @node Servers and Methods
13272 @subsection Servers and Methods
13273
13274 Wherever you would normally use a select method
13275 (e.g. @code{gnus-secondary-select-method}, in the group select method,
13276 when browsing a foreign server) you can use a virtual server name
13277 instead.  This could potentially save lots of typing.  And it's nice all
13278 over.
13279
13280
13281 @node Unavailable Servers
13282 @subsection Unavailable Servers
13283
13284 If a server seems to be unreachable, Gnus will mark that server as
13285 @code{denied}.  That means that any subsequent attempt to make contact
13286 with that server will just be ignored.  ``It can't be opened,'' Gnus
13287 will tell you, without making the least effort to see whether that is
13288 actually the case or not.
13289
13290 That might seem quite naughty, but it does make sense most of the time.
13291 Let's say you have 10 groups subscribed to on server
13292 @samp{nephelococcygia.com}.  This server is located somewhere quite far
13293 away from you and the machine is quite slow, so it takes 1 minute just
13294 to find out that it refuses connection to you today.  If Gnus were to
13295 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
13296 attempt to do that.  Once it has gotten a single ``connection refused'',
13297 it will regard that server as ``down''.
13298
13299 So, what happens if the machine was only feeling unwell temporarily?
13300 How do you test to see whether the machine has come up again?
13301
13302 You jump to the server buffer (@pxref{Server Buffer}) and poke it
13303 with the following commands:
13304
13305 @table @kbd
13306
13307 @item O
13308 @kindex O (Server)
13309 @findex gnus-server-open-server
13310 Try to establish connection to the server on the current line
13311 (@code{gnus-server-open-server}).
13312
13313 @item C
13314 @kindex C (Server)
13315 @findex gnus-server-close-server
13316 Close the connection (if any) to the server
13317 (@code{gnus-server-close-server}).
13318
13319 @item D
13320 @kindex D (Server)
13321 @findex gnus-server-deny-server
13322 Mark the current server as unreachable
13323 (@code{gnus-server-deny-server}).
13324
13325 @item M-o
13326 @kindex M-o (Server)
13327 @findex gnus-server-open-all-servers
13328 Open the connections to all servers in the buffer
13329 (@code{gnus-server-open-all-servers}).
13330
13331 @item M-c
13332 @kindex M-c (Server)
13333 @findex gnus-server-close-all-servers
13334 Close the connections to all servers in the buffer
13335 (@code{gnus-server-close-all-servers}).
13336
13337 @item R
13338 @kindex R (Server)
13339 @findex gnus-server-remove-denials
13340 Remove all marks to whether Gnus was denied connection from any servers
13341 (@code{gnus-server-remove-denials}).
13342
13343 @item L
13344 @kindex L (Server)
13345 @findex gnus-server-offline-server
13346 Set server status to offline (@code{gnus-server-offline-server}).
13347
13348 @end table
13349
13350
13351 @node Getting News
13352 @section Getting News
13353 @cindex reading news
13354 @cindex news back ends
13355
13356 A newsreader is normally used for reading news.  Gnus currently provides
13357 only two methods of getting news---it can read from an @acronym{NNTP} server,
13358 or it can read from a local spool.
13359
13360 @menu
13361 * NNTP::                        Reading news from an @acronym{NNTP} server.
13362 * News Spool::                  Reading news from the local spool.
13363 @end menu
13364
13365
13366 @node NNTP
13367 @subsection NNTP
13368 @cindex nntp
13369
13370 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
13371 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
13372 server as the, uhm, address.
13373
13374 If the @acronym{NNTP} server is located at a non-standard port, setting the
13375 third element of the select method to this port number should allow you
13376 to connect to the right port.  You'll have to edit the group info for
13377 that (@pxref{Foreign Groups}).
13378
13379 The name of the foreign group can be the same as a native group.  In
13380 fact, you can subscribe to the same group from as many different servers
13381 you feel like.  There will be no name collisions.
13382
13383 The following variables can be used to create a virtual @code{nntp}
13384 server:
13385
13386 @table @code
13387
13388 @item nntp-server-opened-hook
13389 @vindex nntp-server-opened-hook
13390 @cindex @sc{mode reader}
13391 @cindex authinfo
13392 @cindex authentication
13393 @cindex nntp authentication
13394 @findex nntp-send-authinfo
13395 @findex nntp-send-mode-reader
13396 is run after a connection has been made.  It can be used to send
13397 commands to the @acronym{NNTP} server after it has been contacted.  By
13398 default it sends the command @code{MODE READER} to the server with the
13399 @code{nntp-send-mode-reader} function.  This function should always be
13400 present in this hook.
13401
13402 @item nntp-authinfo-function
13403 @vindex nntp-authinfo-function
13404 @findex nntp-send-authinfo
13405 @vindex nntp-authinfo-file
13406 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
13407 server.  The default function is @code{nntp-send-authinfo}, which looks
13408 through your @file{~/.authinfo} (or whatever you've set the
13409 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
13410 are found, it will prompt you for a login name and a password.  The
13411 format of the @file{~/.authinfo} file is (almost) the same as the
13412 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
13413 manual page, but here are the salient facts:
13414
13415 @enumerate
13416 @item
13417 The file contains one or more line, each of which define one server.
13418
13419 @item
13420 Each line may contain an arbitrary number of token/value pairs.
13421
13422 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
13423 @samp{default}.  In addition Gnus introduces two new tokens, not present
13424 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
13425 @samp{force}.  (This is the only way the @file{.authinfo} file format
13426 deviates from the @file{.netrc} file format.)  @samp{port} is used to
13427 indicate what port on the server the credentials apply to and
13428 @samp{force} is explained below.
13429
13430 @end enumerate
13431
13432 Here's an example file:
13433
13434 @example
13435 machine news.uio.no login larsi password geheimnis
13436 machine nntp.ifi.uio.no login larsi force yes
13437 @end example
13438
13439 The token/value pairs may appear in any order; @samp{machine} doesn't
13440 have to be first, for instance.
13441
13442 In this example, both login name and password have been supplied for the
13443 former server, while the latter has only the login name listed, and the
13444 user will be prompted for the password.  The latter also has the
13445 @samp{force} tag, which means that the authinfo will be sent to the
13446 @var{nntp} server upon connection; the default (i.e., when there is not
13447 @samp{force} tag) is to not send authinfo to the @var{nntp} server
13448 until the @var{nntp} server asks for it.
13449
13450 You can also add @samp{default} lines that will apply to all servers
13451 that don't have matching @samp{machine} lines.
13452
13453 @example
13454 default force yes
13455 @end example
13456
13457 This will force sending @samp{AUTHINFO} commands to all servers not
13458 previously mentioned.
13459
13460 Remember to not leave the @file{~/.authinfo} file world-readable.
13461
13462 @item nntp-server-action-alist
13463 @vindex nntp-server-action-alist
13464 This is a list of regexps to match on server types and actions to be
13465 taken when matches are made.  For instance, if you want Gnus to beep
13466 every time you connect to innd, you could say something like:
13467
13468 @lisp
13469 (setq nntp-server-action-alist
13470       '(("innd" (ding))))
13471 @end lisp
13472
13473 You probably don't want to do that, though.
13474
13475 The default value is
13476
13477 @lisp
13478 '(("nntpd 1\\.5\\.11t"
13479    (remove-hook 'nntp-server-opened-hook
13480                 'nntp-send-mode-reader)))
13481 @end lisp
13482
13483 This ensures that Gnus doesn't send the @code{MODE READER} command to
13484 nntpd 1.5.11t, since that command chokes that server, I've been told.
13485
13486 @item nntp-maximum-request
13487 @vindex nntp-maximum-request
13488 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
13489 will collect headers by sending a series of @code{head} commands.  To
13490 speed things up, the back end sends lots of these commands without
13491 waiting for reply, and then reads all the replies.  This is controlled
13492 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
13493 your network is buggy, you should set this to 1.
13494
13495 @item nntp-connection-timeout
13496 @vindex nntp-connection-timeout
13497 If you have lots of foreign @code{nntp} groups that you connect to
13498 regularly, you're sure to have problems with @acronym{NNTP} servers not
13499 responding properly, or being too loaded to reply within reasonable
13500 time.  This is can lead to awkward problems, which can be helped
13501 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
13502 that says how many seconds the @code{nntp} back end should wait for a
13503 connection before giving up.  If it is @code{nil}, which is the default,
13504 no timeouts are done.
13505
13506 @item nntp-nov-is-evil
13507 @vindex nntp-nov-is-evil
13508 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
13509 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
13510 can be used.
13511
13512 @item nntp-xover-commands
13513 @vindex nntp-xover-commands
13514 @cindex @acronym{NOV}
13515 @cindex XOVER
13516 List of strings used as commands to fetch @acronym{NOV} lines from a
13517 server.  The default value of this variable is @code{("XOVER"
13518 "XOVERVIEW")}.
13519
13520 @item nntp-nov-gap
13521 @vindex nntp-nov-gap
13522 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
13523 the server.  The server responds with one huge list of lines.  However,
13524 if you have read articles 2-5000 in the group, and only want to read
13525 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
13526 lines that you will not need.  This variable says how
13527 big a gap between two consecutive articles is allowed to be before the
13528 @code{XOVER} request is split into several request.  Note that if your
13529 network is fast, setting this variable to a really small number means
13530 that fetching will probably be slower.  If this variable is @code{nil},
13531 @code{nntp} will never split requests.  The default is 5.
13532
13533 @item nntp-xref-number-is-evil
13534 @vindex nntp-xref-number-is-evil
13535 When Gnus refers to an article having the @code{Message-ID} that a user
13536 specifies or having the @code{Message-ID} of the parent article of the
13537 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
13538 command to the @acronym{NNTP} server to know where it is, and the server
13539 returns the data containing the pairs of a group and an article number
13540 in the @code{Xref} header.  Gnus normally uses the article number to
13541 refer to the article if the data shows that that article is in the
13542 current group, while it uses the @code{Message-ID} otherwise.  However,
13543 some news servers, e.g., ones running Diablo, run multiple engines
13544 having the same articles but article numbers are not kept synchronized
13545 between them.  In that case, the article number that appears in the
13546 @code{Xref} header varies by which engine is chosen, so you cannot refer
13547 to the parent article that is in the current group, for instance.  If
13548 you connect to such a server, set this variable to a non-@code{nil}
13549 value, and Gnus never uses article numbers.  For example:
13550
13551 @lisp
13552 (setq gnus-select-method
13553       '(nntp "newszilla"
13554              (nntp-address "newszilla.example.com")
13555              (nntp-xref-number-is-evil t)
13556              @dots{}))
13557 @end lisp
13558
13559 The default value of this server variable is @code{nil}.
13560
13561 @item nntp-prepare-server-hook
13562 @vindex nntp-prepare-server-hook
13563 A hook run before attempting to connect to an @acronym{NNTP} server.
13564
13565 @item nntp-record-commands
13566 @vindex nntp-record-commands
13567 If non-@code{nil}, @code{nntp} will log all commands it sends to the
13568 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
13569 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
13570 that doesn't seem to work.
13571
13572 @item nntp-open-connection-function
13573 @vindex nntp-open-connection-function
13574 It is possible to customize how the connection to the nntp server will
13575 be opened.  If you specify an @code{nntp-open-connection-function}
13576 parameter, Gnus will use that function to establish the connection.
13577 Seven pre-made functions are supplied.  These functions can be grouped
13578 in two categories: direct connection functions (four pre-made), and
13579 indirect ones (three pre-made).
13580
13581 @item nntp-never-echoes-commands
13582 @vindex nntp-never-echoes-commands
13583 Non-@code{nil} means the nntp server never echoes commands.  It is
13584 reported that some nntps server doesn't echo commands.  So, you may want
13585 to set this to non-@code{nil} in the method for such a server setting
13586 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
13587 example.  The default value is @code{nil}.  Note that the
13588 @code{nntp-open-connection-functions-never-echo-commands} variable
13589 overrides the @code{nil} value of this variable.
13590
13591 @item nntp-open-connection-functions-never-echo-commands
13592 @vindex nntp-open-connection-functions-never-echo-commands
13593 List of functions that never echo commands.  Add or set a function which
13594 you set to @code{nntp-open-connection-function} to this list if it does
13595 not echo commands.  Note that a non-@code{nil} value of the
13596 @code{nntp-never-echoes-commands} variable overrides this variable.  The
13597 default value is @code{(nntp-open-network-stream)}.
13598
13599 @item nntp-prepare-post-hook
13600 @vindex nntp-prepare-post-hook
13601 A hook run just before posting an article.  If there is no
13602 @code{Message-ID} header in the article and the news server provides the
13603 recommended ID, it will be added to the article before running this
13604 hook.  It is useful to make @code{Cancel-Lock} headers even if you
13605 inhibit Gnus to add a @code{Message-ID} header, you could say:
13606
13607 @lisp
13608 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
13609 @end lisp
13610
13611 Note that not all servers support the recommended ID.  This works for
13612 INN versions 2.3.0 and later, for instance.
13613
13614 @end table
13615
13616 @menu
13617 * Direct Functions::            Connecting directly to the server.
13618 * Indirect Functions::          Connecting indirectly to the server.
13619 * Common Variables::            Understood by several connection functions.
13620 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
13621 @end menu
13622
13623
13624 @node Direct Functions
13625 @subsubsection Direct Functions
13626 @cindex direct connection functions
13627
13628 These functions are called direct because they open a direct connection
13629 between your machine and the @acronym{NNTP} server.  The behavior of these
13630 functions is also affected by commonly understood variables
13631 (@pxref{Common Variables}).
13632
13633 @table @code
13634 @findex nntp-open-network-stream
13635 @item nntp-open-network-stream
13636 This is the default, and simply connects to some port or other on the
13637 remote system.
13638
13639 @findex nntp-open-tls-stream
13640 @item nntp-open-tls-stream
13641 Opens a connection to a server over a @dfn{secure} channel.  To use
13642 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
13643 installed.  You then define a server as follows:
13644
13645 @lisp
13646 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
13647 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
13648 ;;
13649 (nntp "snews.bar.com"
13650       (nntp-open-connection-function nntp-open-tls-stream)
13651       (nntp-port-number )
13652       (nntp-address "snews.bar.com"))
13653 @end lisp
13654
13655 @findex nntp-open-ssl-stream
13656 @item nntp-open-ssl-stream
13657 Opens a connection to a server over a @dfn{secure} channel.  To use
13658 this you must have @uref{http://www.openssl.org, OpenSSL} or
13659 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
13660 then define a server as follows:
13661
13662 @lisp
13663 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
13664 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
13665 ;;
13666 (nntp "snews.bar.com"
13667       (nntp-open-connection-function nntp-open-ssl-stream)
13668       (nntp-port-number 563)
13669       (nntp-address "snews.bar.com"))
13670 @end lisp
13671
13672 @findex nntp-open-netcat-stream
13673 @item nntp-open-netcat-stream
13674 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
13675 program.  You might wonder why this function exists, since we have
13676 the default @code{nntp-open-network-stream} which would do the job.  (One
13677 of) the reason(s) is that if you are behind a firewall but have direct
13678 connections to the outside world thanks to a command wrapper like
13679 @code{runsocks}, you can use it like this:
13680
13681 @lisp
13682 (nntp "socksified"
13683       (nntp-pre-command "runsocks")
13684       (nntp-open-connection-function nntp-open-netcat-stream)
13685       (nntp-address "the.news.server"))
13686 @end lisp
13687
13688 With the default method, you would need to wrap your whole Emacs
13689 session, which is not a good idea.
13690
13691 @findex nntp-open-telnet-stream
13692 @item nntp-open-telnet-stream
13693 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
13694 @code{netcat}.  @code{telnet} is a bit less robust because of things
13695 like line-end-conversion, but sometimes netcat is simply
13696 not available.  The previous example would turn into:
13697
13698 @lisp
13699 (nntp "socksified"
13700       (nntp-pre-command "runsocks")
13701       (nntp-open-connection-function nntp-open-telnet-stream)
13702       (nntp-address "the.news.server")
13703       (nntp-end-of-line "\n"))
13704 @end lisp
13705 @end table
13706
13707
13708 @node Indirect Functions
13709 @subsubsection Indirect Functions
13710 @cindex indirect connection functions
13711
13712 These functions are called indirect because they connect to an
13713 intermediate host before actually connecting to the @acronym{NNTP} server.
13714 All of these functions and related variables are also said to belong to
13715 the ``via'' family of connection: they're all prefixed with ``via'' to make
13716 things cleaner.  The behavior of these functions is also affected by
13717 commonly understood variables (@pxref{Common Variables}).
13718
13719 @table @code
13720 @item nntp-open-via-rlogin-and-netcat
13721 @findex nntp-open-via-rlogin-and-netcat
13722 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
13723 to the real @acronym{NNTP} server from there.  This is useful for instance if
13724 you need to connect to a firewall machine first.
13725
13726 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
13727
13728 @table @code
13729 @item nntp-via-rlogin-command
13730 @vindex nntp-via-rlogin-command
13731 Command used to log in on the intermediate host.  The default is
13732 @samp{rsh}, but @samp{ssh} is a popular alternative.
13733
13734 @item nntp-via-rlogin-command-switches
13735 @vindex nntp-via-rlogin-command-switches
13736 List of strings to be used as the switches to
13737 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
13738 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
13739 @samp{("-C")} in order to compress all data connections.
13740 @end table
13741
13742 @item nntp-open-via-rlogin-and-telnet
13743 @findex nntp-open-via-rlogin-and-telnet
13744 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
13745 to connect to the real @acronym{NNTP} server from the intermediate host.
13746 @code{telnet} is a bit less robust because of things like
13747 line-end-conversion, but sometimes @code{netcat} is simply not available.  
13748
13749 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
13750
13751 @table @code
13752 @item nntp-telnet-command
13753 @vindex nntp-telnet-command
13754 Command used to connect to the real @acronym{NNTP} server from the
13755 intermediate host.  The default is @samp{telnet}.
13756
13757 @item nntp-telnet-switches
13758 @vindex nntp-telnet-switches
13759 List of strings to be used as the switches to the
13760 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
13761
13762 @item nntp-via-rlogin-command
13763 @vindex nntp-via-rlogin-command
13764 Command used to log in on the intermediate host.  The default is
13765 @samp{rsh}, but @samp{ssh} is a popular alternative.
13766
13767 @item nntp-via-rlogin-command-switches
13768 @vindex nntp-via-rlogin-command-switches
13769 List of strings to be used as the switches to
13770 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
13771 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
13772 the telnet command requires a pseudo-tty allocation on an intermediate
13773 host.  The default is @code{nil}.
13774 @end table
13775
13776 Note that you may want to change the value for @code{nntp-end-of-line}
13777 to @samp{\n} (@pxref{Common Variables}).
13778
13779 @item nntp-open-via-telnet-and-telnet
13780 @findex nntp-open-via-telnet-and-telnet
13781 Does essentially the same, but uses @samp{telnet} instead of
13782 @samp{rlogin} to connect to the intermediate host.
13783
13784 @code{nntp-open-via-telnet-and-telnet}-specific variables:
13785
13786 @table @code
13787 @item nntp-via-telnet-command
13788 @vindex nntp-via-telnet-command
13789 Command used to @code{telnet} the intermediate host.  The default is
13790 @samp{telnet}.
13791
13792 @item nntp-via-telnet-switches
13793 @vindex nntp-via-telnet-switches
13794 List of strings to be used as the switches to the
13795 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
13796
13797 @item nntp-via-user-password
13798 @vindex nntp-via-user-password
13799 Password to use when logging in on the intermediate host.
13800
13801 @item nntp-via-envuser
13802 @vindex nntp-via-envuser
13803 If non-@code{nil}, the intermediate @code{telnet} session (client and
13804 server both) will support the @code{ENVIRON} option and not prompt for
13805 login name.  This works for Solaris @code{telnet}, for instance.
13806
13807 @item nntp-via-shell-prompt
13808 @vindex nntp-via-shell-prompt
13809 Regexp matching the shell prompt on the intermediate host.  The default
13810 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
13811
13812 @end table
13813
13814 Note that you may want to change the value for @code{nntp-end-of-line}
13815 to @samp{\n} (@pxref{Common Variables}).
13816 @end table
13817
13818
13819 Here are some additional variables that are understood by all the above
13820 functions:
13821
13822 @table @code
13823
13824 @item nntp-via-user-name
13825 @vindex nntp-via-user-name
13826 User name to use when connecting to the intermediate host.
13827
13828 @item nntp-via-address
13829 @vindex nntp-via-address
13830 Address of the intermediate host to connect to.
13831
13832 @end table
13833
13834
13835 @node Common Variables
13836 @subsubsection Common Variables
13837
13838 The following variables affect the behavior of all, or several of the
13839 pre-made connection functions.  When not specified, all functions are
13840 affected (the values of the following variables will be used as the
13841 default if each virtual @code{nntp} server doesn't specify those server
13842 variables individually).
13843
13844 @table @code
13845
13846 @item nntp-pre-command
13847 @vindex nntp-pre-command
13848 A command wrapper to use when connecting through a non native
13849 connection function (all except @code{nntp-open-network-stream},
13850 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
13851 where you would put a @samp{SOCKS} wrapper for instance.
13852
13853 @item nntp-address
13854 @vindex nntp-address
13855 The address of the @acronym{NNTP} server.
13856
13857 @item nntp-port-number
13858 @vindex nntp-port-number
13859 Port number to connect to the @acronym{NNTP} server.  The default is
13860 @samp{nntp}.  If you use @acronym{NNTP} over
13861 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
13862 than named ports (i.e, use @samp{563} instead of @samp{snews} or
13863 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
13864 not work with named ports.
13865
13866 @item nntp-end-of-line
13867 @vindex nntp-end-of-line
13868 String to use as end-of-line marker when talking to the @acronym{NNTP}
13869 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
13870 using a non native telnet connection function.
13871
13872 @item nntp-netcat-command
13873 @vindex nntp-netcat-command
13874 Command to use when connecting to the @acronym{NNTP} server through
13875 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
13876 just for the real @acronym{NNTP} server.  The default is
13877 @samp{nc}.
13878
13879 @item nntp-netcat-switches
13880 @vindex nntp-netcat-switches
13881 A list of switches to pass to @code{nntp-netcat-command}.  The default
13882 is @samp{()}.
13883
13884 @end table
13885
13886 @node NNTP marks
13887 @subsubsection NNTP marks
13888 @cindex storing NNTP marks
13889
13890 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
13891 servers in marks files.  A marks file records what marks you have set
13892 in a group and each file is specific to the corresponding server.
13893 Marks files are stored in @file{~/News/marks}
13894 (@code{nntp-marks-directory}) under a classic hierarchy resembling
13895 that of a news server, for example marks for the group
13896 @samp{gmane.discuss} on the news.gmane.org server will be stored in
13897 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
13898
13899 Marks files are useful because you can copy the @file{~/News/marks}
13900 directory (using rsync, scp or whatever) to another Gnus installation,
13901 and it will realize what articles you have read and marked.  The data
13902 in @file{~/News/marks} has priority over the same data in
13903 @file{~/.newsrc.eld}.
13904
13905 Note that marks files are very much server-specific: Gnus remembers
13906 the article numbers so if you don't use the same servers on both
13907 installations things are most likely to break (most @acronym{NNTP}
13908 servers do not use the same article numbers as any other server).
13909 However, if you use servers A, B, C on one installation and servers A,
13910 D, E on the other, you can sync the marks files for A and then you'll
13911 get synchronization for that server between the two installations.
13912
13913 Using @acronym{NNTP} marks can possibly incur a performance penalty so
13914 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
13915 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
13916
13917 Related variables:
13918
13919 @table @code
13920
13921 @item nntp-marks-is-evil
13922 @vindex nntp-marks-is-evil
13923 If non-@code{nil}, this back end will ignore any marks files.  The
13924 default is @code{nil}.
13925
13926 @item nntp-marks-directory
13927 @vindex nntp-marks-directory
13928 The directory where marks for nntp groups will be stored.
13929
13930 @end table
13931
13932
13933 @node News Spool
13934 @subsection News Spool
13935 @cindex nnspool
13936 @cindex news spool
13937
13938 Subscribing to a foreign group from the local spool is extremely easy,
13939 and might be useful, for instance, to speed up reading groups that
13940 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
13941 instance.
13942
13943 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
13944 anything else) as the address.
13945
13946 If you have access to a local spool, you should probably use that as the
13947 native select method (@pxref{Finding the News}).  It is normally faster
13948 than using an @code{nntp} select method, but might not be.  It depends.
13949 You just have to try to find out what's best at your site.
13950
13951 @table @code
13952
13953 @item nnspool-inews-program
13954 @vindex nnspool-inews-program
13955 Program used to post an article.
13956
13957 @item nnspool-inews-switches
13958 @vindex nnspool-inews-switches
13959 Parameters given to the inews program when posting an article.
13960
13961 @item nnspool-spool-directory
13962 @vindex nnspool-spool-directory
13963 Where @code{nnspool} looks for the articles.  This is normally
13964 @file{/usr/spool/news/}.
13965
13966 @item nnspool-nov-directory
13967 @vindex nnspool-nov-directory
13968 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
13969 @file{/usr/spool/news/over.view/}.
13970
13971 @item nnspool-lib-dir
13972 @vindex nnspool-lib-dir
13973 Where the news lib dir is (@file{/usr/lib/news/} by default).
13974
13975 @item nnspool-active-file
13976 @vindex nnspool-active-file
13977 The name of the active file.
13978
13979 @item nnspool-newsgroups-file
13980 @vindex nnspool-newsgroups-file
13981 The name of the group descriptions file.
13982
13983 @item nnspool-history-file
13984 @vindex nnspool-history-file
13985 The name of the news history file.
13986
13987 @item nnspool-active-times-file
13988 @vindex nnspool-active-times-file
13989 The name of the active date file.
13990
13991 @item nnspool-nov-is-evil
13992 @vindex nnspool-nov-is-evil
13993 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
13994 that it finds.
13995
13996 @item nnspool-sift-nov-with-sed
13997 @vindex nnspool-sift-nov-with-sed
13998 @cindex sed
13999 If non-@code{nil}, which is the default, use @code{sed} to get the
14000 relevant portion from the overview file.  If @code{nil},
14001 @code{nnspool} will load the entire file into a buffer and process it
14002 there.
14003
14004 @end table
14005
14006
14007 @node Getting Mail
14008 @section Getting Mail
14009 @cindex reading mail
14010 @cindex mail
14011
14012 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14013 course.
14014
14015 @menu
14016 * Mail in a Newsreader::        Important introductory notes.
14017 * Getting Started Reading Mail::  A simple cookbook example.
14018 * Splitting Mail::              How to create mail groups.
14019 * Mail Sources::                How to tell Gnus where to get mail from.
14020 * Mail Back End Variables::     Variables for customizing mail handling.
14021 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14022 * Group Mail Splitting::        Use group customize to drive mail splitting.
14023 * Incorporating Old Mail::      What about the old mail you have?
14024 * Expiring Mail::               Getting rid of unwanted mail.
14025 * Washing Mail::                Removing cruft from the mail you get.
14026 * Duplicates::                  Dealing with duplicated mail.
14027 * Not Reading Mail::            Using mail back ends for reading other files.
14028 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14029 @end menu
14030
14031
14032 @node Mail in a Newsreader
14033 @subsection Mail in a Newsreader
14034
14035 If you are used to traditional mail readers, but have decided to switch
14036 to reading mail with Gnus, you may find yourself experiencing something
14037 of a culture shock.
14038
14039 Gnus does not behave like traditional mail readers.  If you want to make
14040 it behave that way, you can, but it's an uphill battle.
14041
14042 Gnus, by default, handles all its groups using the same approach.  This
14043 approach is very newsreaderly---you enter a group, see the new/unread
14044 messages, and when you read the messages, they get marked as read, and
14045 you don't see them any more.  (Unless you explicitly ask for them.)
14046
14047 In particular, you do not do anything explicitly to delete messages.
14048
14049 Does this mean that all the messages that have been marked as read are
14050 deleted?  How awful!
14051
14052 But, no, it means that old messages are @dfn{expired} according to some
14053 scheme or other.  For news messages, the expire process is controlled by
14054 the news administrator; for mail, the expire process is controlled by
14055 you.  The expire process for mail is covered in depth in @ref{Expiring
14056 Mail}.
14057
14058 What many Gnus users find, after using it a while for both news and
14059 mail, is that the transport mechanism has very little to do with how
14060 they want to treat a message.
14061
14062 Many people subscribe to several mailing lists.  These are transported
14063 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14064 answering, or even reading these messages very carefully.  We may not
14065 need to save them because if we should need to read one again, they are
14066 archived somewhere else.
14067
14068 Some people have local news groups which have only a handful of readers.
14069 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14070 to read and answer a large fraction of the messages very carefully in
14071 order to do our work.  And there may not be an archive, so we may need
14072 to save the interesting messages the same way we would personal mail.
14073
14074 The important distinction turns out to be not the transport mechanism,
14075 but other factors such as how interested we are in the subject matter,
14076 or how easy it is to retrieve the message if we need to read it again.
14077
14078 Gnus provides many options for sorting mail into ``groups'' which behave
14079 like newsgroups, and for treating each group (whether mail or news)
14080 differently.
14081
14082 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14083 that Gnus should grow up and be a male, er, mail reader.  It is possible
14084 to whip Gnus into a more mailreaderly being, but, as said before, it's
14085 not easy.  People who prefer proper mail readers should try @sc{vm}
14086 instead, which is an excellent, and proper, mail reader.
14087
14088 I don't mean to scare anybody off, but I want to make it clear that you
14089 may be required to learn a new way of thinking about messages.  After
14090 you've been subjected to The Gnus Way, you will come to love it.  I can
14091 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14092 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14093 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14094 You Do.)
14095
14096
14097 @node Getting Started Reading Mail
14098 @subsection Getting Started Reading Mail
14099
14100 It's quite easy to use Gnus to read your new mail.  You just plonk the
14101 mail back end of your choice into @code{gnus-secondary-select-methods},
14102 and things will happen automatically.
14103
14104 For instance, if you want to use @code{nnml} (which is a ``one file per
14105 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14106
14107 @lisp
14108 (setq gnus-secondary-select-methods '((nnml "")))
14109 @end lisp
14110
14111 Now, the next time you start Gnus, this back end will be queried for new
14112 articles, and it will move all the messages in your spool file to its
14113 directory, which is @file{~/Mail/} by default.  The new group that will
14114 be created (@samp{mail.misc}) will be subscribed, and you can read it
14115 like any other group.
14116
14117 You will probably want to split the mail into several groups, though:
14118
14119 @lisp
14120 (setq nnmail-split-methods
14121       '(("junk" "^From:.*Lars Ingebrigtsen")
14122         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14123         ("other" "")))
14124 @end lisp
14125
14126 This will result in three new @code{nnml} mail groups being created:
14127 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14128 mail that doesn't fit into the first two groups will be placed in the
14129 last group.
14130
14131 This should be sufficient for reading mail with Gnus.  You might want to
14132 give the other sections in this part of the manual a perusal, though.
14133 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14134
14135
14136 @node Splitting Mail
14137 @subsection Splitting Mail
14138 @cindex splitting mail
14139 @cindex mail splitting
14140 @cindex mail filtering (splitting)
14141
14142 @vindex nnmail-split-methods
14143 The @code{nnmail-split-methods} variable says how the incoming mail is
14144 to be split into groups.
14145
14146 @lisp
14147 (setq nnmail-split-methods
14148   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14149     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14150     ("mail.other" "")))
14151 @end lisp
14152
14153 This variable is a list of lists, where the first element of each of
14154 these lists is the name of the mail group (they do not have to be called
14155 something beginning with @samp{mail}, by the way), and the second
14156 element is a regular expression used on the header of each mail to
14157 determine if it belongs in this mail group.  The first string may
14158 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14159 insert sub-expressions from the matched text.  For instance:
14160
14161 @lisp
14162 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14163 @end lisp
14164
14165 @noindent
14166 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14167 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14168
14169 The second element can also be a function.  In that case, it will be
14170 called narrowed to the headers with the first element of the rule as the
14171 argument.  It should return a non-@code{nil} value if it thinks that the
14172 mail belongs in that group.
14173
14174 @cindex @samp{bogus} group
14175 The last of these groups should always be a general one, and the regular
14176 expression should @emph{always} be @samp{""} so that it matches any mails
14177 that haven't been matched by any of the other regexps.  (These rules are
14178 processed from the beginning of the alist toward the end.  The first rule
14179 to make a match will ``win'', unless you have crossposting enabled.  In
14180 that case, all matching rules will ``win''.)  If no rule matched, the mail
14181 will end up in the @samp{bogus} group.  When new groups are created by
14182 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14183 see the new groups.  This also applies to the @samp{bogus} group.
14184
14185 If you like to tinker with this yourself, you can set this variable to a
14186 function of your choice.  This function will be called without any
14187 arguments in a buffer narrowed to the headers of an incoming mail
14188 message.  The function should return a list of group names that it
14189 thinks should carry this mail message.
14190
14191 Note that the mail back ends are free to maul the poor, innocent,
14192 incoming headers all they want to.  They all add @code{Lines} headers;
14193 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
14194 @code{From<SPACE>} line to something else.
14195
14196 @vindex nnmail-crosspost
14197 The mail back ends all support cross-posting.  If several regexps match,
14198 the mail will be ``cross-posted'' to all those groups.
14199 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
14200 that no articles are crossposted to the general (@samp{""}) group.
14201
14202 @vindex nnmail-crosspost-link-function
14203 @cindex crosspost
14204 @cindex links
14205 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
14206 the crossposted articles.  However, not all file systems support hard
14207 links.  If that's the case for you, set
14208 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
14209 variable is @code{add-name-to-file} by default.)
14210
14211 @kindex M-x nnmail-split-history
14212 @findex nnmail-split-history
14213 If you wish to see where the previous mail split put the messages, you
14214 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
14215 where re-spooling messages would put the messages, you can use
14216 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
14217 Group Commands}).
14218
14219 @vindex nnmail-split-header-length-limit
14220 Header lines longer than the value of
14221 @code{nnmail-split-header-length-limit} are excluded from the split
14222 function.
14223
14224 @vindex nnmail-mail-splitting-decodes
14225 @vindex nnmail-mail-splitting-charset
14226 By default, splitting does not decode headers, so you can not match on
14227 non-@acronym{ASCII} strings.  But it is useful if you want to match
14228 articles based on the raw header data.  To enable it, set the
14229 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
14230 In addition, the value of the @code{nnmail-mail-splitting-charset}
14231 variable is used for decoding non-@acronym{MIME} encoded string when
14232 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
14233 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
14234 string.  A suitable value for you will be @code{undecided} or be the
14235 charset used normally in mails you are interested in.
14236
14237 @vindex nnmail-resplit-incoming
14238 By default, splitting is performed on all incoming messages.  If you
14239 specify a @code{directory} entry for the variable @code{mail-sources}
14240 (@pxref{Mail Source Specifiers}), however, then splitting does
14241 @emph{not} happen by default.  You can set the variable
14242 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
14243 splitting happen even in this case.  (This variable has no effect on
14244 other kinds of entries.)
14245
14246 Gnus gives you all the opportunity you could possibly want for shooting
14247 yourself in the foot.  Let's say you create a group that will contain
14248 all the mail you get from your boss.  And then you accidentally
14249 unsubscribe from the group.  Gnus will still put all the mail from your
14250 boss in the unsubscribed group, and so, when your boss mails you ``Have
14251 that report ready by Monday or you're fired!'', you'll never see it and,
14252 come Tuesday, you'll still believe that you're gainfully employed while
14253 you really should be out collecting empty bottles to save up for next
14254 month's rent money.
14255
14256
14257 @node Mail Sources
14258 @subsection Mail Sources
14259
14260 Mail can be gotten from many different sources---the mail spool, from
14261 a @acronym{POP} mail server, from a procmail directory, or from a
14262 maildir, for instance.
14263
14264 @menu
14265 * Mail Source Specifiers::      How to specify what a mail source is.
14266 * Mail Source Customization::   Some variables that influence things.
14267 * Fetching Mail::               Using the mail source specifiers.
14268 @end menu
14269
14270
14271 @node Mail Source Specifiers
14272 @subsubsection Mail Source Specifiers
14273 @cindex POP
14274 @cindex mail server
14275 @cindex procmail
14276 @cindex mail spool
14277 @cindex mail source
14278
14279 You tell Gnus how to fetch mail by setting @code{mail-sources}
14280 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
14281
14282 Here's an example:
14283
14284 @lisp
14285 (pop :server "pop3.mailserver.com" :user "myname")
14286 @end lisp
14287
14288 As can be observed, a mail source specifier is a list where the first
14289 element is a @dfn{mail source type}, followed by an arbitrary number of
14290 @dfn{keywords}.  Keywords that are not explicitly specified are given
14291 default values.
14292
14293 The @code{mail-sources} is global for all mail groups.  You can specify
14294 an additional mail source for a particular group by including the
14295 @code{group} mail specifier in @code{mail-sources}, and setting a
14296 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
14297 a single mail source.  When this is used, @code{mail-sources} is
14298 typically just @code{(group)}; the @code{mail-source} parameter for a
14299 group might look like this:
14300
14301 @lisp
14302 (mail-source . (file :path "home/user/spools/foo.spool"))
14303 @end lisp
14304
14305 This means that the group's (and only this group's) messages will be
14306 fetched from the spool file @samp{/user/spools/foo.spool}.
14307
14308 The following mail source types are available:
14309
14310 @table @code
14311 @item file
14312 Get mail from a single file; typically from the mail spool.
14313
14314 Keywords:
14315
14316 @table @code
14317 @item :path
14318 The file name.  Defaults to the value of the @env{MAIL}
14319 environment variable or the value of @code{rmail-spool-directory}
14320 (usually something like @file{/usr/mail/spool/user-name}).
14321
14322 @item :prescript
14323 @itemx :postscript
14324 Script run before/after fetching mail.
14325 @end table
14326
14327 An example file mail source:
14328
14329 @lisp
14330 (file :path "/usr/spool/mail/user-name")
14331 @end lisp
14332
14333 Or using the default file name:
14334
14335 @lisp
14336 (file)
14337 @end lisp
14338
14339 If the mail spool file is not located on the local machine, it's best
14340 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
14341 You can not use ange-ftp file names here---it has no way to lock the
14342 mail spool while moving the mail.
14343
14344 If it's impossible to set up a proper server, you can use ssh instead.
14345
14346 @lisp
14347 (setq mail-sources
14348       '((file :prescript "ssh host bin/getmail >%t")))
14349 @end lisp
14350
14351 The @samp{getmail} script would look something like the following:
14352
14353 @example
14354 #!/bin/sh
14355 #  getmail - move mail from spool to stdout
14356 #  flu@@iki.fi
14357
14358 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
14359 TMP=$HOME/Mail/tmp
14360 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
14361 @end example
14362
14363 Alter this script to fit the @samp{movemail} and temporary
14364 file you want to use.
14365
14366
14367 @item directory
14368 @vindex nnmail-scan-directory-mail-source-once
14369 Get mail from several files in a directory.  This is typically used
14370 when you have procmail split the incoming mail into several files.
14371 That is, there is a one-to-one correspondence between files in that
14372 directory and groups, so that mail from the file @file{foo.bar.spool}
14373 will be put in the group @code{foo.bar}.  (You can change the suffix
14374 to be used instead of @code{.spool}.)  Setting
14375 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
14376 Gnus to scan the mail source only once.  This is particularly useful
14377 if you want to scan mail groups at a specified level.
14378
14379 @vindex nnmail-resplit-incoming
14380 There is also the variable @code{nnmail-resplit-incoming}, if you set
14381 that to a non-@code{nil} value, then the normal splitting process is
14382 applied to all the files from the directory, @ref{Splitting Mail}.
14383
14384 Keywords:
14385
14386 @table @code
14387 @item :path
14388 The name of the directory where the files are.  There is no default
14389 value.
14390
14391 @item :suffix
14392 Only files ending with this suffix are used.  The default is
14393 @samp{.spool}.
14394
14395 @item :predicate
14396 Only files that have this predicate return non-@code{nil} are returned.
14397 The default is @code{identity}.  This is used as an additional
14398 filter---only files that have the right suffix @emph{and} satisfy this
14399 predicate are considered.
14400
14401 @item :prescript
14402 @itemx :postscript
14403 Script run before/after fetching mail.
14404
14405 @end table
14406
14407 An example directory mail source:
14408
14409 @lisp
14410 (directory :path "/home/user-name/procmail-dir/"
14411            :suffix ".prcml")
14412 @end lisp
14413
14414 @item pop
14415 Get mail from a @acronym{POP} server.
14416
14417 Keywords:
14418
14419 @table @code
14420 @item :server
14421 The name of the @acronym{POP} server.  The default is taken from the
14422 @env{MAILHOST} environment variable.
14423
14424 @item :port
14425 The port number of the @acronym{POP} server.  This can be a number (eg,
14426 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
14427 string, it should be a service name as listed in @file{/etc/services} on
14428 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
14429 need to specify it as @samp{"pop-3"} instead.
14430
14431 @item :user
14432 The user name to give to the @acronym{POP} server.  The default is the login
14433 name.
14434
14435 @item :password
14436 The password to give to the @acronym{POP} server.  If not specified,
14437 the user is prompted.
14438
14439 @item :program
14440 The program to use to fetch mail from the @acronym{POP} server.  This
14441 should be a @code{format}-like string.  Here's an example:
14442
14443 @example
14444 fetchmail %u@@%s -P %p %t
14445 @end example
14446
14447 The valid format specifier characters are:
14448
14449 @table @samp
14450 @item t
14451 The name of the file the mail is to be moved to.  This must always be
14452 included in this string.
14453
14454 @item s
14455 The name of the server.
14456
14457 @item P
14458 The port number of the server.
14459
14460 @item u
14461 The user name to use.
14462
14463 @item p
14464 The password to use.
14465 @end table
14466
14467 The values used for these specs are taken from the values you give the
14468 corresponding keywords.
14469
14470 @item :prescript
14471 A script to be run before fetching the mail.  The syntax is the same as
14472 the @code{:program} keyword.  This can also be a function to be run.
14473
14474 @item :postscript
14475 A script to be run after fetching the mail.  The syntax is the same as
14476 the @code{:program} keyword.  This can also be a function to be run.
14477
14478 @item :function
14479 The function to use to fetch mail from the @acronym{POP} server.  The
14480 function is called with one parameter---the name of the file where the
14481 mail should be moved to.
14482
14483 @item :authentication
14484 This can be either the symbol @code{password} or the symbol @code{apop}
14485 and says what authentication scheme to use.  The default is
14486 @code{password}.
14487
14488 @end table
14489
14490 @vindex pop3-movemail
14491 @vindex pop3-leave-mail-on-server
14492 If the @code{:program} and @code{:function} keywords aren't specified,
14493 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
14494 is non-@code{nil} the mail is to be left on the @acronym{POP} server
14495 after fetching when using @code{pop3-movemail}.  Note that POP servers
14496 maintain no state information between sessions, so what the client
14497 believes is there and what is actually there may not match up.  If they
14498 do not, then you may get duplicate mails or the whole thing can fall
14499 apart and leave you with a corrupt mailbox.
14500
14501 Here are some examples for getting mail from a @acronym{POP} server.
14502 Fetch from the default @acronym{POP} server, using the default user
14503 name, and default fetcher:
14504
14505 @lisp
14506 (pop)
14507 @end lisp
14508
14509 Fetch from a named server with a named user and password:
14510
14511 @lisp
14512 (pop :server "my.pop.server"
14513      :user "user-name" :password "secret")
14514 @end lisp
14515
14516 Use @samp{movemail} to move the mail:
14517
14518 @lisp
14519 (pop :program "movemail po:%u %t %p")
14520 @end lisp
14521
14522 @item maildir
14523 Get mail from a maildir.  This is a type of mailbox that is supported by
14524 at least qmail and postfix, where each file in a special directory
14525 contains exactly one mail.
14526
14527 Keywords:
14528
14529 @table @code
14530 @item :path
14531 The name of the directory where the mails are stored.  The default is
14532 taken from the @env{MAILDIR} environment variable or
14533 @file{~/Maildir/}.
14534 @item :subdirs
14535 The subdirectories of the Maildir.  The default is
14536 @samp{("new" "cur")}.
14537
14538 @c If you sometimes look at your mail through a pop3 daemon before fetching
14539 @c them with Gnus, you may also have to fetch your mails from the
14540 @c @code{cur} directory inside the maildir, like in the first example
14541 @c below.
14542
14543 You can also get mails from remote hosts (because maildirs don't suffer
14544 from locking problems).
14545
14546 @end table
14547
14548 Two example maildir mail sources:
14549
14550 @lisp
14551 (maildir :path "/home/user-name/Maildir/"
14552          :subdirs ("cur" "new"))
14553 @end lisp
14554
14555 @lisp
14556 (maildir :path "/user@@remotehost.org:~/Maildir/"
14557          :subdirs ("new"))
14558 @end lisp
14559
14560 @item imap
14561 Get mail from a @acronym{IMAP} server.  If you don't want to use
14562 @acronym{IMAP} as intended, as a network mail reading protocol (ie
14563 with nnimap), for some reason or other, Gnus let you treat it similar
14564 to a @acronym{POP} server and fetches articles from a given
14565 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
14566
14567 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
14568 may need external programs and libraries, @xref{IMAP}.
14569
14570 Keywords:
14571
14572 @table @code
14573 @item :server
14574 The name of the @acronym{IMAP} server.  The default is taken from the
14575 @env{MAILHOST} environment variable.
14576
14577 @item :port
14578 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
14579 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
14580
14581 @item :user
14582 The user name to give to the @acronym{IMAP} server.  The default is the login
14583 name.
14584
14585 @item :password
14586 The password to give to the @acronym{IMAP} server.  If not specified, the user is
14587 prompted.
14588
14589 @item :stream
14590 What stream to use for connecting to the server, this is one of the
14591 symbols in @code{imap-stream-alist}.  Right now, this means
14592 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
14593 @samp{ssl}, @samp{shell} or the default @samp{network}.
14594
14595 @item :authentication
14596 Which authenticator to use for authenticating to the server, this is
14597 one of the symbols in @code{imap-authenticator-alist}.  Right now,
14598 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
14599 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
14600
14601 @item :program
14602 When using the `shell' :stream, the contents of this variable is
14603 mapped into the @code{imap-shell-program} variable.  This should be a
14604 @code{format}-like string (or list of strings).  Here's an example:
14605
14606 @example
14607 ssh %s imapd
14608 @end example
14609
14610 Make sure nothing is interfering with the output of the program, e.g.,
14611 don't forget to redirect the error output to the void.  The valid format
14612 specifier characters are:
14613
14614 @table @samp
14615 @item s
14616 The name of the server.
14617
14618 @item l
14619 User name from @code{imap-default-user}.
14620
14621 @item p
14622 The port number of the server.
14623 @end table
14624
14625 The values used for these specs are taken from the values you give the
14626 corresponding keywords.
14627
14628 @item :mailbox
14629 The name of the mailbox to get mail from.  The default is @samp{INBOX}
14630 which normally is the mailbox which receives incoming mail.
14631
14632 @item :predicate
14633 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
14634 UNDELETED}, is probably the best choice for most people, but if you
14635 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
14636 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
14637 Then all articles in the mailbox is fetched, no matter what.  For a
14638 complete list of predicates, see RFC 2060 section 6.4.4.
14639
14640 @item :fetchflag
14641 How to flag fetched articles on the server, the default @samp{\Deleted}
14642 will mark them as deleted, an alternative would be @samp{\Seen} which
14643 would simply mark them as read.  These are the two most likely choices,
14644 but more flags are defined in RFC 2060 section 2.3.2.
14645
14646 @item :dontexpunge
14647 If non-@code{nil}, don't remove all articles marked as deleted in the
14648 mailbox after finishing the fetch.
14649
14650 @end table
14651
14652 An example @acronym{IMAP} mail source:
14653
14654 @lisp
14655 (imap :server "mail.mycorp.com"
14656       :stream kerberos4
14657       :fetchflag "\\Seen")
14658 @end lisp
14659
14660 @item webmail
14661 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
14662 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
14663 @uref{http://mail.yahoo.com/}.
14664
14665 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
14666 required for url "4.0pre.46".
14667
14668 WARNING: Mails may be lost.  NO WARRANTY.
14669
14670 Keywords:
14671
14672 @table @code
14673 @item :subtype
14674 The type of the webmail server.  The default is @code{hotmail}.  The
14675 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
14676
14677 @item :user
14678 The user name to give to the webmail server.  The default is the login
14679 name.
14680
14681 @item :password
14682 The password to give to the webmail server.  If not specified, the user is
14683 prompted.
14684
14685 @item :dontexpunge
14686 If non-@code{nil}, only fetch unread articles and don't move them to
14687 trash folder after finishing the fetch.
14688
14689 @end table
14690
14691 An example webmail source:
14692
14693 @lisp
14694 (webmail :subtype 'hotmail
14695          :user "user-name"
14696          :password "secret")
14697 @end lisp
14698
14699 @item group
14700 Get the actual mail source from the @code{mail-source} group parameter,
14701 @xref{Group Parameters}.
14702
14703 @end table
14704
14705 @table @dfn
14706 @item Common Keywords
14707 Common keywords can be used in any type of mail source.
14708
14709 Keywords:
14710
14711 @table @code
14712 @item :plugged
14713 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
14714 use directory source to get mail, you can specify it as in this
14715 example:
14716
14717 @lisp
14718 (setq mail-sources
14719       '((directory :path "/home/pavel/.Spool/"
14720                    :suffix ""
14721                    :plugged t)))
14722 @end lisp
14723
14724 Gnus will then fetch your mail even when you are unplugged.  This is
14725 useful when you use local mail and news.
14726
14727 @end table
14728 @end table
14729
14730 @subsubsection Function Interface
14731
14732 Some of the above keywords specify a Lisp function to be executed.
14733 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
14734 the value of the keyword while the function is executing.  For example,
14735 consider the following mail-source setting:
14736
14737 @lisp
14738 (setq mail-sources '((pop :user "jrl"
14739                           :server "pophost" :function fetchfunc)))
14740 @end lisp
14741
14742 While the function @code{fetchfunc} is executing, the symbol @code{user}
14743 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
14744 @code{"pophost"}.  The symbols @code{port}, @code{password},
14745 @code{program}, @code{prescript}, @code{postscript}, @code{function},
14746 and @code{authentication} are also bound (to their default values).
14747
14748 See above for a list of keywords for each type of mail source.
14749
14750
14751 @node Mail Source Customization
14752 @subsubsection Mail Source Customization
14753
14754 The following is a list of variables that influence how the mail is
14755 fetched.  You would normally not need to set or change any of these
14756 variables.
14757
14758 @table @code
14759 @item mail-source-crash-box
14760 @vindex mail-source-crash-box
14761 File where mail will be stored while processing it.  The default is@*
14762 @file{~/.emacs-mail-crash-box}.
14763
14764 @cindex Incoming*
14765 @item mail-source-delete-incoming
14766 @vindex mail-source-delete-incoming
14767 If non-@code{nil}, delete incoming files after handling them.  If
14768 @code{t}, delete the files immediately, if @code{nil}, never delete any
14769 files.  If a positive number, delete files older than number of days
14770 (the deletion will only happen when receiving new mail).  You may also
14771 set @code{mail-source-delete-incoming} to @code{nil} and call
14772 @code{mail-source-delete-old-incoming} from a hook or interactively.
14773 @code{mail-source-delete-incoming} defaults to @code{2} in alpha Gnusae
14774 and @code{10} in released Gnusae.  @xref{Gnus Development}.
14775
14776 @item mail-source-delete-old-incoming-confirm
14777 @vindex mail-source-delete-old-incoming-confirm
14778 If non-@code{nil}, ask for confirmation before deleting old incoming
14779 files.  This variable only applies when
14780 @code{mail-source-delete-incoming} is a positive number.
14781
14782 @item mail-source-ignore-errors
14783 @vindex mail-source-ignore-errors
14784 If non-@code{nil}, ignore errors when reading mail from a mail source.
14785
14786 @item mail-source-directory
14787 @vindex mail-source-directory
14788 Directory where incoming mail source files (if any) will be stored.  The
14789 default is @file{~/Mail/}.  At present, the only thing this is used for
14790 is to say where the incoming files will be stored if the variable
14791 @code{mail-source-delete-incoming} is @code{nil} or a number.
14792
14793 @item mail-source-incoming-file-prefix
14794 @vindex mail-source-incoming-file-prefix
14795 Prefix for file name for storing incoming mail.  The default is
14796 @file{Incoming}, in which case files will end up with names like
14797 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
14798 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
14799 number.
14800
14801 @item mail-source-default-file-modes
14802 @vindex mail-source-default-file-modes
14803 All new mail files will get this file mode.  The default is 384.
14804
14805 @item mail-source-movemail-program
14806 @vindex mail-source-movemail-program
14807 If non-@code{nil}, name of program for fetching new mail.  If
14808 @code{nil}, @code{movemail} in @var{exec-directory}.
14809
14810 @end table
14811
14812
14813 @node Fetching Mail
14814 @subsubsection Fetching Mail
14815
14816 @vindex mail-sources
14817 The way to actually tell Gnus where to get new mail from is to set
14818 @code{mail-sources} to a list of mail source specifiers
14819 (@pxref{Mail Source Specifiers}).
14820
14821 If this variable is @code{nil}, the mail back ends will never attempt to
14822 fetch mail by themselves.
14823
14824 If you want to fetch mail both from your local spool as well as a
14825 @acronym{POP} mail server, you'd say something like:
14826
14827 @lisp
14828 (setq mail-sources
14829       '((file)
14830         (pop :server "pop3.mail.server"
14831              :password "secret")))
14832 @end lisp
14833
14834 Or, if you don't want to use any of the keyword defaults:
14835
14836 @lisp
14837 (setq mail-sources
14838       '((file :path "/var/spool/mail/user-name")
14839         (pop :server "pop3.mail.server"
14840              :user "user-name"
14841              :port "pop3"
14842              :password "secret")))
14843 @end lisp
14844
14845
14846 When you use a mail back end, Gnus will slurp all your mail from your
14847 inbox and plonk it down in your home directory.  Gnus doesn't move any
14848 mail if you're not using a mail back end---you have to do a lot of magic
14849 invocations first.  At the time when you have finished drawing the
14850 pentagram, lightened the candles, and sacrificed the goat, you really
14851 shouldn't be too surprised when Gnus moves your mail.
14852
14853
14854
14855 @node Mail Back End Variables
14856 @subsection Mail Back End Variables
14857
14858 These variables are (for the most part) pertinent to all the various
14859 mail back ends.
14860
14861 @table @code
14862 @vindex nnmail-read-incoming-hook
14863 @item nnmail-read-incoming-hook
14864 The mail back ends all call this hook after reading new mail.  You can
14865 use this hook to notify any mail watch programs, if you want to.
14866
14867 @vindex nnmail-split-hook
14868 @item nnmail-split-hook
14869 @findex gnus-article-decode-encoded-words
14870 @cindex RFC 1522 decoding
14871 @cindex RFC 2047 decoding
14872 Hook run in the buffer where the mail headers of each message is kept
14873 just before the splitting based on these headers is done.  The hook is
14874 free to modify the buffer contents in any way it sees fit---the buffer
14875 is discarded after the splitting has been done, and no changes performed
14876 in the buffer will show up in any files.
14877 @code{gnus-article-decode-encoded-words} is one likely function to add
14878 to this hook.
14879
14880 @vindex nnmail-pre-get-new-mail-hook
14881 @vindex nnmail-post-get-new-mail-hook
14882 @item nnmail-pre-get-new-mail-hook
14883 @itemx nnmail-post-get-new-mail-hook
14884 These are two useful hooks executed when treating new incoming
14885 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
14886 starting to handle the new mail) and
14887 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
14888 is done).  Here's and example of using these two hooks to change the
14889 default file modes the new mail files get:
14890
14891 @lisp
14892 (add-hook 'nnmail-pre-get-new-mail-hook
14893           (lambda () (set-default-file-modes 511)))
14894
14895 (add-hook 'nnmail-post-get-new-mail-hook
14896           (lambda () (set-default-file-modes 551)))
14897 @end lisp
14898
14899 @item nnmail-use-long-file-names
14900 @vindex nnmail-use-long-file-names
14901 If non-@code{nil}, the mail back ends will use long file and directory
14902 names.  Groups like @samp{mail.misc} will end up in directories
14903 (assuming use of @code{nnml} back end) or files (assuming use of
14904 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
14905 the same group will end up in @file{mail/misc}.
14906
14907 @item nnmail-delete-file-function
14908 @vindex nnmail-delete-file-function
14909 @findex delete-file
14910 Function called to delete files.  It is @code{delete-file} by default.
14911
14912 @item nnmail-cache-accepted-message-ids
14913 @vindex nnmail-cache-accepted-message-ids
14914 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
14915 the back end (via @code{Gcc}, for instance) into the mail duplication
14916 discovery cache.  The default is @code{nil}.
14917
14918 @item nnmail-cache-ignore-groups
14919 @vindex nnmail-cache-ignore-groups
14920 This can be a regular expression or a list of regular expressions.
14921 Group names that match any of the regular expressions will never be
14922 recorded in the @code{Message-ID} cache.
14923
14924 This can be useful, for example, when using Fancy Splitting
14925 (@pxref{Fancy Mail Splitting}) together with the function
14926 @code{nnmail-split-fancy-with-parent}.
14927
14928 @end table
14929
14930
14931 @node Fancy Mail Splitting
14932 @subsection Fancy Mail Splitting
14933 @cindex mail splitting
14934 @cindex fancy mail splitting
14935
14936 @vindex nnmail-split-fancy
14937 @findex nnmail-split-fancy
14938 If the rather simple, standard method for specifying how to split mail
14939 doesn't allow you to do what you want, you can set
14940 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
14941 play with the @code{nnmail-split-fancy} variable.
14942
14943 Let's look at an example value of this variable first:
14944
14945 @lisp
14946 ;; @r{Messages from the mailer daemon are not crossposted to any of}
14947 ;; @r{the ordinary groups.  Warnings are put in a separate group}
14948 ;; @r{from real errors.}
14949 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
14950                    "mail.misc"))
14951    ;; @r{Non-error messages are crossposted to all relevant}
14952    ;; @r{groups, but we don't crosspost between the group for the}
14953    ;; @r{(ding) list and the group for other (ding) related mail.}
14954    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
14955          ("subject" "ding" "ding.misc"))
14956       ;; @r{Other mailing lists@dots{}}
14957       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
14958       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
14959       ;; @r{Both lists below have the same suffix, so prevent}
14960       ;; @r{cross-posting to mkpkg.list of messages posted only to}
14961       ;; @r{the bugs- list, but allow cross-posting when the}
14962       ;; @r{message was really cross-posted.}
14963       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
14964       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
14965       ;; @r{People@dots{}}
14966       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
14967    ;; @r{Unmatched mail goes to the catch all group.}
14968    "misc.misc")
14969 @end lisp
14970
14971 This variable has the format of a @dfn{split}.  A split is a
14972 (possibly) recursive structure where each split may contain other
14973 splits.  Here are the possible split syntaxes:
14974
14975 @table @code
14976
14977 @item group
14978 If the split is a string, that will be taken as a group name.  Normal
14979 regexp match expansion will be done.  See below for examples.
14980
14981 @c Don't fold this line.
14982 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
14983 The split can be a list containing at least three elements.  If the
14984 first element @var{field} (a regexp matching a header) contains
14985 @var{value} (also a regexp) then store the message as specified by
14986 @var{split}.
14987
14988 If @var{restrict} (yet another regexp) matches some string after
14989 @var{field} and before the end of the matched @var{value}, the
14990 @var{split} is ignored.  If none of the @var{restrict} clauses match,
14991 @var{split} is processed.
14992
14993 The last element @var{invert-partial} is optional.  If it is
14994 non-@code{nil}, the match-partial-words behavior controlled by the
14995 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
14996 be inverted.  (New in Gnus 5.10.7)
14997
14998 @item (| @var{split} @dots{})
14999 If the split is a list, and the first element is @code{|} (vertical
15000 bar), then process each @var{split} until one of them matches.  A
15001 @var{split} is said to match if it will cause the mail message to be
15002 stored in one or more groups.
15003
15004 @item (& @var{split} @dots{})
15005 If the split is a list, and the first element is @code{&}, then
15006 process all @var{split}s in the list.
15007
15008 @item junk
15009 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15010 this message.  Use with extreme caution.
15011
15012 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15013 If the split is a list, and the first element is @samp{:}, then the
15014 second element will be called as a function with @var{args} given as
15015 arguments.  The function should return a @var{split}.
15016
15017 @cindex body split
15018 For instance, the following function could be used to split based on the
15019 body of the messages:
15020
15021 @lisp
15022 (defun split-on-body ()
15023   (save-excursion
15024     (save-restriction
15025       (widen)
15026       (goto-char (point-min))
15027       (when (re-search-forward "Some.*string" nil t)
15028         "string.group"))))
15029 @end lisp
15030
15031 The buffer is narrowed to the header of the message in question when
15032 @var{function} is run.  That's why @code{(widen)} needs to be called
15033 after @code{save-excursion} and @code{save-restriction} in the example
15034 above.  Also note that with the nnimap backend, message bodies will
15035 not be downloaded by default.  You need to set
15036 @code{nnimap-split-download-body} to @code{t} to do that
15037 (@pxref{Splitting in IMAP}).
15038
15039 @item (! @var{func} @var{split})
15040 If the split is a list, and the first element is @code{!}, then
15041 @var{split} will be processed, and @var{func} will be called as a
15042 function with the result of @var{split} as argument.  @var{func}
15043 should return a split.
15044
15045 @item nil
15046 If the split is @code{nil}, it is ignored.
15047
15048 @end table
15049
15050 In these splits, @var{field} must match a complete field name.
15051
15052 Normally, @var{value} in these splits must match a complete @emph{word}
15053 according to the fundamental mode syntax table.  In other words, all
15054 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15055 which are word delimiters.  Therefore, if you use the following split,
15056 for example,
15057
15058 @example
15059 (any "joe" "joemail")
15060 @end example
15061
15062 @noindent
15063 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15064 in @samp{joemail}.  If you want to alter this behavior, you can use any
15065 of the following three ways:
15066
15067 @enumerate
15068 @item
15069 @vindex nnmail-split-fancy-match-partial-words
15070 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15071 to non-@code{nil} in order to ignore word boundaries and instead the
15072 match becomes more like a grep.  This variable controls whether partial
15073 words are matched during fancy splitting.  The default value is
15074 @code{nil}.
15075
15076 Note that it influences all @var{value}'s in your split rules.
15077
15078 @item
15079 @var{value} beginning with @code{.*} ignores word boundaries in front of
15080 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15081 in the rear of a word will be ignored.  For example, the @var{value}
15082 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15083 @code{".*@@example\\.com"} does.
15084
15085 @item
15086 You can set the @var{invert-partial} flag in your split rules of the
15087 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15088 section.  If the flag is set, word boundaries on both sides of a word
15089 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15090 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15091 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15092 non-@code{nil}.  (New in Gnus 5.10.7)
15093 @end enumerate
15094
15095 @vindex nnmail-split-abbrev-alist
15096 @var{field} and @var{value} can also be Lisp symbols, in that case
15097 they are expanded as specified by the variable
15098 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15099 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15100 contains the associated value.  Predefined entries in
15101 @code{nnmail-split-abbrev-alist} include:
15102
15103 @table @code
15104 @item from
15105 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15106 @item to
15107 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15108 @samp{Resent-To} and @samp{Resent-Cc} fields.
15109 @item any
15110 Is the union of the @code{from} and @code{to} entries.
15111 @end table
15112
15113 @vindex nnmail-split-fancy-syntax-table
15114 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15115 when all this splitting is performed.
15116
15117 If you want to have Gnus create groups dynamically based on some
15118 information in the headers (i.e., do @code{replace-match}-like
15119 substitutions in the group names), you can say things like:
15120
15121 @example
15122 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15123 @end example
15124
15125 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15126 will be filed in @samp{mail.debian.foo}.
15127
15128 If the string contains the element @samp{\&}, then the previously
15129 matched string will be substituted.  Similarly, the elements @samp{\\1}
15130 up to @samp{\\9} will be substituted with the text matched by the
15131 groupings 1 through 9.
15132
15133 @vindex nnmail-split-lowercase-expanded
15134 Where @code{nnmail-split-lowercase-expanded} controls whether the
15135 lowercase of the matched string should be used for the substitution.
15136 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15137 groups when users send to an address using different case
15138 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15139 is @code{t}.
15140
15141 @findex nnmail-split-fancy-with-parent
15142 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15143 split followups into the same groups their parents are in.  Sometimes
15144 you can't make splitting rules for all your mail.  For example, your
15145 boss might send you personal mail regarding different projects you are
15146 working on, and as you can't tell your boss to put a distinguishing
15147 string into the subject line, you have to resort to manually moving the
15148 messages into the right group.  With this function, you only have to do
15149 it once per thread.
15150
15151 To use this feature, you have to set @code{nnmail-treat-duplicates}
15152 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15153 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15154 using the colon feature, like so:
15155 @lisp
15156 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15157       nnmail-cache-accepted-message-ids t
15158       nnmail-split-fancy
15159       '(| (: nnmail-split-fancy-with-parent)
15160           ;; @r{other splits go here}
15161         ))
15162 @end lisp
15163
15164 This feature works as follows: when @code{nnmail-treat-duplicates} is
15165 non-@code{nil}, Gnus records the message id of every message it sees
15166 in the file specified by the variable
15167 @code{nnmail-message-id-cache-file}, together with the group it is in
15168 (the group is omitted for non-mail messages).  When mail splitting is
15169 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15170 at the References (and In-Reply-To) header of each message to split
15171 and searches the file specified by @code{nnmail-message-id-cache-file}
15172 for the message ids.  When it has found a parent, it returns the
15173 corresponding group name unless the group name matches the regexp
15174 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15175 recommended that you set @code{nnmail-message-id-cache-length} to a
15176 somewhat higher number than the default so that the message ids are
15177 still in the cache.  (A value of 5000 appears to create a file some
15178 300 kBytes in size.)
15179 @vindex nnmail-cache-accepted-message-ids
15180 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15181 also records the message ids of moved articles, so that the followup
15182 messages goes into the new group.
15183
15184 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15185 want certain groups to be recorded in the cache.  For example, if all
15186 outgoing messages are written to an ``outgoing'' group, you could set
15187 @code{nnmail-cache-ignore-groups} to match that group name.
15188 Otherwise, answers to all your messages would end up in the
15189 ``outgoing'' group.
15190
15191
15192 @node Group Mail Splitting
15193 @subsection Group Mail Splitting
15194 @cindex mail splitting
15195 @cindex group mail splitting
15196
15197 @findex gnus-group-split
15198 If you subscribe to dozens of mailing lists but you don't want to
15199 maintain mail splitting rules manually, group mail splitting is for you.
15200 You just have to set @code{to-list} and/or @code{to-address} in group
15201 parameters or group customization and set @code{nnmail-split-methods} to
15202 @code{gnus-group-split}.  This splitting function will scan all groups
15203 for those parameters and split mail accordingly, i.e., messages posted
15204 from or to the addresses specified in the parameters @code{to-list} or
15205 @code{to-address} of a mail group will be stored in that group.
15206
15207 Sometimes, mailing lists have multiple addresses, and you may want mail
15208 splitting to recognize them all: just set the @code{extra-aliases} group
15209 parameter to the list of additional addresses and it's done.  If you'd
15210 rather use a regular expression, set @code{split-regexp}.
15211
15212 All these parameters in a group will be used to create an
15213 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
15214 the @var{value} is a single regular expression that matches
15215 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
15216 matches of @code{split-regexp}, and the @var{split} is the name of the
15217 group.  @var{restrict}s are also supported: just set the
15218 @code{split-exclude} parameter to a list of regular expressions.
15219
15220 If you can't get the right split to be generated using all these
15221 parameters, or you just need something fancier, you can set the
15222 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
15223 this case, all other aforementioned parameters will be ignored by
15224 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
15225 @code{nil}, in which case the group will be ignored by
15226 @code{gnus-group-split}.
15227
15228 @vindex gnus-group-split-default-catch-all-group
15229 @code{gnus-group-split} will do cross-posting on all groups that match,
15230 by defining a single @code{&} fancy split containing one split for each
15231 group.  If a message doesn't match any split, it will be stored in the
15232 group named in @code{gnus-group-split-default-catch-all-group}, unless
15233 some group has @code{split-spec} set to @code{catch-all}, in which case
15234 that group is used as the catch-all group.  Even though this variable is
15235 often used just to name a group, it may also be set to an arbitrarily
15236 complex fancy split (after all, a group name is a fancy split), and this
15237 may be useful to split mail that doesn't go to any mailing list to
15238 personal mail folders.  Note that this fancy split is added as the last
15239 element of a @code{|} split list that also contains a @code{&} split
15240 with the rules extracted from group parameters.
15241
15242 It's time for an example.  Assume the following group parameters have
15243 been defined:
15244
15245 @example
15246 nnml:mail.bar:
15247 ((to-address . "bar@@femail.com")
15248  (split-regexp . ".*@@femail\\.com"))
15249 nnml:mail.foo:
15250 ((to-list . "foo@@nowhere.gov")
15251  (extra-aliases "foo@@localhost" "foo-redist@@home")
15252  (split-exclude "bugs-foo" "rambling-foo")
15253  (admin-address . "foo-request@@nowhere.gov"))
15254 nnml:mail.others:
15255 ((split-spec . catch-all))
15256 @end example
15257
15258 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
15259 behave as if @code{nnmail-split-fancy} had been selected and variable
15260 @code{nnmail-split-fancy} had been set as follows:
15261
15262 @lisp
15263 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
15264       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
15265            - "bugs-foo" - "rambling-foo" "mail.foo"))
15266    "mail.others")
15267 @end lisp
15268
15269 @findex gnus-group-split-fancy
15270 If you'd rather not use group splitting for all your mail groups, you
15271 may use it for only some of them, by using @code{nnmail-split-fancy}
15272 splits like this:
15273
15274 @lisp
15275 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
15276 @end lisp
15277
15278 @var{groups} may be a regular expression or a list of group names whose
15279 parameters will be scanned to generate the output split.
15280 @var{no-crosspost} can be used to disable cross-posting; in this case, a
15281 single @code{|} split will be output.  @var{catch-all} is the fall back
15282 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
15283 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
15284 empty string in any selected group, no catch-all split will be issued.
15285 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
15286 this group will override the value of the @var{catch-all} argument.
15287
15288 @findex gnus-group-split-setup
15289 Unfortunately, scanning all groups and their parameters can be quite
15290 slow, especially considering that it has to be done for every message.
15291 But don't despair!  The function @code{gnus-group-split-setup} can be
15292 used to enable @code{gnus-group-split} in a much more efficient way.  It
15293 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
15294 @code{nnmail-split-fancy} to the split produced by
15295 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
15296 scanned once, no matter how many messages are split.
15297
15298 @findex gnus-group-split-update
15299 However, if you change group parameters, you'd have to update
15300 @code{nnmail-split-fancy} manually.  You can do it by running
15301 @code{gnus-group-split-update}.  If you'd rather have it updated
15302 automatically, just tell @code{gnus-group-split-setup} to do it for
15303 you.  For example, add to your @file{~/.gnus.el}:
15304
15305 @lisp
15306 (gnus-group-split-setup @var{auto-update} @var{catch-all})
15307 @end lisp
15308
15309 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
15310 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
15311 have to worry about updating @code{nnmail-split-fancy} again.  If you
15312 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
15313 @code{gnus-group-split-default-catch-all-group} will be set to its
15314 value.
15315
15316 @vindex gnus-group-split-updated-hook
15317 Because you may want to change @code{nnmail-split-fancy} after it is set
15318 by @code{gnus-group-split-update}, this function will run
15319 @code{gnus-group-split-updated-hook} just before finishing.
15320
15321 @node Incorporating Old Mail
15322 @subsection Incorporating Old Mail
15323 @cindex incorporating old mail
15324 @cindex import old mail
15325
15326 Most people have lots of old mail stored in various file formats.  If
15327 you have set up Gnus to read mail using one of the spiffy Gnus mail
15328 back ends, you'll probably wish to have that old mail incorporated into
15329 your mail groups.
15330
15331 Doing so can be quite easy.
15332
15333 To take an example: You're reading mail using @code{nnml}
15334 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
15335 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
15336 file filled with important, but old, mail.  You want to move it into
15337 your @code{nnml} groups.
15338
15339 Here's how:
15340
15341 @enumerate
15342 @item
15343 Go to the group buffer.
15344
15345 @item
15346 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
15347 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
15348
15349 @item
15350 Type @kbd{SPACE} to enter the newly created group.
15351
15352 @item
15353 Type @kbd{M P b} to process-mark all articles in this group's buffer
15354 (@pxref{Setting Process Marks}).
15355
15356 @item
15357 Type @kbd{B r} to respool all the process-marked articles, and answer
15358 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
15359 @end enumerate
15360
15361 All the mail messages in the mbox file will now also be spread out over
15362 all your @code{nnml} groups.  Try entering them and check whether things
15363 have gone without a glitch.  If things look ok, you may consider
15364 deleting the mbox file, but I wouldn't do that unless I was absolutely
15365 sure that all the mail has ended up where it should be.
15366
15367 Respooling is also a handy thing to do if you're switching from one mail
15368 back end to another.  Just respool all the mail in the old mail groups
15369 using the new mail back end.
15370
15371
15372 @node Expiring Mail
15373 @subsection Expiring Mail
15374 @cindex article expiry
15375 @cindex expiring mail
15376
15377 Traditional mail readers have a tendency to remove mail articles when
15378 you mark them as read, in some way.  Gnus takes a fundamentally
15379 different approach to mail reading.
15380
15381 Gnus basically considers mail just to be news that has been received in
15382 a rather peculiar manner.  It does not think that it has the power to
15383 actually change the mail, or delete any mail messages.  If you enter a
15384 mail group, and mark articles as ``read'', or kill them in some other
15385 fashion, the mail articles will still exist on the system.  I repeat:
15386 Gnus will not delete your old, read mail.  Unless you ask it to, of
15387 course.
15388
15389 To make Gnus get rid of your unwanted mail, you have to mark the
15390 articles as @dfn{expirable}.  (With the default key bindings, this means
15391 that you have to type @kbd{E}.)  This does not mean that the articles
15392 will disappear right away, however.  In general, a mail article will be
15393 deleted from your system if, 1) it is marked as expirable, AND 2) it is
15394 more than one week old.  If you do not mark an article as expirable, it
15395 will remain on your system until hell freezes over.  This bears
15396 repeating one more time, with some spurious capitalizations: IF you do
15397 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
15398
15399 You do not have to mark articles as expirable by hand.  Gnus provides
15400 two features, called ``auto-expire'' and ``total-expire'', that can help you
15401 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
15402 for you when you select an article.  And ``total-expire'' means that Gnus
15403 considers all articles as expirable that are read.  So, in addition to
15404 the articles marked @samp{E}, also the articles marked @samp{r},
15405 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
15406 expirable.
15407
15408 When should either auto-expire or total-expire be used?  Most people
15409 who are subscribed to mailing lists split each list into its own group
15410 and then turn on auto-expire or total-expire for those groups.
15411 (@xref{Splitting Mail}, for more information on splitting each list
15412 into its own group.)
15413
15414 Which one is better, auto-expire or total-expire?  It's not easy to
15415 answer.  Generally speaking, auto-expire is probably faster.  Another
15416 advantage of auto-expire is that you get more marks to work with: for
15417 the articles that are supposed to stick around, you can still choose
15418 between tick and dormant and read marks.  But with total-expire, you
15419 only have dormant and ticked to choose from.  The advantage of
15420 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
15421 Scoring}).  Auto-expire works with normal scoring but not with adaptive
15422 scoring.
15423
15424 @vindex gnus-auto-expirable-newsgroups
15425 Groups that match the regular expression
15426 @code{gnus-auto-expirable-newsgroups} will have all articles that you
15427 read marked as expirable automatically.  All articles marked as
15428 expirable have an @samp{E} in the first column in the summary buffer.
15429
15430 By default, if you have auto expiry switched on, Gnus will mark all the
15431 articles you read as expirable, no matter if they were read or unread
15432 before.  To avoid having articles marked as read marked as expirable
15433 automatically, you can put something like the following in your
15434 @file{~/.gnus.el} file:
15435
15436 @vindex gnus-mark-article-hook
15437 @lisp
15438 (remove-hook 'gnus-mark-article-hook
15439              'gnus-summary-mark-read-and-unread-as-read)
15440 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
15441 @end lisp
15442
15443 Note that making a group auto-expirable doesn't mean that all read
15444 articles are expired---only the articles marked as expirable
15445 will be expired.  Also note that using the @kbd{d} command won't make
15446 articles expirable---only semi-automatic marking of articles as read will
15447 mark the articles as expirable in auto-expirable groups.
15448
15449 Let's say you subscribe to a couple of mailing lists, and you want the
15450 articles you have read to disappear after a while:
15451
15452 @lisp
15453 (setq gnus-auto-expirable-newsgroups
15454       "mail.nonsense-list\\|mail.nice-list")
15455 @end lisp
15456
15457 Another way to have auto-expiry happen is to have the element
15458 @code{auto-expire} in the group parameters of the group.
15459
15460 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
15461 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
15462 don't really mix very well.
15463
15464 @vindex nnmail-expiry-wait
15465 The @code{nnmail-expiry-wait} variable supplies the default time an
15466 expirable article has to live.  Gnus starts counting days from when the
15467 message @emph{arrived}, not from when it was sent.  The default is seven
15468 days.
15469
15470 Gnus also supplies a function that lets you fine-tune how long articles
15471 are to live, based on what group they are in.  Let's say you want to
15472 have one month expiry period in the @samp{mail.private} group, a one day
15473 expiry period in the @samp{mail.junk} group, and a six day expiry period
15474 everywhere else:
15475
15476 @vindex nnmail-expiry-wait-function
15477 @lisp
15478 (setq nnmail-expiry-wait-function
15479       (lambda (group)
15480        (cond ((string= group "mail.private")
15481                31)
15482              ((string= group "mail.junk")
15483                1)
15484              ((string= group "important")
15485                'never)
15486              (t
15487                6))))
15488 @end lisp
15489
15490 The group names this function is fed are ``unadorned'' group
15491 names---no @samp{nnml:} prefixes and the like.
15492
15493 The @code{nnmail-expiry-wait} variable and
15494 @code{nnmail-expiry-wait-function} function can either be a number (not
15495 necessarily an integer) or one of the symbols @code{immediate} or
15496 @code{never}.
15497
15498 You can also use the @code{expiry-wait} group parameter to selectively
15499 change the expiry period (@pxref{Group Parameters}).
15500
15501 @vindex nnmail-expiry-target
15502 The normal action taken when expiring articles is to delete them.
15503 However, in some circumstances it might make more sense to move them
15504 to other groups instead of deleting them.  The variable
15505 @code{nnmail-expiry-target} (and the @code{expiry-target} group
15506 parameter) controls this.  The variable supplies a default value for
15507 all groups, which can be overridden for specific groups by the group
15508 parameter.  default value is @code{delete}, but this can also be a
15509 string (which should be the name of the group the message should be
15510 moved to), or a function (which will be called in a buffer narrowed to
15511 the message in question, and with the name of the group being moved
15512 from as its parameter) which should return a target---either a group
15513 name or @code{delete}.
15514
15515 Here's an example for specifying a group name:
15516 @lisp
15517 (setq nnmail-expiry-target "nnml:expired")
15518 @end lisp
15519
15520 @findex nnmail-fancy-expiry-target
15521 @vindex nnmail-fancy-expiry-targets
15522 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
15523 expire mail to groups according to the variable
15524 @code{nnmail-fancy-expiry-targets}.  Here's an example:
15525
15526 @lisp
15527  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
15528        nnmail-fancy-expiry-targets
15529        '((to-from "boss" "nnfolder:Work")
15530          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
15531          ("from" ".*" "nnfolder:Archive-%Y")))
15532 @end lisp
15533
15534 With this setup, any mail that has @code{IMPORTANT} in its Subject
15535 header and was sent in the year @code{YYYY} and month @code{MMM}, will
15536 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
15537 From or To header contains the string @code{boss}, it will get expired
15538 to @code{nnfolder:Work}.  All other mail will get expired to
15539 @code{nnfolder:Archive-YYYY}.
15540
15541 @vindex nnmail-keep-last-article
15542 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
15543 expire the final article in a mail newsgroup.  This is to make life
15544 easier for procmail users.
15545
15546 @vindex gnus-total-expirable-newsgroups
15547 By the way: That line up there, about Gnus never expiring non-expirable
15548 articles, is a lie.  If you put @code{total-expire} in the group
15549 parameters, articles will not be marked as expirable, but all read
15550 articles will be put through the expiry process.  Use with extreme
15551 caution.  Even more dangerous is the
15552 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
15553 this regexp will have all read articles put through the expiry process,
15554 which means that @emph{all} old mail articles in the groups in question
15555 will be deleted after a while.  Use with extreme caution, and don't come
15556 crying to me when you discover that the regexp you used matched the
15557 wrong group and all your important mail has disappeared.  Be a
15558 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
15559 with!  So there!
15560
15561 Most people make most of their mail groups total-expirable, though.
15562
15563 @vindex gnus-inhibit-user-auto-expire
15564 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
15565 commands will not mark an article as expirable, even if the group has
15566 auto-expire turned on.
15567
15568
15569 @node Washing Mail
15570 @subsection Washing Mail
15571 @cindex mail washing
15572 @cindex list server brain damage
15573 @cindex incoming mail treatment
15574
15575 Mailers and list servers are notorious for doing all sorts of really,
15576 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
15577 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
15578 end of all lines passing through our server, so let's do that!!!!1!''
15579 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
15580 considered to be self-evident were not discussed.  So.  Here we are.
15581
15582 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
15583 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
15584 be shocked and dismayed by this, but I haven't got the energy.  It is to
15585 laugh.
15586
15587 Gnus provides a plethora of functions for washing articles while
15588 displaying them, but it might be nicer to do the filtering before
15589 storing the mail to disk.  For that purpose, we have three hooks and
15590 various functions that can be put in these hooks.
15591
15592 @table @code
15593 @item nnmail-prepare-incoming-hook
15594 @vindex nnmail-prepare-incoming-hook
15595 This hook is called before doing anything with the mail and is meant for
15596 grand, sweeping gestures.  It is called in a buffer that contains all
15597 the new, incoming mail.  Functions to be used include:
15598
15599 @table @code
15600 @item nnheader-ms-strip-cr
15601 @findex nnheader-ms-strip-cr
15602 Remove trailing carriage returns from each line.  This is default on
15603 Emacs running on MS machines.
15604
15605 @end table
15606
15607 @item nnmail-prepare-incoming-header-hook
15608 @vindex nnmail-prepare-incoming-header-hook
15609 This hook is called narrowed to each header.  It can be used when
15610 cleaning up the headers.  Functions that can be used include:
15611
15612 @table @code
15613 @item nnmail-remove-leading-whitespace
15614 @findex nnmail-remove-leading-whitespace
15615 Clear leading white space that ``helpful'' listservs have added to the
15616 headers to make them look nice.  Aaah.
15617
15618 (Note that this function works on both the header on the body of all
15619 messages, so it is a potentially dangerous function to use (if a body
15620 of a message contains something that looks like a header line).  So
15621 rather than fix the bug, it is of course the right solution to make it
15622 into a feature by documenting it.)
15623
15624 @item nnmail-remove-list-identifiers
15625 @findex nnmail-remove-list-identifiers
15626 Some list servers add an identifier---for example, @samp{(idm)}---to the
15627 beginning of all @code{Subject} headers.  I'm sure that's nice for
15628 people who use stone age mail readers.  This function will remove
15629 strings that match the @code{nnmail-list-identifiers} regexp, which can
15630 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
15631 @code{\\(..\\)}.
15632
15633 For instance, if you want to remove the @samp{(idm)} and the
15634 @samp{nagnagnag} identifiers:
15635
15636 @lisp
15637 (setq nnmail-list-identifiers
15638       '("(idm)" "nagnagnag"))
15639 @end lisp
15640
15641 This can also be done non-destructively with
15642 @code{gnus-list-identifiers}, @xref{Article Hiding}.
15643
15644 @item nnmail-remove-tabs
15645 @findex nnmail-remove-tabs
15646 Translate all @samp{TAB} characters into @samp{SPACE} characters.
15647
15648 @item nnmail-ignore-broken-references
15649 @findex nnmail-ignore-broken-references
15650 @c @findex nnmail-fix-eudora-headers
15651 @cindex Eudora
15652 @cindex Pegasus
15653 Some mail user agents (e.g. Eudora and Pegasus) produce broken
15654 @code{References} headers, but correct @code{In-Reply-To} headers.  This
15655 function will get rid of the @code{References} header if the headers
15656 contain a line matching the regular expression
15657 @code{nnmail-broken-references-mailers}.
15658
15659 @end table
15660
15661 @item nnmail-prepare-incoming-message-hook
15662 @vindex nnmail-prepare-incoming-message-hook
15663 This hook is called narrowed to each message.  Functions to be used
15664 include:
15665
15666 @table @code
15667 @item article-de-quoted-unreadable
15668 @findex article-de-quoted-unreadable
15669 Decode Quoted Readable encoding.
15670
15671 @end table
15672 @end table
15673
15674
15675 @node Duplicates
15676 @subsection Duplicates
15677
15678 @vindex nnmail-treat-duplicates
15679 @vindex nnmail-message-id-cache-length
15680 @vindex nnmail-message-id-cache-file
15681 @cindex duplicate mails
15682 If you are a member of a couple of mailing lists, you will sometimes
15683 receive two copies of the same mail.  This can be quite annoying, so
15684 @code{nnmail} checks for and treats any duplicates it might find.  To do
15685 this, it keeps a cache of old @code{Message-ID}s---
15686 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
15687 default.  The approximate maximum number of @code{Message-ID}s stored
15688 there is controlled by the @code{nnmail-message-id-cache-length}
15689 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
15690 stored.) If all this sounds scary to you, you can set
15691 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
15692 default), and @code{nnmail} won't delete duplicate mails.  Instead it
15693 will insert a warning into the head of the mail saying that it thinks
15694 that this is a duplicate of a different message.
15695
15696 This variable can also be a function.  If that's the case, the function
15697 will be called from a buffer narrowed to the message in question with
15698 the @code{Message-ID} as a parameter.  The function must return either
15699 @code{nil}, @code{warn}, or @code{delete}.
15700
15701 You can turn this feature off completely by setting the variable to
15702 @code{nil}.
15703
15704 If you want all the duplicate mails to be put into a special
15705 @dfn{duplicates} group, you could do that using the normal mail split
15706 methods:
15707
15708 @lisp
15709 (setq nnmail-split-fancy
15710       '(| ;; @r{Messages duplicates go to a separate group.}
15711         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
15712         ;; @r{Message from daemons, postmaster, and the like to another.}
15713         (any mail "mail.misc")
15714         ;; @r{Other rules.}
15715         [...] ))
15716 @end lisp
15717 @noindent
15718 Or something like:
15719 @lisp
15720 (setq nnmail-split-methods
15721       '(("duplicates" "^Gnus-Warning:.*duplicate")
15722         ;; @r{Other rules.}
15723         [...]))
15724 @end lisp
15725
15726 Here's a neat feature: If you know that the recipient reads her mail
15727 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
15728 @code{delete}, you can send her as many insults as you like, just by
15729 using a @code{Message-ID} of a mail that you know that she's already
15730 received.  Think of all the fun!  She'll never see any of it!  Whee!
15731
15732
15733 @node Not Reading Mail
15734 @subsection Not Reading Mail
15735
15736 If you start using any of the mail back ends, they have the annoying
15737 habit of assuming that you want to read mail with them.  This might not
15738 be unreasonable, but it might not be what you want.
15739
15740 If you set @code{mail-sources} and @code{nnmail-spool-file} to
15741 @code{nil}, none of the back ends will ever attempt to read incoming
15742 mail, which should help.
15743
15744 @vindex nnbabyl-get-new-mail
15745 @vindex nnmbox-get-new-mail
15746 @vindex nnml-get-new-mail
15747 @vindex nnmh-get-new-mail
15748 @vindex nnfolder-get-new-mail
15749 This might be too much, if, for instance, you are reading mail quite
15750 happily with @code{nnml} and just want to peek at some old Rmail
15751 file you have stashed away with @code{nnbabyl}.  All back ends have
15752 variables called back-end-@code{get-new-mail}.  If you want to disable
15753 the @code{nnbabyl} mail reading, you edit the virtual server for the
15754 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
15755
15756 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
15757 narrowed to the article to be saved before saving it when reading
15758 incoming mail.
15759
15760
15761 @node Choosing a Mail Back End
15762 @subsection Choosing a Mail Back End
15763
15764 Gnus will read the mail spool when you activate a mail group.  The mail
15765 file is first copied to your home directory.  What happens after that
15766 depends on what format you want to store your mail in.
15767
15768 There are six different mail back ends in the standard Gnus, and more
15769 back ends are available separately.  The mail back end most people use
15770 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
15771 Spool}).
15772
15773 @menu
15774 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
15775 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
15776 * Mail Spool::                  Store your mail in a private spool?
15777 * MH Spool::                    An mhspool-like back end.
15778 * Maildir::                     Another one-file-per-message format.
15779 * Mail Folders::                Having one file for each group.
15780 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
15781 @end menu
15782
15783
15784 @node Unix Mail Box
15785 @subsubsection Unix Mail Box
15786 @cindex nnmbox
15787 @cindex unix mail box
15788
15789 @vindex nnmbox-active-file
15790 @vindex nnmbox-mbox-file
15791 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
15792 mail.  @code{nnmbox} will add extra headers to each mail article to say
15793 which group it belongs in.
15794
15795 Virtual server settings:
15796
15797 @table @code
15798 @item nnmbox-mbox-file
15799 @vindex nnmbox-mbox-file
15800 The name of the mail box in the user's home directory.  Default is
15801 @file{~/mbox}.
15802
15803 @item nnmbox-active-file
15804 @vindex nnmbox-active-file
15805 The name of the active file for the mail box.  Default is
15806 @file{~/.mbox-active}.
15807
15808 @item nnmbox-get-new-mail
15809 @vindex nnmbox-get-new-mail
15810 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
15811 into groups.  Default is @code{t}.
15812 @end table
15813
15814
15815 @node Rmail Babyl
15816 @subsubsection Rmail Babyl
15817 @cindex nnbabyl
15818 @cindex Rmail mbox
15819
15820 @vindex nnbabyl-active-file
15821 @vindex nnbabyl-mbox-file
15822 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
15823 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
15824 mail article to say which group it belongs in.
15825
15826 Virtual server settings:
15827
15828 @table @code
15829 @item nnbabyl-mbox-file
15830 @vindex nnbabyl-mbox-file
15831 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
15832
15833 @item nnbabyl-active-file
15834 @vindex nnbabyl-active-file
15835 The name of the active file for the rmail box.  The default is
15836 @file{~/.rmail-active}
15837
15838 @item nnbabyl-get-new-mail
15839 @vindex nnbabyl-get-new-mail
15840 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
15841 @code{t}
15842 @end table
15843
15844
15845 @node Mail Spool
15846 @subsubsection Mail Spool
15847 @cindex nnml
15848 @cindex mail @acronym{NOV} spool
15849
15850 The @dfn{nnml} spool mail format isn't compatible with any other known
15851 format.  It should be used with some caution.
15852
15853 @vindex nnml-directory
15854 If you use this back end, Gnus will split all incoming mail into files,
15855 one file for each mail, and put the articles into the corresponding
15856 directories under the directory specified by the @code{nnml-directory}
15857 variable.  The default value is @file{~/Mail/}.
15858
15859 You do not have to create any directories beforehand; Gnus will take
15860 care of all that.
15861
15862 If you have a strict limit as to how many files you are allowed to store
15863 in your account, you should not use this back end.  As each mail gets its
15864 own file, you might very well occupy thousands of inodes within a few
15865 weeks.  If this is no problem for you, and it isn't a problem for you
15866 having your friendly systems administrator walking around, madly,
15867 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
15868 know that this is probably the fastest format to use.  You do not have
15869 to trudge through a big mbox file just to read your new mail.
15870
15871 @code{nnml} is probably the slowest back end when it comes to article
15872 splitting.  It has to create lots of files, and it also generates
15873 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
15874 fastest back end when it comes to reading mail.
15875
15876 @cindex self contained nnml servers
15877 @cindex marks
15878 When the marks file is used (which it is by default), @code{nnml}
15879 servers have the property that you may backup them using @code{tar} or
15880 similar, and later be able to restore them into Gnus (by adding the
15881 proper @code{nnml} server) and have all your marks be preserved.  Marks
15882 for a group are usually stored in the @code{.marks} file (but see
15883 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
15884 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
15885 to restore the group (after restoring the backup into the nnml
15886 directory).
15887
15888 If for some reason you believe your @file{.marks} files are screwed
15889 up, you can just delete them all.  Gnus will then correctly regenerate
15890 them next time it starts.
15891
15892 Virtual server settings:
15893
15894 @table @code
15895 @item nnml-directory
15896 @vindex nnml-directory
15897 All @code{nnml} directories will be placed under this directory.  The
15898 default is the value of @code{message-directory} (whose default value
15899 is @file{~/Mail}).
15900
15901 @item nnml-active-file
15902 @vindex nnml-active-file
15903 The active file for the @code{nnml} server.  The default is
15904 @file{~/Mail/active}.
15905
15906 @item nnml-newsgroups-file
15907 @vindex nnml-newsgroups-file
15908 The @code{nnml} group descriptions file.  @xref{Newsgroups File
15909 Format}.  The default is @file{~/Mail/newsgroups}.
15910
15911 @item nnml-get-new-mail
15912 @vindex nnml-get-new-mail
15913 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
15914 @code{t}.
15915
15916 @item nnml-nov-is-evil
15917 @vindex nnml-nov-is-evil
15918 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15919 default is @code{nil}.
15920
15921 @item nnml-nov-file-name
15922 @vindex nnml-nov-file-name
15923 The name of the @acronym{NOV} files.  The default is @file{.overview}.
15924
15925 @item nnml-prepare-save-mail-hook
15926 @vindex nnml-prepare-save-mail-hook
15927 Hook run narrowed to an article before saving.
15928
15929 @item nnml-marks-is-evil
15930 @vindex nnml-marks-is-evil
15931 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15932 default is @code{nil}.
15933
15934 @item nnml-marks-file-name
15935 @vindex nnml-marks-file-name
15936 The name of the @dfn{marks} files.  The default is @file{.marks}.
15937
15938 @item nnml-use-compressed-files
15939 @vindex nnml-use-compressed-files
15940 If non-@code{nil}, @code{nnml} will allow using compressed message
15941 files.  This requires @code{auto-compression-mode} to be enabled
15942 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
15943 If the value of @code{nnml-use-compressed-files} is a string, it is used
15944 as the file extension specifying the compression program.  You can set it
15945 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
15946 equivalent to @samp{.gz}.
15947
15948 @item nnml-compressed-files-size-threshold
15949 @vindex nnml-compressed-files-size-threshold
15950 Default size threshold for compressed message files.  Message files with
15951 bodies larger than that many characters will be automatically compressed
15952 if @code{nnml-use-compressed-files} is non-@code{nil}.
15953
15954 @end table
15955
15956 @findex nnml-generate-nov-databases
15957 If your @code{nnml} groups and @acronym{NOV} files get totally out of
15958 whack, you can do a complete update by typing @kbd{M-x
15959 nnml-generate-nov-databases}.  This command will trawl through the
15960 entire @code{nnml} hierarchy, looking at each and every article, so it
15961 might take a while to complete.  A better interface to this
15962 functionality can be found in the server buffer (@pxref{Server
15963 Commands}).
15964
15965
15966 @node MH Spool
15967 @subsubsection MH Spool
15968 @cindex nnmh
15969 @cindex mh-e mail spool
15970
15971 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
15972 @acronym{NOV} databases and it doesn't keep an active file or marks
15973 file.  This makes @code{nnmh} a @emph{much} slower back end than
15974 @code{nnml}, but it also makes it easier to write procmail scripts
15975 for.
15976
15977 Virtual server settings:
15978
15979 @table @code
15980 @item nnmh-directory
15981 @vindex nnmh-directory
15982 All @code{nnmh} directories will be located under this directory.  The
15983 default is the value of @code{message-directory} (whose default is
15984 @file{~/Mail})
15985
15986 @item nnmh-get-new-mail
15987 @vindex nnmh-get-new-mail
15988 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
15989 @code{t}.
15990
15991 @item nnmh-be-safe
15992 @vindex nnmh-be-safe
15993 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
15994 sure that the articles in the folder are actually what Gnus thinks
15995 they are.  It will check date stamps and stat everything in sight, so
15996 setting this to @code{t} will mean a serious slow-down.  If you never
15997 use anything but Gnus to read the @code{nnmh} articles, you do not
15998 have to set this variable to @code{t}.  The default is @code{nil}.
15999 @end table
16000
16001
16002 @node Maildir
16003 @subsubsection Maildir
16004 @cindex nnmaildir
16005 @cindex maildir
16006
16007 @code{nnmaildir} stores mail in the maildir format, with each maildir
16008 corresponding to a group in Gnus.  This format is documented here:
16009 @uref{http://cr.yp.to/proto/maildir.html} and here:
16010 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16011 also stores extra information in the @file{.nnmaildir/} directory
16012 within a maildir.
16013
16014 Maildir format was designed to allow concurrent deliveries and
16015 reading, without needing locks.  With other back ends, you would have
16016 your mail delivered to a spool of some kind, and then you would
16017 configure Gnus to split mail from that spool into your groups.  You
16018 can still do that with @code{nnmaildir}, but the more common
16019 configuration is to have your mail delivered directly to the maildirs
16020 that appear as group in Gnus.
16021
16022 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16023 never corrupt its data in memory, and @code{SIGKILL} will never
16024 corrupt its data in the filesystem.
16025
16026 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16027 maildir.  So you can copy a whole maildir from one Gnus setup to
16028 another, and you will keep your marks.
16029
16030 Virtual server settings:
16031
16032 @table @code
16033 @item directory
16034 For each of your @code{nnmaildir} servers (it's very unlikely that
16035 you'd need more than one), you need to create a directory and populate
16036 it with maildirs or symlinks to maildirs (and nothing else; do not
16037 choose a directory already used for other purposes).  Each maildir
16038 will be represented in Gnus as a newsgroup on that server; the
16039 filename of the symlink will be the name of the group.  Any filenames
16040 in the directory starting with @samp{.} are ignored.  The directory is
16041 scanned when you first start Gnus, and each time you type @kbd{g} in
16042 the group buffer; if any maildirs have been removed or added,
16043 @code{nnmaildir} notices at these times.
16044
16045 The value of the @code{directory} parameter should be a Lisp form
16046 which is processed by @code{eval} and @code{expand-file-name} to get
16047 the path of the directory for this server.  The form is @code{eval}ed
16048 only when the server is opened; the resulting string is used until the
16049 server is closed.  (If you don't know about forms and @code{eval},
16050 don't worry---a simple string will work.)  This parameter is not
16051 optional; you must specify it.  I don't recommend using
16052 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16053 use that directory by default for various things, and may get confused
16054 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16055 value.
16056
16057 @item target-prefix
16058 This should be a Lisp form which is processed by @code{eval} and
16059 @code{expand-file-name}.  The form is @code{eval}ed only when the
16060 server is opened; the resulting string is used until the server is
16061 closed.
16062
16063 When you create a group on an @code{nnmaildir} server, the maildir is
16064 created with @code{target-prefix} prepended to its name, and a symlink
16065 pointing to that maildir is created, named with the plain group name.
16066 So if @code{directory} is @code{"~/.nnmaildir"} and
16067 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16068 the group @code{foo}, @code{nnmaildir} will create
16069 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16070 @file{~/.nnmaildir/foo} as a symlink pointing to
16071 @file{../maildirs/foo}.
16072
16073 You can set @code{target-prefix} to a string without any slashes to
16074 create both maildirs and symlinks in the same @code{directory}; in
16075 this case, any maildirs found in @code{directory} whose names start
16076 with @code{target-prefix} will not be listed as groups (but the
16077 symlinks pointing to them will be).
16078
16079 As a special case, if @code{target-prefix} is @code{""} (the default),
16080 then when you create a group, the maildir will be created in
16081 @code{directory} without a corresponding symlink.  Beware that you
16082 cannot use @code{gnus-group-delete-group} on such groups without the
16083 @code{force} argument.
16084
16085 @item directory-files
16086 This should be a function with the same interface as
16087 @code{directory-files} (such as @code{directory-files} itself).  It is
16088 used to scan the server's @code{directory} for maildirs.  This
16089 parameter is optional; the default is
16090 @code{nnheader-directory-files-safe} if
16091 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16092 @code{directory-files} otherwise.
16093 (@code{nnheader-directory-files-is-safe} is checked only once when the
16094 server is opened; if you want to check it each time the directory is
16095 scanned, you'll have to provide your own function that does that.)
16096
16097 @item get-new-mail
16098 If non-@code{nil}, then after scanning for new mail in the group
16099 maildirs themselves as usual, this server will also incorporate mail
16100 the conventional Gnus way, from @code{mail-sources} according to
16101 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16102 value is @code{nil}.
16103
16104 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16105 an @code{nnmaildir} group.  The results might happen to be useful, but
16106 that would be by chance, not by design, and the results might be
16107 different in the future.  If your split rules create new groups,
16108 remember to supply a @code{create-directory} server parameter.
16109 @end table
16110
16111 @subsubsection Group parameters
16112
16113 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16114 all this; the default behavior for @code{nnmaildir} is the same as the
16115 default behavior for other mail back ends: articles are deleted after
16116 one week, etc.  Except for the expiry parameters, all this
16117 functionality is unique to @code{nnmaildir}, so you can ignore it if
16118 you're just trying to duplicate the behavior you already have with
16119 another back end.
16120
16121 If the value of any of these parameters is a vector, the first element
16122 is evaluated as a Lisp form and the result is used, rather than the
16123 original value.  If the value is not a vector, the value itself is
16124 evaluated as a Lisp form.  (This is why these parameters use names
16125 different from those of other, similar parameters supported by other
16126 back ends: they have different, though similar, meanings.)  (For
16127 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16128 @code{eval} business again; for other values, remember to use an extra
16129 quote and wrap the value in a vector when appropriate.)
16130
16131 @table @code
16132 @item expire-age
16133 An integer specifying the minimum age, in seconds, of an article
16134 before it will be expired, or the symbol @code{never} to specify that
16135 articles should never be expired.  If this parameter is not set,
16136 @code{nnmaildir} falls back to the usual
16137 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16138 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16139 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16140 wanted a value of 3 days, you could use something like @code{[(* 3 24
16141 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16142 An article's age is measured starting from the article file's
16143 modification time.  Normally, this is the same as the article's
16144 delivery time, but editing an article makes it younger.  Moving an
16145 article (other than via expiry) may also make an article younger.
16146
16147 @item expire-group
16148 If this is set to a string such as a full Gnus group name, like
16149 @example
16150 "backend+server.address.string:group.name"
16151 @end example
16152 and if it is not the name of the same group that the parameter belongs
16153 to, then articles will be moved to the specified group during expiry
16154 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16155 group, the article will be just as old in the destination group as it
16156 was in the source group.}  So be careful with @code{expire-age} in the
16157 destination group.  If this is set to the name of the same group that
16158 the parameter belongs to, then the article is not expired at all.  If
16159 you use the vector form, the first element is evaluated once for each
16160 article.  So that form can refer to
16161 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16162 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16163 does not fall back to the @code{expiry-target} group parameter or the
16164 @code{nnmail-expiry-target} variable.}
16165
16166 @item read-only
16167 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16168 in this maildir as read-only.  This means: articles are not renamed
16169 from @file{new/} into @file{cur/}; articles are only found in
16170 @file{new/}, not @file{cur/}; articles are never deleted; articles
16171 cannot be edited.  @file{new/} is expected to be a symlink to the
16172 @file{new/} directory of another maildir---e.g., a system-wide mailbox
16173 containing a mailing list of common interest.  Everything in the
16174 maildir outside @file{new/} is @emph{not} treated as read-only, so for
16175 a shared mailbox, you do still need to set up your own maildir (or
16176 have write permission to the shared mailbox); your maildir just won't
16177 contain extra copies of the articles.
16178
16179 @item directory-files
16180 A function with the same interface as @code{directory-files}.  It is
16181 used to scan the directories in the maildir corresponding to this
16182 group to find articles.  The default is the function specified by the
16183 server's @code{directory-files} parameter.
16184
16185 @item distrust-Lines:
16186 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
16187 article, rather than use the @code{Lines:} header field.  If
16188 @code{nil}, the header field will be used if present.
16189
16190 @item always-marks
16191 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
16192 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16193 say that all articles have these marks, regardless of whether the
16194 marks stored in the filesystem say so.  This is a proof-of-concept
16195 feature that will probably be removed eventually; it ought to be done
16196 in Gnus proper, or abandoned if it's not worthwhile.
16197
16198 @item never-marks
16199 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
16200 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16201 say that no articles have these marks, regardless of whether the marks
16202 stored in the filesystem say so.  @code{never-marks} overrides
16203 @code{always-marks}.  This is a proof-of-concept feature that will
16204 probably be removed eventually; it ought to be done in Gnus proper, or
16205 abandoned if it's not worthwhile.
16206
16207 @item nov-cache-size
16208 An integer specifying the size of the @acronym{NOV} memory cache.  To
16209 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
16210 for a limited number of articles in each group.  (This is probably not
16211 worthwhile, and will probably be removed in the future.)  This
16212 parameter's value is noticed only the first time a group is seen after
16213 the server is opened---i.e., when you first start Gnus, typically.
16214 The @acronym{NOV} cache is never resized until the server is closed
16215 and reopened.  The default is an estimate of the number of articles
16216 that would be displayed in the summary buffer: a count of articles
16217 that are either marked with @code{tick} or not marked with
16218 @code{read}, plus a little extra.
16219 @end table
16220
16221 @subsubsection Article identification
16222 Articles are stored in the @file{cur/} subdirectory of each maildir.
16223 Each article file is named like @code{uniq:info}, where @code{uniq}
16224 contains no colons.  @code{nnmaildir} ignores, but preserves, the
16225 @code{:info} part.  (Other maildir readers typically use this part of
16226 the filename to store marks.)  The @code{uniq} part uniquely
16227 identifies the article, and is used in various places in the
16228 @file{.nnmaildir/} subdirectory of the maildir to store information
16229 about the corresponding article.  The full pathname of an article is
16230 available in the variable @code{nnmaildir-article-file-name} after you
16231 request the article in the summary buffer.
16232
16233 @subsubsection NOV data
16234 An article identified by @code{uniq} has its @acronym{NOV} data (used
16235 to generate lines in the summary buffer) stored in
16236 @code{.nnmaildir/nov/uniq}.  There is no
16237 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
16238 need for it---an article's @acronym{NOV} data is updated automatically
16239 when the article or @code{nnmail-extra-headers} has changed.)  You can
16240 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
16241 single article simply by deleting the corresponding @acronym{NOV}
16242 file, but @emph{beware}: this will also cause @code{nnmaildir} to
16243 assign a new article number for this article, which may cause trouble
16244 with @code{seen} marks, the Agent, and the cache.
16245
16246 @subsubsection Article marks
16247 An article identified by @code{uniq} is considered to have the mark
16248 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
16249 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
16250 looks for such files and reports the set of marks it finds.  When Gnus
16251 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
16252 creates and deletes the corresponding files as needed.  (Actually,
16253 rather than create a new file for each mark, it just creates hard
16254 links to @file{.nnmaildir/markfile}, to save inodes.)
16255
16256 You can invent new marks by creating a new directory in
16257 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
16258 your server, untar it later, and keep your marks.  You can add and
16259 remove marks yourself by creating and deleting mark files.  If you do
16260 this while Gnus is running and your @code{nnmaildir} server is open,
16261 it's best to exit all summary buffers for @code{nnmaildir} groups and
16262 type @kbd{s} in the group buffer first, and to type @kbd{g} or
16263 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
16264 pick up the changes, and might undo them.
16265
16266
16267 @node Mail Folders
16268 @subsubsection Mail Folders
16269 @cindex nnfolder
16270 @cindex mbox folders
16271 @cindex mail folders
16272
16273 @code{nnfolder} is a back end for storing each mail group in a
16274 separate file.  Each file is in the standard Un*x mbox format.
16275 @code{nnfolder} will add extra headers to keep track of article
16276 numbers and arrival dates.
16277
16278 @cindex self contained nnfolder servers
16279 @cindex marks
16280 When the marks file is used (which it is by default), @code{nnfolder}
16281 servers have the property that you may backup them using @code{tar} or
16282 similar, and later be able to restore them into Gnus (by adding the
16283 proper @code{nnfolder} server) and have all your marks be preserved.
16284 Marks for a group are usually stored in a file named as the mbox file
16285 with @code{.mrk} concatenated to it (but see
16286 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
16287 directory.  Individual @code{nnfolder} groups are also possible to
16288 backup, use @kbd{G m} to restore the group (after restoring the backup
16289 into the @code{nnfolder} directory).
16290
16291 Virtual server settings:
16292
16293 @table @code
16294 @item nnfolder-directory
16295 @vindex nnfolder-directory
16296 All the @code{nnfolder} mail boxes will be stored under this
16297 directory.  The default is the value of @code{message-directory}
16298 (whose default is @file{~/Mail})
16299
16300 @item nnfolder-active-file
16301 @vindex nnfolder-active-file
16302 The name of the active file.  The default is @file{~/Mail/active}.
16303
16304 @item nnfolder-newsgroups-file
16305 @vindex nnfolder-newsgroups-file
16306 The name of the group descriptions file.  @xref{Newsgroups File
16307 Format}.  The default is @file{~/Mail/newsgroups}
16308
16309 @item nnfolder-get-new-mail
16310 @vindex nnfolder-get-new-mail
16311 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
16312 default is @code{t}
16313
16314 @item nnfolder-save-buffer-hook
16315 @vindex nnfolder-save-buffer-hook
16316 @cindex backup files
16317 Hook run before saving the folders.  Note that Emacs does the normal
16318 backup renaming of files even with the @code{nnfolder} buffers.  If
16319 you wish to switch this off, you could say something like the
16320 following in your @file{.emacs} file:
16321
16322 @lisp
16323 (defun turn-off-backup ()
16324   (set (make-local-variable 'backup-inhibited) t))
16325
16326 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
16327 @end lisp
16328
16329 @item nnfolder-delete-mail-hook
16330 @vindex nnfolder-delete-mail-hook
16331 Hook run in a buffer narrowed to the message that is to be deleted.
16332 This function can be used to copy the message to somewhere else, or to
16333 extract some information from it before removing it.
16334
16335 @item nnfolder-nov-is-evil
16336 @vindex nnfolder-nov-is-evil
16337 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16338 default is @code{nil}.
16339
16340 @item nnfolder-nov-file-suffix
16341 @vindex nnfolder-nov-file-suffix
16342 The extension for @acronym{NOV} files.  The default is @file{.nov}.
16343
16344 @item nnfolder-nov-directory
16345 @vindex nnfolder-nov-directory
16346 The directory where the @acronym{NOV} files should be stored.  If
16347 @code{nil}, @code{nnfolder-directory} is used.
16348
16349 @item nnfolder-marks-is-evil
16350 @vindex nnfolder-marks-is-evil
16351 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16352 default is @code{nil}.
16353
16354 @item nnfolder-marks-file-suffix
16355 @vindex nnfolder-marks-file-suffix
16356 The extension for @sc{marks} files.  The default is @file{.mrk}.
16357
16358 @item nnfolder-marks-directory
16359 @vindex nnfolder-marks-directory
16360 The directory where the @sc{marks} files should be stored.  If
16361 @code{nil}, @code{nnfolder-directory} is used.
16362
16363 @end table
16364
16365
16366 @findex nnfolder-generate-active-file
16367 @kindex M-x nnfolder-generate-active-file
16368 If you have lots of @code{nnfolder}-like files you'd like to read with
16369 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
16370 command to make @code{nnfolder} aware of all likely files in
16371 @code{nnfolder-directory}.  This only works if you use long file names,
16372 though.
16373
16374 @node Comparing Mail Back Ends
16375 @subsubsection Comparing Mail Back Ends
16376
16377 First, just for terminology, the @dfn{back end} is the common word for a
16378 low-level access method---a transport, if you will, by which something
16379 is acquired.  The sense is that one's mail has to come from somewhere,
16380 and so selection of a suitable back end is required in order to get that
16381 mail within spitting distance of Gnus.
16382
16383 The same concept exists for Usenet itself: Though access to articles is
16384 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
16385 in the world got at Usenet by running a reader on the machine where the
16386 articles lay (the machine which today we call an @acronym{NNTP} server), and
16387 access was by the reader stepping into the articles' directory spool
16388 area directly.  One can still select between either the @code{nntp} or
16389 @code{nnspool} back ends, to select between these methods, if one happens
16390 actually to live on the server (or can see its spool directly, anyway,
16391 via NFS).
16392
16393 The goal in selecting a mail back end is to pick one which
16394 simultaneously represents a suitable way of dealing with the original
16395 format plus leaving mail in a form that is convenient to use in the
16396 future.  Here are some high and low points on each:
16397
16398 @table @code
16399 @item nnmbox
16400
16401 UNIX systems have historically had a single, very common, and well-
16402 defined format.  All messages arrive in a single @dfn{spool file}, and
16403 they are delineated by a line whose regular expression matches
16404 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
16405 to make it clear in this instance that this is not the RFC-specified
16406 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
16407 historically from the Unix environment, it is simplest if one does not
16408 mess a great deal with the original mailbox format, so if one chooses
16409 this back end, Gnus' primary activity in getting mail from the real spool
16410 area to Gnus' preferred directory is simply to copy it, with no
16411 (appreciable) format change in the process.  It is the ``dumbest'' way
16412 to move mail into availability in the Gnus environment.  This makes it
16413 fast to move into place, but slow to parse, when Gnus has to look at
16414 what's where.
16415
16416 @item nnbabyl
16417
16418 Once upon a time, there was the DEC-10 and DEC-20, running operating
16419 systems called TOPS and related things, and the usual (only?) mail
16420 reading environment was a thing called Babyl.  I don't know what format
16421 was used for mail landing on the system, but Babyl had its own internal
16422 format to which mail was converted, primarily involving creating a
16423 spool-file-like entity with a scheme for inserting Babyl-specific
16424 headers and status bits above the top of each message in the file.
16425 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
16426 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
16427 to understand the mail files folks already had in existence.  Gnus (and
16428 VM, for that matter) continue to support this format because it's
16429 perceived as having some good qualities in those mailer-specific
16430 headers/status bits stuff.  Rmail itself still exists as well, of
16431 course, and is still maintained by Stallman.
16432
16433 Both of the above forms leave your mail in a single file on your
16434 file system, and they must parse that entire file each time you take a
16435 look at your mail.
16436
16437 @item nnml
16438
16439 @code{nnml} is the back end which smells the most as though you were
16440 actually operating with an @code{nnspool}-accessed Usenet system.  (In
16441 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
16442 lo these years ago.)  One's mail is taken from the original spool file,
16443 and is then cut up into individual message files, 1:1.  It maintains a
16444 Usenet-style active file (analogous to what one finds in an INN- or
16445 CNews-based news system in (for instance) @file{/var/lib/news/active},
16446 or what is returned via the @samp{NNTP LIST} verb) and also creates
16447 @dfn{overview} files for efficient group entry, as has been defined for
16448 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
16449 due to the creation of lots of files, updates to the @code{nnml} active
16450 file, and additions to overview files on a per-message basis, but it is
16451 extremely fast on access because of what amounts to the indexing support
16452 provided by the active file and overviews.
16453
16454 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
16455 resource which defines available places in the file system to put new
16456 files.  Sysadmins take a dim view of heavy inode occupation within
16457 tight, shared file systems.  But if you live on a personal machine where
16458 the file system is your own and space is not at a premium, @code{nnml}
16459 wins big.
16460
16461 It is also problematic using this back end if you are living in a
16462 FAT16-based Windows world, since much space will be wasted on all these
16463 tiny files.
16464
16465 @item nnmh
16466
16467 The Rand MH mail-reading system has been around UNIX systems for a very
16468 long time; it operates by splitting one's spool file of messages into
16469 individual files, but with little or no indexing support---@code{nnmh}
16470 is considered to be semantically equivalent to ``@code{nnml} without
16471 active file or overviews''.  This is arguably the worst choice, because
16472 one gets the slowness of individual file creation married to the
16473 slowness of access parsing when learning what's new in one's groups.
16474
16475 @item nnfolder
16476
16477 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
16478 method described above) on a per-group basis.  That is, @code{nnmbox}
16479 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
16480 little bit of optimization to this so that each of one's mail groups has
16481 a Unix mail box file.  It's faster than @code{nnmbox} because each group
16482 can be parsed separately, and still provides the simple Unix mail box
16483 format requiring minimal effort in moving the mail around.  In addition,
16484 it maintains an ``active'' file making it much faster for Gnus to figure
16485 out how many messages there are in each separate group.
16486
16487 If you have groups that are expected to have a massive amount of
16488 messages, @code{nnfolder} is not the best choice, but if you receive
16489 only a moderate amount of mail, @code{nnfolder} is probably the most
16490 friendly mail back end all over.
16491
16492 @item nnmaildir
16493
16494 For configuring expiry and other things, @code{nnmaildir} uses
16495 incompatible group parameters, slightly different from those of other
16496 mail back ends.
16497
16498 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
16499 differences.  Each message is stored in a separate file, but the
16500 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
16501 also stores the equivalent of @code{nnml}'s overview files in one file
16502 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
16503 @code{df -i} to see how plentiful your inode supply is.)  If this slows
16504 you down or takes up very much space, consider switching to
16505 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
16506 file system.
16507
16508 Since maildirs don't require locking for delivery, the maildirs you use
16509 as groups can also be the maildirs your mail is directly delivered to.
16510 This means you can skip Gnus' mail splitting if your mail is already
16511 organized into different mailboxes during delivery.  A @code{directory}
16512 entry in @code{mail-sources} would have a similar effect, but would
16513 require one set of mailboxes for spooling deliveries (in mbox format,
16514 thus damaging message bodies), and another set to be used as groups (in
16515 whatever format you like).  A maildir has a built-in spool, in the
16516 @code{new/} subdirectory.  Beware that currently, mail moved from
16517 @code{new/} to @code{cur/} instead of via mail splitting will not
16518 undergo treatment such as duplicate checking.
16519
16520 @code{nnmaildir} stores article marks for a given group in the
16521 corresponding maildir, in a way designed so that it's easy to manipulate
16522 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
16523 else, and still have your marks.  @code{nnml} also stores marks, but
16524 it's not as easy to work with them from outside Gnus as with
16525 @code{nnmaildir}.
16526
16527 @code{nnmaildir} uses a significant amount of memory to speed things up.
16528 (It keeps in memory some of the things that @code{nnml} stores in files
16529 and that @code{nnmh} repeatedly parses out of message files.)  If this
16530 is a problem for you, you can set the @code{nov-cache-size} group
16531 parameter to something small (0 would probably not work, but 1 probably
16532 would) to make it use less memory.  This caching will probably be
16533 removed in the future.
16534
16535 Startup is likely to be slower with @code{nnmaildir} than with other
16536 back ends.  Everything else is likely to be faster, depending in part
16537 on your file system.
16538
16539 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
16540 to write an @code{nnmaildir}-derived back end.
16541
16542 @end table
16543
16544
16545 @node Browsing the Web
16546 @section Browsing the Web
16547 @cindex web
16548 @cindex browsing the web
16549 @cindex www
16550 @cindex http
16551
16552 Web-based discussion forums are getting more and more popular.  On many
16553 subjects, the web-based forums have become the most important forums,
16554 eclipsing the importance of mailing lists and news groups.  The reason
16555 is easy to understand---they are friendly to new users; you just point
16556 and click, and there's the discussion.  With mailing lists, you have to
16557 go through a cumbersome subscription procedure, and most people don't
16558 even know what a news group is.
16559
16560 The problem with this scenario is that web browsers are not very good at
16561 being newsreaders.  They do not keep track of what articles you've read;
16562 they do not allow you to score on subjects you're interested in; they do
16563 not allow off-line browsing; they require you to click around and drive
16564 you mad in the end.
16565
16566 So---if web browsers suck at reading discussion forums, why not use Gnus
16567 to do it instead?
16568
16569 Gnus has been getting a bit of a collection of back ends for providing
16570 interfaces to these sources.
16571
16572 @menu
16573 * Archiving Mail::
16574 * Web Searches::                Creating groups from articles that match a string.
16575 * Slashdot::                    Reading the Slashdot comments.
16576 * Ultimate::                    The Ultimate Bulletin Board systems.
16577 * Web Archive::                 Reading mailing list archived on web.
16578 * RSS::                         Reading RDF site summary.
16579 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
16580 @end menu
16581
16582 All the web sources require Emacs/W3 and the url library or those
16583 alternatives to work.
16584
16585 The main caveat with all these web sources is that they probably won't
16586 work for a very long time.  Gleaning information from the @acronym{HTML} data
16587 is guesswork at best, and when the layout is altered, the Gnus back end
16588 will fail.  If you have reasonably new versions of these back ends,
16589 though, you should be ok.
16590
16591 One thing all these Web methods have in common is that the Web sources
16592 are often down, unavailable or just plain too slow to be fun.  In those
16593 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
16594 Unplugged}) handle downloading articles, and then you can read them at
16595 leisure from your local disk.  No more World Wide Wait for you.
16596
16597 @node Archiving Mail
16598 @subsection Archiving Mail
16599 @cindex archiving mail
16600 @cindex backup of mail
16601
16602 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
16603 @code{nnmaildir}, now actually store the article marks with each group.
16604 For these servers, archiving and restoring a group while preserving
16605 marks is fairly simple.
16606
16607 (Preserving the group level and group parameters as well still
16608 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
16609 though.)
16610
16611 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
16612 server, take a recursive copy of the server directory.  There is no need
16613 to shut down Gnus, so archiving may be invoked by @code{cron} or
16614 similar.  You restore the data by restoring the directory tree, and
16615 adding a server definition pointing to that directory in Gnus.  The
16616 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
16617 might interfere with overwriting data, so you may want to shut down Gnus
16618 before you restore the data.
16619
16620 It is also possible to archive individual @code{nnml},
16621 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
16622 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
16623 directory.  For @code{nnfolder} you need to copy both the base folder
16624 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
16625 this example).  Restoring the group is done with @kbd{G m} from the Group
16626 buffer.  The last step makes Gnus notice the new directory.
16627 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
16628 is unnecessary in that case.
16629
16630 @node Web Searches
16631 @subsection Web Searches
16632 @cindex nnweb
16633 @cindex Google
16634 @cindex dejanews
16635 @cindex gmane
16636 @cindex Usenet searches
16637 @cindex searching the Usenet
16638
16639 It's, like, too neat to search the Usenet for articles that match a
16640 string, but it, like, totally @emph{sucks}, like, totally, to use one of
16641 those, like, Web browsers, and you, like, have to, rilly, like, look at
16642 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
16643 searches without having to use a browser.
16644
16645 The @code{nnweb} back end allows an easy interface to the mighty search
16646 engine.  You create an @code{nnweb} group, enter a search pattern, and
16647 then enter the group and read the articles like you would any normal
16648 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
16649 Groups}) will do this in an easy-to-use fashion.
16650
16651 @code{nnweb} groups don't really lend themselves to being solid
16652 groups---they have a very fleeting idea of article numbers.  In fact,
16653 each time you enter an @code{nnweb} group (not even changing the search
16654 pattern), you are likely to get the articles ordered in a different
16655 manner.  Not even using duplicate suppression (@pxref{Duplicate
16656 Suppression}) will help, since @code{nnweb} doesn't even know the
16657 @code{Message-ID} of the articles before reading them using some search
16658 engines (Google, for instance).  The only possible way to keep track
16659 of which articles you've read is by scoring on the @code{Date}
16660 header---mark all articles posted before the last date you read the
16661 group as read.
16662
16663 If the search engine changes its output substantially, @code{nnweb}
16664 won't be able to parse it and will fail.  One could hardly fault the Web
16665 providers if they were to do this---their @emph{raison d'@^etre} is to
16666 make money off of advertisements, not to provide services to the
16667 community.  Since @code{nnweb} washes the ads off all the articles, one
16668 might think that the providers might be somewhat miffed.  We'll see.
16669
16670 You must have the @code{url} and @code{W3} package or those alternatives
16671 (try @code{customize-group} on the @samp{mm-url} variable group)
16672 installed to be able to use @code{nnweb}.
16673
16674 Virtual server variables:
16675
16676 @table @code
16677 @item nnweb-type
16678 @vindex nnweb-type
16679 What search engine type is being used.  The currently supported types
16680 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
16681 @code{dejanews} is an alias to @code{google}.
16682
16683 @item nnweb-search
16684 @vindex nnweb-search
16685 The search string to feed to the search engine.
16686
16687 @item nnweb-max-hits
16688 @vindex nnweb-max-hits
16689 Advisory maximum number of hits per search to display.  The default is
16690 999.
16691
16692 @item nnweb-type-definition
16693 @vindex nnweb-type-definition
16694 Type-to-definition alist.  This alist says what @code{nnweb} should do
16695 with the various search engine types.  The following elements must be
16696 present:
16697
16698 @table @code
16699 @item article
16700 Function to decode the article and provide something that Gnus
16701 understands.
16702
16703 @item map
16704 Function to create an article number to message header and URL alist.
16705
16706 @item search
16707 Function to send the search string to the search engine.
16708
16709 @item address
16710 The address the aforementioned function should send the search string
16711 to.
16712
16713 @item id
16714 Format string URL to fetch an article by @code{Message-ID}.
16715 @end table
16716
16717 @end table
16718
16719
16720 @node Slashdot
16721 @subsection Slashdot
16722 @cindex Slashdot
16723 @cindex nnslashdot
16724
16725 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
16726 lively discussion following the news articles.  @code{nnslashdot} will
16727 let you read this forum in a convenient manner.
16728
16729 The easiest way to read this source is to put something like the
16730 following in your @file{~/.gnus.el} file:
16731
16732 @lisp
16733 (setq gnus-secondary-select-methods
16734       '((nnslashdot "")))
16735 @end lisp
16736
16737 This will make Gnus query the @code{nnslashdot} back end for new comments
16738 and groups.  The @kbd{F} command will subscribe each new news article as
16739 a new Gnus group, and you can read the comments by entering these
16740 groups.  (Note that the default subscription method is to subscribe new
16741 groups as zombies.  Other methods are available (@pxref{Subscription
16742 Methods}).
16743
16744 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
16745 command is the most handy tool (@pxref{Foreign Groups}).
16746
16747 When following up to @code{nnslashdot} comments (or posting new
16748 comments), some light @acronym{HTML}izations will be performed.  In
16749 particular, text quoted with @samp{> } will be quoted with
16750 @samp{blockquote} instead, and signatures will have @samp{br} added to
16751 the end of each line.  Other than that, you can just write @acronym{HTML}
16752 directly into the message buffer.  Note that Slashdot filters out some
16753 @acronym{HTML} forms.
16754
16755 The following variables can be altered to change its behavior:
16756
16757 @table @code
16758 @item nnslashdot-threaded
16759 Whether @code{nnslashdot} should display threaded groups or not.  The
16760 default is @code{t}.  To be able to display threads, @code{nnslashdot}
16761 has to retrieve absolutely all comments in a group upon entry.  If a
16762 threaded display is not required, @code{nnslashdot} will only retrieve
16763 the comments that are actually wanted by the user.  Threading is nicer,
16764 but much, much slower than unthreaded.
16765
16766 @item nnslashdot-login-name
16767 @vindex nnslashdot-login-name
16768 The login name to use when posting.
16769
16770 @item nnslashdot-password
16771 @vindex nnslashdot-password
16772 The password to use when posting.
16773
16774 @item nnslashdot-directory
16775 @vindex nnslashdot-directory
16776 Where @code{nnslashdot} will store its files.  The default is
16777 @file{~/News/slashdot/}.
16778
16779 @item nnslashdot-active-url
16780 @vindex nnslashdot-active-url
16781 The @acronym{URL} format string that will be used to fetch the
16782 information on news articles and comments.  The default is@*
16783 @samp{http://slashdot.org/search.pl?section=&min=%d}.
16784
16785 @item nnslashdot-comments-url
16786 @vindex nnslashdot-comments-url
16787 The @acronym{URL} format string that will be used to fetch comments.
16788
16789 @item nnslashdot-article-url
16790 @vindex nnslashdot-article-url
16791 The @acronym{URL} format string that will be used to fetch the news
16792 article.  The default is
16793 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
16794
16795 @item nnslashdot-threshold
16796 @vindex nnslashdot-threshold
16797 The score threshold.  The default is -1.
16798
16799 @item nnslashdot-group-number
16800 @vindex nnslashdot-group-number
16801 The number of old groups, in addition to the ten latest, to keep
16802 updated.  The default is 0.
16803
16804 @end table
16805
16806
16807
16808 @node Ultimate
16809 @subsection Ultimate
16810 @cindex nnultimate
16811 @cindex Ultimate Bulletin Board
16812
16813 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
16814 probably the most popular Web bulletin board system used.  It has a
16815 quite regular and nice interface, and it's possible to get the
16816 information Gnus needs to keep groups updated.
16817
16818 The easiest way to get started with @code{nnultimate} is to say
16819 something like the following in the group buffer:  @kbd{B nnultimate RET
16820 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
16821 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
16822 you're interested in; there's quite a list of them on the Ultimate web
16823 site.)  Then subscribe to the groups you're interested in from the
16824 server buffer, and read them from the group buffer.
16825
16826 The following @code{nnultimate} variables can be altered:
16827
16828 @table @code
16829 @item nnultimate-directory
16830 @vindex nnultimate-directory
16831 The directory where @code{nnultimate} stores its files.  The default is@*
16832 @file{~/News/ultimate/}.
16833 @end table
16834
16835
16836 @node Web Archive
16837 @subsection Web Archive
16838 @cindex nnwarchive
16839 @cindex Web Archive
16840
16841 Some mailing lists only have archives on Web servers, such as
16842 @uref{http://www.egroups.com/} and
16843 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
16844 interface, and it's possible to get the information Gnus needs to keep
16845 groups updated.
16846
16847 @findex gnus-group-make-warchive-group
16848 The easiest way to get started with @code{nnwarchive} is to say
16849 something like the following in the group buffer: @kbd{M-x
16850 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
16851 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
16852 @var{an_egroup} with the mailing list you subscribed, the
16853 @var{your@@email.address} with your email address.), or to browse the
16854 back end by @kbd{B nnwarchive RET mail-archive RET}.
16855
16856 The following @code{nnwarchive} variables can be altered:
16857
16858 @table @code
16859 @item nnwarchive-directory
16860 @vindex nnwarchive-directory
16861 The directory where @code{nnwarchive} stores its files.  The default is@*
16862 @file{~/News/warchive/}.
16863
16864 @item nnwarchive-login
16865 @vindex nnwarchive-login
16866 The account name on the web server.
16867
16868 @item nnwarchive-passwd
16869 @vindex nnwarchive-passwd
16870 The password for your account on the web server.
16871 @end table
16872
16873 @node RSS
16874 @subsection RSS
16875 @cindex nnrss
16876 @cindex RSS
16877
16878 Some web sites have an RDF Site Summary (@acronym{RSS}).
16879 @acronym{RSS} is a format for summarizing headlines from news related
16880 sites (such as BBC or CNN).  But basically anything list-like can be
16881 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
16882 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
16883
16884 @acronym{RSS} has a quite regular and nice interface, and it's
16885 possible to get the information Gnus needs to keep groups updated.
16886
16887 Note: you had better use Emacs which supports the @code{utf-8} coding
16888 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
16889 text by default.  It is also used by default for non-@acronym{ASCII}
16890 group names.
16891
16892 @kindex G R (Group)
16893 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
16894 prompted for the location, the title and the description of the feed.
16895 The title, which allows any characters, will be used for the group name
16896 and the name of the group data file.  The description can be omitted.
16897
16898 An easy way to get started with @code{nnrss} is to say something like
16899 the following in the group buffer: @kbd{B nnrss RET RET y}, then
16900 subscribe to groups.
16901
16902 The @code{nnrss} back end saves the group data file in
16903 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
16904 names containing non-@acronym{ASCII} characters will be encoded by the
16905 coding system specified with the @code{nnmail-pathname-coding-system}
16906 variable.  If it is @code{nil}, in Emacs the coding system defaults to
16907 the value of @code{default-file-name-coding-system}.  If you are using
16908 XEmacs and want to use non-@acronym{ASCII} group names, you should set
16909 the value for the @code{nnmail-pathname-coding-system} variable properly.
16910
16911 The @code{nnrss} back end generates @samp{multipart/alternative}
16912 @acronym{MIME} articles in which each contains a @samp{text/plain} part
16913 and a @samp{text/html} part.
16914
16915 @cindex OPML
16916 You can also use the following commands to import and export your
16917 subscriptions from a file in @acronym{OPML} format (Outline Processor
16918 Markup Language).
16919
16920 @defun nnrss-opml-import file
16921 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
16922 file.
16923 @end defun
16924
16925 @defun nnrss-opml-export
16926 Write your current @acronym{RSS} subscriptions to a buffer in
16927 @acronym{OPML} format.
16928 @end defun
16929
16930 The following @code{nnrss} variables can be altered:
16931
16932 @table @code
16933 @item nnrss-directory
16934 @vindex nnrss-directory
16935 The directory where @code{nnrss} stores its files.  The default is
16936 @file{~/News/rss/}.
16937
16938 @item nnrss-file-coding-system
16939 @vindex nnrss-file-coding-system
16940 The coding system used when reading and writing the @code{nnrss} groups
16941 data files.  The default is the value of
16942 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
16943 in Emacs or @code{escape-quoted} in XEmacs).
16944
16945 @item nnrss-ignore-article-fields
16946 @vindex nnrss-ignore-article-fields
16947 Some feeds update constantly article fields during their publications,
16948 e.g. to indicate the number of comments.  However, if there is
16949 a difference between the local article and the distant one, the latter
16950 is considered to be new.  To avoid this and discard some fields, set this
16951 variable to the list of fields to be ignored.  The default is
16952 @code{'(slash:comments)}.
16953
16954 @item nnrss-use-local
16955 @vindex nnrss-use-local
16956 @findex nnrss-generate-download-script
16957 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
16958 the feeds from local files in @code{nnrss-directory}.  You can use
16959 the command @code{nnrss-generate-download-script} to generate a
16960 download script using @command{wget}.
16961
16962 @item nnrss-wash-html-in-text-plain-parts
16963 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
16964 parts as @acronym{HTML}.  The function specified by the
16965 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
16966 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
16967 to render text.  If it is @code{nil}, which is the default, text will
16968 simply be folded.  Leave it @code{nil} if you prefer to see
16969 @samp{text/html} parts.
16970 @end table
16971
16972 The following code may be helpful, if you want to show the description in
16973 the summary buffer.
16974
16975 @lisp
16976 (add-to-list 'nnmail-extra-headers nnrss-description-field)
16977 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
16978
16979 (defun gnus-user-format-function-X (header)
16980   (let ((descr
16981          (assq nnrss-description-field (mail-header-extra header))))
16982     (if descr (concat "\n\t" (cdr descr)) "")))
16983 @end lisp
16984
16985 The following code may be useful to open an nnrss url directly from the
16986 summary buffer.
16987
16988 @lisp
16989 (require 'browse-url)
16990
16991 (defun browse-nnrss-url (arg)
16992   (interactive "p")
16993   (let ((url (assq nnrss-url-field
16994                    (mail-header-extra
16995                     (gnus-data-header
16996                      (assq (gnus-summary-article-number)
16997                            gnus-newsgroup-data))))))
16998     (if url
16999         (progn
17000           (browse-url (cdr url))
17001           (gnus-summary-mark-as-read-forward 1))
17002       (gnus-summary-scroll-up arg))))
17003
17004 (eval-after-load "gnus"
17005   #'(define-key gnus-summary-mode-map
17006       (kbd "<RET>") 'browse-nnrss-url))
17007 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17008 @end lisp
17009
17010 Even if you have added @samp{text/html} to the
17011 @code{mm-discouraged-alternatives} variable (@pxref{Display
17012 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17013 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17014 more useful especially in @code{nnrss} groups to display
17015 @samp{text/html} parts.  Here's an example of setting
17016 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17017 Parameters}) in order to display @samp{text/html} parts only in
17018 @code{nnrss} groups:
17019
17020 @lisp
17021 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17022 (eval-after-load "gnus-sum"
17023   '(add-to-list
17024     'gnus-newsgroup-variables
17025     '(mm-discouraged-alternatives
17026       . '("text/html" "image/.*"))))
17027
17028 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17029 (add-to-list
17030  'gnus-parameters
17031  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17032 @end lisp
17033
17034
17035 @node Customizing W3
17036 @subsection Customizing W3
17037 @cindex W3
17038 @cindex html
17039 @cindex url
17040 @cindex Netscape
17041
17042 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17043 alternatives) to display web pages.  Emacs/W3 is documented in its own
17044 manual, but there are some things that may be more relevant for Gnus
17045 users.
17046
17047 For instance, a common question is how to make Emacs/W3 follow links
17048 using the @code{browse-url} functions (which will call some external web
17049 browser like Netscape).  Here's one way:
17050
17051 @lisp
17052 (eval-after-load "w3"
17053   '(progn
17054     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17055     (defun w3-fetch (&optional url target)
17056       (interactive (list (w3-read-url-with-default)))
17057       (if (eq major-mode 'gnus-article-mode)
17058           (browse-url url)
17059         (w3-fetch-orig url target)))))
17060 @end lisp
17061
17062 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17063 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17064 follow the link.
17065
17066
17067 @node IMAP
17068 @section IMAP
17069 @cindex nnimap
17070 @cindex @acronym{IMAP}
17071
17072 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17073 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17074 server is much similar to connecting to a news server, you just
17075 specify the network address of the server.
17076
17077 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17078 everything that @acronym{POP} can, it can hence be viewed as a
17079 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17080 similar to @acronym{NNTP} being a news storage protocol---however,
17081 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17082 is more or less read-only whereas mail is read-write.
17083
17084 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17085 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17086 the @acronym{IMAP} server and store them on the local disk.  This is
17087 not the usage described in this section---@xref{Mail Sources}.
17088
17089 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17090 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17091 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17092 usage explained in this section.
17093
17094 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17095 servers might look something like the following.  (Note that for
17096 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17097 see below.)
17098
17099 @lisp
17100 (setq gnus-secondary-select-methods
17101       '((nnimap "simpleserver") ; @r{no special configuration}
17102         ; @r{perhaps a ssh port forwarded server:}
17103         (nnimap "dolk"
17104                 (nnimap-address "localhost")
17105                 (nnimap-server-port 1430))
17106         ; @r{a UW server running on localhost}
17107         (nnimap "barbar"
17108                 (nnimap-server-port 143)
17109                 (nnimap-address "localhost")
17110                 (nnimap-list-pattern ("INBOX" "mail/*")))
17111         ; @r{anonymous public cyrus server:}
17112         (nnimap "cyrus.andrew.cmu.edu"
17113                 (nnimap-authenticator anonymous)
17114                 (nnimap-list-pattern "archive.*")
17115                 (nnimap-stream network))
17116         ; @r{a ssl server on a non-standard port:}
17117         (nnimap "vic20"
17118                 (nnimap-address "vic20.somewhere.com")
17119                 (nnimap-server-port 9930)
17120                 (nnimap-stream ssl))))
17121 @end lisp
17122
17123 After defining the new server, you can subscribe to groups on the
17124 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17125 (@pxref{Subscription Commands}) or via the Server Buffer
17126 (@pxref{Server Buffer}).
17127
17128 The following variables can be used to create a virtual @code{nnimap}
17129 server:
17130
17131 @table @code
17132
17133 @item nnimap-address
17134 @vindex nnimap-address
17135
17136 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17137 server name if not specified.
17138
17139 @item nnimap-server-port
17140 @vindex nnimap-server-port
17141 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17142
17143 Note that this should be an integer, example server specification:
17144
17145 @lisp
17146 (nnimap "mail.server.com"
17147         (nnimap-server-port 4711))
17148 @end lisp
17149
17150 @item nnimap-list-pattern
17151 @vindex nnimap-list-pattern
17152 String or list of strings of mailboxes to limit available groups to.
17153 This is used when the server has very many mailboxes and you're only
17154 interested in a few---some servers export your home directory via
17155 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17156 @file{~/Mail/*} then.
17157
17158 The string can also be a cons of REFERENCE and the string as above, what
17159 REFERENCE is used for is server specific, but on the University of
17160 Washington server it's a directory that will be concatenated with the
17161 mailbox.
17162
17163 Example server specification:
17164
17165 @lisp
17166 (nnimap "mail.server.com"
17167         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17168                                ("~friend/Mail/" . "list/*"))))
17169 @end lisp
17170
17171 @item nnimap-stream
17172 @vindex nnimap-stream
17173 The type of stream used to connect to your server.  By default, nnimap
17174 will detect and automatically use all of the below, with the exception
17175 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17176 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17177 be automatically detected, but it's not widely deployed yet.)
17178
17179 Example server specification:
17180
17181 @lisp
17182 (nnimap "mail.server.com"
17183         (nnimap-stream ssl))
17184 @end lisp
17185
17186 Please note that the value of @code{nnimap-stream} is a symbol!
17187
17188 @itemize @bullet
17189 @item
17190 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17191 @samp{gsasl} or @samp{imtest} program.
17192 @item
17193 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17194 @item
17195 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17196 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17197 @samp{starttls}.
17198 @item
17199 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17200 @samp{gnutls-cli}).
17201 @item
17202 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17203 @samp{openssl}) or SSLeay (@samp{s_client}).
17204 @item
17205 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17206 @item
17207 @dfn{network:} Plain, TCP/IP network connection.
17208 @end itemize
17209
17210 @vindex imap-kerberos4-program
17211 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17212 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17213 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17214 to make @code{imap.el} use a pty instead of a pipe when communicating
17215 with @samp{imtest}.  You will then suffer from a line length
17216 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17217 indefinitely if you have many articles in a mailbox.  The variable
17218 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17219 program.
17220
17221 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17222 needed.  It is available from
17223 @uref{http://www.gnu.org/software/gnutls/}.
17224
17225 @vindex imap-gssapi-program
17226 This parameter specifies a list of command lines that invoke a GSSAPI
17227 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17228 sequentially until a connection is made, or the list has been
17229 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17230 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17231 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17232 tried.
17233
17234 @vindex imap-ssl-program
17235 For @acronym{SSL} connections, the OpenSSL program is available from
17236 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17237 and nnimap support it too---although the most recent versions of
17238 SSLeay, 0.9.x, are known to have serious bugs making it
17239 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17240 work.  The variable @code{imap-ssl-program} contain parameters to pass
17241 to OpenSSL/SSLeay.
17242
17243 @vindex imap-shell-program
17244 @vindex imap-shell-host
17245 For @acronym{IMAP} connections using the @code{shell} stream, the
17246 variable @code{imap-shell-program} specify what program to call.  Make
17247 sure nothing is interfering with the output of the program, e.g., don't
17248 forget to redirect the error output to the void.
17249
17250 @item nnimap-authenticator
17251 @vindex nnimap-authenticator
17252
17253 The authenticator used to connect to the server.  By default, nnimap
17254 will use the most secure authenticator your server is capable of.
17255
17256 Example server specification:
17257
17258 @lisp
17259 (nnimap "mail.server.com"
17260         (nnimap-authenticator anonymous))
17261 @end lisp
17262
17263 Please note that the value of @code{nnimap-authenticator} is a symbol!
17264
17265 @itemize @bullet
17266 @item
17267 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
17268 external program @code{gsasl} or @code{imtest}.
17269 @item
17270 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
17271 @code{imtest}.
17272 @item
17273 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
17274 external library @code{digest-md5.el}.
17275 @item
17276 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
17277 @item
17278 @dfn{login:} Plain-text username/password via LOGIN.
17279 @item
17280 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
17281 @end itemize
17282
17283 @item nnimap-expunge-on-close
17284 @cindex expunging
17285 @vindex nnimap-expunge-on-close
17286 Unlike Parmenides the @acronym{IMAP} designers have decided things that
17287 don't exist actually do exist.  More specifically, @acronym{IMAP} has
17288 this concept of marking articles @code{Deleted} which doesn't actually
17289 delete them, and this (marking them @code{Deleted}, that is) is what
17290 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
17291 similar).
17292
17293 Since the articles aren't really removed when we mark them with the
17294 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
17295 running in circles yet?
17296
17297 Traditionally, nnimap has removed all articles marked as @code{Deleted}
17298 when closing a mailbox but this is now configurable by this server
17299 variable.
17300
17301 The possible options are:
17302
17303 @table @code
17304
17305 @item always
17306 The default behavior, delete all articles marked as ``Deleted'' when
17307 closing a mailbox.
17308 @item never
17309 Never actually delete articles.  Currently there is no way of showing
17310 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
17311 may allow you to do this.  If you ever want to run the EXPUNGE command
17312 manually, @xref{Expunging mailboxes}.
17313 @item ask
17314 When closing mailboxes, nnimap will ask if you wish to expunge deleted
17315 articles or not.
17316
17317 @end table
17318
17319 @item nnimap-importantize-dormant
17320 @vindex nnimap-importantize-dormant
17321
17322 If non-@code{nil} (the default), marks dormant articles as ticked (as
17323 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
17324 naturally still (only) be marked as dormant.  This is to make dormant
17325 articles stand out, just like ticked articles, in other @acronym{IMAP}
17326 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
17327 has only one.)
17328
17329 Probably the only reason for frobbing this would be if you're trying
17330 enable per-user persistent dormant flags, using something like:
17331
17332 @lisp
17333 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
17334         (format "gnus-dormant-%s" (user-login-name)))
17335 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
17336         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
17337 @end lisp
17338
17339 In this case, you would not want the per-user dormant flag showing up
17340 as ticked for other users.
17341
17342 @item nnimap-expunge-search-string
17343 @cindex expunging
17344 @vindex nnimap-expunge-search-string
17345 @cindex expiring @acronym{IMAP} mail
17346
17347 This variable contain the @acronym{IMAP} search command sent to server when
17348 searching for articles eligible for expiring.  The default is
17349 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
17350 UID set and the second @code{%s} is replaced by a date.
17351
17352 Probably the only useful value to change this to is
17353 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
17354 messages instead of the internal article date.  See section 6.4.4 of
17355 RFC 2060 for more information on valid strings.
17356
17357 However, if @code{nnimap-search-uids-not-since-is-evil}
17358 is true, this variable has no effect since the search logic
17359 is reversed, as described below.
17360
17361 @item nnimap-authinfo-file
17362 @vindex nnimap-authinfo-file
17363
17364 A file containing credentials used to log in on servers.  The format is
17365 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
17366 variable @code{nntp-authinfo-file} for exact syntax; also see
17367 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
17368
17369 @example
17370 machine students.uio.no login larsi password geheimnis port imap
17371 @end example
17372
17373 Note that it should be @code{port imap}, or @code{port 143}, if you
17374 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
17375 actual port number used is port 993 for secured IMAP.  For
17376 convenience, Gnus will accept @code{port imaps} as a synonym of
17377 @code{port imap}.
17378
17379 @item nnimap-need-unselect-to-notice-new-mail
17380 @vindex nnimap-need-unselect-to-notice-new-mail
17381
17382 Unselect mailboxes before looking for new mail in them.  Some servers
17383 seem to need this under some circumstances; it was reported that
17384 Courier 1.7.1 did.
17385
17386 @item nnimap-nov-is-evil
17387 @vindex nnimap-nov-is-evil
17388 @cindex Courier @acronym{IMAP} server
17389 @cindex @acronym{NOV}
17390
17391 Never generate or use a local @acronym{NOV} database. Defaults to the
17392 value of @code{gnus-agent}.
17393
17394 Using a @acronym{NOV} database usually makes header fetching much
17395 faster, but it uses the @code{UID SEARCH UID} command, which is very
17396 slow on some servers (notably some versions of Courier). Since the Gnus
17397 Agent caches the information in the @acronym{NOV} database without using
17398 the slow command, this variable defaults to true if the Agent is in use,
17399 and false otherwise.
17400
17401 @item nnimap-search-uids-not-since-is-evil
17402 @vindex nnimap-search-uids-not-since-is-evil
17403 @cindex Courier @acronym{IMAP} server
17404 @cindex expiring @acronym{IMAP} mail
17405
17406 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
17407 @var{date}} command, which is slow on some @acronym{IMAP} servers
17408 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
17409 @var{date}} and prune the list of expirable articles within Gnus.
17410
17411 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
17412 list of expirable articles and asks the IMAP server questions like ``Of
17413 these articles, which ones are older than a week?'' While this seems
17414 like a perfectly reasonable question, some IMAP servers take a long time
17415 to answer it, since they seemingly go looking into every old article to
17416 see if it is one of the expirable ones. Curiously, the question ``Of
17417 @emph{all} articles, which ones are newer than a week?'' seems to be
17418 much faster to answer, so setting this variable causes Gnus to ask this
17419 question and figure out the answer to the real question itself.
17420
17421 This problem can really sneak up on you: when you first configure Gnus,
17422 everything works fine, but once you accumulate a couple thousand
17423 messages, you start cursing Gnus for being so slow. On the other hand,
17424 if you get a lot of email within a week, setting this variable will
17425 cause a lot of network traffic between Gnus and the IMAP server.
17426
17427 @item nnimap-logout-timeout
17428 @vindex nnimap-logout-timeout
17429
17430 There is a case where a connection to a @acronym{IMAP} server is unable
17431 to close, when connecting to the server via a certain kind of network,
17432 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
17433 between Emacs and the local network looks alive even if the server has
17434 closed a connection for some reason (typically, a timeout).
17435 Consequently, Emacs continues waiting for a response from the server for
17436 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
17437 you are in such a network, setting this variable to a number of seconds
17438 will be helpful.  If it is set, a hung connection will be closed
17439 forcibly, after this number of seconds from the time Emacs sends the
17440 @code{LOGOUT} command.  It should not be too small value but too large
17441 value will be inconvenient too.  Perhaps the value 1.0 will be a good
17442 candidate but it might be worth trying some other values.
17443
17444 Example server specification:
17445
17446 @lisp
17447 (nnimap "mail.server.com"
17448         (nnimap-logout-timeout 1.0))
17449 @end lisp
17450
17451 @end table
17452
17453 @menu
17454 * Splitting in IMAP::           Splitting mail with nnimap.
17455 * Expiring in IMAP::            Expiring mail with nnimap.
17456 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
17457 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
17458 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
17459 * Debugging IMAP::              What to do when things don't work.
17460 @end menu
17461
17462
17463
17464 @node Splitting in IMAP
17465 @subsection Splitting in IMAP
17466 @cindex splitting imap mail
17467
17468 Splitting is something Gnus users have loved and used for years, and now
17469 the rest of the world is catching up.  Yeah, dream on, not many
17470 @acronym{IMAP} servers have server side splitting and those that have
17471 splitting seem to use some non-standard protocol.  This means that
17472 @acronym{IMAP} support for Gnus has to do its own splitting.
17473
17474 And it does.
17475
17476 (Incidentally, people seem to have been dreaming on, and Sieve has
17477 gaining a market share and is supported by several IMAP servers.
17478 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
17479
17480 Here are the variables of interest:
17481
17482 @table @code
17483
17484 @item nnimap-split-crosspost
17485 @cindex splitting, crosspost
17486 @cindex crosspost
17487 @vindex nnimap-split-crosspost
17488
17489 If non-@code{nil}, do crossposting if several split methods match the
17490 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
17491 found will be used.
17492
17493 Nnmail equivalent: @code{nnmail-crosspost}.
17494
17495 @item nnimap-split-inbox
17496 @cindex splitting, inbox
17497 @cindex inbox
17498 @vindex nnimap-split-inbox
17499
17500 A string or a list of strings that gives the name(s) of @acronym{IMAP}
17501 mailboxes to split from.  Defaults to @code{nil}, which means that
17502 splitting is disabled!
17503
17504 @lisp
17505 (setq nnimap-split-inbox
17506       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
17507 @end lisp
17508
17509 No nnmail equivalent.
17510
17511 @item nnimap-split-rule
17512 @cindex splitting, rules
17513 @vindex nnimap-split-rule
17514
17515 New mail found in @code{nnimap-split-inbox} will be split according to
17516 this variable.
17517
17518 This variable contains a list of lists, where the first element in the
17519 sublist gives the name of the @acronym{IMAP} mailbox to move articles
17520 matching the regexp in the second element in the sublist.  Got that?
17521 Neither did I, we need examples.
17522
17523 @lisp
17524 (setq nnimap-split-rule
17525       '(("INBOX.nnimap"
17526          "^Sender: owner-nnimap@@vic20.globalcom.se")
17527         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
17528         ("INBOX.private" "")))
17529 @end lisp
17530
17531 This will put all articles from the nnimap mailing list into mailbox
17532 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
17533 into INBOX.junk and everything else in INBOX.private.
17534
17535 The first string may contain @samp{\\1} forms, like the ones used by
17536 replace-match to insert sub-expressions from the matched text.  For
17537 instance:
17538
17539 @lisp
17540 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
17541 @end lisp
17542
17543 The first element can also be the symbol @code{junk} to indicate that
17544 matching messages should simply be deleted.  Use with care.
17545
17546 The second element can also be a function.  In that case, it will be
17547 called with the first element of the rule as the argument, in a buffer
17548 containing the headers of the article.  It should return a
17549 non-@code{nil} value if it thinks that the mail belongs in that group.
17550
17551 Nnmail users might recollect that the last regexp had to be empty to
17552 match all articles (like in the example above).  This is not required in
17553 nnimap.  Articles not matching any of the regexps will not be moved out
17554 of your inbox.  (This might affect performance if you keep lots of
17555 unread articles in your inbox, since the splitting code would go over
17556 them every time you fetch new mail.)
17557
17558 These rules are processed from the beginning of the alist toward the
17559 end.  The first rule to make a match will ``win'', unless you have
17560 crossposting enabled.  In that case, all matching rules will ``win''.
17561
17562 This variable can also have a function as its value, the function will
17563 be called with the headers narrowed and should return a group where it
17564 thinks the article should be split to.  See @code{nnimap-split-fancy}.
17565
17566 The splitting code tries to create mailboxes if it needs to.
17567
17568 To allow for different split rules on different virtual servers, and
17569 even different split rules in different inboxes on the same server,
17570 the syntax of this variable have been extended along the lines of:
17571
17572 @lisp
17573 (setq nnimap-split-rule
17574       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
17575                                ("junk"    "From:.*Simon"))))
17576         ("my2server"    ("INBOX" nnimap-split-fancy))
17577         ("my[34]server" (".*" (("private" "To:.*Simon")
17578                                ("junk"    my-junk-func))))))
17579 @end lisp
17580
17581 The virtual server name is in fact a regexp, so that the same rules
17582 may apply to several servers.  In the example, the servers
17583 @code{my3server} and @code{my4server} both use the same rules.
17584 Similarly, the inbox string is also a regexp.  The actual splitting
17585 rules are as before, either a function, or a list with group/regexp or
17586 group/function elements.
17587
17588 Nnmail equivalent: @code{nnmail-split-methods}.
17589
17590 @item nnimap-split-predicate
17591 @cindex splitting
17592 @vindex nnimap-split-predicate
17593
17594 Mail matching this predicate in @code{nnimap-split-inbox} will be
17595 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
17596
17597 This might be useful if you use another @acronym{IMAP} client to read mail in
17598 your inbox but would like Gnus to split all articles in the inbox
17599 regardless of readedness.  Then you might change this to
17600 @samp{UNDELETED}.
17601
17602 @item nnimap-split-fancy
17603 @cindex splitting, fancy
17604 @findex nnimap-split-fancy
17605 @vindex nnimap-split-fancy
17606
17607 It's possible to set @code{nnimap-split-rule} to
17608 @code{nnmail-split-fancy} if you want to use fancy
17609 splitting.  @xref{Fancy Mail Splitting}.
17610
17611 However, to be able to have different fancy split rules for nnmail and
17612 nnimap back ends you can set @code{nnimap-split-rule} to
17613 @code{nnimap-split-fancy} and define the nnimap specific fancy split
17614 rule in @code{nnimap-split-fancy}.
17615
17616 Example:
17617
17618 @lisp
17619 (setq nnimap-split-rule 'nnimap-split-fancy
17620       nnimap-split-fancy ...)
17621 @end lisp
17622
17623 Nnmail equivalent: @code{nnmail-split-fancy}.
17624
17625 @item nnimap-split-download-body
17626 @findex nnimap-split-download-body
17627 @vindex nnimap-split-download-body
17628
17629 Set to non-@code{nil} to download entire articles during splitting.
17630 This is generally not required, and will slow things down
17631 considerably.  You may need it if you want to use an advanced
17632 splitting function that analyzes the body to split the article.
17633
17634 @end table
17635
17636 @node Expiring in IMAP
17637 @subsection Expiring in IMAP
17638 @cindex expiring @acronym{IMAP} mail
17639
17640 Even though @code{nnimap} is not a proper @code{nnmail} derived back
17641 end, it supports most features in regular expiring (@pxref{Expiring
17642 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
17643 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
17644 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
17645 follows below are the variables used by the @code{nnimap} expiry
17646 process.
17647
17648 A note on how the expire mark is stored on the @acronym{IMAP} server is
17649 appropriate here as well.  The expire mark is translated into a
17650 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
17651 message.  This means that likely only Gnus will understand and treat
17652 the @code{gnus-expire} mark properly, although other clients may allow
17653 you to view client specific flags on the message.  It also means that
17654 your server must support permanent storage of client specific flags on
17655 messages.  Most do, fortunately.
17656
17657 If expiring @acronym{IMAP} mail seems very slow, try setting the server
17658 variable @code{nnimap-search-uids-not-since-is-evil}.
17659
17660 @table @code
17661
17662 @item nnmail-expiry-wait
17663 @item nnmail-expiry-wait-function
17664
17665 These variables are fully supported.  The expire value can be a
17666 number, the symbol @code{immediate} or @code{never}.
17667
17668 @item nnmail-expiry-target
17669
17670 This variable is supported, and internally implemented by calling the
17671 @code{nnmail} functions that handle this.  It contains an optimization
17672 that if the destination is a @acronym{IMAP} group on the same server, the
17673 article is copied instead of appended (that is, uploaded again).
17674
17675 @end table
17676
17677 @node Editing IMAP ACLs
17678 @subsection Editing IMAP ACLs
17679 @cindex editing imap acls
17680 @cindex Access Control Lists
17681 @cindex Editing @acronym{IMAP} ACLs
17682 @kindex G l (Group)
17683 @findex gnus-group-nnimap-edit-acl
17684
17685 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
17686 limiting (or enabling) other users access to your mail boxes.  Not all
17687 @acronym{IMAP} servers support this, this function will give an error if it
17688 doesn't.
17689
17690 To edit an ACL for a mailbox, type @kbd{G l}
17691 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
17692 editing window with detailed instructions.
17693
17694 Some possible uses:
17695
17696 @itemize @bullet
17697 @item
17698 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
17699 on your mailing list mailboxes enables other users on the same server to
17700 follow the list without subscribing to it.
17701 @item
17702 At least with the Cyrus server, you are required to give the user
17703 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
17704 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
17705 INBOX.mailbox).
17706 @end itemize
17707
17708 @node Expunging mailboxes
17709 @subsection Expunging mailboxes
17710 @cindex expunging
17711
17712 @cindex expunge
17713 @cindex manual expunging
17714 @kindex G x (Group)
17715 @findex gnus-group-nnimap-expunge
17716
17717 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
17718 you may want the option of expunging all deleted articles in a mailbox
17719 manually.  This is exactly what @kbd{G x} does.
17720
17721 Currently there is no way of showing deleted articles, you can just
17722 delete them.
17723
17724 @node A note on namespaces
17725 @subsection A note on namespaces
17726 @cindex IMAP namespace
17727 @cindex namespaces
17728
17729 The @acronym{IMAP} protocol has a concept called namespaces, described
17730 by the following text in the RFC2060:
17731
17732 @display
17733 5.1.2.  Mailbox Namespace Naming Convention
17734
17735    By convention, the first hierarchical element of any mailbox name
17736    which begins with "#" identifies the "namespace" of the remainder of
17737    the name.  This makes it possible to disambiguate between different
17738    types of mailbox stores, each of which have their own namespaces.
17739
17740       For example, implementations which offer access to USENET
17741       newsgroups MAY use the "#news" namespace to partition the USENET
17742       newsgroup namespace from that of other mailboxes.  Thus, the
17743       comp.mail.misc newsgroup would have an mailbox name of
17744       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
17745       to a different object (e.g. a user's private mailbox).
17746 @end display
17747
17748 While there is nothing in this text that warrants concern for the
17749 @acronym{IMAP} implementation in Gnus, some servers use namespace
17750 prefixes in a way that does not work with how Gnus uses mailbox names.
17751
17752 Specifically, University of Washington's @acronym{IMAP} server uses
17753 mailbox names like @code{#driver.mbx/read-mail} which are valid only
17754 in the @sc{create} and @sc{append} commands.  After the mailbox is
17755 created (or a messages is appended to a mailbox), it must be accessed
17756 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
17757 not make it possible for the user to guarantee that user entered
17758 mailbox names will only be used with the CREATE and APPEND commands,
17759 you should simply not use the namespace prefixed mailbox names in
17760 Gnus.
17761
17762 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
17763 for more information on how to use the prefixes.  They are a power
17764 tool and should be used only if you are sure what the effects are.
17765
17766 @node Debugging IMAP
17767 @subsection Debugging IMAP
17768 @cindex IMAP debugging
17769 @cindex protocol dump (IMAP)
17770
17771 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
17772 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
17773 best to fix them right away.  If you encounter odd behavior, chances
17774 are that either the server or Gnus is buggy.
17775
17776 If you are familiar with network protocols in general, you will
17777 probably be able to extract some clues from the protocol dump of the
17778 exchanges between Gnus and the server.  Even if you are not familiar
17779 with network protocols, when you include the protocol dump in
17780 @acronym{IMAP}-related bug reports you are helping us with data
17781 critical to solving the problem.  Therefore, we strongly encourage you
17782 to include the protocol dump when reporting IMAP bugs in Gnus.
17783
17784
17785 @vindex imap-log
17786 Because the protocol dump, when enabled, generates lots of data, it is
17787 disabled by default.  You can enable it by setting @code{imap-log} as
17788 follows:
17789
17790 @lisp
17791 (setq imap-log t)
17792 @end lisp
17793
17794 This instructs the @code{imap.el} package to log any exchanges with
17795 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
17796 for error messages, which sometimes are tagged with the keyword
17797 @code{BAD}---but when submitting a bug, make sure to include all the
17798 data.
17799
17800 @node Other Sources
17801 @section Other Sources
17802
17803 Gnus can do more than just read news or mail.  The methods described
17804 below allow Gnus to view directories and files as if they were
17805 newsgroups.
17806
17807 @menu
17808 * Directory Groups::            You can read a directory as if it was a newsgroup.
17809 * Anything Groups::             Dired?  Who needs dired?
17810 * Document Groups::             Single files can be the basis of a group.
17811 * SOUP::                        Reading @sc{soup} packets ``offline''.
17812 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
17813 @end menu
17814
17815
17816 @node Directory Groups
17817 @subsection Directory Groups
17818 @cindex nndir
17819 @cindex directory groups
17820
17821 If you have a directory that has lots of articles in separate files in
17822 it, you might treat it as a newsgroup.  The files have to have numerical
17823 names, of course.
17824
17825 This might be an opportune moment to mention @code{ange-ftp} (and its
17826 successor @code{efs}), that most wonderful of all wonderful Emacs
17827 packages.  When I wrote @code{nndir}, I didn't think much about it---a
17828 back end to read directories.  Big deal.
17829
17830 @code{ange-ftp} changes that picture dramatically.  For instance, if you
17831 enter the @code{ange-ftp} file name
17832 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
17833 @code{ange-ftp} or @code{efs} will actually allow you to read this
17834 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
17835
17836 @code{nndir} will use @acronym{NOV} files if they are present.
17837
17838 @code{nndir} is a ``read-only'' back end---you can't delete or expire
17839 articles with this method.  You can use @code{nnmh} or @code{nnml} for
17840 whatever you use @code{nndir} for, so you could switch to any of those
17841 methods if you feel the need to have a non-read-only @code{nndir}.
17842
17843
17844 @node Anything Groups
17845 @subsection Anything Groups
17846 @cindex nneething
17847
17848 From the @code{nndir} back end (which reads a single spool-like
17849 directory), it's just a hop and a skip to @code{nneething}, which
17850 pretends that any arbitrary directory is a newsgroup.  Strange, but
17851 true.
17852
17853 When @code{nneething} is presented with a directory, it will scan this
17854 directory and assign article numbers to each file.  When you enter such
17855 a group, @code{nneething} must create ``headers'' that Gnus can use.
17856 After all, Gnus is a newsreader, in case you're forgetting.
17857 @code{nneething} does this in a two-step process.  First, it snoops each
17858 file in question.  If the file looks like an article (i.e., the first
17859 few lines look like headers), it will use this as the head.  If this is
17860 just some arbitrary file without a head (e.g. a C source file),
17861 @code{nneething} will cobble up a header out of thin air.  It will use
17862 file ownership, name and date and do whatever it can with these
17863 elements.
17864
17865 All this should happen automatically for you, and you will be presented
17866 with something that looks very much like a newsgroup.  Totally like a
17867 newsgroup, to be precise.  If you select an article, it will be displayed
17868 in the article buffer, just as usual.
17869
17870 If you select a line that represents a directory, Gnus will pop you into
17871 a new summary buffer for this @code{nneething} group.  And so on.  You can
17872 traverse the entire disk this way, if you feel like, but remember that
17873 Gnus is not dired, really, and does not intend to be, either.
17874
17875 There are two overall modes to this action---ephemeral or solid.  When
17876 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
17877 will not store information on what files you have read, and what files
17878 are new, and so on.  If you create a solid @code{nneething} group the
17879 normal way with @kbd{G m}, Gnus will store a mapping table between
17880 article numbers and file names, and you can treat this group like any
17881 other groups.  When you activate a solid @code{nneething} group, you will
17882 be told how many unread articles it contains, etc., etc.
17883
17884 Some variables:
17885
17886 @table @code
17887 @item nneething-map-file-directory
17888 @vindex nneething-map-file-directory
17889 All the mapping files for solid @code{nneething} groups will be stored
17890 in this directory, which defaults to @file{~/.nneething/}.
17891
17892 @item nneething-exclude-files
17893 @vindex nneething-exclude-files
17894 All files that match this regexp will be ignored.  Nice to use to exclude
17895 auto-save files and the like, which is what it does by default.
17896
17897 @item nneething-include-files
17898 @vindex nneething-include-files
17899 Regexp saying what files to include in the group.  If this variable is
17900 non-@code{nil}, only files matching this regexp will be included.
17901
17902 @item nneething-map-file
17903 @vindex nneething-map-file
17904 Name of the map files.
17905 @end table
17906
17907
17908 @node Document Groups
17909 @subsection Document Groups
17910 @cindex nndoc
17911 @cindex documentation group
17912 @cindex help group
17913
17914 @code{nndoc} is a cute little thing that will let you read a single file
17915 as a newsgroup.  Several files types are supported:
17916
17917 @table @code
17918 @cindex Babyl
17919 @cindex Rmail mbox
17920 @item babyl
17921 The Babyl (Rmail) mail box.
17922
17923 @cindex mbox
17924 @cindex Unix mbox
17925 @item mbox
17926 The standard Unix mbox file.
17927
17928 @cindex MMDF mail box
17929 @item mmdf
17930 The MMDF mail box format.
17931
17932 @item news
17933 Several news articles appended into a file.
17934
17935 @cindex rnews batch files
17936 @item rnews
17937 The rnews batch transport format.
17938
17939 @item nsmail
17940 Netscape mail boxes.
17941
17942 @item mime-parts
17943 @acronym{MIME} multipart messages.
17944
17945 @item standard-digest
17946 The standard (RFC 1153) digest format.
17947
17948 @item mime-digest
17949 A @acronym{MIME} digest of messages.
17950
17951 @item lanl-gov-announce
17952 Announcement messages from LANL Gov Announce.
17953
17954 @cindex forwarded messages
17955 @item rfc822-forward
17956 A message forwarded according to RFC822.
17957
17958 @item outlook
17959 The Outlook mail box.
17960
17961 @item oe-dbx
17962 The Outlook Express dbx mail box.
17963
17964 @item exim-bounce
17965 A bounce message from the Exim MTA.
17966
17967 @item forward
17968 A message forwarded according to informal rules.
17969
17970 @item rfc934
17971 An RFC934-forwarded message.
17972
17973 @item mailman
17974 A mailman digest.
17975
17976 @item clari-briefs
17977 A digest of Clarinet brief news items.
17978
17979 @item slack-digest
17980 Non-standard digest format---matches most things, but does it badly.
17981
17982 @item mail-in-mail
17983 The last resort.
17984 @end table
17985
17986 You can also use the special ``file type'' @code{guess}, which means
17987 that @code{nndoc} will try to guess what file type it is looking at.
17988 @code{digest} means that @code{nndoc} should guess what digest type the
17989 file is.
17990
17991 @code{nndoc} will not try to change the file or insert any extra headers into
17992 it---it will simply, like, let you use the file as the basis for a
17993 group.  And that's it.
17994
17995 If you have some old archived articles that you want to insert into your
17996 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
17997 that.  Say you have an old @file{RMAIL} file with mail that you now want
17998 to split into your new @code{nnml} groups.  You look at that file using
17999 @code{nndoc} (using the @kbd{G f} command in the group buffer
18000 (@pxref{Foreign Groups})), set the process mark on all the articles in
18001 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18002 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18003 file is now also stored in lots of @code{nnml} directories, and you can
18004 delete that pesky @file{RMAIL} file.  If you have the guts!
18005
18006 Virtual server variables:
18007
18008 @table @code
18009 @item nndoc-article-type
18010 @vindex nndoc-article-type
18011 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18012 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18013 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18014 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18015 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18016
18017 @item nndoc-post-type
18018 @vindex nndoc-post-type
18019 This variable says whether Gnus is to consider the group a news group or
18020 a mail group.  There are two valid values:  @code{mail} (the default)
18021 and @code{news}.
18022 @end table
18023
18024 @menu
18025 * Document Server Internals::   How to add your own document types.
18026 @end menu
18027
18028
18029 @node Document Server Internals
18030 @subsubsection Document Server Internals
18031
18032 Adding new document types to be recognized by @code{nndoc} isn't
18033 difficult.  You just have to whip up a definition of what the document
18034 looks like, write a predicate function to recognize that document type,
18035 and then hook into @code{nndoc}.
18036
18037 First, here's an example document type definition:
18038
18039 @example
18040 (mmdf
18041  (article-begin .  "^\^A\^A\^A\^A\n")
18042  (body-end .  "^\^A\^A\^A\^A\n"))
18043 @end example
18044
18045 The definition is simply a unique @dfn{name} followed by a series of
18046 regexp pseudo-variable settings.  Below are the possible
18047 variables---don't be daunted by the number of variables; most document
18048 types can be defined with very few settings:
18049
18050 @table @code
18051 @item first-article
18052 If present, @code{nndoc} will skip past all text until it finds
18053 something that match this regexp.  All text before this will be
18054 totally ignored.
18055
18056 @item article-begin
18057 This setting has to be present in all document type definitions.  It
18058 says what the beginning of each article looks like.  To do more
18059 complicated things that cannot be dealt with a simple regexp, you can
18060 use @code{article-begin-function} instead of this.
18061
18062 @item article-begin-function
18063 If present, this should be a function that moves point to the beginning
18064 of each article.  This setting overrides @code{article-begin}.
18065
18066 @item head-begin
18067 If present, this should be a regexp that matches the head of the
18068 article.  To do more complicated things that cannot be dealt with a
18069 simple regexp, you can use @code{head-begin-function} instead of this.
18070
18071 @item head-begin-function
18072 If present, this should be a function that moves point to the head of
18073 the article.  This setting overrides @code{head-begin}.
18074
18075 @item head-end
18076 This should match the end of the head of the article.  It defaults to
18077 @samp{^$}---the empty line.
18078
18079 @item body-begin
18080 This should match the beginning of the body of the article.  It defaults
18081 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18082 a simple regexp, you can use @code{body-begin-function} instead of this.
18083
18084 @item body-begin-function
18085 If present, this function should move point to the beginning of the body
18086 of the article.  This setting overrides @code{body-begin}.
18087
18088 @item body-end
18089 If present, this should match the end of the body of the article.  To do
18090 more complicated things that cannot be dealt with a simple regexp, you
18091 can use @code{body-end-function} instead of this.
18092
18093 @item body-end-function
18094 If present, this function should move point to the end of the body of
18095 the article.  This setting overrides @code{body-end}.
18096
18097 @item file-begin
18098 If present, this should match the beginning of the file.  All text
18099 before this regexp will be totally ignored.
18100
18101 @item file-end
18102 If present, this should match the end of the file.  All text after this
18103 regexp will be totally ignored.
18104
18105 @end table
18106
18107 So, using these variables @code{nndoc} is able to dissect a document
18108 file into a series of articles, each with a head and a body.  However, a
18109 few more variables are needed since not all document types are all that
18110 news-like---variables needed to transform the head or the body into
18111 something that's palatable for Gnus:
18112
18113 @table @code
18114 @item prepare-body-function
18115 If present, this function will be called when requesting an article.  It
18116 will be called with point at the start of the body, and is useful if the
18117 document has encoded some parts of its contents.
18118
18119 @item article-transform-function
18120 If present, this function is called when requesting an article.  It's
18121 meant to be used for more wide-ranging transformation of both head and
18122 body of the article.
18123
18124 @item generate-head-function
18125 If present, this function is called to generate a head that Gnus can
18126 understand.  It is called with the article number as a parameter, and is
18127 expected to generate a nice head for the article in question.  It is
18128 called when requesting the headers of all articles.
18129
18130 @item generate-article-function
18131 If present, this function is called to generate an entire article that
18132 Gnus can understand.  It is called with the article number as a
18133 parameter when requesting all articles.
18134
18135 @item dissection-function
18136 If present, this function is called to dissect a document by itself,
18137 overriding @code{first-article}, @code{article-begin},
18138 @code{article-begin-function}, @code{head-begin},
18139 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18140 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18141 @code{file-begin}, and @code{file-end}.
18142
18143 @end table
18144
18145 Let's look at the most complicated example I can come up with---standard
18146 digests:
18147
18148 @example
18149 (standard-digest
18150  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18151  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18152  (prepare-body-function . nndoc-unquote-dashes)
18153  (body-end-function . nndoc-digest-body-end)
18154  (head-end . "^ ?$")
18155  (body-begin . "^ ?\n")
18156  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18157  (subtype digest guess))
18158 @end example
18159
18160 We see that all text before a 70-width line of dashes is ignored; all
18161 text after a line that starts with that @samp{^End of} is also ignored;
18162 each article begins with a 30-width line of dashes; the line separating
18163 the head from the body may contain a single space; and that the body is
18164 run through @code{nndoc-unquote-dashes} before being delivered.
18165
18166 To hook your own document definition into @code{nndoc}, use the
18167 @code{nndoc-add-type} function.  It takes two parameters---the first
18168 is the definition itself and the second (optional) parameter says
18169 where in the document type definition alist to put this definition.
18170 The alist is traversed sequentially, and
18171 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18172 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18173 @code{mmdf} type, and so on.  These type predicates should return
18174 @code{nil} if the document is not of the correct type; @code{t} if it
18175 is of the correct type; and a number if the document might be of the
18176 correct type.  A high number means high probability; a low number
18177 means low probability with @samp{0} being the lowest valid number.
18178
18179
18180 @node SOUP
18181 @subsection SOUP
18182 @cindex SOUP
18183 @cindex offline
18184
18185 In the PC world people often talk about ``offline'' newsreaders.  These
18186 are thingies that are combined reader/news transport monstrosities.
18187 With built-in modem programs.  Yecchh!
18188
18189 Of course, us Unix Weenie types of human beans use things like
18190 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
18191 transport things like Ghod intended.  And then we just use normal
18192 newsreaders.
18193
18194 However, it can sometimes be convenient to do something that's a bit
18195 easier on the brain if you have a very slow modem, and you're not really
18196 that interested in doing things properly.
18197
18198 A file format called @sc{soup} has been developed for transporting news
18199 and mail from servers to home machines and back again.  It can be a bit
18200 fiddly.
18201
18202 First some terminology:
18203
18204 @table @dfn
18205
18206 @item server
18207 This is the machine that is connected to the outside world and where you
18208 get news and/or mail from.
18209
18210 @item home machine
18211 This is the machine that you want to do the actual reading and responding
18212 on.  It is typically not connected to the rest of the world in any way.
18213
18214 @item packet
18215 Something that contains messages and/or commands.  There are two kinds
18216 of packets:
18217
18218 @table @dfn
18219 @item message packets
18220 These are packets made at the server, and typically contain lots of
18221 messages for you to read.  These are called @file{SoupoutX.tgz} by
18222 default, where @var{x} is a number.
18223
18224 @item response packets
18225 These are packets made at the home machine, and typically contains
18226 replies that you've written.  These are called @file{SoupinX.tgz} by
18227 default, where @var{x} is a number.
18228
18229 @end table
18230
18231 @end table
18232
18233
18234 @enumerate
18235
18236 @item
18237 You log in on the server and create a @sc{soup} packet.  You can either
18238 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
18239 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
18240 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
18241
18242 @item
18243 You transfer the packet home.  Rail, boat, car or modem will do fine.
18244
18245 @item
18246 You put the packet in your home directory.
18247
18248 @item
18249 You fire up Gnus on your home machine using the @code{nnsoup} back end as
18250 the native or secondary server.
18251
18252 @item
18253 You read articles and mail and answer and followup to the things you
18254 want (@pxref{SOUP Replies}).
18255
18256 @item
18257 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
18258 packet.
18259
18260 @item
18261 You transfer this packet to the server.
18262
18263 @item
18264 You use Gnus to mail this packet out with the @kbd{G s s} command.
18265
18266 @item
18267 You then repeat until you die.
18268
18269 @end enumerate
18270
18271 So you basically have a bipartite system---you use @code{nnsoup} for
18272 reading and Gnus for packing/sending these @sc{soup} packets.
18273
18274 @menu
18275 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
18276 * SOUP Groups::                 A back end for reading @sc{soup} packets.
18277 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
18278 @end menu
18279
18280
18281 @node SOUP Commands
18282 @subsubsection SOUP Commands
18283
18284 These are commands for creating and manipulating @sc{soup} packets.
18285
18286 @table @kbd
18287 @item G s b
18288 @kindex G s b (Group)
18289 @findex gnus-group-brew-soup
18290 Pack all unread articles in the current group
18291 (@code{gnus-group-brew-soup}).  This command understands the
18292 process/prefix convention.
18293
18294 @item G s w
18295 @kindex G s w (Group)
18296 @findex gnus-soup-save-areas
18297 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
18298
18299 @item G s s
18300 @kindex G s s (Group)
18301 @findex gnus-soup-send-replies
18302 Send all replies from the replies packet
18303 (@code{gnus-soup-send-replies}).
18304
18305 @item G s p
18306 @kindex G s p (Group)
18307 @findex gnus-soup-pack-packet
18308 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
18309
18310 @item G s r
18311 @kindex G s r (Group)
18312 @findex nnsoup-pack-replies
18313 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
18314
18315 @item O s
18316 @kindex O s (Summary)
18317 @findex gnus-soup-add-article
18318 This summary-mode command adds the current article to a @sc{soup} packet
18319 (@code{gnus-soup-add-article}).  It understands the process/prefix
18320 convention (@pxref{Process/Prefix}).
18321
18322 @end table
18323
18324
18325 There are a few variables to customize where Gnus will put all these
18326 thingies:
18327
18328 @table @code
18329
18330 @item gnus-soup-directory
18331 @vindex gnus-soup-directory
18332 Directory where Gnus will save intermediate files while composing
18333 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
18334
18335 @item gnus-soup-replies-directory
18336 @vindex gnus-soup-replies-directory
18337 This is what Gnus will use as a temporary directory while sending our
18338 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
18339
18340 @item gnus-soup-prefix-file
18341 @vindex gnus-soup-prefix-file
18342 Name of the file where Gnus stores the last used prefix.  The default is
18343 @samp{gnus-prefix}.
18344
18345 @item gnus-soup-packer
18346 @vindex gnus-soup-packer
18347 A format string command for packing a @sc{soup} packet.  The default is
18348 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
18349
18350 @item gnus-soup-unpacker
18351 @vindex gnus-soup-unpacker
18352 Format string command for unpacking a @sc{soup} packet.  The default is
18353 @samp{gunzip -c %s | tar xvf -}.
18354
18355 @item gnus-soup-packet-directory
18356 @vindex gnus-soup-packet-directory
18357 Where Gnus will look for reply packets.  The default is @file{~/}.
18358
18359 @item gnus-soup-packet-regexp
18360 @vindex gnus-soup-packet-regexp
18361 Regular expression matching @sc{soup} reply packets in
18362 @code{gnus-soup-packet-directory}.
18363
18364 @end table
18365
18366
18367 @node SOUP Groups
18368 @subsubsection SOUP Groups
18369 @cindex nnsoup
18370
18371 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
18372 read incoming packets, unpack them, and put them in a directory where
18373 you can read them at leisure.
18374
18375 These are the variables you can use to customize its behavior:
18376
18377 @table @code
18378
18379 @item nnsoup-tmp-directory
18380 @vindex nnsoup-tmp-directory
18381 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
18382 directory.  (@file{/tmp/} by default.)
18383
18384 @item nnsoup-directory
18385 @vindex nnsoup-directory
18386 @code{nnsoup} then moves each message and index file to this directory.
18387 The default is @file{~/SOUP/}.
18388
18389 @item nnsoup-replies-directory
18390 @vindex nnsoup-replies-directory
18391 All replies will be stored in this directory before being packed into a
18392 reply packet.  The default is @file{~/SOUP/replies/}.
18393
18394 @item nnsoup-replies-format-type
18395 @vindex nnsoup-replies-format-type
18396 The @sc{soup} format of the replies packets.  The default is @samp{?n}
18397 (rnews), and I don't think you should touch that variable.  I probably
18398 shouldn't even have documented it.  Drats!  Too late!
18399
18400 @item nnsoup-replies-index-type
18401 @vindex nnsoup-replies-index-type
18402 The index type of the replies packet.  The default is @samp{?n}, which
18403 means ``none''.  Don't fiddle with this one either!
18404
18405 @item nnsoup-active-file
18406 @vindex nnsoup-active-file
18407 Where @code{nnsoup} stores lots of information.  This is not an ``active
18408 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
18409 this file or mess it up in any way, you're dead.  The default is
18410 @file{~/SOUP/active}.
18411
18412 @item nnsoup-packer
18413 @vindex nnsoup-packer
18414 Format string command for packing a reply @sc{soup} packet.  The default
18415 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
18416
18417 @item nnsoup-unpacker
18418 @vindex nnsoup-unpacker
18419 Format string command for unpacking incoming @sc{soup} packets.  The
18420 default is @samp{gunzip -c %s | tar xvf -}.
18421
18422 @item nnsoup-packet-directory
18423 @vindex nnsoup-packet-directory
18424 Where @code{nnsoup} will look for incoming packets.  The default is
18425 @file{~/}.
18426
18427 @item nnsoup-packet-regexp
18428 @vindex nnsoup-packet-regexp
18429 Regular expression matching incoming @sc{soup} packets.  The default is
18430 @samp{Soupout}.
18431
18432 @item nnsoup-always-save
18433 @vindex nnsoup-always-save
18434 If non-@code{nil}, save the replies buffer after each posted message.
18435
18436 @end table
18437
18438
18439 @node SOUP Replies
18440 @subsubsection SOUP Replies
18441
18442 Just using @code{nnsoup} won't mean that your postings and mailings end
18443 up in @sc{soup} reply packets automagically.  You have to work a bit
18444 more for that to happen.
18445
18446 @findex nnsoup-set-variables
18447 The @code{nnsoup-set-variables} command will set the appropriate
18448 variables to ensure that all your followups and replies end up in the
18449 @sc{soup} system.
18450
18451 In specific, this is what it does:
18452
18453 @lisp
18454 (setq message-send-news-function 'nnsoup-request-post)
18455 (setq message-send-mail-function 'nnsoup-request-mail)
18456 @end lisp
18457
18458 And that's it, really.  If you only want news to go into the @sc{soup}
18459 system you just use the first line.  If you only want mail to be
18460 @sc{soup}ed you use the second.
18461
18462
18463 @node Mail-To-News Gateways
18464 @subsection Mail-To-News Gateways
18465 @cindex mail-to-news gateways
18466 @cindex gateways
18467
18468 If your local @code{nntp} server doesn't allow posting, for some reason
18469 or other, you can post using one of the numerous mail-to-news gateways.
18470 The @code{nngateway} back end provides the interface.
18471
18472 Note that you can't read anything from this back end---it can only be
18473 used to post with.
18474
18475 Server variables:
18476
18477 @table @code
18478 @item nngateway-address
18479 @vindex nngateway-address
18480 This is the address of the mail-to-news gateway.
18481
18482 @item nngateway-header-transformation
18483 @vindex nngateway-header-transformation
18484 News headers often have to be transformed in some odd way or other
18485 for the mail-to-news gateway to accept it.  This variable says what
18486 transformation should be called, and defaults to
18487 @code{nngateway-simple-header-transformation}.  The function is called
18488 narrowed to the headers to be transformed and with one parameter---the
18489 gateway address.
18490
18491 This default function just inserts a new @code{To} header based on the
18492 @code{Newsgroups} header and the gateway address.
18493 For instance, an article with this @code{Newsgroups} header:
18494
18495 @example
18496 Newsgroups: alt.religion.emacs
18497 @end example
18498
18499 will get this @code{To} header inserted:
18500
18501 @example
18502 To: alt-religion-emacs@@GATEWAY
18503 @end example
18504
18505 The following pre-defined functions exist:
18506
18507 @findex nngateway-simple-header-transformation
18508 @table @code
18509
18510 @item nngateway-simple-header-transformation
18511 Creates a @code{To} header that looks like
18512 @var{newsgroup}@@@code{nngateway-address}.
18513
18514 @findex nngateway-mail2news-header-transformation
18515
18516 @item nngateway-mail2news-header-transformation
18517 Creates a @code{To} header that looks like
18518 @code{nngateway-address}.
18519 @end table
18520
18521 @end table
18522
18523 Here's an example:
18524
18525 @lisp
18526 (setq gnus-post-method
18527       '(nngateway
18528         "mail2news@@replay.com"
18529         (nngateway-header-transformation
18530          nngateway-mail2news-header-transformation)))
18531 @end lisp
18532
18533 So, to use this, simply say something like:
18534
18535 @lisp
18536 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
18537 @end lisp
18538
18539
18540
18541 @node Combined Groups
18542 @section Combined Groups
18543
18544 Gnus allows combining a mixture of all the other group types into bigger
18545 groups.
18546
18547 @menu
18548 * Virtual Groups::              Combining articles from many groups.
18549 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
18550 @end menu
18551
18552
18553 @node Virtual Groups
18554 @subsection Virtual Groups
18555 @cindex nnvirtual
18556 @cindex virtual groups
18557 @cindex merging groups
18558
18559 An @dfn{nnvirtual group} is really nothing more than a collection of
18560 other groups.
18561
18562 For instance, if you are tired of reading many small groups, you can
18563 put them all in one big group, and then grow tired of reading one
18564 big, unwieldy group.  The joys of computing!
18565
18566 You specify @code{nnvirtual} as the method.  The address should be a
18567 regexp to match component groups.
18568
18569 All marks in the virtual group will stick to the articles in the
18570 component groups.  So if you tick an article in a virtual group, the
18571 article will also be ticked in the component group from whence it
18572 came.  (And vice versa---marks from the component groups will also be
18573 shown in the virtual group.).  To create an empty virtual group, run
18574 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
18575 and edit the method regexp with @kbd{M-e}
18576 (@code{gnus-group-edit-group-method})
18577
18578 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
18579 newsgroups into one, big, happy newsgroup:
18580
18581 @lisp
18582 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
18583 @end lisp
18584
18585 The component groups can be native or foreign; everything should work
18586 smoothly, but if your computer explodes, it was probably my fault.
18587
18588 Collecting the same group from several servers might actually be a good
18589 idea if users have set the Distribution header to limit distribution.
18590 If you would like to read @samp{soc.motss} both from a server in Japan
18591 and a server in Norway, you could use the following as the group regexp:
18592
18593 @example
18594 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
18595 @end example
18596
18597 (Remember, though, that if you're creating the group with @kbd{G m}, you
18598 shouldn't double the backslashes, and you should leave off the quote
18599 characters at the beginning and the end of the string.)
18600
18601 This should work kinda smoothly---all articles from both groups should
18602 end up in this one, and there should be no duplicates.  Threading (and
18603 the rest) will still work as usual, but there might be problems with the
18604 sequence of articles.  Sorting on date might be an option here
18605 (@pxref{Selecting a Group}).
18606
18607 One limitation, however---all groups included in a virtual
18608 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
18609 zombie groups can't be component groups for @code{nnvirtual} groups.
18610
18611 @vindex nnvirtual-always-rescan
18612 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
18613 is the default), @code{nnvirtual} will always scan groups for unread
18614 articles when entering a virtual group.  If this variable is @code{nil}
18615 and you read articles in a component group after the virtual group has
18616 been activated, the read articles from the component group will show up
18617 when you enter the virtual group.  You'll also see this effect if you
18618 have two virtual groups that have a component group in common.  If
18619 that's the case, you should set this variable to @code{t}.  Or you can
18620 just tap @code{M-g} on the virtual group every time before you enter
18621 it---it'll have much the same effect.
18622
18623 @code{nnvirtual} can have both mail and news groups as component groups.
18624 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
18625 has to ask the back end of the component group the article comes from
18626 whether it is a news or mail back end.  However, when you do a @kbd{^},
18627 there is typically no sure way for the component back end to know this,
18628 and in that case @code{nnvirtual} tells Gnus that the article came from a
18629 not-news back end.  (Just to be on the safe side.)
18630
18631 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
18632 line from the article you respond to in these cases.
18633
18634 @code{nnvirtual} groups do not inherit anything but articles and marks
18635 from component groups---group parameters, for instance, are not
18636 inherited.
18637
18638
18639 @node Kibozed Groups
18640 @subsection Kibozed Groups
18641 @cindex nnkiboze
18642 @cindex kibozing
18643
18644 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
18645 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
18646 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
18647 down to a halt with useless requests!  Oh happiness!
18648
18649 @kindex G k (Group)
18650 To create a kibozed group, use the @kbd{G k} command in the group
18651 buffer.
18652
18653 The address field of the @code{nnkiboze} method is, as with
18654 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
18655 @code{nnkiboze} group.  That's where most similarities between
18656 @code{nnkiboze} and @code{nnvirtual} end.
18657
18658 In addition to this regexp detailing component groups, an
18659 @code{nnkiboze} group must have a score file to say what articles are
18660 to be included in the group (@pxref{Scoring}).
18661
18662 @kindex M-x nnkiboze-generate-groups
18663 @findex nnkiboze-generate-groups
18664 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
18665 @code{nnkiboze} groups you want to have.  This command will take time.
18666 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
18667 headers from all the articles in all the component groups and run them
18668 through the scoring process to determine if there are any articles in
18669 the groups that are to be part of the @code{nnkiboze} groups.
18670
18671 Please limit the number of component groups by using restrictive
18672 regexps.  Otherwise your sysadmin may become annoyed with you, and the
18673 @acronym{NNTP} site may throw you off and never let you back in again.
18674 Stranger things have happened.
18675
18676 @code{nnkiboze} component groups do not have to be alive---they can be dead,
18677 and they can be foreign.  No restrictions.
18678
18679 @vindex nnkiboze-directory
18680 The generation of an @code{nnkiboze} group means writing two files in
18681 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
18682 One contains the @acronym{NOV} header lines for all the articles in
18683 the group, and the other is an additional @file{.newsrc} file to store
18684 information on what groups have been searched through to find
18685 component articles.
18686
18687 Articles marked as read in the @code{nnkiboze} group will have
18688 their @acronym{NOV} lines removed from the @acronym{NOV} file.
18689
18690
18691 @node Email Based Diary
18692 @section Email Based Diary
18693 @cindex diary
18694 @cindex email based diary
18695 @cindex calendar
18696
18697 This section describes a special mail back end called @code{nndiary},
18698 and its companion library @code{gnus-diary}.  It is ``special'' in the
18699 sense that it is not meant to be one of the standard alternatives for
18700 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
18701 Instead, it is used to treat @emph{some} of your mails in a special way,
18702 namely, as event reminders.
18703
18704 Here is a typical scenario:
18705
18706 @itemize @bullet
18707 @item
18708 You've got a date with Andy Mc Dowell or Bruce Willis (select according
18709 to your sexual preference) in one month.  You don't want to forget it.
18710 @item
18711 So you send a ``reminder'' message (actually, a diary one) to yourself.
18712 @item
18713 You forget all about it and keep on getting and reading new mail, as usual.
18714 @item
18715 From time to time, as you type `g' in the group buffer and as the date
18716 is getting closer, the message will pop up again to remind you of your
18717 appointment, just as if it were new and unread.
18718 @item
18719 Read your ``new'' messages, this one included, and start dreaming again
18720 of the night you're gonna have.
18721 @item
18722 Once the date is over (you actually fell asleep just after dinner), the
18723 message will be automatically deleted if it is marked as expirable.
18724 @end itemize
18725
18726 The Gnus Diary back end has the ability to handle regular appointments
18727 (that wouldn't ever be deleted) as well as punctual ones, operates as a
18728 real mail back end and is configurable in many ways.  All of this is
18729 explained in the sections below.
18730
18731 @menu
18732 * The NNDiary Back End::        Basic setup and usage.
18733 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
18734 * Sending or Not Sending::      A final note on sending diary messages.
18735 @end menu
18736
18737
18738 @node The NNDiary Back End
18739 @subsection The NNDiary Back End
18740 @cindex nndiary
18741 @cindex the nndiary back end
18742
18743 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
18744 Spool}).  Actually, it could appear as a mix of @code{nnml} and
18745 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
18746 the message storing scheme of @code{nndiary}: one file per message, one
18747 directory per group.
18748
18749   Before anything, there is one requirement to be able to run
18750 @code{nndiary} properly: you @emph{must} use the group timestamp feature
18751 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
18752 Timestamp} to see how it's done.
18753
18754 @menu
18755 * Diary Messages::              What makes a message valid for nndiary.
18756 * Running NNDiary::             NNDiary has two modes of operation.
18757 * Customizing NNDiary::         Bells and whistles.
18758 @end menu
18759
18760 @node Diary Messages
18761 @subsubsection Diary Messages
18762 @cindex nndiary messages
18763 @cindex nndiary mails
18764
18765 @code{nndiary} messages are just normal ones, except for the mandatory
18766 presence of 7 special headers.  These headers are of the form
18767 @code{X-Diary-<something>}, @code{<something>} being one of
18768 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
18769 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
18770 @code{dow} means ``Day of Week''.  These headers actually behave like
18771 crontab specifications and define the event date(s):
18772
18773 @itemize @bullet
18774 @item
18775 For all headers except the @code{Time-Zone} one, a header value is
18776 either a star (meaning all possible values), or a list of fields
18777 (separated by a comma).
18778 @item
18779 A field is either an integer, or a range.
18780 @item
18781 A range is two integers separated by a dash.
18782 @item
18783 Possible integer values are 0--59 for @code{Minute}, 0--23 for
18784 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
18785 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
18786 @item
18787 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
18788 mean ``all possible values'', but ``use only the other field''.  Note
18789 that if both are star'ed, the use of either one gives the same result.
18790 @item
18791 The @code{Time-Zone} header is special in that it can only have one
18792 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
18793 values'' (because it makes no sense), but ``the current local time
18794 zone''.  Most of the time, you'll be using a star here.  However, for a
18795 list of available time zone values, see the variable
18796 @code{nndiary-headers}.
18797 @end itemize
18798
18799 As a concrete example, here are the diary headers to add to your message
18800 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
18801 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
18802 what to do then):
18803
18804 @example
18805 X-Diary-Minute: 0
18806 X-Diary-Hour: 12, 20-24
18807 X-Diary-Dom: 1
18808 X-Diary-Month: *
18809 X-Diary-Year: 1999-2010
18810 X-Diary-Dow: 1
18811 X-Diary-Time-Zone: *
18812 @end example
18813
18814 @node Running NNDiary
18815 @subsubsection Running NNDiary
18816 @cindex running nndiary
18817 @cindex nndiary operation modes
18818
18819 @code{nndiary} has two modes of operation: ``traditional'' (the default)
18820 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
18821 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
18822 from your primary mail back end to nndiary groups in order to handle them
18823 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
18824 mail and handles it independently from your primary mail back end.
18825
18826 One should note that Gnus is not inherently designed to allow several
18827 ``master'' mail back ends at the same time.  However, this does make
18828 sense with @code{nndiary}: you really want to send and receive diary
18829 messages to your diary groups directly.  So, @code{nndiary} supports
18830 being sort of a ``second primary mail back end'' (to my knowledge, it is
18831 the only back end offering this feature).  However, there is a limitation
18832 (which I hope to fix some day): respooling doesn't work in autonomous
18833 mode.
18834
18835 In order to use @code{nndiary} in autonomous mode, you have several
18836 things to do:
18837
18838 @itemize @bullet
18839 @item
18840 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
18841 line in your @file{~/.gnus.el} file:
18842
18843 @lisp
18844 (setq nndiary-get-new-mail t)
18845 @end lisp
18846 @item
18847 You must arrange for diary messages (those containing @code{X-Diary-*}
18848 headers) to be split in a private folder @emph{before} Gnus treat them.
18849 Again, this is needed because Gnus cannot (yet ?) properly handle
18850 multiple primary mail back ends.  Getting those messages from a separate
18851 source will compensate this misfeature to some extent.
18852
18853 As an example, here's my procmailrc entry to store diary files in
18854 @file{~/.nndiary} (the default @code{nndiary} mail source file):
18855
18856 @example
18857 :0 HD :
18858 * ^X-Diary
18859 .nndiary
18860 @end example
18861 @end itemize
18862
18863 Once this is done, you might want to customize the following two options
18864 that affect the diary mail retrieval and splitting processes:
18865
18866 @defvar nndiary-mail-sources
18867 This is the diary-specific replacement for the standard
18868 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
18869 @code{(file :path "~/.nndiary")}.
18870 @end defvar
18871
18872 @defvar nndiary-split-methods
18873 This is the diary-specific replacement for the standard
18874 @code{nnmail-split-methods} variable.  It obeys the same syntax.
18875 @end defvar
18876
18877   Finally, you may add a permanent @code{nndiary} virtual server
18878 (something like @code{(nndiary "diary")} should do) to your
18879 @code{gnus-secondary-select-methods}.
18880
18881   Hopefully, almost everything (see the TODO section in
18882 @file{nndiary.el}) will work as expected when you restart Gnus: in
18883 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
18884 also get your new diary mails and split them according to your
18885 diary-specific rules, @kbd{F} will find your new diary groups etc.
18886
18887 @node Customizing NNDiary
18888 @subsubsection Customizing NNDiary
18889 @cindex customizing nndiary
18890 @cindex nndiary customization
18891
18892 Now that @code{nndiary} is up and running, it's time to customize it.
18893 The custom group is called @code{nndiary} (no, really ?!).  You should
18894 browse it to figure out which options you'd like to tweak.  The following
18895 two variables are probably the only ones you will want to change:
18896
18897 @defvar nndiary-reminders
18898 This is the list of times when you want to be reminded of your
18899 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
18900 before and that's it).  Remember that ``being reminded'' means that the
18901 diary message will pop up as brand new and unread again when you get new
18902 mail.
18903 @end defvar
18904
18905 @defvar nndiary-week-starts-on-monday
18906 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
18907 default).
18908 @end defvar
18909
18910
18911 @node The Gnus Diary Library
18912 @subsection The Gnus Diary Library
18913 @cindex gnus-diary
18914 @cindex the gnus diary library
18915
18916 Using @code{nndiary} manually (I mean, writing the headers by hand and
18917 so on) would be rather boring.  Fortunately, there is a library called
18918 @code{gnus-diary} written on top of @code{nndiary}, that does many
18919 useful things for you.
18920
18921   In order to use it, add the following line to your @file{~/.gnus.el} file:
18922
18923 @lisp
18924 (require 'gnus-diary)
18925 @end lisp
18926
18927   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
18928 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
18929 (sorry if you used them before).
18930
18931
18932 @menu
18933 * Diary Summary Line Format::           A nicer summary buffer line format.
18934 * Diary Articles Sorting::              A nicer way to sort messages.
18935 * Diary Headers Generation::            Not doing it manually.
18936 * Diary Group Parameters::              Not handling them manually.
18937 @end menu
18938
18939 @node Diary Summary Line Format
18940 @subsubsection Diary Summary Line Format
18941 @cindex diary summary buffer line
18942 @cindex diary summary line format
18943
18944 Displaying diary messages in standard summary line format (usually
18945 something like @samp{From Joe: Subject}) is pretty useless.  Most of
18946 the time, you're the one who wrote the message, and you mostly want to
18947 see the event's date.
18948
18949   @code{gnus-diary} provides two supplemental user formats to be used in
18950 summary line formats.  @code{D} corresponds to a formatted time string
18951 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
18952 while @code{d} corresponds to an approximative remaining time until the
18953 next occurrence of the event (e.g. ``in 6 months, 1 week'').
18954
18955   For example, here's how Joe's birthday is displayed in my
18956 @code{nndiary+diary:birthdays} summary buffer (note that the message is
18957 expirable, but will never be deleted, as it specifies a periodic event):
18958
18959 @example
18960    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
18961 @end example
18962
18963 In order to get something like the above, you would normally add the
18964 following line to your diary groups'parameters:
18965
18966 @lisp
18967 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
18968 @end lisp
18969
18970 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
18971 Parameters}).  You can however customize the provided summary line format
18972 with the following user options:
18973
18974 @defvar gnus-diary-summary-line-format
18975 Defines the summary line format used for diary groups (@pxref{Summary
18976 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
18977 diary groups'parameters.
18978 @end defvar
18979
18980 @defvar gnus-diary-time-format
18981 Defines the format to display dates in diary summary buffers.  This is
18982 used by the @code{D} user format.  See the docstring for details.
18983 @end defvar
18984
18985 @defvar gnus-diary-delay-format-function
18986 Defines the format function to use for displaying delays (remaining
18987 times) in diary summary buffers.  This is used by the @code{d} user
18988 format.  There are currently built-in functions for English and French;
18989 you can also define your own.  See the docstring for details.
18990 @end defvar
18991
18992 @node Diary Articles Sorting
18993 @subsubsection Diary Articles Sorting
18994 @cindex diary articles sorting
18995 @cindex diary summary lines sorting
18996 @findex gnus-summary-sort-by-schedule
18997 @findex gnus-thread-sort-by-schedule
18998 @findex gnus-article-sort-by-schedule
18999
19000 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19001 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19002 @code{gnus-thread-sort-by-schedule} and
19003 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19004 your diary summary buffers from the closest event to the farthest one.
19005
19006 @code{gnus-diary} automatically installs
19007 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19008 buffer's ``sort'' menu, and the two others as the primary (hence
19009 default) sorting functions in the group parameters (@pxref{Diary Group
19010 Parameters}).
19011
19012 @node Diary Headers Generation
19013 @subsubsection Diary Headers Generation
19014 @cindex diary headers generation
19015 @findex gnus-diary-check-message
19016
19017 @code{gnus-diary} provides a function called
19018 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19019 headers.  This function ensures that the current message contains all the
19020 required diary headers, and prompts you for values or corrections if
19021 needed.
19022
19023   This function is hooked into the @code{nndiary} back end, so that
19024 moving or copying an article to a diary group will trigger it
19025 automatically.  It is also bound to @kbd{C-c C-f d} in
19026 @code{message-mode} and @code{article-edit-mode} in order to ease the
19027 process of converting a usual mail to a diary one.
19028
19029   This function takes a prefix argument which will force prompting of
19030 all diary headers, regardless of their presence or validity.  That way,
19031 you can very easily reschedule an already valid diary message, for
19032 instance.
19033
19034 @node Diary Group Parameters
19035 @subsubsection Diary Group Parameters
19036 @cindex diary group parameters
19037
19038 When you create a new diary group, or visit one, @code{gnus-diary}
19039 automatically checks your group parameters and if needed, sets the
19040 summary line format to the diary-specific value, installs the
19041 diary-specific sorting functions, and also adds the different
19042 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19043 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19044 on a diary group to prepare a message, these headers will be inserted
19045 automatically (although not filled with proper values yet).
19046
19047 @node Sending or Not Sending
19048 @subsection Sending or Not Sending
19049
19050 Well, assuming you've read all of the above, here are two final notes on
19051 mail sending with @code{nndiary}:
19052
19053 @itemize @bullet
19054 @item
19055 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19056 messsages for real.  This means for instance that you can give
19057 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19058 sending the diary message to them as well.
19059 @item
19060 However, since @code{nndiary} also has a @code{request-post} method, you
19061 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19062 message won't actually be sent; just stored locally in the group. This
19063 comes in very handy for private appointments.
19064 @end itemize
19065
19066 @node Gnus Unplugged
19067 @section Gnus Unplugged
19068 @cindex offline
19069 @cindex unplugged
19070 @cindex agent
19071 @cindex Gnus agent
19072 @cindex Gnus unplugged
19073
19074 In olden times (ca. February '88), people used to run their newsreaders
19075 on big machines with permanent connections to the net.  News transport
19076 was dealt with by news servers, and all the newsreaders had to do was to
19077 read news.  Believe it or not.
19078
19079 Nowadays most people read news and mail at home, and use some sort of
19080 modem to connect to the net.  To avoid running up huge phone bills, it
19081 would be nice to have a way to slurp down all the news and mail, hang up
19082 the phone, read for several hours, and then upload any responses you
19083 have to make.  And then you repeat the procedure.
19084
19085 Of course, you can use news servers for doing this as well.  I've used
19086 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19087 for some years, but doing that's a bore.  Moving the news server
19088 functionality up to the newsreader makes sense if you're the only person
19089 reading news on a machine.
19090
19091 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19092 fact, you don't have to configure anything as the agent is now enabled
19093 by default (@pxref{Agent Variables, gnus-agent}).
19094
19095 Of course, to use it as such, you have to learn a few new commands.
19096
19097 @menu
19098 * Agent Basics::                How it all is supposed to work.
19099 * Agent Categories::            How to tell the Gnus Agent what to download.
19100 * Agent Commands::              New commands for all the buffers.
19101 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19102 * Agent as Cache::              The Agent is a big cache too.
19103 * Agent Expiry::                How to make old articles go away.
19104 * Agent Regeneration::          How to recover from lost connections and other accidents.
19105 * Agent and flags::             How the Agent maintains flags.
19106 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19107 * Outgoing Messages::           What happens when you post/mail something?
19108 * Agent Variables::             Customizing is fun.
19109 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19110 * Batching Agents::             How to fetch news from a @code{cron} job.
19111 * Agent Caveats::               What you think it'll do and what it does.
19112 @end menu
19113
19114
19115 @node Agent Basics
19116 @subsection Agent Basics
19117
19118 First, let's get some terminology out of the way.
19119
19120 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19121 connection to the net (and notified the Agent that this is the case).
19122 When the connection to the net is up again (and Gnus knows this), the
19123 Agent is @dfn{plugged}.
19124
19125 The @dfn{local} machine is the one you're running on, and which isn't
19126 connected to the net continuously.
19127
19128 @dfn{Downloading} means fetching things from the net to your local
19129 machine.  @dfn{Uploading} is doing the opposite.
19130
19131 You know that Gnus gives you all the opportunity you'd ever want for
19132 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19133 is also customizable to a great extent, which means that the user has a
19134 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19135 you in your foot, but with Gnus, you have a choice!
19136
19137 Gnus is never really in plugged or unplugged state.  Rather, it applies
19138 that state to each server individually.  This means that some servers
19139 can be plugged while others can be unplugged.  Additionally, some
19140 servers can be ignored by the Agent altogether (which means that
19141 they're kinda like plugged always).
19142
19143 So when you unplug the Agent and then wonder why is Gnus opening a
19144 connection to the Net, the next step to do is to look whether all
19145 servers are agentized.  If there is an unagentized server, you found
19146 the culprit.
19147
19148 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19149 reachable.  When Gnus notices this, it asks you whether you want the
19150 server to be switched to offline state.  If you say yes, then the
19151 server will behave somewhat as if it was unplugged, except that Gnus
19152 will ask you whether you want to switch it back online again.
19153
19154 Let's take a typical Gnus session using the Agent.
19155
19156 @itemize @bullet
19157
19158 @item
19159 @findex gnus-unplugged
19160 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19161 Agent in a disconnected state.  You can read all the news that you have
19162 already fetched while in this mode.
19163
19164 @item
19165 You then decide to see whether any new news has arrived.  You connect
19166 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19167 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19168 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19169 Source Specifiers}).
19170
19171 @item
19172 You can then read the new news immediately, or you can download the
19173 news onto your local machine.  If you want to do the latter, you press
19174 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19175 all the eligible articles in all the groups.  (To let Gnus know which
19176 articles you want to download, @pxref{Agent Categories}).
19177
19178 @item
19179 After fetching the articles, you press @kbd{J j} to make Gnus become
19180 unplugged again, and you shut down the PPP thing (or whatever).  And
19181 then you read the news offline.
19182
19183 @item
19184 And then you go to step 2.
19185 @end itemize
19186
19187 Here are some things you should do the first time (or so) that you use
19188 the Agent.
19189
19190 @itemize @bullet
19191
19192 @item
19193 Decide which servers should be covered by the Agent.  If you have a mail
19194 back end, it would probably be nonsensical to have it covered by the
19195 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19196 @kbd{J a} on the server (or servers) that you wish to have covered by the
19197 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19198 added servers you do not wish to have covered by the Agent.  By default,
19199 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19200 @code{gnus-secondary-select-methods} are agentized.
19201
19202 @item
19203 Decide on download policy.  It's fairly simple once you decide whether
19204 you are going to use agent categories, topic parameters, and/or group
19205 parameters to implement your policy.  If you're new to gnus, it
19206 is probably best to start with a category, @xref{Agent Categories}.
19207
19208 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19209 (@pxref{Agent Categories}) provide for setting a policy that applies
19210 to multiple groups.  Which you use is entirely up to you.  Topic
19211 parameters do override categories so, if you mix the two, you'll have
19212 to take that into account.  If you have a few groups that deviate from
19213 your policy, you can use group parameters (@pxref{Group Parameters}) to
19214 configure them.
19215
19216 @item
19217 Uhm@dots{} that's it.
19218 @end itemize
19219
19220
19221 @node Agent Categories
19222 @subsection Agent Categories
19223
19224 One of the main reasons to integrate the news transport layer into the
19225 newsreader is to allow greater control over what articles to download.
19226 There's not much point in downloading huge amounts of articles, just to
19227 find out that you're not interested in reading any of them.  It's better
19228 to be somewhat more conservative in choosing what to download, and then
19229 mark the articles for downloading manually if it should turn out that
19230 you're interested in the articles anyway.
19231
19232 One of the more effective methods for controlling what is to be
19233 downloaded is to create a @dfn{category} and then assign some (or all)
19234 groups to this category.  Groups that do not belong in any other
19235 category belong to the @code{default} category.  Gnus has its own
19236 buffer for creating and managing categories.
19237
19238 If you prefer, you can also use group parameters (@pxref{Group
19239 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19240 alternative approach to controlling the agent.  The only real
19241 difference is that categories are specific to the agent (so there is
19242 less to learn) while group and topic parameters include the kitchen
19243 sink.
19244
19245 Since you can set agent parameters in several different places we have
19246 a rule to decide which source to believe.  This rule specifies that
19247 the parameter sources are checked in the following order: group
19248 parameters, topic parameters, agent category, and finally customizable
19249 variables.  So you can mix all of these sources to produce a wide range
19250 of behavior, just don't blame me if you don't remember where you put
19251 your settings.
19252
19253 @menu
19254 * Category Syntax::             What a category looks like.
19255 * Category Buffer::             A buffer for maintaining categories.
19256 * Category Variables::          Customize'r'Us.
19257 @end menu
19258
19259
19260 @node Category Syntax
19261 @subsubsection Category Syntax
19262
19263 A category consists of a name, the list of groups belonging to the
19264 category, and a number of optional parameters that override the
19265 customizable variables.  The complete list of agent parameters are
19266 listed below.
19267
19268 @cindex Agent Parameters
19269 @table @code
19270 @item agent-groups
19271 The list of groups that are in this category.
19272
19273 @item agent-predicate
19274 A predicate which (generally) gives a rough outline of which articles
19275 are eligible for downloading; and
19276
19277 @item agent-score
19278 a score rule which (generally) gives you a finer granularity when
19279 deciding what articles to download.  (Note that this @dfn{download
19280 score} is not necessarily related to normal scores.)
19281
19282 @item agent-enable-expiration
19283 a boolean indicating whether the agent should expire old articles in
19284 this group.  Most groups should be expired to conserve disk space.  In
19285 fact, its probably safe to say that the gnus.* hierarchy contains the
19286 only groups that should not be expired.
19287
19288 @item agent-days-until-old
19289 an integer indicating the number of days that the agent should wait
19290 before deciding that a read article is safe to expire.
19291
19292 @item agent-low-score
19293 an integer that overrides the value of @code{gnus-agent-low-score}.
19294
19295 @item agent-high-score
19296 an integer that overrides the value of @code{gnus-agent-high-score}.
19297
19298 @item agent-short-article
19299 an integer that overrides the value of
19300 @code{gnus-agent-short-article}.
19301
19302 @item agent-long-article
19303 an integer that overrides the value of @code{gnus-agent-long-article}.
19304
19305 @item agent-enable-undownloaded-faces
19306 a symbol indicating whether the summary buffer should display
19307 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
19308 faces.  Any symbol other than @code{nil} will enable the use of
19309 undownloaded faces.
19310 @end table
19311
19312 The name of a category can not be changed once the category has been
19313 created.
19314
19315 Each category maintains a list of groups that are exclusive members of
19316 that category.  The exclusivity rule is automatically enforced, add a
19317 group to a new category and it is automatically removed from its old
19318 category.
19319
19320 A predicate in its simplest form can be a single predicate such as
19321 @code{true} or @code{false}.  These two will download every available
19322 article or nothing respectively.  In the case of these two special
19323 predicates an additional score rule is superfluous.
19324
19325 Predicates of @code{high} or @code{low} download articles in respect of
19326 their scores in relationship to @code{gnus-agent-high-score} and
19327 @code{gnus-agent-low-score} as described below.
19328
19329 To gain even finer control of what is to be regarded eligible for
19330 download a predicate can consist of a number of predicates with logical
19331 operators sprinkled in between.
19332
19333 Perhaps some examples are in order.
19334
19335 Here's a simple predicate.  (It's the default predicate, in fact, used
19336 for all groups that don't belong to any other category.)
19337
19338 @lisp
19339 short
19340 @end lisp
19341
19342 Quite simple, eh?  This predicate is true if and only if the article is
19343 short (for some value of ``short'').
19344
19345 Here's a more complex predicate:
19346
19347 @lisp
19348 (or high
19349     (and
19350      (not low)
19351      (not long)))
19352 @end lisp
19353
19354 This means that an article should be downloaded if it has a high score,
19355 or if the score is not low and the article is not long.  You get the
19356 drift.
19357
19358 The available logical operators are @code{or}, @code{and} and
19359 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
19360 @samp{|}, @code{&} and @code{!} instead.)
19361
19362 The following predicates are pre-defined, but if none of these fit what
19363 you want to do, you can write your own.
19364
19365 When evaluating each of these predicates, the named constant will be
19366 bound to the value determined by calling
19367 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
19368 example, gnus-agent-short-article will be bound to
19369 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
19370 means that you can specify a predicate in your category then tune that
19371 predicate to individual groups.
19372
19373 @table @code
19374 @item short
19375 True if the article is shorter than @code{gnus-agent-short-article}
19376 lines; default 100.
19377
19378 @item long
19379 True if the article is longer than @code{gnus-agent-long-article}
19380 lines; default 200.
19381
19382 @item low
19383 True if the article has a download score less than
19384 @code{gnus-agent-low-score}; default 0.
19385
19386 @item high
19387 True if the article has a download score greater than
19388 @code{gnus-agent-high-score}; default 0.
19389
19390 @item spam
19391 True if the Gnus Agent guesses that the article is spam.  The
19392 heuristics may change over time, but at present it just computes a
19393 checksum and sees whether articles match.
19394
19395 @item true
19396 Always true.
19397
19398 @item false
19399 Always false.
19400 @end table
19401
19402 If you want to create your own predicate function, here's what you have
19403 to know:  The functions are called with no parameters, but the
19404 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
19405 useful values.
19406
19407 For example, you could decide that you don't want to download articles
19408 that were posted more than a certain number of days ago (e.g. posted
19409 more than @code{gnus-agent-expire-days} ago) you might write a function
19410 something along the lines of the following:
19411
19412 @lisp
19413 (defun my-article-old-p ()
19414   "Say whether an article is old."
19415   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
19416      (- (time-to-days (current-time)) gnus-agent-expire-days)))
19417 @end lisp
19418
19419 with the predicate then defined as:
19420
19421 @lisp
19422 (not my-article-old-p)
19423 @end lisp
19424
19425 or you could append your predicate to the predefined
19426 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
19427 wherever.
19428
19429 @lisp
19430 (require 'gnus-agent)
19431 (setq  gnus-category-predicate-alist
19432   (append gnus-category-predicate-alist
19433          '((old . my-article-old-p))))
19434 @end lisp
19435
19436 and simply specify your predicate as:
19437
19438 @lisp
19439 (not old)
19440 @end lisp
19441
19442 If/when using something like the above, be aware that there are many
19443 misconfigured systems/mailers out there and so an article's date is not
19444 always a reliable indication of when it was posted.  Hell, some people
19445 just don't give a damn.
19446
19447 The above predicates apply to @emph{all} the groups which belong to the
19448 category.  However, if you wish to have a specific predicate for an
19449 individual group within a category, or you're just too lazy to set up a
19450 new category, you can enter a group's individual predicate in its group
19451 parameters like so:
19452
19453 @lisp
19454 (agent-predicate . short)
19455 @end lisp
19456
19457 This is the group/topic parameter equivalent of the agent category default.
19458 Note that when specifying a single word predicate like this, the
19459 @code{agent-predicate} specification must be in dotted pair notation.
19460
19461 The equivalent of the longer example from above would be:
19462
19463 @lisp
19464 (agent-predicate or high (and (not low) (not long)))
19465 @end lisp
19466
19467 The outer parenthesis required in the category specification are not
19468 entered here as, not being in dotted pair notation, the value of the
19469 predicate is assumed to be a list.
19470
19471
19472 Now, the syntax of the download score is the same as the syntax of
19473 normal score files, except that all elements that require actually
19474 seeing the article itself are verboten.  This means that only the
19475 following headers can be scored on: @code{Subject}, @code{From},
19476 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
19477 @code{Lines}, and @code{Xref}.
19478
19479 As with predicates, the specification of the @code{download score rule}
19480 to use in respect of a group can be in either the category definition if
19481 it's to be applicable to all groups in therein, or a group's parameters
19482 if it's to be specific to that group.
19483
19484 In both of these places the @code{download score rule} can take one of
19485 three forms:
19486
19487 @enumerate
19488 @item
19489 Score rule
19490
19491 This has the same syntax as a normal Gnus score file except only a
19492 subset of scoring keywords are available as mentioned above.
19493
19494 example:
19495
19496 @itemize @bullet
19497 @item
19498 Category specification
19499
19500 @lisp
19501 (("from"
19502        ("Lars Ingebrigtsen" 1000000 nil s))
19503 ("lines"
19504        (500 -100 nil <)))
19505 @end lisp
19506
19507 @item
19508 Group/Topic Parameter specification
19509
19510 @lisp
19511 (agent-score ("from"
19512                    ("Lars Ingebrigtsen" 1000000 nil s))
19513              ("lines"
19514                    (500 -100 nil <)))
19515 @end lisp
19516
19517 Again, note the omission of the outermost parenthesis here.
19518 @end itemize
19519
19520 @item
19521 Agent score file
19522
19523 These score files must @emph{only} contain the permitted scoring
19524 keywords stated above.
19525
19526 example:
19527
19528 @itemize @bullet
19529 @item
19530 Category specification
19531
19532 @lisp
19533 ("~/News/agent.SCORE")
19534 @end lisp
19535
19536 or perhaps
19537
19538 @lisp
19539 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
19540 @end lisp
19541
19542 @item
19543 Group Parameter specification
19544
19545 @lisp
19546 (agent-score "~/News/agent.SCORE")
19547 @end lisp
19548
19549 Additional score files can be specified as above.  Need I say anything
19550 about parenthesis?
19551 @end itemize
19552
19553 @item
19554 Use @code{normal} score files
19555
19556 If you don't want to maintain two sets of scoring rules for a group, and
19557 your desired @code{downloading} criteria for a group are the same as your
19558 @code{reading} criteria then you can tell the agent to refer to your
19559 @code{normal} score files when deciding what to download.
19560
19561 These directives in either the category definition or a group's
19562 parameters will cause the agent to read in all the applicable score
19563 files for a group, @emph{filtering out} those sections that do not
19564 relate to one of the permitted subset of scoring keywords.
19565
19566 @itemize @bullet
19567 @item
19568 Category Specification
19569
19570 @lisp
19571 file
19572 @end lisp
19573
19574 @item
19575 Group Parameter specification
19576
19577 @lisp
19578 (agent-score . file)
19579 @end lisp
19580 @end itemize
19581 @end enumerate
19582
19583 @node Category Buffer
19584 @subsubsection Category Buffer
19585
19586 You'd normally do all category maintenance from the category buffer.
19587 When you enter it for the first time (with the @kbd{J c} command from
19588 the group buffer), you'll only see the @code{default} category.
19589
19590 The following commands are available in this buffer:
19591
19592 @table @kbd
19593 @item q
19594 @kindex q (Category)
19595 @findex gnus-category-exit
19596 Return to the group buffer (@code{gnus-category-exit}).
19597
19598 @item e
19599 @kindex e (Category)
19600 @findex gnus-category-customize-category
19601 Use a customization buffer to set all of the selected category's
19602 parameters at one time (@code{gnus-category-customize-category}).
19603
19604 @item k
19605 @kindex k (Category)
19606 @findex gnus-category-kill
19607 Kill the current category (@code{gnus-category-kill}).
19608
19609 @item c
19610 @kindex c (Category)
19611 @findex gnus-category-copy
19612 Copy the current category (@code{gnus-category-copy}).
19613
19614 @item a
19615 @kindex a (Category)
19616 @findex gnus-category-add
19617 Add a new category (@code{gnus-category-add}).
19618
19619 @item p
19620 @kindex p (Category)
19621 @findex gnus-category-edit-predicate
19622 Edit the predicate of the current category
19623 (@code{gnus-category-edit-predicate}).
19624
19625 @item g
19626 @kindex g (Category)
19627 @findex gnus-category-edit-groups
19628 Edit the list of groups belonging to the current category
19629 (@code{gnus-category-edit-groups}).
19630
19631 @item s
19632 @kindex s (Category)
19633 @findex gnus-category-edit-score
19634 Edit the download score rule of the current category
19635 (@code{gnus-category-edit-score}).
19636
19637 @item l
19638 @kindex l (Category)
19639 @findex gnus-category-list
19640 List all the categories (@code{gnus-category-list}).
19641 @end table
19642
19643
19644 @node Category Variables
19645 @subsubsection Category Variables
19646
19647 @table @code
19648 @item gnus-category-mode-hook
19649 @vindex gnus-category-mode-hook
19650 Hook run in category buffers.
19651
19652 @item gnus-category-line-format
19653 @vindex gnus-category-line-format
19654 Format of the lines in the category buffer (@pxref{Formatting
19655 Variables}).  Valid elements are:
19656
19657 @table @samp
19658 @item c
19659 The name of the category.
19660
19661 @item g
19662 The number of groups in the category.
19663 @end table
19664
19665 @item gnus-category-mode-line-format
19666 @vindex gnus-category-mode-line-format
19667 Format of the category mode line (@pxref{Mode Line Formatting}).
19668
19669 @item gnus-agent-short-article
19670 @vindex gnus-agent-short-article
19671 Articles that have fewer lines than this are short.  Default 100.
19672
19673 @item gnus-agent-long-article
19674 @vindex gnus-agent-long-article
19675 Articles that have more lines than this are long.  Default 200.
19676
19677 @item gnus-agent-low-score
19678 @vindex gnus-agent-low-score
19679 Articles that have a score lower than this have a low score.  Default
19680 0.
19681
19682 @item gnus-agent-high-score
19683 @vindex gnus-agent-high-score
19684 Articles that have a score higher than this have a high score.  Default
19685 0.
19686
19687 @item gnus-agent-expire-days
19688 @vindex gnus-agent-expire-days
19689 The number of days that a @samp{read} article must stay in the agent's
19690 local disk before becoming eligible for expiration (While the name is
19691 the same, this doesn't mean expiring the article on the server.  It
19692 just means deleting the local copy of the article).  What is also
19693 important to understand is that the counter starts with the time the
19694 article was written to the local disk and not the time the article was
19695 read.
19696 Default 7.
19697
19698 @item gnus-agent-enable-expiration
19699 @vindex gnus-agent-enable-expiration
19700 Determines whether articles in a group are, by default, expired or
19701 retained indefinitely.  The default is @code{ENABLE} which means that
19702 you'll have to disable expiration when desired.  On the other hand,
19703 you could set this to @code{DISABLE}.  In that case, you would then
19704 have to enable expiration in selected groups.
19705
19706 @end table
19707
19708
19709 @node Agent Commands
19710 @subsection Agent Commands
19711 @findex gnus-agent-toggle-plugged
19712 @kindex J j (Agent)
19713
19714 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
19715 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
19716 toggles the plugged/unplugged state of the Gnus Agent.
19717
19718
19719 @menu
19720 * Group Agent Commands::        Configure groups and fetch their contents.
19721 * Summary Agent Commands::      Manually select then fetch specific articles.
19722 * Server Agent Commands::       Select the servers that are supported by the agent.
19723 @end menu
19724
19725
19726
19727
19728 @node Group Agent Commands
19729 @subsubsection Group Agent Commands
19730
19731 @table @kbd
19732 @item J u
19733 @kindex J u (Agent Group)
19734 @findex gnus-agent-fetch-groups
19735 Fetch all eligible articles in the current group
19736 (@code{gnus-agent-fetch-groups}).
19737
19738 @item J c
19739 @kindex J c (Agent Group)
19740 @findex gnus-enter-category-buffer
19741 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
19742
19743 @item J s
19744 @kindex J s (Agent Group)
19745 @findex gnus-agent-fetch-session
19746 Fetch all eligible articles in all groups
19747 (@code{gnus-agent-fetch-session}).
19748
19749 @item J S
19750 @kindex J S (Agent Group)
19751 @findex gnus-group-send-queue
19752 Send all sendable messages in the queue group
19753 (@code{gnus-group-send-queue}).  @xref{Drafts}.
19754
19755 @item J a
19756 @kindex J a (Agent Group)
19757 @findex gnus-agent-add-group
19758 Add the current group to an Agent category
19759 (@code{gnus-agent-add-group}).  This command understands the
19760 process/prefix convention (@pxref{Process/Prefix}).
19761
19762 @item J r
19763 @kindex J r (Agent Group)
19764 @findex gnus-agent-remove-group
19765 Remove the current group from its category, if any
19766 (@code{gnus-agent-remove-group}).  This command understands the
19767 process/prefix convention (@pxref{Process/Prefix}).
19768
19769 @item J Y
19770 @kindex J Y (Agent Group)
19771 @findex gnus-agent-synchronize-flags
19772 Synchronize flags changed while unplugged with remote server, if any.
19773
19774
19775 @end table
19776
19777
19778 @node Summary Agent Commands
19779 @subsubsection Summary Agent Commands
19780
19781 @table @kbd
19782 @item J #
19783 @kindex J # (Agent Summary)
19784 @findex gnus-agent-mark-article
19785 Mark the article for downloading (@code{gnus-agent-mark-article}).
19786
19787 @item J M-#
19788 @kindex J M-# (Agent Summary)
19789 @findex gnus-agent-unmark-article
19790 Remove the downloading mark from the article
19791 (@code{gnus-agent-unmark-article}).
19792
19793 @cindex %
19794 @item @@
19795 @kindex @@ (Agent Summary)
19796 @findex gnus-agent-toggle-mark
19797 Toggle whether to download the article
19798 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
19799 default.
19800
19801 @item J c
19802 @kindex J c (Agent Summary)
19803 @findex gnus-agent-catchup
19804 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
19805
19806 @item J S
19807 @kindex J S (Agent Summary)
19808 @findex gnus-agent-fetch-group
19809 Download all eligible (@pxref{Agent Categories}) articles in this group.
19810 (@code{gnus-agent-fetch-group}).
19811
19812 @item J s
19813 @kindex J s (Agent Summary)
19814 @findex gnus-agent-summary-fetch-series
19815 Download all processable articles in this group.
19816 (@code{gnus-agent-summary-fetch-series}).
19817
19818 @item J u
19819 @kindex J u (Agent Summary)
19820 @findex gnus-agent-summary-fetch-group
19821 Download all downloadable articles in the current group
19822 (@code{gnus-agent-summary-fetch-group}).
19823
19824 @end table
19825
19826
19827 @node Server Agent Commands
19828 @subsubsection Server Agent Commands
19829
19830 @table @kbd
19831 @item J a
19832 @kindex J a (Agent Server)
19833 @findex gnus-agent-add-server
19834 Add the current server to the list of servers covered by the Gnus Agent
19835 (@code{gnus-agent-add-server}).
19836
19837 @item J r
19838 @kindex J r (Agent Server)
19839 @findex gnus-agent-remove-server
19840 Remove the current server from the list of servers covered by the Gnus
19841 Agent (@code{gnus-agent-remove-server}).
19842
19843 @end table
19844
19845
19846 @node Agent Visuals
19847 @subsection Agent Visuals
19848
19849 If you open a summary while unplugged and, Gnus knows from the group's
19850 active range that there are more articles than the headers currently
19851 stored in the Agent, you may see some articles whose subject looks
19852 something like @samp{[Undownloaded article #####]}.  These are
19853 placeholders for the missing headers.  Aside from setting a mark,
19854 there is not much that can be done with one of these placeholders.
19855 When Gnus finally gets a chance to fetch the group's headers, the
19856 placeholders will automatically be replaced by the actual headers.
19857 You can configure the summary buffer's maneuvering to skip over the
19858 placeholders if you care (See @code{gnus-auto-goto-ignores}).
19859
19860 While it may be obvious to all, the only headers and articles
19861 available while unplugged are those headers and articles that were
19862 fetched into the Agent while previously plugged.  To put it another
19863 way, ``If you forget to fetch something while plugged, you might have a
19864 less than satisfying unplugged session''.  For this reason, the Agent
19865 adds two visual effects to your summary buffer.  These effects display
19866 the download status of each article so that you always know which
19867 articles will be available when unplugged.
19868
19869 The first visual effect is the @samp{%O} spec.  If you customize
19870 @code{gnus-summary-line-format} to include this specifier, you will add
19871 a single character field that indicates an article's download status.
19872 Articles that have been fetched into either the Agent or the Cache,
19873 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
19874 other articles will display @code{gnus-undownloaded-mark} (defaults to
19875 @samp{-}).  If you open a group that has not been agentized, a space
19876 (@samp{ }) will be displayed.
19877
19878 The second visual effect are the undownloaded faces.  The faces, there
19879 are three indicating the article's score (low, normal, high), seem to
19880 result in a love/hate response from many Gnus users.  The problem is
19881 that the face selection is controlled by a list of condition tests and
19882 face names (See @code{gnus-summary-highlight}).  Each condition is
19883 tested in the order in which it appears in the list so early
19884 conditions have precedence over later conditions.  All of this means
19885 that, if you tick an undownloaded article, the article will continue
19886 to be displayed in the undownloaded face rather than the ticked face.
19887
19888 If you use the Agent as a cache (to avoid downloading the same article
19889 each time you visit it or to minimize your connection time), the
19890 undownloaded face will probably seem like a good idea.  The reason
19891 being that you do all of our work (marking, reading, deleting) with
19892 downloaded articles so the normal faces always appear.  For those
19893 users using the agent to improve online performance by caching the NOV
19894 database (most users since 5.10.2), the undownloaded faces may appear
19895 to be an absolutely horrible idea.  The issue being that, since none
19896 of their articles have been fetched into the Agent, all of the
19897 normal faces will be obscured by the undownloaded faces.
19898
19899 If you would like to use the undownloaded faces, you must enable the
19900 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
19901 group parameter to @code{t}.  This parameter, like all other agent
19902 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
19903 a Group Topic (@pxref{Topic Parameters}), or an individual group
19904 (@pxref{Group Parameters}).
19905
19906 The one problem common to all users using the agent is how quickly it
19907 can consume disk space.  If you using the agent on many groups, it is
19908 even more difficult to effectively recover disk space.  One solution
19909 is the @samp{%F} format available in @code{gnus-group-line-format}.
19910 This format will display the actual disk space used by articles
19911 fetched into both the agent and cache.  By knowing which groups use
19912 the most space, users know where to focus their efforts when ``agent
19913 expiring'' articles.
19914
19915 @node Agent as Cache
19916 @subsection Agent as Cache
19917
19918 When Gnus is plugged, it is not efficient to download headers or
19919 articles from the server again, if they are already stored in the
19920 Agent.  So, Gnus normally only downloads headers once, and stores them
19921 in the Agent.  These headers are later used when generating the summary
19922 buffer, regardless of whether you are plugged or unplugged.  Articles
19923 are not cached in the Agent by default though (that would potentially
19924 consume lots of disk space), but if you have already downloaded an
19925 article into the Agent, Gnus will not download the article from the
19926 server again but use the locally stored copy instead.
19927
19928 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
19929 @pxref{Agent Variables}) to always download headers and articles while
19930 plugged.  Gnus will almost certainly be slower, but it will be kept
19931 synchronized with the server.  That last point probably won't make any
19932 sense if you are using a nntp or nnimap back end.
19933
19934 @node Agent Expiry
19935 @subsection Agent Expiry
19936
19937 @vindex gnus-agent-expire-days
19938 @findex gnus-agent-expire
19939 @kindex M-x gnus-agent-expire
19940 @kindex M-x gnus-agent-expire-group
19941 @findex gnus-agent-expire-group
19942 @cindex agent expiry
19943 @cindex Gnus agent expiry
19944 @cindex expiry, in Gnus agent
19945
19946 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
19947 least it doesn't handle it like other back ends.  Instead, there are
19948 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
19949 commands that will expire all read articles that are older than
19950 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
19951 that you're running out of space.  Neither are particularly fast or
19952 efficient, and it's not a particularly good idea to interrupt them (with
19953 @kbd{C-g} or anything else) once you've started one of them.
19954
19955 Note that other functions, e.g. @code{gnus-request-expire-articles},
19956 might run @code{gnus-agent-expire} for you to keep the agent
19957 synchronized with the group.
19958
19959 The agent parameter @code{agent-enable-expiration} may be used to
19960 prevent expiration in selected groups.
19961
19962 @vindex gnus-agent-expire-all
19963 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
19964 expiration commands will expire all articles---unread, read, ticked
19965 and dormant.  If @code{nil} (which is the default), only read articles
19966 are eligible for expiry, and unread, ticked and dormant articles will
19967 be kept indefinitely.
19968
19969 If you find that some articles eligible for expiry are never expired,
19970 perhaps some Gnus Agent files are corrupted.  There's are special
19971 commands, @code{gnus-agent-regenerate} and
19972 @code{gnus-agent-regenerate-group}, to fix possible problems.
19973
19974 @node Agent Regeneration
19975 @subsection Agent Regeneration
19976
19977 @cindex agent regeneration
19978 @cindex Gnus agent regeneration
19979 @cindex regeneration
19980
19981 The local data structures used by @code{nnagent} may become corrupted
19982 due to certain exceptional conditions.  When this happens,
19983 @code{nnagent} functionality may degrade or even fail.  The solution
19984 to this problem is to repair the local data structures by removing all
19985 internal inconsistencies.
19986
19987 For example, if your connection to your server is lost while
19988 downloaded articles into the agent, the local data structures will not
19989 know about articles successfully downloaded prior to the connection
19990 failure.  Running @code{gnus-agent-regenerate} or
19991 @code{gnus-agent-regenerate-group} will update the data structures
19992 such that you don't need to download these articles a second time.
19993
19994 @findex gnus-agent-regenerate
19995 @kindex M-x gnus-agent-regenerate
19996 The command @code{gnus-agent-regenerate} will perform
19997 @code{gnus-agent-regenerate-group} on every agentized group.  While
19998 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
19999 recommended that you first close all summary buffers.
20000
20001 @findex gnus-agent-regenerate-group
20002 @kindex M-x gnus-agent-regenerate-group
20003 The command @code{gnus-agent-regenerate-group} uses the local copies
20004 of individual articles to repair the local @acronym{NOV}(header) database.  It
20005 then updates the internal data structures that document which articles
20006 are stored locally.  An optional argument will mark articles in the
20007 agent as unread.
20008
20009 @node Agent and flags
20010 @subsection Agent and flags
20011
20012 The Agent works with any Gnus back end including those, such as
20013 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20014 the Agent does not actually know which backends keep their flags in
20015 the backend server rather than in @file{.newsrc}.  This means that the
20016 Agent, while unplugged or disconnected, will always record all changes
20017 to the flags in its own files.
20018
20019 When you plug back in, Gnus will then check to see if you have any
20020 changed any flags and ask if you wish to synchronize these with the
20021 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20022
20023 @vindex gnus-agent-synchronize-flags
20024 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20025 never automatically synchronize flags.  If it is @code{ask}, which is
20026 the default, the Agent will check if you made any changes and if so
20027 ask if you wish to synchronize these when you re-connect.  If it has
20028 any other value, all flags will be synchronized automatically.
20029
20030 If you do not wish to synchronize flags automatically when you
20031 re-connect, you can do it manually with the
20032 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20033 in the group buffer.
20034
20035 Technical note: the synchronization algorithm does not work by ``pushing''
20036 all local flags to the server, but rather by incrementally updated the
20037 server view of flags by changing only those flags that were changed by
20038 the user.  Thus, if you set one flag on an article, quit the group then
20039 re-select the group and remove the flag; the flag will be set and
20040 removed from the server when you ``synchronize''.  The queued flag
20041 operations can be found in the per-server @code{flags} file in the Agent
20042 directory.  It's emptied when you synchronize flags.
20043
20044 @node Agent and IMAP
20045 @subsection Agent and IMAP
20046
20047 The Agent works with any Gnus back end, including nnimap.  However,
20048 since there are some conceptual differences between @acronym{NNTP} and
20049 @acronym{IMAP}, this section (should) provide you with some information to
20050 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20051
20052 Some things are currently not implemented in the Agent that you'd might
20053 expect from a disconnected @acronym{IMAP} client, including:
20054
20055 @itemize @bullet
20056
20057 @item
20058 Copying/moving articles into nnimap groups when unplugged.
20059
20060 @item
20061 Creating/deleting nnimap groups when unplugged.
20062
20063 @end itemize
20064
20065 @node Outgoing Messages
20066 @subsection Outgoing Messages
20067
20068 By default, when Gnus is unplugged, all outgoing messages (both mail
20069 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20070 You can view them there after posting, and edit them at will.
20071
20072 You can control the circumstances under which outgoing mail is queued
20073 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20074 news is always queued when Gnus is unplugged, and never otherwise.
20075
20076 You can send the messages either from the draft group with the special
20077 commands available there, or you can use the @kbd{J S} command in the
20078 group buffer to send all the sendable messages in the draft group.
20079 Posting news will only work when Gnus is plugged, but you can send
20080 mail at any time.
20081
20082 If sending mail while unplugged does not work for you and you worry
20083 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20084 ask you to confirm your action (see
20085 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20086
20087 @node Agent Variables
20088 @subsection Agent Variables
20089
20090 @table @code
20091 @item gnus-agent
20092 @vindex gnus-agent
20093 Is the agent enabled?  The default is @code{t}.  When first enabled,
20094 the agent will use @code{gnus-agent-auto-agentize-methods} to
20095 automatically mark some back ends as agentized.  You may change which
20096 back ends are agentized using the agent commands in the server buffer.
20097
20098 To enter the server buffer, use the @kbd{^}
20099 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20100
20101
20102 @item gnus-agent-directory
20103 @vindex gnus-agent-directory
20104 Where the Gnus Agent will store its files.  The default is
20105 @file{~/News/agent/}.
20106
20107 @item gnus-agent-handle-level
20108 @vindex gnus-agent-handle-level
20109 Groups on levels (@pxref{Group Levels}) higher than this variable will
20110 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20111 which means that only subscribed group will be considered by the Agent
20112 by default.
20113
20114 @item gnus-agent-plugged-hook
20115 @vindex gnus-agent-plugged-hook
20116 Hook run when connecting to the network.
20117
20118 @item gnus-agent-unplugged-hook
20119 @vindex gnus-agent-unplugged-hook
20120 Hook run when disconnecting from the network.
20121
20122 @item gnus-agent-fetched-hook
20123 @vindex gnus-agent-fetched-hook
20124 Hook run when finished fetching articles.
20125
20126 @item gnus-agent-cache
20127 @vindex gnus-agent-cache
20128 Variable to control whether use the locally stored @acronym{NOV} and
20129 articles when plugged, e.g. essentially using the Agent as a cache.
20130 The default is non-@code{nil}, which means to use the Agent as a cache.
20131
20132 @item gnus-agent-go-online
20133 @vindex gnus-agent-go-online
20134 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20135 automatically switch offline servers into online status.  If it is
20136 @code{ask}, the default, the Agent will ask if you wish to switch
20137 offline servers into online status when you re-connect.  If it has any
20138 other value, all offline servers will be automatically switched into
20139 online status.
20140
20141 @item gnus-agent-mark-unread-after-downloaded
20142 @vindex gnus-agent-mark-unread-after-downloaded
20143 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20144 mark articles as unread after downloading.  This is usually a safe
20145 thing to do as the newly downloaded article has obviously not been
20146 read.  The default is @code{t}.
20147
20148 @item gnus-agent-synchronize-flags
20149 @vindex gnus-agent-synchronize-flags
20150 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20151 never automatically synchronize flags.  If it is @code{ask}, which is
20152 the default, the Agent will check if you made any changes and if so
20153 ask if you wish to synchronize these when you re-connect.  If it has
20154 any other value, all flags will be synchronized automatically.
20155
20156 @item gnus-agent-consider-all-articles
20157 @vindex gnus-agent-consider-all-articles
20158 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20159 agent will let the agent predicate decide whether articles need to be
20160 downloaded or not, for all articles.  When @code{nil}, the default,
20161 the agent will only let the predicate decide whether unread articles
20162 are downloaded or not.  If you enable this, you may also want to look
20163 into the agent expiry settings (@pxref{Category Variables}), so that
20164 the agent doesn't download articles which the agent will later expire,
20165 over and over again.
20166
20167 @item gnus-agent-max-fetch-size
20168 @vindex gnus-agent-max-fetch-size
20169 The agent fetches articles into a temporary buffer prior to parsing
20170 them into individual files.  To avoid exceeding the max. buffer size,
20171 the agent alternates between fetching and parsing until all articles
20172 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20173 limit to control how often the cycling occurs.  A large value improves
20174 performance.  A small value minimizes the time lost should the
20175 connection be lost while fetching (You may need to run
20176 @code{gnus-agent-regenerate-group} to update the group's state.
20177 However, all articles parsed prior to loosing the connection will be
20178 available while unplugged).  The default is 10M so it is unusual to
20179 see any cycling.
20180
20181 @item gnus-server-unopen-status
20182 @vindex gnus-server-unopen-status
20183 Perhaps not an Agent variable, but closely related to the Agent, this
20184 variable says what will happen if Gnus cannot open a server.  If the
20185 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20186 whether to deny the server or whether to unplug the agent.  If the
20187 Agent is disabled, Gnus always simply deny the server.  Other choices
20188 for this variable include @code{denied} and @code{offline} the latter
20189 is only valid if the Agent is used.
20190
20191 @item gnus-auto-goto-ignores
20192 @vindex gnus-auto-goto-ignores
20193 Another variable that isn't an Agent variable, yet so closely related
20194 that most will look for it here, this variable tells the summary
20195 buffer how to maneuver around undownloaded (only headers stored in the
20196 agent) and unfetched (neither article nor headers stored) articles.
20197
20198 The valid values are @code{nil} (maneuver to any article),
20199 @code{undownloaded} (maneuvering while unplugged ignores articles that
20200 have not been fetched), @code{always-undownloaded} (maneuvering always
20201 ignores articles that have not been fetched), @code{unfetched}
20202 (maneuvering ignores articles whose headers have not been fetched).
20203
20204 @item gnus-agent-queue-mail
20205 @vindex gnus-agent-queue-mail
20206 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20207 queue mail rather than sending it straight away.  When @code{t}, Gnus
20208 will queue mail when unplugged only.  When @code{nil}, never queue
20209 mail.  The default is @code{t}.
20210
20211 @item gnus-agent-prompt-send-queue
20212 @vindex gnus-agent-prompt-send-queue
20213 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20214 prompt you to confirm that you really wish to proceed if you hit
20215 @kbd{J S} while unplugged.  The default is @code{nil}.
20216
20217 @item gnus-agent-auto-agentize-methods
20218 @vindex gnus-agent-auto-agentize-methods
20219 If you have never used the Agent before (or more technically, if
20220 @file{~/News/agent/lib/servers} does not exist), Gnus will
20221 automatically agentize a few servers for you.  This variable control
20222 which back ends should be auto-agentized.  It is typically only useful
20223 to agentize remote back ends.  The auto-agentizing has the same effect
20224 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20225 If the file exist, you must manage the servers manually by adding or
20226 removing them, this variable is only applicable the first time you
20227 start Gnus.  The default is @samp{(nntp nnimap)}.
20228
20229 @end table
20230
20231
20232 @node Example Setup
20233 @subsection Example Setup
20234
20235 If you don't want to read this manual, and you have a fairly standard
20236 setup, you may be able to use something like the following as your
20237 @file{~/.gnus.el} file to get started.
20238
20239 @lisp
20240 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20241 ;; @r{from your ISP's server.}
20242 (setq gnus-select-method '(nntp "news.your-isp.com"))
20243
20244 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20245 ;; @r{your ISP's @acronym{POP} server.}
20246 (setq mail-sources '((pop :server "pop.your-isp.com")))
20247
20248 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
20249 (setq gnus-secondary-select-methods '((nnml "")))
20250
20251 ;; @r{Make Gnus into an offline newsreader.}
20252 ;; (gnus-agentize) ; @r{The obsolete setting.}
20253 ;; (setq gnus-agent t) ; @r{Now the default.}
20254 @end lisp
20255
20256 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
20257 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
20258 gnus}.
20259
20260 If this is the first time you've run Gnus, you will be subscribed
20261 automatically to a few default newsgroups.  You'll probably want to
20262 subscribe to more groups, and to do that, you have to query the
20263 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
20264 command.  This usually takes quite a while, but you only have to do it
20265 once.
20266
20267 After reading and parsing a while, you'll be presented with a list of
20268 groups.  Subscribe to the ones you want to read with the @kbd{u}
20269 command.  @kbd{l} to make all the killed groups disappear after you've
20270 subscribe to all the groups you want to read.  (@kbd{A k} will bring
20271 back all the killed groups.)
20272
20273 You can now read the groups at once, or you can download the articles
20274 with the @kbd{J s} command.  And then read the rest of this manual to
20275 find out which of the other gazillion things you want to customize.
20276
20277
20278 @node Batching Agents
20279 @subsection Batching Agents
20280 @findex gnus-agent-batch
20281
20282 Having the Gnus Agent fetch articles (and post whatever messages you've
20283 written) is quite easy once you've gotten things set up properly.  The
20284 following shell script will do everything that is necessary:
20285
20286 You can run a complete batch command from the command line with the
20287 following incantation:
20288
20289 @example
20290 #!/bin/sh
20291 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
20292 @end example
20293
20294
20295 @node Agent Caveats
20296 @subsection Agent Caveats
20297
20298 The Gnus Agent doesn't seem to work like most other offline
20299 newsreaders.  Here are some common questions that some imaginary people
20300 may ask:
20301
20302 @table @dfn
20303 @item If I read an article while plugged, do they get entered into the Agent?
20304
20305 @strong{No}.  If you want this behavior, add
20306 @code{gnus-agent-fetch-selected-article} to
20307 @code{gnus-select-article-hook}.
20308
20309 @item If I read an article while plugged, and the article already exists in
20310 the Agent, will it get downloaded once more?
20311
20312 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
20313
20314 @end table
20315
20316 In short, when Gnus is unplugged, it only looks into the locally stored
20317 articles; when it's plugged, it talks to your ISP and may also use the
20318 locally stored articles.
20319
20320
20321 @node Scoring
20322 @chapter Scoring
20323 @cindex scoring
20324
20325 Other people use @dfn{kill files}, but we here at Gnus Towers like
20326 scoring better than killing, so we'd rather switch than fight.  They do
20327 something completely different as well, so sit up straight and pay
20328 attention!
20329
20330 @vindex gnus-summary-mark-below
20331 All articles have a default score (@code{gnus-summary-default-score}),
20332 which is 0 by default.  This score may be raised or lowered either
20333 interactively or by score files.  Articles that have a score lower than
20334 @code{gnus-summary-mark-below} are marked as read.
20335
20336 Gnus will read any @dfn{score files} that apply to the current group
20337 before generating the summary buffer.
20338
20339 There are several commands in the summary buffer that insert score
20340 entries based on the current article.  You can, for instance, ask Gnus to
20341 lower or increase the score of all articles with a certain subject.
20342
20343 There are two sorts of scoring entries: Permanent and temporary.
20344 Temporary score entries are self-expiring entries.  Any entries that are
20345 temporary and have not been used for, say, a week, will be removed
20346 silently to help keep the sizes of the score files down.
20347
20348 @menu
20349 * Summary Score Commands::      Adding score entries for the current group.
20350 * Group Score Commands::        General score commands.
20351 * Score Variables::             Customize your scoring.  (My, what terminology).
20352 * Score File Format::           What a score file may contain.
20353 * Score File Editing::          You can edit score files by hand as well.
20354 * Adaptive Scoring::            Big Sister Gnus knows what you read.
20355 * Home Score File::             How to say where new score entries are to go.
20356 * Followups To Yourself::       Having Gnus notice when people answer you.
20357 * Scoring On Other Headers::    Scoring on non-standard headers.
20358 * Scoring Tips::                How to score effectively.
20359 * Reverse Scoring::             That problem child of old is not problem.
20360 * Global Score Files::          Earth-spanning, ear-splitting score files.
20361 * Kill Files::                  They are still here, but they can be ignored.
20362 * Converting Kill Files::       Translating kill files to score files.
20363 * Advanced Scoring::            Using logical expressions to build score rules.
20364 * Score Decays::                It can be useful to let scores wither away.
20365 @end menu
20366
20367
20368 @node Summary Score Commands
20369 @section Summary Score Commands
20370 @cindex score commands
20371
20372 The score commands that alter score entries do not actually modify real
20373 score files.  That would be too inefficient.  Gnus maintains a cache of
20374 previously loaded score files, one of which is considered the
20375 @dfn{current score file alist}.  The score commands simply insert
20376 entries into this list, and upon group exit, this list is saved.
20377
20378 The current score file is by default the group's local score file, even
20379 if no such score file actually exists.  To insert score commands into
20380 some other score file (e.g. @file{all.SCORE}), you must first make this
20381 score file the current one.
20382
20383 General score commands that don't actually change the score file:
20384
20385 @table @kbd
20386
20387 @item V s
20388 @kindex V s (Summary)
20389 @findex gnus-summary-set-score
20390 Set the score of the current article (@code{gnus-summary-set-score}).
20391
20392 @item V S
20393 @kindex V S (Summary)
20394 @findex gnus-summary-current-score
20395 Display the score of the current article
20396 (@code{gnus-summary-current-score}).
20397
20398 @item V t
20399 @kindex V t (Summary)
20400 @findex gnus-score-find-trace
20401 Display all score rules that have been used on the current article
20402 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
20403 may type @kbd{e} to edit score file corresponding to the score rule on
20404 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
20405 score file and edit it.
20406
20407 @item V w
20408 @kindex V w (Summary)
20409 @findex gnus-score-find-favourite-words
20410 List words used in scoring (@code{gnus-score-find-favourite-words}).
20411
20412 @item V R
20413 @kindex V R (Summary)
20414 @findex gnus-summary-rescore
20415 Run the current summary through the scoring process
20416 (@code{gnus-summary-rescore}).  This might be useful if you're playing
20417 around with your score files behind Gnus' back and want to see the
20418 effect you're having.
20419
20420 @item V c
20421 @kindex V c (Summary)
20422 @findex gnus-score-change-score-file
20423 Make a different score file the current
20424 (@code{gnus-score-change-score-file}).
20425
20426 @item V e
20427 @kindex V e (Summary)
20428 @findex gnus-score-edit-current-scores
20429 Edit the current score file (@code{gnus-score-edit-current-scores}).
20430 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
20431 File Editing}).
20432
20433 @item V f
20434 @kindex V f (Summary)
20435 @findex gnus-score-edit-file
20436 Edit a score file and make this score file the current one
20437 (@code{gnus-score-edit-file}).
20438
20439 @item V F
20440 @kindex V F (Summary)
20441 @findex gnus-score-flush-cache
20442 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
20443 after editing score files.
20444
20445 @item V C
20446 @kindex V C (Summary)
20447 @findex gnus-score-customize
20448 Customize a score file in a visually pleasing manner
20449 (@code{gnus-score-customize}).
20450
20451 @end table
20452
20453 The rest of these commands modify the local score file.
20454
20455 @table @kbd
20456
20457 @item V m
20458 @kindex V m (Summary)
20459 @findex gnus-score-set-mark-below
20460 Prompt for a score, and mark all articles with a score below this as
20461 read (@code{gnus-score-set-mark-below}).
20462
20463 @item V x
20464 @kindex V x (Summary)
20465 @findex gnus-score-set-expunge-below
20466 Prompt for a score, and add a score rule to the current score file to
20467 expunge all articles below this score
20468 (@code{gnus-score-set-expunge-below}).
20469 @end table
20470
20471 The keystrokes for actually making score entries follow a very regular
20472 pattern, so there's no need to list all the commands.  (Hundreds of
20473 them.)
20474
20475 @findex gnus-summary-increase-score
20476 @findex gnus-summary-lower-score
20477
20478 @enumerate
20479 @item
20480 The first key is either @kbd{I} (upper case i) for increasing the score
20481 or @kbd{L} for lowering the score.
20482 @item
20483 The second key says what header you want to score on.  The following
20484 keys are available:
20485 @table @kbd
20486
20487 @item a
20488 Score on the author name.
20489
20490 @item s
20491 Score on the subject line.
20492
20493 @item x
20494 Score on the @code{Xref} line---i.e., the cross-posting line.
20495
20496 @item r
20497 Score on the @code{References} line.
20498
20499 @item d
20500 Score on the date.
20501
20502 @item l
20503 Score on the number of lines.
20504
20505 @item i
20506 Score on the @code{Message-ID} header.
20507
20508 @item e
20509 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
20510 if your @acronym{NNTP} server tracks additional header data in overviews.
20511
20512 @item f
20513 Score on followups---this matches the author name, and adds scores to
20514 the followups to this author.  (Using this key leads to the creation of
20515 @file{ADAPT} files.)
20516
20517 @item b
20518 Score on the body.
20519
20520 @item h
20521 Score on the head.
20522
20523 @item t
20524 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
20525 files.)
20526
20527 @end table
20528
20529 @item
20530 The third key is the match type.  Which match types are valid depends on
20531 what headers you are scoring on.
20532
20533 @table @code
20534
20535 @item strings
20536
20537 @table @kbd
20538
20539 @item e
20540 Exact matching.
20541
20542 @item s
20543 Substring matching.
20544
20545 @item f
20546 Fuzzy matching (@pxref{Fuzzy Matching}).
20547
20548 @item r
20549 Regexp matching
20550 @end table
20551
20552 @item date
20553 @table @kbd
20554
20555 @item b
20556 Before date.
20557
20558 @item a
20559 After date.
20560
20561 @item n
20562 This date.
20563 @end table
20564
20565 @item number
20566 @table @kbd
20567
20568 @item <
20569 Less than number.
20570
20571 @item =
20572 Equal to number.
20573
20574 @item >
20575 Greater than number.
20576 @end table
20577 @end table
20578
20579 @item
20580 The fourth and usually final key says whether this is a temporary (i.e.,
20581 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
20582 or whether it is to be done immediately, without adding to the score
20583 file.
20584 @table @kbd
20585
20586 @item t
20587 Temporary score entry.
20588
20589 @item p
20590 Permanent score entry.
20591
20592 @item i
20593 Immediately scoring.
20594 @end table
20595
20596 @item
20597 If you are scoring on `e' (extra) headers, you will then be prompted for
20598 the header name on which you wish to score.  This must be a header named
20599 in gnus-extra-headers, and @samp{TAB} completion is available.
20600
20601 @end enumerate
20602
20603 So, let's say you want to increase the score on the current author with
20604 exact matching permanently: @kbd{I a e p}.  If you want to lower the
20605 score based on the subject line, using substring matching, and make a
20606 temporary score entry: @kbd{L s s t}.  Pretty easy.
20607
20608 To make things a bit more complicated, there are shortcuts.  If you use
20609 a capital letter on either the second or third keys, Gnus will use
20610 defaults for the remaining one or two keystrokes.  The defaults are
20611 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
20612 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
20613
20614 These functions take both the numerical prefix and the symbolic prefix
20615 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
20616 (or increase) the score of the article.  A symbolic prefix of @code{a}
20617 says to use the @file{all.SCORE} file for the command instead of the
20618 current score file.
20619
20620 @vindex gnus-score-mimic-keymap
20621 The @code{gnus-score-mimic-keymap} says whether these commands will
20622 pretend they are keymaps or not.
20623
20624
20625 @node Group Score Commands
20626 @section Group Score Commands
20627 @cindex group score commands
20628
20629 There aren't many of these as yet, I'm afraid.
20630
20631 @table @kbd
20632
20633 @item W e
20634 @kindex W e (Group)
20635 @findex gnus-score-edit-all-score
20636 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
20637 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
20638
20639 @item W f
20640 @kindex W f (Group)
20641 @findex gnus-score-flush-cache
20642 Gnus maintains a cache of score alists to avoid having to reload them
20643 all the time.  This command will flush the cache
20644 (@code{gnus-score-flush-cache}).
20645
20646 @end table
20647
20648 You can do scoring from the command line by saying something like:
20649
20650 @findex gnus-batch-score
20651 @cindex batch scoring
20652 @example
20653 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
20654 @end example
20655
20656
20657 @node Score Variables
20658 @section Score Variables
20659 @cindex score variables
20660
20661 @table @code
20662
20663 @item gnus-use-scoring
20664 @vindex gnus-use-scoring
20665 If @code{nil}, Gnus will not check for score files, and will not, in
20666 general, do any score-related work.  This is @code{t} by default.
20667
20668 @item gnus-kill-killed
20669 @vindex gnus-kill-killed
20670 If this variable is @code{nil}, Gnus will never apply score files to
20671 articles that have already been through the kill process.  While this
20672 may save you lots of time, it also means that if you apply a kill file
20673 to a group, and then change the kill file and want to run it over you
20674 group again to kill more articles, it won't work.  You have to set this
20675 variable to @code{t} to do that.  (It is @code{t} by default.)
20676
20677 @item gnus-kill-files-directory
20678 @vindex gnus-kill-files-directory
20679 All kill and score files will be stored in this directory, which is
20680 initialized from the @env{SAVEDIR} environment variable by default.
20681 This is @file{~/News/} by default.
20682
20683 @item gnus-score-file-suffix
20684 @vindex gnus-score-file-suffix
20685 Suffix to add to the group name to arrive at the score file name
20686 (@file{SCORE} by default.)
20687
20688 @item gnus-score-uncacheable-files
20689 @vindex gnus-score-uncacheable-files
20690 @cindex score cache
20691 All score files are normally cached to avoid excessive re-loading of
20692 score files.  However, this might make your Emacs grow big and
20693 bloated, so this regexp can be used to weed out score files unlikely
20694 to be needed again.  It would be a bad idea to deny caching of
20695 @file{all.SCORE}, while it might be a good idea to not cache
20696 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
20697 variable is @samp{ADAPT$} by default, so no adaptive score files will
20698 be cached.
20699
20700 @item gnus-save-score
20701 @vindex gnus-save-score
20702 If you have really complicated score files, and do lots of batch
20703 scoring, then you might set this variable to @code{t}.  This will make
20704 Gnus save the scores into the @file{.newsrc.eld} file.
20705
20706 If you do not set this to @code{t}, then manual scores (like those set
20707 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
20708 across group visits.
20709
20710 @item gnus-score-interactive-default-score
20711 @vindex gnus-score-interactive-default-score
20712 Score used by all the interactive raise/lower commands to raise/lower
20713 score with.  Default is 1000, which may seem excessive, but this is to
20714 ensure that the adaptive scoring scheme gets enough room to play with.
20715 We don't want the small changes from the adaptive scoring to overwrite
20716 manually entered data.
20717
20718 @item gnus-summary-default-score
20719 @vindex gnus-summary-default-score
20720 Default score of an article, which is 0 by default.
20721
20722 @item gnus-summary-expunge-below
20723 @vindex gnus-summary-expunge-below
20724 Don't display the summary lines of articles that have scores lower than
20725 this variable.  This is @code{nil} by default, which means that no
20726 articles will be hidden.  This variable is local to the summary buffers,
20727 and has to be set from @code{gnus-summary-mode-hook}.
20728
20729 @item gnus-score-over-mark
20730 @vindex gnus-score-over-mark
20731 Mark (in the third column) used for articles with a score over the
20732 default.  Default is @samp{+}.
20733
20734 @item gnus-score-below-mark
20735 @vindex gnus-score-below-mark
20736 Mark (in the third column) used for articles with a score below the
20737 default.  Default is @samp{-}.
20738
20739 @item gnus-score-find-score-files-function
20740 @vindex gnus-score-find-score-files-function
20741 Function used to find score files for the current group.  This function
20742 is called with the name of the group as the argument.
20743
20744 Predefined functions available are:
20745 @table @code
20746
20747 @item gnus-score-find-single
20748 @findex gnus-score-find-single
20749 Only apply the group's own score file.
20750
20751 @item gnus-score-find-bnews
20752 @findex gnus-score-find-bnews
20753 Apply all score files that match, using bnews syntax.  This is the
20754 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
20755 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
20756 @file{gnu.all.SCORE} would all apply.  In short, the instances of
20757 @samp{all} in the score file names are translated into @samp{.*}, and
20758 then a regexp match is done.
20759
20760 This means that if you have some score entries that you want to apply to
20761 all groups, then you put those entries in the @file{all.SCORE} file.
20762
20763 The score files are applied in a semi-random order, although Gnus will
20764 try to apply the more general score files before the more specific score
20765 files.  It does this by looking at the number of elements in the score
20766 file names---discarding the @samp{all} elements.
20767
20768 @item gnus-score-find-hierarchical
20769 @findex gnus-score-find-hierarchical
20770 Apply all score files from all the parent groups.  This means that you
20771 can't have score files like @file{all.SCORE}, but you can have
20772 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
20773 server.
20774
20775 @end table
20776 This variable can also be a list of functions.  In that case, all
20777 these functions will be called with the group name as argument, and
20778 all the returned lists of score files will be applied.  These
20779 functions can also return lists of lists of score alists directly.  In
20780 that case, the functions that return these non-file score alists
20781 should probably be placed before the ``real'' score file functions, to
20782 ensure that the last score file returned is the local score file.
20783 Phu.
20784
20785 For example, to do hierarchical scoring but use a non-server-specific
20786 overall score file, you could use the value
20787 @example
20788 (list (lambda (group) ("all.SCORE"))
20789       'gnus-score-find-hierarchical)
20790 @end example
20791
20792 @item gnus-score-expiry-days
20793 @vindex gnus-score-expiry-days
20794 This variable says how many days should pass before an unused score file
20795 entry is expired.  If this variable is @code{nil}, no score file entries
20796 are expired.  It's 7 by default.
20797
20798 @item gnus-update-score-entry-dates
20799 @vindex gnus-update-score-entry-dates
20800 If this variable is non-@code{nil}, temporary score entries that have
20801 been triggered (matched) will have their dates updated.  (This is how Gnus
20802 controls expiry---all non-matched-entries will become too old while
20803 matched entries will stay fresh and young.)  However, if you set this
20804 variable to @code{nil}, even matched entries will grow old and will
20805 have to face that oh-so grim reaper.
20806
20807 @item gnus-score-after-write-file-function
20808 @vindex gnus-score-after-write-file-function
20809 Function called with the name of the score file just written.
20810
20811 @item gnus-score-thread-simplify
20812 @vindex gnus-score-thread-simplify
20813 If this variable is non-@code{nil}, article subjects will be
20814 simplified for subject scoring purposes in the same manner as with
20815 threading---according to the current value of
20816 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
20817 @code{substring} or @code{exact} matching, the match will also be
20818 simplified in this manner.
20819
20820 @end table
20821
20822
20823 @node Score File Format
20824 @section Score File Format
20825 @cindex score file format
20826
20827 A score file is an @code{emacs-lisp} file that normally contains just a
20828 single form.  Casual users are not expected to edit these files;
20829 everything can be changed from the summary buffer.
20830
20831 Anyway, if you'd like to dig into it yourself, here's an example:
20832
20833 @lisp
20834 (("from"
20835   ("Lars Ingebrigtsen" -10000)
20836   ("Per Abrahamsen")
20837   ("larsi\\|lmi" -50000 nil R))
20838  ("subject"
20839   ("Ding is Badd" nil 728373))
20840  ("xref"
20841   ("alt.politics" -1000 728372 s))
20842  ("lines"
20843   (2 -100 nil <))
20844  (mark 0)
20845  (expunge -1000)
20846  (mark-and-expunge -10)
20847  (read-only nil)
20848  (orphan -10)
20849  (adapt t)
20850  (files "/hom/larsi/News/gnu.SCORE")
20851  (exclude-files "all.SCORE")
20852  (local (gnus-newsgroup-auto-expire t)
20853         (gnus-summary-make-false-root empty))
20854  (eval (ding)))
20855 @end lisp
20856
20857 This example demonstrates most score file elements.  @xref{Advanced
20858 Scoring}, for a different approach.
20859
20860 Even though this looks much like Lisp code, nothing here is actually
20861 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
20862 has to be valid syntactically, if not semantically.
20863
20864 Six keys are supported by this alist:
20865
20866 @table @code
20867
20868 @item STRING
20869 If the key is a string, it is the name of the header to perform the
20870 match on.  Scoring can only be performed on these eight headers:
20871 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
20872 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
20873 these headers, there are three strings to tell Gnus to fetch the entire
20874 article and do the match on larger parts of the article: @code{Body}
20875 will perform the match on the body of the article, @code{Head} will
20876 perform the match on the head of the article, and @code{All} will
20877 perform the match on the entire article.  Note that using any of these
20878 last three keys will slow down group entry @emph{considerably}.  The
20879 final ``header'' you can score on is @code{Followup}.  These score
20880 entries will result in new score entries being added for all follow-ups
20881 to articles that matches these score entries.
20882
20883 Following this key is an arbitrary number of score entries, where each
20884 score entry has one to four elements.
20885 @enumerate
20886
20887 @item
20888 The first element is the @dfn{match element}.  On most headers this will
20889 be a string, but on the Lines and Chars headers, this must be an
20890 integer.
20891
20892 @item
20893 If the second element is present, it should be a number---the @dfn{score
20894 element}.  This number should be an integer in the neginf to posinf
20895 interval.  This number is added to the score of the article if the match
20896 is successful.  If this element is not present, the
20897 @code{gnus-score-interactive-default-score} number will be used
20898 instead.  This is 1000 by default.
20899
20900 @item
20901 If the third element is present, it should be a number---the @dfn{date
20902 element}.  This date says when the last time this score entry matched,
20903 which provides a mechanism for expiring the score entries.  It this
20904 element is not present, the score entry is permanent.  The date is
20905 represented by the number of days since December 31, 1 BCE.
20906
20907 @item
20908 If the fourth element is present, it should be a symbol---the @dfn{type
20909 element}.  This element specifies what function should be used to see
20910 whether this score entry matches the article.  What match types that can
20911 be used depends on what header you wish to perform the match on.
20912 @table @dfn
20913
20914 @item From, Subject, References, Xref, Message-ID
20915 For most header types, there are the @code{r} and @code{R} (regexp), as
20916 well as @code{s} and @code{S} (substring) types, and @code{e} and
20917 @code{E} (exact match), and @code{w} (word match) types.  If this
20918 element is not present, Gnus will assume that substring matching should
20919 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
20920 that the matches will be done in a case-sensitive manner.  All these
20921 one-letter types are really just abbreviations for the @code{regexp},
20922 @code{string}, @code{exact}, and @code{word} types, which you can use
20923 instead, if you feel like.
20924
20925 @item Extra
20926 Just as for the standard string overview headers, if you are using
20927 gnus-extra-headers, you can score on these headers' values.  In this
20928 case, there is a 5th element in the score entry, being the name of the
20929 header to be scored.  The following entry is useful in your
20930 @file{all.SCORE} file in case of spam attacks from a single origin
20931 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
20932 overviews:
20933
20934 @lisp
20935 ("111.222.333.444" -1000 nil s
20936  "NNTP-Posting-Host")
20937 @end lisp
20938
20939 @item Lines, Chars
20940 These two headers use different match types: @code{<}, @code{>},
20941 @code{=}, @code{>=} and @code{<=}.
20942
20943 These predicates are true if
20944
20945 @example
20946 (PREDICATE HEADER MATCH)
20947 @end example
20948
20949 evaluates to non-@code{nil}.  For instance, the advanced match
20950 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
20951 following form:
20952
20953 @lisp
20954 (< header-value 4)
20955 @end lisp
20956
20957 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
20958 the match, we get the score added if the article has less than 4 lines.
20959 (It's easy to get confused and think it's the other way around.  But
20960 it's not.  I think.)
20961
20962 When matching on @code{Lines}, be careful because some back ends (like
20963 @code{nndir}) do not generate @code{Lines} header, so every article ends
20964 up being marked as having 0 lines.  This can lead to strange results if
20965 you happen to lower score of the articles with few lines.
20966
20967 @item Date
20968 For the Date header we have three kinda silly match types:
20969 @code{before}, @code{at} and @code{after}.  I can't really imagine this
20970 ever being useful, but, like, it would feel kinda silly not to provide
20971 this function.  Just in case.  You never know.  Better safe than sorry.
20972 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
20973 sex on a first date.  (I have been told that at least one person, and I
20974 quote, ``found this function indispensable'', however.)
20975
20976 @cindex ISO8601
20977 @cindex date
20978 A more useful match type is @code{regexp}.  With it, you can match the
20979 date string using a regular expression.  The date is normalized to
20980 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
20981 you want to match all articles that have been posted on April 1st in
20982 every year, you could use @samp{....0401.........} as a match string,
20983 for instance.  (Note that the date is kept in its original time zone, so
20984 this will match articles that were posted when it was April 1st where
20985 the article was posted from.  Time zones are such wholesome fun for the
20986 whole family, eh?)
20987
20988 @item Head, Body, All
20989 These three match keys use the same match types as the @code{From} (etc)
20990 header uses.
20991
20992 @item Followup
20993 This match key is somewhat special, in that it will match the
20994 @code{From} header, and affect the score of not only the matching
20995 articles, but also all followups to the matching articles.  This allows
20996 you e.g. increase the score of followups to your own articles, or
20997 decrease the score of followups to the articles of some known
20998 trouble-maker.  Uses the same match types as the @code{From} header
20999 uses.  (Using this match key will lead to creation of @file{ADAPT}
21000 files.)
21001
21002 @item Thread
21003 This match key works along the same lines as the @code{Followup} match
21004 key.  If you say that you want to score on a (sub-)thread started by an
21005 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21006 match.  This will add a new @samp{thread} match for each article that
21007 has @var{x} in its @code{References} header.  (These new @samp{thread}
21008 matches will use the @code{Message-ID}s of these matching articles.)
21009 This will ensure that you can raise/lower the score of an entire thread,
21010 even though some articles in the thread may not have complete
21011 @code{References} headers.  Note that using this may lead to
21012 undeterministic scores of the articles in the thread.  (Using this match
21013 key will lead to creation of @file{ADAPT} files.)
21014 @end table
21015 @end enumerate
21016
21017 @cindex score file atoms
21018 @item mark
21019 The value of this entry should be a number.  Any articles with a score
21020 lower than this number will be marked as read.
21021
21022 @item expunge
21023 The value of this entry should be a number.  Any articles with a score
21024 lower than this number will be removed from the summary buffer.
21025
21026 @item mark-and-expunge
21027 The value of this entry should be a number.  Any articles with a score
21028 lower than this number will be marked as read and removed from the
21029 summary buffer.
21030
21031 @item thread-mark-and-expunge
21032 The value of this entry should be a number.  All articles that belong to
21033 a thread that has a total score below this number will be marked as read
21034 and removed from the summary buffer.  @code{gnus-thread-score-function}
21035 says how to compute the total score for a thread.
21036
21037 @item files
21038 The value of this entry should be any number of file names.  These files
21039 are assumed to be score files as well, and will be loaded the same way
21040 this one was.
21041
21042 @item exclude-files
21043 The clue of this entry should be any number of files.  These files will
21044 not be loaded, even though they would normally be so, for some reason or
21045 other.
21046
21047 @item eval
21048 The value of this entry will be @code{eval}el.  This element will be
21049 ignored when handling global score files.
21050
21051 @item read-only
21052 Read-only score files will not be updated or saved.  Global score files
21053 should feature this atom (@pxref{Global Score Files}).  (Note:
21054 @dfn{Global} here really means @dfn{global}; not your personal
21055 apply-to-all-groups score files.)
21056
21057 @item orphan
21058 The value of this entry should be a number.  Articles that do not have
21059 parents will get this number added to their scores.  Imagine you follow
21060 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21061 will only follow a few of the threads, also want to see any new threads.
21062
21063 You can do this with the following two score file entries:
21064
21065 @example
21066         (orphan -500)
21067         (mark-and-expunge -100)
21068 @end example
21069
21070 When you enter the group the first time, you will only see the new
21071 threads.  You then raise the score of the threads that you find
21072 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
21073 rest.  Next time you enter the group, you will see new articles in the
21074 interesting threads, plus any new threads.
21075
21076 I.e.---the orphan score atom is for high-volume groups where a few
21077 interesting threads which can't be found automatically by ordinary
21078 scoring rules exist.
21079
21080 @item adapt
21081 This entry controls the adaptive scoring.  If it is @code{t}, the
21082 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21083 adaptive scoring will be performed on this group.  If it is a list, this
21084 list will be used as the adaptive scoring rules.  If it isn't present,
21085 or is something other than @code{t} or @code{ignore}, the default
21086 adaptive scoring rules will be used.  If you want to use adaptive
21087 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21088 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21089 not want adaptive scoring.  If you only want adaptive scoring in a few
21090 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21091 insert @code{(adapt t)} in the score files of the groups where you want
21092 it.
21093
21094 @item adapt-file
21095 All adaptive score entries will go to the file named by this entry.  It
21096 will also be applied when entering the group.  This atom might be handy
21097 if you want to adapt on several groups at once, using the same adaptive
21098 file for a number of groups.
21099
21100 @item local
21101 @cindex local variables
21102 The value of this entry should be a list of @code{(@var{var}
21103 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21104 current summary buffer, and set to the value specified.  This is a
21105 convenient, if somewhat strange, way of setting variables in some
21106 groups if you don't like hooks much.  Note that the @var{value} won't
21107 be evaluated.
21108 @end table
21109
21110
21111 @node Score File Editing
21112 @section Score File Editing
21113
21114 You normally enter all scoring commands from the summary buffer, but you
21115 might feel the urge to edit them by hand as well, so we've supplied you
21116 with a mode for that.
21117
21118 It's simply a slightly customized @code{emacs-lisp} mode, with these
21119 additional commands:
21120
21121 @table @kbd
21122
21123 @item C-c C-c
21124 @kindex C-c C-c (Score)
21125 @findex gnus-score-edit-exit
21126 Save the changes you have made and return to the summary buffer
21127 (@code{gnus-score-edit-exit}).
21128
21129 @item C-c C-d
21130 @kindex C-c C-d (Score)
21131 @findex gnus-score-edit-insert-date
21132 Insert the current date in numerical format
21133 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21134 you were wondering.
21135
21136 @item C-c C-p
21137 @kindex C-c C-p (Score)
21138 @findex gnus-score-pretty-print
21139 The adaptive score files are saved in an unformatted fashion.  If you
21140 intend to read one of these files, you want to @dfn{pretty print} it
21141 first.  This command (@code{gnus-score-pretty-print}) does that for
21142 you.
21143
21144 @end table
21145
21146 Type @kbd{M-x gnus-score-mode} to use this mode.
21147
21148 @vindex gnus-score-mode-hook
21149 @code{gnus-score-menu-hook} is run in score mode buffers.
21150
21151 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21152 @kbd{V t} to begin editing score files.
21153
21154
21155 @node Adaptive Scoring
21156 @section Adaptive Scoring
21157 @cindex adaptive scoring
21158
21159 If all this scoring is getting you down, Gnus has a way of making it all
21160 happen automatically---as if by magic.  Or rather, as if by artificial
21161 stupidity, to be precise.
21162
21163 @vindex gnus-use-adaptive-scoring
21164 When you read an article, or mark an article as read, or kill an
21165 article, you leave marks behind.  On exit from the group, Gnus can sniff
21166 these marks and add score elements depending on what marks it finds.
21167 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21168 @code{t} or @code{(line)}.  If you want score adaptively on separate
21169 words appearing in the subjects, you should set this variable to
21170 @code{(word)}.  If you want to use both adaptive methods, set this
21171 variable to @code{(word line)}.
21172
21173 @vindex gnus-default-adaptive-score-alist
21174 To give you complete control over the scoring process, you can customize
21175 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21176 might look something like this:
21177
21178 @lisp
21179 (setq gnus-default-adaptive-score-alist
21180   '((gnus-unread-mark)
21181     (gnus-ticked-mark (from 4))
21182     (gnus-dormant-mark (from 5))
21183     (gnus-del-mark (from -4) (subject -1))
21184     (gnus-read-mark (from 4) (subject 2))
21185     (gnus-expirable-mark (from -1) (subject -1))
21186     (gnus-killed-mark (from -1) (subject -3))
21187     (gnus-kill-file-mark)
21188     (gnus-ancient-mark)
21189     (gnus-low-score-mark)
21190     (gnus-catchup-mark (from -1) (subject -1))))
21191 @end lisp
21192
21193 As you see, each element in this alist has a mark as a key (either a
21194 variable name or a ``real'' mark---a character).  Following this key is
21195 a arbitrary number of header/score pairs.  If there are no header/score
21196 pairs following the key, no adaptive scoring will be done on articles
21197 that have that key as the article mark.  For instance, articles with
21198 @code{gnus-unread-mark} in the example above will not get adaptive score
21199 entries.
21200
21201 Each article can have only one mark, so just a single of these rules
21202 will be applied to each article.
21203
21204 To take @code{gnus-del-mark} as an example---this alist says that all
21205 articles that have that mark (i.e., are marked with @samp{e}) will have a
21206 score entry added to lower based on the @code{From} header by -4, and
21207 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21208
21209 If you have marked 10 articles with the same subject with
21210 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21211 That means that that subject will get a score of ten times -1, which
21212 should be, unless I'm much mistaken, -10.
21213
21214 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21215 the read articles will be marked with the @samp{E} mark.  This'll
21216 probably make adaptive scoring slightly impossible, so auto-expiring and
21217 adaptive scoring doesn't really mix very well.
21218
21219 The headers you can score on are @code{from}, @code{subject},
21220 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21221 @code{chars} and @code{date}.  In addition, you can score on
21222 @code{followup}, which will create an adaptive score entry that matches
21223 on the @code{References} header using the @code{Message-ID} of the
21224 current article, thereby matching the following thread.
21225
21226 If you use this scheme, you should set the score file atom @code{mark}
21227 to something small---like -300, perhaps, to avoid having small random
21228 changes result in articles getting marked as read.
21229
21230 After using adaptive scoring for a week or so, Gnus should start to
21231 become properly trained and enhance the authors you like best, and kill
21232 the authors you like least, without you having to say so explicitly.
21233
21234 You can control what groups the adaptive scoring is to be performed on
21235 by using the score files (@pxref{Score File Format}).  This will also
21236 let you use different rules in different groups.
21237
21238 @vindex gnus-adaptive-file-suffix
21239 The adaptive score entries will be put into a file where the name is the
21240 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21241 is @file{ADAPT}.
21242
21243 @vindex gnus-adaptive-pretty-print
21244 Adaptive score files can get huge and are not meant to be edited by
21245 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21246 deafult) those files will not be written in a human readable way.
21247
21248 @vindex gnus-score-exact-adapt-limit
21249 When doing adaptive scoring, substring or fuzzy matching would probably
21250 give you the best results in most cases.  However, if the header one
21251 matches is short, the possibility for false positives is great, so if
21252 the length of the match is less than
21253 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
21254 this variable is @code{nil}, exact matching will always be used to avoid
21255 this problem.
21256
21257 @vindex gnus-default-adaptive-word-score-alist
21258 As mentioned above, you can adapt either on individual words or entire
21259 headers.  If you adapt on words, the
21260 @code{gnus-default-adaptive-word-score-alist} variable says what score
21261 each instance of a word should add given a mark.
21262
21263 @lisp
21264 (setq gnus-default-adaptive-word-score-alist
21265       `((,gnus-read-mark . 30)
21266         (,gnus-catchup-mark . -10)
21267         (,gnus-killed-mark . -20)
21268         (,gnus-del-mark . -15)))
21269 @end lisp
21270
21271 This is the default value.  If you have adaption on words enabled, every
21272 word that appears in subjects of articles marked with
21273 @code{gnus-read-mark} will result in a score rule that increase the
21274 score with 30 points.
21275
21276 @vindex gnus-default-ignored-adaptive-words
21277 @vindex gnus-ignored-adaptive-words
21278 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
21279 will be ignored.  If you wish to add more words to be ignored, use the
21280 @code{gnus-ignored-adaptive-words} list instead.
21281
21282 @vindex gnus-adaptive-word-length-limit
21283 Some may feel that short words shouldn't count when doing adaptive
21284 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
21285 an integer.  Words shorter than this number will be ignored.  This
21286 variable defaults to @code{nil}.
21287
21288 @vindex gnus-adaptive-word-syntax-table
21289 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
21290 syntax table in effect.  It is similar to the standard syntax table, but
21291 it considers numbers to be non-word-constituent characters.
21292
21293 @vindex gnus-adaptive-word-minimum
21294 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
21295 word scoring process will never bring down the score of an article to
21296 below this number.  The default is @code{nil}.
21297
21298 @vindex gnus-adaptive-word-no-group-words
21299 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
21300 won't adaptively word score any of the words in the group name.  Useful
21301 for groups like @samp{comp.editors.emacs}, where most of the subject
21302 lines contain the word @samp{emacs}.
21303
21304 After using this scheme for a while, it might be nice to write a
21305 @code{gnus-psychoanalyze-user} command to go through the rules and see
21306 what words you like and what words you don't like.  Or perhaps not.
21307
21308 Note that the adaptive word scoring thing is highly experimental and is
21309 likely to change in the future.  Initial impressions seem to indicate
21310 that it's totally useless as it stands.  Some more work (involving more
21311 rigorous statistical methods) will have to be done to make this useful.
21312
21313
21314 @node Home Score File
21315 @section Home Score File
21316
21317 The score file where new score file entries will go is called the
21318 @dfn{home score file}.  This is normally (and by default) the score file
21319 for the group itself.  For instance, the home score file for
21320 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
21321
21322 However, this may not be what you want.  It is often convenient to share
21323 a common home score file among many groups---all @samp{emacs} groups
21324 could perhaps use the same home score file.
21325
21326 @vindex gnus-home-score-file
21327 The variable that controls this is @code{gnus-home-score-file}.  It can
21328 be:
21329
21330 @enumerate
21331 @item
21332 A string.  Then this file will be used as the home score file for all
21333 groups.
21334
21335 @item
21336 A function.  The result of this function will be used as the home score
21337 file.  The function will be called with the name of the group as the
21338 parameter.
21339
21340 @item
21341 A list.  The elements in this list can be:
21342
21343 @enumerate
21344 @item
21345 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
21346 group name, the @var{file-name} will be used as the home score file.
21347
21348 @item
21349 A function.  If the function returns non-@code{nil}, the result will
21350 be used as the home score file.  The function will be called with the
21351 name of the group as the parameter.
21352
21353 @item
21354 A string.  Use the string as the home score file.
21355 @end enumerate
21356
21357 The list will be traversed from the beginning towards the end looking
21358 for matches.
21359
21360 @end enumerate
21361
21362 So, if you want to use just a single score file, you could say:
21363
21364 @lisp
21365 (setq gnus-home-score-file
21366       "my-total-score-file.SCORE")
21367 @end lisp
21368
21369 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
21370 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
21371
21372 @findex gnus-hierarchial-home-score-file
21373 @lisp
21374 (setq gnus-home-score-file
21375       'gnus-hierarchial-home-score-file)
21376 @end lisp
21377
21378 This is a ready-made function provided for your convenience.
21379 Other functions include
21380
21381 @table @code
21382 @item gnus-current-home-score-file
21383 @findex gnus-current-home-score-file
21384 Return the ``current'' regular score file.  This will make scoring
21385 commands add entry to the ``innermost'' matching score file.
21386
21387 @end table
21388
21389 If you want to have one score file for the @samp{emacs} groups and
21390 another for the @samp{comp} groups, while letting all other groups use
21391 their own home score files:
21392
21393 @lisp
21394 (setq gnus-home-score-file
21395       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
21396       '(("\\.emacs" "emacs.SCORE")
21397         ;; @r{All the comp groups in one score file}
21398         ("^comp" "comp.SCORE")))
21399 @end lisp
21400
21401 @vindex gnus-home-adapt-file
21402 @code{gnus-home-adapt-file} works exactly the same way as
21403 @code{gnus-home-score-file}, but says what the home adaptive score file
21404 is instead.  All new adaptive file entries will go into the file
21405 specified by this variable, and the same syntax is allowed.
21406
21407 In addition to using @code{gnus-home-score-file} and
21408 @code{gnus-home-adapt-file}, you can also use group parameters
21409 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
21410 Parameters}) to achieve much the same.  Group and topic parameters take
21411 precedence over this variable.
21412
21413
21414 @node Followups To Yourself
21415 @section Followups To Yourself
21416
21417 Gnus offers two commands for picking out the @code{Message-ID} header in
21418 the current buffer.  Gnus will then add a score rule that scores using
21419 this @code{Message-ID} on the @code{References} header of other
21420 articles.  This will, in effect, increase the score of all articles that
21421 respond to the article in the current buffer.  Quite useful if you want
21422 to easily note when people answer what you've said.
21423
21424 @table @code
21425
21426 @item gnus-score-followup-article
21427 @findex gnus-score-followup-article
21428 This will add a score to articles that directly follow up your own
21429 article.
21430
21431 @item gnus-score-followup-thread
21432 @findex gnus-score-followup-thread
21433 This will add a score to all articles that appear in a thread ``below''
21434 your own article.
21435 @end table
21436
21437 @vindex message-sent-hook
21438 These two functions are both primarily meant to be used in hooks like
21439 @code{message-sent-hook}, like this:
21440 @lisp
21441 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
21442 @end lisp
21443
21444
21445 If you look closely at your own @code{Message-ID}, you'll notice that
21446 the first two or three characters are always the same.  Here's two of
21447 mine:
21448
21449 @example
21450 <x6u3u47icf.fsf@@eyesore.no>
21451 <x6sp9o7ibw.fsf@@eyesore.no>
21452 @end example
21453
21454 So ``my'' ident on this machine is @samp{x6}.  This can be
21455 exploited---the following rule will raise the score on all followups to
21456 myself:
21457
21458 @lisp
21459 ("references"
21460  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
21461   1000 nil r))
21462 @end lisp
21463
21464 Whether it's the first two or first three characters that are ``yours''
21465 is system-dependent.
21466
21467
21468 @node Scoring On Other Headers
21469 @section Scoring On Other Headers
21470 @cindex scoring on other headers
21471
21472 Gnus is quite fast when scoring the ``traditional''
21473 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
21474 other headers requires writing a @code{head} scoring rule, which means
21475 that Gnus has to request every single article from the back end to find
21476 matches.  This takes a long time in big groups.
21477
21478 @vindex gnus-inhibit-slow-scoring
21479 You can inhibit this slow scoring on headers or body by setting the
21480 variable @code{gnus-inhibit-slow-scoring}.  If
21481 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
21482 the group matches the regexp.  If it is t, slow scoring on it is
21483 inhibited for all groups.
21484
21485 Now, there's not much you can do about the slowness for news groups, but for
21486 mail groups, you have greater control.  In @ref{To From Newsgroups},
21487 it's explained in greater detail what this mechanism does, but here's
21488 a cookbook example for @code{nnml} on how to allow scoring on the
21489 @samp{To} and @samp{Cc} headers.
21490
21491 Put the following in your @file{~/.gnus.el} file.
21492
21493 @lisp
21494 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
21495       nnmail-extra-headers gnus-extra-headers)
21496 @end lisp
21497
21498 Restart Gnus and rebuild your @code{nnml} overview files with the
21499 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
21500 time if you have much mail.
21501
21502 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
21503 so: @kbd{I e s p To RET <your name> RET}.
21504
21505 See?  Simple.
21506
21507
21508 @node Scoring Tips
21509 @section Scoring Tips
21510 @cindex scoring tips
21511
21512 @table @dfn
21513
21514 @item Crossposts
21515 @cindex crossposts
21516 @cindex scoring crossposts
21517 If you want to lower the score of crossposts, the line to match on is
21518 the @code{Xref} header.
21519 @lisp
21520 ("xref" (" talk.politics.misc:" -1000))
21521 @end lisp
21522
21523 @item Multiple crossposts
21524 If you want to lower the score of articles that have been crossposted to
21525 more than, say, 3 groups:
21526 @lisp
21527 ("xref"
21528   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
21529    -1000 nil r))
21530 @end lisp
21531
21532 @item Matching on the body
21533 This is generally not a very good idea---it takes a very long time.
21534 Gnus actually has to fetch each individual article from the server.  But
21535 you might want to anyway, I guess.  Even though there are three match
21536 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
21537 and stick with it in each score file.  If you use any two, each article
21538 will be fetched @emph{twice}.  If you want to match a bit on the
21539 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
21540 the matches.
21541
21542 @item Marking as read
21543 You will probably want to mark articles that have scores below a certain
21544 number as read.  This is most easily achieved by putting the following
21545 in your @file{all.SCORE} file:
21546 @lisp
21547 ((mark -100))
21548 @end lisp
21549 You may also consider doing something similar with @code{expunge}.
21550
21551 @item Negated character classes
21552 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
21553 That will match newlines, which might lead to, well, The Unknown.  Say
21554 @code{[^abcd\n]*} instead.
21555 @end table
21556
21557
21558 @node Reverse Scoring
21559 @section Reverse Scoring
21560 @cindex reverse scoring
21561
21562 If you want to keep just articles that have @samp{Sex with Emacs} in the
21563 subject header, and expunge all other articles, you could put something
21564 like this in your score file:
21565
21566 @lisp
21567 (("subject"
21568   ("Sex with Emacs" 2))
21569  (mark 1)
21570  (expunge 1))
21571 @end lisp
21572
21573 So, you raise all articles that match @samp{Sex with Emacs} and mark the
21574 rest as read, and expunge them to boot.
21575
21576
21577 @node Global Score Files
21578 @section Global Score Files
21579 @cindex global score files
21580
21581 Sure, other newsreaders have ``global kill files''.  These are usually
21582 nothing more than a single kill file that applies to all groups, stored
21583 in the user's home directory.  Bah!  Puny, weak newsreaders!
21584
21585 What I'm talking about here are Global Score Files.  Score files from
21586 all over the world, from users everywhere, uniting all nations in one
21587 big, happy score file union!  Ange-score!  New and untested!
21588
21589 @vindex gnus-global-score-files
21590 All you have to do to use other people's score files is to set the
21591 @code{gnus-global-score-files} variable.  One entry for each score file,
21592 or each score file directory.  Gnus will decide by itself what score
21593 files are applicable to which group.
21594
21595 To use the score file
21596 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
21597 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
21598 say this:
21599
21600 @lisp
21601 (setq gnus-global-score-files
21602       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
21603         "/ftp@@ftp.some-where:/pub/score/"))
21604 @end lisp
21605
21606 @findex gnus-score-search-global-directories
21607 @noindent
21608 Simple, eh?  Directory names must end with a @samp{/}.  These
21609 directories are typically scanned only once during each Gnus session.
21610 If you feel the need to manually re-scan the remote directories, you can
21611 use the @code{gnus-score-search-global-directories} command.
21612
21613 Note that, at present, using this option will slow down group entry
21614 somewhat.  (That is---a lot.)
21615
21616 If you want to start maintaining score files for other people to use,
21617 just put your score file up for anonymous ftp and announce it to the
21618 world.  Become a retro-moderator!  Participate in the retro-moderator
21619 wars sure to ensue, where retro-moderators battle it out for the
21620 sympathy of the people, luring them to use their score files on false
21621 premises!  Yay!  The net is saved!
21622
21623 Here are some tips for the would-be retro-moderator, off the top of my
21624 head:
21625
21626 @itemize @bullet
21627
21628 @item
21629 Articles heavily crossposted are probably junk.
21630 @item
21631 To lower a single inappropriate article, lower by @code{Message-ID}.
21632 @item
21633 Particularly brilliant authors can be raised on a permanent basis.
21634 @item
21635 Authors that repeatedly post off-charter for the group can safely be
21636 lowered out of existence.
21637 @item
21638 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
21639 articles completely.
21640
21641 @item
21642 Use expiring score entries to keep the size of the file down.  You
21643 should probably have a long expiry period, though, as some sites keep
21644 old articles for a long time.
21645 @end itemize
21646
21647 @dots{} I wonder whether other newsreaders will support global score files
21648 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
21649 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
21650 holding our breath yet?
21651
21652
21653 @node Kill Files
21654 @section Kill Files
21655 @cindex kill files
21656
21657 Gnus still supports those pesky old kill files.  In fact, the kill file
21658 entries can now be expiring, which is something I wrote before Daniel
21659 Quinlan thought of doing score files, so I've left the code in there.
21660
21661 In short, kill processing is a lot slower (and I do mean @emph{a lot})
21662 than score processing, so it might be a good idea to rewrite your kill
21663 files into score files.
21664
21665 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
21666 forms into this file, which means that you can use kill files as some
21667 sort of primitive hook function to be run on group entry, even though
21668 that isn't a very good idea.
21669
21670 Normal kill files look like this:
21671
21672 @lisp
21673 (gnus-kill "From" "Lars Ingebrigtsen")
21674 (gnus-kill "Subject" "ding")
21675 (gnus-expunge "X")
21676 @end lisp
21677
21678 This will mark every article written by me as read, and remove the
21679 marked articles from the summary buffer.  Very useful, you'll agree.
21680
21681 Other programs use a totally different kill file syntax.  If Gnus
21682 encounters what looks like a @code{rn} kill file, it will take a stab at
21683 interpreting it.
21684
21685 Two summary functions for editing a @sc{gnus} kill file:
21686
21687 @table @kbd
21688
21689 @item M-k
21690 @kindex M-k (Summary)
21691 @findex gnus-summary-edit-local-kill
21692 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
21693
21694 @item M-K
21695 @kindex M-K (Summary)
21696 @findex gnus-summary-edit-global-kill
21697 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
21698 @end table
21699
21700 Two group mode functions for editing the kill files:
21701
21702 @table @kbd
21703
21704 @item M-k
21705 @kindex M-k (Group)
21706 @findex gnus-group-edit-local-kill
21707 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
21708
21709 @item M-K
21710 @kindex M-K (Group)
21711 @findex gnus-group-edit-global-kill
21712 Edit the general kill file (@code{gnus-group-edit-global-kill}).
21713 @end table
21714
21715 Kill file variables:
21716
21717 @table @code
21718 @item gnus-kill-file-name
21719 @vindex gnus-kill-file-name
21720 A kill file for the group @samp{soc.motss} is normally called
21721 @file{soc.motss.KILL}.  The suffix appended to the group name to get
21722 this file name is detailed by the @code{gnus-kill-file-name} variable.
21723 The ``global'' kill file (not in the score file sense of ``global'', of
21724 course) is just called @file{KILL}.
21725
21726 @vindex gnus-kill-save-kill-file
21727 @item gnus-kill-save-kill-file
21728 If this variable is non-@code{nil}, Gnus will save the
21729 kill file after processing, which is necessary if you use expiring
21730 kills.
21731
21732 @item gnus-apply-kill-hook
21733 @vindex gnus-apply-kill-hook
21734 @findex gnus-apply-kill-file-unless-scored
21735 @findex gnus-apply-kill-file
21736 A hook called to apply kill files to a group.  It is
21737 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
21738 kill file if you have a score file for the same group, you can set this
21739 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
21740 kill files to be processed, you should set this variable to @code{nil}.
21741
21742 @item gnus-kill-file-mode-hook
21743 @vindex gnus-kill-file-mode-hook
21744 A hook called in kill-file mode buffers.
21745
21746 @end table
21747
21748
21749 @node Converting Kill Files
21750 @section Converting Kill Files
21751 @cindex kill files
21752 @cindex converting kill files
21753
21754 If you have loads of old kill files, you may want to convert them into
21755 score files.  If they are ``regular'', you can use
21756 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
21757 by hand.
21758
21759 The kill to score conversion package isn't included in Gnus by default.
21760 You can fetch it from
21761 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
21762
21763 If your old kill files are very complex---if they contain more
21764 non-@code{gnus-kill} forms than not, you'll have to convert them by
21765 hand.  Or just let them be as they are.  Gnus will still use them as
21766 before.
21767
21768
21769 @node Advanced Scoring
21770 @section Advanced Scoring
21771
21772 Scoring on Subjects and From headers is nice enough, but what if you're
21773 really interested in what a person has to say only when she's talking
21774 about a particular subject?  Or what if you really don't want to
21775 read what person A has to say when she's following up to person B, but
21776 want to read what she says when she's following up to person C?
21777
21778 By using advanced scoring rules you may create arbitrarily complex
21779 scoring patterns.
21780
21781 @menu
21782 * Advanced Scoring Syntax::     A definition.
21783 * Advanced Scoring Examples::   What they look like.
21784 * Advanced Scoring Tips::       Getting the most out of it.
21785 @end menu
21786
21787
21788 @node Advanced Scoring Syntax
21789 @subsection Advanced Scoring Syntax
21790
21791 Ordinary scoring rules have a string as the first element in the rule.
21792 Advanced scoring rules have a list as the first element.  The second
21793 element is the score to be applied if the first element evaluated to a
21794 non-@code{nil} value.
21795
21796 These lists may consist of three logical operators, one redirection
21797 operator, and various match operators.
21798
21799 Logical operators:
21800
21801 @table @code
21802 @item &
21803 @itemx and
21804 This logical operator will evaluate each of its arguments until it finds
21805 one that evaluates to @code{false}, and then it'll stop.  If all arguments
21806 evaluate to @code{true} values, then this operator will return
21807 @code{true}.
21808
21809 @item |
21810 @itemx or
21811 This logical operator will evaluate each of its arguments until it finds
21812 one that evaluates to @code{true}.  If no arguments are @code{true},
21813 then this operator will return @code{false}.
21814
21815 @item !
21816 @itemx not
21817 @itemx Â¬
21818 This logical operator only takes a single argument.  It returns the
21819 logical negation of the value of its argument.
21820
21821 @end table
21822
21823 There is an @dfn{indirection operator} that will make its arguments
21824 apply to the ancestors of the current article being scored.  For
21825 instance, @code{1-} will make score rules apply to the parent of the
21826 current article.  @code{2-} will make score rules apply to the
21827 grandparent of the current article.  Alternatively, you can write
21828 @code{^^}, where the number of @code{^}s (carets) says how far back into
21829 the ancestry you want to go.
21830
21831 Finally, we have the match operators.  These are the ones that do the
21832 real work.  Match operators are header name strings followed by a match
21833 and a match type.  A typical match operator looks like @samp{("from"
21834 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
21835 simple scoring, and the match types are also the same.
21836
21837
21838 @node Advanced Scoring Examples
21839 @subsection Advanced Scoring Examples
21840
21841 Please note that the following examples are score file rules.  To
21842 make a complete score file from them, surround them with another pair
21843 of parentheses.
21844
21845 Let's say you want to increase the score of articles written by Lars
21846 when he's talking about Gnus:
21847
21848 @example
21849 @group
21850 ((&
21851   ("from" "Lars Ingebrigtsen")
21852   ("subject" "Gnus"))
21853  1000)
21854 @end group
21855 @end example
21856
21857 Quite simple, huh?
21858
21859 When he writes long articles, he sometimes has something nice to say:
21860
21861 @example
21862 ((&
21863   ("from" "Lars Ingebrigtsen")
21864   (|
21865    ("subject" "Gnus")
21866    ("lines" 100 >)))
21867  1000)
21868 @end example
21869
21870 However, when he responds to things written by Reig Eigil Logge, you
21871 really don't want to read what he's written:
21872
21873 @example
21874 ((&
21875   ("from" "Lars Ingebrigtsen")
21876   (1- ("from" "Reig Eigil Logge")))
21877  -100000)
21878 @end example
21879
21880 Everybody that follows up Redmondo when he writes about disappearing
21881 socks should have their scores raised, but only when they talk about
21882 white socks.  However, when Lars talks about socks, it's usually not
21883 very interesting:
21884
21885 @example
21886 ((&
21887   (1-
21888    (&
21889     ("from" "redmondo@@.*no" r)
21890     ("body" "disappearing.*socks" t)))
21891   (! ("from" "Lars Ingebrigtsen"))
21892   ("body" "white.*socks"))
21893  1000)
21894 @end example
21895
21896 Suppose you're reading a high volume group and you're only interested
21897 in replies. The plan is to score down all articles that don't have
21898 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
21899 parents of articles that have subjects that begin with reply marks.
21900
21901 @example
21902 ((! ("subject" "re:\\|fwd?:" r))
21903   -200)
21904 ((1- ("subject" "re:\\|fwd?:" r))
21905   200)
21906 @end example
21907
21908 The possibilities are endless.
21909
21910 @node Advanced Scoring Tips
21911 @subsection Advanced Scoring Tips
21912
21913 The @code{&} and @code{|} logical operators do short-circuit logic.
21914 That is, they stop processing their arguments when it's clear what the
21915 result of the operation will be.  For instance, if one of the arguments
21916 of an @code{&} evaluates to @code{false}, there's no point in evaluating
21917 the rest of the arguments.  This means that you should put slow matches
21918 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
21919 @samp{subject}) first.
21920
21921 The indirection arguments (@code{1-} and so on) will make their
21922 arguments work on previous generations of the thread.  If you say
21923 something like:
21924
21925 @example
21926 ...
21927 (1-
21928  (1-
21929   ("from" "lars")))
21930 ...
21931 @end example
21932
21933 Then that means ``score on the from header of the grandparent of the
21934 current article''.  An indirection is quite fast, but it's better to say:
21935
21936 @example
21937 (1-
21938  (&
21939   ("from" "Lars")
21940   ("subject" "Gnus")))
21941 @end example
21942
21943 than it is to say:
21944
21945 @example
21946 (&
21947  (1- ("from" "Lars"))
21948  (1- ("subject" "Gnus")))
21949 @end example
21950
21951
21952 @node Score Decays
21953 @section Score Decays
21954 @cindex score decays
21955 @cindex decays
21956
21957 You may find that your scores have a tendency to grow without
21958 bounds, especially if you're using adaptive scoring.  If scores get too
21959 big, they lose all meaning---they simply max out and it's difficult to
21960 use them in any sensible way.
21961
21962 @vindex gnus-decay-scores
21963 @findex gnus-decay-score
21964 @vindex gnus-decay-score-function
21965 Gnus provides a mechanism for decaying scores to help with this problem.
21966 When score files are loaded and @code{gnus-decay-scores} is
21967 non-@code{nil}, Gnus will run the score files through the decaying
21968 mechanism thereby lowering the scores of all non-permanent score rules.
21969 If @code{gnus-decay-scores} is a regexp, only score files matching this
21970 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
21971 @emph{adaptive} score files should be decayed.  The decay itself if
21972 performed by the @code{gnus-decay-score-function} function, which is
21973 @code{gnus-decay-score} by default.  Here's the definition of that
21974 function:
21975
21976 @lisp
21977 (defun gnus-decay-score (score)
21978   "Decay SCORE according to `gnus-score-decay-constant'
21979 and `gnus-score-decay-scale'."
21980   (let ((n (- score
21981               (* (if (< score 0) -1 1)
21982                  (min (abs score)
21983                       (max gnus-score-decay-constant
21984                            (* (abs score)
21985                               gnus-score-decay-scale)))))))
21986     (if (and (featurep 'xemacs)
21987              ;; XEmacs' floor can handle only the floating point
21988              ;; number below the half of the maximum integer.
21989              (> (abs n) (lsh -1 -2)))
21990         (string-to-number
21991          (car (split-string (number-to-string n) "\\.")))
21992       (floor n))))
21993 @end lisp
21994
21995 @vindex gnus-score-decay-scale
21996 @vindex gnus-score-decay-constant
21997 @code{gnus-score-decay-constant} is 3 by default and
21998 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
21999
22000 @enumerate
22001 @item
22002 Scores between -3 and 3 will be set to 0 when this function is called.
22003
22004 @item
22005 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22006
22007 @item
22008 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22009 score.
22010 @end enumerate
22011
22012 If you don't like this decay function, write your own.  It is called
22013 with the score to be decayed as its only parameter, and it should return
22014 the new score, which should be an integer.
22015
22016 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22017 four days, Gnus will decay the scores four times, for instance.
22018
22019 @iftex
22020 @iflatex
22021 @chapter Message
22022 @include message.texi
22023 @chapter Emacs MIME
22024 @include emacs-mime.texi
22025 @chapter Sieve
22026 @include sieve.texi
22027 @chapter PGG
22028 @include pgg.texi
22029 @chapter SASL
22030 @include sasl.texi
22031 @end iflatex
22032 @end iftex
22033
22034 @node Various
22035 @chapter Various
22036
22037 @menu
22038 * Process/Prefix::              A convention used by many treatment commands.
22039 * Interactive::                 Making Gnus ask you many questions.
22040 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22041 * Formatting Variables::        You can specify what buffers should look like.
22042 * Window Layout::               Configuring the Gnus buffer windows.
22043 * Faces and Fonts::             How to change how faces look.
22044 * Compilation::                 How to speed Gnus up.
22045 * Mode Lines::                  Displaying information in the mode lines.
22046 * Highlighting and Menus::      Making buffers look all nice and cozy.
22047 * Buttons::                     Get tendinitis in ten easy steps!
22048 * Daemons::                     Gnus can do things behind your back.
22049 * NoCeM::                       How to avoid spam and other fatty foods.
22050 * Undo::                        Some actions can be undone.
22051 * Predicate Specifiers::        Specifying predicates.
22052 * Moderation::                  What to do if you're a moderator.
22053 * Fetching a Group::            Starting Gnus just to read a group.
22054 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22055 * Fuzzy Matching::              What's the big fuzz?
22056 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22057 * Spam Package::                A package for filtering and processing spam.
22058 * Other modes::                 Interaction with other modes.
22059 * Various Various::             Things that are really various.
22060 @end menu
22061
22062
22063 @node Process/Prefix
22064 @section Process/Prefix
22065 @cindex process/prefix convention
22066
22067 Many functions, among them functions for moving, decoding and saving
22068 articles, use what is known as the @dfn{Process/Prefix convention}.
22069
22070 This is a method for figuring out what articles the user wants the
22071 command to be performed on.
22072
22073 It goes like this:
22074
22075 If the numeric prefix is N, perform the operation on the next N
22076 articles, starting with the current one.  If the numeric prefix is
22077 negative, perform the operation on the previous N articles, starting
22078 with the current one.
22079
22080 @vindex transient-mark-mode
22081 If @code{transient-mark-mode} in non-@code{nil} and the region is
22082 active, all articles in the region will be worked upon.
22083
22084 If there is no numeric prefix, but some articles are marked with the
22085 process mark, perform the operation on the articles marked with
22086 the process mark.
22087
22088 If there is neither a numeric prefix nor any articles marked with the
22089 process mark, just perform the operation on the current article.
22090
22091 Quite simple, really, but it needs to be made clear so that surprises
22092 are avoided.
22093
22094 Commands that react to the process mark will push the current list of
22095 process marked articles onto a stack and will then clear all process
22096 marked articles.  You can restore the previous configuration with the
22097 @kbd{M P y} command (@pxref{Setting Process Marks}).
22098
22099 @vindex gnus-summary-goto-unread
22100 One thing that seems to shock & horrify lots of people is that, for
22101 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22102 Since each @kbd{d} (which marks the current article as read) by default
22103 goes to the next unread article after marking, this means that @kbd{3 d}
22104 will mark the next three unread articles as read, no matter what the
22105 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22106 @code{nil} for a more straightforward action.
22107
22108 Many commands do not use the process/prefix convention.  All commands
22109 that do explicitly say so in this manual.  To apply the process/prefix
22110 convention to commands that do not use it, you can use the @kbd{M-&}
22111 command.  For instance, to mark all the articles in the group as
22112 expirable, you could say @kbd{M P b M-& E}.
22113
22114
22115 @node Interactive
22116 @section Interactive
22117 @cindex interaction
22118
22119 @table @code
22120
22121 @item gnus-novice-user
22122 @vindex gnus-novice-user
22123 If this variable is non-@code{nil}, you are either a newcomer to the
22124 World of Usenet, or you are very cautious, which is a nice thing to be,
22125 really.  You will be given questions of the type ``Are you sure you want
22126 to do this?'' before doing anything dangerous.  This is @code{t} by
22127 default.
22128
22129 @item gnus-expert-user
22130 @vindex gnus-expert-user
22131 If this variable is non-@code{nil}, you will seldom be asked any
22132 questions by Gnus.  It will simply assume you know what you're doing, no
22133 matter how strange.
22134
22135 @item gnus-interactive-catchup
22136 @vindex gnus-interactive-catchup
22137 Require confirmation before catching up a group if non-@code{nil}.  It
22138 is @code{t} by default.
22139
22140 @item gnus-interactive-exit
22141 @vindex gnus-interactive-exit
22142 Require confirmation before exiting Gnus.  This variable is @code{t} by
22143 default.
22144 @end table
22145
22146
22147 @node Symbolic Prefixes
22148 @section Symbolic Prefixes
22149 @cindex symbolic prefixes
22150
22151 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22152 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22153 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22154 rule of 900 to the current article.
22155
22156 This is all nice and well, but what if you want to give a command some
22157 additional information?  Well, what most commands do is interpret the
22158 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22159 doesn't want a backup file to be created when saving the current buffer,
22160 for instance.  But what if you want to save without making a backup
22161 file, and you want Emacs to flash lights and play a nice tune at the
22162 same time?  You can't, and you're probably perfectly happy that way.
22163
22164 @kindex M-i (Summary)
22165 @findex gnus-symbolic-argument
22166 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22167 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22168 character typed in is the value.  You can stack as many @kbd{M-i}
22169 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22170 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22171 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22172 @code{b}''.  You get the drift.
22173
22174 Typing in symbolic prefixes to commands that don't accept them doesn't
22175 hurt, but it doesn't do any good either.  Currently not many Gnus
22176 functions make use of the symbolic prefix.
22177
22178 If you're interested in how Gnus implements this, @pxref{Extended
22179 Interactive}.
22180
22181
22182 @node Formatting Variables
22183 @section Formatting Variables
22184 @cindex formatting variables
22185
22186 Throughout this manual you've probably noticed lots of variables called
22187 things like @code{gnus-group-line-format} and
22188 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22189 output lines in the various buffers.  There's quite a lot of them.
22190 Fortunately, they all use the same syntax, so there's not that much to
22191 be annoyed by.
22192
22193 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22194 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22195 lots of percentages everywhere.
22196
22197 @menu
22198 * Formatting Basics::           A formatting variable is basically a format string.
22199 * Mode Line Formatting::        Some rules about mode line formatting variables.
22200 * Advanced Formatting::         Modifying output in various ways.
22201 * User-Defined Specs::          Having Gnus call your own functions.
22202 * Formatting Fonts::            Making the formatting look colorful and nice.
22203 * Positioning Point::           Moving point to a position after an operation.
22204 * Tabulation::                  Tabulating your output.
22205 * Wide Characters::             Dealing with wide characters.
22206 @end menu
22207
22208 Currently Gnus uses the following formatting variables:
22209 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22210 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22211 @code{gnus-group-mode-line-format},
22212 @code{gnus-summary-mode-line-format},
22213 @code{gnus-article-mode-line-format},
22214 @code{gnus-server-mode-line-format}, and
22215 @code{gnus-summary-pick-line-format}.
22216
22217 All these format variables can also be arbitrary elisp forms.  In that
22218 case, they will be @code{eval}ed to insert the required lines.
22219
22220 @kindex M-x gnus-update-format
22221 @findex gnus-update-format
22222 Gnus includes a command to help you while creating your own format
22223 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22224 update the spec in question and pop you to a buffer where you can
22225 examine the resulting Lisp code to be run to generate the line.
22226
22227
22228
22229 @node Formatting Basics
22230 @subsection Formatting Basics
22231
22232 Each @samp{%} element will be replaced by some string or other when the
22233 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22234 spec, and pad with spaces to get a 5-character field''.
22235
22236 As with normal C and Emacs Lisp formatting strings, the numerical
22237 modifier between the @samp{%} and the formatting type character will
22238 @dfn{pad} the output so that it is always at least that long.
22239 @samp{%5y} will make the field always (at least) five characters wide by
22240 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22241 the right instead.
22242
22243 You may also wish to limit the length of the field to protect against
22244 particularly wide values.  For that you can say @samp{%4,6y}, which
22245 means that the field will never be more than 6 characters wide and never
22246 less than 4 characters wide.
22247
22248 Also Gnus supports some extended format specifications, such as
22249 @samp{%&user-date;}.
22250
22251
22252 @node Mode Line Formatting
22253 @subsection Mode Line Formatting
22254
22255 Mode line formatting variables (e.g.,
22256 @code{gnus-summary-mode-line-format}) follow the same rules as other,
22257 buffer line oriented formatting variables (@pxref{Formatting Basics})
22258 with the following two differences:
22259
22260 @enumerate
22261
22262 @item
22263 There must be no newline (@samp{\n}) at the end.
22264
22265 @item
22266 The special @samp{%%b} spec can be used to display the buffer name.
22267 Well, it's no spec at all, really---@samp{%%} is just a way to quote
22268 @samp{%} to allow it to pass through the formatting machinery unmangled,
22269 so that Emacs receives @samp{%b}, which is something the Emacs mode line
22270 display interprets to mean ``show the buffer name''.  For a full list of
22271 mode line specs Emacs understands, see the documentation of the
22272 @code{mode-line-format} variable.
22273
22274 @end enumerate
22275
22276
22277 @node Advanced Formatting
22278 @subsection Advanced Formatting
22279
22280 It is frequently useful to post-process the fields in some way.
22281 Padding, limiting, cutting off parts and suppressing certain values can
22282 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
22283 look like @samp{%~(cut 3)~(ignore "0")y}.
22284
22285 These are the valid modifiers:
22286
22287 @table @code
22288 @item pad
22289 @itemx pad-left
22290 Pad the field to the left with spaces until it reaches the required
22291 length.
22292
22293 @item pad-right
22294 Pad the field to the right with spaces until it reaches the required
22295 length.
22296
22297 @item max
22298 @itemx max-left
22299 Cut off characters from the left until it reaches the specified length.
22300
22301 @item max-right
22302 Cut off characters from the right until it reaches the specified
22303 length.
22304
22305 @item cut
22306 @itemx cut-left
22307 Cut off the specified number of characters from the left.
22308
22309 @item cut-right
22310 Cut off the specified number of characters from the right.
22311
22312 @item ignore
22313 Return an empty string if the field is equal to the specified value.
22314
22315 @item form
22316 Use the specified form as the field value when the @samp{@@} spec is
22317 used.
22318
22319 Here's an example:
22320
22321 @lisp
22322 "~(form (current-time-string))@@"
22323 @end lisp
22324
22325 @end table
22326
22327 Let's take an example.  The @samp{%o} spec in the summary mode lines
22328 will return a date in compact ISO8601 format---@samp{19960809T230410}.
22329 This is quite a mouthful, so we want to shave off the century number and
22330 the time, leaving us with a six-character date.  That would be
22331 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
22332 maxing, and we need the padding to ensure that the date is never less
22333 than 6 characters to make it look nice in columns.)
22334
22335 Ignoring is done first; then cutting; then maxing; and then as the very
22336 last operation, padding.
22337
22338 If you use lots of these advanced thingies, you'll find that Gnus gets
22339 quite slow.  This can be helped enormously by running @kbd{M-x
22340 gnus-compile} when you are satisfied with the look of your lines.
22341 @xref{Compilation}.
22342
22343
22344 @node User-Defined Specs
22345 @subsection User-Defined Specs
22346
22347 All the specs allow for inserting user defined specifiers---@samp{u}.
22348 The next character in the format string should be a letter.  Gnus
22349 will call the function @code{gnus-user-format-function-}@samp{X}, where
22350 @samp{X} is the letter following @samp{%u}.  The function will be passed
22351 a single parameter---what the parameter means depends on what buffer
22352 it's being called from.  The function should return a string, which will
22353 be inserted into the buffer just like information from any other
22354 specifier.  This function may also be called with dummy values, so it
22355 should protect against that.
22356
22357 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
22358 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
22359
22360 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
22361 much the same without defining new functions.  Here's an example:
22362 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
22363 given here will be evaluated to yield the current line number, and then
22364 inserted.
22365
22366
22367 @node Formatting Fonts
22368 @subsection Formatting Fonts
22369
22370 @cindex %(, %)
22371 @vindex gnus-mouse-face
22372 There are specs for highlighting, and these are shared by all the format
22373 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
22374 the special @code{mouse-face} property set, which means that it will be
22375 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
22376 over it.
22377
22378 @cindex %@{, %@}
22379 @vindex gnus-face-0
22380 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
22381 normal faces set using @code{gnus-face-0}, which is @code{bold} by
22382 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
22383 and so on.  Create as many faces as you wish.  The same goes for the
22384 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
22385 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
22386
22387 @cindex %<<, %>>, guillemets
22388 @c @cindex %<<, %>>, %«, %», guillemets
22389 @vindex gnus-balloon-face-0
22390 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
22391 special @code{balloon-help} property set to
22392 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
22393 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
22394 variables should be either strings or symbols naming functions that
22395 return a string.  When the mouse passes over text with this property
22396 set, a balloon window will appear and display the string.  Please
22397 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
22398 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
22399 XEmacs) for more information on this.  (For technical reasons, the
22400 guillemets have been approximated as @samp{<<} and @samp{>>} in this
22401 paragraph.)
22402
22403 Here's an alternative recipe for the group buffer:
22404
22405 @lisp
22406 ;; @r{Create three face types.}
22407 (setq gnus-face-1 'bold)
22408 (setq gnus-face-3 'italic)
22409
22410 ;; @r{We want the article count to be in}
22411 ;; @r{a bold and green face.  So we create}
22412 ;; @r{a new face called @code{my-green-bold}.}
22413 (copy-face 'bold 'my-green-bold)
22414 ;; @r{Set the color.}
22415 (set-face-foreground 'my-green-bold "ForestGreen")
22416 (setq gnus-face-2 'my-green-bold)
22417
22418 ;; @r{Set the new & fancy format.}
22419 (setq gnus-group-line-format
22420       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
22421 @end lisp
22422
22423 I'm sure you'll be able to use this scheme to create totally unreadable
22424 and extremely vulgar displays.  Have fun!
22425
22426 Note that the @samp{%(} specs (and friends) do not make any sense on the
22427 mode-line variables.
22428
22429 @node Positioning Point
22430 @subsection Positioning Point
22431
22432 Gnus usually moves point to a pre-defined place on each line in most
22433 buffers.  By default, point move to the first colon character on the
22434 line.  You can customize this behavior in three different ways.
22435
22436 You can move the colon character to somewhere else on the line.
22437
22438 @findex gnus-goto-colon
22439 You can redefine the function that moves the point to the colon.  The
22440 function is called @code{gnus-goto-colon}.
22441
22442 But perhaps the most convenient way to deal with this, if you don't want
22443 to have a colon in your line, is to use the @samp{%*} specifier.  If you
22444 put a @samp{%*} somewhere in your format line definition, Gnus will
22445 place point there.
22446
22447
22448 @node Tabulation
22449 @subsection Tabulation
22450
22451 You can usually line up your displays by padding and cutting your
22452 strings.  However, when combining various strings of different size, it
22453 can often be more convenient to just output the strings, and then worry
22454 about lining up the following text afterwards.
22455
22456 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
22457 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
22458
22459 @samp{%50=} will insert space characters to pad the line up to column
22460 50.  If the text is already past column 50, nothing will be inserted.
22461 This is the soft tabulator.
22462
22463 @samp{%-50=} will insert space characters to pad the line up to column
22464 50.  If the text is already past column 50, the excess text past column
22465 50 will be removed.  This is the hard tabulator.
22466
22467
22468 @node Wide Characters
22469 @subsection Wide Characters
22470
22471 Fixed width fonts in most countries have characters of the same width.
22472 Some countries, however, use Latin characters mixed with wider
22473 characters---most notable East Asian countries.
22474
22475 The problem is that when formatting, Gnus assumes that if a string is 10
22476 characters wide, it'll be 10 Latin characters wide on the screen.  In
22477 these countries, that's not true.
22478
22479 @vindex gnus-use-correct-string-widths
22480 To help fix this, you can set @code{gnus-use-correct-string-widths} to
22481 @code{t}.  This makes buffer generation slower, but the results will be
22482 prettier.  The default value under XEmacs is @code{t} but @code{nil}
22483 for Emacs.
22484
22485
22486 @node Window Layout
22487 @section Window Layout
22488 @cindex window layout
22489
22490 No, there's nothing here about X, so be quiet.
22491
22492 @vindex gnus-use-full-window
22493 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
22494 other windows and occupy the entire Emacs screen by itself.  It is
22495 @code{t} by default.
22496
22497 Setting this variable to @code{nil} kinda works, but there are
22498 glitches.  Use at your own peril.
22499
22500 @vindex gnus-buffer-configuration
22501 @code{gnus-buffer-configuration} describes how much space each Gnus
22502 buffer should be given.  Here's an excerpt of this variable:
22503
22504 @lisp
22505 ((group (vertical 1.0 (group 1.0 point)
22506                       (if gnus-carpal (group-carpal 4))))
22507  (article (vertical 1.0 (summary 0.25 point)
22508                         (article 1.0))))
22509 @end lisp
22510
22511 This is an alist.  The @dfn{key} is a symbol that names some action or
22512 other.  For instance, when displaying the group buffer, the window
22513 configuration function will use @code{group} as the key.  A full list of
22514 possible names is listed below.
22515
22516 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
22517 should occupy.  To take the @code{article} split as an example -
22518
22519 @lisp
22520 (article (vertical 1.0 (summary 0.25 point)
22521                        (article 1.0)))
22522 @end lisp
22523
22524 This @dfn{split} says that the summary buffer should occupy 25% of upper
22525 half of the screen, and that it is placed over the article buffer.  As
22526 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
22527 reaching for that calculator there).  However, the special number
22528 @code{1.0} is used to signal that this buffer should soak up all the
22529 rest of the space available after the rest of the buffers have taken
22530 whatever they need.  There should be only one buffer with the @code{1.0}
22531 size spec per split.
22532
22533 Point will be put in the buffer that has the optional third element
22534 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
22535 split where the tag @code{frame-focus} is a member (i.e. is the third or
22536 fourth element in the list, depending on whether the @code{point} tag is
22537 present) gets focus.
22538
22539 Here's a more complicated example:
22540
22541 @lisp
22542 (article (vertical 1.0 (group 4)
22543                        (summary 0.25 point)
22544                        (if gnus-carpal (summary-carpal 4))
22545                        (article 1.0)))
22546 @end lisp
22547
22548 If the size spec is an integer instead of a floating point number,
22549 then that number will be used to say how many lines a buffer should
22550 occupy, not a percentage.
22551
22552 If the @dfn{split} looks like something that can be @code{eval}ed (to be
22553 precise---if the @code{car} of the split is a function or a subr), this
22554 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
22555 be used as a split.  This means that there will be three buffers if
22556 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
22557 is non-@code{nil}.
22558
22559 Not complicated enough for you?  Well, try this on for size:
22560
22561 @lisp
22562 (article (horizontal 1.0
22563              (vertical 0.5
22564                  (group 1.0)
22565                  (gnus-carpal 4))
22566              (vertical 1.0
22567                  (summary 0.25 point)
22568                  (summary-carpal 4)
22569                  (article 1.0))))
22570 @end lisp
22571
22572 Whoops.  Two buffers with the mystery 100% tag.  And what's that
22573 @code{horizontal} thingie?
22574
22575 If the first element in one of the split is @code{horizontal}, Gnus will
22576 split the window horizontally, giving you two windows side-by-side.
22577 Inside each of these strips you may carry on all you like in the normal
22578 fashion.  The number following @code{horizontal} says what percentage of
22579 the screen is to be given to this strip.
22580
22581 For each split, there @emph{must} be one element that has the 100% tag.
22582 The splitting is never accurate, and this buffer will eat any leftover
22583 lines from the splits.
22584
22585 To be slightly more formal, here's a definition of what a valid split
22586 may look like:
22587
22588 @example
22589 @group
22590 split      = frame | horizontal | vertical | buffer | form
22591 frame      = "(frame " size *split ")"
22592 horizontal = "(horizontal " size *split ")"
22593 vertical   = "(vertical " size *split ")"
22594 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
22595 size       = number | frame-params
22596 buf-name   = group | article | summary ...
22597 @end group
22598 @end example
22599
22600 The limitations are that the @code{frame} split can only appear as the
22601 top-level split.  @var{form} should be an Emacs Lisp form that should
22602 return a valid split.  We see that each split is fully recursive, and
22603 may contain any number of @code{vertical} and @code{horizontal} splits.
22604
22605 @vindex gnus-window-min-width
22606 @vindex gnus-window-min-height
22607 @cindex window height
22608 @cindex window width
22609 Finding the right sizes can be a bit complicated.  No window may be less
22610 than @code{gnus-window-min-height} (default 1) characters high, and all
22611 windows must be at least @code{gnus-window-min-width} (default 1)
22612 characters wide.  Gnus will try to enforce this before applying the
22613 splits.  If you want to use the normal Emacs window width/height limit,
22614 you can just set these two variables to @code{nil}.
22615
22616 If you're not familiar with Emacs terminology, @code{horizontal} and
22617 @code{vertical} splits may work the opposite way of what you'd expect.
22618 Windows inside a @code{horizontal} split are shown side-by-side, and
22619 windows within a @code{vertical} split are shown above each other.
22620
22621 @findex gnus-configure-frame
22622 If you want to experiment with window placement, a good tip is to call
22623 @code{gnus-configure-frame} directly with a split.  This is the function
22624 that does all the real work when splitting buffers.  Below is a pretty
22625 nonsensical configuration with 5 windows; two for the group buffer and
22626 three for the article buffer.  (I said it was nonsensical.)  If you
22627 @code{eval} the statement below, you can get an idea of how that would
22628 look straight away, without going through the normal Gnus channels.
22629 Play with it until you're satisfied, and then use
22630 @code{gnus-add-configuration} to add your new creation to the buffer
22631 configuration list.
22632
22633 @lisp
22634 (gnus-configure-frame
22635  '(horizontal 1.0
22636     (vertical 10
22637       (group 1.0)
22638       (article 0.3 point))
22639     (vertical 1.0
22640       (article 1.0)
22641       (horizontal 4
22642         (group 1.0)
22643         (article 10)))))
22644 @end lisp
22645
22646 You might want to have several frames as well.  No prob---just use the
22647 @code{frame} split:
22648
22649 @lisp
22650 (gnus-configure-frame
22651  '(frame 1.0
22652          (vertical 1.0
22653                    (summary 0.25 point frame-focus)
22654                    (article 1.0))
22655          (vertical ((height . 5) (width . 15)
22656                     (user-position . t)
22657                     (left . -1) (top . 1))
22658                    (picon 1.0))))
22659
22660 @end lisp
22661
22662 This split will result in the familiar summary/article window
22663 configuration in the first (or ``main'') frame, while a small additional
22664 frame will be created where picons will be shown.  As you can see,
22665 instead of the normal @code{1.0} top-level spec, each additional split
22666 should have a frame parameter alist as the size spec.
22667 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
22668 Reference Manual}.  Under XEmacs, a frame property list will be
22669 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
22670 is such a plist.
22671 The list of all possible keys for @code{gnus-buffer-configuration} can
22672 be found in its default value.
22673
22674 Note that the @code{message} key is used for both
22675 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
22676 it is desirable to distinguish between the two, something like this
22677 might be used:
22678
22679 @lisp
22680 (message (horizontal 1.0
22681                      (vertical 1.0 (message 1.0 point))
22682                      (vertical 0.24
22683                                (if (buffer-live-p gnus-summary-buffer)
22684                                    '(summary 0.5))
22685                                (group 1.0))))
22686 @end lisp
22687
22688 One common desire for a multiple frame split is to have a separate frame
22689 for composing mail and news while leaving the original frame intact.  To
22690 accomplish that, something like the following can be done:
22691
22692 @lisp
22693 (message
22694   (frame 1.0
22695          (if (not (buffer-live-p gnus-summary-buffer))
22696              (car (cdr (assoc 'group gnus-buffer-configuration)))
22697            (car (cdr (assoc 'summary gnus-buffer-configuration))))
22698          (vertical ((user-position . t) (top . 1) (left . 1)
22699                     (name . "Message"))
22700                    (message 1.0 point))))
22701 @end lisp
22702
22703 @findex gnus-add-configuration
22704 Since the @code{gnus-buffer-configuration} variable is so long and
22705 complicated, there's a function you can use to ease changing the config
22706 of a single setting: @code{gnus-add-configuration}.  If, for instance,
22707 you want to change the @code{article} setting, you could say:
22708
22709 @lisp
22710 (gnus-add-configuration
22711  '(article (vertical 1.0
22712                (group 4)
22713                (summary .25 point)
22714                (article 1.0))))
22715 @end lisp
22716
22717 You'd typically stick these @code{gnus-add-configuration} calls in your
22718 @file{~/.gnus.el} file or in some startup hook---they should be run after
22719 Gnus has been loaded.
22720
22721 @vindex gnus-always-force-window-configuration
22722 If all windows mentioned in the configuration are already visible, Gnus
22723 won't change the window configuration.  If you always want to force the
22724 ``right'' window configuration, you can set
22725 @code{gnus-always-force-window-configuration} to non-@code{nil}.
22726
22727 If you're using tree displays (@pxref{Tree Display}), and the tree
22728 window is displayed vertically next to another window, you may also want
22729 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
22730 windows resized.
22731
22732 @subsection Example Window Configurations
22733
22734 @itemize @bullet
22735 @item
22736 Narrow left hand side occupied by group buffer.  Right hand side split
22737 between summary buffer (top one-sixth) and article buffer (bottom).
22738
22739 @ifinfo
22740 @example
22741 +---+---------+
22742 | G | Summary |
22743 | r +---------+
22744 | o |         |
22745 | u | Article |
22746 | p |         |
22747 +---+---------+
22748 @end example
22749 @end ifinfo
22750
22751 @lisp
22752 (gnus-add-configuration
22753  '(article
22754    (horizontal 1.0
22755                (vertical 25 (group 1.0))
22756                (vertical 1.0
22757                          (summary 0.16 point)
22758                          (article 1.0)))))
22759
22760 (gnus-add-configuration
22761  '(summary
22762    (horizontal 1.0
22763                (vertical 25 (group 1.0))
22764                (vertical 1.0 (summary 1.0 point)))))
22765 @end lisp
22766
22767 @end itemize
22768
22769
22770 @node Faces and Fonts
22771 @section Faces and Fonts
22772 @cindex faces
22773 @cindex fonts
22774 @cindex colors
22775
22776 Fiddling with fonts and faces used to be very difficult, but these days
22777 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
22778 the face you want to alter, and alter it via the standard Customize
22779 interface.
22780
22781
22782 @node Compilation
22783 @section Compilation
22784 @cindex compilation
22785 @cindex byte-compilation
22786
22787 @findex gnus-compile
22788
22789 Remember all those line format specification variables?
22790 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
22791 on.  Now, Gnus will of course heed whatever these variables are, but,
22792 unfortunately, changing them will mean a quite significant slow-down.
22793 (The default values of these variables have byte-compiled functions
22794 associated with them, while the user-generated versions do not, of
22795 course.)
22796
22797 To help with this, you can run @kbd{M-x gnus-compile} after you've
22798 fiddled around with the variables and feel that you're (kind of)
22799 satisfied.  This will result in the new specs being byte-compiled, and
22800 you'll get top speed again.  Gnus will save these compiled specs in the
22801 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
22802 this function, though---you should compile them yourself by sticking
22803 them into the @file{~/.gnus.el} file and byte-compiling that file.)
22804
22805
22806 @node Mode Lines
22807 @section Mode Lines
22808 @cindex mode lines
22809
22810 @vindex gnus-updated-mode-lines
22811 @code{gnus-updated-mode-lines} says what buffers should keep their mode
22812 lines updated.  It is a list of symbols.  Supported symbols include
22813 @code{group}, @code{article}, @code{summary}, @code{server},
22814 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
22815 Gnus will keep that mode line updated with information that may be
22816 pertinent.  If this variable is @code{nil}, screen refresh may be
22817 quicker.
22818
22819 @cindex display-time
22820
22821 @vindex gnus-mode-non-string-length
22822 By default, Gnus displays information on the current article in the mode
22823 lines of the summary and article buffers.  The information Gnus wishes
22824 to display (e.g. the subject of the article) is often longer than the
22825 mode lines, and therefore have to be cut off at some point.  The
22826 @code{gnus-mode-non-string-length} variable says how long the other
22827 elements on the line is (i.e., the non-info part).  If you put
22828 additional elements on the mode line (e.g. a clock), you should modify
22829 this variable:
22830
22831 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
22832 @lisp
22833 (add-hook 'display-time-hook
22834           (lambda () (setq gnus-mode-non-string-length
22835                            (+ 21
22836                               (if line-number-mode 5 0)
22837                               (if column-number-mode 4 0)
22838                               (length display-time-string)))))
22839 @end lisp
22840
22841 If this variable is @code{nil} (which is the default), the mode line
22842 strings won't be chopped off, and they won't be padded either.  Note
22843 that the default is unlikely to be desirable, as even the percentage
22844 complete in the buffer may be crowded off the mode line; the user should
22845 configure this variable appropriately for her configuration.
22846
22847
22848 @node Highlighting and Menus
22849 @section Highlighting and Menus
22850 @cindex visual
22851 @cindex highlighting
22852 @cindex menus
22853
22854 @vindex gnus-visual
22855 The @code{gnus-visual} variable controls most of the Gnus-prettifying
22856 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
22857 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
22858 file.
22859
22860 This variable can be a list of visual properties that are enabled.  The
22861 following elements are valid, and are all included by default:
22862
22863 @table @code
22864 @item group-highlight
22865 Do highlights in the group buffer.
22866 @item summary-highlight
22867 Do highlights in the summary buffer.
22868 @item article-highlight
22869 Do highlights in the article buffer.
22870 @item highlight
22871 Turn on highlighting in all buffers.
22872 @item group-menu
22873 Create menus in the group buffer.
22874 @item summary-menu
22875 Create menus in the summary buffers.
22876 @item article-menu
22877 Create menus in the article buffer.
22878 @item browse-menu
22879 Create menus in the browse buffer.
22880 @item server-menu
22881 Create menus in the server buffer.
22882 @item score-menu
22883 Create menus in the score buffers.
22884 @item menu
22885 Create menus in all buffers.
22886 @end table
22887
22888 So if you only want highlighting in the article buffer and menus in all
22889 buffers, you could say something like:
22890
22891 @lisp
22892 (setq gnus-visual '(article-highlight menu))
22893 @end lisp
22894
22895 If you want highlighting only and no menus whatsoever, you'd say:
22896
22897 @lisp
22898 (setq gnus-visual '(highlight))
22899 @end lisp
22900
22901 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
22902 in all Gnus buffers.
22903
22904 Other general variables that influence the look of all buffers include:
22905
22906 @table @code
22907 @item gnus-mouse-face
22908 @vindex gnus-mouse-face
22909 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
22910 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
22911
22912 @end table
22913
22914 There are hooks associated with the creation of all the different menus:
22915
22916 @table @code
22917
22918 @item gnus-article-menu-hook
22919 @vindex gnus-article-menu-hook
22920 Hook called after creating the article mode menu.
22921
22922 @item gnus-group-menu-hook
22923 @vindex gnus-group-menu-hook
22924 Hook called after creating the group mode menu.
22925
22926 @item gnus-summary-menu-hook
22927 @vindex gnus-summary-menu-hook
22928 Hook called after creating the summary mode menu.
22929
22930 @item gnus-server-menu-hook
22931 @vindex gnus-server-menu-hook
22932 Hook called after creating the server mode menu.
22933
22934 @item gnus-browse-menu-hook
22935 @vindex gnus-browse-menu-hook
22936 Hook called after creating the browse mode menu.
22937
22938 @item gnus-score-menu-hook
22939 @vindex gnus-score-menu-hook
22940 Hook called after creating the score mode menu.
22941
22942 @end table
22943
22944
22945 @node Buttons
22946 @section Buttons
22947 @cindex buttons
22948 @cindex mouse
22949 @cindex click
22950
22951 Those new-fangled @dfn{mouse} contraptions is very popular with the
22952 young, hep kids who don't want to learn the proper way to do things
22953 these days.  Why, I remember way back in the summer of '89, when I was
22954 using Emacs on a Tops 20 system.  Three hundred users on one single
22955 machine, and every user was running Simula compilers.  Bah!
22956
22957 Right.
22958
22959 @vindex gnus-carpal
22960 Well, you can make Gnus display bufferfuls of buttons you can click to
22961 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
22962 really.  Tell the chiropractor I sent you.
22963
22964
22965 @table @code
22966
22967 @item gnus-carpal-mode-hook
22968 @vindex gnus-carpal-mode-hook
22969 Hook run in all carpal mode buffers.
22970
22971 @item gnus-carpal-button-face
22972 @vindex gnus-carpal-button-face
22973 Face used on buttons.
22974
22975 @item gnus-carpal-header-face
22976 @vindex gnus-carpal-header-face
22977 Face used on carpal buffer headers.
22978
22979 @item gnus-carpal-group-buffer-buttons
22980 @vindex gnus-carpal-group-buffer-buttons
22981 Buttons in the group buffer.
22982
22983 @item gnus-carpal-summary-buffer-buttons
22984 @vindex gnus-carpal-summary-buffer-buttons
22985 Buttons in the summary buffer.
22986
22987 @item gnus-carpal-server-buffer-buttons
22988 @vindex gnus-carpal-server-buffer-buttons
22989 Buttons in the server buffer.
22990
22991 @item gnus-carpal-browse-buffer-buttons
22992 @vindex gnus-carpal-browse-buffer-buttons
22993 Buttons in the browse buffer.
22994 @end table
22995
22996 All the @code{buttons} variables are lists.  The elements in these list
22997 are either cons cells where the @code{car} contains a text to be displayed and
22998 the @code{cdr} contains a function symbol, or a simple string.
22999
23000
23001 @node Daemons
23002 @section Daemons
23003 @cindex demons
23004 @cindex daemons
23005
23006 Gnus, being larger than any program ever written (allegedly), does lots
23007 of strange stuff that you may wish to have done while you're not
23008 present.  For instance, you may want it to check for new mail once in a
23009 while.  Or you may want it to close down all connections to all servers
23010 when you leave Emacs idle.  And stuff like that.
23011
23012 Gnus will let you do stuff like that by defining various
23013 @dfn{handlers}.  Each handler consists of three elements:  A
23014 @var{function}, a @var{time}, and an @var{idle} parameter.
23015
23016 Here's an example of a handler that closes connections when Emacs has
23017 been idle for thirty minutes:
23018
23019 @lisp
23020 (gnus-demon-close-connections nil 30)
23021 @end lisp
23022
23023 Here's a handler that scans for @acronym{PGP} headers every hour when
23024 Emacs is idle:
23025
23026 @lisp
23027 (gnus-demon-scan-pgp 60 t)
23028 @end lisp
23029
23030 This @var{time} parameter and that @var{idle} parameter work together
23031 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23032 @code{nil}, then the function will be called every @var{time} minutes.
23033
23034 If @var{idle} is @code{t}, then the function will be called after
23035 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23036 the function will never be called.  But once Emacs goes idle, the
23037 function will be called every @var{time} minutes.
23038
23039 If @var{idle} is a number and @var{time} is a number, the function will
23040 be called every @var{time} minutes only when Emacs has been idle for
23041 @var{idle} minutes.
23042
23043 If @var{idle} is a number and @var{time} is @code{nil}, the function
23044 will be called once every time Emacs has been idle for @var{idle}
23045 minutes.
23046
23047 And if @var{time} is a string, it should look like @samp{07:31}, and
23048 the function will then be called once every day somewhere near that
23049 time.  Modified by the @var{idle} parameter, of course.
23050
23051 @vindex gnus-demon-timestep
23052 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23053 seconds.  This is 60 by default.  If you change that variable,
23054 all the timings in the handlers will be affected.)
23055
23056 So, if you want to add a handler, you could put something like this in
23057 your @file{~/.gnus.el} file:
23058
23059 @findex gnus-demon-add-handler
23060 @lisp
23061 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23062 @end lisp
23063
23064 @findex gnus-demon-add-nocem
23065 @findex gnus-demon-add-scanmail
23066 @findex gnus-demon-add-rescan
23067 @findex gnus-demon-add-scan-timestamps
23068 @findex gnus-demon-add-disconnection
23069 Some ready-made functions to do this have been created:
23070 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23071 @code{gnus-demon-add-nntp-close-connection},
23072 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23073 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23074 @file{~/.gnus.el} if you want those abilities.
23075
23076 @findex gnus-demon-init
23077 @findex gnus-demon-cancel
23078 @vindex gnus-demon-handlers
23079 If you add handlers to @code{gnus-demon-handlers} directly, you should
23080 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23081 daemons, you can use the @code{gnus-demon-cancel} function.
23082
23083 Note that adding daemons can be pretty naughty if you over do it.  Adding
23084 functions that scan all news and mail from all servers every two seconds
23085 is a sure-fire way of getting booted off any respectable system.  So
23086 behave.
23087
23088
23089 @node NoCeM
23090 @section NoCeM
23091 @cindex nocem
23092 @cindex spam
23093
23094 @dfn{Spamming} is posting the same article lots and lots of times.
23095 Spamming is bad.  Spamming is evil.
23096
23097 Spamming is usually canceled within a day or so by various anti-spamming
23098 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23099 NoCeM is pronounced ``no see-'em'', and means what the name
23100 implies---these are messages that make the offending articles, like, go
23101 away.
23102
23103 What use are these NoCeM messages if the articles are canceled anyway?
23104 Some sites do not honor cancel messages and some sites just honor cancels
23105 from a select few people.  Then you may wish to make use of the NoCeM
23106 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
23107
23108 Gnus can read and parse the messages in this group automatically, and
23109 this will make spam disappear.
23110
23111 There are some variables to customize, of course:
23112
23113 @table @code
23114 @item gnus-use-nocem
23115 @vindex gnus-use-nocem
23116 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23117 by default.
23118
23119 You can also set this variable to a positive number as a group level.
23120 In that case, Gnus scans NoCeM messages when checking new news if this
23121 value is not exceeding a group level that you specify as the prefix
23122 argument to some commands, e.g. @code{gnus},
23123 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23124 NoCeM messages if you specify a group level to those commands.  For
23125 example, if you use 1 or 2 on the mail groups and the levels on the news
23126 groups remain the default, 3 is the best choice.
23127
23128 @item gnus-nocem-groups
23129 @vindex gnus-nocem-groups
23130 Gnus will look for NoCeM messages in the groups in this list.  The
23131 default is
23132 @lisp
23133 ("news.lists.filters" "news.admin.net-abuse.bulletins"
23134  "alt.nocem.misc" "news.admin.net-abuse.announce")
23135 @end lisp
23136
23137 @item gnus-nocem-issuers
23138 @vindex gnus-nocem-issuers
23139 There are many people issuing NoCeM messages.  This list says what
23140 people you want to listen to.  The default is
23141 @lisp
23142 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
23143  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
23144 @end lisp
23145 fine, upstanding citizens all of them.
23146
23147 Known despammers that you can put in this list are listed at@*
23148 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23149
23150 You do not have to heed NoCeM messages from all these people---just the
23151 ones you want to listen to.  You also don't have to accept all NoCeM
23152 messages from the people you like.  Each NoCeM message has a @dfn{type}
23153 header that gives the message a (more or less, usually less) rigorous
23154 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23155 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23156 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23157 Each condition is either a string (which is a regexp that matches types
23158 you want to use) or a list on the form @code{(not @var{string})}, where
23159 @var{string} is a regexp that matches types you don't want to use.
23160
23161 For instance, if you want all NoCeM messages from Chris Lewis except his
23162 @samp{troll} messages, you'd say:
23163
23164 @lisp
23165 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23166 @end lisp
23167
23168 On the other hand, if you just want nothing but his @samp{spam} and
23169 @samp{spew} messages, you'd say:
23170
23171 @lisp
23172 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23173 @end lisp
23174
23175 The specs are applied left-to-right.
23176
23177
23178 @item gnus-nocem-verifyer
23179 @vindex gnus-nocem-verifyer
23180 @findex pgg-verify
23181 This should be a function for verifying that the NoCeM issuer is who she
23182 says she is.  The default is @code{pgg-verify}, which returns
23183 non-@code{nil} if the verification is successful, otherwise (including
23184 the case the NoCeM message was not signed) returns @code{nil}.  If this
23185 is too slow and you don't care for verification (which may be dangerous),
23186 you can set this variable to @code{nil}.
23187
23188 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23189 function.  While you can still use it, you can change it into
23190 @code{pgg-verify} running with GnuPG if you are willing to add the
23191 @acronym{PGP} public keys to GnuPG's keyring.
23192
23193 @item gnus-nocem-directory
23194 @vindex gnus-nocem-directory
23195 This is where Gnus will store its NoCeM cache files.  The default is@*
23196 @file{~/News/NoCeM/}.
23197
23198 @item gnus-nocem-expiry-wait
23199 @vindex gnus-nocem-expiry-wait
23200 The number of days before removing old NoCeM entries from the cache.
23201 The default is 15.  If you make it shorter Gnus will be faster, but you
23202 might then see old spam.
23203
23204 @item gnus-nocem-check-from
23205 @vindex gnus-nocem-check-from
23206 Non-@code{nil} means check for valid issuers in message bodies.
23207 Otherwise don't bother fetching articles unless their author matches a
23208 valid issuer; that is much faster if you are selective about the
23209 issuers.
23210
23211 @item gnus-nocem-check-article-limit
23212 @vindex gnus-nocem-check-article-limit
23213 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23214 group.  NoCeM groups can be huge and very slow to process.
23215
23216 @end table
23217
23218 Using NoCeM could potentially be a memory hog.  If you have many living
23219 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23220 big.  If this is a problem, you should kill off all (or most) of your
23221 unsubscribed groups (@pxref{Subscription Commands}).
23222
23223
23224 @node Undo
23225 @section Undo
23226 @cindex undo
23227
23228 It is very useful to be able to undo actions one has done.  In normal
23229 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23230 In Gnus buffers, however, it isn't that simple.
23231
23232 The things Gnus displays in its buffer is of no value whatsoever to
23233 Gnus---it's all just data designed to look nice to the user.
23234 Killing a group in the group buffer with @kbd{C-k} makes the line
23235 disappear, but that's just a side-effect of the real action---the
23236 removal of the group in question from the internal Gnus structures.
23237 Undoing something like that can't be done by the normal Emacs
23238 @code{undo} function.
23239
23240 Gnus tries to remedy this somewhat by keeping track of what the user
23241 does and coming up with actions that would reverse the actions the user
23242 takes.  When the user then presses the @code{undo} key, Gnus will run
23243 the code to reverse the previous action, or the previous actions.
23244 However, not all actions are easily reversible, so Gnus currently offers
23245 a few key functions to be undoable.  These include killing groups,
23246 yanking groups, and changing the list of read articles of groups.
23247 That's it, really.  More functions may be added in the future, but each
23248 added function means an increase in data to be stored, so Gnus will
23249 never be totally undoable.
23250
23251 @findex gnus-undo-mode
23252 @vindex gnus-use-undo
23253 @findex gnus-undo
23254 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
23255 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
23256 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
23257 command, which should feel kinda like the normal Emacs @code{undo}
23258 command.
23259
23260
23261 @node Predicate Specifiers
23262 @section Predicate Specifiers
23263 @cindex predicate specifiers
23264
23265 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
23266 form that allows flexible specification of predicates without having
23267 to type all that much.
23268
23269 These specifiers are lists consisting of functions, symbols and lists.
23270
23271 Here's an example:
23272
23273 @lisp
23274 (or gnus-article-unseen-p
23275     gnus-article-unread-p)
23276 @end lisp
23277
23278 The available symbols are @code{or}, @code{and} and @code{not}.  The
23279 functions all take one parameter.
23280
23281 @findex gnus-make-predicate
23282 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
23283 to create a function that can be called.  This input parameter to this
23284 function will be passed along to all the functions in the predicate
23285 specifier.
23286
23287
23288 @node Moderation
23289 @section Moderation
23290 @cindex moderation
23291
23292 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
23293 It is not included in the standard Gnus package.  Write a mail to
23294 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
23295 get a copy.
23296
23297 The moderation package is implemented as a minor mode for summary
23298 buffers.  Put
23299
23300 @lisp
23301 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
23302 @end lisp
23303
23304 in your @file{~/.gnus.el} file.
23305
23306 If you are the moderator of @samp{rec.zoofle}, this is how it's
23307 supposed to work:
23308
23309 @enumerate
23310 @item
23311 You split your incoming mail by matching on
23312 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
23313 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
23314
23315 @item
23316 You enter that group once in a while and post articles using the @kbd{e}
23317 (edit-and-post) or @kbd{s} (just send unedited) commands.
23318
23319 @item
23320 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
23321 articles that weren't approved by you, you can cancel them with the
23322 @kbd{c} command.
23323 @end enumerate
23324
23325 To use moderation mode in these two groups, say:
23326
23327 @lisp
23328 (setq gnus-moderated-list
23329       "^nnml:rec.zoofle$\\|^rec.zoofle$")
23330 @end lisp
23331
23332
23333 @node Fetching a Group
23334 @section Fetching a Group
23335 @cindex fetching a group
23336
23337 @findex gnus-fetch-group
23338 It is sometimes convenient to be able to just say ``I want to read this
23339 group and I don't care whether Gnus has been started or not''.  This is
23340 perhaps more useful for people who write code than for users, but the
23341 command @code{gnus-fetch-group} provides this functionality in any case.
23342 It takes the group name as a parameter.
23343
23344
23345 @node Image Enhancements
23346 @section Image Enhancements
23347
23348 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
23349 support images, Emacs 22 does.} and up, are able to display pictures and
23350 stuff, so Gnus has taken advantage of that.
23351
23352 @menu
23353 * X-Face::                      Display a funky, teensy black-and-white image.
23354 * Face::                        Display a funkier, teensier colored image.
23355 * Smileys::                     Show all those happy faces the way they were meant to be shown.
23356 * Picons::                      How to display pictures of what you're reading.
23357 * XVarious::                    Other XEmacsy Gnusey variables.
23358 @end menu
23359
23360
23361 @node X-Face
23362 @subsection X-Face
23363 @cindex x-face
23364
23365 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
23366 depth) image that's supposed to represent the author of the message.
23367 It seems to be supported by an ever-growing number of mail and news
23368 readers.
23369
23370 @cindex x-face
23371 @findex gnus-article-display-x-face
23372 @vindex gnus-article-x-face-command
23373 @vindex gnus-article-x-face-too-ugly
23374 @iftex
23375 @iflatex
23376 \include{xface}
23377 @end iflatex
23378 @end iftex
23379 @c @anchor{X-Face}
23380
23381 Viewing an @code{X-Face} header either requires an Emacs that has
23382 @samp{compface} support (which most XEmacs versions have), or that you
23383 have suitable conversion or display programs installed.  If your Emacs
23384 has image support the default action is to display the face before the
23385 @code{From} header.  If there's no native @code{X-Face} support, Gnus
23386 will try to convert the @code{X-Face} header using external programs
23387 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
23388 faster if XEmacs has been compiled with @code{X-Face} support.  The
23389 default action under Emacs without image support is to fork off the
23390 @code{display} program.
23391
23392 On a GNU/Linux system, the @code{display} program is included in the
23393 ImageMagick package.  For external conversion programs look for packages
23394 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
23395 On Windows, you may use the packages @code{netpbm} and @code{compface}
23396 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
23397 @code{bin} directory to your @code{PATH} environment variable.
23398 @c In fact only the following DLLs and binaries seem to be required:
23399 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
23400
23401 The variable @code{gnus-article-x-face-command} controls which programs
23402 are used to display the @code{X-Face} header.  If this variable is a
23403 string, this string will be executed in a sub-shell.  If it is a
23404 function, this function will be called with the face as the argument.
23405 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
23406 @code{From} header, the face will not be shown.
23407
23408 (Note: @code{x-face} is used in the variable/function names, not
23409 @code{xface}).
23410
23411 @noindent
23412 Face and variable:
23413
23414 @table @code
23415 @item gnus-x-face
23416 @vindex gnus-x-face
23417 Face to show X-Face.  The colors from this face are used as the
23418 foreground and background colors of the displayed X-Faces.  The
23419 default colors are black and white.
23420
23421 @item gnus-face-properties-alist
23422 @vindex gnus-face-properties-alist
23423 Alist of image types and properties applied to Face (@pxref{Face}) and
23424 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
23425 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
23426 XEmacs.  Here are examples:
23427
23428 @lisp
23429 ;; Specify the altitude of Face and X-Face images in the From header.
23430 (setq gnus-face-properties-alist
23431       '((pbm . (:face gnus-x-face :ascent 80))
23432         (png . (:ascent 80))))
23433
23434 ;; Show Face and X-Face images as pressed buttons.
23435 (setq gnus-face-properties-alist
23436       '((pbm . (:face gnus-x-face :relief -2))
23437         (png . (:relief -2))))
23438 @end lisp
23439
23440 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
23441 Reference Manual} for the valid properties for various image types.
23442 Currently, @code{pbm} is used for X-Face images and @code{png} is used
23443 for Face images in Emacs.  Only the @code{:face} property is effective
23444 on the @code{xface} image type in XEmacs if it is built with the
23445 @samp{libcompface} library.
23446 @end table
23447
23448 If you use posting styles, you can use an @code{x-face-file} entry in
23449 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
23450 provides a few convenience functions and variables to allow easier
23451 insertion of X-Face headers in outgoing messages.  You also need the
23452 above mentioned ImageMagick, netpbm or other image conversion packages
23453 (depending the values of the variables below) for these functions.
23454
23455 @findex gnus-random-x-face
23456 @vindex gnus-convert-pbm-to-x-face-command
23457 @vindex gnus-x-face-directory
23458 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
23459 @code{gnus-x-face-directory} and picks one at random, and then
23460 converts it to the X-Face format by using the
23461 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
23462 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
23463 header data as a string.
23464
23465 @findex gnus-insert-random-x-face-header
23466 @code{gnus-insert-random-x-face-header} calls
23467 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
23468 randomly generated data.
23469
23470 @findex gnus-x-face-from-file
23471 @vindex gnus-convert-image-to-x-face-command
23472 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
23473 converts the file to X-Face format by using the
23474 @code{gnus-convert-image-to-x-face-command} shell command.
23475
23476 Here's how you would typically use the first function.  Put something
23477 like the following in your @file{~/.gnus.el} file:
23478
23479 @lisp
23480 (setq message-required-news-headers
23481       (nconc message-required-news-headers
23482              (list '(X-Face . gnus-random-x-face))))
23483 @end lisp
23484
23485 Using the last function would be something like this:
23486
23487 @lisp
23488 (setq message-required-news-headers
23489       (nconc message-required-news-headers
23490              (list '(X-Face . (lambda ()
23491                                 (gnus-x-face-from-file
23492                                  "~/My-face.gif"))))))
23493 @end lisp
23494
23495
23496 @node Face
23497 @subsection Face
23498 @cindex face
23499
23500 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
23501
23502 @code{Face} headers are essentially a funkier version of @code{X-Face}
23503 ones. They describe a 48x48 pixel colored image that's supposed to
23504 represent the author of the message.
23505
23506 @cindex face
23507 @findex gnus-article-display-face
23508 The contents of a @code{Face} header must be a base64 encoded PNG image.
23509 See @uref{http://quimby.gnus.org/circus/face/} for the precise
23510 specifications.
23511
23512 The @code{gnus-face-properties-alist} variable affects the appearance of
23513 displayed Face images.  @xref{X-Face}.
23514
23515 Viewing an @code{Face} header requires an Emacs that is able to display
23516 PNG images.
23517 @c Maybe add this:
23518 @c (if (featurep 'xemacs)
23519 @c     (featurep 'png)
23520 @c   (image-type-available-p 'png))
23521
23522 Gnus provides a few convenience functions and variables to allow
23523 easier insertion of Face headers in outgoing messages.
23524
23525 @findex gnus-convert-png-to-face
23526 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
23527 726 bytes long, and converts it to a face.
23528
23529 @findex gnus-face-from-file
23530 @vindex gnus-convert-image-to-face-command
23531 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
23532 converts the file to Face format by using the
23533 @code{gnus-convert-image-to-face-command} shell command.
23534
23535 Here's how you would typically use this function. Put something like the
23536 following in your @file{~/.gnus.el} file:
23537
23538 @lisp
23539 (setq message-required-news-headers
23540       (nconc message-required-news-headers
23541              (list '(Face . (lambda ()
23542                               (gnus-face-from-file "~/face.jpg"))))))
23543 @end lisp
23544
23545
23546 @node Smileys
23547 @subsection Smileys
23548 @cindex smileys
23549
23550 @iftex
23551 @iflatex
23552 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
23553 \input{smiley}
23554 @end iflatex
23555 @end iftex
23556
23557 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
23558 currently the only package that uses Smiley, it is documented here.
23559
23560 In short---to use Smiley in Gnus, put the following in your
23561 @file{~/.gnus.el} file:
23562
23563 @lisp
23564 (setq gnus-treat-display-smileys t)
23565 @end lisp
23566
23567 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
23568 the like---to pictures and displays those instead of the text smiley
23569 faces.  The conversion is controlled by a list of regexps that matches
23570 text and maps that to file names.
23571
23572 @vindex smiley-regexp-alist
23573 The alist used is specified by the @code{smiley-regexp-alist}
23574 variable.  The first item in each element is the regexp to be matched;
23575 the second element is the regexp match group that is to be replaced by
23576 the picture; and the third element is the name of the file to be
23577 displayed.
23578
23579 The following variables customize the appearance of the smileys:
23580
23581 @table @code
23582
23583 @item smiley-style
23584 @vindex smiley-style
23585 Specifies the smiley style.  Predefined smiley styles include
23586 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
23587 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
23588 images, 14x14 pixel).  The default depends on the height of the default
23589 face.
23590
23591 @item smiley-data-directory
23592 @vindex smiley-data-directory
23593 Where Smiley will look for smiley faces files.  You shouldn't set this
23594 variable anymore.  Customize @code{smiley-style} instead.
23595
23596 @item gnus-smiley-file-types
23597 @vindex gnus-smiley-file-types
23598 List of suffixes on smiley file names to try.
23599
23600 @end table
23601
23602
23603 @node Picons
23604 @subsection Picons
23605
23606 @iftex
23607 @iflatex
23608 \include{picons}
23609 @end iflatex
23610 @end iftex
23611
23612 So@dots{}  You want to slow down your news reader even more!  This is a
23613 good way to do so.  It's also a great way to impress people staring
23614 over your shoulder as you read news.
23615
23616 What are Picons?  To quote directly from the Picons Web site:
23617
23618 @iftex
23619 @iflatex
23620 \margindex{}
23621 @end iflatex
23622 @end iftex
23623
23624 @quotation
23625 @dfn{Picons} is short for ``personal icons''.  They're small,
23626 constrained images used to represent users and domains on the net,
23627 organized into databases so that the appropriate image for a given
23628 e-mail address can be found.  Besides users and domains, there are picon
23629 databases for Usenet newsgroups and weather forecasts.  The picons are
23630 in either monochrome @code{XBM} format or color @code{XPM} and
23631 @code{GIF} formats.
23632 @end quotation
23633
23634 @vindex gnus-picon-databases
23635 For instructions on obtaining and installing the picons databases,
23636 point your Web browser at
23637 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
23638
23639 If you are using Debian GNU/Linux, saying @samp{apt-get install
23640 picons.*} will install the picons where Gnus can find them.
23641
23642 To enable displaying picons, simply make sure that
23643 @code{gnus-picon-databases} points to the directory containing the
23644 Picons databases.
23645
23646 @vindex gnus-picon-style
23647 The variable @code{gnus-picon-style} controls how picons are displayed.
23648 If @code{inline}, the textual representation is replaced.  If
23649 @code{right}, picons are added right to the textual representation.
23650
23651 The following variables offer control over where things are located.
23652
23653 @table @code
23654
23655 @item gnus-picon-databases
23656 @vindex gnus-picon-databases
23657 The location of the picons database.  This is a list of directories
23658 containing the @file{news}, @file{domains}, @file{users} (and so on)
23659 subdirectories.  Defaults to @code{("/usr/lib/picon"
23660 "/usr/local/faces")}.
23661
23662 @item gnus-picon-news-directories
23663 @vindex gnus-picon-news-directories
23664 List of subdirectories to search in @code{gnus-picon-databases} for
23665 newsgroups faces.  @code{("news")} is the default.
23666
23667 @item gnus-picon-user-directories
23668 @vindex gnus-picon-user-directories
23669 List of subdirectories to search in @code{gnus-picon-databases} for user
23670 faces.  @code{("users" "usenix" "local" "misc")} is the default.
23671
23672 @item gnus-picon-domain-directories
23673 @vindex gnus-picon-domain-directories
23674 List of subdirectories to search in @code{gnus-picon-databases} for
23675 domain name faces.  Defaults to @code{("domains")}.  Some people may
23676 want to add @samp{"unknown"} to this list.
23677
23678 @item gnus-picon-file-types
23679 @vindex gnus-picon-file-types
23680 Ordered list of suffixes on picon file names to try.  Defaults to
23681 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
23682
23683 @end table
23684
23685
23686 @node XVarious
23687 @subsection Various XEmacs Variables
23688
23689 @table @code
23690 @item gnus-xmas-glyph-directory
23691 @vindex gnus-xmas-glyph-directory
23692 This is where Gnus will look for pictures.  Gnus will normally
23693 auto-detect this directory, but you may set it manually if you have an
23694 unusual directory structure.
23695
23696 @item gnus-xmas-modeline-glyph
23697 @vindex gnus-xmas-modeline-glyph
23698 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
23699 default.
23700
23701 @end table
23702
23703 @subsubsection Toolbar
23704
23705 @table @code
23706
23707 @item gnus-use-toolbar
23708 @vindex gnus-use-toolbar
23709 This variable specifies the position to display the toolbar.  If
23710 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
23711 be one of the symbols @code{default}, @code{top}, @code{bottom},
23712 @code{right}, and @code{left}.  @code{default} means to use the default
23713 toolbar, the rest mean to display the toolbar on the place which those
23714 names show.  The default is @code{default}.
23715
23716 @item gnus-toolbar-thickness
23717 @vindex gnus-toolbar-thickness
23718 Cons of the height and the width specifying the thickness of a toolbar.
23719 The height is used for the toolbar displayed on the top or the bottom,
23720 the width is used for the toolbar displayed on the right or the left.
23721 The default is that of the default toolbar.
23722
23723 @item gnus-group-toolbar
23724 @vindex gnus-group-toolbar
23725 The toolbar in the group buffer.
23726
23727 @item gnus-summary-toolbar
23728 @vindex gnus-summary-toolbar
23729 The toolbar in the summary buffer.
23730
23731 @item gnus-summary-mail-toolbar
23732 @vindex gnus-summary-mail-toolbar
23733 The toolbar in the summary buffer of mail groups.
23734
23735 @end table
23736
23737 @iftex
23738 @iflatex
23739 \margindex{}
23740 @end iflatex
23741 @end iftex
23742
23743
23744 @node Fuzzy Matching
23745 @section Fuzzy Matching
23746 @cindex fuzzy matching
23747
23748 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
23749 things like scoring, thread gathering and thread comparison.
23750
23751 As opposed to regular expression matching, fuzzy matching is very fuzzy.
23752 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
23753 means, and the implementation has changed over time.
23754
23755 Basically, it tries to remove all noise from lines before comparing.
23756 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
23757 out of the strings before comparing the results.  This often leads to
23758 adequate results---even when faced with strings generated by text
23759 manglers masquerading as newsreaders.
23760
23761
23762 @node Thwarting Email Spam
23763 @section Thwarting Email Spam
23764 @cindex email spam
23765 @cindex spam
23766 @cindex UCE
23767 @cindex unsolicited commercial email
23768
23769 In these last days of the Usenet, commercial vultures are hanging about
23770 and grepping through news like crazy to find email addresses they can
23771 foist off their scams and products to.  As a reaction to this, many
23772 people have started putting nonsense addresses into their @code{From}
23773 lines.  I think this is counterproductive---it makes it difficult for
23774 people to send you legitimate mail in response to things you write, as
23775 well as making it difficult to see who wrote what.  This rewriting may
23776 perhaps be a bigger menace than the unsolicited commercial email itself
23777 in the end.
23778
23779 The biggest problem I have with email spam is that it comes in under
23780 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
23781 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
23782 mail group, only to find two pyramid schemes, seven advertisements
23783 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
23784 and one mail asking me to repent and find some god.
23785
23786 This is annoying.  Here's what you can do about it.
23787
23788 @menu
23789 * The problem of spam::         Some background, and some solutions
23790 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
23791 * SpamAssassin::                How to use external anti-spam tools.
23792 * Hashcash::                    Reduce spam by burning CPU time.
23793 @end menu
23794
23795 @node The problem of spam
23796 @subsection The problem of spam
23797 @cindex email spam
23798 @cindex spam filtering approaches
23799 @cindex filtering approaches, spam
23800 @cindex UCE
23801 @cindex unsolicited commercial email
23802
23803 First, some background on spam.
23804
23805 If you have access to e-mail, you are familiar with spam (technically
23806 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
23807 exists because e-mail delivery is very cheap compared to paper mail,
23808 so only a very small percentage of people need to respond to an UCE to
23809 make it worthwhile to the advertiser.  Ironically, one of the most
23810 common spams is the one offering a database of e-mail addresses for
23811 further spamming.  Senders of spam are usually called @emph{spammers},
23812 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
23813 @emph{morons} are in common use as well.
23814
23815 Spam comes from a wide variety of sources.  It is simply impossible to
23816 dispose of all spam without discarding useful messages.  A good
23817 example is the TMDA system, which requires senders
23818 unknown to you to confirm themselves as legitimate senders before
23819 their e-mail can reach you.  Without getting into the technical side
23820 of TMDA, a downside is clearly that e-mail from legitimate sources may
23821 be discarded if those sources can't or won't confirm themselves
23822 through the TMDA system.  Another problem with TMDA is that it
23823 requires its users to have a basic understanding of e-mail delivery
23824 and processing.
23825
23826 The simplest approach to filtering spam is filtering, at the mail
23827 server or when you sort through incoming mail.  If you get 200 spam
23828 messages per day from @samp{random-address@@vmadmin.com}, you block
23829 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
23830 discard all messages with @samp{VIAGRA} in the message.  If you get
23831 lots of spam from Bulgaria, for example, you try to filter all mail
23832 from Bulgarian IPs.
23833
23834 This, unfortunately, is a great way to discard legitimate e-mail.  The
23835 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
23836 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
23837 you should be obvious, so don't do it if you have the choice.
23838
23839 In another instance, the very informative and useful RISKS digest has
23840 been blocked by overzealous mail filters because it @strong{contained}
23841 words that were common in spam messages.  Nevertheless, in isolated
23842 cases, with great care, direct filtering of mail can be useful.
23843
23844 Another approach to filtering e-mail is the distributed spam
23845 processing, for instance DCC implements such a system.  In essence,
23846 @var{N} systems around the world agree that a machine @var{X} in
23847 Ghana, Estonia, or California is sending out spam e-mail, and these
23848 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
23849 database.  The criteria for spam detection vary---it may be the number
23850 of messages sent, the content of the messages, and so on.  When a user
23851 of the distributed processing system wants to find out if a message is
23852 spam, he consults one of those @var{N} systems.
23853
23854 Distributed spam processing works very well against spammers that send
23855 a large number of messages at once, but it requires the user to set up
23856 fairly complicated checks.  There are commercial and free distributed
23857 spam processing systems.  Distributed spam processing has its risks as
23858 well.  For instance legitimate e-mail senders have been accused of
23859 sending spam, and their web sites and mailing lists have been shut
23860 down for some time because of the incident.
23861
23862 The statistical approach to spam filtering is also popular.  It is
23863 based on a statistical analysis of previous spam messages.  Usually
23864 the analysis is a simple word frequency count, with perhaps pairs of
23865 words or 3-word combinations thrown into the mix.  Statistical
23866 analysis of spam works very well in most of the cases, but it can
23867 classify legitimate e-mail as spam in some cases.  It takes time to
23868 run the analysis, the full message must be analyzed, and the user has
23869 to store the database of spam analysis.  Statistical analysis on the
23870 server is gaining popularity.  This has the advantage of letting the
23871 user Just Read Mail, but has the disadvantage that it's harder to tell
23872 the server that it has misclassified mail.
23873
23874 Fighting spam is not easy, no matter what anyone says.  There is no
23875 magic switch that will distinguish Viagra ads from Mom's e-mails.
23876 Even people are having a hard time telling spam apart from non-spam,
23877 because spammers are actively looking to fool us into thinking they
23878 are Mom, essentially.  Spamming is irritating, irresponsible, and
23879 idiotic behavior from a bunch of people who think the world owes them
23880 a favor.  We hope the following sections will help you in fighting the
23881 spam plague.
23882
23883 @node Anti-Spam Basics
23884 @subsection Anti-Spam Basics
23885 @cindex email spam
23886 @cindex spam
23887 @cindex UCE
23888 @cindex unsolicited commercial email
23889
23890 One way of dealing with spam is having Gnus split out all spam into a
23891 @samp{spam} mail group (@pxref{Splitting Mail}).
23892
23893 First, pick one (1) valid mail address that you can be reached at, and
23894 put it in your @code{From} header of all your news articles.  (I've
23895 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
23896 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
23897 sysadmin whether your sendmail installation accepts keywords in the local
23898 part of the mail address.)
23899
23900 @lisp
23901 (setq message-default-news-headers
23902       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
23903 @end lisp
23904
23905 Then put the following split rule in @code{nnmail-split-fancy}
23906 (@pxref{Fancy Mail Splitting}):
23907
23908 @lisp
23909 (...
23910  (to "larsi@@trym.ifi.uio.no"
23911      (| ("subject" "re:.*" "misc")
23912         ("references" ".*@@.*" "misc")
23913         "spam"))
23914  ...)
23915 @end lisp
23916
23917 This says that all mail to this address is suspect, but if it has a
23918 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
23919 header, it's probably ok.  All the rest goes to the @samp{spam} group.
23920 (This idea probably comes from Tim Pierce.)
23921
23922 In addition, many mail spammers talk directly to your @acronym{SMTP} server
23923 and do not include your email address explicitly in the @code{To}
23924 header.  Why they do this is unknown---perhaps it's to thwart this
23925 thwarting scheme?  In any case, this is trivial to deal with---you just
23926 put anything not addressed to you in the @samp{spam} group by ending
23927 your fancy split rule in this way:
23928
23929 @lisp
23930 (
23931  ...
23932  (to "larsi" "misc")
23933  "spam")
23934 @end lisp
23935
23936 In my experience, this will sort virtually everything into the right
23937 group.  You still have to check the @samp{spam} group from time to time to
23938 check for legitimate mail, though.  If you feel like being a good net
23939 citizen, you can even send off complaints to the proper authorities on
23940 each unsolicited commercial email---at your leisure.
23941
23942 This works for me.  It allows people an easy way to contact me (they can
23943 just press @kbd{r} in the usual way), and I'm not bothered at all with
23944 spam.  It's a win-win situation.  Forging @code{From} headers to point
23945 to non-existent domains is yucky, in my opinion.
23946
23947 Be careful with this approach.  Spammers are wise to it.
23948
23949
23950 @node SpamAssassin
23951 @subsection SpamAssassin, Vipul's Razor, DCC, etc
23952 @cindex SpamAssassin
23953 @cindex Vipul's Razor
23954 @cindex DCC
23955
23956 The days where the hints in the previous section were sufficient in
23957 avoiding spam are coming to an end.  There are many tools out there
23958 that claim to reduce the amount of spam you get.  This section could
23959 easily become outdated fast, as new products replace old, but
23960 fortunately most of these tools seem to have similar interfaces.  Even
23961 though this section will use SpamAssassin as an example, it should be
23962 easy to adapt it to most other tools.
23963
23964 Note that this section does not involve the @code{spam.el} package,
23965 which is discussed in the next section.  If you don't care for all
23966 the features of @code{spam.el}, you can make do with these simple
23967 recipes.
23968
23969 If the tool you are using is not installed on the mail server, you
23970 need to invoke it yourself.  Ideas on how to use the
23971 @code{:postscript} mail source parameter (@pxref{Mail Source
23972 Specifiers}) follow.
23973
23974 @lisp
23975 (setq mail-sources
23976       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
23977         (pop :user "jrl"
23978              :server "pophost"
23979              :postscript
23980              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
23981 @end lisp
23982
23983 Once you manage to process your incoming spool somehow, thus making
23984 the mail contain e.g.@: a header indicating it is spam, you are ready to
23985 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
23986
23987 @lisp
23988 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
23989                              ...))
23990 @end lisp
23991
23992 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
23993
23994 @lisp
23995 (setq nnmail-split-methods 'nnmail-split-fancy
23996       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
23997                              ...))
23998 @end lisp
23999
24000 Some people might not like the idea of piping the mail through various
24001 programs using a @code{:prescript} (if some program is buggy, you
24002 might lose all mail).  If you are one of them, another solution is to
24003 call the external tools during splitting.  Example fancy split method:
24004
24005 @lisp
24006 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24007                              ...))
24008 (defun kevin-spamassassin ()
24009   (save-excursion
24010     (save-restriction
24011       (widen)
24012       (if (eq 1 (call-process-region (point-min) (point-max)
24013                                      "spamc" nil nil nil "-c"))
24014           "spam"))))
24015 @end lisp
24016
24017 Note that with the nnimap back end, message bodies will not be
24018 downloaded by default.  You need to set
24019 @code{nnimap-split-download-body} to @code{t} to do that
24020 (@pxref{Splitting in IMAP}).
24021
24022 That is about it.  As some spam is likely to get through anyway, you
24023 might want to have a nifty function to call when you happen to read
24024 spam.  And here is the nifty function:
24025
24026 @lisp
24027  (defun my-gnus-raze-spam ()
24028   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24029   (interactive)
24030   (gnus-summary-show-raw-article)
24031   (gnus-summary-save-in-pipe "razor-report -f -d")
24032   (gnus-summary-mark-as-expirable 1))
24033 @end lisp
24034
24035 @node Hashcash
24036 @subsection Hashcash
24037 @cindex hashcash
24038
24039 A novel technique to fight spam is to require senders to do something
24040 costly and demonstrably unique for each message they send.  This has
24041 the obvious drawback that you cannot rely on everyone in the world
24042 using this technique, since it is not part of the Internet standards,
24043 but it may be useful in smaller communities.
24044
24045 While the tools in the previous section work well in practice, they
24046 work only because the tools are constantly maintained and updated as
24047 new form of spam appears.  This means that a small percentage of spam
24048 will always get through.  It also means that somewhere, someone needs
24049 to read lots of spam to update these tools.  Hashcash avoids that, but
24050 instead prefers that everyone you contact through e-mail supports the
24051 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24052 The approaches have their own advantages and disadvantages, but as
24053 often in the real world, a combination of them is stronger than either
24054 one of them separately.
24055
24056 @cindex X-Hashcash
24057 The ``something costly'' is to burn CPU time, more specifically to
24058 compute a hash collision up to a certain number of bits.  The
24059 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24060 For more details, and for the external application @code{hashcash} you
24061 need to install to use this feature, see
24062 @uref{http://www.hashcash.org/}.  Even more information can be found
24063 at @uref{http://www.camram.org/}.
24064
24065 If you wish to generate hashcash for each message you send, you can
24066 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24067 Headers,message, The Message Manual}), as in:
24068
24069 @lisp
24070 (setq message-generate-hashcash t)
24071 @end lisp
24072
24073 You will need to set up some additional variables as well:
24074
24075 @table @code
24076
24077 @item hashcash-default-payment
24078 @vindex hashcash-default-payment
24079 This variable indicates the default number of bits the hash collision
24080 should consist of.  By default this is 20.  Suggested useful values
24081 include 17 to 29.
24082
24083 @item hashcash-payment-alist
24084 @vindex hashcash-payment-alist
24085 Some receivers may require you to spend burn more CPU time than the
24086 default.  This variable contains a list of @samp{(@var{addr}
24087 @var{amount})} cells, where @var{addr} is the receiver (email address
24088 or newsgroup) and @var{amount} is the number of bits in the collision
24089 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24090 @var{amount})} cells, where the @var{string} is the string to use
24091 (normally the email address or newsgroup name is used).
24092
24093 @item hashcash-path
24094 @vindex hashcash-path
24095 Where the @code{hashcash} binary is installed.  This variable should
24096 be automatically set by @code{executable-find}, but if it's @code{nil}
24097 (usually because the @code{hashcash} binary is not in your path)
24098 you'll get a warning when you check hashcash payments and an error
24099 when you generate hashcash payments.
24100
24101 @end table
24102
24103 Gnus can verify hashcash cookies, although this can also be done by
24104 hand customized mail filtering scripts.  To verify a hashcash cookie
24105 in a message, use the @code{mail-check-payment} function in the
24106 @code{hashcash.el} library.  You can also use the @code{spam.el}
24107 package with the @code{spam-use-hashcash} back end to validate hashcash
24108 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24109 Hashcash Payments}).
24110
24111 @node Spam Package
24112 @section Spam Package
24113 @cindex spam filtering
24114 @cindex spam
24115
24116 The Spam package provides Gnus with a centralized mechanism for
24117 detecting and filtering spam.  It filters new mail, and processes
24118 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24119 name used throughout this manual to indicate non-spam messages.)
24120
24121 @menu
24122 * Spam Package Introduction::
24123 * Filtering Incoming Mail::
24124 * Detecting Spam in Groups::
24125 * Spam and Ham Processors::
24126 * Spam Package Configuration Examples::
24127 * Spam Back Ends::
24128 * Extending the Spam package::
24129 * Spam Statistics Package::
24130 @end menu
24131
24132 @node Spam Package Introduction
24133 @subsection Spam Package Introduction
24134 @cindex spam filtering
24135 @cindex spam filtering sequence of events
24136 @cindex spam
24137
24138 You must read this section to understand how the Spam package works.
24139 Do not skip, speed-read, or glance through this section.
24140
24141 Make sure you read the section on the @code{spam.el} sequence of
24142 events.  See @xref{Extending the Spam package}.
24143
24144 @cindex spam-initialize
24145 @vindex spam-use-stat
24146 To use the Spam package, you @strong{must} first run the function
24147 @code{spam-initialize}:
24148
24149 @example
24150 (spam-initialize)
24151 @end example
24152
24153 This autoloads @code{spam.el} and installs the various hooks necessary
24154 to let the Spam package do its job.  In order to make use of the Spam
24155 package, you have to set up certain group parameters and variables,
24156 which we will describe below.  All of the variables controlling the
24157 Spam package can be found in the @samp{spam} customization group.
24158
24159 There are two ``contact points'' between the Spam package and the rest
24160 of Gnus: checking new mail for spam, and leaving a group.
24161
24162 Checking new mail for spam is done in one of two ways: while splitting
24163 incoming mail, or when you enter a group.
24164
24165 The first way, checking for spam while splitting incoming mail, is
24166 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24167 new mail appears in a single spool file.  The Spam package processes
24168 incoming mail, and sends mail considered to be spam to a designated
24169 ``spam'' group.  @xref{Filtering Incoming Mail}.
24170
24171 The second way is suited to back ends such as @code{nntp}, which have
24172 no incoming mail spool, or back ends where the server is in charge of
24173 splitting incoming mail.  In this case, when you enter a Gnus group,
24174 the unseen or unread messages in that group are checked for spam.
24175 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24176 Groups}.
24177
24178 @cindex spam back ends
24179 In either case, you have to tell the Spam package what method to use
24180 to detect spam messages.  There are several methods, or @dfn{spam back
24181 ends} (not to be confused with Gnus back ends!) to choose from: spam
24182 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24183 forth.  @xref{Spam Back Ends}.
24184
24185 In the Gnus summary buffer, messages that have been identified as spam
24186 always appear with a @samp{$} symbol.
24187
24188 The Spam package divides Gnus groups into three categories: ham
24189 groups, spam groups, and unclassified groups.  You should mark each of
24190 the groups you subscribe to as either a ham group or a spam group,
24191 using the @code{spam-contents} group parameter (@pxref{Group
24192 Parameters}).  Spam groups have a special property: when you enter a
24193 spam group, all unseen articles are marked as spam.  Thus, mail split
24194 into a spam group is automatically marked as spam.
24195
24196 Identifying spam messages is only half of the Spam package's job.  The
24197 second half comes into play whenever you exit a group buffer.  At this
24198 point, the Spam package does several things:
24199
24200 First, it calls @dfn{spam and ham processors} to process the articles
24201 according to whether they are spam or ham.  There is a pair of spam
24202 and ham processors associated with each spam back end, and what the
24203 processors do depends on the back end.  At present, the main role of
24204 spam and ham processors is for dictionary-based spam filters: they add
24205 the contents of the messages in the group to the filter's dictionary,
24206 to improve its ability to detect future spam.  The @code{spam-process}
24207 group parameter specifies what spam processors to use.  @xref{Spam and
24208 Ham Processors}.
24209
24210 If the spam filter failed to mark a spam message, you can mark it
24211 yourself, so that the message is processed as spam when you exit the
24212 group:
24213
24214 @table @kbd
24215 @item M-d
24216 @itemx M s x
24217 @itemx S x
24218 @kindex M-d
24219 @kindex S x
24220 @kindex M s x
24221 @findex gnus-summary-mark-as-spam
24222 @findex gnus-summary-mark-as-spam
24223 Mark current article as spam, showing it with the @samp{$} mark
24224 (@code{gnus-summary-mark-as-spam}).
24225 @end table
24226
24227 @noindent
24228 Similarly, you can unmark an article if it has been erroneously marked
24229 as spam.  @xref{Setting Marks}.
24230
24231 Normally, a ham message found in a non-ham group is not processed as
24232 ham---the rationale is that it should be moved into a ham group for
24233 further processing (see below).  However, you can force these articles
24234 to be processed as ham by setting
24235 @code{spam-process-ham-in-spam-groups} and
24236 @code{spam-process-ham-in-nonham-groups}.
24237
24238 @vindex gnus-ham-process-destinations
24239 @vindex gnus-spam-process-destinations
24240 The second thing that the Spam package does when you exit a group is
24241 to move ham articles out of spam groups, and spam articles out of ham
24242 groups.  Ham in a spam group is moved to the group specified by the
24243 variable @code{gnus-ham-process-destinations}, or the group parameter
24244 @code{ham-process-destination}.  Spam in a ham group is moved to the
24245 group specified by the variable @code{gnus-spam-process-destinations},
24246 or the group parameter @code{spam-process-destination}.  If these
24247 variables are not set, the articles are left in their current group.
24248 If an article cannot be moved (e.g., with a read-only backend such
24249 as @acronym{NNTP}), it is copied.
24250
24251 If an article is moved to another group, it is processed again when
24252 you visit the new group.  Normally, this is not a problem, but if you
24253 want each article to be processed only once, load the
24254 @code{gnus-registry.el} package and set the variable
24255 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
24256 Configuration Examples}.
24257
24258 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
24259 However, if you set @code{spam-move-spam-nonspam-groups-only} to
24260 @code{nil}, spam will also be moved out of spam groups, depending on
24261 the @code{spam-process-destination} parameter.
24262
24263 The final thing the Spam package does is to mark spam articles as
24264 expired, which is usually the right thing to do.
24265
24266 If all this seems confusing, don't worry.  Soon it will be as natural
24267 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
24268 50 years in the future yet.  Just trust us, it's not so bad.
24269
24270 @node Filtering Incoming Mail
24271 @subsection Filtering Incoming Mail
24272 @cindex spam filtering
24273 @cindex spam filtering incoming mail
24274 @cindex spam
24275
24276 To use the Spam package to filter incoming mail, you must first set up
24277 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
24278 defines a special splitting function that you can add to your fancy
24279 split variable (either @code{nnmail-split-fancy} or
24280 @code{nnimap-split-fancy}, depending on your mail back end):
24281
24282 @example
24283 (: spam-split)
24284 @end example
24285
24286 @vindex spam-split-group
24287 @noindent
24288 The @code{spam-split} function scans incoming mail according to your
24289 chosen spam back end(s), and sends messages identified as spam to a
24290 spam group.  By default, the spam group is a group named @samp{spam},
24291 but you can change this by customizing @code{spam-split-group}.  Make
24292 sure the contents of @code{spam-split-group} are an unqualified group
24293 name.  For instance, in an @code{nnimap} server @samp{your-server},
24294 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
24295 @samp{nnimap+server:spam} is therefore wrong---it gives the group
24296 @samp{nnimap+your-server:nnimap+server:spam}.
24297
24298 @code{spam-split} does not modify the contents of messages in any way.
24299
24300 @vindex nnimap-split-download-body
24301 Note for IMAP users: if you use the @code{spam-check-bogofilter},
24302 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
24303 you should also set set the variable @code{nnimap-split-download-body}
24304 to @code{t}.  These spam back ends are most useful when they can
24305 ``scan'' the full message body.  By default, the nnimap back end only
24306 retrieves the message headers; @code{nnimap-split-download-body} tells
24307 it to retrieve the message bodies as well.  We don't set this by
24308 default because it will slow @acronym{IMAP} down, and that is not an
24309 appropriate decision to make on behalf of the user.  @xref{Splitting
24310 in IMAP}.
24311
24312 You have to specify one or more spam back ends for @code{spam-split}
24313 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
24314 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
24315 you enabled in this way.  However, you can tell @code{spam-split} to
24316 use only some of them.  Why this is useful?  Suppose you are using the
24317 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
24318 ends, and the following split rule:
24319
24320 @example
24321  nnimap-split-fancy '(|
24322                       (any "ding" "ding")
24323                       (: spam-split)
24324                       ;; @r{default mailbox}
24325                       "mail")
24326 @end example
24327
24328 @noindent
24329 The problem is that you want all ding messages to make it to the ding
24330 folder.  But that will let obvious spam (for example, spam detected by
24331 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
24332 sent to the ding list.  On the other hand, some messages to the ding
24333 list are from a mail server in the blackhole list, so the invocation
24334 of @code{spam-split} can't be before the ding rule.
24335
24336 The solution is to let SpamAssassin headers supersede ding rules, and
24337 perform the other @code{spam-split} rules (including a second
24338 invocation of the regex-headers check) after the ding rule.  This is
24339 done by passing a parameter to @code{spam-split}:
24340
24341 @example
24342 nnimap-split-fancy
24343       '(|
24344         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
24345         (: spam-split "regex-spam" 'spam-use-regex-headers)
24346         (any "ding" "ding")
24347         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
24348         (: spam-split)
24349         ;; @r{default mailbox}
24350         "mail")
24351 @end example
24352
24353 @noindent
24354 This lets you invoke specific @code{spam-split} checks depending on
24355 your particular needs, and target the results of those checks to a
24356 particular spam group.  You don't have to throw all mail into all the
24357 spam tests.  Another reason why this is nice is that messages to
24358 mailing lists you have rules for don't have to have resource-intensive
24359 blackhole checks performed on them.  You could also specify different
24360 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
24361
24362 You should set the @code{spam-use-*} variables for whatever spam back
24363 ends you intend to use.  The reason is that when loading
24364 @file{spam.el}, some conditional loading is done depending on what
24365 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
24366
24367 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
24368 @c statistical databases.  Some have that functionality built-in, others
24369 @c don't.}
24370
24371 @node Detecting Spam in Groups
24372 @subsection Detecting Spam in Groups
24373
24374 To detect spam when visiting a group, set the group's
24375 @code{spam-autodetect} and @code{spam-autodetect-methods} group
24376 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
24377 usual (@pxref{Group Parameters}).
24378
24379 You should set the @code{spam-use-*} variables for whatever spam back
24380 ends you intend to use.  The reason is that when loading
24381 @file{spam.el}, some conditional loading is done depending on what
24382 @code{spam-use-xyz} variables you have set.
24383
24384 By default, only unseen articles are processed for spam.  You can
24385 force Gnus to recheck all messages in the group by setting the
24386 variable @code{spam-autodetect-recheck-messages} to @code{t}.
24387
24388 If you use the @code{spam-autodetect} method of checking for spam, you
24389 can specify different spam detection methods for different groups.
24390 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
24391 the autodetection method, while the @samp{suspect} group may have the
24392 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
24393 enabled.  Unlike with @code{spam-split}, you don't have any control
24394 over the @emph{sequence} of checks, but this is probably unimportant.
24395
24396 @node Spam and Ham Processors
24397 @subsection Spam and Ham Processors
24398 @cindex spam filtering
24399 @cindex spam filtering variables
24400 @cindex spam variables
24401 @cindex spam
24402
24403 @vindex gnus-spam-process-newsgroups
24404 Spam and ham processors specify special actions to take when you exit
24405 a group buffer.  Spam processors act on spam messages, and ham
24406 processors on ham messages.  At present, the main role of these
24407 processors is to update the dictionaries of dictionary-based spam back
24408 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
24409 package (@pxref{Spam Statistics Filtering}).
24410
24411 The spam and ham processors that apply to each group are determined by
24412 the group's@code{spam-process} group parameter.  If this group
24413 parameter is not defined, they are determined by the variable
24414 @code{gnus-spam-process-newsgroups}.
24415
24416 @vindex gnus-spam-newsgroup-contents
24417 Gnus learns from the spam you get.  You have to collect your spam in
24418 one or more spam groups, and set or customize the variable
24419 @code{spam-junk-mailgroups} as appropriate.  You can also declare
24420 groups to contain spam by setting their group parameter
24421 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
24422 by customizing the corresponding variable
24423 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
24424 parameter and the @code{gnus-spam-newsgroup-contents} variable can
24425 also be used to declare groups as @emph{ham} groups if you set their
24426 classification to @code{gnus-group-spam-classification-ham}.  If
24427 groups are not classified by means of @code{spam-junk-mailgroups},
24428 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
24429 considered @emph{unclassified}.  All groups are unclassified by
24430 default.
24431
24432 @vindex gnus-spam-mark
24433 @cindex $
24434 In spam groups, all messages are considered to be spam by default:
24435 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
24436 group.  If you have seen a message, had it marked as spam, then
24437 unmarked it, it won't be marked as spam when you enter the group
24438 thereafter.  You can disable that behavior, so all unread messages
24439 will get the @samp{$} mark, if you set the
24440 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
24441 should remove the @samp{$} mark when you are in the group summary
24442 buffer for every message that is not spam after all.  To remove the
24443 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
24444 @kbd{d} for declaring it read the non-spam way.  When you leave a
24445 group, all spam-marked (@samp{$}) articles are sent to a spam
24446 processor which will study them as spam samples.
24447
24448 Messages may also be deleted in various other ways, and unless
24449 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
24450 and @samp{r} for default read or explicit delete, marks @samp{X} and
24451 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
24452 low scores, are all considered to be associated with articles which
24453 are not spam.  This assumption might be false, in particular if you
24454 use kill files or score files as means for detecting genuine spam, you
24455 should then adjust the @code{ham-marks} group parameter.
24456
24457 @defvar ham-marks
24458 You can customize this group or topic parameter to be the list of
24459 marks you want to consider ham.  By default, the list contains the
24460 deleted, read, killed, kill-filed, and low-score marks (the idea is
24461 that these articles have been read, but are not spam).  It can be
24462 useful to also include the tick mark in the ham marks.  It is not
24463 recommended to make the unread mark a ham mark, because it normally
24464 indicates a lack of classification.  But you can do it, and we'll be
24465 happy for you.
24466 @end defvar
24467
24468 @defvar spam-marks
24469 You can customize this group or topic parameter to be the list of
24470 marks you want to consider spam.  By default, the list contains only
24471 the spam mark.  It is not recommended to change that, but you can if
24472 you really want to.
24473 @end defvar
24474
24475 When you leave @emph{any} group, regardless of its
24476 @code{spam-contents} classification, all spam-marked articles are sent
24477 to a spam processor, which will study these as spam samples.  If you
24478 explicit kill a lot, you might sometimes end up with articles marked
24479 @samp{K} which you never saw, and which might accidentally contain
24480 spam.  Best is to make sure that real spam is marked with @samp{$},
24481 and nothing else.
24482
24483 @vindex gnus-ham-process-destinations
24484 When you leave a @emph{spam} group, all spam-marked articles are
24485 marked as expired after processing with the spam processor.  This is
24486 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
24487 @strong{ham} articles in a spam group will be moved to a location
24488 determined by either the @code{ham-process-destination} group
24489 parameter or a match in the @code{gnus-ham-process-destinations}
24490 variable, which is a list of regular expressions matched with group
24491 names (it's easiest to customize this variable with @kbd{M-x
24492 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
24493 group name list is a standard Lisp list, if you prefer to customize
24494 the variable manually.  If the @code{ham-process-destination}
24495 parameter is not set, ham articles are left in place.  If the
24496 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
24497 set, the ham articles are marked as unread before being moved.
24498
24499 If ham can not be moved---because of a read-only back end such as
24500 @acronym{NNTP}, for example, it will be copied.
24501
24502 Note that you can use multiples destinations per group or regular
24503 expression!  This enables you to send your ham to a regular mail
24504 group and to a @emph{ham training} group.
24505
24506 When you leave a @emph{ham} group, all ham-marked articles are sent to
24507 a ham processor, which will study these as non-spam samples.
24508
24509 @vindex spam-process-ham-in-spam-groups
24510 By default the variable @code{spam-process-ham-in-spam-groups} is
24511 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
24512 to be processed.  Normally this is not done, you are expected instead
24513 to send your ham to a ham group and process it there.
24514
24515 @vindex spam-process-ham-in-nonham-groups
24516 By default the variable @code{spam-process-ham-in-nonham-groups} is
24517 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
24518 or unclassified) groups to be processed.  Normally this is not done,
24519 you are expected instead to send your ham to a ham group and process
24520 it there.
24521
24522 @vindex gnus-spam-process-destinations
24523 When you leave a @emph{ham} or @emph{unclassified} group, all
24524 @strong{spam} articles are moved to a location determined by either
24525 the @code{spam-process-destination} group parameter or a match in the
24526 @code{gnus-spam-process-destinations} variable, which is a list of
24527 regular expressions matched with group names (it's easiest to
24528 customize this variable with @kbd{M-x customize-variable @key{RET}
24529 gnus-spam-process-destinations}).  Each group name list is a standard
24530 Lisp list, if you prefer to customize the variable manually.  If the
24531 @code{spam-process-destination} parameter is not set, the spam
24532 articles are only expired.  The group name is fully qualified, meaning
24533 that if you see @samp{nntp:servername} before the group name in the
24534 group buffer then you need it here as well.
24535
24536 If spam can not be moved---because of a read-only back end such as
24537 @acronym{NNTP}, for example, it will be copied.
24538
24539 Note that you can use multiples destinations per group or regular
24540 expression!  This enables you to send your spam to multiple @emph{spam
24541 training} groups.
24542
24543 @vindex spam-log-to-registry
24544 The problem with processing ham and spam is that Gnus doesn't track
24545 this processing by default.  Enable the @code{spam-log-to-registry}
24546 variable so @code{spam.el} will use @code{gnus-registry.el} to track
24547 what articles have been processed, and avoid processing articles
24548 multiple times.  Keep in mind that if you limit the number of registry
24549 entries, this won't work as well as it does without a limit.
24550
24551 @vindex spam-mark-only-unseen-as-spam
24552 Set this variable if you want only unseen articles in spam groups to
24553 be marked as spam.  By default, it is set.  If you set it to
24554 @code{nil}, unread articles will also be marked as spam.
24555
24556 @vindex spam-mark-ham-unread-before-move-from-spam-group
24557 Set this variable if you want ham to be unmarked before it is moved
24558 out of the spam group.  This is very useful when you use something
24559 like the tick mark @samp{!} to mark ham---the article will be placed
24560 in your @code{ham-process-destination}, unmarked as if it came fresh
24561 from the mail server.
24562
24563 @vindex spam-autodetect-recheck-messages
24564 When autodetecting spam, this variable tells @code{spam.el} whether
24565 only unseen articles or all unread articles should be checked for
24566 spam.  It is recommended that you leave it off.
24567
24568 @node Spam Package Configuration Examples
24569 @subsection Spam Package Configuration Examples
24570 @cindex spam filtering
24571 @cindex spam filtering configuration examples
24572 @cindex spam configuration examples
24573 @cindex spam
24574
24575 @subsubheading Ted's setup
24576
24577 From Ted Zlatanov <tzz@@lifelogs.com>.
24578 @example
24579 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
24580 ;; @r{see @file{gnus-registry.el} for more information}
24581 (gnus-registry-initialize)
24582 (spam-initialize)
24583
24584 (setq
24585  spam-log-to-registry t     ; @r{for spam autodetection}
24586  spam-use-BBDB t
24587  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
24588  ;; @r{all groups with @samp{spam} in the name contain spam}
24589  gnus-spam-newsgroup-contents
24590   '(("spam" gnus-group-spam-classification-spam))
24591  ;; @r{see documentation for these}
24592  spam-move-spam-nonspam-groups-only nil
24593  spam-mark-only-unseen-as-spam t
24594  spam-mark-ham-unread-before-move-from-spam-group t
24595  nnimap-split-rule 'nnimap-split-fancy
24596  ;; @r{understand what this does before you copy it to your own setup!}
24597  nnimap-split-fancy '(|
24598                       ;; @r{trace references to parents and put in their group}
24599                       (: gnus-registry-split-fancy-with-parent)
24600                       ;; @r{this will catch server-side SpamAssassin tags}
24601                       (: spam-split 'spam-use-regex-headers)
24602                       (any "ding" "ding")
24603                       ;; @r{note that spam by default will go to @samp{spam}}
24604                       (: spam-split)
24605                       ;; @r{default mailbox}
24606                       "mail"))
24607
24608 ;; @r{my parameters, set with @kbd{G p}}
24609
24610 ;; @r{all nnml groups, and all nnimap groups except}
24611 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
24612 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
24613 ;; @r{because it must have been detected manually}
24614
24615 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
24616
24617 ;; @r{all @acronym{NNTP} groups}
24618 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
24619 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
24620 ;; @r{send all spam to the training group}
24621  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
24622
24623 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
24624 ((spam-autodetect . t))
24625
24626 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
24627
24628 ;; @r{this is a spam group}
24629 ((spam-contents gnus-group-spam-classification-spam)
24630
24631  ;; @r{any spam (which happens when I enter for all unseen messages,}
24632  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
24633  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
24634
24635  (spam-process-destination "nnimap+mail.lifelogs.com:train")
24636
24637  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
24638  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
24639
24640  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
24641                           "nnimap+mail.lifelogs.com:trainham")
24642  ;; @r{in this group, only @samp{!} marks are ham}
24643  (ham-marks
24644   (gnus-ticked-mark))
24645  ;; @r{remembers senders in the blacklist on the way out---this is}
24646  ;; @r{definitely not needed, it just makes me feel better}
24647  (spam-process (gnus-group-spam-exit-processor-blacklist)))
24648
24649 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
24650 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
24651 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
24652
24653 @end example
24654
24655 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
24656 From Reiner Steib <reiner.steib@@gmx.de>.
24657
24658 My provider has set up bogofilter (in combination with @acronym{DCC}) on
24659 the mail server (@acronym{IMAP}).  Recognized spam goes to
24660 @samp{spam.detected}, the rest goes through the normal filter rules,
24661 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
24662 positives or negatives is done by copying or moving the article to
24663 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
24664 the server feeds those to bogofilter with the suitable ham or spam
24665 options and deletes them from the @samp{training.ham} and
24666 @samp{training.spam} folders.
24667
24668 With the following entries in @code{gnus-parameters}, @code{spam.el}
24669 does most of the job for me:
24670
24671 @lisp
24672    ("nnimap:spam\\.detected"
24673     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
24674     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
24675     (spam-contents gnus-group-spam-classification-spam))
24676    ("nnimap:\\(INBOX\\|other-folders\\)"
24677     (spam-process-destination . "nnimap:training.spam")
24678     (spam-contents gnus-group-spam-classification-ham))
24679 @end lisp
24680
24681 @itemize
24682
24683 @item @b{The Spam folder:}
24684
24685 In the folder @samp{spam.detected}, I have to check for false positives
24686 (i.e. legitimate mails, that were wrongly judged as spam by
24687 bogofilter or DCC).
24688
24689 Because of the @code{gnus-group-spam-classification-spam} entry, all
24690 messages are marked as spam (with @code{$}).  When I find a false
24691 positive, I mark the message with some other ham mark
24692 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
24693 those messages are copied to both groups, @samp{INBOX} (where I want
24694 to have the article) and @samp{training.ham} (for training bogofilter)
24695 and deleted from the @samp{spam.detected} folder.
24696
24697 The @code{gnus-article-sort-by-chars} entry simplifies detection of
24698 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
24699 have a similar size.  Grouping them by size (i.e. chars) makes finding
24700 other false positives easier.  (Of course worms aren't @i{spam}
24701 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
24702 an excellent tool for filtering those unwanted mails for me.)
24703
24704 @item @b{Ham folders:}
24705
24706 In my ham folders, I just hit @kbd{S x}
24707 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
24708 mail (false negative).  On group exit, those messages are moved to
24709 @samp{training.spam}.
24710 @end itemize
24711
24712 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
24713
24714 From Reiner Steib <reiner.steib@@gmx.de>.
24715
24716 With following entry in @code{gnus-parameters}, @kbd{S x}
24717 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
24718 groups as spam and reports the to Gmane at group exit:
24719
24720 @lisp
24721    ("^gmane\\."
24722     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
24723 @end lisp
24724
24725 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
24726 because I don't read the groups directly from news.gmane.org, but
24727 through my local news server (leafnode).  I.e. the article numbers are
24728 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
24729 the @code{X-Report-Spam} header to find the correct number.
24730
24731 @node Spam Back Ends
24732 @subsection Spam Back Ends
24733 @cindex spam back ends
24734
24735 The spam package offers a variety of back ends for detecting spam.
24736 Each back end defines a set of methods for detecting spam
24737 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
24738 and a pair of spam and ham processors (@pxref{Spam and Ham
24739 Processors}).
24740
24741 @menu
24742 * Blacklists and Whitelists::
24743 * BBDB Whitelists::
24744 * Gmane Spam Reporting::
24745 * Anti-spam Hashcash Payments::
24746 * Blackholes::
24747 * Regular Expressions Header Matching::
24748 * Bogofilter::
24749 * SpamAssassin back end::
24750 * ifile spam filtering::
24751 * Spam Statistics Filtering::
24752 * SpamOracle::
24753 @end menu
24754
24755 @node Blacklists and Whitelists
24756 @subsubsection Blacklists and Whitelists
24757 @cindex spam filtering
24758 @cindex whitelists, spam filtering
24759 @cindex blacklists, spam filtering
24760 @cindex spam
24761
24762 @defvar spam-use-blacklist
24763
24764 Set this variable to @code{t} if you want to use blacklists when
24765 splitting incoming mail.  Messages whose senders are in the blacklist
24766 will be sent to the @code{spam-split-group}.  This is an explicit
24767 filter, meaning that it acts only on mail senders @emph{declared} to
24768 be spammers.
24769
24770 @end defvar
24771
24772 @defvar spam-use-whitelist
24773
24774 Set this variable to @code{t} if you want to use whitelists when
24775 splitting incoming mail.  Messages whose senders are not in the
24776 whitelist will be sent to the next spam-split rule.  This is an
24777 explicit filter, meaning that unless someone is in the whitelist, their
24778 messages are not assumed to be spam or ham.
24779
24780 @end defvar
24781
24782 @defvar spam-use-whitelist-exclusive
24783
24784 Set this variable to @code{t} if you want to use whitelists as an
24785 implicit filter, meaning that every message will be considered spam
24786 unless the sender is in the whitelist.  Use with care.
24787
24788 @end defvar
24789
24790 @defvar gnus-group-spam-exit-processor-blacklist
24791
24792 Add this symbol to a group's @code{spam-process} parameter by
24793 customizing the group parameters or the
24794 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
24795 added to a group's @code{spam-process} parameter, the senders of
24796 spam-marked articles will be added to the blacklist.
24797
24798 @emph{WARNING}
24799
24800 Instead of the obsolete
24801 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
24802 that you use @code{(spam spam-use-blacklist)}.  Everything will work
24803 the same way, we promise.
24804
24805 @end defvar
24806
24807 @defvar gnus-group-ham-exit-processor-whitelist
24808
24809 Add this symbol to a group's @code{spam-process} parameter by
24810 customizing the group parameters or the
24811 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
24812 added to a group's @code{spam-process} parameter, the senders of
24813 ham-marked articles in @emph{ham} groups will be added to the
24814 whitelist.
24815
24816 @emph{WARNING}
24817
24818 Instead of the obsolete
24819 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
24820 that you use @code{(ham spam-use-whitelist)}.  Everything will work
24821 the same way, we promise.
24822
24823 @end defvar
24824
24825 Blacklists are lists of regular expressions matching addresses you
24826 consider to be spam senders.  For instance, to block mail from any
24827 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
24828 blacklist.  You start out with an empty blacklist.  Blacklist entries
24829 use the Emacs regular expression syntax.
24830
24831 Conversely, whitelists tell Gnus what addresses are considered
24832 legitimate.  All messages from whitelisted addresses are considered
24833 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
24834 Emacs regular expression syntax.
24835
24836 The blacklist and whitelist file locations can be customized with the
24837 @code{spam-directory} variable (@file{~/News/spam} by default), or
24838 the @code{spam-whitelist} and @code{spam-blacklist} variables
24839 directly.  The whitelist and blacklist files will by default be in the
24840 @code{spam-directory} directory, named @file{whitelist} and
24841 @file{blacklist} respectively.
24842
24843 @node BBDB Whitelists
24844 @subsubsection BBDB Whitelists
24845 @cindex spam filtering
24846 @cindex BBDB whitelists, spam filtering
24847 @cindex BBDB, spam filtering
24848 @cindex spam
24849
24850 @defvar spam-use-BBDB
24851
24852 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
24853 Whitelists}), but uses the BBDB as the source of whitelisted
24854 addresses, without regular expressions.  You must have the BBDB loaded
24855 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
24856 not in the BBDB will be sent to the next spam-split rule.  This is an
24857 explicit filter, meaning that unless someone is in the BBDB, their
24858 messages are not assumed to be spam or ham.
24859
24860 @end defvar
24861
24862 @defvar spam-use-BBDB-exclusive
24863
24864 Set this variable to @code{t} if you want to use the BBDB as an
24865 implicit filter, meaning that every message will be considered spam
24866 unless the sender is in the BBDB.  Use with care.  Only sender
24867 addresses in the BBDB will be allowed through; all others will be
24868 classified as spammers.
24869
24870 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
24871 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
24872 @emph{not} a separate back end.  If you set
24873 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
24874 will be exclusive.
24875
24876 @end defvar
24877
24878 @defvar gnus-group-ham-exit-processor-BBDB
24879
24880 Add this symbol to a group's @code{spam-process} parameter by
24881 customizing the group parameters or the
24882 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
24883 added to a group's @code{spam-process} parameter, the senders of
24884 ham-marked articles in @emph{ham} groups will be added to the
24885 BBDB.
24886
24887 @emph{WARNING}
24888
24889 Instead of the obsolete
24890 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
24891 that you use @code{(ham spam-use-BBDB)}.  Everything will work
24892 the same way, we promise.
24893
24894 @end defvar
24895
24896 @node Gmane Spam Reporting
24897 @subsubsection Gmane Spam Reporting
24898 @cindex spam reporting
24899 @cindex Gmane, spam reporting
24900 @cindex Gmane, spam reporting
24901 @cindex spam
24902
24903 @defvar gnus-group-spam-exit-processor-report-gmane
24904
24905 Add this symbol to a group's @code{spam-process} parameter by
24906 customizing the group parameters or the
24907 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
24908 added to a group's @code{spam-process} parameter, the spam-marked
24909 articles groups will be reported to the Gmane administrators via a
24910 HTTP request.
24911
24912 Gmane can be found at @uref{http://gmane.org}.
24913
24914 @emph{WARNING}
24915
24916 Instead of the obsolete
24917 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
24918 that you use @code{(spam spam-use-gmane)}.  Everything will work the
24919 same way, we promise.
24920
24921 @end defvar
24922
24923 @defvar spam-report-gmane-use-article-number
24924
24925 This variable is @code{t} by default.  Set it to @code{nil} if you are
24926 running your own news server, for instance, and the local article
24927 numbers don't correspond to the Gmane article numbers.  When
24928 @code{spam-report-gmane-use-article-number} is @code{nil},
24929 @code{spam-report.el} will fetch the number from the article headers.
24930
24931 @end defvar
24932
24933 @defvar spam-report-user-mail-address
24934
24935 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
24936 the Gmane administrators to contact you in case of misreports.  The
24937 default is @code{user-mail-address}.
24938
24939 @end defvar
24940
24941 @node Anti-spam Hashcash Payments
24942 @subsubsection Anti-spam Hashcash Payments
24943 @cindex spam filtering
24944 @cindex hashcash, spam filtering
24945 @cindex spam
24946
24947 @defvar spam-use-hashcash
24948
24949 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
24950 Whitelists}), but uses hashcash tokens for whitelisting messages
24951 instead of the sender address.  Messages without a hashcash payment
24952 token will be sent to the next spam-split rule.  This is an explicit
24953 filter, meaning that unless a hashcash token is found, the messages
24954 are not assumed to be spam or ham.
24955
24956 @end defvar
24957
24958 @node Blackholes
24959 @subsubsection Blackholes
24960 @cindex spam filtering
24961 @cindex blackholes, spam filtering
24962 @cindex spam
24963
24964 @defvar spam-use-blackholes
24965
24966 This option is disabled by default.  You can let Gnus consult the
24967 blackhole-type distributed spam processing systems (DCC, for instance)
24968 when you set this option.  The variable @code{spam-blackhole-servers}
24969 holds the list of blackhole servers Gnus will consult.  The current
24970 list is fairly comprehensive, but make sure to let us know if it
24971 contains outdated servers.
24972
24973 The blackhole check uses the @code{dig.el} package, but you can tell
24974 @code{spam.el} to use @code{dns.el} instead for better performance if
24975 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
24976 this time to set @code{spam-use-dig} to @code{nil} despite the
24977 possible performance improvements, because some users may be unable to
24978 use it, but you can try it and see if it works for you.
24979
24980 @end defvar
24981
24982 @defvar spam-blackhole-servers
24983
24984 The list of servers to consult for blackhole checks.
24985
24986 @end defvar
24987
24988 @defvar spam-blackhole-good-server-regex
24989
24990 A regular expression for IPs that should not be checked against the
24991 blackhole server list.  When set to @code{nil}, it has no effect.
24992
24993 @end defvar
24994
24995 @defvar spam-use-dig
24996
24997 Use the @code{dig.el} package instead of the @code{dns.el} package.
24998 The default setting of @code{t} is recommended.
24999
25000 @end defvar
25001
25002 Blackhole checks are done only on incoming mail.  There is no spam or
25003 ham processor for blackholes.
25004
25005 @node Regular Expressions Header Matching
25006 @subsubsection Regular Expressions Header Matching
25007 @cindex spam filtering
25008 @cindex regular expressions header matching, spam filtering
25009 @cindex spam
25010
25011 @defvar spam-use-regex-headers
25012
25013 This option is disabled by default.  You can let Gnus check the
25014 message headers against lists of regular expressions when you set this
25015 option.  The variables @code{spam-regex-headers-spam} and
25016 @code{spam-regex-headers-ham} hold the list of regular expressions.
25017 Gnus will check against the message headers to determine if the
25018 message is spam or ham, respectively.
25019
25020 @end defvar
25021
25022 @defvar spam-regex-headers-spam
25023
25024 The list of regular expressions that, when matched in the headers of
25025 the message, positively identify it as spam.
25026
25027 @end defvar
25028
25029 @defvar spam-regex-headers-ham
25030
25031 The list of regular expressions that, when matched in the headers of
25032 the message, positively identify it as ham.
25033
25034 @end defvar
25035
25036 Regular expression header checks are done only on incoming mail.
25037 There is no specific spam or ham processor for regular expressions.
25038
25039 @node Bogofilter
25040 @subsubsection Bogofilter
25041 @cindex spam filtering
25042 @cindex bogofilter, spam filtering
25043 @cindex spam
25044
25045 @defvar spam-use-bogofilter
25046
25047 Set this variable if you want @code{spam-split} to use Eric Raymond's
25048 speedy Bogofilter.
25049
25050 With a minimum of care for associating the @samp{$} mark for spam
25051 articles only, Bogofilter training all gets fairly automatic.  You
25052 should do this until you get a few hundreds of articles in each
25053 category, spam or not.  The command @kbd{S t} in summary mode, either
25054 for debugging or for curiosity, shows the @emph{spamicity} score of
25055 the current article (between 0.0 and 1.0).
25056
25057 Bogofilter determines if a message is spam based on a specific
25058 threshold.  That threshold can be customized, consult the Bogofilter
25059 documentation.
25060
25061 If the @code{bogofilter} executable is not in your path, Bogofilter
25062 processing will be turned off.
25063
25064 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25065
25066 @end defvar
25067
25068 @table @kbd
25069 @item M s t
25070 @itemx S t
25071 @kindex M s t
25072 @kindex S t
25073 @findex spam-bogofilter-score
25074 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25075 @end table
25076
25077 @defvar spam-use-bogofilter-headers
25078
25079 Set this variable if you want @code{spam-split} to use Eric Raymond's
25080 speedy Bogofilter, looking only at the message headers.  It works
25081 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25082 must be in the message already.  Normally you would do this with a
25083 procmail recipe or something similar; consult the Bogofilter
25084 installation documents for details.
25085
25086 You should not enable this if you use @code{spam-use-bogofilter}.
25087
25088 @end defvar
25089
25090 @defvar gnus-group-spam-exit-processor-bogofilter
25091 Add this symbol to a group's @code{spam-process} parameter by
25092 customizing the group parameters or the
25093 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25094 added to a group's @code{spam-process} parameter, spam-marked articles
25095 will be added to the Bogofilter spam database.
25096
25097 @emph{WARNING}
25098
25099 Instead of the obsolete
25100 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25101 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25102 the same way, we promise.
25103 @end defvar
25104
25105 @defvar gnus-group-ham-exit-processor-bogofilter
25106 Add this symbol to a group's @code{spam-process} parameter by
25107 customizing the group parameters or the
25108 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25109 added to a group's @code{spam-process} parameter, the ham-marked
25110 articles in @emph{ham} groups will be added to the Bogofilter database
25111 of non-spam messages.
25112
25113 @emph{WARNING}
25114
25115 Instead of the obsolete
25116 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25117 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25118 the same way, we promise.
25119 @end defvar
25120
25121 @defvar spam-bogofilter-database-directory
25122
25123 This is the directory where Bogofilter will store its databases.  It
25124 is not specified by default, so Bogofilter will use its own default
25125 database directory.
25126
25127 @end defvar
25128
25129 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25130 purpose.  A ham and a spam processor are provided, plus the
25131 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25132 variables to indicate to spam-split that Bogofilter should either be
25133 used, or has already been used on the article.  The 0.9.2.1 version of
25134 Bogofilter was used to test this functionality.
25135
25136 @node SpamAssassin back end
25137 @subsubsection SpamAssassin back end
25138 @cindex spam filtering
25139 @cindex spamassassin, spam filtering
25140 @cindex spam
25141
25142 @defvar spam-use-spamassassin
25143
25144 Set this variable if you want @code{spam-split} to use SpamAssassin.
25145
25146 SpamAssassin assigns a score to each article based on a set of rules
25147 and tests, including a Bayesian filter.  The Bayesian filter can be
25148 trained by associating the @samp{$} mark for spam articles.  The
25149 spam score can be viewed by using the command @kbd{S t} in summary
25150 mode.
25151
25152 If you set this variable, each article will be processed by
25153 SpamAssassin when @code{spam-split} is called.  If your mail is
25154 preprocessed by SpamAssassin, and you want to just use the
25155 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25156 instead.
25157
25158 You should not enable this if you use
25159 @code{spam-use-spamassassin-headers}.
25160
25161 @end defvar
25162
25163 @defvar spam-use-spamassassin-headers
25164
25165 Set this variable if your mail is preprocessed by SpamAssassin and
25166 want @code{spam-split} to split based on the SpamAssassin headers.
25167
25168 You should not enable this if you use @code{spam-use-spamassassin}.
25169
25170 @end defvar
25171
25172 @defvar spam-spamassassin-program
25173
25174 This variable points to the SpamAssassin executable.  If you have
25175 @code{spamd} running, you can set this variable to the @code{spamc}
25176 executable for faster processing.  See the SpamAssassin documentation
25177 for more information on @code{spamd}/@code{spamc}.
25178
25179 @end defvar
25180
25181 SpamAssassin is a powerful and flexible spam filter that uses a wide
25182 variety of tests to identify spam.  A ham and a spam processors are
25183 provided, plus the @code{spam-use-spamassassin} and
25184 @code{spam-use-spamassassin-headers} variables to indicate to
25185 spam-split that SpamAssassin should be either used, or has already
25186 been used on the article.  The 2.63 version of SpamAssassin was used
25187 to test this functionality.
25188
25189 @node ifile spam filtering
25190 @subsubsection ifile spam filtering
25191 @cindex spam filtering
25192 @cindex ifile, spam filtering
25193 @cindex spam
25194
25195 @defvar spam-use-ifile
25196
25197 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25198 statistical analyzer similar to Bogofilter.
25199
25200 @end defvar
25201
25202 @defvar spam-ifile-all-categories
25203
25204 Enable this variable if you want @code{spam-use-ifile} to give you all
25205 the ifile categories, not just spam/non-spam.  If you use this, make
25206 sure you train ifile as described in its documentation.
25207
25208 @end defvar
25209
25210 @defvar spam-ifile-spam-category
25211
25212 This is the category of spam messages as far as ifile is concerned.
25213 The actual string used is irrelevant, but you probably want to leave
25214 the default value of @samp{spam}.
25215 @end defvar
25216
25217 @defvar spam-ifile-database
25218
25219 This is the filename for the ifile database.  It is not specified by
25220 default, so ifile will use its own default database name.
25221
25222 @end defvar
25223
25224 The ifile mail classifier is similar to Bogofilter in intent and
25225 purpose.  A ham and a spam processor are provided, plus the
25226 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25227 should be used.  The 1.2.1 version of ifile was used to test this
25228 functionality.
25229
25230 @node Spam Statistics Filtering
25231 @subsubsection Spam Statistics Filtering
25232 @cindex spam filtering
25233 @cindex spam-stat, spam filtering
25234 @cindex spam-stat
25235 @cindex spam
25236
25237 This back end uses the Spam Statistics Emacs Lisp package to perform
25238 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
25239 using this, you may want to perform some additional steps to
25240 initialize your Spam Statistics dictionary.  @xref{Creating a
25241 spam-stat dictionary}.
25242
25243 @defvar spam-use-stat
25244
25245 @end defvar
25246
25247 @defvar gnus-group-spam-exit-processor-stat
25248 Add this symbol to a group's @code{spam-process} parameter by
25249 customizing the group parameters or the
25250 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25251 added to a group's @code{spam-process} parameter, the spam-marked
25252 articles will be added to the spam-stat database of spam messages.
25253
25254 @emph{WARNING}
25255
25256 Instead of the obsolete
25257 @code{gnus-group-spam-exit-processor-stat}, it is recommended
25258 that you use @code{(spam spam-use-stat)}.  Everything will work
25259 the same way, we promise.
25260 @end defvar
25261
25262 @defvar gnus-group-ham-exit-processor-stat
25263 Add this symbol to a group's @code{spam-process} parameter by
25264 customizing the group parameters or the
25265 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25266 added to a group's @code{spam-process} parameter, the ham-marked
25267 articles in @emph{ham} groups will be added to the spam-stat database
25268 of non-spam messages.
25269
25270 @emph{WARNING}
25271
25272 Instead of the obsolete
25273 @code{gnus-group-ham-exit-processor-stat}, it is recommended
25274 that you use @code{(ham spam-use-stat)}.  Everything will work
25275 the same way, we promise.
25276 @end defvar
25277
25278 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
25279 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
25280 which unlike ifile or Bogofilter does not require external programs.
25281 A spam and a ham processor, and the @code{spam-use-stat} variable for
25282 @code{spam-split} are provided.
25283
25284 @node SpamOracle
25285 @subsubsection Using SpamOracle with Gnus
25286 @cindex spam filtering
25287 @cindex SpamOracle
25288 @cindex spam
25289
25290 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
25291 statistical mail filtering tool written by Xavier Leroy and needs to be
25292 installed separately.
25293
25294 There are several ways to use SpamOracle with Gnus.  In all cases, your
25295 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
25296 then enter an @samp{X-Spam} header indicating whether it regards the
25297 mail as a spam mail or not.
25298
25299 One possibility is to run SpamOracle as a @code{:prescript} from the
25300 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
25301 the advantage that the user can see the @emph{X-Spam} headers.
25302
25303 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
25304 call SpamOracle.
25305
25306 @vindex spam-use-spamoracle
25307 To enable SpamOracle usage by @code{spam.el}, set the variable
25308 @code{spam-use-spamoracle} to @code{t} and configure the
25309 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
25310 Package}.  In this example the @samp{INBOX} of an nnimap server is
25311 filtered using SpamOracle.  Mails recognized as spam mails will be
25312 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
25313 messages stay in @samp{INBOX}:
25314
25315 @example
25316 (setq spam-use-spamoracle t
25317       spam-split-group "Junk"
25318       nnimap-split-inbox '("INBOX")
25319       nnimap-split-rule 'nnimap-split-fancy
25320       nnimap-split-fancy '(| (: spam-split) "INBOX"))
25321 @end example
25322
25323 @defvar spam-use-spamoracle
25324 Set to @code{t} if you want Gnus to enable spam filtering using
25325 SpamOracle.
25326 @end defvar
25327
25328 @defvar spam-spamoracle-binary
25329 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
25330 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
25331 can be customized.
25332 @end defvar
25333
25334 @defvar spam-spamoracle-database
25335 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
25336 store its analysis.  This is controlled by the variable
25337 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
25338 the default SpamOracle database will be used.  In case you want your
25339 database to live somewhere special, set
25340 @code{spam-spamoracle-database} to this path.
25341 @end defvar
25342
25343 SpamOracle employs a statistical algorithm to determine whether a
25344 message is spam or ham.  In order to get good results, meaning few
25345 false hits or misses, SpamOracle needs training.  SpamOracle learns
25346 the characteristics of your spam mails.  Using the @emph{add} mode
25347 (training mode) one has to feed good (ham) and spam mails to
25348 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
25349 buffer and pipe the mail to a SpamOracle process or using
25350 @file{spam.el}'s spam- and ham-processors, which is much more
25351 convenient.  For a detailed description of spam- and ham-processors,
25352 @xref{Spam Package}.
25353
25354 @defvar gnus-group-spam-exit-processor-spamoracle
25355 Add this symbol to a group's @code{spam-process} parameter by
25356 customizing the group parameter or the
25357 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25358 to a group's @code{spam-process} parameter, spam-marked articles will be
25359 sent to SpamOracle as spam samples.
25360
25361 @emph{WARNING}
25362
25363 Instead of the obsolete
25364 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
25365 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
25366 the same way, we promise.
25367 @end defvar
25368
25369 @defvar gnus-group-ham-exit-processor-spamoracle
25370 Add this symbol to a group's @code{spam-process} parameter by
25371 customizing the group parameter or the
25372 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25373 to a group's @code{spam-process} parameter, the ham-marked articles in
25374 @emph{ham} groups will be sent to the SpamOracle as samples of ham
25375 messages.
25376
25377 @emph{WARNING}
25378
25379 Instead of the obsolete
25380 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
25381 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
25382 the same way, we promise.
25383 @end defvar
25384
25385 @emph{Example:} These are the Group Parameters of a group that has been
25386 classified as a ham group, meaning that it should only contain ham
25387 messages.
25388 @example
25389  ((spam-contents gnus-group-spam-classification-ham)
25390   (spam-process ((ham spam-use-spamoracle)
25391                  (spam spam-use-spamoracle))))
25392 @end example
25393 For this group the @code{spam-use-spamoracle} is installed for both
25394 ham and spam processing.  If the group contains spam message
25395 (e.g. because SpamOracle has not had enough sample messages yet) and
25396 the user marks some messages as spam messages, these messages will be
25397 processed by SpamOracle.  The processor sends the messages to
25398 SpamOracle as new samples for spam.
25399
25400 @node Extending the Spam package
25401 @subsection Extending the Spam package
25402 @cindex spam filtering
25403 @cindex spam elisp package, extending
25404 @cindex extending the spam elisp package
25405
25406 Say you want to add a new back end called blackbox.  For filtering
25407 incoming mail, provide the following:
25408
25409 @enumerate
25410
25411 @item
25412 Code
25413
25414 @lisp
25415 (defvar spam-use-blackbox nil
25416   "True if blackbox should be used.")
25417 @end lisp
25418
25419 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
25420
25421 Write @code{spam-blackbox-register-routine} and
25422 @code{spam-blackbox-unregister-routine} using the bogofilter
25423 register/unregister routines as a start, or other restister/unregister
25424 routines more appropriate to Blackbox, if Blackbox can
25425 register/unregister spam and ham.
25426
25427 @item
25428 Functionality
25429
25430 The @code{spam-check-blackbox} function should return @samp{nil} or
25431 @code{spam-split-group}, observing the other conventions.  See the
25432 existing @code{spam-check-*} functions for examples of what you can
25433 do, and stick to the template unless you fully understand the reasons
25434 why you aren't.
25435
25436 @end enumerate
25437
25438 For processing spam and ham messages, provide the following:
25439
25440 @enumerate
25441
25442 @item
25443 Code
25444
25445 Note you don't have to provide a spam or a ham processor.  Only
25446 provide them if Blackbox supports spam or ham processing.
25447
25448 Also, ham and spam processors are being phased out as single
25449 variables.  Instead the form @code{(spam spam-use-blackbox)} or
25450 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
25451 processor variables are still around but they won't be for long.
25452
25453 @lisp
25454 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
25455   "The Blackbox summary exit spam processor.
25456 Only applicable to spam groups.")
25457
25458 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
25459   "The whitelist summary exit ham processor.
25460 Only applicable to non-spam (unclassified and ham) groups.")
25461
25462 @end lisp
25463
25464 @item
25465 Gnus parameters
25466
25467 Add
25468 @lisp
25469 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
25470 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
25471 @end lisp
25472 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
25473 sure you do it twice, once for the parameter and once for the
25474 variable customization.
25475
25476 Add
25477 @lisp
25478 (variable-item spam-use-blackbox)
25479 @end lisp
25480 to the @code{spam-autodetect-methods} group parameter in
25481 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
25482
25483 Finally, use the appropriate @code{spam-install-*-backend} function in
25484 @code{spam.el}.  Here are the available functions.
25485
25486
25487 @enumerate
25488
25489 @item
25490 @code{spam-install-backend-alias}
25491
25492 This function will simply install an alias for a back end that does
25493 everything like the original back end.  It is currently only used to
25494 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
25495
25496 @item
25497 @code{spam-install-nocheck-backend}
25498
25499 This function installs a back end that has no check function, but can
25500 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
25501 such a back end.
25502
25503 @item
25504 @code{spam-install-checkonly-backend}
25505
25506 This function will install a back end that can only check incoming mail
25507 for spam contents.  It can't register or unregister messages.
25508 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
25509 back ends.
25510
25511 @item
25512 @code{spam-install-statistical-checkonly-backend}
25513
25514 This function installs a statistical back end (one which requires the
25515 full body of a message to check it) that can only check incoming mail
25516 for contents.  @code{spam-use-regex-body} is such a filter.
25517
25518 @item
25519 @code{spam-install-statistical-backend}
25520
25521 This function install a statistical back end with incoming checks and
25522 registration/unregistration routines.  @code{spam-use-bogofilter} is
25523 set up this way.
25524
25525 @item
25526 @code{spam-install-backend}
25527
25528 This is the most normal back end installation, where a back end that can
25529 check and register/unregister messages is set up without statistical
25530 abilities.  The @code{spam-use-BBDB} is such a back end.
25531
25532 @item
25533 @code{spam-install-mover-backend}
25534
25535 Mover back ends are internal to @code{spam.el} and specifically move
25536 articles around when the summary is exited.  You will very probably
25537 never install such a back end.
25538 @end enumerate
25539
25540 @end enumerate
25541
25542 @node Spam Statistics Package
25543 @subsection Spam Statistics Package
25544 @cindex Paul Graham
25545 @cindex Graham, Paul
25546 @cindex naive Bayesian spam filtering
25547 @cindex Bayesian spam filtering, naive
25548 @cindex spam filtering, naive Bayesian
25549
25550 Paul Graham has written an excellent essay about spam filtering using
25551 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
25552 Spam}.  In it he describes the inherent deficiency of rule-based
25553 filtering as used by SpamAssassin, for example: Somebody has to write
25554 the rules, and everybody else has to install these rules.  You are
25555 always late.  It would be much better, he argues, to filter mail based
25556 on whether it somehow resembles spam or non-spam.  One way to measure
25557 this is word distribution.  He then goes on to describe a solution
25558 that checks whether a new mail resembles any of your other spam mails
25559 or not.
25560
25561 The basic idea is this:  Create a two collections of your mail, one
25562 with spam, one with non-spam.  Count how often each word appears in
25563 either collection, weight this by the total number of mails in the
25564 collections, and store this information in a dictionary.  For every
25565 word in a new mail, determine its probability to belong to a spam or a
25566 non-spam mail.  Use the 15 most conspicuous words, compute the total
25567 probability of the mail being spam.  If this probability is higher
25568 than a certain threshold, the mail is considered to be spam.
25569
25570 The Spam Statistics package adds support to Gnus for this kind of
25571 filtering.  It can be used as one of the back ends of the Spam package
25572 (@pxref{Spam Package}), or by itself.
25573
25574 Before using the Spam Statistics package, you need to set it up.
25575 First, you need two collections of your mail, one with spam, one with
25576 non-spam.  Then you need to create a dictionary using these two
25577 collections, and save it.  And last but not least, you need to use
25578 this dictionary in your fancy mail splitting rules.
25579
25580 @menu
25581 * Creating a spam-stat dictionary::
25582 * Splitting mail using spam-stat::
25583 * Low-level interface to the spam-stat dictionary::
25584 @end menu
25585
25586 @node Creating a spam-stat dictionary
25587 @subsubsection Creating a spam-stat dictionary
25588
25589 Before you can begin to filter spam based on statistics, you must
25590 create these statistics based on two mail collections, one with spam,
25591 one with non-spam.  These statistics are then stored in a dictionary
25592 for later use.  In order for these statistics to be meaningful, you
25593 need several hundred emails in both collections.
25594
25595 Gnus currently supports only the nnml back end for automated dictionary
25596 creation.  The nnml back end stores all mails in a directory, one file
25597 per mail.  Use the following:
25598
25599 @defun spam-stat-process-spam-directory
25600 Create spam statistics for every file in this directory.  Every file
25601 is treated as one spam mail.
25602 @end defun
25603
25604 @defun spam-stat-process-non-spam-directory
25605 Create non-spam statistics for every file in this directory.  Every
25606 file is treated as one non-spam mail.
25607 @end defun
25608
25609 Usually you would call @code{spam-stat-process-spam-directory} on a
25610 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
25611 the group @samp{nnml:mail.spam}), and you would call
25612 @code{spam-stat-process-non-spam-directory} on a directory such as
25613 @file{~/Mail/mail/misc} (this usually corresponds to the group
25614 @samp{nnml:mail.misc}).
25615
25616 When you are using @acronym{IMAP}, you won't have the mails available
25617 locally, so that will not work.  One solution is to use the Gnus Agent
25618 to cache the articles.  Then you can use directories such as
25619 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
25620 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
25621
25622 @defvar spam-stat
25623 This variable holds the hash-table with all the statistics---the
25624 dictionary we have been talking about.  For every word in either
25625 collection, this hash-table stores a vector describing how often the
25626 word appeared in spam and often it appeared in non-spam mails.
25627 @end defvar
25628
25629 If you want to regenerate the statistics from scratch, you need to
25630 reset the dictionary.
25631
25632 @defun spam-stat-reset
25633 Reset the @code{spam-stat} hash-table, deleting all the statistics.
25634 @end defun
25635
25636 When you are done, you must save the dictionary.  The dictionary may
25637 be rather large.  If you will not update the dictionary incrementally
25638 (instead, you will recreate it once a month, for example), then you
25639 can reduce the size of the dictionary by deleting all words that did
25640 not appear often enough or that do not clearly belong to only spam or
25641 only non-spam mails.
25642
25643 @defun spam-stat-reduce-size
25644 Reduce the size of the dictionary.  Use this only if you do not want
25645 to update the dictionary incrementally.
25646 @end defun
25647
25648 @defun spam-stat-save
25649 Save the dictionary.
25650 @end defun
25651
25652 @defvar spam-stat-file
25653 The filename used to store the dictionary.  This defaults to
25654 @file{~/.spam-stat.el}.
25655 @end defvar
25656
25657 @node Splitting mail using spam-stat
25658 @subsubsection Splitting mail using spam-stat
25659
25660 This section describes how to use the Spam statistics
25661 @emph{independently} of the @xref{Spam Package}.
25662
25663 First, add the following to your @file{~/.gnus.el} file:
25664
25665 @lisp
25666 (require 'spam-stat)
25667 (spam-stat-load)
25668 @end lisp
25669
25670 This will load the necessary Gnus code, and the dictionary you
25671 created.
25672
25673 Next, you need to adapt your fancy splitting rules:  You need to
25674 determine how to use @code{spam-stat}.  The following examples are for
25675 the nnml back end.  Using the nnimap back end works just as well.  Just
25676 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
25677
25678 In the simplest case, you only have two groups, @samp{mail.misc} and
25679 @samp{mail.spam}.  The following expression says that mail is either
25680 spam or it should go into @samp{mail.misc}.  If it is spam, then
25681 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
25682
25683 @lisp
25684 (setq nnmail-split-fancy
25685       `(| (: spam-stat-split-fancy)
25686           "mail.misc"))
25687 @end lisp
25688
25689 @defvar spam-stat-split-fancy-spam-group
25690 The group to use for spam.  Default is @samp{mail.spam}.
25691 @end defvar
25692
25693 If you also filter mail with specific subjects into other groups, use
25694 the following expression.  Only mails not matching the regular
25695 expression are considered potential spam.
25696
25697 @lisp
25698 (setq nnmail-split-fancy
25699       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
25700           (: spam-stat-split-fancy)
25701           "mail.misc"))
25702 @end lisp
25703
25704 If you want to filter for spam first, then you must be careful when
25705 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
25706 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
25707 non-spam, therefore both should be in your collection of non-spam
25708 mails, when creating the dictionary!
25709
25710 @lisp
25711 (setq nnmail-split-fancy
25712       `(| (: spam-stat-split-fancy)
25713           ("Subject" "\\bspam-stat\\b" "mail.emacs")
25714           "mail.misc"))
25715 @end lisp
25716
25717 You can combine this with traditional filtering.  Here, we move all
25718 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
25719 @code{spam-stat-split-fancy} will never see them, the mails in
25720 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
25721 nor in your collection of non-spam mails, when creating the
25722 dictionary!
25723
25724 @lisp
25725 (setq nnmail-split-fancy
25726       `(| ("Content-Type" "text/html" "mail.spam.filtered")
25727           (: spam-stat-split-fancy)
25728           ("Subject" "\\bspam-stat\\b" "mail.emacs")
25729           "mail.misc"))
25730 @end lisp
25731
25732
25733 @node Low-level interface to the spam-stat dictionary
25734 @subsubsection Low-level interface to the spam-stat dictionary
25735
25736 The main interface to using @code{spam-stat}, are the following functions:
25737
25738 @defun spam-stat-buffer-is-spam
25739 Called in a buffer, that buffer is considered to be a new spam mail.
25740 Use this for new mail that has not been processed before.
25741 @end defun
25742
25743 @defun spam-stat-buffer-is-no-spam
25744 Called in a buffer, that buffer is considered to be a new non-spam
25745 mail.  Use this for new mail that has not been processed before.
25746 @end defun
25747
25748 @defun spam-stat-buffer-change-to-spam
25749 Called in a buffer, that buffer is no longer considered to be normal
25750 mail but spam.  Use this to change the status of a mail that has
25751 already been processed as non-spam.
25752 @end defun
25753
25754 @defun spam-stat-buffer-change-to-non-spam
25755 Called in a buffer, that buffer is no longer considered to be spam but
25756 normal mail.  Use this to change the status of a mail that has already
25757 been processed as spam.
25758 @end defun
25759
25760 @defun spam-stat-save
25761 Save the hash table to the file.  The filename used is stored in the
25762 variable @code{spam-stat-file}.
25763 @end defun
25764
25765 @defun spam-stat-load
25766 Load the hash table from a file.  The filename used is stored in the
25767 variable @code{spam-stat-file}.
25768 @end defun
25769
25770 @defun spam-stat-score-word
25771 Return the spam score for a word.
25772 @end defun
25773
25774 @defun spam-stat-score-buffer
25775 Return the spam score for a buffer.
25776 @end defun
25777
25778 @defun spam-stat-split-fancy
25779 Use this function for fancy mail splitting.  Add the rule @samp{(:
25780 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
25781 @end defun
25782
25783 Make sure you load the dictionary before using it.  This requires the
25784 following in your @file{~/.gnus.el} file:
25785
25786 @lisp
25787 (require 'spam-stat)
25788 (spam-stat-load)
25789 @end lisp
25790
25791 Typical test will involve calls to the following functions:
25792
25793 @smallexample
25794 Reset: (setq spam-stat (make-hash-table :test 'equal))
25795 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
25796 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
25797 Save table: (spam-stat-save)
25798 File size: (nth 7 (file-attributes spam-stat-file))
25799 Number of words: (hash-table-count spam-stat)
25800 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
25801 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
25802 Reduce table size: (spam-stat-reduce-size)
25803 Save table: (spam-stat-save)
25804 File size: (nth 7 (file-attributes spam-stat-file))
25805 Number of words: (hash-table-count spam-stat)
25806 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
25807 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
25808 @end smallexample
25809
25810 Here is how you would create your dictionary:
25811
25812 @smallexample
25813 Reset: (setq spam-stat (make-hash-table :test 'equal))
25814 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
25815 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
25816 Repeat for any other non-spam group you need...
25817 Reduce table size: (spam-stat-reduce-size)
25818 Save table: (spam-stat-save)
25819 @end smallexample
25820
25821 @node Other modes
25822 @section Interaction with other modes
25823
25824 @subsection Dired
25825 @cindex dired
25826
25827 @code{gnus-dired-minor-mode} provides some useful functions for dired
25828 buffers.  It is enabled with
25829 @lisp
25830 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
25831 @end lisp
25832
25833 @table @kbd
25834 @item C-c C-m C-a
25835 @findex gnus-dired-attach
25836 @cindex attachments, selection via dired
25837 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
25838 You will be prompted for a message buffer.
25839
25840 @item C-c C-m C-l
25841 @findex gnus-dired-find-file-mailcap
25842 Visit a file according to the appropriate mailcap entry
25843 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
25844 buffer.
25845
25846 @item C-c C-m C-p
25847 @findex gnus-dired-print
25848 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
25849 there is no print command, print in a PostScript image.
25850 @end table
25851
25852 @node Various Various
25853 @section Various Various
25854 @cindex mode lines
25855 @cindex highlights
25856
25857 @table @code
25858
25859 @item gnus-home-directory
25860 @vindex gnus-home-directory
25861 All Gnus file and directory variables will be initialized from this
25862 variable, which defaults to @file{~/}.
25863
25864 @item gnus-directory
25865 @vindex gnus-directory
25866 Most Gnus storage file and directory variables will be initialized from
25867 this variable, which defaults to the @env{SAVEDIR} environment
25868 variable, or @file{~/News/} if that variable isn't set.
25869
25870 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
25871 This means that other directory variables that are initialized from this
25872 variable won't be set properly if you set this variable in
25873 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
25874
25875 @item gnus-default-directory
25876 @vindex gnus-default-directory
25877 Not related to the above variable at all---this variable says what the
25878 default directory of all Gnus buffers should be.  If you issue commands
25879 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
25880 default directory.  If this variable is @code{nil} (which is the
25881 default), the default directory will be the default directory of the
25882 buffer you were in when you started Gnus.
25883
25884 @item gnus-verbose
25885 @vindex gnus-verbose
25886 This variable is an integer between zero and ten.  The higher the value,
25887 the more messages will be displayed.  If this variable is zero, Gnus
25888 will never flash any messages, if it is seven (which is the default),
25889 most important messages will be shown, and if it is ten, Gnus won't ever
25890 shut up, but will flash so many messages it will make your head swim.
25891
25892 @item gnus-verbose-backends
25893 @vindex gnus-verbose-backends
25894 This variable works the same way as @code{gnus-verbose}, but it applies
25895 to the Gnus back ends instead of Gnus proper.
25896
25897 @item gnus-add-timestamp-to-message
25898 @vindex gnus-add-timestamp-to-message
25899 This variable controls whether to add timestamps to messages that are
25900 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
25901 are issued.  The default value is @code{nil} which means never to add
25902 timestamp.  If it is @code{log}, add timestamps to only the messages
25903 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
25904 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
25905 @code{log}, add timestamps not only to log messages but also to the ones
25906 displayed in the echo area.
25907
25908 @item nnheader-max-head-length
25909 @vindex nnheader-max-head-length
25910 When the back ends read straight heads of articles, they all try to read
25911 as little as possible.  This variable (default 8192) specifies
25912 the absolute max length the back ends will try to read before giving up
25913 on finding a separator line between the head and the body.  If this
25914 variable is @code{nil}, there is no upper read bound.  If it is
25915 @code{t}, the back ends won't try to read the articles piece by piece,
25916 but read the entire articles.  This makes sense with some versions of
25917 @code{ange-ftp} or @code{efs}.
25918
25919 @item nnheader-head-chop-length
25920 @vindex nnheader-head-chop-length
25921 This variable (default 2048) says how big a piece of each article to
25922 read when doing the operation described above.
25923
25924 @item nnheader-file-name-translation-alist
25925 @vindex nnheader-file-name-translation-alist
25926 @cindex file names
25927 @cindex invalid characters in file names
25928 @cindex characters in file names
25929 This is an alist that says how to translate characters in file names.
25930 For instance, if @samp{:} is invalid as a file character in file names
25931 on your system (you OS/2 user you), you could say something like:
25932
25933 @lisp
25934 @group
25935 (setq nnheader-file-name-translation-alist
25936       '((?: . ?_)))
25937 @end group
25938 @end lisp
25939
25940 In fact, this is the default value for this variable on OS/2 and MS
25941 Windows (phooey) systems.
25942
25943 @item gnus-hidden-properties
25944 @vindex gnus-hidden-properties
25945 This is a list of properties to use to hide ``invisible'' text.  It is
25946 @code{(invisible t intangible t)} by default on most systems, which
25947 makes invisible text invisible and intangible.
25948
25949 @item gnus-parse-headers-hook
25950 @vindex gnus-parse-headers-hook
25951 A hook called before parsing headers.  It can be used, for instance, to
25952 gather statistics on the headers fetched, or perhaps you'd like to prune
25953 some headers.  I don't see why you'd want that, though.
25954
25955 @item gnus-shell-command-separator
25956 @vindex gnus-shell-command-separator
25957 String used to separate two shell commands.  The default is @samp{;}.
25958
25959 @item gnus-invalid-group-regexp
25960 @vindex gnus-invalid-group-regexp
25961
25962 Regexp to match ``invalid'' group names when querying user for a group
25963 name.  The default value catches some @strong{really} invalid group
25964 names who could possibly mess up Gnus internally (like allowing
25965 @samp{:} in a group name, which is normally used to delimit method and
25966 group).
25967
25968 @acronym{IMAP} users might want to allow @samp{/} in group names though.
25969
25970
25971 @end table
25972
25973 @node The End
25974 @chapter The End
25975
25976 Well, that's the manual---you can get on with your life now.  Keep in
25977 touch.  Say hello to your cats from me.
25978
25979 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
25980
25981 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
25982
25983 @quotation
25984 @strong{Te Deum}
25985
25986 @sp 1
25987 Not because of victories @*
25988 I sing,@*
25989 having none,@*
25990 but for the common sunshine,@*
25991 the breeze,@*
25992 the largess of the spring.
25993
25994 @sp 1
25995 Not for victory@*
25996 but for the day's work done@*
25997 as well as I was able;@*
25998 not for a seat upon the dais@*
25999 but at the common table.@*
26000 @end quotation
26001
26002
26003 @node Appendices
26004 @chapter Appendices
26005
26006 @menu
26007 * XEmacs::                      Requirements for installing under XEmacs.
26008 * History::                     How Gnus got where it is today.
26009 * On Writing Manuals::          Why this is not a beginner's guide.
26010 * Terminology::                 We use really difficult, like, words here.
26011 * Customization::               Tailoring Gnus to your needs.
26012 * Troubleshooting::             What you might try if things do not work.
26013 * Gnus Reference Guide::        Rilly, rilly technical stuff.
26014 * Emacs for Heathens::          A short introduction to Emacsian terms.
26015 * Frequently Asked Questions::  The Gnus FAQ
26016 @end menu
26017
26018
26019 @node XEmacs
26020 @section XEmacs
26021 @cindex XEmacs
26022 @cindex installing under XEmacs
26023
26024 XEmacs is distributed as a collection of packages.  You should install
26025 whatever packages the Gnus XEmacs package requires.  The current
26026 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
26027 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
26028 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
26029 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
26030
26031
26032 @node History
26033 @section History
26034
26035 @cindex history
26036 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
26037 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
26038
26039 If you want to investigate the person responsible for this outrage,
26040 you can point your (feh!) web browser to
26041 @uref{http://quimby.gnus.org/}.  This is also the primary
26042 distribution point for the new and spiffy versions of Gnus, and is
26043 known as The Site That Destroys Newsrcs And Drives People Mad.
26044
26045 During the first extended alpha period of development, the new Gnus was
26046 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
26047 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
26048 (Besides, the ``Gnus'' in this abbreviation should probably be
26049 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
26050 appropriate name, don't you think?)
26051
26052 In any case, after spending all that energy on coming up with a new and
26053 spunky name, we decided that the name was @emph{too} spunky, so we
26054 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
26055 ``@sc{gnus}''.  New vs. old.
26056
26057 @menu
26058 * Gnus Versions::               What Gnus versions have been released.
26059 * Other Gnus Versions::         Other Gnus versions that also have been released.
26060 * Why?::                        What's the point of Gnus?
26061 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
26062 * Conformity::                  Gnus tries to conform to all standards.
26063 * Emacsen::                     Gnus can be run on a few modern Emacsen.
26064 * Gnus Development::            How Gnus is developed.
26065 * Contributors::                Oodles of people.
26066 * New Features::                Pointers to some of the new stuff in Gnus.
26067 @end menu
26068
26069
26070 @node Gnus Versions
26071 @subsection Gnus Versions
26072 @cindex ding Gnus
26073 @cindex September Gnus
26074 @cindex Red Gnus
26075 @cindex Quassia Gnus
26076 @cindex Pterodactyl Gnus
26077 @cindex Oort Gnus
26078 @cindex No Gnus
26079 @cindex Gnus versions
26080
26081 The first ``proper'' release of Gnus 5 was done in November 1995 when it
26082 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
26083 plus 15 Gnus 5.0 releases).
26084
26085 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
26086 releases)) was released under the name ``Gnus 5.2'' (40 releases).
26087
26088 On July 28th 1996 work on Red Gnus was begun, and it was released on
26089 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
26090
26091 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
26092 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
26093
26094 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
26095 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
26096 1999.
26097
26098 On the 26th of October 2000, Oort Gnus was begun and was released as
26099 Gnus 5.10 on May 1st 2003 (24 releases).
26100
26101 On the January 4th 2004, No Gnus was begun.
26102
26103 If you happen upon a version of Gnus that has a prefixed name --
26104 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
26105 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
26106 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
26107 you do, don't run.  Walk away, calmly, until you're out of its reach.
26108 Find a proper released version of Gnus and snuggle up to that instead.
26109
26110
26111 @node Other Gnus Versions
26112 @subsection Other Gnus Versions
26113 @cindex Semi-gnus
26114
26115 In addition to the versions of Gnus which have had their releases
26116 coordinated by Lars, one major development has been Semi-gnus from
26117 Japan.  It's based on a library called @acronym{SEMI}, which provides
26118 @acronym{MIME} capabilities.
26119
26120 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
26121 Collectively, they are called ``Semi-gnus'', and different strains are
26122 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
26123 @acronym{MIME} and multilingualization things, especially important for
26124 Japanese users.
26125
26126
26127 @node Why?
26128 @subsection Why?
26129
26130 What's the point of Gnus?
26131
26132 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
26133 newsreader, that lets you do anything you can think of.  That was my
26134 original motivation, but while working on Gnus, it has become clear to
26135 me that this generation of newsreaders really belong in the stone age.
26136 Newsreaders haven't developed much since the infancy of the net.  If the
26137 volume continues to rise with the current rate of increase, all current
26138 newsreaders will be pretty much useless.  How do you deal with
26139 newsgroups that have thousands of new articles each day?  How do you
26140 keep track of millions of people who post?
26141
26142 Gnus offers no real solutions to these questions, but I would very much
26143 like to see Gnus being used as a testing ground for new methods of
26144 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
26145 to separate the newsreader from the back ends, Gnus now offers a simple
26146 interface for anybody who wants to write new back ends for fetching mail
26147 and news from different sources.  I have added hooks for customizations
26148 everywhere I could imagine it being useful.  By doing so, I'm inviting
26149 every one of you to explore and invent.
26150
26151 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
26152 @kbd{C-u 100 M-x all-hail-xemacs}.
26153
26154
26155 @node Compatibility
26156 @subsection Compatibility
26157
26158 @cindex compatibility
26159 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
26160 bindings have been kept.  More key bindings have been added, of course,
26161 but only in one or two obscure cases have old bindings been changed.
26162
26163 Our motto is:
26164 @quotation
26165 @cartouche
26166 @center In a cloud bones of steel.
26167 @end cartouche
26168 @end quotation
26169
26170 All commands have kept their names.  Some internal functions have changed
26171 their names.
26172
26173 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
26174 Articles}.
26175
26176 One major compatibility question is the presence of several summary
26177 buffers.  All variables relevant while reading a group are
26178 buffer-local to the summary buffer they belong in.  Although many
26179 important variables have their values copied into their global
26180 counterparts whenever a command is executed in the summary buffer, this
26181 change might lead to incorrect values being used unless you are careful.
26182
26183 All code that relies on knowledge of @sc{gnus} internals will probably
26184 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
26185 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
26186 maintains a hash table that points to the entries in this alist (which
26187 speeds up many functions), and changing the alist directly will lead to
26188 peculiar results.
26189
26190 @cindex hilit19
26191 @cindex highlighting
26192 Old hilit19 code does not work at all.  In fact, you should probably
26193 remove all hilit code from all Gnus hooks
26194 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
26195 Gnus provides various integrated functions for highlighting.  These are
26196 faster and more accurate.  To make life easier for everybody, Gnus will
26197 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
26198 Away!
26199
26200 Packages like @code{expire-kill} will no longer work.  As a matter of
26201 fact, you should probably remove all old @sc{gnus} packages (and other
26202 code) when you start using Gnus.  More likely than not, Gnus already
26203 does what you have written code to make @sc{gnus} do.  (Snicker.)
26204
26205 Even though old methods of doing things are still supported, only the
26206 new methods are documented in this manual.  If you detect a new method of
26207 doing something while reading this manual, that does not mean you have
26208 to stop doing it the old way.
26209
26210 Gnus understands all @sc{gnus} startup files.
26211
26212 @kindex M-x gnus-bug
26213 @findex gnus-bug
26214 @cindex reporting bugs
26215 @cindex bugs
26216 Overall, a casual user who hasn't written much code that depends on
26217 @sc{gnus} internals should suffer no problems.  If problems occur,
26218 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
26219
26220 @vindex gnus-bug-create-help-buffer
26221 If you are in the habit of sending bug reports @emph{very} often, you
26222 may find the helpful help buffer annoying after a while.  If so, set
26223 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
26224 up at you.
26225
26226
26227 @node Conformity
26228 @subsection Conformity
26229
26230 No rebels without a clue here, ma'am.  We conform to all standards known
26231 to (wo)man.  Except for those standards and/or conventions we disagree
26232 with, of course.
26233
26234 @table @strong
26235
26236 @item RFC (2)822
26237 @cindex RFC 822
26238 @cindex RFC 2822
26239 There are no known breaches of this standard.
26240
26241 @item RFC 1036
26242 @cindex RFC 1036
26243 There are no known breaches of this standard, either.
26244
26245 @item Son-of-RFC 1036
26246 @cindex Son-of-RFC 1036
26247 We do have some breaches to this one.
26248
26249 @table @emph
26250
26251 @item X-Newsreader
26252 @itemx User-Agent
26253 These are considered to be ``vanity headers'', while I consider them
26254 to be consumer information.  After seeing so many badly formatted
26255 articles coming from @code{tin} and @code{Netscape} I know not to use
26256 either of those for posting articles.  I would not have known that if
26257 it wasn't for the @code{X-Newsreader} header.
26258 @end table
26259
26260 @item USEFOR
26261 @cindex USEFOR
26262 USEFOR is an IETF working group writing a successor to RFC 1036, based
26263 on Son-of-RFC 1036.  They have produced a number of drafts proposing
26264 various changes to the format of news articles.  The Gnus towers will
26265 look into implementing the changes when the draft is accepted as an RFC.
26266
26267 @item MIME - RFC 2045-2049 etc
26268 @cindex @acronym{MIME}
26269 All the various @acronym{MIME} RFCs are supported.
26270
26271 @item Disposition Notifications - RFC 2298
26272 Message Mode is able to request notifications from the receiver.
26273
26274 @item PGP - RFC 1991 and RFC 2440
26275 @cindex RFC 1991
26276 @cindex RFC 2440
26277 RFC 1991 is the original @acronym{PGP} message specification,
26278 published as an informational RFC.  RFC 2440 was the follow-up, now
26279 called Open PGP, and put on the Standards Track.  Both document a
26280 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
26281 encoding (signing and encryption) and decoding (verification and
26282 decryption).
26283
26284 @item PGP/MIME - RFC 2015/3156
26285 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
26286 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
26287 Gnus supports both encoding and decoding.
26288
26289 @item S/MIME - RFC 2633
26290 RFC 2633 describes the @acronym{S/MIME} format.
26291
26292 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
26293 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
26294 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
26295 authentication for @acronym{IMAP}.  RFC 2086 describes access control
26296 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
26297 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
26298 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
26299 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
26300
26301 @end table
26302
26303 If you ever notice Gnus acting non-compliant with regards to the texts
26304 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
26305 know.
26306
26307
26308 @node Emacsen
26309 @subsection Emacsen
26310 @cindex Emacsen
26311 @cindex XEmacs
26312 @cindex Mule
26313 @cindex Emacs
26314
26315 This version of Gnus should work on:
26316
26317 @itemize @bullet
26318
26319 @item
26320 Emacs 21.1 and up.
26321
26322 @item
26323 XEmacs 21.4 and up.
26324
26325 @end itemize
26326
26327 This Gnus version will absolutely not work on any Emacsen older than
26328 that.  Not reliably, at least.  Older versions of Gnus may work on older
26329 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
26330 20.7 and XEmacs 21.1.
26331
26332 @c No-merge comment: The paragraph added in v5-10 here must not be
26333 @c synced here!
26334
26335 @node Gnus Development
26336 @subsection Gnus Development
26337
26338 Gnus is developed in a two-phased cycle.  The first phase involves much
26339 discussion on the development mailing list @samp{ding@@gnus.org}, where people
26340 propose changes and new features, post patches and new back ends.  This
26341 phase is called the @dfn{alpha} phase, since the Gnusae released in this
26342 phase are @dfn{alpha releases}, or (perhaps more commonly in other
26343 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
26344 unstable and should not be used by casual users.  Gnus alpha releases
26345 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
26346
26347 After futzing around for 10-100 alpha releases, Gnus is declared
26348 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
26349 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
26350 supposed to be able to use these, and these are mostly discussed on the
26351 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
26352 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
26353 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
26354 in Emacs.
26355
26356 @cindex Incoming*
26357 @vindex mail-source-delete-incoming
26358 Some variable defaults differ between alpha Gnusae and released Gnusae,
26359 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26360 lossage of mail if an alpha release hiccups while handling the mail.
26361 @xref{Mail Source Customization}.
26362
26363 The division of discussion between the ding mailing list and the Gnus
26364 newsgroup is not purely based on publicity concerns.  It's true that
26365 having people write about the horrible things that an alpha Gnus release
26366 can do (sometimes) in a public forum may scare people off, but more
26367 importantly, talking about new experimental features that have been
26368 introduced may confuse casual users.  New features are frequently
26369 introduced, fiddled with, and judged to be found wanting, and then
26370 either discarded or totally rewritten.  People reading the mailing list
26371 usually keep up with these rapid changes, while people on the newsgroup
26372 can't be assumed to do so.
26373
26374 So if you have problems with or questions about the alpha versions,
26375 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
26376 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
26377
26378 @cindex Incoming*
26379 @vindex mail-source-delete-incoming
26380 Some variable defaults differ between alpha Gnusae and released Gnusae,
26381 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26382 lossage of mail if an alpha release hiccups while handling the mail.
26383 @xref{Mail Source Customization}.
26384
26385 @node Contributors
26386 @subsection Contributors
26387 @cindex contributors
26388
26389 The new Gnus version couldn't have been done without the help of all the
26390 people on the (ding) mailing list.  Every day for over a year I have
26391 gotten billions of nice bug reports from them, filling me with joy,
26392 every single one of them.  Smooches.  The people on the list have been
26393 tried beyond endurance, what with my ``oh, that's a neat idea <type
26394 type>, yup, I'll release it right away <ship off> no wait, that doesn't
26395 work at all <type type>, yup, I'll ship that one off right away <ship
26396 off> no, wait, that absolutely does not work'' policy for releases.
26397 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
26398 ``worser''? ``much worser''?  ``worsest''?)
26399
26400 I would like to take this opportunity to thank the Academy for@dots{}  oops,
26401 wrong show.
26402
26403 @itemize @bullet
26404
26405 @item
26406 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
26407
26408 @item
26409 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
26410 nnwarchive and many, many other things connected with @acronym{MIME} and
26411 other types of en/decoding, as well as general bug fixing, new
26412 functionality and stuff.
26413
26414 @item
26415 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
26416 well as numerous other things).
26417
26418 @item
26419 Luis Fernandes---design and graphics.
26420
26421 @item
26422 Joe Reiss---creator of the smiley faces.
26423
26424 @item
26425 Justin Sheehy---the @acronym{FAQ} maintainer.
26426
26427 @item
26428 Erik Naggum---help, ideas, support, code and stuff.
26429
26430 @item
26431 Wes Hardaker---@file{gnus-picon.el} and the manual section on
26432 @dfn{picons} (@pxref{Picons}).
26433
26434 @item
26435 Kim-Minh Kaplan---further work on the picon code.
26436
26437 @item
26438 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
26439
26440 @item
26441 Sudish Joseph---innumerable bug fixes.
26442
26443 @item
26444 Ilja Weis---@file{gnus-topic.el}.
26445
26446 @item
26447 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
26448
26449 @item
26450 Vladimir Alexiev---the refcard and reference booklets.
26451
26452 @item
26453 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
26454 distribution by Felix Lee and JWZ.
26455
26456 @item
26457 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
26458
26459 @item
26460 Peter Mutsaers---orphan article scoring code.
26461
26462 @item
26463 Ken Raeburn---POP mail support.
26464
26465 @item
26466 Hallvard B Furuseth---various bits and pieces, especially dealing with
26467 .newsrc files.
26468
26469 @item
26470 Brian Edmonds---@file{gnus-bbdb.el}.
26471
26472 @item
26473 David Moore---rewrite of @file{nnvirtual.el} and many other things.
26474
26475 @item
26476 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
26477
26478 @item
26479 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
26480 well as autoconf support.
26481
26482 @end itemize
26483
26484 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
26485 Borges, and Jost Krieger proof-reading parts of the manual.
26486
26487 The following people have contributed many patches and suggestions:
26488
26489 Christopher Davis,
26490 Andrew Eskilsson,
26491 Kai Grossjohann,
26492 Kevin Greiner,
26493 Jesper Harder,
26494 Paul Jarc,
26495 Simon Josefsson,
26496 David K@aa{}gedal,
26497 Richard Pieri,
26498 Fabrice Popineau,
26499 Daniel Quinlan,
26500 Michael Shields,
26501 Reiner Steib,
26502 Jason L. Tibbitts, III,
26503 Jack Vinson,
26504 Katsumi Yamaoka, @c Yamaoka
26505 and
26506 Teodor Zlatanov.
26507
26508 Also thanks to the following for patches and stuff:
26509
26510 Jari Aalto,
26511 Adrian Aichner,
26512 Vladimir Alexiev,
26513 Russ Allbery,
26514 Peter Arius,
26515 Matt Armstrong,
26516 Marc Auslander,
26517 Miles Bader,
26518 Alexei V. Barantsev,
26519 Frank Bennett,
26520 Robert Bihlmeyer,
26521 Chris Bone,
26522 Mark Borges,
26523 Mark Boyns,
26524 Lance A. Brown,
26525 Rob Browning,
26526 Kees de Bruin,
26527 Martin Buchholz,
26528 Joe Buehler,
26529 Kevin Buhr,
26530 Alastair Burt,
26531 Joao Cachopo,
26532 Zlatko Calusic,
26533 Massimo Campostrini,
26534 Castor,
26535 David Charlap,
26536 Dan Christensen,
26537 Kevin Christian,
26538 Jae-you Chung, @c ?
26539 James H. Cloos, Jr.,
26540 Laura Conrad,
26541 Michael R. Cook,
26542 Glenn Coombs,
26543 Andrew J. Cosgriff,
26544 Neil Crellin,
26545 Frank D. Cringle,
26546 Geoffrey T. Dairiki,
26547 Andre Deparade,
26548 Ulrik Dickow,
26549 Dave Disser,
26550 Rui-Tao Dong, @c ?
26551 Joev Dubach,
26552 Michael Welsh Duggan,
26553 Dave Edmondson,
26554 Paul Eggert,
26555 Mark W. Eichin,
26556 Karl Eichwalder,
26557 Enami Tsugutomo, @c Enami
26558 Michael Ernst,
26559 Luc Van Eycken,
26560 Sam Falkner,
26561 Nelson Jose dos Santos Ferreira,
26562 Sigbjorn Finne,
26563 Sven Fischer,
26564 Paul Fisher,
26565 Decklin Foster,
26566 Gary D. Foster,
26567 Paul Franklin,
26568 Guy Geens,
26569 Arne Georg Gleditsch,
26570 David S. Goldberg,
26571 Michelangelo Grigni,
26572 Dale Hagglund,
26573 D. Hall,
26574 Magnus Hammerin,
26575 Kenichi Handa, @c Handa
26576 Raja R. Harinath,
26577 Yoshiki Hayashi, @c Hayashi
26578 P. E. Jareth Hein,
26579 Hisashige Kenji, @c Hisashige
26580 Scott Hofmann,
26581 Tassilo Horn,
26582 Marc Horowitz,
26583 Gunnar Horrigmo,
26584 Richard Hoskins,
26585 Brad Howes,
26586 Miguel de Icaza,
26587 Fran@,{c}ois Felix Ingrand,
26588 Tatsuya Ichikawa, @c Ichikawa
26589 Ishikawa Ichiro, @c Ishikawa
26590 Lee Iverson,
26591 Iwamuro Motonori, @c Iwamuro
26592 Rajappa Iyer,
26593 Andreas Jaeger,
26594 Adam P. Jenkins,
26595 Randell Jesup,
26596 Fred Johansen,
26597 Gareth Jones,
26598 Greg Klanderman,
26599 Karl Kleinpaste,
26600 Michael Klingbeil,
26601 Peter Skov Knudsen,
26602 Shuhei Kobayashi, @c Kobayashi
26603 Petr Konecny,
26604 Koseki Yoshinori, @c Koseki
26605 Thor Kristoffersen,
26606 Jens Lautenbacher,
26607 Martin Larose,
26608 Seokchan Lee, @c Lee
26609 Joerg Lenneis,
26610 Carsten Leonhardt,
26611 James LewisMoss,
26612 Christian Limpach,
26613 Markus Linnala,
26614 Dave Love,
26615 Mike McEwan,
26616 Tonny Madsen,
26617 Shlomo Mahlab,
26618 Nat Makarevitch,
26619 Istvan Marko,
26620 David Martin,
26621 Jason R. Mastaler,
26622 Gordon Matzigkeit,
26623 Timo Metzemakers,
26624 Richard Mlynarik,
26625 Lantz Moore,
26626 Morioka Tomohiko, @c Morioka
26627 Erik Toubro Nielsen,
26628 Hrvoje Niksic,
26629 Andy Norman,
26630 Fred Oberhauser,
26631 C. R. Oldham,
26632 Alexandre Oliva,
26633 Ken Olstad,
26634 Masaharu Onishi, @c Onishi
26635 Hideki Ono, @c Ono
26636 Ettore Perazzoli,
26637 William Perry,
26638 Stephen Peters,
26639 Jens-Ulrik Holger Petersen,
26640 Ulrich Pfeifer,
26641 Matt Pharr,
26642 Andy Piper,
26643 John McClary Prevost,
26644 Bill Pringlemeir,
26645 Mike Pullen,
26646 Jim Radford,
26647 Colin Rafferty,
26648 Lasse Rasinen,
26649 Lars Balker Rasmussen,
26650 Joe Reiss,
26651 Renaud Rioboo,
26652 Roland B. Roberts,
26653 Bart Robinson,
26654 Christian von Roques,
26655 Markus Rost,
26656 Jason Rumney,
26657 Wolfgang Rupprecht,
26658 Jay Sachs,
26659 Dewey M. Sasser,
26660 Conrad Sauerwald,
26661 Loren Schall,
26662 Dan Schmidt,
26663 Ralph Schleicher,
26664 Philippe Schnoebelen,
26665 Andreas Schwab,
26666 Randal L. Schwartz,
26667 Danny Siu,
26668 Matt Simmons,
26669 Paul D. Smith,
26670 Jeff Sparkes,
26671 Toby Speight,
26672 Michael Sperber,
26673 Darren Stalder,
26674 Richard Stallman,
26675 Greg Stark,
26676 Sam Steingold,
26677 Paul Stevenson,
26678 Jonas Steverud,
26679 Paul Stodghill,
26680 Kiyokazu Suto, @c Suto
26681 Kurt Swanson,
26682 Samuel Tardieu,
26683 Teddy,
26684 Chuck Thompson,
26685 Tozawa Akihiko, @c Tozawa
26686 Philippe Troin,
26687 James Troup,
26688 Trung Tran-Duc,
26689 Jack Twilley,
26690 Aaron M. Ucko,
26691 Aki Vehtari,
26692 Didier Verna,
26693 Vladimir Volovich,
26694 Jan Vroonhof,
26695 Stefan Waldherr,
26696 Pete Ware,
26697 Barry A. Warsaw,
26698 Christoph Wedler,
26699 Joe Wells,
26700 Lee Willis,
26701 and
26702 Lloyd Zusman.
26703
26704
26705 For a full overview of what each person has done, the ChangeLogs
26706 included in the Gnus alpha distributions should give ample reading
26707 (550kB and counting).
26708
26709 Apologies to everybody that I've forgotten, of which there are many, I'm
26710 sure.
26711
26712 Gee, that's quite a list of people.  I guess that must mean that there
26713 actually are people who are using Gnus.  Who'd'a thunk it!
26714
26715
26716 @node New Features
26717 @subsection New Features
26718 @cindex new features
26719
26720 @menu
26721 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
26722 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
26723 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
26724 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
26725 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
26726 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
26727 * No Gnus::                     Very punny.
26728 @end menu
26729
26730 These lists are, of course, just @emph{short} overviews of the
26731 @emph{most} important new features.  No, really.  There are tons more.
26732 Yes, we have feeping creaturism in full effect.
26733
26734 @node ding Gnus
26735 @subsubsection (ding) Gnus
26736
26737 New features in Gnus 5.0/5.1:
26738
26739 @itemize @bullet
26740
26741 @item
26742 The look of all buffers can be changed by setting format-like variables
26743 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
26744
26745 @item
26746 Local spool and several @acronym{NNTP} servers can be used at once
26747 (@pxref{Select Methods}).
26748
26749 @item
26750 You can combine groups into virtual groups (@pxref{Virtual Groups}).
26751
26752 @item
26753 You can read a number of different mail formats (@pxref{Getting Mail}).
26754 All the mail back ends implement a convenient mail expiry scheme
26755 (@pxref{Expiring Mail}).
26756
26757 @item
26758 Gnus can use various strategies for gathering threads that have lost
26759 their roots (thereby gathering loose sub-threads into one thread) or it
26760 can go back and retrieve enough headers to build a complete thread
26761 (@pxref{Customizing Threading}).
26762
26763 @item
26764 Killed groups can be displayed in the group buffer, and you can read
26765 them as well (@pxref{Listing Groups}).
26766
26767 @item
26768 Gnus can do partial group updates---you do not have to retrieve the
26769 entire active file just to check for new articles in a few groups
26770 (@pxref{The Active File}).
26771
26772 @item
26773 Gnus implements a sliding scale of subscribedness to groups
26774 (@pxref{Group Levels}).
26775
26776 @item
26777 You can score articles according to any number of criteria
26778 (@pxref{Scoring}).  You can even get Gnus to find out how to score
26779 articles for you (@pxref{Adaptive Scoring}).
26780
26781 @item
26782 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
26783 manner, so it should be difficult to lose much data on what you have
26784 read if your machine should go down (@pxref{Auto Save}).
26785
26786 @item
26787 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
26788 cluttering up the @file{.emacs} file.
26789
26790 @item
26791 You can set the process mark on both groups and articles and perform
26792 operations on all the marked items (@pxref{Process/Prefix}).
26793
26794 @item
26795 You can grep through a subset of groups and create a group from the
26796 results (@pxref{Kibozed Groups}).
26797
26798 @item
26799 You can list subsets of groups according to, well, anything
26800 (@pxref{Listing Groups}).
26801
26802 @item
26803 You can browse foreign servers and subscribe to groups from those
26804 servers (@pxref{Browse Foreign Server}).
26805
26806 @item
26807 Gnus can fetch articles, asynchronously, on a second connection to the
26808 server (@pxref{Asynchronous Fetching}).
26809
26810 @item
26811 You can cache articles locally (@pxref{Article Caching}).
26812
26813 @item
26814 The uudecode functions have been expanded and generalized
26815 (@pxref{Decoding Articles}).
26816
26817 @item
26818 You can still post uuencoded articles, which was a little-known feature
26819 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
26820
26821 @item
26822 Fetching parents (and other articles) now actually works without
26823 glitches (@pxref{Finding the Parent}).
26824
26825 @item
26826 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
26827
26828 @item
26829 Digests (and other files) can be used as the basis for groups
26830 (@pxref{Document Groups}).
26831
26832 @item
26833 Articles can be highlighted and customized (@pxref{Customizing
26834 Articles}).
26835
26836 @item
26837 URLs and other external references can be buttonized (@pxref{Article
26838 Buttons}).
26839
26840 @item
26841 You can do lots of strange stuff with the Gnus window & frame
26842 configuration (@pxref{Window Layout}).
26843
26844 @item
26845 You can click on buttons instead of using the keyboard
26846 (@pxref{Buttons}).
26847
26848 @end itemize
26849
26850
26851 @node September Gnus
26852 @subsubsection September Gnus
26853
26854 @iftex
26855 @iflatex
26856 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
26857 @end iflatex
26858 @end iftex
26859
26860 New features in Gnus 5.2/5.3:
26861
26862 @itemize @bullet
26863
26864 @item
26865 A new message composition mode is used.  All old customization variables
26866 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
26867 now obsolete.
26868
26869 @item
26870 Gnus is now able to generate @dfn{sparse} threads---threads where
26871 missing articles are represented by empty nodes (@pxref{Customizing
26872 Threading}).
26873
26874 @lisp
26875 (setq gnus-build-sparse-threads 'some)
26876 @end lisp
26877
26878 @item
26879 Outgoing articles are stored on a special archive server
26880 (@pxref{Archived Messages}).
26881
26882 @item
26883 Partial thread regeneration now happens when articles are
26884 referred.
26885
26886 @item
26887 Gnus can make use of GroupLens predictions.
26888
26889 @item
26890 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
26891
26892 @item
26893 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
26894
26895 @lisp
26896 (setq gnus-use-trees t)
26897 @end lisp
26898
26899 @item
26900 An @code{nn}-like pick-and-read minor mode is available for the summary
26901 buffers (@pxref{Pick and Read}).
26902
26903 @lisp
26904 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
26905 @end lisp
26906
26907 @item
26908 In binary groups you can use a special binary minor mode (@pxref{Binary
26909 Groups}).
26910
26911 @item
26912 Groups can be grouped in a folding topic hierarchy (@pxref{Group
26913 Topics}).
26914
26915 @lisp
26916 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
26917 @end lisp
26918
26919 @item
26920 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
26921
26922 @item
26923 Groups can now have a score, and bubbling based on entry frequency
26924 is possible (@pxref{Group Score}).
26925
26926 @lisp
26927 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
26928 @end lisp
26929
26930 @item
26931 Groups can be process-marked, and commands can be performed on
26932 groups of groups (@pxref{Marking Groups}).
26933
26934 @item
26935 Caching is possible in virtual groups.
26936
26937 @item
26938 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
26939 news batches, ClariNet briefs collections, and just about everything
26940 else (@pxref{Document Groups}).
26941
26942 @item
26943 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
26944 (@pxref{SOUP}).
26945
26946 @item
26947 The Gnus cache is much faster.
26948
26949 @item
26950 Groups can be sorted according to many criteria (@pxref{Sorting
26951 Groups}).
26952
26953 @item
26954 New group parameters have been introduced to set list-addresses and
26955 expiry times (@pxref{Group Parameters}).
26956
26957 @item
26958 All formatting specs allow specifying faces to be used
26959 (@pxref{Formatting Fonts}).
26960
26961 @item
26962 There are several more commands for setting/removing/acting on process
26963 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
26964
26965 @item
26966 The summary buffer can be limited to show parts of the available
26967 articles based on a wide range of criteria.  These commands have been
26968 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
26969
26970 @item
26971 Articles can be made persistent with the @kbd{*} command
26972 (@pxref{Persistent Articles}).
26973
26974 @item
26975 All functions for hiding article elements are now toggles.
26976
26977 @item
26978 Article headers can be buttonized (@pxref{Article Washing}).
26979
26980 @item
26981 All mail back ends support fetching articles by @code{Message-ID}.
26982
26983 @item
26984 Duplicate mail can now be treated properly (@pxref{Duplicates}).
26985
26986 @item
26987 All summary mode commands are available directly from the article
26988 buffer (@pxref{Article Keymap}).
26989
26990 @item
26991 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
26992 Layout}).
26993
26994 @item
26995 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
26996 @iftex
26997 @iflatex
26998 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
26999 @end iflatex
27000 @end iftex
27001
27002 @item
27003 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
27004
27005 @lisp
27006 (setq gnus-use-nocem t)
27007 @end lisp
27008
27009 @item
27010 Groups can be made permanently visible (@pxref{Listing Groups}).
27011
27012 @lisp
27013 (setq gnus-permanently-visible-groups "^nnml:")
27014 @end lisp
27015
27016 @item
27017 Many new hooks have been introduced to make customizing easier.
27018
27019 @item
27020 Gnus respects the @code{Mail-Copies-To} header.
27021
27022 @item
27023 Threads can be gathered by looking at the @code{References} header
27024 (@pxref{Customizing Threading}).
27025
27026 @lisp
27027 (setq gnus-summary-thread-gathering-function
27028       'gnus-gather-threads-by-references)
27029 @end lisp
27030
27031 @item
27032 Read articles can be stored in a special backlog buffer to avoid
27033 refetching (@pxref{Article Backlog}).
27034
27035 @lisp
27036 (setq gnus-keep-backlog 50)
27037 @end lisp
27038
27039 @item
27040 A clean copy of the current article is always stored in a separate
27041 buffer to allow easier treatment.
27042
27043 @item
27044 Gnus can suggest where to save articles (@pxref{Saving Articles}).
27045
27046 @item
27047 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
27048 Articles}).
27049
27050 @lisp
27051 (setq gnus-prompt-before-saving t)
27052 @end lisp
27053
27054 @item
27055 @code{gnus-uu} can view decoded files asynchronously while fetching
27056 articles (@pxref{Other Decode Variables}).
27057
27058 @lisp
27059 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
27060 @end lisp
27061
27062 @item
27063 Filling in the article buffer now works properly on cited text
27064 (@pxref{Article Washing}).
27065
27066 @item
27067 Hiding cited text adds buttons to toggle hiding, and how much
27068 cited text to hide is now customizable (@pxref{Article Hiding}).
27069
27070 @lisp
27071 (setq gnus-cited-lines-visible 2)
27072 @end lisp
27073
27074 @item
27075 Boring headers can be hidden (@pxref{Article Hiding}).
27076
27077 @item
27078 Default scoring values can now be set from the menu bar.
27079
27080 @item
27081 Further syntax checking of outgoing articles have been added.
27082
27083 @end itemize
27084
27085
27086 @node Red Gnus
27087 @subsubsection Red Gnus
27088
27089 New features in Gnus 5.4/5.5:
27090
27091 @iftex
27092 @iflatex
27093 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
27094 @end iflatex
27095 @end iftex
27096
27097 @itemize @bullet
27098
27099 @item
27100 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
27101
27102 @item
27103 Article prefetching functionality has been moved up into
27104 Gnus (@pxref{Asynchronous Fetching}).
27105
27106 @item
27107 Scoring can now be performed with logical operators like @code{and},
27108 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
27109 Scoring}).
27110
27111 @item
27112 Article washing status can be displayed in the
27113 article mode line (@pxref{Misc Article}).
27114
27115 @item
27116 @file{gnus.el} has been split into many smaller files.
27117
27118 @item
27119 Suppression of duplicate articles based on Message-ID can be done
27120 (@pxref{Duplicate Suppression}).
27121
27122 @lisp
27123 (setq gnus-suppress-duplicates t)
27124 @end lisp
27125
27126 @item
27127 New variables for specifying what score and adapt files are to be
27128 considered home score and adapt files (@pxref{Home Score File}) have
27129 been added.
27130
27131 @item
27132 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
27133 Server Internals}).
27134
27135 @item
27136 Groups can inherit group parameters from parent topics (@pxref{Topic
27137 Parameters}).
27138
27139 @item
27140 Article editing has been revamped and is now actually usable.
27141
27142 @item
27143 Signatures can be recognized in more intelligent fashions
27144 (@pxref{Article Signature}).
27145
27146 @item
27147 Summary pick mode has been made to look more @code{nn}-like.  Line
27148 numbers are displayed and the @kbd{.} command can be used to pick
27149 articles (@code{Pick and Read}).
27150
27151 @item
27152 Commands for moving the @file{.newsrc.eld} from one server to
27153 another have been added (@pxref{Changing Servers}).
27154
27155 @item
27156 There's a way now to specify that ``uninteresting'' fields be suppressed
27157 when generating lines in buffers (@pxref{Advanced Formatting}).
27158
27159 @item
27160 Several commands in the group buffer can be undone with @kbd{C-M-_}
27161 (@pxref{Undo}).
27162
27163 @item
27164 Scoring can be done on words using the new score type @code{w}
27165 (@pxref{Score File Format}).
27166
27167 @item
27168 Adaptive scoring can be done on a Subject word-by-word basis
27169 (@pxref{Adaptive Scoring}).
27170
27171 @lisp
27172 (setq gnus-use-adaptive-scoring '(word))
27173 @end lisp
27174
27175 @item
27176 Scores can be decayed (@pxref{Score Decays}).
27177
27178 @lisp
27179 (setq gnus-decay-scores t)
27180 @end lisp
27181
27182 @item
27183 Scoring can be performed using a regexp on the Date header.  The Date is
27184 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
27185
27186 @item
27187 A new command has been added to remove all data on articles from
27188 the native server (@pxref{Changing Servers}).
27189
27190 @item
27191 A new command for reading collections of documents
27192 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
27193 (@pxref{Really Various Summary Commands}).
27194
27195 @item
27196 Process mark sets can be pushed and popped (@pxref{Setting Process
27197 Marks}).
27198
27199 @item
27200 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
27201 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
27202
27203 @item
27204 A new back end for reading searches from Web search engines
27205 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
27206 (@pxref{Web Searches}).
27207
27208 @item
27209 Groups inside topics can now be sorted using the standard sorting
27210 functions, and each topic can be sorted independently (@pxref{Topic
27211 Sorting}).
27212
27213 @item
27214 Subsets of the groups can be sorted independently (@code{Sorting
27215 Groups}).
27216
27217 @item
27218 Cached articles can be pulled into the groups (@pxref{Summary Generation
27219 Commands}).
27220 @iftex
27221 @iflatex
27222 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
27223 @end iflatex
27224 @end iftex
27225
27226 @item
27227 Score files are now applied in a more reliable order (@pxref{Score
27228 Variables}).
27229
27230 @item
27231 Reports on where mail messages end up can be generated (@pxref{Splitting
27232 Mail}).
27233
27234 @item
27235 More hooks and functions have been added to remove junk from incoming
27236 mail before saving the mail (@pxref{Washing Mail}).
27237
27238 @item
27239 Emphasized text can be properly fontisized:
27240
27241 @end itemize
27242
27243
27244 @node Quassia Gnus
27245 @subsubsection Quassia Gnus
27246
27247 New features in Gnus 5.6:
27248
27249 @itemize @bullet
27250
27251 @item
27252 New functionality for using Gnus as an offline newsreader has been
27253 added.  A plethora of new commands and modes have been added.
27254 @xref{Gnus Unplugged}, for the full story.
27255
27256 @item
27257 The @code{nndraft} back end has returned, but works differently than
27258 before.  All Message buffers are now also articles in the @code{nndraft}
27259 group, which is created automatically.
27260
27261 @item
27262 @code{gnus-alter-header-function} can now be used to alter header
27263 values.
27264
27265 @item
27266 @code{gnus-summary-goto-article} now accept Message-ID's.
27267
27268 @item
27269 A new Message command for deleting text in the body of a message
27270 outside the region: @kbd{C-c C-v}.
27271
27272 @item
27273 You can now post to component group in @code{nnvirtual} groups with
27274 @kbd{C-u C-c C-c}.
27275
27276 @item
27277  @code{nntp-rlogin-program}---new variable to ease customization.
27278
27279 @item
27280 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
27281 re-highlighting of the article buffer.
27282
27283 @item
27284 New element in @code{gnus-boring-article-headers}---@code{long-to}.
27285
27286 @item
27287 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
27288 details.
27289
27290 @item
27291 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
27292 @kbd{a} to add the score rule to the @file{all.SCORE} file.
27293
27294 @item
27295 @code{gnus-simplify-subject-functions} variable to allow greater
27296 control over simplification.
27297
27298 @item
27299 @kbd{A T}---new command for fetching the current thread.
27300
27301 @item
27302 @kbd{/ T}---new command for including the current thread in the
27303 limit.
27304
27305 @item
27306 @kbd{M-RET} is a new Message command for breaking cited text.
27307
27308 @item
27309 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
27310
27311 @item
27312 The @code{custom-face-lookup} function has been removed.
27313 If you used this function in your initialization files, you must
27314 rewrite them to use @code{face-spec-set} instead.
27315
27316 @item
27317 Canceling now uses the current select method.  Symbolic prefix
27318 @kbd{a} forces normal posting method.
27319
27320 @item
27321 New command to translate M******** sm*rtq**t*s into proper
27322 text---@kbd{W d}.
27323
27324 @item
27325 For easier debugging of @code{nntp}, you can set
27326 @code{nntp-record-commands} to a non-@code{nil} value.
27327
27328 @item
27329 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
27330 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
27331
27332 @item
27333 A command for editing group parameters from the summary buffer
27334 has been added.
27335
27336 @item
27337 A history of where mails have been split is available.
27338
27339 @item
27340 A new article date command has been added---@code{article-date-iso8601}.
27341
27342 @item
27343 Subjects can be simplified when threading by setting
27344 @code{gnus-score-thread-simplify}.
27345
27346 @item
27347 A new function for citing in Message has been
27348 added---@code{message-cite-original-without-signature}.
27349
27350 @item
27351 @code{article-strip-all-blank-lines}---new article command.
27352
27353 @item
27354 A new Message command to kill to the end of the article has
27355 been added.
27356
27357 @item
27358 A minimum adaptive score can be specified by using the
27359 @code{gnus-adaptive-word-minimum} variable.
27360
27361 @item
27362 The ``lapsed date'' article header can be kept continually
27363 updated by the @code{gnus-start-date-timer} command.
27364
27365 @item
27366 Web listserv archives can be read with the @code{nnlistserv} back end.
27367
27368 @item
27369 Old dejanews archives can now be read by @code{nnweb}.
27370
27371 @end itemize
27372
27373 @node Pterodactyl Gnus
27374 @subsubsection Pterodactyl Gnus
27375
27376 New features in Gnus 5.8:
27377
27378 @itemize @bullet
27379
27380 @item
27381 The mail-fetching functions have changed.  See the manual for the
27382 many details.  In particular, all procmail fetching variables are gone.
27383
27384 If you used procmail like in
27385
27386 @lisp
27387 (setq nnmail-use-procmail t)
27388 (setq nnmail-spool-file 'procmail)
27389 (setq nnmail-procmail-directory "~/mail/incoming/")
27390 (setq nnmail-procmail-suffix "\\.in")
27391 @end lisp
27392
27393 this now has changed to
27394
27395 @lisp
27396 (setq mail-sources
27397       '((directory :path "~/mail/incoming/"
27398                    :suffix ".in")))
27399 @end lisp
27400
27401 @xref{Mail Source Specifiers}.
27402
27403 @item
27404 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
27405 Gnus, and adds a slew of new commands.  See the manual for details.
27406
27407 @item
27408 Gnus has also been multilingualized.  This also affects too
27409 many parts of Gnus to summarize here, and adds many new variables.
27410
27411 @item
27412 @code{gnus-auto-select-first} can now be a function to be
27413 called to position point.
27414
27415 @item
27416 The user can now decide which extra headers should be included in
27417 summary buffers and @acronym{NOV} files.
27418
27419 @item
27420 @code{gnus-article-display-hook} has been removed.  Instead, a number
27421 of variables starting with @code{gnus-treat-} have been added.
27422
27423 @item
27424 The Gnus posting styles have been redone again and now works in a
27425 subtly different manner.
27426
27427 @item
27428 New web-based back ends have been added: @code{nnslashdot},
27429 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
27430 again, to keep up with ever-changing layouts.
27431
27432 @item
27433 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
27434
27435 @end itemize
27436
27437 @node Oort Gnus
27438 @subsubsection Oort Gnus
27439 @cindex Oort Gnus
27440
27441 New features in Gnus 5.10:
27442
27443 @itemize @bullet
27444
27445 @item Installation changes
27446 @c ***********************
27447
27448 @itemize @bullet
27449 @item
27450 Upgrading from previous (stable) version if you have used Oort.
27451
27452 If you have tried Oort (the unstable Gnus branch leading to this
27453 release) but went back to a stable version, be careful when upgrading to
27454 this version.  In particular, you will probably want to remove all
27455 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
27456 read from your @file{.newsrc.eld} instead of from the
27457 @file{.marks}/@file{.mrk} file where this release store flags.  See a
27458 later entry for more information about marks.  Note that downgrading
27459 isn't save in general.
27460
27461 @item
27462 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
27463 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
27464 the new installer issues a warning if other Gnus installations which
27465 will shadow the latest one are detected.  You can then remove those
27466 shadows manually or remove them using @code{make
27467 remove-installed-shadows}.
27468
27469 @item
27470 New @file{make.bat} for compiling and installing Gnus under MS Windows
27471
27472 Use @file{make.bat} if you want to install Gnus under MS Windows, the
27473 first argument to the batch-program should be the directory where
27474 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
27475 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
27476 the second parameter.
27477
27478 @file{make.bat} has been rewritten from scratch, it now features
27479 automatic recognition of XEmacs and GNU Emacs, generates
27480 @file{gnus-load.el}, checks if errors occur while compilation and
27481 generation of info files and reports them at the end of the build
27482 process.  It now uses @code{makeinfo} if it is available and falls
27483 back to @file{infohack.el} otherwise.  @file{make.bat} should now
27484 install all files which are necessary to run Gnus and be generally a
27485 complete replacement for the @code{configure; make; make install}
27486 cycle used under Unix systems.
27487
27488 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
27489 superfluous, so they have been removed.
27490
27491 @item
27492 @file{~/News/overview/} not used.
27493
27494 As a result of the following change, the @file{~/News/overview/}
27495 directory is not used any more.  You can safely delete the entire
27496 hierarchy.
27497
27498 @c FIXME: `gnus-load' is mentioned in README, which is not included in
27499 @c CVS.  We should find a better place for this item.
27500 @item
27501 @code{(require 'gnus-load)}
27502
27503 If you use a stand-alone Gnus distribution, you'd better add
27504 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
27505 lisp directory into load-path.
27506
27507 File @file{gnus-load.el} contains autoload commands, functions and variables,
27508 some of which may not be included in distributions of Emacsen.
27509
27510 @end itemize
27511
27512 @item New packages and libraries within Gnus
27513 @c *****************************************
27514
27515 @itemize @bullet
27516
27517 @item
27518 The revised Gnus @acronym{FAQ} is included in the manual,
27519 @xref{Frequently Asked Questions}.
27520
27521 @item
27522 @acronym{TLS} wrapper shipped with Gnus
27523
27524 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
27525 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
27526 @acronym{TLS}/@acronym{SSL} support via (external third party)
27527 @file{ssl.el} and OpenSSL still works.
27528
27529 @item
27530 Improved anti-spam features.
27531
27532 Gnus is now able to take out spam from your mail and news streams
27533 using a wide variety of programs and filter rules.  Among the supported
27534 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
27535 for easy use of external packages such as SpamAssassin and Hashcash
27536 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
27537 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
27538
27539 @item
27540 Gnus supports server-side mail filtering using Sieve.
27541
27542 Sieve rules can be added as Group Parameters for groups, and the
27543 complete Sieve script is generated using @kbd{D g} from the Group
27544 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
27545 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
27546 manual @ref{Top, , Top, sieve, Emacs Sieve}.
27547
27548 @end itemize
27549
27550 @item Changes in group mode
27551 @c ************************
27552
27553 @itemize @bullet
27554
27555 @item
27556 @code{gnus-group-read-ephemeral-group} can be called interactively,
27557 using @kbd{G M}.
27558
27559 @item
27560 Retrieval of charters and control messages
27561
27562 There are new commands for fetching newsgroup charters (@kbd{H c}) and
27563 control messages (@kbd{H C}).
27564
27565 @item
27566 The new variable @code{gnus-parameters} can be used to set group parameters.
27567
27568 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
27569 the parameters in @file{~/.newsrc.eld}, but via this variable you can
27570 enjoy the powers of customize, and simplified backups since you set the
27571 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
27572 variable maps regular expressions matching group names to group
27573 parameters, a'la:
27574 @lisp
27575 (setq gnus-parameters
27576       '(("mail\\..*"
27577          (gnus-show-threads nil)
27578          (gnus-use-scoring nil))
27579         ("^nnimap:\\(foo.bar\\)$"
27580          (to-group . "\\1"))))
27581 @end lisp
27582
27583 @item
27584 Unread count correct in nnimap groups.
27585
27586 The estimated number of unread articles in the group buffer should now
27587 be correct for nnimap groups.  This is achieved by calling
27588 @code{nnimap-fixup-unread-after-getting-new-news} from the
27589 @code{gnus-setup-news-hook} (called on startup) and
27590 @code{gnus-after-getting-new-news-hook}. (called after getting new
27591 mail).  If you have modified those variables from the default, you may
27592 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
27593 you were happy with the estimate and want to save some (minimal) time
27594 when getting new mail, remove the function.
27595
27596 @item
27597 Group names are treated as UTF-8 by default.
27598
27599 This is supposedly what USEFOR wanted to migrate to.  See
27600 @code{gnus-group-name-charset-group-alist} and
27601 @code{gnus-group-name-charset-method-alist} for customization.
27602
27603 @item
27604 @code{gnus-group-charset-alist} and
27605 @code{gnus-group-ignored-charsets-alist}.
27606
27607 The regexps in these variables are compared with full group names
27608 instead of real group names in 5.8.  Users who customize these
27609 variables should change those regexps accordingly.  For example:
27610 @lisp
27611 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
27612 @end lisp
27613
27614 @item
27615 Old intermediate incoming mail files (@file{Incoming*}) are deleted
27616 after a couple of days, not immediately.  @xref{Mail Source
27617 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
27618
27619 @end itemize
27620
27621 @item Changes in summary and article mode
27622 @c **************************************
27623
27624 @itemize @bullet
27625
27626 @item
27627 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
27628 (@code{gnus-article-reply-with-original}) only yank the text in the
27629 region if the region is active.
27630
27631 @item
27632 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
27633 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
27634
27635 @item
27636 Article Buttons
27637
27638 More buttons for URLs, mail addresses, Message-IDs, Info links, man
27639 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
27640 variables @code{gnus-button-@var{*}-level} can be used to control the
27641 appearance of all article buttons.  @xref{Article Button Levels}.
27642
27643 @item
27644 Single-part yenc encoded attachments can be decoded.
27645
27646 @item
27647 Picons
27648
27649 The picons code has been reimplemented to work in GNU Emacs---some of
27650 the previous options have been removed or renamed.
27651
27652 Picons are small ``personal icons'' representing users, domain and
27653 newsgroups, which can be displayed in the Article buffer.
27654 @xref{Picons}.
27655
27656 @item
27657 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
27658 boundary line is drawn at the end of the headers.
27659
27660 @item
27661 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
27662
27663 @item
27664 The Summary Buffer uses an arrow in the fringe to indicate the current
27665 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
27666
27667 @item
27668 Warn about email replies to news
27669
27670 Do you often find yourself replying to news by email by mistake?  Then
27671 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
27672 you.
27673
27674 @item
27675 If the new option @code{gnus-summary-display-while-building} is
27676 non-@code{nil}, the summary buffer is shown and updated as it's being
27677 built.
27678
27679 @item
27680 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
27681 opposed to old but unread messages).
27682
27683 @item
27684 Gnus supports RFC 2369 mailing list headers, and adds a number of
27685 related commands in mailing list groups.  @xref{Mailing List}.
27686
27687 @item
27688 The Date header can be displayed in a format that can be read aloud
27689 in English.  @xref{Article Date}.
27690
27691 @item
27692 diffs are automatically highlighted in groups matching
27693 @code{mm-uu-diff-groups-regexp}
27694
27695 @item
27696 Better handling of Microsoft citation styles
27697
27698 Gnus now tries to recognize the mangled header block that some Microsoft
27699 mailers use to indicate that the rest of the message is a citation, even
27700 though it is not quoted in any way.  The variable
27701 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
27702 citations.
27703
27704 The new command @kbd{W Y f}
27705 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
27706 Outlook (Express) articles.
27707
27708 @item
27709 @code{gnus-article-skip-boring}
27710
27711 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
27712 not scroll down to show you a page that contains only boring text,
27713 which by default means cited text and signature.  You can customize
27714 what is skippable using @code{gnus-article-boring-faces}.
27715
27716 This feature is especially useful if you read many articles that
27717 consist of a little new content at the top with a long, untrimmed
27718 message cited below.
27719
27720 @item
27721 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
27722 Emacs too.
27723
27724 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
27725 disable it.
27726
27727 @item
27728 Face headers handling.  @xref{Face}.
27729
27730 @item
27731 In the summary buffer, the new command @kbd{/ N} inserts new messages
27732 and @kbd{/ o} inserts old messages.
27733
27734 @item
27735 Gnus decodes morse encoded messages if you press @kbd{W m}.
27736
27737 @item
27738 @code{gnus-summary-line-format}
27739
27740 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
27741 %s\n}.  Moreover @code{gnus-extra-headers},
27742 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
27743 changed their default so that the users name will be replaced by the
27744 recipient's name or the group name posting to for @acronym{NNTP}
27745 groups.
27746
27747 @item
27748 Deleting of attachments.
27749
27750 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
27751 on @acronym{MIME} buttons) saves a part and replaces the part with an
27752 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
27753 @acronym{MIME} buttons) removes a part.  It works only on back ends
27754 that support editing.
27755
27756 @item
27757 @code{gnus-default-charset}
27758
27759 The default value is determined from the
27760 @code{current-language-environment} variable, instead of
27761 @code{iso-8859-1}.  Also the @samp{.*} item in
27762 @code{gnus-group-charset-alist} is removed.
27763
27764 @item
27765 Printing capabilities are enhanced.
27766
27767 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
27768 Article buffers.  Also, each individual @acronym{MIME} part can be
27769 printed using @kbd{p} on the @acronym{MIME} button.
27770
27771 @item
27772 Extended format specs.
27773
27774 Format spec @samp{%&user-date;} is added into
27775 @code{gnus-summary-line-format-alist}.  Also, user defined extended
27776 format specs are supported.  The extended format specs look like
27777 @samp{%u&foo;}, which invokes function
27778 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
27779 escape character, old user defined format @samp{%u&} is no longer supported.
27780
27781 @item
27782 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
27783 @c FIXME: Was this a user-visible change?
27784
27785 It was aliased to @kbd{Y c}
27786 (@code{gnus-summary-insert-cached-articles}).  The new function filters
27787 out other articles.
27788
27789 @item
27790 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
27791
27792 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
27793 s}, @kbd{/ a}, and @kbd{/ x}
27794 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
27795 result will be to display all articles that do not match the expression.
27796
27797 @item
27798 Gnus inlines external parts (message/external).
27799
27800 @end itemize
27801
27802 @item Changes in Message mode and related Gnus features
27803 @c ****************************************************
27804
27805 @itemize @bullet
27806
27807 @item
27808 Delayed articles
27809
27810 You can delay the sending of a message with @kbd{C-c C-j} in the Message
27811 buffer.  The messages are delivered at specified time.  This is useful
27812 for sending yourself reminders.  @xref{Delayed Articles}.
27813
27814 @item
27815 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
27816 the nnml back end allows compressed message files.
27817
27818 @item
27819 The new option @code{gnus-gcc-mark-as-read} automatically marks
27820 Gcc articles as read.
27821
27822 @item
27823 Externalizing of attachments
27824
27825 If @code{gnus-gcc-externalize-attachments} or
27826 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
27827 local files as external parts.
27828
27829 @item
27830 The envelope sender address can be customized when using Sendmail.
27831 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
27832
27833 @item
27834 Gnus no longer generate the Sender: header automatically.
27835
27836 Earlier it was generated when the user configurable email address was
27837 different from the Gnus guessed default user address.  As the guessing
27838 algorithm is rarely correct these days, and (more controversially) the
27839 only use of the Sender: header was to check if you are entitled to
27840 cancel/supersede news (which is now solved by Cancel Locks instead,
27841 see another entry), generation of the header has been disabled by
27842 default.  See the variables @code{message-required-headers},
27843 @code{message-required-news-headers}, and
27844 @code{message-required-mail-headers}.
27845
27846 @item
27847 Features from third party @file{message-utils.el} added to @file{message.el}.
27848
27849 Message now asks if you wish to remove @samp{(was: <old subject>)} from
27850 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
27851 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
27852 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
27853 appropriate headers and a note in the body for cross-postings and
27854 followups (see the variables @code{message-cross-post-@var{*}}).
27855
27856 @item
27857 References and X-Draft-From headers are no longer generated when you
27858 start composing messages and @code{message-generate-headers-first} is
27859 @code{nil}.
27860
27861 @item
27862 Easy inclusion of X-Faces headers.  @xref{X-Face}.
27863
27864 @item
27865 Group Carbon Copy (GCC) quoting
27866
27867 To support groups that contains SPC and other weird characters, groups
27868 are quoted before they are placed in the Gcc: header.  This means
27869 variables such as @code{gnus-message-archive-group} should no longer
27870 contain quote characters to make groups containing SPC work.  Also, if
27871 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
27872 into two groups) you must change it to return the list
27873 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
27874 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
27875 was incorrect earlier, it just didn't generate any problems since it
27876 was inserted directly.
27877
27878 @item
27879 @code{message-insinuate-rmail}
27880
27881 Adding @code{(message-insinuate-rmail)} and @code{(setq
27882 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
27883 compose, reply and forward messages in message-mode, where you can
27884 enjoy the power of @acronym{MML}.
27885
27886 @item
27887 @code{message-minibuffer-local-map}
27888
27889 The line below enables BBDB in resending a message:
27890 @lisp
27891 (define-key message-minibuffer-local-map [(tab)]
27892   'bbdb-complete-name)
27893 @end lisp
27894
27895 @item
27896 @code{gnus-posting-styles}
27897
27898 Add a new format of match like
27899 @lisp
27900 ((header "to" "larsi.*org")
27901  (Organization "Somewhere, Inc."))
27902 @end lisp
27903 The old format like the lines below is obsolete, but still accepted.
27904 @lisp
27905 (header "to" "larsi.*org"
27906         (Organization "Somewhere, Inc."))
27907 @end lisp
27908
27909 @item
27910 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
27911
27912 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
27913 added into these two variables.  If you customized those, perhaps you
27914 need add those two headers too.
27915
27916 @item
27917 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
27918 composing messages, it is enabled by @code{use-hard-newlines}.
27919 Decoding format=flowed was present but not documented in earlier
27920 versions.
27921
27922 @item
27923 The option @code{mm-fill-flowed} can be used to disable treatment of
27924 ``format=flowed'' messages.  Also, flowed text is disabled when sending
27925 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
27926 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
27927 @c This entry is also present in the node "No Gnus".
27928
27929 @item
27930 Gnus supports the generation of RFC 2298 Disposition Notification requests.
27931
27932 This is invoked with the @kbd{C-c M-n} key binding from message mode.
27933
27934 @item
27935 Message supports the Importance: (RFC 2156) header.
27936
27937 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
27938 the valid values.
27939
27940 @item
27941 Gnus supports Cancel Locks in News.
27942
27943 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
27944 used to determine if you wrote an article or not (for canceling and
27945 superseding).  Gnus generates a random password string the first time
27946 you post a message, and saves it in your @file{~/.emacs} using the Custom
27947 system.  While the variable is called @code{canlock-password}, it is not
27948 security sensitive data.  Publishing your canlock string on the web
27949 will not allow anyone to be able to anything she could not already do.
27950 The behavior can be changed by customizing @code{message-insert-canlock}.
27951
27952 @item
27953 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
27954 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
27955
27956 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
27957 additional Lisp libraries.  This add several menu items to the
27958 Attachments menu, and @kbd{C-c RET} key bindings, when composing
27959 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
27960
27961 @item
27962 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
27963 C-m}.
27964
27965 This change was made to avoid conflict with the standard binding of
27966 @code{back-to-indentation}, which is also useful in message mode.
27967
27968 @item
27969 The default for @code{message-forward-show-mml} changed to the symbol
27970 @code{best}.
27971
27972 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
27973 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
27974 used when forwarding signed or encrypted messages, as the conversion
27975 invalidate the digital signature.
27976
27977 @item
27978 If @code{auto-compression-mode} is enabled, attachments are automatically
27979 decompressed when activated.
27980 @c FIXME: Does this affect article or message mode?
27981
27982 @item
27983 Support for non-@acronym{ASCII} domain names
27984
27985 Message supports non-@acronym{ASCII} domain names in From:, To: and
27986 Cc: and will query you whether to perform encoding when you try to
27987 send a message.  The variable @code{message-use-idna} controls this.
27988 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
27989 and Cc: when you view a message.  The variable @code{gnus-use-idna}
27990 controls this.
27991
27992 @item You can now drag and drop attachments to the Message buffer.
27993 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
27994 @xref{MIME, ,MIME, message, Message Manual}.
27995 @c New in 5.10.9 / 5.11 (Emacs 21.1)
27996
27997 @item @code{auto-fill-mode} is enabled by default in Message mode.
27998 See @code{message-fill-column}.  @xref{Various Message Variables, ,
27999 Message Headers, message, Message Manual}.
28000 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28001
28002 @end itemize
28003
28004 @item Changes in back ends
28005 @c ***********************
28006
28007 @itemize @bullet
28008 @item
28009 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
28010
28011 @item
28012 The nndoc back end now supports mailman digests and exim bounces.
28013
28014 @item
28015 Gnus supports Maildir groups.
28016
28017 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
28018
28019 @item
28020 The nnml and nnfolder back ends store marks for each groups.
28021
28022 This makes it possible to take backup of nnml/nnfolder servers/groups
28023 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
28024 makes it possible to share articles and marks between users (without
28025 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
28026 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
28027 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
28028 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
28029 another machine, Gnus will automatically use the @file{.marks} or
28030 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
28031 The new server variables @code{nnml-marks-is-evil} and
28032 @code{nnfolder-marks-is-evil} can be used to disable this feature.
28033
28034 @end itemize
28035
28036 @item Appearance
28037 @c *************
28038
28039 @itemize @bullet
28040
28041 @item
28042 The menu bar item (in Group and Summary buffer) named ``Misc'' has
28043 been renamed to ``Gnus''.
28044
28045 @item
28046 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
28047 renamed to ``Attachments''.  Note that this menu also contains security
28048 related stuff, like signing and encryption (@pxref{Security, Security,,
28049 message, Message Manual}).
28050
28051 @item
28052 The tool bars have been updated to use GNOME icons in Group, Summary and
28053 Message mode.  You can also customize the tool bars: @kbd{M-x
28054 customize-apropos RET -tool-bar$} should get you started.  This is a new
28055 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
28056
28057 @item The tool bar icons are now (de)activated correctly
28058 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
28059 Its default value depends on your Emacs version.  This is a new feature
28060 in Gnus 5.10.9.
28061 @end itemize
28062
28063
28064 @item Miscellaneous changes
28065 @c ************************
28066
28067 @itemize @bullet
28068
28069 @item
28070 @code{gnus-agent}
28071
28072 The Gnus Agent has seen a major updated and is now enabled by default,
28073 and all nntp and nnimap servers from @code{gnus-select-method} and
28074 @code{gnus-secondary-select-method} are agentized by default.  Earlier
28075 only the server in @code{gnus-select-method} was agentized by the
28076 default, and the agent was disabled by default.  When the agent is
28077 enabled, headers are now also retrieved from the Agent cache instead
28078 of the back ends when possible.  Earlier this only happened in the
28079 unplugged state.  You can enroll or remove servers with @kbd{J a} and
28080 @kbd{J r} in the server buffer.  Gnus will not download articles into
28081 the Agent cache, unless you instruct it to do so, though, by using
28082 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
28083 behavior of having the Agent disabled with @code{(setq gnus-agent
28084 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
28085 is not needed any more.
28086
28087 @item
28088 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
28089
28090 If one reads an article while plugged, and the article already exists
28091 in the Agent, it won't get downloaded once more.  @code{(setq
28092 gnus-agent-cache nil)} reverts to the old behavior.
28093
28094 @item
28095 Dired integration
28096
28097 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
28098 bindings in dired buffers to send a file as an attachment, open a file
28099 using the appropriate mailcap entry, and print a file using the mailcap
28100 entry.
28101
28102 @item
28103 The format spec @code{%C} for positioning point has changed to @code{%*}.
28104
28105 @item
28106 @code{gnus-slave-unplugged}
28107
28108 A new command which starts Gnus offline in slave mode.
28109
28110 @end itemize
28111
28112 @end itemize
28113
28114 @node No Gnus
28115 @subsubsection No Gnus
28116 @cindex No Gnus
28117
28118 New features in No Gnus:
28119 @c FIXME: Gnus 5.12?
28120
28121 @include gnus-news.texi
28122
28123 @iftex
28124
28125 @page
28126 @node The Manual
28127 @section The Manual
28128 @cindex colophon
28129 @cindex manual
28130
28131 This manual was generated from a TeXinfo file and then run through
28132 either @code{texi2dvi}
28133 @iflatex
28134 or my own home-brewed TeXinfo to \LaTeX\ transformer,
28135 and then run through @code{latex} and @code{dvips}
28136 @end iflatex
28137 to get what you hold in your hands now.
28138
28139 The following conventions have been used:
28140
28141 @enumerate
28142
28143 @item
28144 This is a @samp{string}
28145
28146 @item
28147 This is a @kbd{keystroke}
28148
28149 @item
28150 This is a @file{file}
28151
28152 @item
28153 This is a @code{symbol}
28154
28155 @end enumerate
28156
28157 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
28158 mean:
28159
28160 @lisp
28161 (setq flargnoze "yes")
28162 @end lisp
28163
28164 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
28165
28166 @lisp
28167 (setq flumphel 'yes)
28168 @end lisp
28169
28170 @samp{yes} and @code{yes} are two @emph{very} different things---don't
28171 ever get them confused.
28172
28173 @iflatex
28174 @c @head
28175 Of course, everything in this manual is of vital interest, so you should
28176 read it all.  Several times.  However, if you feel like skimming the
28177 manual, look for that gnu head you should see in the margin over
28178 there---it means that what's being discussed is of more importance than
28179 the rest of the stuff.  (On the other hand, if everything is infinitely
28180 important, how can anything be more important than that?  Just one more
28181 of the mysteries of this world, I guess.)
28182 @end iflatex
28183
28184 @end iftex
28185
28186
28187 @node On Writing Manuals
28188 @section On Writing Manuals
28189
28190 I guess most manuals are written after-the-fact; documenting a program
28191 that's already there.  This is not how this manual is written.  When
28192 implementing something, I write the manual entry for that something
28193 straight away.  I then see that it's difficult to explain the
28194 functionality, so I write how it's supposed to be, and then I change the
28195 implementation.  Writing the documentation and writing the code go hand
28196 in hand.
28197
28198 This, of course, means that this manual has no, or little, flow.  It
28199 documents absolutely everything in Gnus, but often not where you're
28200 looking for it.  It is a reference manual, and not a guide to how to get
28201 started with Gnus.
28202
28203 That would be a totally different book, that should be written using the
28204 reference manual as source material.  It would look quite different.
28205
28206
28207 @page
28208 @node Terminology
28209 @section Terminology
28210
28211 @cindex terminology
28212 @table @dfn
28213
28214 @item news
28215 @cindex news
28216 This is what you are supposed to use this thing for---reading news.
28217 News is generally fetched from a nearby @acronym{NNTP} server, and is
28218 generally publicly available to everybody.  If you post news, the entire
28219 world is likely to read just what you have written, and they'll all
28220 snigger mischievously.  Behind your back.
28221
28222 @item mail
28223 @cindex mail
28224 Everything that's delivered to you personally is mail.  Some news/mail
28225 readers (like Gnus) blur the distinction between mail and news, but
28226 there is a difference.  Mail is private.  News is public.  Mailing is
28227 not posting, and replying is not following up.
28228
28229 @item reply
28230 @cindex reply
28231 Send a mail to the person who has written what you are reading.
28232
28233 @item follow up
28234 @cindex follow up
28235 Post an article to the current newsgroup responding to the article you
28236 are reading.
28237
28238 @item back end
28239 @cindex back end
28240 Gnus considers mail and news to be mostly the same, really.  The only
28241 difference is how to access the actual articles.  News articles are
28242 commonly fetched via the protocol @acronym{NNTP}, whereas mail
28243 messages could be read from a file on the local disk.  The internal
28244 architecture of Gnus thus comprises a ``front end'' and a number of
28245 ``back ends''.  Internally, when you enter a group (by hitting
28246 @key{RET}, say), you thereby invoke a function in the front end in
28247 Gnus.  The front end then ``talks'' to a back end and says things like
28248 ``Give me the list of articles in the foo group'' or ``Show me article
28249 number 4711''.
28250
28251 So a back end mainly defines either a protocol (the @code{nntp} back
28252 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
28253 accesses mail via @acronym{IMAP}) or a file format and directory
28254 layout (the @code{nnspool} back end accesses news via the common
28255 ``spool directory'' format, the @code{nnml} back end access mail via a
28256 file format and directory layout that's quite similar).
28257
28258 Gnus does not handle the underlying media, so to speak---this is all
28259 done by the back ends.  A back end is a collection of functions to
28260 access the articles.
28261
28262 However, sometimes the term ``back end'' is also used where ``server''
28263 would have been more appropriate.  And then there is the term ``select
28264 method'' which can mean either.  The Gnus terminology can be quite
28265 confusing.
28266
28267 @item native
28268 @cindex native
28269 Gnus will always use one method (and back end) as the @dfn{native}, or
28270 default, way of getting news.
28271
28272 @item foreign
28273 @cindex foreign
28274 You can also have any number of foreign groups active at the same time.
28275 These are groups that use non-native non-secondary back ends for getting
28276 news.
28277
28278 @item secondary
28279 @cindex secondary
28280 Secondary back ends are somewhere half-way between being native and being
28281 foreign, but they mostly act like they are native.
28282
28283 @item article
28284 @cindex article
28285 A message that has been posted as news.
28286
28287 @item mail message
28288 @cindex mail message
28289 A message that has been mailed.
28290
28291 @item message
28292 @cindex message
28293 A mail message or news article
28294
28295 @item head
28296 @cindex head
28297 The top part of a message, where administrative information (etc.) is
28298 put.
28299
28300 @item body
28301 @cindex body
28302 The rest of an article.  Everything not in the head is in the
28303 body.
28304
28305 @item header
28306 @cindex header
28307 A line from the head of an article.
28308
28309 @item headers
28310 @cindex headers
28311 A collection of such lines, or a collection of heads.  Or even a
28312 collection of @acronym{NOV} lines.
28313
28314 @item @acronym{NOV}
28315 @cindex @acronym{NOV}
28316 @acronym{NOV} stands for News OverView, which is a type of news server
28317 header which provide datas containing the condensed header information
28318 of articles.  They are produced by the server itself; in the @code{nntp}
28319 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
28320 Gnus makes them by itself for some backends (in particular, @code{nnml}).
28321
28322 When Gnus enters a group, it asks the back end for the headers of all
28323 unread articles in the group.  Most servers support the News OverView
28324 format, which is more compact and much faster to read and parse than the
28325 normal @sc{head} format.
28326
28327 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
28328 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
28329 where each line has the header information of one article.  The header
28330 information is a tab-separated series of the header's contents including
28331 an article number, a subject, an author, a date, a message-id,
28332 references, etc.
28333
28334 Those data enable Gnus to generate summary lines quickly.  However, if
28335 the server does not support @acronym{NOV} or you disable it purposely or
28336 for some reason, Gnus will try to generate the header information by
28337 parsing each article's headers one by one.  It will take time.
28338 Therefore, it is not usually a good idea to set nn*-nov-is-evil
28339 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
28340 know that the server makes wrong @acronym{NOV} data.
28341
28342 @item level
28343 @cindex levels
28344 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
28345 that have a lower level are ``more'' subscribed than the groups with a
28346 higher level.  In fact, groups on levels 1-5 are considered
28347 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
28348 are @dfn{killed}.  Commands for listing groups and scanning for new
28349 articles will all use the numeric prefix as @dfn{working level}.
28350
28351 @item killed groups
28352 @cindex killed groups
28353 No information on killed groups is stored or updated, which makes killed
28354 groups much easier to handle than subscribed groups.
28355
28356 @item zombie groups
28357 @cindex zombie groups
28358 Just like killed groups, only slightly less dead.
28359
28360 @item active file
28361 @cindex active file
28362 The news server has to keep track of what articles it carries, and what
28363 groups exist.  All this information in stored in the active file, which
28364 is rather large, as you might surmise.
28365
28366 @item bogus groups
28367 @cindex bogus groups
28368 A group that exists in the @file{.newsrc} file, but isn't known to the
28369 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
28370 This means that the group probably doesn't exist (any more).
28371
28372 @item activating
28373 @cindex activating groups
28374 The act of asking the server for info on a group and computing the
28375 number of unread articles is called @dfn{activating the group}.
28376 Un-activated groups are listed with @samp{*} in the group buffer.
28377
28378 @item spool
28379 @cindex spool
28380 News servers store their articles locally in one fashion or other.
28381 One old-fashioned storage method is to have just one file per
28382 article.  That's called a ``traditional spool''.
28383
28384 @item server
28385 @cindex server
28386 A machine one can connect to and get news (or mail) from.
28387
28388 @item select method
28389 @cindex select method
28390 A structure that specifies the back end, the server and the virtual
28391 server settings.
28392
28393 @item virtual server
28394 @cindex virtual server
28395 A named select method.  Since a select method defines all there is to
28396 know about connecting to a (physical) server, taking the thing as a
28397 whole is a virtual server.
28398
28399 @item washing
28400 @cindex washing
28401 Taking a buffer and running it through a filter of some sort.  The
28402 result will (more often than not) be cleaner and more pleasing than the
28403 original.
28404
28405 @item ephemeral groups
28406 @cindex ephemeral groups
28407 @cindex temporary groups
28408 Most groups store data on what articles you have read.  @dfn{Ephemeral}
28409 groups are groups that will have no data stored---when you exit the
28410 group, it'll disappear into the aether.
28411
28412 @item solid groups
28413 @cindex solid groups
28414 This is the opposite of ephemeral groups.  All groups listed in the
28415 group buffer are solid groups.
28416
28417 @item sparse articles
28418 @cindex sparse articles
28419 These are article placeholders shown in the summary buffer when
28420 @code{gnus-build-sparse-threads} has been switched on.
28421
28422 @item threading
28423 @cindex threading
28424 To put responses to articles directly after the articles they respond
28425 to---in a hierarchical fashion.
28426
28427 @item root
28428 @cindex root
28429 @cindex thread root
28430 The first article in a thread is the root.  It is the ancestor of all
28431 articles in the thread.
28432
28433 @item parent
28434 @cindex parent
28435 An article that has responses.
28436
28437 @item child
28438 @cindex child
28439 An article that responds to a different article---its parent.
28440
28441 @item digest
28442 @cindex digest
28443 A collection of messages in one file.  The most common digest format is
28444 specified by RFC 1153.
28445
28446 @item splitting
28447 @cindex splitting, terminology
28448 @cindex mail sorting
28449 @cindex mail filtering (splitting)
28450 The action of sorting your emails according to certain rules. Sometimes
28451 incorrectly called mail filtering.
28452
28453 @end table
28454
28455
28456 @page
28457 @node Customization
28458 @section Customization
28459 @cindex general customization
28460
28461 All variables are properly documented elsewhere in this manual.  This
28462 section is designed to give general pointers on how to customize Gnus
28463 for some quite common situations.
28464
28465 @menu
28466 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
28467 * Slow Terminal Connection::    You run a remote Emacs.
28468 * Little Disk Space::           You feel that having large setup files is icky.
28469 * Slow Machine::                You feel like buying a faster machine.
28470 @end menu
28471
28472
28473 @node Slow/Expensive Connection
28474 @subsection Slow/Expensive Connection
28475
28476 If you run Emacs on a machine locally, and get your news from a machine
28477 over some very thin strings, you want to cut down on the amount of data
28478 Gnus has to get from the server.
28479
28480 @table @code
28481
28482 @item gnus-read-active-file
28483 Set this to @code{nil}, which will inhibit Gnus from requesting the
28484 entire active file from the server.  This file is often very large.  You
28485 also have to set @code{gnus-check-new-newsgroups} and
28486 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
28487 doesn't suddenly decide to fetch the active file anyway.
28488
28489 @item gnus-nov-is-evil
28490 @vindex gnus-nov-is-evil
28491 Usually this one must @emph{always} be @code{nil} (which is the
28492 default).  If, for example, you wish to not use @acronym{NOV}
28493 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
28494 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
28495 instead of setting this.  But you normally do not need to set
28496 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
28497 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
28498 headers from the @acronym{NNTP} server will not be very fast if you tell
28499 Gnus not to use @acronym{NOV}.
28500
28501 As the variables for the other back ends, there are
28502 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
28503 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
28504 @code{nnml-nov-is-evil}, @code{nnspool-nov-is-evil}, and
28505 @code{nnwarchive-nov-is-evil}.  Note that a non-@code{nil} value for
28506 @code{gnus-nov-is-evil} overrides all those variables.@footnote{Although
28507 the back ends @code{nnkiboze}, @code{nnslashdot}, @code{nnultimate}, and
28508 @code{nnwfm} don't have their own nn*-nov-is-evil.}
28509 @end table
28510
28511
28512 @node Slow Terminal Connection
28513 @subsection Slow Terminal Connection
28514
28515 Let's say you use your home computer for dialing up the system that runs
28516 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
28517 possible) the amount of data sent over the wires.
28518
28519 @table @code
28520
28521 @item gnus-auto-center-summary
28522 Set this to @code{nil} to inhibit Gnus from re-centering the summary
28523 buffer all the time.  If it is @code{vertical}, do only vertical
28524 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
28525 horizontal and vertical recentering.
28526
28527 @item gnus-visible-headers
28528 Cut down on the headers included in the articles to the
28529 minimum.  You can, in fact, make do without them altogether---most of the
28530 useful data is in the summary buffer, anyway.  Set this variable to
28531 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
28532
28533 Use the following to enable all the available hiding features:
28534 @lisp
28535 (setq gnus-treat-hide-headers 'head
28536       gnus-treat-hide-signature t
28537       gnus-treat-hide-citation t)
28538 @end lisp
28539
28540 @item gnus-use-full-window
28541 By setting this to @code{nil}, you can make all the windows smaller.
28542 While this doesn't really cut down much generally, it means that you
28543 have to see smaller portions of articles before deciding that you didn't
28544 want to read them anyway.
28545
28546 @item gnus-thread-hide-subtree
28547 If this is non-@code{nil}, all threads in the summary buffer will be
28548 hidden initially.
28549
28550
28551 @item gnus-updated-mode-lines
28552 If this is @code{nil}, Gnus will not put information in the buffer mode
28553 lines, which might save some time.
28554 @end table
28555
28556
28557 @node Little Disk Space
28558 @subsection Little Disk Space
28559 @cindex disk space
28560
28561 The startup files can get rather large, so you may want to cut their
28562 sizes a bit if you are running out of space.
28563
28564 @table @code
28565
28566 @item gnus-save-newsrc-file
28567 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
28568 only save @file{.newsrc.eld}.  This means that you will not be able to
28569 use any other newsreaders than Gnus.  This variable is @code{t} by
28570 default.
28571
28572 @item gnus-read-newsrc-file
28573 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
28574 only read @file{.newsrc.eld}.  This means that you will not be able to
28575 use any other newsreaders than Gnus.  This variable is @code{t} by
28576 default.
28577
28578 @item gnus-save-killed-list
28579 If this is @code{nil}, Gnus will not save the list of dead groups.  You
28580 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
28581 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
28582 variable to @code{nil}.  This variable is @code{t} by default.
28583
28584 @end table
28585
28586
28587 @node Slow Machine
28588 @subsection Slow Machine
28589 @cindex slow machine
28590
28591 If you have a slow machine, or are just really impatient, there are a
28592 few things you can do to make Gnus run faster.
28593
28594 Set @code{gnus-check-new-newsgroups} and
28595 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
28596
28597 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
28598 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
28599 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
28600
28601
28602 @page
28603 @node Troubleshooting
28604 @section Troubleshooting
28605 @cindex troubleshooting
28606
28607 Gnus works @emph{so} well straight out of the box---I can't imagine any
28608 problems, really.
28609
28610 Ahem.
28611
28612 @enumerate
28613
28614 @item
28615 Make sure your computer is switched on.
28616
28617 @item
28618 Make sure that you really load the current Gnus version.  If you have
28619 been running @sc{gnus}, you need to exit Emacs and start it up again before
28620 Gnus will work.
28621
28622 @item
28623 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
28624 like @c
28625 @samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
28626 @c
28627 you have the right files loaded.  Otherwise you have some old @file{.el}
28628 files lying around.  Delete these.
28629
28630 @item
28631 Read the help group (@kbd{G h} in the group buffer) for a
28632 @acronym{FAQ} and a how-to.
28633
28634 @item
28635 @vindex max-lisp-eval-depth
28636 Gnus works on many recursive structures, and in some extreme (and very
28637 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
28638 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
28639 something like that.
28640 @end enumerate
28641
28642 If all else fails, report the problem as a bug.
28643
28644 @cindex bugs
28645 @cindex reporting bugs
28646
28647 @kindex M-x gnus-bug
28648 @findex gnus-bug
28649 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
28650 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
28651 me the backtrace.  I will fix bugs, but I can only fix them if you send
28652 me a precise description as to how to reproduce the bug.
28653
28654 You really can never be too detailed in a bug report.  Always use the
28655 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
28656 a 10Kb mail each time you use it, and even if you have sent me your
28657 environment 500 times before.  I don't care.  I want the full info each
28658 time.
28659
28660 It is also important to remember that I have no memory whatsoever.  If
28661 you send a bug report, and I send you a reply, and then you just send
28662 back ``No, it's not! Moron!'', I will have no idea what you are
28663 insulting me about.  Always over-explain everything.  It's much easier
28664 for all of us---if I don't have all the information I need, I will just
28665 mail you and ask for more info, and everything takes more time.
28666
28667 If the problem you're seeing is very visual, and you can't quite explain
28668 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
28669 it somewhere it can be reached, and include the URL of the picture in
28670 the bug report.
28671
28672 @cindex patches
28673 If you would like to contribute a patch to fix bugs or make
28674 improvements, please produce the patch using @samp{diff -u}.
28675
28676 @cindex edebug
28677 If you want to debug your problem further before reporting, possibly
28678 in order to solve the problem yourself and send a patch, you can use
28679 edebug.  Debugging Lisp code is documented in the Elisp manual
28680 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
28681 Lisp Reference Manual}).  To get you started with edebug, consider if
28682 you discover some weird behavior when pressing @kbd{c}, the first
28683 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
28684 the documentation buffer that leads you to the function definition,
28685 then press @kbd{M-x edebug-defun RET} with point inside that function,
28686 return to Gnus and press @kbd{c} to invoke the code.  You will be
28687 placed in the lisp buffer and can single step using @kbd{SPC} and
28688 evaluate expressions using @kbd{M-:} or inspect variables using
28689 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
28690 @kbd{c} or @kbd{g}.
28691
28692 @cindex elp
28693 @cindex profile
28694 @cindex slow
28695 Sometimes, a problem do not directly generate an elisp error but
28696 manifests itself by causing Gnus to be very slow.  In these cases, you
28697 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
28698 slow, and then try to analyze the backtrace (repeating the procedure
28699 helps isolating the real problem areas).
28700
28701 A fancier approach is to use the elisp profiler, ELP.  The profiler is
28702 (or should be) fully documented elsewhere, but to get you started
28703 there are a few steps that need to be followed.  First, instrument the
28704 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
28705 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
28706 RET message}.  Then perform the operation that is slow and press
28707 @kbd{M-x elp-results}.  You will then see which operations that takes
28708 time, and can debug them further.  If the entire operation takes much
28709 longer than the time spent in the slowest function in the profiler
28710 output, you probably profiled the wrong part of Gnus.  To reset
28711 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
28712 elp-restore-all} is supposed to remove profiling, but given the
28713 complexities and dynamic code generation in Gnus, it might not always
28714 work perfectly.
28715
28716 @cindex gnu.emacs.gnus
28717 @cindex ding mailing list
28718 If you just need help, you are better off asking on
28719 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
28720 @email{ding@@gnus.org, the ding mailing list}.  Write to
28721 @email{ding-request@@gnus.org} to subscribe.
28722
28723
28724 @page
28725 @node Gnus Reference Guide
28726 @section Gnus Reference Guide
28727
28728 It is my hope that other people will figure out smart stuff that Gnus
28729 can do, and that other people will write those smart things as well.  To
28730 facilitate that I thought it would be a good idea to describe the inner
28731 workings of Gnus.  And some of the not-so-inner workings, while I'm at
28732 it.
28733
28734 You can never expect the internals of a program not to change, but I
28735 will be defining (in some details) the interface between Gnus and its
28736 back ends (this is written in stone), the format of the score files
28737 (ditto), data structures (some are less likely to change than others)
28738 and general methods of operation.
28739
28740 @menu
28741 * Gnus Utility Functions::      Common functions and variable to use.
28742 * Back End Interface::          How Gnus communicates with the servers.
28743 * Score File Syntax::           A BNF definition of the score file standard.
28744 * Headers::                     How Gnus stores headers internally.
28745 * Ranges::                      A handy format for storing mucho numbers.
28746 * Group Info::                  The group info format.
28747 * Extended Interactive::        Symbolic prefixes and stuff.
28748 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
28749 * Various File Formats::        Formats of files that Gnus use.
28750 @end menu
28751
28752
28753 @node Gnus Utility Functions
28754 @subsection Gnus Utility Functions
28755 @cindex Gnus utility functions
28756 @cindex utility functions
28757 @cindex functions
28758 @cindex internal variables
28759
28760 When writing small functions to be run from hooks (and stuff), it's
28761 vital to have access to the Gnus internal functions and variables.
28762 Below is a list of the most common ones.
28763
28764 @table @code
28765
28766 @item gnus-newsgroup-name
28767 @vindex gnus-newsgroup-name
28768 This variable holds the name of the current newsgroup.
28769
28770 @item gnus-find-method-for-group
28771 @findex gnus-find-method-for-group
28772 A function that returns the select method for @var{group}.
28773
28774 @item gnus-group-real-name
28775 @findex gnus-group-real-name
28776 Takes a full (prefixed) Gnus group name, and returns the unprefixed
28777 name.
28778
28779 @item gnus-group-prefixed-name
28780 @findex gnus-group-prefixed-name
28781 Takes an unprefixed group name and a select method, and returns the full
28782 (prefixed) Gnus group name.
28783
28784 @item gnus-get-info
28785 @findex gnus-get-info
28786 Returns the group info list for @var{group}.
28787
28788 @item gnus-group-unread
28789 @findex gnus-group-unread
28790 The number of unread articles in @var{group}, or @code{t} if that is
28791 unknown.
28792
28793 @item gnus-active
28794 @findex gnus-active
28795 The active entry for @var{group}.
28796
28797 @item gnus-set-active
28798 @findex gnus-set-active
28799 Set the active entry for @var{group}.
28800
28801 @item gnus-add-current-to-buffer-list
28802 @findex gnus-add-current-to-buffer-list
28803 Adds the current buffer to the list of buffers to be killed on Gnus
28804 exit.
28805
28806 @item gnus-continuum-version
28807 @findex gnus-continuum-version
28808 Takes a Gnus version string as a parameter and returns a floating point
28809 number.  Earlier versions will always get a lower number than later
28810 versions.
28811
28812 @item gnus-group-read-only-p
28813 @findex gnus-group-read-only-p
28814 Says whether @var{group} is read-only or not.
28815
28816 @item gnus-news-group-p
28817 @findex gnus-news-group-p
28818 Says whether @var{group} came from a news back end.
28819
28820 @item gnus-ephemeral-group-p
28821 @findex gnus-ephemeral-group-p
28822 Says whether @var{group} is ephemeral or not.
28823
28824 @item gnus-server-to-method
28825 @findex gnus-server-to-method
28826 Returns the select method corresponding to @var{server}.
28827
28828 @item gnus-server-equal
28829 @findex gnus-server-equal
28830 Says whether two virtual servers are equal.
28831
28832 @item gnus-group-native-p
28833 @findex gnus-group-native-p
28834 Says whether @var{group} is native or not.
28835
28836 @item gnus-group-secondary-p
28837 @findex gnus-group-secondary-p
28838 Says whether @var{group} is secondary or not.
28839
28840 @item gnus-group-foreign-p
28841 @findex gnus-group-foreign-p
28842 Says whether @var{group} is foreign or not.
28843
28844 @item gnus-group-find-parameter
28845 @findex gnus-group-find-parameter
28846 Returns the parameter list of @var{group}.  If given a second parameter,
28847 returns the value of that parameter for @var{group}.
28848
28849 @item gnus-group-set-parameter
28850 @findex gnus-group-set-parameter
28851 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
28852
28853 @item gnus-narrow-to-body
28854 @findex gnus-narrow-to-body
28855 Narrows the current buffer to the body of the article.
28856
28857 @item gnus-check-backend-function
28858 @findex gnus-check-backend-function
28859 Takes two parameters, @var{function} and @var{group}.  If the back end
28860 @var{group} comes from supports @var{function}, return non-@code{nil}.
28861
28862 @lisp
28863 (gnus-check-backend-function "request-scan" "nnml:misc")
28864 @result{} t
28865 @end lisp
28866
28867 @item gnus-read-method
28868 @findex gnus-read-method
28869 Prompts the user for a select method.
28870
28871 @end table
28872
28873
28874 @node Back End Interface
28875 @subsection Back End Interface
28876
28877 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
28878 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
28879 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
28880 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
28881 examples of the latter we have @code{nntp-port-number} and
28882 @code{nnmbox-directory}.
28883
28884 When Gnus asks for information from a back end---say @code{nntp}---on
28885 something, it will normally include a virtual server name in the
28886 function parameters.  (If not, the back end should use the ``current''
28887 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
28888 server as its only (optional) parameter.  If this virtual server hasn't
28889 been opened, the function should fail.
28890
28891 Note that a virtual server name has no relation to some physical server
28892 name.  Take this example:
28893
28894 @lisp
28895 (nntp "odd-one"
28896       (nntp-address "ifi.uio.no")
28897       (nntp-port-number 4324))
28898 @end lisp
28899
28900 Here the virtual server name is @samp{odd-one} while the name of
28901 the physical server is @samp{ifi.uio.no}.
28902
28903 The back ends should be able to switch between several virtual servers.
28904 The standard back ends implement this by keeping an alist of virtual
28905 server environments that they pull down/push up when needed.
28906
28907 There are two groups of interface functions: @dfn{required functions},
28908 which must be present, and @dfn{optional functions}, which Gnus will
28909 always check for presence before attempting to call 'em.
28910
28911 All these functions are expected to return data in the buffer
28912 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
28913 unfortunately named, but we'll have to live with it.  When I talk about
28914 @dfn{resulting data}, I always refer to the data in that buffer.  When I
28915 talk about @dfn{return value}, I talk about the function value returned by
28916 the function call.  Functions that fail should return @code{nil} as the
28917 return value.
28918
28919 Some back ends could be said to be @dfn{server-forming} back ends, and
28920 some might be said not to be.  The latter are back ends that generally
28921 only operate on one group at a time, and have no concept of ``server''
28922 ---they have a group, and they deliver info on that group and nothing
28923 more.
28924
28925 Gnus identifies each message by way of group name and article number.  A
28926 few remarks about these article numbers might be useful.  First of all,
28927 the numbers are positive integers.  Secondly, it is normally not
28928 possible for later articles to ``re-use'' older article numbers without
28929 confusing Gnus.  That is, if a group has ever contained a message
28930 numbered 42, then no other message may get that number, or Gnus will get
28931 mightily confused.@footnote{See the function
28932 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
28933 Third, article numbers must be assigned in order of arrival in the
28934 group; this is not necessarily the same as the date of the message.
28935
28936 The previous paragraph already mentions all the ``hard'' restrictions that
28937 article numbers must fulfill.  But it seems that it might be useful to
28938 assign @emph{consecutive} article numbers, for Gnus gets quite confused
28939 if there are holes in the article numbering sequence.  However, due to
28940 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
28941 also useful for the article numbers to start at 1 to avoid running out
28942 of numbers as long as possible.
28943
28944 Note that by convention, back ends are named @code{nnsomething}, but
28945 Gnus also comes with some @code{nnnotbackends}, such as
28946 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
28947
28948 In the examples and definitions I will refer to the imaginary back end
28949 @code{nnchoke}.
28950
28951 @cindex @code{nnchoke}
28952
28953 @menu
28954 * Required Back End Functions::  Functions that must be implemented.
28955 * Optional Back End Functions::  Functions that need not be implemented.
28956 * Error Messaging::             How to get messages and report errors.
28957 * Writing New Back Ends::       Extending old back ends.
28958 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
28959 * Mail-like Back Ends::         Some tips on mail back ends.
28960 @end menu
28961
28962
28963 @node Required Back End Functions
28964 @subsubsection Required Back End Functions
28965
28966 @table @code
28967
28968 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
28969
28970 @var{articles} is either a range of article numbers or a list of
28971 @code{Message-ID}s.  Current back ends do not fully support either---only
28972 sequences (lists) of article numbers, and most back ends do not support
28973 retrieval of @code{Message-ID}s.  But they should try for both.
28974
28975 The result data should either be HEADs or @acronym{NOV} lines, and the result
28976 value should either be @code{headers} or @code{nov} to reflect this.
28977 This might later be expanded to @code{various}, which will be a mixture
28978 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
28979
28980 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
28981 headers'', in some meaning of the word.  This is generally done by
28982 fetching (at most) @var{fetch-old} extra headers less than the smallest
28983 article number in @code{articles}, and filling the gaps as well.  The
28984 presence of this parameter can be ignored if the back end finds it
28985 cumbersome to follow the request.  If this is non-@code{nil} and not a
28986 number, do maximum fetches.
28987
28988 Here's an example HEAD:
28989
28990 @example
28991 221 1056 Article retrieved.
28992 Path: ifi.uio.no!sturles
28993 From: sturles@@ifi.uio.no (Sturle Sunde)
28994 Newsgroups: ifi.discussion
28995 Subject: Re: Something very droll
28996 Date: 27 Oct 1994 14:02:57 +0100
28997 Organization: Dept. of Informatics, University of Oslo, Norway
28998 Lines: 26
28999 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29000 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29001 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29002 .
29003 @end example
29004
29005 So a @code{headers} return value would imply that there's a number of
29006 these in the data buffer.
29007
29008 Here's a BNF definition of such a buffer:
29009
29010 @example
29011 headers        = *head
29012 head           = error / valid-head
29013 error-message  = [ "4" / "5" ] 2number " " <error message> eol
29014 valid-head     = valid-message *header "." eol
29015 valid-message  = "221 " <number> " Article retrieved." eol
29016 header         = <text> eol
29017 @end example
29018
29019 @cindex BNF
29020 (The version of BNF used here is the one used in RFC822.)
29021
29022 If the return value is @code{nov}, the data buffer should contain
29023 @dfn{network overview database} lines.  These are basically fields
29024 separated by tabs.
29025
29026 @example
29027 nov-buffer = *nov-line
29028 nov-line   = field 7*8[ <TAB> field ] eol
29029 field      = <text except TAB>
29030 @end example
29031
29032 For a closer look at what should be in those fields,
29033 @pxref{Headers}.
29034
29035
29036 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
29037
29038 @var{server} is here the virtual server name.  @var{definitions} is a
29039 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
29040
29041 If the server can't be opened, no error should be signaled.  The back end
29042 may then choose to refuse further attempts at connecting to this
29043 server.  In fact, it should do so.
29044
29045 If the server is opened already, this function should return a
29046 non-@code{nil} value.  There should be no data returned.
29047
29048
29049 @item (nnchoke-close-server &optional SERVER)
29050
29051 Close connection to @var{server} and free all resources connected
29052 to it.  Return @code{nil} if the server couldn't be closed for some
29053 reason.
29054
29055 There should be no data returned.
29056
29057
29058 @item (nnchoke-request-close)
29059
29060 Close connection to all servers and free all resources that the back end
29061 have reserved.  All buffers that have been created by that back end
29062 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
29063 function is generally only called when Gnus is shutting down.
29064
29065 There should be no data returned.
29066
29067
29068 @item (nnchoke-server-opened &optional SERVER)
29069
29070 If @var{server} is the current virtual server, and the connection to the
29071 physical server is alive, then this function should return a
29072 non-@code{nil} value.  This function should under no circumstances
29073 attempt to reconnect to a server we have lost connection to.
29074
29075 There should be no data returned.
29076
29077
29078 @item (nnchoke-status-message &optional SERVER)
29079
29080 This function should return the last error message from @var{server}.
29081
29082 There should be no data returned.
29083
29084
29085 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
29086
29087 The result data from this function should be the article specified by
29088 @var{article}.  This might either be a @code{Message-ID} or a number.
29089 It is optional whether to implement retrieval by @code{Message-ID}, but
29090 it would be nice if that were possible.
29091
29092 If @var{to-buffer} is non-@code{nil}, the result data should be returned
29093 in this buffer instead of the normal data buffer.  This is to make it
29094 possible to avoid copying large amounts of data from one buffer to
29095 another, while Gnus mainly requests articles to be inserted directly
29096 into its article buffer.
29097
29098 If it is at all possible, this function should return a cons cell where
29099 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
29100 the article number.  This will enable Gnus to find out what the real
29101 group and article numbers are when fetching articles by
29102 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
29103 on successful article retrieval.
29104
29105
29106 @item (nnchoke-request-group GROUP &optional SERVER FAST)
29107
29108 Get data on @var{group}.  This function also has the side effect of
29109 making @var{group} the current group.
29110
29111 If @var{fast}, don't bother to return useful data, just make @var{group}
29112 the current group.
29113
29114 Here's an example of some result data and a definition of the same:
29115
29116 @example
29117 211 56 1000 1059 ifi.discussion
29118 @end example
29119
29120 The first number is the status, which should be 211.  Next is the
29121 total number of articles in the group, the lowest article number, the
29122 highest article number, and finally the group name.  Note that the total
29123 number of articles may be less than one might think while just
29124 considering the highest and lowest article numbers, but some articles
29125 may have been canceled.  Gnus just discards the total-number, so
29126 whether one should take the bother to generate it properly (if that is a
29127 problem) is left as an exercise to the reader.  If the group contains no
29128 articles, the lowest article number should be reported as 1 and the
29129 highest as 0.
29130
29131 @example
29132 group-status = [ error / info ] eol
29133 error        = [ "4" / "5" ] 2<number> " " <Error message>
29134 info         = "211 " 3* [ <number> " " ] <string>
29135 @end example
29136
29137
29138 @item (nnchoke-close-group GROUP &optional SERVER)
29139
29140 Close @var{group} and free any resources connected to it.  This will be
29141 a no-op on most back ends.
29142
29143 There should be no data returned.
29144
29145
29146 @item (nnchoke-request-list &optional SERVER)
29147
29148 Return a list of all groups available on @var{server}.  And that means
29149 @emph{all}.
29150
29151 Here's an example from a server that only carries two groups:
29152
29153 @example
29154 ifi.test 0000002200 0000002000 y
29155 ifi.discussion 3324 3300 n
29156 @end example
29157
29158 On each line we have a group name, then the highest article number in
29159 that group, the lowest article number, and finally a flag.  If the group
29160 contains no articles, the lowest article number should be reported as 1
29161 and the highest as 0.
29162
29163 @example
29164 active-file = *active-line
29165 active-line = name " " <number> " " <number> " " flags eol
29166 name        = <string>
29167 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
29168 @end example
29169
29170 The flag says whether the group is read-only (@samp{n}), is moderated
29171 (@samp{m}), is dead (@samp{x}), is aliased to some other group
29172 (@samp{=other-group}) or none of the above (@samp{y}).
29173
29174
29175 @item (nnchoke-request-post &optional SERVER)
29176
29177 This function should post the current buffer.  It might return whether
29178 the posting was successful or not, but that's not required.  If, for
29179 instance, the posting is done asynchronously, it has generally not been
29180 completed by the time this function concludes.  In that case, this
29181 function should set up some kind of sentinel to beep the user loud and
29182 clear if the posting could not be completed.
29183
29184 There should be no result data from this function.
29185
29186 @end table
29187
29188
29189 @node Optional Back End Functions
29190 @subsubsection Optional Back End Functions
29191
29192 @table @code
29193
29194 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
29195
29196 @var{groups} is a list of groups, and this function should request data
29197 on all those groups.  How it does it is of no concern to Gnus, but it
29198 should attempt to do this in a speedy fashion.
29199
29200 The return value of this function can be either @code{active} or
29201 @code{group}, which says what the format of the result data is.  The
29202 former is in the same format as the data from
29203 @code{nnchoke-request-list}, while the latter is a buffer full of lines
29204 in the same format as @code{nnchoke-request-group} gives.
29205
29206 @example
29207 group-buffer = *active-line / *group-status
29208 @end example
29209
29210
29211 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
29212
29213 A Gnus group info (@pxref{Group Info}) is handed to the back end for
29214 alterations.  This comes in handy if the back end really carries all
29215 the information (as is the case with virtual and imap groups).  This
29216 function should destructively alter the info to suit its needs, and
29217 should return a non-@code{nil} value (exceptionally,
29218 @code{nntp-request-update-info} always returns @code{nil} not to waste
29219 the network resources).
29220
29221 There should be no result data from this function.
29222
29223
29224 @item (nnchoke-request-type GROUP &optional ARTICLE)
29225
29226 When the user issues commands for ``sending news'' (@kbd{F} in the
29227 summary buffer, for instance), Gnus has to know whether the article the
29228 user is following up on is news or mail.  This function should return
29229 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
29230 is mail and @code{unknown} if the type can't be decided.  (The
29231 @var{article} parameter is necessary in @code{nnvirtual} groups which
29232 might very well combine mail groups and news groups.)  Both @var{group}
29233 and @var{article} may be @code{nil}.
29234
29235 There should be no result data from this function.
29236
29237
29238 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
29239
29240 Set/remove/add marks on articles.  Normally Gnus handles the article
29241 marks (such as read, ticked, expired etc) internally, and store them in
29242 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
29243 all information about the articles on the server, so Gnus need to
29244 propagate the mark information to the server.
29245
29246 @var{action} is a list of mark setting requests, having this format:
29247
29248 @example
29249 (RANGE ACTION MARK)
29250 @end example
29251
29252 @var{range} is a range of articles you wish to update marks on.
29253 @var{action} is @code{add} or @code{del}, used to add marks or remove
29254 marks (preserving all marks not mentioned).  @var{mark} is a list of
29255 marks; where each mark is a symbol.  Currently used marks are
29256 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
29257 @code{dormant}, @code{save}, @code{download}, @code{unsend},
29258 @code{forward} and @code{recent}, but your back end should, if
29259 possible, not limit itself to these.
29260
29261 Given contradictory actions, the last action in the list should be the
29262 effective one.  That is, if your action contains a request to add the
29263 @code{tick} mark on article 1 and, later in the list, a request to
29264 remove the mark on the same article, the mark should in fact be removed.
29265
29266 An example action list:
29267
29268 @example
29269 (((5 12 30) 'del '(tick))
29270  ((10 . 90) 'add '(read expire))
29271  ((92 94) 'del '(read)))
29272 @end example
29273
29274 The function should return a range of articles it wasn't able to set the
29275 mark on (currently not used for anything).
29276
29277 There should be no result data from this function.
29278
29279 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
29280
29281 If the user tries to set a mark that the back end doesn't like, this
29282 function may change the mark.  Gnus will use whatever this function
29283 returns as the mark for @var{article} instead of the original
29284 @var{mark}.  If the back end doesn't care, it must return the original
29285 @var{mark}, and not @code{nil} or any other type of garbage.
29286
29287 The only use for this I can see is what @code{nnvirtual} does with
29288 it---if a component group is auto-expirable, marking an article as read
29289 in the virtual group should result in the article being marked as
29290 expirable.
29291
29292 There should be no result data from this function.
29293
29294
29295 @item (nnchoke-request-scan &optional GROUP SERVER)
29296
29297 This function may be called at any time (by Gnus or anything else) to
29298 request that the back end check for incoming articles, in one way or
29299 another.  A mail back end will typically read the spool file or query
29300 the @acronym{POP} server when this function is invoked.  The
29301 @var{group} doesn't have to be heeded---if the back end decides that
29302 it is too much work just scanning for a single group, it may do a
29303 total scan of all groups.  It would be nice, however, to keep things
29304 local if that's practical.
29305
29306 There should be no result data from this function.
29307
29308
29309 @item (nnchoke-request-group-description GROUP &optional SERVER)
29310
29311 The result data from this function should be a description of
29312 @var{group}.
29313
29314 @example
29315 description-line = name <TAB> description eol
29316 name             = <string>
29317 description      = <text>
29318 @end example
29319
29320 @item (nnchoke-request-list-newsgroups &optional SERVER)
29321
29322 The result data from this function should be the description of all
29323 groups available on the server.
29324
29325 @example
29326 description-buffer = *description-line
29327 @end example
29328
29329
29330 @item (nnchoke-request-newgroups DATE &optional SERVER)
29331
29332 The result data from this function should be all groups that were
29333 created after @samp{date}, which is in normal human-readable date format
29334 (i.e., the date format used in mail and news headers, and returned by
29335 the function @code{message-make-date} by default).  The data should be
29336 in the active buffer format.
29337
29338 It is okay for this function to return ``too many'' groups; some back ends
29339 might find it cheaper to return the full list of groups, rather than
29340 just the new groups.  But don't do this for back ends with many groups.
29341 Normally, if the user creates the groups herself, there won't be too
29342 many groups, so @code{nnml} and the like are probably safe.  But for
29343 back ends like @code{nntp}, where the groups have been created by the
29344 server, it is quite likely that there can be many groups.
29345
29346
29347 @item (nnchoke-request-create-group GROUP &optional SERVER)
29348
29349 This function should create an empty group with name @var{group}.
29350
29351 There should be no return data.
29352
29353
29354 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
29355
29356 This function should run the expiry process on all articles in the
29357 @var{articles} range (which is currently a simple list of article
29358 numbers.)  It is left up to the back end to decide how old articles
29359 should be before they are removed by this function.  If @var{force} is
29360 non-@code{nil}, all @var{articles} should be deleted, no matter how new
29361 they are.
29362
29363 This function should return a list of articles that it did not/was not
29364 able to delete.
29365
29366 There should be no result data returned.
29367
29368
29369 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
29370
29371 This function should move @var{article} (which is a number) from
29372 @var{group} by calling @var{accept-form}.
29373
29374 This function should ready the article in question for moving by
29375 removing any header lines it has added to the article, and generally
29376 should ``tidy up'' the article.  Then it should @code{eval}
29377 @var{accept-form} in the buffer where the ``tidy'' article is.  This
29378 will do the actual copying.  If this @code{eval} returns a
29379 non-@code{nil} value, the article should be removed.
29380
29381 If @var{last} is @code{nil}, that means that there is a high likelihood
29382 that there will be more requests issued shortly, so that allows some
29383 optimizations.
29384
29385 The function should return a cons where the @code{car} is the group name and
29386 the @code{cdr} is the article number that the article was entered as.
29387
29388 There should be no data returned.
29389
29390
29391 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
29392
29393 This function takes the current buffer and inserts it into @var{group}.
29394 If @var{last} in @code{nil}, that means that there will be more calls to
29395 this function in short order.
29396
29397 The function should return a cons where the @code{car} is the group name and
29398 the @code{cdr} is the article number that the article was entered as.
29399
29400 The group should exist before the back end is asked to accept the
29401 article for that group.
29402
29403 There should be no data returned.
29404
29405
29406 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
29407
29408 This function should remove @var{article} (which is a number) from
29409 @var{group} and insert @var{buffer} there instead.
29410
29411 There should be no data returned.
29412
29413
29414 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
29415
29416 This function should delete @var{group}.  If @var{force}, it should
29417 really delete all the articles in the group, and then delete the group
29418 itself.  (If there is such a thing as ``the group itself''.)
29419
29420 There should be no data returned.
29421
29422
29423 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
29424
29425 This function should rename @var{group} into @var{new-name}.  All
29426 articles in @var{group} should move to @var{new-name}.
29427
29428 There should be no data returned.
29429
29430 @end table
29431
29432
29433 @node Error Messaging
29434 @subsubsection Error Messaging
29435
29436 @findex nnheader-report
29437 @findex nnheader-get-report
29438 The back ends should use the function @code{nnheader-report} to report
29439 error conditions---they should not raise errors when they aren't able to
29440 perform a request.  The first argument to this function is the back end
29441 symbol, and the rest are interpreted as arguments to @code{format} if
29442 there are multiple of them, or just a string if there is one of them.
29443 This function must always returns @code{nil}.
29444
29445 @lisp
29446 (nnheader-report 'nnchoke "You did something totally bogus")
29447
29448 (nnheader-report 'nnchoke "Could not request group %s" group)
29449 @end lisp
29450
29451 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
29452 @code{nil} back from a server, and this function returns the most
29453 recently reported message for the back end in question.  This function
29454 takes one argument---the server symbol.
29455
29456 Internally, these functions access @var{back-end}@code{-status-string},
29457 so the @code{nnchoke} back end will have its error message stored in
29458 @code{nnchoke-status-string}.
29459
29460
29461 @node Writing New Back Ends
29462 @subsubsection Writing New Back Ends
29463
29464 Many back ends are quite similar.  @code{nnml} is just like
29465 @code{nnspool}, but it allows you to edit the articles on the server.
29466 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
29467 and it doesn't maintain overview databases.  @code{nndir} is just like
29468 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
29469 editing articles.
29470
29471 It would make sense if it were possible to ``inherit'' functions from
29472 back ends when writing new back ends.  And, indeed, you can do that if you
29473 want to.  (You don't have to if you don't want to, of course.)
29474
29475 All the back ends declare their public variables and functions by using a
29476 package called @code{nnoo}.
29477
29478 To inherit functions from other back ends (and allow other back ends to
29479 inherit functions from the current back end), you should use the
29480 following macros:
29481
29482 @table @code
29483
29484 @item nnoo-declare
29485 This macro declares the first parameter to be a child of the subsequent
29486 parameters.  For instance:
29487
29488 @lisp
29489 (nnoo-declare nndir
29490   nnml nnmh)
29491 @end lisp
29492
29493 @code{nndir} has declared here that it intends to inherit functions from
29494 both @code{nnml} and @code{nnmh}.
29495
29496 @item defvoo
29497 This macro is equivalent to @code{defvar}, but registers the variable as
29498 a public server variable.  Most state-oriented variables should be
29499 declared with @code{defvoo} instead of @code{defvar}.
29500
29501 In addition to the normal @code{defvar} parameters, it takes a list of
29502 variables in the parent back ends to map the variable to when executing
29503 a function in those back ends.
29504
29505 @lisp
29506 (defvoo nndir-directory nil
29507   "Where nndir will look for groups."
29508   nnml-current-directory nnmh-current-directory)
29509 @end lisp
29510
29511 This means that @code{nnml-current-directory} will be set to
29512 @code{nndir-directory} when an @code{nnml} function is called on behalf
29513 of @code{nndir}.  (The same with @code{nnmh}.)
29514
29515 @item nnoo-define-basics
29516 This macro defines some common functions that almost all back ends should
29517 have.
29518
29519 @lisp
29520 (nnoo-define-basics nndir)
29521 @end lisp
29522
29523 @item deffoo
29524 This macro is just like @code{defun} and takes the same parameters.  In
29525 addition to doing the normal @code{defun} things, it registers the
29526 function as being public so that other back ends can inherit it.
29527
29528 @item nnoo-map-functions
29529 This macro allows mapping of functions from the current back end to
29530 functions from the parent back ends.
29531
29532 @lisp
29533 (nnoo-map-functions nndir
29534   (nnml-retrieve-headers 0 nndir-current-group 0 0)
29535   (nnmh-request-article 0 nndir-current-group 0 0))
29536 @end lisp
29537
29538 This means that when @code{nndir-retrieve-headers} is called, the first,
29539 third, and fourth parameters will be passed on to
29540 @code{nnml-retrieve-headers}, while the second parameter is set to the
29541 value of @code{nndir-current-group}.
29542
29543 @item nnoo-import
29544 This macro allows importing functions from back ends.  It should be the
29545 last thing in the source file, since it will only define functions that
29546 haven't already been defined.
29547
29548 @lisp
29549 (nnoo-import nndir
29550   (nnmh
29551    nnmh-request-list
29552    nnmh-request-newgroups)
29553   (nnml))
29554 @end lisp
29555
29556 This means that calls to @code{nndir-request-list} should just be passed
29557 on to @code{nnmh-request-list}, while all public functions from
29558 @code{nnml} that haven't been defined in @code{nndir} yet should be
29559 defined now.
29560
29561 @end table
29562
29563 Below is a slightly shortened version of the @code{nndir} back end.
29564
29565 @lisp
29566 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
29567 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
29568
29569 ;;; @r{Code:}
29570
29571 (require 'nnheader)
29572 (require 'nnmh)
29573 (require 'nnml)
29574 (require 'nnoo)
29575 (eval-when-compile (require 'cl))
29576
29577 (nnoo-declare nndir
29578   nnml nnmh)
29579
29580 (defvoo nndir-directory nil
29581   "Where nndir will look for groups."
29582   nnml-current-directory nnmh-current-directory)
29583
29584 (defvoo nndir-nov-is-evil nil
29585   "*Non-nil means that nndir will never retrieve NOV headers."
29586   nnml-nov-is-evil)
29587
29588 (defvoo nndir-current-group ""
29589   nil
29590   nnml-current-group nnmh-current-group)
29591 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
29592 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
29593
29594 (defvoo nndir-status-string "" nil nnmh-status-string)
29595 (defconst nndir-version "nndir 1.0")
29596
29597 ;;; @r{Interface functions.}
29598
29599 (nnoo-define-basics nndir)
29600
29601 (deffoo nndir-open-server (server &optional defs)
29602   (setq nndir-directory
29603         (or (cadr (assq 'nndir-directory defs))
29604             server))
29605   (unless (assq 'nndir-directory defs)
29606     (push `(nndir-directory ,server) defs))
29607   (push `(nndir-current-group
29608           ,(file-name-nondirectory
29609             (directory-file-name nndir-directory)))
29610         defs)
29611   (push `(nndir-top-directory
29612           ,(file-name-directory (directory-file-name nndir-directory)))
29613         defs)
29614   (nnoo-change-server 'nndir server defs))
29615
29616 (nnoo-map-functions nndir
29617   (nnml-retrieve-headers 0 nndir-current-group 0 0)
29618   (nnmh-request-article 0 nndir-current-group 0 0)
29619   (nnmh-request-group nndir-current-group 0 0)
29620   (nnmh-close-group nndir-current-group 0))
29621
29622 (nnoo-import nndir
29623   (nnmh
29624    nnmh-status-message
29625    nnmh-request-list
29626    nnmh-request-newgroups))
29627
29628 (provide 'nndir)
29629 @end lisp
29630
29631
29632 @node Hooking New Back Ends Into Gnus
29633 @subsubsection Hooking New Back Ends Into Gnus
29634
29635 @vindex gnus-valid-select-methods
29636 @findex gnus-declare-backend
29637 Having Gnus start using your new back end is rather easy---you just
29638 declare it with the @code{gnus-declare-backend} functions.  This will
29639 enter the back end into the @code{gnus-valid-select-methods} variable.
29640
29641 @code{gnus-declare-backend} takes two parameters---the back end name and
29642 an arbitrary number of @dfn{abilities}.
29643
29644 Here's an example:
29645
29646 @lisp
29647 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
29648 @end lisp
29649
29650 The above line would then go in the @file{nnchoke.el} file.
29651
29652 The abilities can be:
29653
29654 @table @code
29655 @item mail
29656 This is a mailish back end---followups should (probably) go via mail.
29657 @item post
29658 This is a newsish back end---followups should (probably) go via news.
29659 @item post-mail
29660 This back end supports both mail and news.
29661 @item none
29662 This is neither a post nor mail back end---it's something completely
29663 different.
29664 @item respool
29665 It supports respooling---or rather, it is able to modify its source
29666 articles and groups.
29667 @item address
29668 The name of the server should be in the virtual server name.  This is
29669 true for almost all back ends.
29670 @item prompt-address
29671 The user should be prompted for an address when doing commands like
29672 @kbd{B} in the group buffer.  This is true for back ends like
29673 @code{nntp}, but not @code{nnmbox}, for instance.
29674 @end table
29675
29676
29677 @node Mail-like Back Ends
29678 @subsubsection Mail-like Back Ends
29679
29680 One of the things that separate the mail back ends from the rest of the
29681 back ends is the heavy dependence by most of the mail back ends on
29682 common functions in @file{nnmail.el}.  For instance, here's the
29683 definition of @code{nnml-request-scan}:
29684
29685 @lisp
29686 (deffoo nnml-request-scan (&optional group server)
29687   (setq nnml-article-file-alist nil)
29688   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
29689 @end lisp
29690
29691 It simply calls @code{nnmail-get-new-mail} with a few parameters,
29692 and @code{nnmail} takes care of all the moving and splitting of the
29693 mail.
29694
29695 This function takes four parameters.
29696
29697 @table @var
29698 @item method
29699 This should be a symbol to designate which back end is responsible for
29700 the call.
29701
29702 @item exit-function
29703 This function should be called after the splitting has been performed.
29704
29705 @item temp-directory
29706 Where the temporary files should be stored.
29707
29708 @item group
29709 This optional argument should be a group name if the splitting is to be
29710 performed for one group only.
29711 @end table
29712
29713 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
29714 save each article.  @var{back-end}@code{-active-number} will be called to
29715 find the article number assigned to this article.
29716
29717 The function also uses the following variables:
29718 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
29719 this back end); and @var{back-end}@code{-group-alist} and
29720 @var{back-end}@code{-active-file} to generate the new active file.
29721 @var{back-end}@code{-group-alist} should be a group-active alist, like
29722 this:
29723
29724 @example
29725 (("a-group" (1 . 10))
29726  ("some-group" (34 . 39)))
29727 @end example
29728
29729
29730 @node Score File Syntax
29731 @subsection Score File Syntax
29732
29733 Score files are meant to be easily parseable, but yet extremely
29734 mallable.  It was decided that something that had the same read syntax
29735 as an Emacs Lisp list would fit that spec.
29736
29737 Here's a typical score file:
29738
29739 @lisp
29740 (("summary"
29741   ("win95" -10000 nil s)
29742   ("Gnus"))
29743  ("from"
29744   ("Lars" -1000))
29745  (mark -100))
29746 @end lisp
29747
29748 BNF definition of a score file:
29749
29750 @example
29751 score-file      = "" / "(" *element ")"
29752 element         = rule / atom
29753 rule            = string-rule / number-rule / date-rule
29754 string-rule     = "(" quote string-header quote space *string-match ")"
29755 number-rule     = "(" quote number-header quote space *number-match ")"
29756 date-rule       = "(" quote date-header quote space *date-match ")"
29757 quote           = <ascii 34>
29758 string-header   = "subject" / "from" / "references" / "message-id" /
29759                   "xref" / "body" / "head" / "all" / "followup"
29760 number-header   = "lines" / "chars"
29761 date-header     = "date"
29762 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
29763                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
29764 score           = "nil" / <integer>
29765 date            = "nil" / <natural number>
29766 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
29767                   "r" / "regex" / "R" / "Regex" /
29768                   "e" / "exact" / "E" / "Exact" /
29769                   "f" / "fuzzy" / "F" / "Fuzzy"
29770 number-match    = "(" <integer> [ "" / [ space score [ "" /
29771                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
29772 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
29773 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
29774                   space date [ "" / [ space date-match-t ] ] ] ] ")"
29775 date-match-t    = "nil" / "at" / "before" / "after"
29776 atom            = "(" [ required-atom / optional-atom ] ")"
29777 required-atom   = mark / expunge / mark-and-expunge / files /
29778                   exclude-files / read-only / touched
29779 optional-atom   = adapt / local / eval
29780 mark            = "mark" space nil-or-number
29781 nil-or-number   = "nil" / <integer>
29782 expunge         = "expunge" space nil-or-number
29783 mark-and-expunge = "mark-and-expunge" space nil-or-number
29784 files           = "files" *[ space <string> ]
29785 exclude-files   = "exclude-files" *[ space <string> ]
29786 read-only       = "read-only" [ space "nil" / space "t" ]
29787 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
29788 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
29789 local           = "local" *[ space "(" <string> space <form> ")" ]
29790 eval            = "eval" space <form>
29791 space           = *[ " " / <TAB> / <NEWLINE> ]
29792 @end example
29793
29794 Any unrecognized elements in a score file should be ignored, but not
29795 discarded.
29796
29797 As you can see, white space is needed, but the type and amount of white
29798 space is irrelevant.  This means that formatting of the score file is
29799 left up to the programmer---if it's simpler to just spew it all out on
29800 one looong line, then that's ok.
29801
29802 The meaning of the various atoms are explained elsewhere in this
29803 manual (@pxref{Score File Format}).
29804
29805
29806 @node Headers
29807 @subsection Headers
29808
29809 Internally Gnus uses a format for storing article headers that
29810 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
29811 almost suspect that the author looked at the @acronym{NOV} specification and
29812 just shamelessly @emph{stole} the entire thing, and one would be right.
29813
29814 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
29815 RFC 1036 to talk about lines in the head of an article (e.g.,
29816 @code{From}).  It is used by many people as a synonym for
29817 ``head''---``the header and the body''.  (That should be avoided, in my
29818 opinion.)  And Gnus uses a format internally that it calls ``header'',
29819 which is what I'm talking about here.  This is a 9-element vector,
29820 basically, with each header (ouch) having one slot.
29821
29822 These slots are, in order: @code{number}, @code{subject}, @code{from},
29823 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
29824 @code{xref}, and @code{extra}.  There are macros for accessing and
29825 setting these slots---they all have predictable names beginning with
29826 @code{mail-header-} and @code{mail-header-set-}, respectively.
29827
29828 All these slots contain strings, except the @code{extra} slot, which
29829 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
29830
29831
29832 @node Ranges
29833 @subsection Ranges
29834
29835 @sc{gnus} introduced a concept that I found so useful that I've started
29836 using it a lot and have elaborated on it greatly.
29837
29838 The question is simple: If you have a large amount of objects that are
29839 identified by numbers (say, articles, to take a @emph{wild} example)
29840 that you want to qualify as being ``included'', a normal sequence isn't
29841 very useful.  (A 200,000 length sequence is a bit long-winded.)
29842
29843 The solution is as simple as the question: You just collapse the
29844 sequence.
29845
29846 @example
29847 (1 2 3 4 5 6 10 11 12)
29848 @end example
29849
29850 is transformed into
29851
29852 @example
29853 ((1 . 6) (10 . 12))
29854 @end example
29855
29856 To avoid having those nasty @samp{(13 . 13)} elements to denote a
29857 lonesome object, a @samp{13} is a valid element:
29858
29859 @example
29860 ((1 . 6) 7 (10 . 12))
29861 @end example
29862
29863 This means that comparing two ranges to find out whether they are equal
29864 is slightly tricky:
29865
29866 @example
29867 ((1 . 5) 7 8 (10 . 12))
29868 @end example
29869
29870 and
29871
29872 @example
29873 ((1 . 5) (7 . 8) (10 . 12))
29874 @end example
29875
29876 are equal.  In fact, any non-descending list is a range:
29877
29878 @example
29879 (1 2 3 4 5)
29880 @end example
29881
29882 is a perfectly valid range, although a pretty long-winded one.  This is
29883 also valid:
29884
29885 @example
29886 (1 . 5)
29887 @end example
29888
29889 and is equal to the previous range.
29890
29891 Here's a BNF definition of ranges.  Of course, one must remember the
29892 semantic requirement that the numbers are non-descending.  (Any number
29893 of repetition of the same number is allowed, but apt to disappear in
29894 range handling.)
29895
29896 @example
29897 range           = simple-range / normal-range
29898 simple-range    = "(" number " . " number ")"
29899 normal-range    = "(" start-contents ")"
29900 contents        = "" / simple-range *[ " " contents ] /
29901                   number *[ " " contents ]
29902 @end example
29903
29904 Gnus currently uses ranges to keep track of read articles and article
29905 marks.  I plan on implementing a number of range operators in C if The
29906 Powers That Be are willing to let me.  (I haven't asked yet, because I
29907 need to do some more thinking on what operators I need to make life
29908 totally range-based without ever having to convert back to normal
29909 sequences.)
29910
29911
29912 @node Group Info
29913 @subsection Group Info
29914
29915 Gnus stores all permanent info on groups in a @dfn{group info} list.
29916 This list is from three to six elements (or more) long and exhaustively
29917 describes the group.
29918
29919 Here are two example group infos; one is a very simple group while the
29920 second is a more complex one:
29921
29922 @example
29923 ("no.group" 5 ((1 . 54324)))
29924
29925 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
29926                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
29927                 (nnml "")
29928                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
29929 @end example
29930
29931 The first element is the @dfn{group name}---as Gnus knows the group,
29932 anyway.  The second element is the @dfn{subscription level}, which
29933 normally is a small integer.  (It can also be the @dfn{rank}, which is a
29934 cons cell where the @code{car} is the level and the @code{cdr} is the
29935 score.)  The third element is a list of ranges of read articles.  The
29936 fourth element is a list of lists of article marks of various kinds.
29937 The fifth element is the select method (or virtual server, if you like).
29938 The sixth element is a list of @dfn{group parameters}, which is what
29939 this section is about.
29940
29941 Any of the last three elements may be missing if they are not required.
29942 In fact, the vast majority of groups will normally only have the first
29943 three elements, which saves quite a lot of cons cells.
29944
29945 Here's a BNF definition of the group info format:
29946
29947 @example
29948 info          = "(" group space ralevel space read
29949                 [ "" / [ space marks-list [ "" / [ space method [ "" /
29950                 space parameters ] ] ] ] ] ")"
29951 group         = quote <string> quote
29952 ralevel       = rank / level
29953 level         = <integer in the range of 1 to inf>
29954 rank          = "(" level "." score ")"
29955 score         = <integer in the range of 1 to inf>
29956 read          = range
29957 marks-lists   = nil / "(" *marks ")"
29958 marks         = "(" <string> range ")"
29959 method        = "(" <string> *elisp-forms ")"
29960 parameters    = "(" *elisp-forms ")"
29961 @end example
29962
29963 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
29964 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
29965 in pseudo-BNF.
29966
29967 If you have a Gnus info and want to access the elements, Gnus offers a
29968 series of macros for getting/setting these elements.
29969
29970 @table @code
29971 @item gnus-info-group
29972 @itemx gnus-info-set-group
29973 @findex gnus-info-group
29974 @findex gnus-info-set-group
29975 Get/set the group name.
29976
29977 @item gnus-info-rank
29978 @itemx gnus-info-set-rank
29979 @findex gnus-info-rank
29980 @findex gnus-info-set-rank
29981 Get/set the group rank (@pxref{Group Score}).
29982
29983 @item gnus-info-level
29984 @itemx gnus-info-set-level
29985 @findex gnus-info-level
29986 @findex gnus-info-set-level
29987 Get/set the group level.
29988
29989 @item gnus-info-score
29990 @itemx gnus-info-set-score
29991 @findex gnus-info-score
29992 @findex gnus-info-set-score
29993 Get/set the group score (@pxref{Group Score}).
29994
29995 @item gnus-info-read
29996 @itemx gnus-info-set-read
29997 @findex gnus-info-read
29998 @findex gnus-info-set-read
29999 Get/set the ranges of read articles.
30000
30001 @item gnus-info-marks
30002 @itemx gnus-info-set-marks
30003 @findex gnus-info-marks
30004 @findex gnus-info-set-marks
30005 Get/set the lists of ranges of marked articles.
30006
30007 @item gnus-info-method
30008 @itemx gnus-info-set-method
30009 @findex gnus-info-method
30010 @findex gnus-info-set-method
30011 Get/set the group select method.
30012
30013 @item gnus-info-params
30014 @itemx gnus-info-set-params
30015 @findex gnus-info-params
30016 @findex gnus-info-set-params
30017 Get/set the group parameters.
30018 @end table
30019
30020 All the getter functions take one parameter---the info list.  The setter
30021 functions take two parameters---the info list and the new value.
30022
30023 The last three elements in the group info aren't mandatory, so it may be
30024 necessary to extend the group info before setting the element.  If this
30025 is necessary, you can just pass on a non-@code{nil} third parameter to
30026 the three final setter functions to have this happen automatically.
30027
30028
30029 @node Extended Interactive
30030 @subsection Extended Interactive
30031 @cindex interactive
30032 @findex gnus-interactive
30033
30034 Gnus extends the standard Emacs @code{interactive} specification
30035 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
30036 Prefixes}).  Here's an example of how this is used:
30037
30038 @lisp
30039 (defun gnus-summary-increase-score (&optional score symp)
30040   (interactive (gnus-interactive "P\ny"))
30041   ...
30042   )
30043 @end lisp
30044
30045 The best thing to do would have been to implement
30046 @code{gnus-interactive} as a macro which would have returned an
30047 @code{interactive} form, but this isn't possible since Emacs checks
30048 whether a function is interactive or not by simply doing an @code{assq}
30049 on the lambda form.  So, instead we have @code{gnus-interactive}
30050 function that takes a string and returns values that are usable to
30051 @code{interactive}.
30052
30053 This function accepts (almost) all normal @code{interactive} specs, but
30054 adds a few more.
30055
30056 @table @samp
30057 @item y
30058 @vindex gnus-current-prefix-symbol
30059 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
30060 variable.
30061
30062 @item Y
30063 @vindex gnus-current-prefix-symbols
30064 A list of the current symbolic prefixes---the
30065 @code{gnus-current-prefix-symbol} variable.
30066
30067 @item A
30068 The current article number---the @code{gnus-summary-article-number}
30069 function.
30070
30071 @item H
30072 The current article header---the @code{gnus-summary-article-header}
30073 function.
30074
30075 @item g
30076 The current group name---the @code{gnus-group-group-name}
30077 function.
30078
30079 @end table
30080
30081
30082 @node Emacs/XEmacs Code
30083 @subsection Emacs/XEmacs Code
30084 @cindex XEmacs
30085 @cindex Emacsen
30086
30087 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
30088 platforms must be the primary one.  I chose Emacs.  Not because I don't
30089 like XEmacs or Mule, but because it comes first alphabetically.
30090
30091 This means that Gnus will byte-compile under Emacs with nary a warning,
30092 while XEmacs will pump out gigabytes of warnings while byte-compiling.
30093 As I use byte-compilation warnings to help me root out trivial errors in
30094 Gnus, that's very useful.
30095
30096 I've also consistently used Emacs function interfaces, but have used
30097 Gnusey aliases for the functions.  To take an example:  Emacs defines a
30098 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
30099 function.  I then define a function called @code{gnus-run-at-time} that
30100 takes the same parameters as the Emacs @code{run-at-time}.  When running
30101 Gnus under Emacs, the former function is just an alias for the latter.
30102 However, when running under XEmacs, the former is an alias for the
30103 following function:
30104
30105 @lisp
30106 (defun gnus-xmas-run-at-time (time repeat function &rest args)
30107   (start-itimer
30108    "gnus-run-at-time"
30109    `(lambda ()
30110       (,function ,@@args))
30111    time repeat))
30112 @end lisp
30113
30114 This sort of thing has been done for bunches of functions.  Gnus does
30115 not redefine any native Emacs functions while running under XEmacs---it
30116 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
30117 all over.
30118
30119 In the cases where the XEmacs function interface was obviously cleaner,
30120 I used it instead.  For example @code{gnus-region-active-p} is an alias
30121 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
30122
30123 Of course, I could have chosen XEmacs as my native platform and done
30124 mapping functions the other way around.  But I didn't.  The performance
30125 hit these indirections impose on Gnus under XEmacs should be slight.
30126
30127
30128 @node Various File Formats
30129 @subsection Various File Formats
30130
30131 @menu
30132 * Active File Format::          Information on articles and groups available.
30133 * Newsgroups File Format::      Group descriptions.
30134 @end menu
30135
30136
30137 @node Active File Format
30138 @subsubsection Active File Format
30139
30140 The active file lists all groups available on the server in
30141 question.  It also lists the highest and lowest current article numbers
30142 in each group.
30143
30144 Here's an excerpt from a typical active file:
30145
30146 @example
30147 soc.motss 296030 293865 y
30148 alt.binaries.pictures.fractals 3922 3913 n
30149 comp.sources.unix 1605 1593 m
30150 comp.binaries.ibm.pc 5097 5089 y
30151 no.general 1000 900 y
30152 @end example
30153
30154 Here's a pseudo-BNF definition of this file:
30155
30156 @example
30157 active      = *group-line
30158 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
30159 group       = <non-white-space string>
30160 spc         = " "
30161 high-number = <non-negative integer>
30162 low-number  = <positive integer>
30163 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
30164 @end example
30165
30166 For a full description of this file, see the manual pages for
30167 @samp{innd}, in particular @samp{active(5)}.
30168
30169
30170 @node Newsgroups File Format
30171 @subsubsection Newsgroups File Format
30172
30173 The newsgroups file lists groups along with their descriptions.  Not all
30174 groups on the server have to be listed,  and not all groups in the file
30175 have to exist on the server.  The file is meant purely as information to
30176 the user.
30177
30178 The format is quite simple; a group name, a tab, and the description.
30179 Here's the definition:
30180
30181 @example
30182 newsgroups    = *line
30183 line          = group tab description <NEWLINE>
30184 group         = <non-white-space string>
30185 tab           = <TAB>
30186 description   = <string>
30187 @end example
30188
30189
30190 @page
30191 @node Emacs for Heathens
30192 @section Emacs for Heathens
30193
30194 Believe it or not, but some people who use Gnus haven't really used
30195 Emacs much before they embarked on their journey on the Gnus Love Boat.
30196 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
30197 region'', and ``set @code{gnus-flargblossen} to an alist where the key
30198 is a regexp that is used for matching on the group name'' are magical
30199 phrases with little or no meaning, then this appendix is for you.  If
30200 you are already familiar with Emacs, just ignore this and go fondle your
30201 cat instead.
30202
30203 @menu
30204 * Keystrokes::                  Entering text and executing commands.
30205 * Emacs Lisp::                  The built-in Emacs programming language.
30206 @end menu
30207
30208
30209 @node Keystrokes
30210 @subsection Keystrokes
30211
30212 @itemize @bullet
30213 @item
30214 Q: What is an experienced Emacs user?
30215
30216 @item
30217 A: A person who wishes that the terminal had pedals.
30218 @end itemize
30219
30220 Yes, when you use Emacs, you are apt to use the control key, the shift
30221 key and the meta key a lot.  This is very annoying to some people
30222 (notably @code{vi}le users), and the rest of us just love the hell out
30223 of it.  Just give up and submit.  Emacs really does stand for
30224 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
30225 may have heard from other disreputable sources (like the Emacs author).
30226
30227 The shift keys are normally located near your pinky fingers, and are
30228 normally used to get capital letters and stuff.  You probably use it all
30229 the time.  The control key is normally marked ``CTRL'' or something like
30230 that.  The meta key is, funnily enough, never marked as such on any
30231 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
30232 which is the meta key on this keyboard.  It's usually located somewhere
30233 to the left hand side of the keyboard, usually on the bottom row.
30234
30235 Now, us Emacs people don't say ``press the meta-control-m key'',
30236 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
30237 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
30238 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
30239 down the control key, and hold it down while you press @kbd{k}''.
30240 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
30241 the control key and then press @kbd{k}''.  Simple, ay?
30242
30243 This is somewhat complicated by the fact that not all keyboards have a
30244 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
30245 means ``press escape, release escape, press @kbd{k}''.  That's much more
30246 work than if you have a meta key, so if that's the case, I respectfully
30247 suggest you get a real keyboard with a meta key.  You can't live without
30248 it.
30249
30250
30251
30252 @node Emacs Lisp
30253 @subsection Emacs Lisp
30254
30255 Emacs is the King of Editors because it's really a Lisp interpreter.
30256 Each and every key you tap runs some Emacs Lisp code snippet, and since
30257 Emacs Lisp is an interpreted language, that means that you can configure
30258 any key to run any arbitrary code.  You just, like, do it.
30259
30260 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
30261 functions.  (These are byte-compiled for speed, but it's still
30262 interpreted.)  If you decide that you don't like the way Gnus does
30263 certain things, it's trivial to have it do something a different way.
30264 (Well, at least if you know how to write Lisp code.)  However, that's
30265 beyond the scope of this manual, so we are simply going to talk about
30266 some common constructs that you normally use in your @file{~/.gnus.el}
30267 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
30268 in order to set things of Gnus up, it is much better to use the
30269 @file{~/.gnus.el} file, @xref{Startup Files}.)
30270
30271 If you want to set the variable @code{gnus-florgbnize} to four (4), you
30272 write the following:
30273
30274 @lisp
30275 (setq gnus-florgbnize 4)
30276 @end lisp
30277
30278 This function (really ``special form'') @code{setq} is the one that can
30279 set a variable to some value.  This is really all you need to know.  Now
30280 you can go and fill your @file{~/.gnus.el} file with lots of these to
30281 change how Gnus works.
30282
30283 If you have put that thing in your @file{~/.gnus.el} file, it will be
30284 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
30285 start Gnus.  If you want to change the variable right away, simply say
30286 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
30287 previous ``form'', which is a simple @code{setq} statement here.
30288
30289 Go ahead---just try it, if you're located at your Emacs.  After you
30290 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
30291 is the return value of the form you @code{eval}ed.
30292
30293 Some pitfalls:
30294
30295 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
30296 that means:
30297
30298 @lisp
30299 (setq gnus-read-active-file 'some)
30300 @end lisp
30301
30302 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
30303 @samp{nntp.ifi.uio.no}'', that means:
30304
30305 @lisp
30306 (setq gnus-nntp-server "nntp.ifi.uio.no")
30307 @end lisp
30308
30309 So be careful not to mix up strings (the latter) with symbols (the
30310 former).  The manual is unambiguous, but it can be confusing.
30311
30312 @page
30313 @include gnus-faq.texi
30314
30315 @node GNU Free Documentation License
30316 @chapter GNU Free Documentation License
30317 @include doclicense.texi
30318
30319 @node Index
30320 @chapter Index
30321 @printindex cp
30322
30323 @node Key Index
30324 @chapter Key Index
30325 @printindex ky
30326
30327 @summarycontents
30328 @contents
30329 @bye
30330
30331 @iftex
30332 @iflatex
30333 \end{document}
30334 @end iflatex
30335 @end iftex
30336
30337 @c Local Variables:
30338 @c mode: texinfo
30339 @c coding: iso-8859-1
30340 @c End:
30341
30342 @ignore
30343    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
30344 @end ignore