Import Gnus v5.10.2.
[elisp/gnus.git-] / 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 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Gnus v5.10.2}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnusenv}[1]{\gnustt{#1}}
57 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
58 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
59 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
60 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusdfn}[1]{\textit{#1}}
63 \newcommand{\gnusi}[1]{\textit{#1}}
64 \newcommand{\gnusr}[1]{\textrm{#1}}
65 \newcommand{\gnusstrong}[1]{\textbf{#1}}
66 \newcommand{\gnusemph}[1]{\textit{#1}}
67 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
68 \newcommand{\gnussc}[1]{\textsc{#1}}
69 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
70 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
71 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
72 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
73 \newcommand{\gnusacronym}[1]{\textsc{#1}}
74 \newcommand{\gnusemail}[1]{\textit{#1}}
75
76 \newcommand{\gnusbullet}{{${\bullet}$}}
77 \newcommand{\gnusdollar}{\$}
78 \newcommand{\gnusampersand}{\&}
79 \newcommand{\gnuspercent}{\%}
80 \newcommand{\gnushash}{\#}
81 \newcommand{\gnushat}{\symbol{"5E}}
82 \newcommand{\gnusunderline}{\symbol{"5F}}
83 \newcommand{\gnusnot}{$\neg$}
84 \newcommand{\gnustilde}{\symbol{"7E}}
85 \newcommand{\gnusless}{{$<$}}
86 \newcommand{\gnusgreater}{{$>$}}
87 \newcommand{\gnusbraceleft}{{$>$}}
88 \newcommand{\gnusbraceright}{{$>$}}
89
90 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
91 \newcommand{\gnusinteresting}{
92 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
93 }
94
95 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
96
97 \newcommand{\gnuspagechapter}[1]{
98 {\mbox{}}
99 }
100
101 \newdimen{\gnusdimen}
102 \gnusdimen 0pt
103
104 \newcommand{\gnuschapter}[2]{
105 \gnuscleardoublepage
106 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
107 \chapter{#2}
108 \renewcommand{\gnussectionname}{}
109 \renewcommand{\gnuschaptername}{#2}
110 \thispagestyle{empty}
111 \hspace*{-2cm}
112 \begin{picture}(500,500)(0,0)
113 \put(480,350){\makebox(0,0)[tr]{#1}}
114 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
115 \end{picture}
116 \clearpage
117 }
118
119 \newcommand{\gnusfigure}[3]{
120 \begin{figure}
121 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
122 #3
123 \end{picture}
124 \caption{#1}
125 \end{figure}
126 }
127
128 \newcommand{\gnusicon}[1]{
129 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
130 }
131
132 \newcommand{\gnuspicon}[1]{
133 \margindex{\epsfig{figure=#1,width=2cm}}
134 }
135
136 \newcommand{\gnusxface}[2]{
137 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
138 }
139
140 \newcommand{\gnussmiley}[2]{
141 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
142 }
143
144 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
145
146 \newcommand{\gnussection}[1]{
147 \renewcommand{\gnussectionname}{#1}
148 \section{#1}
149 }
150
151 \newenvironment{codelist}%
152 {\begin{list}{}{
153 }
154 }{\end{list}}
155
156 \newenvironment{kbdlist}%
157 {\begin{list}{}{
158 \labelwidth=0cm
159 }
160 }{\end{list}}
161
162 \newenvironment{dfnlist}%
163 {\begin{list}{}{
164 }
165 }{\end{list}}
166
167 \newenvironment{stronglist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{samplist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{varlist}%
178 {\begin{list}{}{
179 }
180 }{\end{list}}
181
182 \newenvironment{emphlist}%
183 {\begin{list}{}{
184 }
185 }{\end{list}}
186
187 \newlength\gnusheadtextwidth
188 \setlength{\gnusheadtextwidth}{\headtextwidth}
189 \addtolength{\gnusheadtextwidth}{1cm}
190
191 \newpagestyle{gnuspreamble}%
192 {
193 {
194 \ifodd\count0
195 {
196 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
197 }
198 \else
199 {
200 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
201 }
202 }
203 \fi
204 }
205 }
206 {
207 \ifodd\count0
208 \mbox{} \hfill
209 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
210 \else
211 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
212 \hfill \mbox{}
213 \fi
214 }
215
216 \newpagestyle{gnusindex}%
217 {
218 {
219 \ifodd\count0
220 {
221 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
222 }
223 \else
224 {
225 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
226 }
227 \fi
228 }
229 }
230 {
231 \ifodd\count0
232 \mbox{} \hfill
233 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
234 \else
235 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
236 \hfill \mbox{}
237 \fi
238 }
239
240 \newpagestyle{gnus}%
241 {
242 {
243 \ifodd\count0
244 {
245 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
246 }
247 \else
248 {
249 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
250 }
251 \fi
252 }
253 }
254 {
255 \ifodd\count0
256 \mbox{} \hfill
257 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
258 \else
259 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
260 \hfill \mbox{}
261 \fi
262 }
263
264 \pagenumbering{roman}
265 \pagestyle{gnuspreamble}
266
267 @end iflatex
268 @end iftex
269
270 @iftex
271 @iflatex
272 \begin{titlepage}
273 {
274
275 %\addtolength{\oddsidemargin}{-5cm}
276 %\addtolength{\evensidemargin}{-5cm}
277 \parindent=0cm
278 \addtolength{\textheight}{2cm}
279
280 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
281 \rule{15cm}{1mm}\\
282 \vfill
283 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
284 \vfill
285 \rule{15cm}{1mm}\\
286 \gnusauthor{by Lars Magne Ingebrigtsen}
287 \newpage
288 }
289
290 \mbox{}
291 \vfill
292
293 \thispagestyle{empty}
294
295 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
296 2002, 2003
297 Free Software Foundation, Inc.
298
299
300 Permission is granted to copy, distribute and/or modify this document
301 under the terms of the GNU Free Documentation License, Version 1.1 or
302 any later version published by the Free Software Foundation; with no
303 Invariant Sections, with the Front-Cover texts being ``A GNU
304 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
305 license is included in the section entitled ``GNU Free Documentation
306 License'' in the Emacs manual.
307
308 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
309 this GNU Manual, like GNU software.  Copies published by the Free
310 Software Foundation raise funds for GNU development.''
311
312 This document is part of a collection distributed under the GNU Free
313 Documentation License.  If you want to distribute this document
314 separately from the collection, you can do so by adding a copy of the
315 license to the document, as described in section 6 of the license.
316 \newpage
317 \end{titlepage}
318 @end iflatex
319 @end iftex
320
321 @ifnottex
322
323 This file documents Gnus, the GNU Emacs newsreader.
324
325 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
326         Free Software Foundation, Inc.
327
328 Permission is granted to copy, distribute and/or modify this document
329 under the terms of the GNU Free Documentation License, Version 1.1 or
330 any later version published by the Free Software Foundation; with the
331 Invariant Sections being none, with the Front-Cover texts being ``A GNU
332 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
333 license is included in the section entitled ``GNU Free Documentation
334 License'' in the Emacs manual.
335
336 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
337 this GNU Manual, like GNU software.  Copies published by the Free
338 Software Foundation raise funds for GNU development.''
339
340 This document is part of a collection distributed under the GNU Free
341 Documentation License.  If you want to distribute this document
342 separately from the collection, you can do so by adding a copy of the
343 license to the document, as described in section 6 of the license.
344 @end ifnottex
345
346 @tex
347
348 @titlepage
349 @title Gnus Manual
350
351 @author by Lars Magne Ingebrigtsen
352 @page
353
354 @vskip 0pt plus 1filll
355 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
356 2002, 2003
357         Free Software Foundation, Inc.
358
359 Permission is granted to copy, distribute and/or modify this document
360 under the terms of the GNU Free Documentation License, Version 1.1 or
361 any later version published by the Free Software Foundation; with no
362 Invariant Sections, with the Front-Cover texts being ``A GNU
363 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
364 license is included in the section entitled ``GNU Free Documentation
365 License'' in the Emacs manual.
366
367 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
368 this GNU Manual, like GNU software.  Copies published by the Free
369 Software Foundation raise funds for GNU development.''
370
371 This document is part of a collection distributed under the GNU Free
372 Documentation License.  If you want to distribute this document
373 separately from the collection, you can do so by adding a copy of the
374 license to the document, as described in section 6 of the license.
375
376 @end titlepage
377 @page
378
379 @end tex
380
381
382 @node Top
383 @top The Gnus Newsreader
384
385 @ifinfo
386
387 You can read news (and mail) from within Emacs by using Gnus.  The news
388 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
389 spool or your mbox file.  All at the same time, if you want to push your
390 luck.
391
392 This manual corresponds to Gnus v5.10.2.
393
394 @end ifinfo
395
396 @iftex
397
398 @iflatex
399 \tableofcontents
400 \gnuscleardoublepage
401 @end iflatex
402
403 Gnus is the advanced, self-documenting, customizable, extensible
404 unreal-time newsreader for GNU Emacs.
405
406 Oops.  That sounds oddly familiar, so let's start over again to avoid
407 being accused of plagiarism:
408
409 Gnus is a message-reading laboratory.  It will let you look at just
410 about anything as if it were a newsgroup.  You can read mail with it,
411 you can browse directories with it, you can @code{ftp} with it---you
412 can even read news with it!
413
414 Gnus tries to empower people who read news the same way Emacs empowers
415 people who edit text.  Gnus sets no limits to what the user should be
416 allowed to do.  Users are encouraged to extend Gnus to make it behave
417 like they want it to behave.  A program should not control people;
418 people should be empowered to do what they want by using (or abusing)
419 the program.
420
421 @end iftex
422
423 @menu
424 * Starting Up::                 Finding news can be a pain.
425 * Group Buffer::                Selecting, subscribing and killing groups.
426 * Summary Buffer::              Reading, saving and posting articles.
427 * Article Buffer::              Displaying and handling articles.
428 * Composing Messages::          Information on sending mail and news.
429 * Select Methods::              Gnus reads all messages from various select methods.
430 * Scoring::                     Assigning values to articles.
431 * Various::                     General purpose settings.
432 * The End::                     Farewell and goodbye.
433 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
434 * Index::                       Variable, function and concept index.
435 * Key Index::                   Key Index.
436
437 Other related manuals
438
439 * Message:(message).            Composing messages.
440 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
441 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
442 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
443
444 @detailmenu
445  --- The Detailed Node Listing ---
446
447 Starting Gnus
448
449 * Finding the News::            Choosing a method for getting news.
450 * The First Time::              What does Gnus do the first time you start it?
451 * The Server is Down::          How can I read my mail then?
452 * Slave Gnusae::                You can have more than one Gnus active at a time.
453 * Fetching a Group::            Starting Gnus just to read a group.
454 * New Groups::                  What is Gnus supposed to do with new groups?
455 * Changing Servers::            You may want to move from one server to another.
456 * Startup Files::               Those pesky startup files---@file{.newsrc}.
457 * Auto Save::                   Recovering from a crash.
458 * The Active File::             Reading the active file over a slow line Takes Time.
459 * Startup Variables::           Other variables you might change.
460
461 New Groups
462
463 * Checking New Groups::         Determining what groups are new.
464 * Subscription Methods::        What Gnus should do with new groups.
465 * Filtering New Groups::        Making Gnus ignore certain new groups.
466
467 Group Buffer
468
469 * Group Buffer Format::         Information listed and how you can change it.
470 * Group Maneuvering::           Commands for moving in the group buffer.
471 * Selecting a Group::           Actually reading news.
472 * Subscription Commands::       Unsubscribing, killing, subscribing.
473 * Group Data::                  Changing the info for a group.
474 * Group Levels::                Levels? What are those, then?
475 * Group Score::                 A mechanism for finding out what groups you like.
476 * Marking Groups::              You can mark groups for later processing.
477 * Foreign Groups::              Creating and editing groups.
478 * Group Parameters::            Each group may have different parameters set.
479 * Listing Groups::              Gnus can list various subsets of the groups.
480 * Sorting Groups::              Re-arrange the group order.
481 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
482 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
483 * Exiting Gnus::                Stop reading news and get some work done.
484 * Group Topics::                A folding group mode divided into topics.
485 * Misc Group Stuff::            Other stuff that you can to do.
486
487 Group Buffer Format
488
489 * Group Line Specification::    Deciding how the group buffer is to look.
490 * Group Mode Line Specification::  The group buffer mode line.
491 * Group Highlighting::          Having nice colors in the group buffer.
492
493 Group Topics
494
495 * Topic Commands::              Interactive E-Z commands.
496 * Topic Variables::             How to customize the topics the Lisp Way.
497 * Topic Sorting::               Sorting each topic individually.
498 * Topic Topology::              A map of the world.
499 * Topic Parameters::            Parameters that apply to all groups in a topic.
500
501 Misc Group Stuff
502
503 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
504 * Group Information::           Information and help on groups and Gnus.
505 * Group Timestamp::             Making Gnus keep track of when you last read a group.
506 * File Commands::               Reading and writing the Gnus files.
507 * Sieve Commands::              Managing Sieve scripts.
508
509 Summary Buffer
510
511 * Summary Buffer Format::       Deciding how the summary buffer is to look.
512 * Summary Maneuvering::         Moving around the summary buffer.
513 * Choosing Articles::           Reading articles.
514 * Paging the Article::          Scrolling the current article.
515 * Reply Followup and Post::     Posting articles.
516 * Delayed Articles::            Send articles at a later time.
517 * Marking Articles::            Marking articles as read, expirable, etc.
518 * Limiting::                    You can limit the summary buffer.
519 * Threading::                   How threads are made.
520 * Sorting the Summary Buffer::  How articles and threads are sorted.
521 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
522 * Article Caching::             You may store articles in a cache.
523 * Persistent Articles::         Making articles expiry-resistant.
524 * Article Backlog::             Having already read articles hang around.
525 * Saving Articles::             Ways of customizing article saving.
526 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
527 * Article Treatment::           The article buffer can be mangled at will.
528 * MIME Commands::               Doing MIMEy things with the articles.
529 * Charsets::                    Character set issues.
530 * Article Commands::            Doing various things with the article buffer.
531 * Summary Sorting::             Sorting the summary buffer in various ways.
532 * Finding the Parent::          No child support? Get the parent.
533 * Alternative Approaches::      Reading using non-default summaries.
534 * Tree Display::                A more visual display of threads.
535 * Mail Group Commands::         Some commands can only be used in mail groups.
536 * Various Summary Stuff::       What didn't fit anywhere else.
537 * Exiting the Summary Buffer::  Returning to the Group buffer,
538                                 or reselecting the current group.
539 * Crosspost Handling::          How crossposted articles are dealt with.
540 * Duplicate Suppression::       An alternative when crosspost handling fails.
541 * Security::                    Decrypt and Verify.
542 * Mailing List::                Mailing list minor mode.
543
544 Summary Buffer Format
545
546 * Summary Buffer Lines::        You can specify how summary lines should look.
547 * To From Newsgroups::          How to not display your own name.
548 * Summary Buffer Mode Line::    You can say how the mode line should look.
549 * Summary Highlighting::        Making the summary buffer all pretty and nice.
550
551 Choosing Articles
552
553 * Choosing Commands::           Commands for choosing articles.
554 * Choosing Variables::          Variables that influence these commands.
555
556 Reply, Followup and Post
557
558 * Summary Mail Commands::       Sending mail.
559 * Summary Post Commands::       Sending news.
560 * Summary Message Commands::    Other Message-related commands.
561 * Canceling and Superseding::   
562
563 Marking Articles
564
565 * Unread Articles::             Marks for unread articles.
566 * Read Articles::               Marks for read articles.
567 * Other Marks::                 Marks that do not affect readedness.
568 * Setting Marks::               
569 * Generic Marking Commands::    
570 * Setting Process Marks::       
571
572 Marking Articles
573
574 * Setting Marks::             How to set and remove marks.
575 * Generic Marking Commands::  How to customize the marking.
576 * Setting Process Marks::     How to mark articles for later processing.
577
578 Threading
579
580 * Customizing Threading::       Variables you can change to affect the threading.
581 * Thread Commands::             Thread based commands in the summary buffer.
582
583 Customizing Threading
584
585 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
586 * Filling In Threads::          Making the threads displayed look fuller.
587 * More Threading::              Even more variables for fiddling with threads.
588 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
589
590 Decoding Articles
591
592 * Uuencoded Articles::          Uudecode articles.
593 * Shell Archives::              Unshar articles.
594 * PostScript Files::            Split PostScript.
595 * Other Files::                 Plain save and binhex.
596 * Decoding Variables::          Variables for a happy decoding.
597 * Viewing Files::               You want to look at the result of the decoding?
598
599 Decoding Variables
600
601 * Rule Variables::              Variables that say how a file is to be viewed.
602 * Other Decode Variables::      Other decode variables.
603 * Uuencoding and Posting::      Variables for customizing uuencoding.
604
605 Article Treatment
606
607 * Article Highlighting::        You want to make the article look like fruit salad.
608 * Article Fontisizing::         Making emphasized text look nice.
609 * Article Hiding::              You also want to make certain info go away.
610 * Article Washing::             Lots of way-neat functions to make life better.
611 * Article Header::              Doing various header transformations.
612 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
613 * Article Button Levels::       Controlling appearance of buttons.
614 * Article Date::                Grumble, UT!
615 * Article Display::             Display various stuff---X-Face, Picons, Smileys
616 * Article Signature::           What is a signature?
617 * Article Miscellanea::         Various other stuff.
618
619 Alternative Approaches
620
621 * Pick and Read::               First mark articles and then read them.
622 * Binary Groups::               Auto-decode all articles.
623
624 Various Summary Stuff
625
626 * Summary Group Information::   Information oriented commands.
627 * Searching for Articles::      Multiple article commands.
628 * Summary Generation Commands::  
629 * Really Various Summary Commands::  Those pesky non-conformant commands.
630
631 Article Buffer
632
633 * Hiding Headers::              Deciding what headers should be displayed.
634 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
635 * Customizing Articles::        Tailoring the look of the articles.
636 * Article Keymap::              Keystrokes available in the article buffer.
637 * Misc Article::                Other stuff.
638
639 Composing Messages
640
641 * Mail::                        Mailing and replying.
642 * Posting Server::              What server should you post and mail via?
643 * Mail and Post::               Mailing and posting at the same time.
644 * Archived Messages::           Where Gnus stores the messages you've sent.
645 * Posting Styles::              An easier way to specify who you are.
646 * Drafts::                      Postponing messages and rejected messages.
647 * Rejected Articles::           What happens if the server doesn't like your article?
648 * Signing and encrypting::      How to compose secure messages.
649
650 Select Methods
651
652 * Server Buffer::               Making and editing virtual servers.
653 * Getting News::                Reading USENET news with Gnus.
654 * Getting Mail::                Reading your personal mail with Gnus.
655 * Browsing the Web::            Getting messages from a plethora of Web sources.
656 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
657 * Other Sources::               Reading directories, files, SOUP packets.
658 * Combined Groups::             Combining groups into one group.
659 * Gnus Unplugged::              Reading news and mail offline.
660
661 Server Buffer
662
663 * Server Buffer Format::        You can customize the look of this buffer.
664 * Server Commands::             Commands to manipulate servers.
665 * Example Methods::             Examples server specifications.
666 * Creating a Virtual Server::   An example session.
667 * Server Variables::            Which variables to set.
668 * Servers and Methods::         You can use server names as select methods.
669 * Unavailable Servers::         Some servers you try to contact may be down.
670
671 Getting News
672
673 * NNTP::                        Reading news from an @acronym{NNTP} server.
674 * News Spool::                  Reading news from the local spool.
675
676 @acronym{NNTP}
677
678 * Direct Functions::            Connecting directly to the server.
679 * Indirect Functions::          Connecting indirectly to the server.
680 * Common Variables::            Understood by several connection functions.
681
682 Getting Mail
683
684 * Mail in a Newsreader::        Important introductory notes.
685 * Getting Started Reading Mail::  A simple cookbook example.
686 * Splitting Mail::              How to create mail groups.
687 * Mail Sources::                How to tell Gnus where to get mail from.
688 * Mail Back End Variables::     Variables for customizing mail handling.
689 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
690 * Group Mail Splitting::        Use group customize to drive mail splitting.
691 * Incorporating Old Mail::      What about the old mail you have?
692 * Expiring Mail::               Getting rid of unwanted mail.
693 * Washing Mail::                Removing gruft from the mail you get.
694 * Duplicates::                  Dealing with duplicated mail.
695 * Not Reading Mail::            Using mail back ends for reading other files.
696 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
697
698 Mail Sources
699
700 * Mail Source Specifiers::      How to specify what a mail source is.
701 * Mail Source Customization::   Some variables that influence things.
702 * Fetching Mail::               Using the mail source specifiers.
703
704 Choosing a Mail Back End
705
706 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
707 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
708 * Mail Spool::                  Store your mail in a private spool?
709 * MH Spool::                    An mhspool-like back end.
710 * Maildir::                     Another one-file-per-message format.
711 * Mail Folders::                Having one file for each group.
712 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
713
714 Browsing the Web
715
716 * Archiving Mail::              
717 * Web Searches::                Creating groups from articles that match a string.
718 * Slashdot::                    Reading the Slashdot comments.
719 * Ultimate::                    The Ultimate Bulletin Board systems.
720 * Web Archive::                 Reading mailing list archived on web.
721 * RSS::                         Reading RDF site summary.
722 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
723
724 @acronym{IMAP}
725
726 * Splitting in IMAP::           Splitting mail with nnimap.
727 * Expiring in IMAP::            Expiring mail with nnimap.
728 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
729 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
730 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
731
732 Other Sources
733
734 * Directory Groups::            You can read a directory as if it was a newsgroup.
735 * Anything Groups::             Dired?  Who needs dired?
736 * Document Groups::             Single files can be the basis of a group.
737 * SOUP::                        Reading @sc{soup} packets ``offline''.
738 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
739
740 Document Groups
741
742 * Document Server Internals::   How to add your own document types.
743
744 SOUP
745
746 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
747 * SOUP Groups::                 A back end for reading @sc{soup} packets.
748 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
749
750 Combined Groups
751
752 * Virtual Groups::              Combining articles from many groups.
753 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
754
755 Gnus Unplugged
756
757 * Agent Basics::                How it all is supposed to work.
758 * Agent Categories::            How to tell the Gnus Agent what to download.
759 * Agent Commands::              New commands for all the buffers.
760 * Agent Visuals::               Ways that the agent may effect your summary buffer.
761 * Agent as Cache::              The Agent is a big cache too.
762 * Agent Expiry::                How to make old articles go away.
763 * Agent Regeneration::          How to recover from lost connections and other accidents.
764 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
765 * Outgoing Messages::           What happens when you post/mail something?
766 * Agent Variables::             Customizing is fun.
767 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
768 * Batching Agents::             How to fetch news from a @code{cron} job.
769 * Agent Caveats::               What you think it'll do and what it does.
770
771 Agent Categories
772
773 * Category Syntax::             What a category looks like.
774 * Category Buffer::             A buffer for maintaining categories.
775 * Category Variables::          Customize'r'Us.
776
777 Agent Commands
778
779 * Group Agent Commands::        Configure groups and fetch their contents.
780 * Summary Agent Commands::      Manually select then fetch specific articles.
781 * Server Agent Commands::       Select the servers that are supported by the agent.
782
783 Scoring
784
785 * Summary Score Commands::      Adding score entries for the current group.
786 * Group Score Commands::        General score commands.
787 * Score Variables::             Customize your scoring.  (My, what terminology).
788 * Score File Format::           What a score file may contain.
789 * Score File Editing::          You can edit score files by hand as well.
790 * Adaptive Scoring::            Big Sister Gnus knows what you read.
791 * Home Score File::             How to say where new score entries are to go.
792 * Followups To Yourself::       Having Gnus notice when people answer you.
793 * Scoring On Other Headers::    Scoring on non-standard headers.
794 * Scoring Tips::                How to score effectively.
795 * Reverse Scoring::             That problem child of old is not problem.
796 * Global Score Files::          Earth-spanning, ear-splitting score files.
797 * Kill Files::                  They are still here, but they can be ignored.
798 * Converting Kill Files::       Translating kill files to score files.
799 * GroupLens::                   Getting predictions on what you like to read.
800 * Advanced Scoring::            Using logical expressions to build score rules.
801 * Score Decays::                It can be useful to let scores wither away.
802
803 GroupLens
804
805 * Using GroupLens::             How to make Gnus use GroupLens.
806 * Rating Articles::             Letting GroupLens know how you rate articles.
807 * Displaying Predictions::      Displaying predictions given by GroupLens.
808 * GroupLens Variables::         Customizing GroupLens.
809
810 Advanced Scoring
811
812 * Advanced Scoring Syntax::     A definition.
813 * Advanced Scoring Examples::   What they look like.
814 * Advanced Scoring Tips::       Getting the most out of it.
815
816 Various
817
818 * Process/Prefix::              A convention used by many treatment commands.
819 * Interactive::                 Making Gnus ask you many questions.
820 * Symbolic Prefixes::           How to supply some Gnus functions with options.
821 * Formatting Variables::        You can specify what buffers should look like.
822 * Window Layout::               Configuring the Gnus buffer windows.
823 * Faces and Fonts::             How to change how faces look.
824 * Compilation::                 How to speed Gnus up.
825 * Mode Lines::                  Displaying information in the mode lines.
826 * Highlighting and Menus::      Making buffers look all nice and cozy.
827 * Buttons::                     Get tendinitis in ten easy steps!
828 * Daemons::                     Gnus can do things behind your back.
829 * NoCeM::                       How to avoid spam and other fatty foods.
830 * Undo::                        Some actions can be undone.
831 * Predicate Specifiers::        Specifying predicates.
832 * Moderation::                  What to do if you're a moderator.
833 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
834 * Fuzzy Matching::              What's the big fuzz?
835 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
836 * Various Various::             Things that are really various.
837
838 Formatting Variables
839
840 * Formatting Basics::           A formatting variable is basically a format string.
841 * Mode Line Formatting::        Some rules about mode line formatting variables.
842 * Advanced Formatting::         Modifying output in various ways.
843 * User-Defined Specs::          Having Gnus call your own functions.
844 * Formatting Fonts::            Making the formatting look colorful and nice.
845 * Positioning Point::           Moving point to a position after an operation.
846 * Tabulation::                  Tabulating your output.
847 * Wide Characters::             Dealing with wide characters.
848
849 Image Enhancements
850
851 * Picons::                      How to display pictures of what you're reading.
852 * Smileys::                     Show all those happy faces the way they were meant to be shown.
853 * X-Face::                      Display a funky, teensy black-and-white image.
854 * XVarious::                    Other XEmacsy Gnusey variables.
855
856 Thwarting Email Spam
857
858 * The problem of spam::         Some background, and some solutions
859 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
860 * SpamAssassin::                How to use external anti-spam tools.
861 * Hashcash::                    Reduce spam by burning CPU time.
862 * Filtering Spam Using The Spam ELisp Package::  
863 * Filtering Spam Using Statistics with spam-stat::  
864
865 Appendices
866
867 * XEmacs::                      Requirements for installing under XEmacs.
868 * History::                     How Gnus got where it is today.
869 * On Writing Manuals::          Why this is not a beginner's guide.
870 * Terminology::                 We use really difficult, like, words here.
871 * Customization::               Tailoring Gnus to your needs.
872 * Troubleshooting::             What you might try if things do not work.
873 * Gnus Reference Guide::        Rilly, rilly technical stuff.
874 * Emacs for Heathens::          A short introduction to Emacsian terms.
875 * Frequently Asked Questions::  The Gnus FAQ.
876
877 History
878
879 * Gnus Versions::               What Gnus versions have been released.
880 * Other Gnus Versions::         Other Gnus versions that also have been released.
881 * Why?::                        What's the point of Gnus?
882 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
883 * Conformity::                  Gnus tries to conform to all standards.
884 * Emacsen::                     Gnus can be run on a few modern Emacsen.
885 * Gnus Development::            How Gnus is developed.
886 * Contributors::                Oodles of people.
887 * New Features::                Pointers to some of the new stuff in Gnus.
888
889 New Features
890
891 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
892 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
893 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
894 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
895 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
896 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
897
898 Customization
899
900 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
901 * Slow Terminal Connection::    You run a remote Emacs.
902 * Little Disk Space::           You feel that having large setup files is icky.
903 * Slow Machine::                You feel like buying a faster machine.
904
905 Gnus Reference Guide
906
907 * Gnus Utility Functions::      Common functions and variable to use.
908 * Back End Interface::          How Gnus communicates with the servers.
909 * Score File Syntax::           A BNF definition of the score file standard.
910 * Headers::                     How Gnus stores headers internally.
911 * Ranges::                      A handy format for storing mucho numbers.
912 * Group Info::                  The group info format.
913 * Extended Interactive::        Symbolic prefixes and stuff.
914 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
915 * Various File Formats::        Formats of files that Gnus use.
916
917 Back End Interface
918
919 * Required Back End Functions::  Functions that must be implemented.
920 * Optional Back End Functions::  Functions that need not be implemented.
921 * Error Messaging::             How to get messages and report errors.
922 * Writing New Back Ends::       Extending old back ends.
923 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
924 * Mail-like Back Ends::         Some tips on mail back ends.
925
926 Various File Formats
927
928 * Active File Format::          Information on articles and groups available.
929 * Newsgroups File Format::      Group descriptions.
930
931 Emacs for Heathens
932
933 * Keystrokes::                  Entering text and executing commands.
934 * Emacs Lisp::                  The built-in Emacs programming language.
935
936 @end detailmenu
937 @end menu
938
939 @node Starting Up
940 @chapter Starting Gnus
941 @cindex starting up
942
943 @kindex M-x gnus
944 @findex gnus
945 If your system administrator has set things up properly, starting Gnus
946 and reading news is extremely easy---you just type @kbd{M-x gnus} in
947 your Emacs.
948
949 @findex gnus-other-frame
950 @kindex M-x gnus-other-frame
951 If you want to start Gnus in a different frame, you can use the command
952 @kbd{M-x gnus-other-frame} instead.
953
954 If things do not go smoothly at startup, you have to twiddle some
955 variables in your @file{~/.gnus.el} file.  This file is similar to
956 @file{~/.emacs}, but is read when gnus starts.
957
958 If you puzzle at any terms used in this manual, please refer to the
959 terminology section (@pxref{Terminology}).
960
961 @menu
962 * Finding the News::            Choosing a method for getting news.
963 * The First Time::              What does Gnus do the first time you start it?
964 * The Server is Down::          How can I read my mail then?
965 * Slave Gnusae::                You can have more than one Gnus active at a time.
966 * Fetching a Group::            Starting Gnus just to read a group.
967 * New Groups::                  What is Gnus supposed to do with new groups?
968 * Changing Servers::            You may want to move from one server to another.
969 * Startup Files::               Those pesky startup files---@file{.newsrc}.
970 * Auto Save::                   Recovering from a crash.
971 * The Active File::             Reading the active file over a slow line Takes Time.
972 * Startup Variables::           Other variables you might change.
973 @end menu
974
975
976 @node Finding the News
977 @section Finding the News
978 @cindex finding news
979
980 @vindex gnus-select-method
981 @c @head
982 The @code{gnus-select-method} variable says where Gnus should look for
983 news.  This variable should be a list where the first element says
984 @dfn{how} and the second element says @dfn{where}.  This method is your
985 native method.  All groups not fetched with this method are
986 foreign groups.
987
988 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
989 you want to get your daily dosage of news from, you'd say:
990
991 @lisp
992 (setq gnus-select-method '(nntp "news.somewhere.edu"))
993 @end lisp
994
995 If you want to read directly from the local spool, say:
996
997 @lisp
998 (setq gnus-select-method '(nnspool ""))
999 @end lisp
1000
1001 If you can use a local spool, you probably should, as it will almost
1002 certainly be much faster.  But do not use the local spool if your
1003 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1004
1005 @vindex gnus-nntpserver-file
1006 @cindex NNTPSERVER
1007 @cindex @acronym{NNTP} server
1008 If this variable is not set, Gnus will take a look at the
1009 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1010 Gnus will see whether @code{gnus-nntpserver-file}
1011 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1012 If that fails as well, Gnus will try to use the machine running Emacs
1013 as an @acronym{NNTP} server.  That's a long shot, though.
1014
1015 @vindex gnus-nntp-server
1016 If @code{gnus-nntp-server} is set, this variable will override
1017 @code{gnus-select-method}.  You should therefore set
1018 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1019
1020 @vindex gnus-secondary-servers
1021 @vindex gnus-nntp-server
1022 You can also make Gnus prompt you interactively for the name of an
1023 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1024 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1025 in the @code{gnus-secondary-servers} list (if any).  You can also just
1026 type in the name of any server you feel like visiting.  (Note that this
1027 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1028 gnus} later in the same Emacs session, Gnus will contact the same
1029 server.)
1030
1031 @findex gnus-group-browse-foreign-server
1032 @kindex B (Group)
1033 However, if you use one @acronym{NNTP} server regularly and are just
1034 interested in a couple of groups from a different server, you would be
1035 better served by using the @kbd{B} command in the group buffer.  It will
1036 let you have a look at what groups are available, and you can subscribe
1037 to any of the groups you want to.  This also makes @file{.newsrc}
1038 maintenance much tidier.  @xref{Foreign Groups}.
1039
1040 @vindex gnus-secondary-select-methods
1041 @c @head
1042 A slightly different approach to foreign groups is to set the
1043 @code{gnus-secondary-select-methods} variable.  The select methods
1044 listed in this variable are in many ways just as native as the
1045 @code{gnus-select-method} server.  They will also be queried for active
1046 files during startup (if that's required), and new newsgroups that
1047 appear on these servers will be subscribed (or not) just as native
1048 groups are.
1049
1050 For instance, if you use the @code{nnmbox} back end to read your mail,
1051 you would typically set this variable to
1052
1053 @lisp
1054 (setq gnus-secondary-select-methods '((nnmbox "")))
1055 @end lisp
1056
1057
1058 @node The First Time
1059 @section The First Time
1060 @cindex first time usage
1061
1062 If no startup files exist, Gnus will try to determine what groups should
1063 be subscribed by default.
1064
1065 @vindex gnus-default-subscribed-newsgroups
1066 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1067 will subscribe you to just those groups in that list, leaving the rest
1068 killed.  Your system administrator should have set this variable to
1069 something useful.
1070
1071 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1072 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1073 here as @dfn{whatever Lars thinks you should read}.)
1074
1075 You'll also be subscribed to the Gnus documentation group, which should
1076 help you with most common problems.
1077
1078 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1079 use the normal functions for handling new groups, and not do anything
1080 special.
1081
1082
1083 @node The Server is Down
1084 @section The Server is Down
1085 @cindex server errors
1086
1087 If the default server is down, Gnus will understandably have some
1088 problems starting.  However, if you have some mail groups in addition to
1089 the news groups, you may want to start Gnus anyway.
1090
1091 Gnus, being the trusting sort of program, will ask whether to proceed
1092 without a native select method if that server can't be contacted.  This
1093 will happen whether the server doesn't actually exist (i.e., you have
1094 given the wrong address) or the server has just momentarily taken ill
1095 for some reason or other.  If you decide to continue and have no foreign
1096 groups, you'll find it difficult to actually do anything in the group
1097 buffer.  But, hey, that's your problem.  Blllrph!
1098
1099 @findex gnus-no-server
1100 @kindex M-x gnus-no-server
1101 @c @head
1102 If you know that the server is definitely down, or you just want to read
1103 your mail without bothering with the server at all, you can use the
1104 @code{gnus-no-server} command to start Gnus.  That might come in handy
1105 if you're in a hurry as well.  This command will not attempt to contact
1106 your primary server---instead, it will just activate all groups on level
1107 1 and 2.  (You should preferably keep no native groups on those two
1108 levels.) Also @pxref{Group Levels}.
1109
1110
1111 @node Slave Gnusae
1112 @section Slave Gnusae
1113 @cindex slave
1114
1115 You might want to run more than one Emacs with more than one Gnus at the
1116 same time.  If you are using different @file{.newsrc} files (e.g., if you
1117 are using the two different Gnusae to read from two different servers),
1118 that is no problem whatsoever.  You just do it.
1119
1120 The problem appears when you want to run two Gnusae that use the same
1121 @file{.newsrc} file.
1122
1123 To work around that problem some, we here at the Think-Tank at the Gnus
1124 Towers have come up with a new concept: @dfn{Masters} and
1125 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1126 taken out a copyright on those words.  If you wish to use those words in
1127 conjunction with each other, you have to send $1 per usage instance to
1128 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1129 Applications}) will be much more expensive, of course.)
1130
1131 @findex gnus-slave
1132 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1133 however you do it).  Each subsequent slave Gnusae should be started with
1134 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1135 files, but instead save @dfn{slave files} that contain information only
1136 on what groups have been read in the slave session.  When a master Gnus
1137 starts, it will read (and delete) these slave files, incorporating all
1138 information from them.  (The slave files will be read in the sequence
1139 they were created, so the latest changes will have precedence.)
1140
1141 Information from the slave files has, of course, precedence over the
1142 information in the normal (i.e., master) @file{.newsrc} file.
1143
1144 If the @file{.newsrc*} files have not been saved in the master when the
1145 slave starts, you may be prompted as to whether to read an auto-save
1146 file.  If you answer ``yes'', the unsaved changes to the master will be
1147 incorporated into the slave.  If you answer ``no'', the slave may see some
1148 messages as unread that have been read in the master.
1149
1150 @node Fetching a Group
1151 @section Fetching a Group
1152 @cindex fetching a group
1153
1154 @findex gnus-fetch-group
1155 It is sometimes convenient to be able to just say ``I want to read this
1156 group and I don't care whether Gnus has been started or not''.  This is
1157 perhaps more useful for people who write code than for users, but the
1158 command @code{gnus-fetch-group} provides this functionality in any case.
1159 It takes the group name as a parameter.
1160
1161
1162 @node New Groups
1163 @section New Groups
1164 @cindex new groups
1165 @cindex subscription
1166
1167 @vindex gnus-check-new-newsgroups
1168 If you are satisfied that you really never want to see any new groups,
1169 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1170 also save you some time at startup.  Even if this variable is
1171 @code{nil}, you can always subscribe to the new groups just by pressing
1172 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1173 is @code{ask-server} by default.  If you set this variable to
1174 @code{always}, then Gnus will query the back ends for new groups even
1175 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1176
1177 @menu
1178 * Checking New Groups::         Determining what groups are new.
1179 * Subscription Methods::        What Gnus should do with new groups.
1180 * Filtering New Groups::        Making Gnus ignore certain new groups.
1181 @end menu
1182
1183
1184 @node Checking New Groups
1185 @subsection Checking New Groups
1186
1187 Gnus normally determines whether a group is new or not by comparing the
1188 list of groups from the active file(s) with the lists of subscribed and
1189 dead groups.  This isn't a particularly fast method.  If
1190 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1191 server for new groups since the last time.  This is both faster and
1192 cheaper.  This also means that you can get rid of the list of killed
1193 groups altogether, so you may set @code{gnus-save-killed-list} to
1194 @code{nil}, which will save time both at startup, at exit, and all over.
1195 Saves disk space, too.  Why isn't this the default, then?
1196 Unfortunately, not all servers support this command.
1197
1198 I bet I know what you're thinking now: How do I find out whether my
1199 server supports @code{ask-server}?  No?  Good, because I don't have a
1200 fail-safe answer.  I would suggest just setting this variable to
1201 @code{ask-server} and see whether any new groups appear within the next
1202 few days.  If any do, then it works.  If none do, then it doesn't
1203 work.  I could write a function to make Gnus guess whether the server
1204 supports @code{ask-server}, but it would just be a guess.  So I won't.
1205 You could @code{telnet} to the server and say @code{HELP} and see
1206 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1207 it does, then it might work.  (But there are servers that lists
1208 @samp{NEWGROUPS} without supporting the function properly.)
1209
1210 This variable can also be a list of select methods.  If so, Gnus will
1211 issue an @code{ask-server} command to each of the select methods, and
1212 subscribe them (or not) using the normal methods.  This might be handy
1213 if you are monitoring a few servers for new groups.  A side effect is
1214 that startup will take much longer, so you can meditate while waiting.
1215 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1216
1217
1218 @node Subscription Methods
1219 @subsection Subscription Methods
1220
1221 @vindex gnus-subscribe-newsgroup-method
1222 What Gnus does when it encounters a new group is determined by the
1223 @code{gnus-subscribe-newsgroup-method} variable.
1224
1225 This variable should contain a function.  This function will be called
1226 with the name of the new group as the only parameter.
1227
1228 Some handy pre-fab functions are:
1229
1230 @table @code
1231
1232 @item gnus-subscribe-zombies
1233 @vindex gnus-subscribe-zombies
1234 Make all new groups zombies.  This is the default.  You can browse the
1235 zombies later (with @kbd{A z}) and either kill them all off properly
1236 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1237
1238 @item gnus-subscribe-randomly
1239 @vindex gnus-subscribe-randomly
1240 Subscribe all new groups in arbitrary order.  This really means that all
1241 new groups will be added at ``the top'' of the group buffer.
1242
1243 @item gnus-subscribe-alphabetically
1244 @vindex gnus-subscribe-alphabetically
1245 Subscribe all new groups in alphabetical order.
1246
1247 @item gnus-subscribe-hierarchically
1248 @vindex gnus-subscribe-hierarchically
1249 Subscribe all new groups hierarchically.  The difference between this
1250 function and @code{gnus-subscribe-alphabetically} is slight.
1251 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1252 alphabetical fashion, while this function will enter groups into its
1253 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1254 @samp{comp} hierarchy, this function will not mess that configuration
1255 up.  Or something like that.
1256
1257 @item gnus-subscribe-interactively
1258 @vindex gnus-subscribe-interactively
1259 Subscribe new groups interactively.  This means that Gnus will ask
1260 you about @strong{all} new groups.  The groups you choose to subscribe
1261 to will be subscribed hierarchically.
1262
1263 @item gnus-subscribe-killed
1264 @vindex gnus-subscribe-killed
1265 Kill all new groups.
1266
1267 @item gnus-subscribe-topics
1268 @vindex gnus-subscribe-topics
1269 Put the groups into the topic that has a matching @code{subscribe} topic
1270 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1271 topic parameter that looks like
1272
1273 @example
1274 "nnslashdot"
1275 @end example
1276
1277 will mean that all groups that match that regex will be subscribed under
1278 that topic.
1279
1280 If no topics match the groups, the groups will be subscribed in the
1281 top-level topic.
1282
1283 @end table
1284
1285 @vindex gnus-subscribe-hierarchical-interactive
1286 A closely related variable is
1287 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1288 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1289 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1290 will ask you for each sub-hierarchy whether you want to descend the
1291 hierarchy or not.
1292
1293 One common mistake is to set the variable a few paragraphs above
1294 (@code{gnus-subscribe-newsgroup-method}) to
1295 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1296 will not work.  This is ga-ga.  So don't do it.
1297
1298
1299 @node Filtering New Groups
1300 @subsection Filtering New Groups
1301
1302 A nice and portable way to control which new newsgroups should be
1303 subscribed (or ignored) is to put an @dfn{options} line at the start of
1304 the @file{.newsrc} file.  Here's an example:
1305
1306 @example
1307 options -n !alt.all !rec.all sci.all
1308 @end example
1309
1310 @vindex gnus-subscribe-options-newsgroup-method
1311 This line obviously belongs to a serious-minded intellectual scientific
1312 person (or she may just be plain old boring), because it says that all
1313 groups that have names beginning with @samp{alt} and @samp{rec} should
1314 be ignored, and all groups with names beginning with @samp{sci} should
1315 be subscribed.  Gnus will not use the normal subscription method for
1316 subscribing these groups.
1317 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1318 variable defaults to @code{gnus-subscribe-alphabetically}.
1319
1320 @vindex gnus-options-not-subscribe
1321 @vindex gnus-options-subscribe
1322 If you don't want to mess with your @file{.newsrc} file, you can just
1323 set the two variables @code{gnus-options-subscribe} and
1324 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1325 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1326 and if the new group matches the former, it will be unconditionally
1327 subscribed, and if it matches the latter, it will be ignored.
1328
1329 @vindex gnus-auto-subscribed-groups
1330 Yet another variable that meddles here is
1331 @code{gnus-auto-subscribed-groups}.  It works exactly like
1332 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1333 thought it would be nice to have two of these.  This variable is more
1334 meant for setting some ground rules, while the other variable is used
1335 more for user fiddling.  By default this variable makes all new groups
1336 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1337 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1338 subscribed.  If you don't like that, just set this variable to
1339 @code{nil}.
1340
1341 New groups that match this regexp are subscribed using
1342 @code{gnus-subscribe-options-newsgroup-method}.
1343
1344
1345 @node Changing Servers
1346 @section Changing Servers
1347 @cindex changing servers
1348
1349 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1350 This happens very rarely, but perhaps you change jobs, or one server is
1351 very flaky and you want to use another.
1352
1353 Changing the server is pretty easy, right?  You just change
1354 @code{gnus-select-method} to point to the new server?
1355
1356 @emph{Wrong!}
1357
1358 Article numbers are not (in any way) kept synchronized between different
1359 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1360 you have read is by keeping track of article numbers.  So when you
1361 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1362 worthless.
1363
1364 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1365 file from one server to another.  They all have one thing in
1366 common---they take a looong time to run.  You don't want to use these
1367 functions more than absolutely necessary.
1368
1369 @kindex M-x gnus-change-server
1370 @findex gnus-change-server
1371 If you have access to both servers, Gnus can request the headers for all
1372 the articles you have read and compare @code{Message-ID}s and map the
1373 article numbers of the read articles and article marks.  The @kbd{M-x
1374 gnus-change-server} command will do this for all your native groups.  It
1375 will prompt for the method you want to move to.
1376
1377 @kindex M-x gnus-group-move-group-to-server
1378 @findex gnus-group-move-group-to-server
1379 You can also move individual groups with the @kbd{M-x
1380 gnus-group-move-group-to-server} command.  This is useful if you want to
1381 move a (foreign) group from one server to another.
1382
1383 @kindex M-x gnus-group-clear-data-on-native-groups
1384 @findex gnus-group-clear-data-on-native-groups
1385 If you don't have access to both the old and new server, all your marks
1386 and read ranges have become worthless.  You can use the @kbd{M-x
1387 gnus-group-clear-data-on-native-groups} command to clear out all data
1388 that you have on your native groups.  Use with caution.
1389
1390 @kindex M-x gnus-group-clear-data
1391 @findex gnus-group-clear-data
1392 Clear the data from the current group only---nix out marks and the
1393 list of read articles (@code{gnus-group-clear-data}).
1394
1395 After changing servers, you @strong{must} move the cache hierarchy away,
1396 since the cached articles will have wrong article numbers, which will
1397 affect which articles Gnus thinks are read.
1398 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1399 to have it done automatically; for @code{gnus-group-clear-data}, you
1400 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1401 cache for all groups).
1402
1403
1404 @node Startup Files
1405 @section Startup Files
1406 @cindex startup files
1407 @cindex .newsrc
1408 @cindex .newsrc.el
1409 @cindex .newsrc.eld
1410
1411 Now, you all know about the @file{.newsrc} file.  All subscription
1412 information is traditionally stored in this file.
1413
1414 Things got a bit more complicated with @sc{gnus}.  In addition to
1415 keeping the @file{.newsrc} file updated, it also used a file called
1416 @file{.newsrc.el} for storing all the information that didn't fit into
1417 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1418 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1419 files was the most recently saved, which enabled people to swap between
1420 @sc{gnus} and other newsreaders.
1421
1422 That was kinda silly, so Gnus went one better: In addition to the
1423 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1424 @file{.newsrc.eld}.  It will read whichever of these files that are most
1425 recent, but it will never write a @file{.newsrc.el} file.  You should
1426 never delete the @file{.newsrc.eld} file---it contains much information
1427 not stored in the @file{.newsrc} file.
1428
1429 @vindex gnus-save-newsrc-file
1430 @vindex gnus-read-newsrc-file
1431 You can turn off writing the @file{.newsrc} file by setting
1432 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1433 the file and save some space, as well as exiting from Gnus faster.
1434 However, this will make it impossible to use other newsreaders than
1435 Gnus.  But hey, who would want to, right?  Similarly, setting
1436 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1437 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1438 convenient if you have a tendency to use Netscape once in a while.
1439
1440 @vindex gnus-save-killed-list
1441 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1442 will not save the list of killed groups to the startup file.  This will
1443 save both time (when starting and quitting) and space (on disk).  It
1444 will also mean that Gnus has no record of what groups are new or old,
1445 so the automatic new groups subscription methods become meaningless.
1446 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1447 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1448 Groups}).  This variable can also be a regular expression.  If that's
1449 the case, remove all groups that do not match this regexp before
1450 saving.  This can be useful in certain obscure situations that involve
1451 several servers where not all servers support @code{ask-server}.
1452
1453 @vindex gnus-startup-file
1454 @vindex gnus-backup-startup-file
1455 @vindex version-control
1456 The @code{gnus-startup-file} variable says where the startup files are.
1457 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1458 file being whatever that one is, with a @samp{.eld} appended.
1459 If you want version control for this file, set
1460 @code{gnus-backup-startup-file}.  It respects the same values as the
1461 @code{version-control} variable.
1462
1463 @vindex gnus-save-newsrc-hook
1464 @vindex gnus-save-quick-newsrc-hook
1465 @vindex gnus-save-standard-newsrc-hook
1466 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1467 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1468 saving the @file{.newsrc.eld} file, and
1469 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1470 @file{.newsrc} file.  The latter two are commonly used to turn version
1471 control on or off.  Version control is on by default when saving the
1472 startup files.  If you want to turn backup creation off, say something like:
1473
1474 @lisp
1475 (defun turn-off-backup ()
1476   (set (make-local-variable 'backup-inhibited) t))
1477
1478 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1479 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1480 @end lisp
1481
1482 @vindex gnus-init-file
1483 @vindex gnus-site-init-file
1484 When Gnus starts, it will read the @code{gnus-site-init-file}
1485 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1486 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1487 and can be used to avoid cluttering your @file{~/.emacs} and
1488 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1489 with the same names as these, but with @file{.elc} and @file{.el}
1490 suffixes.  In other words, if you have set @code{gnus-init-file} to
1491 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1492 and finally @file{~/.gnus} (in this order).
1493
1494
1495
1496 @node Auto Save
1497 @section Auto Save
1498 @cindex dribble file
1499 @cindex auto-save
1500
1501 Whenever you do something that changes the Gnus data (reading articles,
1502 catching up, killing/subscribing groups), the change is added to a
1503 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1504 Emacs way.  If your Emacs should crash before you have saved the
1505 @file{.newsrc} files, all changes you have made can be recovered from
1506 this file.
1507
1508 If Gnus detects this file at startup, it will ask the user whether to
1509 read it.  The auto save file is deleted whenever the real startup file is
1510 saved.
1511
1512 @vindex gnus-use-dribble-file
1513 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1514 maintain a dribble buffer.  The default is @code{t}.
1515
1516 @vindex gnus-dribble-directory
1517 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1518 this variable is @code{nil}, which it is by default, Gnus will dribble
1519 into the directory where the @file{.newsrc} file is located.  (This is
1520 normally the user's home directory.)  The dribble file will get the same
1521 file permissions as the @file{.newsrc} file.
1522
1523 @vindex gnus-always-read-dribble-file
1524 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1525 read the dribble file on startup without querying the user.
1526
1527
1528 @node The Active File
1529 @section The Active File
1530 @cindex active file
1531 @cindex ignored groups
1532
1533 When Gnus starts, or indeed whenever it tries to determine whether new
1534 articles have arrived, it reads the active file.  This is a very large
1535 file that lists all the active groups and articles on the server.
1536
1537 @vindex gnus-ignored-newsgroups
1538 Before examining the active file, Gnus deletes all lines that match the
1539 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1540 any groups with bogus names, but you can use this variable to make Gnus
1541 ignore hierarchies you aren't ever interested in.  However, this is not
1542 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1543 Groups} for an overview of other variables that can be used instead.
1544
1545 @c This variable is
1546 @c @code{nil} by default, and will slow down active file handling somewhat
1547 @c if you set it to anything else.
1548
1549 @vindex gnus-read-active-file
1550 @c @head
1551 The active file can be rather Huge, so if you have a slow network, you
1552 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1553 reading the active file.  This variable is @code{some} by default.
1554
1555 Gnus will try to make do by getting information just on the groups that
1556 you actually subscribe to.
1557
1558 Note that if you subscribe to lots and lots of groups, setting this
1559 variable to @code{nil} will probably make Gnus slower, not faster.  At
1560 present, having this variable @code{nil} will slow Gnus down
1561 considerably, unless you read news over a 2400 baud modem.
1562
1563 This variable can also have the value @code{some}.  Gnus will then
1564 attempt to read active info only on the subscribed groups.  On some
1565 servers this is quite fast (on sparkling, brand new INN servers that
1566 support the @code{LIST ACTIVE group} command), on others this isn't fast
1567 at all.  In any case, @code{some} should be faster than @code{nil}, and
1568 is certainly faster than @code{t} over slow lines.
1569
1570 Some news servers (old versions of Leafnode and old versions of INN, for
1571 instance) do not support the @code{LIST ACTIVE group}.  For these
1572 servers, @code{nil} is probably the most efficient value for this
1573 variable.
1574
1575 If this variable is @code{nil}, Gnus will ask for group info in total
1576 lock-step, which isn't very fast.  If it is @code{some} and you use an
1577 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1578 read all the replies in one swoop.  This will normally result in better
1579 performance, but if the server does not support the aforementioned
1580 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1581
1582 If you think that starting up Gnus takes too long, try all the three
1583 different values for this variable and see what works best for you.
1584
1585 In any case, if you use @code{some} or @code{nil}, you should definitely
1586 kill all groups that you aren't interested in to speed things up.
1587
1588 Note that this variable also affects active file retrieval from
1589 secondary select methods.
1590
1591
1592 @node Startup Variables
1593 @section Startup Variables
1594
1595 @table @code
1596
1597 @item gnus-load-hook
1598 @vindex gnus-load-hook
1599 A hook run while Gnus is being loaded.  Note that this hook will
1600 normally be run just once in each Emacs session, no matter how many
1601 times you start Gnus.
1602
1603 @item gnus-before-startup-hook
1604 @vindex gnus-before-startup-hook
1605 A hook run after starting up Gnus successfully.
1606
1607 @item gnus-startup-hook
1608 @vindex gnus-startup-hook
1609 A hook run as the very last thing after starting up Gnus
1610
1611 @item gnus-started-hook
1612 @vindex gnus-started-hook
1613 A hook that is run as the very last thing after starting up Gnus
1614 successfully.
1615
1616 @item gnus-setup-news-hook
1617 @vindex gnus-setup-news-hook
1618 A hook that is run after reading the @file{.newsrc} file(s), but before
1619 generating the group buffer.
1620
1621 @item gnus-check-bogus-newsgroups
1622 @vindex gnus-check-bogus-newsgroups
1623 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1624 startup.  A @dfn{bogus group} is a group that you have in your
1625 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1626 bogus groups can take quite a while, so to save time and resources it's
1627 best to leave this option off, and do the checking for bogus groups once
1628 in a while from the group buffer instead (@pxref{Group Maintenance}).
1629
1630 @item gnus-inhibit-startup-message
1631 @vindex gnus-inhibit-startup-message
1632 If non-@code{nil}, the startup message won't be displayed.  That way,
1633 your boss might not notice as easily that you are reading news instead
1634 of doing your job.  Note that this variable is used before
1635 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1636
1637 @item gnus-no-groups-message
1638 @vindex gnus-no-groups-message
1639 Message displayed by Gnus when no groups are available.
1640
1641 @item gnus-play-startup-jingle
1642 @vindex gnus-play-startup-jingle
1643 If non-@code{nil}, play the Gnus jingle at startup.
1644
1645 @item gnus-startup-jingle
1646 @vindex gnus-startup-jingle
1647 Jingle to be played if the above variable is non-@code{nil}.  The
1648 default is @samp{Tuxedomoon.Jingle4.au}.
1649
1650 @end table
1651
1652
1653 @node Group Buffer
1654 @chapter Group Buffer
1655 @cindex group buffer
1656
1657 @c Alex Schroeder suggests to rearrange this as follows:
1658 @c
1659 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1660 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1661 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1662 @c   7. Group Score, 8. Group Buffer Format
1663 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1664 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1665 @c <kensanata> First, "Gnus considers groups... (default 9)."
1666 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1667 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1668 @c <kensanata> Then expand the next paragraph or add some more to it.
1669 @c    This short one sentence explains levels 1 and 2, therefore I understand
1670 @c    that I should keep important news at 3 and boring news at 4.
1671 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1672 @c    Maybe keep those that you don't want to read temporarily at 6,
1673 @c    those that you never want to read at 8, those that offend your
1674 @c    human rights at 9...
1675
1676
1677 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1678 is the first buffer shown when Gnus starts, and will never be killed as
1679 long as Gnus is active.
1680
1681 @iftex
1682 @iflatex
1683 \gnusfigure{The Group Buffer}{320}{
1684 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1685 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1686 \put(120,38){\vector(1,2){10}}
1687 \put(40,60){\makebox(0,0)[r]{Mode line}}
1688 \put(40,58){\vector(1,0){30}}
1689 \put(200,28){\makebox(0,0)[t]{Native select method}}
1690 \put(200,26){\vector(-1,2){15}}
1691 }
1692 @end iflatex
1693 @end iftex
1694
1695 @menu
1696 * Group Buffer Format::         Information listed and how you can change it.
1697 * Group Maneuvering::           Commands for moving in the group buffer.
1698 * Selecting a Group::           Actually reading news.
1699 * Subscription Commands::       Unsubscribing, killing, subscribing.
1700 * Group Data::                  Changing the info for a group.
1701 * Group Levels::                Levels? What are those, then?
1702 * Group Score::                 A mechanism for finding out what groups you like.
1703 * Marking Groups::              You can mark groups for later processing.
1704 * Foreign Groups::              Creating and editing groups.
1705 * Group Parameters::            Each group may have different parameters set.
1706 * Listing Groups::              Gnus can list various subsets of the groups.
1707 * Sorting Groups::              Re-arrange the group order.
1708 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1709 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1710 * Exiting Gnus::                Stop reading news and get some work done.
1711 * Group Topics::                A folding group mode divided into topics.
1712 * Misc Group Stuff::            Other stuff that you can to do.
1713 @end menu
1714
1715
1716 @node Group Buffer Format
1717 @section Group Buffer Format
1718
1719 @menu
1720 * Group Line Specification::    Deciding how the group buffer is to look.
1721 * Group Mode Line Specification::  The group buffer mode line.
1722 * Group Highlighting::          Having nice colors in the group buffer.
1723 @end menu
1724
1725
1726 @node Group Line Specification
1727 @subsection Group Line Specification
1728 @cindex group buffer format
1729
1730 The default format of the group buffer is nice and dull, but you can
1731 make it as exciting and ugly as you feel like.
1732
1733 Here's a couple of example group lines:
1734
1735 @example
1736      25: news.announce.newusers
1737  *    0: alt.fan.andrea-dworkin
1738 @end example
1739
1740 Quite simple, huh?
1741
1742 You can see that there are 25 unread articles in
1743 @samp{news.announce.newusers}.  There are no unread articles, but some
1744 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1745 asterisk at the beginning of the line?).
1746
1747 @vindex gnus-group-line-format
1748 You can change that format to whatever you want by fiddling with the
1749 @code{gnus-group-line-format} variable.  This variable works along the
1750 lines of a @code{format} specification, which is pretty much the same as
1751 a @code{printf} specifications, for those of you who use (feh!) C.
1752 @xref{Formatting Variables}.
1753
1754 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1755
1756 There should always be a colon on the line; the cursor always moves to
1757 the colon after performing an operation.  @xref{Positioning
1758 Point}. Nothing else is required---not even the group name.  All
1759 displayed text is just window dressing, and is never examined by Gnus.
1760 Gnus stores all real information it needs using text properties.
1761
1762 (Note that if you make a really strange, wonderful, spreadsheet-like
1763 layout, everybody will believe you are hard at work with the accounting
1764 instead of wasting time reading news.)
1765
1766 Here's a list of all available format characters:
1767
1768 @table @samp
1769
1770 @item M
1771 An asterisk if the group only has marked articles.
1772
1773 @item S
1774 Whether the group is subscribed.
1775
1776 @item L
1777 Level of subscribedness.
1778
1779 @item N
1780 Number of unread articles.
1781
1782 @item I
1783 Number of dormant articles.
1784
1785 @item T
1786 Number of ticked articles.
1787
1788 @item R
1789 Number of read articles.
1790
1791 @item U
1792 Number of unseen articles.
1793
1794 @item t
1795 Estimated total number of articles.  (This is really @var{max-number}
1796 minus @var{min-number} plus 1.)
1797
1798 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1799 efficient access to @var{max-number} and @var{min-number} but getting
1800 the true unread message count is not possible efficiently.  For
1801 hysterical raisins, even the mail back ends, where the true number of
1802 unread messages might be available efficiently, use the same limited
1803 interface.  To remove this restriction from Gnus means that the back
1804 end interface has to be changed, which is not an easy job.  If you
1805 want to work on this, please contact the Gnus mailing list.
1806
1807 @item y
1808 Number of unread, unticked, non-dormant articles.
1809
1810 @item i
1811 Number of ticked and dormant articles.
1812
1813 @item g
1814 Full group name.
1815
1816 @item G
1817 Group name.
1818
1819 @item C
1820 Group comment (@pxref{Group Parameters}) or group name if there is no
1821 comment element in the group parameters.
1822
1823 @item D
1824 Newsgroup description.  You need to read the group descriptions
1825 before these will appear, and to do that, you either have to set
1826 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1827 command. 
1828
1829 @item o
1830 @samp{m} if moderated.
1831
1832 @item O
1833 @samp{(m)} if moderated.
1834
1835 @item s
1836 Select method.
1837
1838 @item B
1839 If the summary buffer for the group is open or not.
1840
1841 @item n
1842 Select from where.
1843
1844 @item z
1845 A string that looks like @samp{<%s:%n>} if a foreign select method is
1846 used.
1847
1848 @item P
1849 Indentation based on the level of the topic (@pxref{Group Topics}).
1850
1851 @item c
1852 @vindex gnus-group-uncollapsed-levels
1853 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1854 variable says how many levels to leave at the end of the group name.
1855 The default is 1---this will mean that group names like
1856 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1857
1858 @item m
1859 @vindex gnus-new-mail-mark
1860 @cindex %
1861 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1862 the group lately.
1863
1864 @item p
1865 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1866
1867 @item d
1868 A string that says when you last read the group (@pxref{Group
1869 Timestamp}).
1870
1871 @item u
1872 User defined specifier.  The next character in the format string should
1873 be a letter.  Gnus will call the function
1874 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1875 following @samp{%u}.  The function will be passed a single dummy
1876 parameter as argument.  The function should return a string, which will
1877 be inserted into the buffer just like information from any other
1878 specifier.
1879 @end table
1880
1881 @cindex *
1882 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1883 if no info is available---for instance, if it is a non-activated foreign
1884 group, or a bogus native group.
1885
1886
1887 @node Group Mode Line Specification
1888 @subsection Group Mode Line Specification
1889 @cindex group mode line
1890
1891 @vindex gnus-group-mode-line-format
1892 The mode line can be changed by setting
1893 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1894 doesn't understand that many format specifiers:
1895
1896 @table @samp
1897 @item S
1898 The native news server.
1899 @item M
1900 The native select method.
1901 @end table
1902
1903
1904 @node Group Highlighting
1905 @subsection Group Highlighting
1906 @cindex highlighting
1907 @cindex group highlighting
1908
1909 @vindex gnus-group-highlight
1910 Highlighting in the group buffer is controlled by the
1911 @code{gnus-group-highlight} variable.  This is an alist with elements
1912 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1913 something non-@code{nil}, the @var{face} will be used on the line.
1914
1915 Here's an example value for this variable that might look nice if the
1916 background is dark:
1917
1918 @lisp
1919 (cond (window-system
1920        (setq custom-background-mode 'light)
1921        (defface my-group-face-1
1922          '((t (:foreground "Red" :bold t))) "First group face")
1923        (defface my-group-face-2
1924          '((t (:foreground "DarkSeaGreen4" :bold t))) 
1925          "Second group face")
1926        (defface my-group-face-3
1927          '((t (:foreground "Green4" :bold t))) "Third group face")
1928        (defface my-group-face-4
1929          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1930        (defface my-group-face-5
1931          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1932
1933 (setq gnus-group-highlight
1934       '(((> unread 200) . my-group-face-1)
1935         ((and (< level 3) (zerop unread)) . my-group-face-2)
1936         ((< level 3) . my-group-face-3)
1937         ((zerop unread) . my-group-face-4)
1938         (t . my-group-face-5)))
1939 @end lisp
1940
1941 Also @pxref{Faces and Fonts}.
1942
1943 Variables that are dynamically bound when the forms are evaluated
1944 include:
1945
1946 @table @code
1947 @item group
1948 The group name.
1949 @item unread
1950 The number of unread articles in the group.
1951 @item method
1952 The select method.
1953 @item mailp
1954 Whether the group is a mail group.
1955 @item level
1956 The level of the group.
1957 @item score
1958 The score of the group.
1959 @item ticked
1960 The number of ticked articles in the group.
1961 @item total
1962 The total number of articles in the group.  Or rather,
1963 @var{max-number} minus @var{min-number} plus one.
1964 @item topic
1965 When using the topic minor mode, this variable is bound to the current
1966 topic being inserted.
1967 @end table
1968
1969 When the forms are @code{eval}ed, point is at the beginning of the line
1970 of the group in question, so you can use many of the normal Gnus
1971 functions for snarfing info on the group.
1972
1973 @vindex gnus-group-update-hook
1974 @findex gnus-group-highlight-line
1975 @code{gnus-group-update-hook} is called when a group line is changed.
1976 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1977 calls @code{gnus-group-highlight-line} by default.
1978
1979
1980 @node Group Maneuvering
1981 @section Group Maneuvering
1982 @cindex group movement
1983
1984 All movement commands understand the numeric prefix and will behave as
1985 expected, hopefully.
1986
1987 @table @kbd
1988
1989 @item n
1990 @kindex n (Group)
1991 @findex gnus-group-next-unread-group
1992 Go to the next group that has unread articles
1993 (@code{gnus-group-next-unread-group}).
1994
1995 @item p
1996 @itemx DEL
1997 @kindex DEL (Group)
1998 @kindex p (Group)
1999 @findex gnus-group-prev-unread-group
2000 Go to the previous group that has unread articles
2001 (@code{gnus-group-prev-unread-group}).
2002
2003 @item N
2004 @kindex N (Group)
2005 @findex gnus-group-next-group
2006 Go to the next group (@code{gnus-group-next-group}).
2007
2008 @item P
2009 @kindex P (Group)
2010 @findex gnus-group-prev-group
2011 Go to the previous group (@code{gnus-group-prev-group}).
2012
2013 @item M-n
2014 @kindex M-n (Group)
2015 @findex gnus-group-next-unread-group-same-level
2016 Go to the next unread group on the same (or lower) level
2017 (@code{gnus-group-next-unread-group-same-level}).
2018
2019 @item M-p
2020 @kindex M-p (Group)
2021 @findex gnus-group-prev-unread-group-same-level
2022 Go to the previous unread group on the same (or lower) level
2023 (@code{gnus-group-prev-unread-group-same-level}).
2024 @end table
2025
2026 Three commands for jumping to groups:
2027
2028 @table @kbd
2029
2030 @item j
2031 @kindex j (Group)
2032 @findex gnus-group-jump-to-group
2033 Jump to a group (and make it visible if it isn't already)
2034 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2035 like living groups.
2036
2037 @item ,
2038 @kindex , (Group)
2039 @findex gnus-group-best-unread-group
2040 Jump to the unread group with the lowest level
2041 (@code{gnus-group-best-unread-group}).
2042
2043 @item .
2044 @kindex . (Group)
2045 @findex gnus-group-first-unread-group
2046 Jump to the first group with unread articles
2047 (@code{gnus-group-first-unread-group}).
2048 @end table
2049
2050 @vindex gnus-group-goto-unread
2051 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2052 commands will move to the next group, not the next unread group.  Even
2053 the commands that say they move to the next unread group.  The default
2054 is @code{t}.
2055
2056
2057 @node Selecting a Group
2058 @section Selecting a Group
2059 @cindex group selection
2060
2061 @table @kbd
2062
2063 @item SPACE
2064 @kindex SPACE (Group)
2065 @findex gnus-group-read-group
2066 Select the current group, switch to the summary buffer and display the
2067 first unread article (@code{gnus-group-read-group}).  If there are no
2068 unread articles in the group, or if you give a non-numerical prefix to
2069 this command, Gnus will offer to fetch all the old articles in this
2070 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2071 determines the number of articles Gnus will fetch.  If @var{n} is
2072 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2073 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2074
2075 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2076 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2077 - 4 2 SPC} fetches the 42 oldest ones.
2078
2079 When you are in the group (in the Summary buffer), you can type
2080 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2081 ones.
2082
2083 @item RET
2084 @kindex RET (Group)
2085 @findex gnus-group-select-group
2086 Select the current group and switch to the summary buffer
2087 (@code{gnus-group-select-group}).  Takes the same arguments as
2088 @code{gnus-group-read-group}---the only difference is that this command
2089 does not display the first unread article automatically upon group
2090 entry.
2091
2092 @item M-RET
2093 @kindex M-RET (Group)
2094 @findex gnus-group-quick-select-group
2095 This does the same as the command above, but tries to do it with the
2096 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2097 scoring/killing will be performed, there will be no highlights and no
2098 expunging.  This might be useful if you're in a real hurry and have to
2099 enter some humongous group.  If you give a 0 prefix to this command
2100 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2101 which is useful if you want to toggle threading before generating the
2102 summary buffer (@pxref{Summary Generation Commands}).
2103
2104 @item M-SPACE
2105 @kindex M-SPACE (Group)
2106 @findex gnus-group-visible-select-group
2107 This is yet one more command that does the same as the @kbd{RET}
2108 command, but this one does it without expunging and hiding dormants
2109 (@code{gnus-group-visible-select-group}).
2110
2111 @item C-M-RET
2112 @kindex C-M-RET (Group)
2113 @findex gnus-group-select-group-ephemerally
2114 Finally, this command selects the current group ephemerally without
2115 doing any processing of its contents
2116 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2117 turned off.  Everything you do in the group after selecting it in this
2118 manner will have no permanent effects.
2119
2120 @end table
2121
2122 @vindex gnus-large-newsgroup
2123 The @code{gnus-large-newsgroup} variable says what Gnus should
2124 consider to be a big group.  If it is @code{nil}, no groups are
2125 considered big.  The default vaule is 200.  If the group has more
2126 (unread and/or ticked) articles than this, Gnus will query the user
2127 before entering the group.  The user can then specify how many
2128 articles should be fetched from the server.  If the user specifies a
2129 negative number (@var{-n}), the @var{n} oldest articles will be
2130 fetched.  If it is positive, the @var{n} articles that have arrived
2131 most recently will be fetched.
2132
2133 @vindex gnus-large-ephemeral-newsgroup
2134 @code{gnus-large-ephemeral-newsgroup} is the same as
2135 @code{gnus-large-newsgroup}, but is only used for ephemeral
2136 newsgroups.
2137
2138 @vindex gnus-select-group-hook
2139 @vindex gnus-auto-select-first
2140 @vindex gnus-auto-select-subject
2141 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2142 automatically when entering a group with the @kbd{SPACE} command.
2143 Which article this is is controlled by the
2144 @code{gnus-auto-select-subject} variable.  Valid values for this
2145 variable is:
2146
2147 @table @code
2148
2149 @item unread
2150 Place point on the subject line of the first unread article.
2151
2152 @item first
2153 Place point on the subject line of the first article.
2154
2155 @item unseen
2156 Place point on the subject line of the first unseen article.
2157
2158 @item unseen-or-unread
2159 Place point on the subject line of the first unseen article, and if
2160 there is no such article, place point on the subject line of the first
2161 unread article.
2162
2163 @item best
2164 Place point on the subject line of the highest-scored unread article.
2165
2166 @end table
2167
2168 This variable can also be a function.  In that case, that function
2169 will be called to place point on a subject line.
2170
2171 If you want to prevent automatic selection in some group (say, in a
2172 binary group with Huge articles) you can set the
2173 @code{gnus-auto-select-first} variable to @code{nil} in
2174 @code{gnus-select-group-hook}, which is called when a group is
2175 selected.
2176
2177
2178 @node Subscription Commands
2179 @section Subscription Commands
2180 @cindex subscription
2181
2182 @table @kbd
2183
2184 @item S t
2185 @itemx u
2186 @kindex S t (Group)
2187 @kindex u (Group)
2188 @findex gnus-group-unsubscribe-current-group
2189 @c @icon{gnus-group-unsubscribe}
2190 Toggle subscription to the current group
2191 (@code{gnus-group-unsubscribe-current-group}).
2192
2193 @item S s
2194 @itemx U
2195 @kindex S s (Group)
2196 @kindex U (Group)
2197 @findex gnus-group-unsubscribe-group
2198 Prompt for a group to subscribe, and then subscribe it.  If it was
2199 subscribed already, unsubscribe it instead
2200 (@code{gnus-group-unsubscribe-group}).
2201
2202 @item S k
2203 @itemx C-k
2204 @kindex S k (Group)
2205 @kindex C-k (Group)
2206 @findex gnus-group-kill-group
2207 @c @icon{gnus-group-kill-group}
2208 Kill the current group (@code{gnus-group-kill-group}).
2209
2210 @item S y
2211 @itemx C-y
2212 @kindex S y (Group)
2213 @kindex C-y (Group)
2214 @findex gnus-group-yank-group
2215 Yank the last killed group (@code{gnus-group-yank-group}).
2216
2217 @item C-x C-t
2218 @kindex C-x C-t (Group)
2219 @findex gnus-group-transpose-groups
2220 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2221 really a subscription command, but you can use it instead of a
2222 kill-and-yank sequence sometimes.
2223
2224 @item S w
2225 @itemx C-w
2226 @kindex S w (Group)
2227 @kindex C-w (Group)
2228 @findex gnus-group-kill-region
2229 Kill all groups in the region (@code{gnus-group-kill-region}).
2230
2231 @item S z
2232 @kindex S z (Group)
2233 @findex gnus-group-kill-all-zombies
2234 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2235
2236 @item S C-k
2237 @kindex S C-k (Group)
2238 @findex gnus-group-kill-level
2239 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2240 These groups can't be yanked back after killing, so this command should
2241 be used with some caution.  The only time where this command comes in
2242 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2243 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2244 kill off all unsubscribed groups that do not have message numbers in the
2245 @file{.newsrc} file.
2246
2247 @end table
2248
2249 Also @pxref{Group Levels}.
2250
2251
2252 @node Group Data
2253 @section Group Data
2254
2255 @table @kbd
2256
2257 @item c
2258 @kindex c (Group)
2259 @findex gnus-group-catchup-current
2260 @vindex gnus-group-catchup-group-hook
2261 @c @icon{gnus-group-catchup-current}
2262 Mark all unticked articles in this group as read
2263 (@code{gnus-group-catchup-current}).
2264 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2265 the group buffer.
2266
2267 @item C
2268 @kindex C (Group)
2269 @findex gnus-group-catchup-current-all
2270 Mark all articles in this group, even the ticked ones, as read
2271 (@code{gnus-group-catchup-current-all}).
2272
2273 @item M-c
2274 @kindex M-c (Group)
2275 @findex gnus-group-clear-data
2276 Clear the data from the current group---nix out marks and the list of
2277 read articles (@code{gnus-group-clear-data}).
2278
2279 @item M-x gnus-group-clear-data-on-native-groups
2280 @kindex M-x gnus-group-clear-data-on-native-groups
2281 @findex gnus-group-clear-data-on-native-groups
2282 If you have switched from one @acronym{NNTP} server to another, all your marks
2283 and read ranges have become worthless.  You can use this command to
2284 clear out all data that you have on your native groups.  Use with
2285 caution.
2286
2287 @end table
2288
2289
2290 @node Group Levels
2291 @section Group Levels
2292 @cindex group level
2293 @cindex level
2294
2295 All groups have a level of @dfn{subscribedness}.  For instance, if a
2296 group is on level 2, it is more subscribed than a group on level 5.  You
2297 can ask Gnus to just list groups on a given level or lower
2298 (@pxref{Listing Groups}), or to just check for new articles in groups on
2299 a given level or lower (@pxref{Scanning New Messages}).
2300
2301 Remember:  The higher the level of the group, the less important it is.
2302
2303 @table @kbd
2304
2305 @item S l
2306 @kindex S l (Group)
2307 @findex gnus-group-set-current-level
2308 Set the level of the current group.  If a numeric prefix is given, the
2309 next @var{n} groups will have their levels set.  The user will be
2310 prompted for a level.
2311 @end table
2312
2313 @vindex gnus-level-killed
2314 @vindex gnus-level-zombie
2315 @vindex gnus-level-unsubscribed
2316 @vindex gnus-level-subscribed
2317 Gnus considers groups from levels 1 to
2318 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2319 @code{gnus-level-subscribed} (exclusive) and
2320 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2321 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2322 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2323 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2324 same, but zombie and killed groups have no information on what articles
2325 you have read, etc, stored.  This distinction between dead and living
2326 groups isn't done because it is nice or clever, it is done purely for
2327 reasons of efficiency.
2328
2329 It is recommended that you keep all your mail groups (if any) on quite
2330 low levels (e.g. 1 or 2).
2331
2332 Maybe the following description of the default behavior of Gnus helps to
2333 understand what these levels are all about.  By default, Gnus shows you
2334 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2335 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2336 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2337 groups are hidden, in a way.
2338
2339 Zombie and killed groups are similar to unsubscribed groups in that they
2340 are hidden by default.  But they are different from subscribed and
2341 unsubscribed groups in that Gnus doesn't ask the news server for
2342 information (number of messages, number of unread messages) on zombie
2343 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2344 aren't interested in.  If most groups are killed, Gnus is faster.
2345
2346 Why does Gnus distinguish between zombie and killed groups?  Well, when
2347 a new group arrives on the server, Gnus by default makes it a zombie
2348 group.  This means that you are normally not bothered with new groups,
2349 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2350 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2351 list of killed groups.)
2352
2353 If you want to play with the level variables, you should show some care.
2354 Set them once, and don't touch them ever again.  Better yet, don't touch
2355 them at all unless you know exactly what you're doing.
2356
2357 @vindex gnus-level-default-unsubscribed
2358 @vindex gnus-level-default-subscribed
2359 Two closely related variables are @code{gnus-level-default-subscribed}
2360 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2361 which are the levels that new groups will be put on if they are
2362 (un)subscribed.  These two variables should, of course, be inside the
2363 relevant valid ranges.
2364
2365 @vindex gnus-keep-same-level
2366 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2367 will only move to groups of the same level (or lower).  In
2368 particular, going from the last article in one group to the next group
2369 will go to the next group of the same level (or lower).  This might be
2370 handy if you want to read the most important groups before you read the
2371 rest.
2372
2373 If this variable is @code{best}, Gnus will make the next newsgroup the
2374 one with the best level.
2375
2376 @vindex gnus-group-default-list-level
2377 All groups with a level less than or equal to
2378 @code{gnus-group-default-list-level} will be listed in the group buffer
2379 by default.
2380
2381 @vindex gnus-group-list-inactive-groups
2382 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2383 groups will be listed along with the unread groups.  This variable is
2384 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2385 listed.
2386
2387 @vindex gnus-group-use-permanent-levels
2388 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2389 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2390 use this level as the ``work'' level.
2391
2392 @vindex gnus-activate-level
2393 Gnus will normally just activate (i. e., query the server about) groups
2394 on level @code{gnus-activate-level} or less.  If you don't want to
2395 activate unsubscribed groups, for instance, you might set this variable
2396 to 5.  The default is 6.
2397
2398
2399 @node Group Score
2400 @section Group Score
2401 @cindex group score
2402 @cindex group rank
2403 @cindex rank
2404
2405 You would normally keep important groups on high levels, but that scheme
2406 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2407 group buffer according to how often you read groups, perhaps?  Within
2408 reason?
2409
2410 This is what @dfn{group score} is for.  You can have Gnus assign a score
2411 to each group through the mechanism described below.  You can then sort
2412 the group buffer based on this score.  Alternatively, you can sort on
2413 score and then level.  (Taken together, the level and the score is
2414 called the @dfn{rank} of the group.  A group that is on level 4 and has
2415 a score of 1 has a higher rank than a group on level 5 that has a score
2416 of 300.  (The level is the most significant part and the score is the
2417 least significant part.))
2418
2419 @findex gnus-summary-bubble-group
2420 If you want groups you read often to get higher scores than groups you
2421 read seldom you can add the @code{gnus-summary-bubble-group} function to
2422 the @code{gnus-summary-exit-hook} hook.  This will result (after
2423 sorting) in a bubbling sort of action.  If you want to see that in
2424 action after each summary exit, you can add
2425 @code{gnus-group-sort-groups-by-rank} or
2426 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2427 slow things down somewhat.
2428
2429
2430 @node Marking Groups
2431 @section Marking Groups
2432 @cindex marking groups
2433
2434 If you want to perform some command on several groups, and they appear
2435 subsequently in the group buffer, you would normally just give a
2436 numerical prefix to the command.  Most group commands will then do your
2437 bidding on those groups.
2438
2439 However, if the groups are not in sequential order, you can still
2440 perform a command on several groups.  You simply mark the groups first
2441 with the process mark and then execute the command.
2442
2443 @table @kbd
2444
2445 @item #
2446 @kindex # (Group)
2447 @itemx M m
2448 @kindex M m (Group)
2449 @findex gnus-group-mark-group
2450 Set the mark on the current group (@code{gnus-group-mark-group}).
2451
2452 @item M-#
2453 @kindex M-# (Group)
2454 @itemx M u
2455 @kindex M u (Group)
2456 @findex gnus-group-unmark-group
2457 Remove the mark from the current group
2458 (@code{gnus-group-unmark-group}).
2459
2460 @item M U
2461 @kindex M U (Group)
2462 @findex gnus-group-unmark-all-groups
2463 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2464
2465 @item M w
2466 @kindex M w (Group)
2467 @findex gnus-group-mark-region
2468 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2469
2470 @item M b
2471 @kindex M b (Group)
2472 @findex gnus-group-mark-buffer
2473 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2474
2475 @item M r
2476 @kindex M r (Group)
2477 @findex gnus-group-mark-regexp
2478 Mark all groups that match some regular expression
2479 (@code{gnus-group-mark-regexp}).
2480 @end table
2481
2482 Also @pxref{Process/Prefix}.
2483
2484 @findex gnus-group-universal-argument
2485 If you want to execute some command on all groups that have been marked
2486 with the process mark, you can use the @kbd{M-&}
2487 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2488 the command to be executed.
2489
2490
2491 @node Foreign Groups
2492 @section Foreign Groups
2493 @cindex foreign groups
2494
2495 Below are some group mode commands for making and editing general foreign
2496 groups, as well as commands to ease the creation of a few
2497 special-purpose groups.  All these commands insert the newly created
2498 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2499 consulted.
2500
2501 @table @kbd
2502
2503 @item G m
2504 @kindex G m (Group)
2505 @findex gnus-group-make-group
2506 @cindex making groups
2507 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2508 for a name, a method and possibly an @dfn{address}.  For an easier way
2509 to subscribe to @acronym{NNTP} groups, @pxref{Browse Foreign Server}.
2510
2511 @item G r
2512 @kindex G r (Group)
2513 @findex gnus-group-rename-group
2514 @cindex renaming groups
2515 Rename the current group to something else
2516 (@code{gnus-group-rename-group}).  This is valid only on some
2517 groups---mail groups mostly.  This command might very well be quite slow
2518 on some back ends.
2519
2520 @item G c
2521 @kindex G c (Group)
2522 @cindex customizing
2523 @findex gnus-group-customize
2524 Customize the group parameters (@code{gnus-group-customize}).
2525
2526 @item G e
2527 @kindex G e (Group)
2528 @findex gnus-group-edit-group-method
2529 @cindex renaming groups
2530 Enter a buffer where you can edit the select method of the current
2531 group (@code{gnus-group-edit-group-method}).
2532
2533 @item G p
2534 @kindex G p (Group)
2535 @findex gnus-group-edit-group-parameters
2536 Enter a buffer where you can edit the group parameters
2537 (@code{gnus-group-edit-group-parameters}).
2538
2539 @item G E
2540 @kindex G E (Group)
2541 @findex gnus-group-edit-group
2542 Enter a buffer where you can edit the group info
2543 (@code{gnus-group-edit-group}).
2544
2545 @item G d
2546 @kindex G d (Group)
2547 @findex gnus-group-make-directory-group
2548 @cindex nndir
2549 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2550 for a directory name (@code{gnus-group-make-directory-group}).
2551
2552 @item G h
2553 @kindex G h (Group)
2554 @cindex help group
2555 @findex gnus-group-make-help-group
2556 Make the Gnus help group (@code{gnus-group-make-help-group}).
2557
2558 @item G a
2559 @kindex G a (Group)
2560 @cindex (ding) archive
2561 @cindex archive group
2562 @findex gnus-group-make-archive-group
2563 @vindex gnus-group-archive-directory
2564 @vindex gnus-group-recent-archive-directory
2565 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2566 default a group pointing to the most recent articles will be created
2567 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2568 group will be created from @code{gnus-group-archive-directory}.
2569
2570 @item G k
2571 @kindex G k (Group)
2572 @findex gnus-group-make-kiboze-group
2573 @cindex nnkiboze
2574 Make a kiboze group.  You will be prompted for a name, for a regexp to
2575 match groups to be ``included'' in the kiboze group, and a series of
2576 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2577 @xref{Kibozed Groups}.
2578
2579 @item G D
2580 @kindex G D (Group)
2581 @findex gnus-group-enter-directory
2582 @cindex nneething
2583 Read an arbitrary directory as if it were a newsgroup with the
2584 @code{nneething} back end (@code{gnus-group-enter-directory}).
2585 @xref{Anything Groups}.
2586
2587 @item G f
2588 @kindex G f (Group)
2589 @findex gnus-group-make-doc-group
2590 @cindex ClariNet Briefs
2591 @cindex nndoc
2592 Make a group based on some file or other
2593 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2594 command, you will be prompted for a file name and a file type.
2595 Currently supported types are @code{mbox}, @code{babyl},
2596 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2597 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2598 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2599 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2600 you run this command without a prefix, Gnus will guess at the file
2601 type.  @xref{Document Groups}.
2602
2603 @item G u
2604 @kindex G u (Group)
2605 @vindex gnus-useful-groups
2606 @findex gnus-group-make-useful-group
2607 Create one of the groups mentioned in @code{gnus-useful-groups}
2608 (@code{gnus-group-make-useful-group}).
2609
2610 @item G w
2611 @kindex G w (Group)
2612 @findex gnus-group-make-web-group
2613 @cindex Google
2614 @cindex nnweb
2615 @cindex gmane
2616 Make an ephemeral group based on a web search
2617 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2618 command, make a solid group instead.  You will be prompted for the
2619 search engine type and the search string.  Valid search engine types
2620 include @code{google}, @code{dejanews}, and @code{gmane}.
2621 @xref{Web Searches}.
2622
2623 If you use the @code{google} search engine, you can limit the search
2624 to a particular group by using a match string like
2625 @samp{shaving group:alt.sysadmin.recovery}.
2626
2627 @item G DEL
2628 @kindex G DEL (Group)
2629 @findex gnus-group-delete-group
2630 This function will delete the current group
2631 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2632 actually delete all the articles in the group, and forcibly remove the
2633 group itself from the face of the Earth.  Use a prefix only if you are
2634 absolutely sure of what you are doing.  This command can't be used on
2635 read-only groups (like @code{nntp} group), though.
2636
2637 @item G V
2638 @kindex G V (Group)
2639 @findex gnus-group-make-empty-virtual
2640 Make a new, fresh, empty @code{nnvirtual} group
2641 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2642
2643 @item G v
2644 @kindex G v (Group)
2645 @findex gnus-group-add-to-virtual
2646 Add the current group to an @code{nnvirtual} group
2647 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2648 @end table
2649
2650 @xref{Select Methods}, for more information on the various select
2651 methods.
2652
2653 @vindex gnus-activate-foreign-newsgroups
2654 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2655 Gnus will check all foreign groups with this level or lower at startup.
2656 This might take quite a while, especially if you subscribe to lots of
2657 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2658 @code{gnus-activate-level} also affects activation of foreign
2659 newsgroups.
2660
2661
2662 @node Group Parameters
2663 @section Group Parameters
2664 @cindex group parameters
2665
2666 The group parameters store information local to a particular group.
2667 Here's an example group parameter list:
2668
2669 @example
2670 ((to-address . "ding@@gnus.org")
2671  (auto-expire . t))
2672 @end example
2673
2674 We see that each element consists of a ``dotted pair''---the thing before
2675 the dot is the key, while the thing after the dot is the value.  All the
2676 parameters have this form @emph{except} local variable specs, which are
2677 not dotted pairs, but proper lists.
2678
2679 Some parameters have correspondent customizable variables, each of which
2680 is an alist of regexps and values.
2681
2682 The following group parameters can be used:
2683
2684 @table @code
2685 @item to-address
2686 @cindex to-address
2687 Address used by when doing followups and new posts.
2688
2689 @example
2690 (to-address . "some@@where.com")
2691 @end example
2692
2693 This is primarily useful in mail groups that represent closed mailing
2694 lists---mailing lists where it's expected that everybody that writes to
2695 the mailing list is subscribed to it.  Since using this parameter
2696 ensures that the mail only goes to the mailing list itself, it means
2697 that members won't receive two copies of your followups.
2698
2699 Using @code{to-address} will actually work whether the group is foreign
2700 or not.  Let's say there's a group on the server that is called
2701 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2702 the articles from a mail-to-news gateway.  Posting directly to this
2703 group is therefore impossible---you have to send mail to the mailing
2704 list address instead.
2705
2706 See also @code{gnus-parameter-to-address-alist}.
2707
2708 @item to-list
2709 @cindex to-list
2710 Address used when doing @kbd{a} in that group.
2711
2712 @example
2713 (to-list . "some@@where.com")
2714 @end example
2715
2716 It is totally ignored
2717 when doing a followup---except that if it is present in a news group,
2718 you'll get mail group semantics when doing @kbd{f}.
2719
2720 If you do an @kbd{a} command in a mail group and you have neither a
2721 @code{to-list} group parameter nor a @code{to-address} group parameter,
2722 then a @code{to-list} group parameter will be added automatically upon
2723 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2724 @vindex gnus-add-to-list
2725
2726 If you do an @kbd{a} command in a mail group and you don't have a
2727 @code{to-list} group parameter, one will be added automatically upon
2728 sending the message.
2729
2730 @findex gnus-mailing-list-mode
2731 @cindex mail list groups
2732 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2733 entering summary buffer.
2734
2735 See also @code{gnus-parameter-to-list-alist}.
2736
2737 @anchor{subscribed}
2738 @item subscribed
2739 @cindex subscribed
2740 If this parameter is set to @code{t}, Gnus will consider the
2741 to-address and to-list parameters for this group as addresses of
2742 mailing lists you are subscribed to.  Giving Gnus this information is
2743 (only) a first step in getting it to generate correct Mail-Followup-To
2744 headers for your posts to these lists.  Look here @pxref{Mailing
2745 Lists, , Mailing Lists, message, The Message Manual} for a complete
2746 treatment of available MFT support.
2747
2748 See also @code{gnus-find-subscribed-addresses}, the function that
2749 directly uses this group parameter.
2750
2751 @item visible
2752 @cindex visible
2753 If the group parameter list has the element @code{(visible . t)},
2754 that group will always be visible in the Group buffer, regardless
2755 of whether it has any unread articles.
2756
2757 @item broken-reply-to
2758 @cindex broken-reply-to
2759 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2760 headers in this group are to be ignored, and for the header to be hidden
2761 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2762 can be useful if you're reading a mailing list group where the listserv
2763 has inserted @code{Reply-To} headers that point back to the listserv
2764 itself.  That is broken behavior.  So there!
2765
2766 @item to-group
2767 @cindex to-group
2768 Elements like @code{(to-group . "some.group.name")} means that all
2769 posts in that group will be sent to @code{some.group.name}.
2770
2771 @item newsgroup
2772 @cindex newsgroup
2773 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2774 will treat all responses as if they were responses to news articles.
2775 This can be useful if you have a mail group that's really a mirror of a
2776 news group.
2777
2778 @item gcc-self
2779 @cindex gcc-self
2780 If @code{(gcc-self . t)} is present in the group parameter list, newly
2781 composed messages will be @code{Gcc}'d to the current group.  If
2782 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2783 generated, if @code{(gcc-self . "string")} is present, this string will
2784 be inserted literally as a @code{gcc} header.  This parameter takes
2785 precedence over any default @code{Gcc} rules as described later
2786 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2787 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2788 a @code{nntp} server doesn't accept articles.
2789
2790 @item auto-expire
2791 @cindex auto-expire
2792 If the group parameter has an element that looks like @code{(auto-expire
2793 . t)}, all articles read will be marked as expirable.  For an
2794 alternative approach, @pxref{Expiring Mail}.
2795
2796 See also @code{gnus-auto-expirable-newsgroups}.
2797
2798 @item total-expire
2799 @cindex total-expire
2800 If the group parameter has an element that looks like
2801 @code{(total-expire . t)}, all read articles will be put through the
2802 expiry process, even if they are not marked as expirable.  Use with
2803 caution.  Unread, ticked and dormant articles are not eligible for
2804 expiry.
2805
2806 See also @code{gnus-total-expirable-newsgroups}.
2807
2808 @item expiry-wait
2809 @cindex expiry-wait
2810 @vindex nnmail-expiry-wait-function
2811 If the group parameter has an element that looks like
2812 @code{(expiry-wait . 10)}, this value will override any
2813 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2814 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2815 can either be a number of days (not necessarily an integer) or the
2816 symbols @code{never} or @code{immediate}.
2817
2818 @item score-file
2819 @cindex score file group parameter
2820 Elements that look like @code{(score-file . "file")} will make
2821 @file{file} into the current score file for the group in question.  All
2822 interactive score entries will be put into this file.
2823
2824 @item adapt-file
2825 @cindex adapt file group parameter
2826 Elements that look like @code{(adapt-file . "file")} will make
2827 @file{file} into the current adaptive file for the group in question.
2828 All adaptive score entries will be put into this file.
2829
2830 @item admin-address
2831 @cindex admin-address
2832 When unsubscribing from a mailing list you should never send the
2833 unsubscription notice to the mailing list itself.  Instead, you'd send
2834 messages to the administrative address.  This parameter allows you to
2835 put the admin address somewhere convenient.
2836
2837 @item display
2838 @cindex display
2839 Elements that look like @code{(display . MODE)} say which articles to
2840 display on entering the group.  Valid values are:
2841
2842 @table @code
2843 @item all
2844 Display all articles, both read and unread.
2845
2846 @item an integer
2847 Display the last @var{integer} articles in the group.  This is the same as
2848 entering the group with @kbd{C-u @var{integer}}.
2849
2850 @item default
2851 Display the default visible articles, which normally includes unread and
2852 ticked articles.
2853
2854 @item an array
2855 Display articles that satisfy a predicate.
2856
2857 Here are some examples:
2858
2859 @table @code
2860 @item [unread]
2861 Display only unread articles.
2862
2863 @item [not expire]
2864 Display everything except expirable articles.
2865
2866 @item [and (not reply) (not expire)]
2867 Display everything except expirable and articles you've already
2868 responded to.
2869 @end table
2870
2871 The available operators are @code{not}, @code{and} and @code{or}.
2872 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2873 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2874 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2875 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2876
2877 @end table
2878
2879 The @code{display} parameter works by limiting the summary buffer to
2880 the subset specified.  You can pop the limit by using the @kbd{/ w}
2881 command (@pxref{Limiting}).
2882
2883 @item comment
2884 @cindex comment
2885 Elements that look like @code{(comment . "This is a comment")} are
2886 arbitrary comments on the group.  You can display comments in the
2887 group line (@pxref{Group Line Specification}).
2888
2889 @item charset
2890 @cindex charset
2891 Elements that look like @code{(charset . iso-8859-1)} will make
2892 @code{iso-8859-1} the default charset; that is, the charset that will be
2893 used for all articles that do not specify a charset.
2894
2895 See also @code{gnus-group-charset-alist}.
2896
2897 @item ignored-charsets
2898 @cindex ignored-charset
2899 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2900 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2901 default charset will be used for decoding articles.
2902
2903 See also @code{gnus-group-ignored-charsets-alist}.
2904
2905 @item posting-style
2906 @cindex posting-style
2907 You can store additional posting style information for this group
2908 here (@pxref{Posting Styles}).  The format is that of an entry in the
2909 @code{gnus-posting-styles} alist, except that there's no regexp matching
2910 the group name (of course).  Style elements in this group parameter will
2911 take precedence over the ones found in @code{gnus-posting-styles}.
2912
2913 For instance, if you want a funky name and signature in this group only,
2914 instead of hacking @code{gnus-posting-styles}, you could put something
2915 like this in the group parameters:
2916
2917 @example
2918 (posting-style
2919   (name "Funky Name")
2920   ("X-My-Header" "Funky Value")
2921   (signature "Funky Signature"))
2922 @end example
2923
2924 @item post-method
2925 @cindex post-method
2926 If it is set, the value is used as the method for posting message
2927 instead of @code{gnus-post-method}.
2928
2929 @item banner
2930 @cindex banner
2931 An item like @code{(banner . @var{regexp})} causes any part of an article
2932 that matches the regular expression @var{regexp} to be stripped. Instead of
2933 @var{regexp}, you can also use the symbol @code{signature} which strips the
2934 last signature or any of the elements of the alist
2935 @code{gnus-article-banner-alist}.
2936
2937 @item sieve
2938 @cindex sieve
2939 This parameter contains a Sieve test that should match incoming mail
2940 that should be placed in this group.  From this group parameter, a
2941 Sieve @samp{IF} control structure is generated, having the test as the
2942 condition and @samp{fileinto "group.name";} as the body.
2943
2944 For example, if the INBOX.list.sieve group has the @code{(sieve
2945 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2946 translating the group parameter into a Sieve script (@pxref{Sieve
2947 Commands}) the following Sieve code is generated:
2948
2949 @example
2950 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2951         fileinto \"INBOX.list.sieve\";
2952 @}
2953 @end example
2954
2955 The Sieve language is described in RFC 3028. @xref{Top, , Top, sieve,
2956 Emacs Sieve}.
2957
2958 @item (@var{variable} @var{form})
2959 You can use the group parameters to set variables local to the group you
2960 are entering.  If you want to turn threading off in @samp{news.answers},
2961 you could put @code{(gnus-show-threads nil)} in the group parameters of
2962 that group.  @code{gnus-show-threads} will be made into a local variable
2963 in the summary buffer you enter, and the form @code{nil} will be
2964 @code{eval}ed there.
2965
2966 Note that this feature sets the variable locally to the summary buffer.
2967 But some variables are evaluated in the article buffer, or in the
2968 message buffer (of a reply or followup or otherwise newly created
2969 message).  As a workaround, it might help to add the variable in
2970 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2971 Stuff}.  So if you want to set @code{message-from-style} via the group
2972 parameters, then you may need the following statement elsewhere in your
2973 @file{~/.gnus} file:
2974 @lisp
2975 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2976 @end lisp
2977
2978 @vindex gnus-list-identifiers
2979 A use for this feature is to remove a mailing list identifier tag in
2980 the subject fields of articles.   E.g. if the news group
2981 @example
2982 nntp+news.gnus.org:gmane.text.docbook.apps
2983 @end example
2984 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2985 tag can be removed from the article subjects in the summary buffer for
2986 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2987 into the group parameters for the group.
2988
2989 This can also be used as a group-specific hook function, if you'd like.
2990 If you want to hear a beep when you enter a group, you could put
2991 something like @code{(dummy-variable (ding))} in the parameters of that
2992 group.  @code{dummy-variable} will be set to the result of the
2993 @code{(ding)} form, but who cares?
2994
2995 @end table
2996
2997 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2998 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2999 presents you with a Customize-like interface.  The latter helps avoid
3000 silly Lisp errors.)  You might also be interested in reading about topic
3001 parameters (@pxref{Topic Parameters}).
3002
3003 @vindex gnus-parameters
3004 Group parameters can be set via the @code{gnus-parameters} variable too.
3005 But some variables, such as @code{visible}, have no effect.  For
3006 example:
3007
3008 @lisp
3009 (setq gnus-parameters
3010       '(("mail\\..*"
3011          (gnus-show-threads nil)
3012          (gnus-use-scoring nil)
3013          (gnus-summary-line-format
3014           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3015          (gcc-self . t)
3016          (display . all))
3017
3018         ("^nnimap:\\(foo.bar\\)$"
3019          (to-group . "\\1"))
3020
3021         ("mail\\.me"
3022          (gnus-use-scoring  t))
3023
3024         ("list\\..*"
3025          (total-expire . t)
3026          (broken-reply-to . t))))
3027 @end lisp
3028
3029 String value of parameters will be subjected to regexp substitution, as
3030 the @code{to-group} example shows.
3031
3032
3033 @node Listing Groups
3034 @section Listing Groups
3035 @cindex group listing
3036
3037 These commands all list various slices of the groups available.
3038
3039 @table @kbd
3040
3041 @item l
3042 @itemx A s
3043 @kindex A s (Group)
3044 @kindex l (Group)
3045 @findex gnus-group-list-groups
3046 List all groups that have unread articles
3047 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3048 command will list only groups of level ARG and lower.  By default, it
3049 only lists groups of level five (i.e.,
3050 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3051 groups).
3052
3053 @item L
3054 @itemx A u
3055 @kindex A u (Group)
3056 @kindex L (Group)
3057 @findex gnus-group-list-all-groups
3058 List all groups, whether they have unread articles or not
3059 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3060 this command will list only groups of level ARG and lower.  By default,
3061 it lists groups of level seven or lower (i.e., just subscribed and
3062 unsubscribed groups).
3063
3064 @item A l
3065 @kindex A l (Group)
3066 @findex gnus-group-list-level
3067 List all unread groups on a specific level
3068 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3069 with no unread articles.
3070
3071 @item A k
3072 @kindex A k (Group)
3073 @findex gnus-group-list-killed
3074 List all killed groups (@code{gnus-group-list-killed}).  If given a
3075 prefix argument, really list all groups that are available, but aren't
3076 currently (un)subscribed.  This could entail reading the active file
3077 from the server.
3078
3079 @item A z
3080 @kindex A z (Group)
3081 @findex gnus-group-list-zombies
3082 List all zombie groups (@code{gnus-group-list-zombies}).
3083
3084 @item A m
3085 @kindex A m (Group)
3086 @findex gnus-group-list-matching
3087 List all unread, subscribed groups with names that match a regexp
3088 (@code{gnus-group-list-matching}).
3089
3090 @item A M
3091 @kindex A M (Group)
3092 @findex gnus-group-list-all-matching
3093 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3094
3095 @item A A
3096 @kindex A A (Group)
3097 @findex gnus-group-list-active
3098 List absolutely all groups in the active file(s) of the
3099 server(s) you are connected to (@code{gnus-group-list-active}).  This
3100 might very well take quite a while.  It might actually be a better idea
3101 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3102 thing to match on.  Also note that this command may list groups that
3103 don't exist (yet)---these will be listed as if they were killed groups.
3104 Take the output with some grains of salt.
3105
3106 @item A a
3107 @kindex A a (Group)
3108 @findex gnus-group-apropos
3109 List all groups that have names that match a regexp
3110 (@code{gnus-group-apropos}).
3111
3112 @item A d
3113 @kindex A d (Group)
3114 @findex gnus-group-description-apropos
3115 List all groups that have names or descriptions that match a regexp
3116 (@code{gnus-group-description-apropos}).
3117
3118 @item A c
3119 @kindex A c (Group)
3120 @findex gnus-group-list-cached
3121 List all groups with cached articles (@code{gnus-group-list-cached}).
3122
3123 @item A ?
3124 @kindex A ? (Group)
3125 @findex gnus-group-list-dormant
3126 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3127
3128 @item A /
3129 @kindex A / (Group)
3130 @findex gnus-group-list-limit
3131 List groups limited within the current selection
3132 (@code{gnus-group-list-limit}).
3133
3134 @item A f
3135 @kindex A f (Group)
3136 @findex gnus-group-list-flush
3137 Flush groups from the current selection (@code{gnus-group-list-flush}).
3138
3139 @item A p
3140 @kindex A p (Group)
3141 @findex gnus-group-list-plus
3142 List groups plus the current selection (@code{gnus-group-list-plus}).
3143
3144 @end table
3145
3146 @vindex gnus-permanently-visible-groups
3147 @cindex visible group parameter
3148 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3149 always be shown, whether they have unread articles or not.  You can also
3150 add the @code{visible} element to the group parameters in question to
3151 get the same effect.
3152
3153 @vindex gnus-list-groups-with-ticked-articles
3154 Groups that have just ticked articles in it are normally listed in the
3155 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3156 @code{nil}, these groups will be treated just like totally empty
3157 groups.  It is @code{t} by default.
3158
3159
3160 @node Sorting Groups
3161 @section Sorting Groups
3162 @cindex sorting groups
3163
3164 @kindex C-c C-s (Group)
3165 @findex gnus-group-sort-groups
3166 @vindex gnus-group-sort-function
3167 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3168 group buffer according to the function(s) given by the
3169 @code{gnus-group-sort-function} variable.  Available sorting functions
3170 include:
3171
3172 @table @code
3173
3174 @item gnus-group-sort-by-alphabet
3175 @findex gnus-group-sort-by-alphabet
3176 Sort the group names alphabetically.  This is the default.
3177
3178 @item gnus-group-sort-by-real-name
3179 @findex gnus-group-sort-by-real-name
3180 Sort the group alphabetically on the real (unprefixed) group names.
3181
3182 @item gnus-group-sort-by-level
3183 @findex gnus-group-sort-by-level
3184 Sort by group level.
3185
3186 @item gnus-group-sort-by-score
3187 @findex gnus-group-sort-by-score
3188 Sort by group score.  @xref{Group Score}.
3189
3190 @item gnus-group-sort-by-rank
3191 @findex gnus-group-sort-by-rank
3192 Sort by group score and then the group level.  The level and the score
3193 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3194
3195 @item gnus-group-sort-by-unread
3196 @findex gnus-group-sort-by-unread
3197 Sort by number of unread articles.
3198
3199 @item gnus-group-sort-by-method
3200 @findex gnus-group-sort-by-method
3201 Sort alphabetically on the select method.
3202
3203 @item gnus-group-sort-by-server
3204 @findex gnus-group-sort-by-server
3205 Sort alphabetically on the Gnus server name.
3206
3207
3208 @end table
3209
3210 @code{gnus-group-sort-function} can also be a list of sorting
3211 functions.  In that case, the most significant sort key function must be
3212 the last one.
3213
3214
3215 There are also a number of commands for sorting directly according to
3216 some sorting criteria:
3217
3218 @table @kbd
3219 @item G S a
3220 @kindex G S a (Group)
3221 @findex gnus-group-sort-groups-by-alphabet
3222 Sort the group buffer alphabetically by group name
3223 (@code{gnus-group-sort-groups-by-alphabet}).
3224
3225 @item G S u
3226 @kindex G S u (Group)
3227 @findex gnus-group-sort-groups-by-unread
3228 Sort the group buffer by the number of unread articles
3229 (@code{gnus-group-sort-groups-by-unread}).
3230
3231 @item G S l
3232 @kindex G S l (Group)
3233 @findex gnus-group-sort-groups-by-level
3234 Sort the group buffer by group level
3235 (@code{gnus-group-sort-groups-by-level}).
3236
3237 @item G S v
3238 @kindex G S v (Group)
3239 @findex gnus-group-sort-groups-by-score
3240 Sort the group buffer by group score
3241 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3242
3243 @item G S r
3244 @kindex G S r (Group)
3245 @findex gnus-group-sort-groups-by-rank
3246 Sort the group buffer by group rank
3247 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3248
3249 @item G S m
3250 @kindex G S m (Group)
3251 @findex gnus-group-sort-groups-by-method
3252 Sort the group buffer alphabetically by back end name@*
3253 (@code{gnus-group-sort-groups-by-method}).
3254
3255 @item G S n
3256 @kindex G S n (Group)
3257 @findex gnus-group-sort-groups-by-real-name
3258 Sort the group buffer alphabetically by real (unprefixed) group name
3259 (@code{gnus-group-sort-groups-by-real-name}).
3260
3261 @end table
3262
3263 All the commands below obey the process/prefix convention
3264 (@pxref{Process/Prefix}).
3265
3266 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3267 commands will sort in reverse order.
3268
3269 You can also sort a subset of the groups:
3270
3271 @table @kbd
3272 @item G P a
3273 @kindex G P a (Group)
3274 @findex gnus-group-sort-selected-groups-by-alphabet
3275 Sort the groups alphabetically by group name
3276 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3277
3278 @item G P u
3279 @kindex G P u (Group)
3280 @findex gnus-group-sort-selected-groups-by-unread
3281 Sort the groups by the number of unread articles
3282 (@code{gnus-group-sort-selected-groups-by-unread}).
3283
3284 @item G P l
3285 @kindex G P l (Group)
3286 @findex gnus-group-sort-selected-groups-by-level
3287 Sort the groups by group level
3288 (@code{gnus-group-sort-selected-groups-by-level}).
3289
3290 @item G P v
3291 @kindex G P v (Group)
3292 @findex gnus-group-sort-selected-groups-by-score
3293 Sort the groups by group score
3294 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3295
3296 @item G P r
3297 @kindex G P r (Group)
3298 @findex gnus-group-sort-selected-groups-by-rank
3299 Sort the groups by group rank
3300 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3301
3302 @item G P m
3303 @kindex G P m (Group)
3304 @findex gnus-group-sort-selected-groups-by-method
3305 Sort the groups alphabetically by back end name@*
3306 (@code{gnus-group-sort-selected-groups-by-method}).
3307
3308 @item G P n
3309 @kindex G P n (Group)
3310 @findex gnus-group-sort-selected-groups-by-real-name
3311 Sort the groups alphabetically by real (unprefixed) group name
3312 (@code{gnus-group-sort-selected-groups-by-real-name}).
3313
3314 @item G P s
3315 @kindex G P s (Group)
3316 @findex gnus-group-sort-selected-groups
3317 Sort the groups according to @code{gnus-group-sort-function}.
3318
3319 @end table
3320
3321 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3322 move groups around.
3323
3324
3325 @node Group Maintenance
3326 @section Group Maintenance
3327 @cindex bogus groups
3328
3329 @table @kbd
3330 @item b
3331 @kindex b (Group)
3332 @findex gnus-group-check-bogus-groups
3333 Find bogus groups and delete them
3334 (@code{gnus-group-check-bogus-groups}).
3335
3336 @item F
3337 @kindex F (Group)
3338 @findex gnus-group-find-new-groups
3339 Find new groups and process them (@code{gnus-group-find-new-groups}).
3340 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3341 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3342 to query the server for new groups, and subscribe the new groups as
3343 zombies.
3344
3345 @item C-c C-x
3346 @kindex C-c C-x (Group)
3347 @findex gnus-group-expire-articles
3348 Run all expirable articles in the current group through the expiry
3349 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3350 all expirable articles in the group that have been around for a while.
3351 (@pxref{Expiring Mail}).
3352
3353 @item C-c C-M-x
3354 @kindex C-c C-M-x (Group)
3355 @findex gnus-group-expire-all-groups
3356 Run all expirable articles in all groups through the expiry process
3357 (@code{gnus-group-expire-all-groups}).
3358
3359 @end table
3360
3361
3362 @node Browse Foreign Server
3363 @section Browse Foreign Server
3364 @cindex foreign servers
3365 @cindex browsing servers
3366
3367 @table @kbd
3368 @item B
3369 @kindex B (Group)
3370 @findex gnus-group-browse-foreign-server
3371 You will be queried for a select method and a server name.  Gnus will
3372 then attempt to contact this server and let you browse the groups there
3373 (@code{gnus-group-browse-foreign-server}).
3374 @end table
3375
3376 @findex gnus-browse-mode
3377 A new buffer with a list of available groups will appear.  This buffer
3378 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3379 a lot) like a normal group buffer.
3380
3381 Here's a list of keystrokes available in the browse mode:
3382
3383 @table @kbd
3384 @item n
3385 @kindex n (Browse)
3386 @findex gnus-group-next-group
3387 Go to the next group (@code{gnus-group-next-group}).
3388
3389 @item p
3390 @kindex p (Browse)
3391 @findex gnus-group-prev-group
3392 Go to the previous group (@code{gnus-group-prev-group}).
3393
3394 @item SPACE
3395 @kindex SPACE (Browse)
3396 @findex gnus-browse-read-group
3397 Enter the current group and display the first article
3398 (@code{gnus-browse-read-group}).
3399
3400 @item RET
3401 @kindex RET (Browse)
3402 @findex gnus-browse-select-group
3403 Enter the current group (@code{gnus-browse-select-group}).
3404
3405 @item u
3406 @kindex u (Browse)
3407 @findex gnus-browse-unsubscribe-current-group
3408 Unsubscribe to the current group, or, as will be the case here,
3409 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3410
3411 @item l
3412 @itemx q
3413 @kindex q (Browse)
3414 @kindex l (Browse)
3415 @findex gnus-browse-exit
3416 Exit browse mode (@code{gnus-browse-exit}).
3417
3418 @item d
3419 @kindex d (Browse)
3420 @findex gnus-browse-describe-group
3421 Describe the current group (@code{gnus-browse-describe-group}).
3422
3423 @item ?
3424 @kindex ? (Browse)
3425 @findex gnus-browse-describe-briefly
3426 Describe browse mode briefly (well, there's not much to describe, is
3427 there) (@code{gnus-browse-describe-briefly}).
3428 @end table
3429
3430
3431 @node Exiting Gnus
3432 @section Exiting Gnus
3433 @cindex exiting Gnus
3434
3435 Yes, Gnus is ex(c)iting.
3436
3437 @table @kbd
3438 @item z
3439 @kindex z (Group)
3440 @findex gnus-group-suspend
3441 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3442 but it kills all buffers except the Group buffer.  I'm not sure why this
3443 is a gain, but then who am I to judge?
3444
3445 @item q
3446 @kindex q (Group)
3447 @findex gnus-group-exit
3448 @c @icon{gnus-group-exit}
3449 Quit Gnus (@code{gnus-group-exit}).
3450
3451 @item Q
3452 @kindex Q (Group)
3453 @findex gnus-group-quit
3454 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3455 The dribble file will be saved, though (@pxref{Auto Save}).
3456 @end table
3457
3458 @vindex gnus-exit-gnus-hook
3459 @vindex gnus-suspend-gnus-hook
3460 @vindex gnus-after-exiting-gnus-hook
3461 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3462 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3463 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3464 exiting Gnus.
3465
3466 Note:
3467
3468 @quotation
3469 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3470 numbly heavy and herself fall into a hazy trance as the boy sitting
3471 behind her drew repeated lines with his pencil across the back of her
3472 plastic chair.
3473 @end quotation
3474
3475
3476 @node Group Topics
3477 @section Group Topics
3478 @cindex topics
3479
3480 If you read lots and lots of groups, it might be convenient to group
3481 them hierarchically according to topics.  You put your Emacs groups over
3482 here, your sex groups over there, and the rest (what, two groups or so?)
3483 you put in some misc section that you never bother with anyway.  You can
3484 even group the Emacs sex groups as a sub-topic to either the Emacs
3485 groups or the sex groups---or both!  Go wild!
3486
3487 @iftex
3488 @iflatex
3489 \gnusfigure{Group Topics}{400}{
3490 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3491 }
3492 @end iflatex
3493 @end iftex
3494
3495 Here's an example:
3496
3497 @example
3498 Gnus
3499   Emacs -- I wuw it!
3500      3: comp.emacs
3501      2: alt.religion.emacs
3502     Naughty Emacs
3503      452: alt.sex.emacs
3504        0: comp.talk.emacs.recovery
3505   Misc
3506      8: comp.binaries.fractals
3507     13: comp.sources.unix
3508 @end example
3509
3510 @findex gnus-topic-mode
3511 @kindex t (Group)
3512 To get this @emph{fab} functionality you simply turn on (ooh!) the
3513 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3514 is a toggling command.)
3515
3516 Go ahead, just try it.  I'll still be here when you get back.  La de
3517 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3518 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3519 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3520 Hot and bothered?
3521
3522 If you want this permanently enabled, you should add that minor mode to
3523 the hook for the group mode.  Put the following line in your
3524 @file{~/.gnus.el} file:
3525
3526 @lisp
3527 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3528 @end lisp
3529
3530 @menu
3531 * Topic Commands::              Interactive E-Z commands.
3532 * Topic Variables::             How to customize the topics the Lisp Way.
3533 * Topic Sorting::               Sorting each topic individually.
3534 * Topic Topology::              A map of the world.
3535 * Topic Parameters::            Parameters that apply to all groups in a topic.
3536 @end menu
3537
3538
3539 @node Topic Commands
3540 @subsection Topic Commands
3541 @cindex topic commands
3542
3543 When the topic minor mode is turned on, a new @kbd{T} submap will be
3544 available.  In addition, a few of the standard keys change their
3545 definitions slightly.
3546
3547 In general, the following kinds of operations are possible on topics.
3548 First of all, you want to create topics.  Secondly, you want to put
3549 groups in topics and to move them around until you have an order you
3550 like.  The third kind of operation is to show/hide parts of the whole
3551 shebang.  You might want to hide a topic including its subtopics and
3552 groups, to get a better overview of the other groups.
3553
3554 Here is a list of the basic keys that you might need to set up topics
3555 the way you like.
3556
3557 @table @kbd
3558
3559 @item T n
3560 @kindex T n (Topic)
3561 @findex gnus-topic-create-topic
3562 Prompt for a new topic name and create it
3563 (@code{gnus-topic-create-topic}).
3564
3565 @item T TAB
3566 @itemx TAB
3567 @kindex T TAB (Topic)
3568 @kindex TAB (Topic)
3569 @findex gnus-topic-indent
3570 ``Indent'' the current topic so that it becomes a sub-topic of the
3571 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3572 ``un-indent'' the topic instead.
3573
3574 @item M-TAB
3575 @kindex M-TAB (Topic)
3576 @findex gnus-topic-unindent
3577 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3578 parent of its current parent (@code{gnus-topic-unindent}).
3579
3580 @end table
3581
3582 The following two keys can be used to move groups and topics around.
3583 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3584 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3585 kill and yank rather than cut and paste.
3586
3587 @table @kbd
3588
3589 @item C-k
3590 @kindex C-k (Topic)
3591 @findex gnus-topic-kill-group
3592 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3593 topic will be removed along with the topic.
3594
3595 @item C-y
3596 @kindex C-y (Topic)
3597 @findex gnus-topic-yank-group
3598 Yank the previously killed group or topic
3599 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3600 before all groups.
3601
3602 So, to move a topic to the beginning of the list of topics, just hit
3603 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3604 move the cursor to the beginning of the buffer (just below the `Gnus'
3605 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3606 paste.  Like I said -- E-Z.
3607
3608 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3609 you can move topics around as well as groups.
3610
3611 @end table
3612
3613 After setting up the topics the way you like them, you might wish to
3614 hide a topic, or to show it again.  That's why we have the following
3615 key.
3616
3617 @table @kbd
3618
3619 @item RET
3620 @kindex RET (Topic)
3621 @findex gnus-topic-select-group
3622 @itemx SPACE
3623 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3624 When you perform this command on a group, you'll enter the group, as
3625 usual.  When done on a topic line, the topic will be folded (if it was
3626 visible) or unfolded (if it was folded already).  So it's basically a
3627 toggling command on topics.  In addition, if you give a numerical
3628 prefix, group on that level (and lower) will be displayed.
3629
3630 @end table
3631
3632 Now for a list of other commands, in no particular order.
3633
3634 @table @kbd
3635
3636 @item T m
3637 @kindex T m (Topic)
3638 @findex gnus-topic-move-group
3639 Move the current group to some other topic
3640 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3641 convention (@pxref{Process/Prefix}).
3642
3643 @item T j
3644 @kindex T j (Topic)
3645 @findex gnus-topic-jump-to-topic
3646 Go to a topic (@code{gnus-topic-jump-to-topic}).
3647
3648 @item T c
3649 @kindex T c (Topic)
3650 @findex gnus-topic-copy-group
3651 Copy the current group to some other topic
3652 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3653 convention (@pxref{Process/Prefix}).
3654
3655 @item T h
3656 @kindex T h (Topic)
3657 @findex gnus-topic-hide-topic
3658 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3659 a prefix, hide the topic permanently.
3660
3661 @item T s
3662 @kindex T s (Topic)
3663 @findex gnus-topic-show-topic
3664 Show the current topic (@code{gnus-topic-show-topic}).  If given
3665 a prefix, show the topic permanently.
3666
3667 @item T D
3668 @kindex T D (Topic)
3669 @findex gnus-topic-remove-group
3670 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3671 This command is mainly useful if you have the same group in several
3672 topics and wish to remove it from one of the topics.  You may also
3673 remove a group from all topics, but in that case, Gnus will add it to
3674 the root topic the next time you start Gnus.  In fact, all new groups
3675 (which, naturally, don't belong to any topic) will show up in the root
3676 topic.
3677
3678 This command uses the process/prefix convention
3679 (@pxref{Process/Prefix}).
3680
3681 @item T M
3682 @kindex T M (Topic)
3683 @findex gnus-topic-move-matching
3684 Move all groups that match some regular expression to a topic
3685 (@code{gnus-topic-move-matching}).
3686
3687 @item T C
3688 @kindex T C (Topic)
3689 @findex gnus-topic-copy-matching
3690 Copy all groups that match some regular expression to a topic
3691 (@code{gnus-topic-copy-matching}).
3692
3693 @item T H
3694 @kindex T H (Topic)
3695 @findex gnus-topic-toggle-display-empty-topics
3696 Toggle hiding empty topics
3697 (@code{gnus-topic-toggle-display-empty-topics}).
3698
3699 @item T #
3700 @kindex T # (Topic)
3701 @findex gnus-topic-mark-topic
3702 Mark all groups in the current topic with the process mark
3703 (@code{gnus-topic-mark-topic}).  This command works recursively on
3704 sub-topics unless given a prefix.
3705
3706 @item T M-#
3707 @kindex T M-# (Topic)
3708 @findex gnus-topic-unmark-topic
3709 Remove the process mark from all groups in the current topic
3710 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3711 sub-topics unless given a prefix.
3712
3713 @item C-c C-x
3714 @kindex C-c C-x (Topic)
3715 @findex gnus-topic-expire-articles
3716 Run all expirable articles in the current group or topic through the
3717 expiry process (if any)
3718 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3719
3720 @item T r
3721 @kindex T r (Topic)
3722 @findex gnus-topic-rename
3723 Rename a topic (@code{gnus-topic-rename}).
3724
3725 @item T DEL
3726 @kindex T DEL (Topic)
3727 @findex gnus-topic-delete
3728 Delete an empty topic (@code{gnus-topic-delete}).
3729
3730 @item A T
3731 @kindex A T (Topic)
3732 @findex gnus-topic-list-active
3733 List all groups that Gnus knows about in a topics-ified way
3734 (@code{gnus-topic-list-active}).
3735
3736 @item T M-n
3737 @kindex T M-n (Topic)
3738 @findex gnus-topic-goto-next-topic
3739 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3740
3741 @item T M-p
3742 @kindex T M-p (Topic)
3743 @findex gnus-topic-goto-previous-topic
3744 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3745
3746 @item G p
3747 @kindex G p (Topic)
3748 @findex gnus-topic-edit-parameters
3749 @cindex group parameters
3750 @cindex topic parameters
3751 @cindex parameters
3752 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3753 @xref{Topic Parameters}.
3754
3755 @end table
3756
3757
3758 @node Topic Variables
3759 @subsection Topic Variables
3760 @cindex topic variables
3761
3762 The previous section told you how to tell Gnus which topics to display.
3763 This section explains how to tell Gnus what to display about each topic.
3764
3765 @vindex gnus-topic-line-format
3766 The topic lines themselves are created according to the
3767 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3768 Valid elements are:
3769
3770 @table @samp
3771 @item i
3772 Indentation.
3773 @item n
3774 Topic name.
3775 @item v
3776 Visibility.
3777 @item l
3778 Level.
3779 @item g
3780 Number of groups in the topic.
3781 @item a
3782 Number of unread articles in the topic.
3783 @item A
3784 Number of unread articles in the topic and all its subtopics.
3785 @end table
3786
3787 @vindex gnus-topic-indent-level
3788 Each sub-topic (and the groups in the sub-topics) will be indented with
3789 @code{gnus-topic-indent-level} times the topic level number of spaces.
3790 The default is 2.
3791
3792 @vindex gnus-topic-mode-hook
3793 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3794
3795 @vindex gnus-topic-display-empty-topics
3796 The @code{gnus-topic-display-empty-topics} says whether to display even
3797 topics that have no unread articles in them.  The default is @code{t}.
3798
3799
3800 @node Topic Sorting
3801 @subsection Topic Sorting
3802 @cindex topic sorting
3803
3804 You can sort the groups in each topic individually with the following
3805 commands:
3806
3807
3808 @table @kbd
3809 @item T S a
3810 @kindex T S a (Topic)
3811 @findex gnus-topic-sort-groups-by-alphabet
3812 Sort the current topic alphabetically by group name
3813 (@code{gnus-topic-sort-groups-by-alphabet}).
3814
3815 @item T S u
3816 @kindex T S u (Topic)
3817 @findex gnus-topic-sort-groups-by-unread
3818 Sort the current topic by the number of unread articles
3819 (@code{gnus-topic-sort-groups-by-unread}).
3820
3821 @item T S l
3822 @kindex T S l (Topic)
3823 @findex gnus-topic-sort-groups-by-level
3824 Sort the current topic by group level
3825 (@code{gnus-topic-sort-groups-by-level}).
3826
3827 @item T S v
3828 @kindex T S v (Topic)
3829 @findex gnus-topic-sort-groups-by-score
3830 Sort the current topic by group score
3831 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3832
3833 @item T S r
3834 @kindex T S r (Topic)
3835 @findex gnus-topic-sort-groups-by-rank
3836 Sort the current topic by group rank
3837 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3838
3839 @item T S m
3840 @kindex T S m (Topic)
3841 @findex gnus-topic-sort-groups-by-method
3842 Sort the current topic alphabetically by back end name
3843 (@code{gnus-topic-sort-groups-by-method}).
3844
3845 @item T S e
3846 @kindex T S e (Topic)
3847 @findex gnus-topic-sort-groups-by-server
3848 Sort the current topic alphabetically by server name
3849 (@code{gnus-topic-sort-groups-by-server}).
3850
3851 @item T S s
3852 @kindex T S s
3853 @findex gnus-topic-sort-groups
3854 Sort the current topic according to the function(s) given by the
3855 @code{gnus-group-sort-function} variable
3856 (@code{gnus-topic-sort-groups}).
3857
3858 @end table
3859
3860 When given a prefix argument, all these commands will sort in reverse
3861 order.  @xref{Sorting Groups}, for more information about group
3862 sorting.
3863
3864
3865 @node Topic Topology
3866 @subsection Topic Topology
3867 @cindex topic topology
3868 @cindex topology
3869
3870 So, let's have a look at an example group buffer:
3871
3872 @example
3873 @group
3874 Gnus
3875   Emacs -- I wuw it!
3876      3: comp.emacs
3877      2: alt.religion.emacs
3878     Naughty Emacs
3879      452: alt.sex.emacs
3880        0: comp.talk.emacs.recovery
3881   Misc
3882      8: comp.binaries.fractals
3883     13: comp.sources.unix
3884 @end group
3885 @end example
3886
3887 So, here we have one top-level topic (@samp{Gnus}), two topics under
3888 that, and one sub-topic under one of the sub-topics.  (There is always
3889 just one (1) top-level topic).  This topology can be expressed as
3890 follows:
3891
3892 @lisp
3893 (("Gnus" visible)
3894  (("Emacs -- I wuw it!" visible)
3895   (("Naughty Emacs" visible)))
3896  (("Misc" visible)))
3897 @end lisp
3898
3899 @vindex gnus-topic-topology
3900 This is in fact how the variable @code{gnus-topic-topology} would look
3901 for the display above.  That variable is saved in the @file{.newsrc.eld}
3902 file, and shouldn't be messed with manually---unless you really want
3903 to.  Since this variable is read from the @file{.newsrc.eld} file,
3904 setting it in any other startup files will have no effect.
3905
3906 This topology shows what topics are sub-topics of what topics (right),
3907 and which topics are visible.  Two settings are currently
3908 allowed---@code{visible} and @code{invisible}.
3909
3910
3911 @node Topic Parameters
3912 @subsection Topic Parameters
3913 @cindex topic parameters
3914
3915 All groups in a topic will inherit group parameters from the parent (and
3916 ancestor) topic parameters.  All valid group parameters are valid topic
3917 parameters (@pxref{Group Parameters}).
3918
3919 In addition, the following parameters are only valid as topic
3920 parameters:
3921
3922 @table @code
3923 @item subscribe
3924 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3925 @code{subscribe} topic parameter says what groups go in what topic.  Its
3926 value should be a regexp to match the groups that should go in that
3927 topic.
3928
3929 @item subscribe-level
3930 When subscribing new groups by topic (see the @code{subscribe} parameter),
3931 the group will be subscribed with the level specified in the
3932 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3933
3934 @end table
3935
3936 Group parameters (of course) override topic parameters, and topic
3937 parameters in sub-topics override topic parameters in super-topics.  You
3938 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3939 verb, although you may feel free to disagree with me here.)
3940
3941 @example
3942 Gnus
3943   Emacs
3944      3: comp.emacs
3945      2: alt.religion.emacs
3946    452: alt.sex.emacs
3947     Relief
3948      452: alt.sex.emacs
3949        0: comp.talk.emacs.recovery
3950   Misc
3951      8: comp.binaries.fractals
3952     13: comp.sources.unix
3953    452: alt.sex.emacs
3954 @end example
3955
3956 The @samp{Emacs} topic has the topic parameter @code{(score-file
3957 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3958 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3959 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3960 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3961 . "religion.SCORE")}.
3962
3963 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3964 will get the @file{relief.SCORE} home score file.  If you enter the same
3965 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3966 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3967 get the @file{religion.SCORE} home score file.
3968
3969 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3970 there are some problems, especially with the @code{total-expiry}
3971 parameter.  Say you have a mail group in two topics; one with
3972 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3973 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3974 of these topics you mean to expire articles from, so anything may
3975 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3976 happens.  You just have to be careful if you do stuff like that.
3977
3978
3979 @node Misc Group Stuff
3980 @section Misc Group Stuff
3981
3982 @menu
3983 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3984 * Group Information::           Information and help on groups and Gnus.
3985 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3986 * File Commands::               Reading and writing the Gnus files.
3987 * Sieve Commands::              Managing Sieve scripts.
3988 @end menu
3989
3990 @table @kbd
3991
3992 @item ^
3993 @kindex ^ (Group)
3994 @findex gnus-group-enter-server-mode
3995 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3996 @xref{Server Buffer}.
3997
3998 @item a
3999 @kindex a (Group)
4000 @findex gnus-group-post-news
4001 Start composing a message (a news by default)
4002 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4003 under the point.  If the prefix is 1, prompt for a group to post to.
4004 Contrary to what the name of this function suggests, the prepared
4005 article might be a mail instead of a news, if a mail group is specified
4006 with the prefix argument.  @xref{Composing Messages}.
4007
4008 @item m
4009 @kindex m (Group)
4010 @findex gnus-group-mail
4011 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4012 use the posting style of the group under the point.  If the prefix is 1,
4013 prompt for a group name to find the posting style.
4014 @xref{Composing Messages}.
4015
4016 @item i
4017 @kindex i (Group)
4018 @findex gnus-group-news
4019 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4020 post to the group under the point.  If the prefix is 1, prompt
4021 for group to post to.  @xref{Composing Messages}.
4022
4023 This function actually prepares a news even when using mail groups.
4024 This is useful for ``posting'' messages to mail groups without actually
4025 sending them over the network: they're just saved directly to the group
4026 in question.  The corresponding back end must have a request-post method
4027 for this to work though.
4028
4029 @end table
4030
4031 Variables for the group buffer:
4032
4033 @table @code
4034
4035 @item gnus-group-mode-hook
4036 @vindex gnus-group-mode-hook
4037 is called after the group buffer has been
4038 created.
4039
4040 @item gnus-group-prepare-hook
4041 @vindex gnus-group-prepare-hook
4042 is called after the group buffer is
4043 generated.  It may be used to modify the buffer in some strange,
4044 unnatural way.
4045
4046 @item gnus-group-prepared-hook
4047 @vindex gnus-group-prepare-hook
4048 is called as the very last thing after the group buffer has been
4049 generated.  It may be used to move point around, for instance.
4050
4051 @item gnus-permanently-visible-groups
4052 @vindex gnus-permanently-visible-groups
4053 Groups matching this regexp will always be listed in the group buffer,
4054 whether they are empty or not.
4055
4056 @item gnus-group-name-charset-method-alist
4057 @vindex gnus-group-name-charset-method-alist
4058 An alist of method and the charset for group names. It is used to show
4059 non-@acronym{ASCII} group names.
4060
4061 For example:
4062 @lisp
4063 (setq gnus-group-name-charset-method-alist
4064     '(((nntp "news.com.cn") . cn-gb-2312)))
4065 @end lisp
4066
4067 @item gnus-group-name-charset-group-alist
4068 @cindex UTF-8 group names
4069 @vindex gnus-group-name-charset-group-alist
4070 An alist of regexp of group name and the charset for group names.  It
4071 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4072 utf-8))} is the default value if UTF-8 is supported, otherwise the
4073 default is @code{nil}.
4074
4075 For example:
4076 @lisp
4077 (setq gnus-group-name-charset-group-alist
4078     '(("\\.com\\.cn:" . cn-gb-2312)))
4079 @end lisp
4080
4081 @end table
4082
4083 @node Scanning New Messages
4084 @subsection Scanning New Messages
4085 @cindex new messages
4086 @cindex scanning new news
4087
4088 @table @kbd
4089
4090 @item g
4091 @kindex g (Group)
4092 @findex gnus-group-get-new-news
4093 @c @icon{gnus-group-get-new-news}
4094 Check the server(s) for new articles.  If the numerical prefix is used,
4095 this command will check only groups of level @var{arg} and lower
4096 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4097 command will force a total re-reading of the active file(s) from the
4098 back end(s).
4099
4100 @item M-g
4101 @kindex M-g (Group)
4102 @findex gnus-group-get-new-news-this-group
4103 @vindex gnus-goto-next-group-when-activating
4104 @c @icon{gnus-group-get-new-news-this-group}
4105 Check whether new articles have arrived in the current group
4106 (@code{gnus-group-get-new-news-this-group}).
4107 @code{gnus-goto-next-group-when-activating} says whether this command is
4108 to move point to the next group or not.  It is @code{t} by default.
4109
4110 @findex gnus-activate-all-groups
4111 @cindex activating groups
4112 @item C-c M-g
4113 @kindex C-c M-g (Group)
4114 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4115
4116 @item R
4117 @kindex R (Group)
4118 @cindex restarting
4119 @findex gnus-group-restart
4120 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4121 file(s), closes the connection to all servers, clears up all run-time
4122 Gnus variables, and then starts Gnus all over again.
4123
4124 @end table
4125
4126 @vindex gnus-get-new-news-hook
4127 @code{gnus-get-new-news-hook} is run just before checking for new news.
4128
4129 @vindex gnus-after-getting-new-news-hook
4130 @code{gnus-after-getting-new-news-hook} is run after checking for new
4131 news.
4132
4133
4134 @node Group Information
4135 @subsection Group Information
4136 @cindex group information
4137 @cindex information on groups
4138
4139 @table @kbd
4140
4141
4142 @item H f
4143 @kindex H f (Group)
4144 @findex gnus-group-fetch-faq
4145 @vindex gnus-group-faq-directory
4146 @cindex FAQ
4147 @cindex ange-ftp
4148 Try to fetch the @acronym{FAQ} for the current group
4149 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4150 from @code{gnus-group-faq-directory}, which is usually a directory on
4151 a remote machine.  This variable can also be a list of directories.
4152 In that case, giving a prefix to this command will allow you to choose
4153 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4154 used for fetching the file.
4155
4156 If fetching from the first site is unsuccessful, Gnus will attempt to go
4157 through @code{gnus-group-faq-directory} and try to open them one by one.
4158
4159 @item H c
4160 @kindex H c (Group)
4161 @findex gnus-group-fetch-charter
4162 @vindex gnus-group-charter-alist
4163 @cindex charter
4164 Try to open the charter for the current group in a web browser
4165 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4166 prefix argument.
4167
4168 Gnus will use @code{gnus-group-charter-alist} to find the location of
4169 the charter.  If no location is known, Gnus will fetch the control
4170 messages for the group, which in some cases includes the charter.
4171
4172 @item H C
4173 @kindex H C (Group)
4174 @findex gnus-group-fetch-control
4175 @vindex gnus-group-fetch-control-use-browse-url
4176 @cindex control message
4177 Fetch the control messages for the group from the archive at
4178 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4179 group if given a prefix argument.
4180
4181 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4182 Gnus will open the control messages in a browser using
4183 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4184 and displayed in an ephemeral group.
4185
4186 Note that the control messages are compressed.  To use this command
4187 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4188 Files, ,Compressed Files, emacs, The Emacs Manual}).
4189
4190 @item H d
4191 @itemx C-c C-d
4192 @c @icon{gnus-group-describe-group}
4193 @kindex H d (Group)
4194 @kindex C-c C-d (Group)
4195 @cindex describing groups
4196 @cindex group description
4197 @findex gnus-group-describe-group
4198 Describe the current group (@code{gnus-group-describe-group}).  If given
4199 a prefix, force Gnus to re-read the description from the server.
4200
4201 @item M-d
4202 @kindex M-d (Group)
4203 @findex gnus-group-describe-all-groups
4204 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4205 prefix, force Gnus to re-read the description file from the server.
4206
4207 @item H v
4208 @itemx V
4209 @kindex V (Group)
4210 @kindex H v (Group)
4211 @cindex version
4212 @findex gnus-version
4213 Display current Gnus version numbers (@code{gnus-version}).
4214
4215 @item ?
4216 @kindex ? (Group)
4217 @findex gnus-group-describe-briefly
4218 Give a very short help message (@code{gnus-group-describe-briefly}).
4219
4220 @item C-c C-i
4221 @kindex C-c C-i (Group)
4222 @cindex info
4223 @cindex manual
4224 @findex gnus-info-find-node
4225 Go to the Gnus info node (@code{gnus-info-find-node}).
4226 @end table
4227
4228
4229 @node Group Timestamp
4230 @subsection Group Timestamp
4231 @cindex timestamps
4232 @cindex group timestamps
4233
4234 It can be convenient to let Gnus keep track of when you last read a
4235 group.  To set the ball rolling, you should add
4236 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4237
4238 @lisp
4239 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4240 @end lisp
4241
4242 After doing this, each time you enter a group, it'll be recorded.
4243
4244 This information can be displayed in various ways---the easiest is to
4245 use the @samp{%d} spec in the group line format:
4246
4247 @lisp
4248 (setq gnus-group-line-format
4249       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4250 @end lisp
4251
4252 This will result in lines looking like:
4253
4254 @example
4255 *        0: mail.ding                                19961002T012943
4256          0: custom                                   19961002T012713
4257 @end example
4258
4259 As you can see, the date is displayed in compact ISO 8601 format.  This
4260 may be a bit too much, so to just display the date, you could say
4261 something like:
4262
4263 @lisp
4264 (setq gnus-group-line-format
4265       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4266 @end lisp
4267
4268 If you would like greater control of the time format, you can use a
4269 user-defined format spec.  Something like the following should do the
4270 trick:
4271
4272 @lisp
4273 (setq gnus-group-line-format
4274       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4275 (defun gnus-user-format-function-d (headers)
4276   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4277     (if time
4278         (format-time-string "%b %d  %H:%M" time)
4279       "")))
4280 @end lisp
4281
4282
4283 @node File Commands
4284 @subsection File Commands
4285 @cindex file commands
4286
4287 @table @kbd
4288
4289 @item r
4290 @kindex r (Group)
4291 @findex gnus-group-read-init-file
4292 @vindex gnus-init-file
4293 @cindex reading init file
4294 Re-read the init file (@code{gnus-init-file}, which defaults to
4295 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4296
4297 @item s
4298 @kindex s (Group)
4299 @findex gnus-group-save-newsrc
4300 @cindex saving .newsrc
4301 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4302 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4303 file(s) whether Gnus thinks it is necessary or not.
4304
4305 @c @item Z
4306 @c @kindex Z (Group)
4307 @c @findex gnus-group-clear-dribble
4308 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4309
4310 @end table
4311
4312
4313 @node Sieve Commands
4314 @subsection Sieve Commands
4315 @cindex group sieve commands
4316
4317 Sieve is a server-side mail filtering language.  In Gnus you can use
4318 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4319 sieve rules that should apply to each group.  Gnus provides two
4320 commands to translate all these group parameters into a proper Sieve
4321 script that can be transfered to the server somehow.
4322
4323 @vindex gnus-sieve-file
4324 @vindex gnus-sieve-region-start
4325 @vindex gnus-sieve-region-end
4326 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4327 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4328 between two delimiters, @code{gnus-sieve-region-start} and
4329 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4330 outside these delimiters that will not be removed the next time you
4331 regenerate the Sieve script.
4332
4333 @vindex gnus-sieve-crosspost
4334 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4335 is generated.  If it is non-@code{nil} (the default) articles is
4336 placed in all groups that have matching rules, otherwise the article
4337 is only placed in the group with the first matching rule.  For
4338 example, the group parameter @samp{(sieve address "sender"
4339 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4340 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4341 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4342 except that the line containing the call to @code{stop} is removed.)
4343
4344 @example
4345 if address "sender" "owner-ding@@hpc.uh.edu" @{
4346         fileinto "INBOX.ding";
4347         stop;
4348 @}
4349 @end example
4350
4351 @xref{Top, ,Top, sieve, Emacs Sieve}.
4352
4353 @table @kbd
4354
4355 @item D g
4356 @kindex D g (Group)
4357 @findex gnus-sieve-generate
4358 @vindex gnus-sieve-file
4359 @cindex generating sieve script
4360 Regenerate a Sieve script from the @code{sieve} group parameters and
4361 put you into the @code{gnus-sieve-file} without saving it.
4362
4363 @item D u
4364 @kindex D u (Group)
4365 @findex gnus-sieve-update
4366 @vindex gnus-sieve-file
4367 @cindex updating sieve script
4368 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4369 @code{sieve} group parameters, save the file and upload it to the
4370 server using the @code{sieveshell} program.
4371
4372 @end table
4373
4374
4375 @node Summary Buffer
4376 @chapter Summary Buffer
4377 @cindex summary buffer
4378
4379 A line for each article is displayed in the summary buffer.  You can
4380 move around, read articles, post articles and reply to articles.
4381
4382 The most common way to a summary buffer is to select a group from the
4383 group buffer (@pxref{Selecting a Group}).
4384
4385 You can have as many summary buffers open as you wish.
4386
4387 @menu
4388 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4389 * Summary Maneuvering::         Moving around the summary buffer.
4390 * Choosing Articles::           Reading articles.
4391 * Paging the Article::          Scrolling the current article.
4392 * Reply Followup and Post::     Posting articles.
4393 * Delayed Articles::            Send articles at a later time.
4394 * Marking Articles::            Marking articles as read, expirable, etc.
4395 * Limiting::                    You can limit the summary buffer.
4396 * Threading::                   How threads are made.
4397 * Sorting the Summary Buffer::  How articles and threads are sorted.
4398 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4399 * Article Caching::             You may store articles in a cache.
4400 * Persistent Articles::         Making articles expiry-resistant.
4401 * Article Backlog::             Having already read articles hang around.
4402 * Saving Articles::             Ways of customizing article saving.
4403 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4404 * Article Treatment::           The article buffer can be mangled at will.
4405 * MIME Commands::               Doing MIMEy things with the articles.
4406 * Charsets::                    Character set issues.
4407 * Article Commands::            Doing various things with the article buffer.
4408 * Summary Sorting::             Sorting the summary buffer in various ways.
4409 * Finding the Parent::          No child support? Get the parent.
4410 * Alternative Approaches::      Reading using non-default summaries.
4411 * Tree Display::                A more visual display of threads.
4412 * Mail Group Commands::         Some commands can only be used in mail groups.
4413 * Various Summary Stuff::       What didn't fit anywhere else.
4414 * Exiting the Summary Buffer::  Returning to the Group buffer,
4415                                 or reselecting the current group.
4416 * Crosspost Handling::          How crossposted articles are dealt with.
4417 * Duplicate Suppression::       An alternative when crosspost handling fails.
4418 * Security::                    Decrypt and Verify.
4419 * Mailing List::                Mailing list minor mode.
4420 @end menu
4421
4422
4423 @node Summary Buffer Format
4424 @section Summary Buffer Format
4425 @cindex summary buffer format
4426
4427 @iftex
4428 @iflatex
4429 \gnusfigure{The Summary Buffer}{180}{
4430 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4431 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4432 }
4433 @end iflatex
4434 @end iftex
4435
4436 @menu
4437 * Summary Buffer Lines::        You can specify how summary lines should look.
4438 * To From Newsgroups::          How to not display your own name.
4439 * Summary Buffer Mode Line::    You can say how the mode line should look.
4440 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4441 @end menu
4442
4443 @findex mail-extract-address-components
4444 @findex gnus-extract-address-components
4445 @vindex gnus-extract-address-components
4446 Gnus will use the value of the @code{gnus-extract-address-components}
4447 variable as a function for getting the name and address parts of a
4448 @code{From} header.  Two pre-defined functions exist:
4449 @code{gnus-extract-address-components}, which is the default, quite
4450 fast, and too simplistic solution; and
4451 @code{mail-extract-address-components}, which works very nicely, but is
4452 slower.  The default function will return the wrong answer in 5% of the
4453 cases.  If this is unacceptable to you, use the other function instead:
4454
4455 @lisp
4456 (setq gnus-extract-address-components
4457       'mail-extract-address-components)
4458 @end lisp
4459
4460 @vindex gnus-summary-same-subject
4461 @code{gnus-summary-same-subject} is a string indicating that the current
4462 article has the same subject as the previous.  This string will be used
4463 with those specs that require it.  The default is @code{""}.
4464
4465
4466 @node Summary Buffer Lines
4467 @subsection Summary Buffer Lines
4468
4469 @vindex gnus-summary-line-format
4470 You can change the format of the lines in the summary buffer by changing
4471 the @code{gnus-summary-line-format} variable.  It works along the same
4472 lines as a normal @code{format} string, with some extensions
4473 (@pxref{Formatting Variables}).
4474
4475 There should always be a colon or a point position marker on the line;
4476 the cursor always moves to the point position marker or the colon after
4477 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4478 possible to change this.  Just write a new function
4479 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4480 @xref{Positioning Point}.
4481
4482 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4483
4484 The following format specification characters and extended format
4485 specification(s) are understood:
4486
4487 @table @samp
4488 @item N
4489 Article number.
4490 @item S
4491 Subject string.  List identifiers stripped,
4492 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4493 @item s
4494 Subject if the article is the root of the thread or the previous article
4495 had a different subject, @code{gnus-summary-same-subject} otherwise.
4496 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4497 @item F
4498 Full @code{From} header.
4499 @item n
4500 The name (from the @code{From} header).
4501 @item f
4502 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4503 From Newsgroups}).
4504 @item a
4505 The name (from the @code{From} header).  This differs from the @code{n}
4506 spec in that it uses the function designated by the
4507 @code{gnus-extract-address-components} variable, which is slower, but
4508 may be more thorough.
4509 @item A
4510 The address (from the @code{From} header).  This works the same way as
4511 the @code{a} spec.
4512 @item L
4513 Number of lines in the article.
4514 @item c
4515 Number of characters in the article. This specifier is not supported
4516 in some methods (like nnfolder).
4517 @item k
4518 Pretty-printed version of the number of characters in the article;
4519 for example, @samp{1.2k} or @samp{0.4M}.
4520 @item I
4521 Indentation based on thread level (@pxref{Customizing Threading}).
4522 @item B
4523 A complex trn-style thread tree, showing response-connecting trace
4524 lines.  A thread could be drawn like this:
4525
4526 @example
4527 >
4528 +->
4529 | +->
4530 | | \->
4531 | |   \->
4532 | \->
4533 +->
4534 \->
4535 @end example
4536
4537 You can customize the appearance with the following options.  Note
4538 that it is possible to make the thread display look really neat by
4539 replacing the default @acronym{ASCII} characters with graphic
4540 line-drawing glyphs.
4541 @table @code
4542 @item gnus-sum-thread-tree-root
4543 @vindex gnus-sum-thread-tree-root
4544 Used for the root of a thread.  If @code{nil}, use subject
4545 instead.  The default is @samp{> }.
4546
4547 @item gnus-sum-thread-tree-false-root
4548 @vindex gnus-sum-thread-tree-false-root
4549 Used for the false root of a thread (@pxref{Loose Threads}).  If
4550 @code{nil}, use subject instead.  The default is @samp{> }.
4551
4552 @item gnus-sum-thread-tree-single-indent
4553 @vindex gnus-sum-thread-tree-single-indent
4554 Used for a thread with just one message.  If @code{nil}, use subject
4555 instead.  The default is @samp{}.
4556
4557 @item gnus-sum-thread-tree-vertical
4558 @vindex gnus-sum-thread-tree-vertical
4559 Used for drawing a vertical line.  The default is @samp{| }.
4560
4561 @item gnus-sum-thread-tree-indent
4562 @vindex gnus-sum-thread-tree-indent
4563 Used for indenting.  The default is @samp{  }. 
4564
4565 @item gnus-sum-thread-tree-leaf-with-other
4566 @vindex gnus-sum-thread-tree-leaf-with-other
4567 Used for a leaf with brothers.  The default is @samp{+-> }.
4568
4569 @item gnus-sum-thread-tree-single-leaf
4570 @vindex gnus-sum-thread-tree-single-leaf
4571 Used for a leaf without brothers.  The default is @samp{\-> }
4572
4573 @end table
4574
4575 @item T
4576 Nothing if the article is a root and lots of spaces if it isn't (it
4577 pushes everything after it off the screen).
4578 @item [
4579 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4580 for adopted articles (@pxref{Customizing Threading}).
4581 @item ]
4582 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4583 for adopted articles.
4584 @item >
4585 One space for each thread level.
4586 @item <
4587 Twenty minus thread level spaces.
4588 @item U
4589 Unread. @xref{Read Articles}.
4590
4591 @item R
4592 This misleadingly named specifier is the @dfn{secondary mark}.  This
4593 mark will say whether the article has been replied to, has been cached,
4594 or has been saved.  @xref{Other Marks}.
4595
4596 @item i
4597 Score as a number (@pxref{Scoring}).
4598 @item z
4599 @vindex gnus-summary-zcore-fuzz
4600 Zcore, @samp{+} if above the default level and @samp{-} if below the
4601 default level.  If the difference between
4602 @code{gnus-summary-default-score} and the score is less than
4603 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4604 @item V
4605 Total thread score.
4606 @item x
4607 @code{Xref}.
4608 @item D
4609 @code{Date}.
4610 @item d
4611 The @code{Date} in @code{DD-MMM} format.
4612 @item o
4613 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4614 @item M
4615 @code{Message-ID}.
4616 @item r
4617 @code{References}.
4618 @item t
4619 Number of articles in the current sub-thread.  Using this spec will slow
4620 down summary buffer generation somewhat.
4621 @item e
4622 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4623 article has any children.
4624 @item P
4625 The line number.
4626 @item O
4627 Download mark.
4628 @item &user-date;
4629 Age sensitive date format.  Various date format is defined in
4630 @code{gnus-user-date-format-alist}.
4631 @item u
4632 User defined specifier.  The next character in the format string should
4633 be a letter.  Gnus will call the function
4634 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4635 following @samp{%u}.  The function will be passed the current header as
4636 argument.  The function should return a string, which will be inserted
4637 into the summary just like information from any other summary specifier.
4638 @end table
4639
4640 Text between @samp{%(} and @samp{%)} will be highlighted with
4641 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4642 There can only be one such area.
4643
4644 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4645 have to be handled with care.  For reasons of efficiency, Gnus will
4646 compute what column these characters will end up in, and ``hard-code''
4647 that.  This means that it is invalid to have these specs after a
4648 variable-length spec.  Well, you might not be arrested, but your summary
4649 buffer will look strange, which is bad enough.
4650
4651 The smart choice is to have these specs as far to the left as possible.
4652 (Isn't that the case with everything, though?  But I digress.)
4653
4654 This restriction may disappear in later versions of Gnus.
4655
4656
4657 @node To From Newsgroups
4658 @subsection To From Newsgroups
4659 @cindex To
4660 @cindex Newsgroups
4661
4662 In some groups (particularly in archive groups), the @code{From} header
4663 isn't very interesting, since all the articles there are written by
4664 you.  To display the information in the @code{To} or @code{Newsgroups}
4665 headers instead, you need to decide three things: What information to
4666 gather; where to display it; and when to display it.
4667
4668 @enumerate
4669 @item
4670 @vindex gnus-extra-headers
4671 The reading of extra header information is controlled by the
4672 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4673 instance:
4674
4675 @lisp
4676 (setq gnus-extra-headers
4677       '(To Newsgroups X-Newsreader))
4678 @end lisp
4679
4680 This will result in Gnus trying to obtain these three headers, and
4681 storing it in header structures for later easy retrieval.
4682
4683 @item
4684 @findex gnus-extra-header
4685 The value of these extra headers can be accessed via the
4686 @code{gnus-extra-header} function.  Here's a format line spec that will
4687 access the @code{X-Newsreader} header:
4688
4689 @example
4690 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4691 @end example
4692
4693 @item
4694 @vindex gnus-ignored-from-addresses
4695 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4696 summary line spec returns the @code{To}, @code{Newsreader} or
4697 @code{From} header.  If this regexp matches the contents of the
4698 @code{From} header, the value of the @code{To} or @code{Newsreader}
4699 headers are used instead.
4700
4701 @end enumerate
4702
4703 @vindex nnmail-extra-headers
4704 A related variable is @code{nnmail-extra-headers}, which controls when
4705 to include extra headers when generating overview (@acronym{NOV}) files.
4706 If you have old overview files, you should regenerate them after
4707 changing this variable, by entering the server buffer using @kbd{^},
4708 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4709 regeneration.
4710
4711 @vindex gnus-summary-line-format
4712 You also have to instruct Gnus to display the data by changing the
4713 @code{%n} spec to the @code{%f} spec in the
4714 @code{gnus-summary-line-format} variable.
4715
4716 In summary, you'd typically put something like the following in
4717 @file{~/.gnus.el}:
4718
4719 @lisp
4720 (setq gnus-extra-headers
4721       '(To Newsgroups))
4722 (setq nnmail-extra-headers gnus-extra-headers)
4723 (setq gnus-summary-line-format
4724       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4725 (setq gnus-ignored-from-addresses
4726       "Your Name Here")
4727 @end lisp
4728
4729 (The values listed above are the default values in Gnus.  Alter them
4730 to fit your needs.)
4731
4732 A note for news server administrators, or for users who wish to try to
4733 convince their news server administrator to provide some additional
4734 support:
4735
4736 The above is mostly useful for mail groups, where you have control over
4737 the @acronym{NOV} files that are created.  However, if you can persuade your
4738 nntp admin to add (in the usual implementation, notably INN):
4739
4740 @example
4741 Newsgroups:full
4742 @end example
4743
4744 to the end of her @file{overview.fmt} file, then you can use that just
4745 as you would the extra headers from the mail groups.
4746
4747
4748 @node Summary Buffer Mode Line
4749 @subsection Summary Buffer Mode Line
4750
4751 @vindex gnus-summary-mode-line-format
4752 You can also change the format of the summary mode bar (@pxref{Mode Line
4753 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4754 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4755
4756 Here are the elements you can play with:
4757
4758 @table @samp
4759 @item G
4760 Group name.
4761 @item p
4762 Unprefixed group name.
4763 @item A
4764 Current article number.
4765 @item z
4766 Current article score.
4767 @item V
4768 Gnus version.
4769 @item U
4770 Number of unread articles in this group.
4771 @item e
4772 Number of unread articles in this group that aren't displayed in the
4773 summary buffer.
4774 @item Z
4775 A string with the number of unread and unselected articles represented
4776 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4777 articles, and just as @samp{<%U more>} if there are just unread articles
4778 and no unselected ones.
4779 @item g
4780 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4781 shortened to @samp{r.a.anime}.
4782 @item S
4783 Subject of the current article.
4784 @item u
4785 User-defined spec (@pxref{User-Defined Specs}).
4786 @item s
4787 Name of the current score file (@pxref{Scoring}).
4788 @item d
4789 Number of dormant articles (@pxref{Unread Articles}).
4790 @item t
4791 Number of ticked articles (@pxref{Unread Articles}).
4792 @item r
4793 Number of articles that have been marked as read in this session.
4794 @item E
4795 Number of articles expunged by the score files.
4796 @end table
4797
4798
4799 @node Summary Highlighting
4800 @subsection Summary Highlighting
4801
4802 @table @code
4803
4804 @item gnus-visual-mark-article-hook
4805 @vindex gnus-visual-mark-article-hook
4806 This hook is run after selecting an article.  It is meant to be used for
4807 highlighting the article in some way.  It is not run if
4808 @code{gnus-visual} is @code{nil}.
4809
4810 @item gnus-summary-update-hook
4811 @vindex gnus-summary-update-hook
4812 This hook is called when a summary line is changed.  It is not run if
4813 @code{gnus-visual} is @code{nil}.
4814
4815 @item gnus-summary-selected-face
4816 @vindex gnus-summary-selected-face
4817 This is the face (or @dfn{font} as some people call it) used to
4818 highlight the current article in the summary buffer.
4819
4820 @item gnus-summary-highlight
4821 @vindex gnus-summary-highlight
4822 Summary lines are highlighted according to this variable, which is a
4823 list where the elements are of the format @code{(@var{form}
4824 . @var{face})}.  If you would, for instance, like ticked articles to be
4825 italic and high-scored articles to be bold, you could set this variable
4826 to something like
4827 @lisp
4828 (((eq mark gnus-ticked-mark) . italic)
4829  ((> score default) . bold))
4830 @end lisp
4831 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4832 @var{face} will be applied to the line.
4833 @end table
4834
4835
4836 @node Summary Maneuvering
4837 @section Summary Maneuvering
4838 @cindex summary movement
4839
4840 All the straight movement commands understand the numeric prefix and
4841 behave pretty much as you'd expect.
4842
4843 None of these commands select articles.
4844
4845 @table @kbd
4846 @item G M-n
4847 @itemx M-n
4848 @kindex M-n (Summary)
4849 @kindex G M-n (Summary)
4850 @findex gnus-summary-next-unread-subject
4851 Go to the next summary line of an unread article
4852 (@code{gnus-summary-next-unread-subject}).
4853
4854 @item G M-p
4855 @itemx M-p
4856 @kindex M-p (Summary)
4857 @kindex G M-p (Summary)
4858 @findex gnus-summary-prev-unread-subject
4859 Go to the previous summary line of an unread article
4860 (@code{gnus-summary-prev-unread-subject}).
4861
4862 @item G g
4863 @kindex G g (Summary)
4864 @findex gnus-summary-goto-subject
4865 Ask for an article number and then go to the summary line of that article
4866 without displaying the article (@code{gnus-summary-goto-subject}).
4867 @end table
4868
4869 If Gnus asks you to press a key to confirm going to the next group, you
4870 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4871 buffer, searching for the next group to read without actually returning
4872 to the group buffer.
4873
4874 Variables related to summary movement:
4875
4876 @table @code
4877
4878 @vindex gnus-auto-select-next
4879 @item gnus-auto-select-next
4880 If you issue one of the movement commands (like @kbd{n}) and there are
4881 no more unread articles after the current one, Gnus will offer to go to
4882 the next group.  If this variable is @code{t} and the next group is
4883 empty, Gnus will exit summary mode and return to the group buffer.  If
4884 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4885 next group with unread articles.  As a special case, if this variable
4886 is @code{quietly}, Gnus will select the next group without asking for
4887 confirmation.  If this variable is @code{almost-quietly}, the same
4888 will happen only if you are located on the last article in the group.
4889 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4890 command will go to the next group without confirmation.  Also
4891 @pxref{Group Levels}.
4892
4893 @item gnus-auto-select-same
4894 @vindex gnus-auto-select-same
4895 If non-@code{nil}, all the movement commands will try to go to the next
4896 article with the same subject as the current.  (@dfn{Same} here might
4897 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4898 for details (@pxref{Customizing Threading}).)  If there are no more
4899 articles with the same subject, go to the first unread article.
4900
4901 This variable is not particularly useful if you use a threaded display.
4902
4903 @item gnus-summary-check-current
4904 @vindex gnus-summary-check-current
4905 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4906 to the next (or previous) article if the current article is unread.
4907 Instead, they will choose the current article.
4908
4909 @item gnus-auto-center-summary
4910 @vindex gnus-auto-center-summary
4911 If non-@code{nil}, Gnus will keep the point in the summary buffer
4912 centered at all times.  This makes things quite tidy, but if you have a
4913 slow network connection, or simply do not like this un-Emacsism, you can
4914 set this variable to @code{nil} to get the normal Emacs scrolling
4915 action.  This will also inhibit horizontal re-centering of the summary
4916 buffer, which might make it more inconvenient to read extremely long
4917 threads.
4918
4919 This variable can also be a number.  In that case, center the window at
4920 the given number of lines from the top.
4921
4922 @end table
4923
4924
4925 @node Choosing Articles
4926 @section Choosing Articles
4927 @cindex selecting articles
4928
4929 @menu
4930 * Choosing Commands::           Commands for choosing articles.
4931 * Choosing Variables::          Variables that influence these commands.
4932 @end menu
4933
4934
4935 @node Choosing Commands
4936 @subsection Choosing Commands
4937
4938 None of the following movement commands understand the numeric prefix,
4939 and they all select and display an article.
4940
4941 If you want to fetch new articles or redisplay the group, see
4942 @ref{Exiting the Summary Buffer}.
4943
4944 @table @kbd
4945 @item SPACE
4946 @kindex SPACE (Summary)
4947 @findex gnus-summary-next-page
4948 Select the current article, or, if that one's read already, the next
4949 unread article (@code{gnus-summary-next-page}).
4950
4951 If you have an article window open already and you press @kbd{SPACE}
4952 again, the article will be scrolled.  This lets you conveniently
4953 @kbd{SPACE} through an entire newsgroup.  @pxref{Paging the Article}.
4954
4955 @item G n
4956 @itemx n
4957 @kindex n (Summary)
4958 @kindex G n (Summary)
4959 @findex gnus-summary-next-unread-article
4960 @c @icon{gnus-summary-next-unread}
4961 Go to next unread article (@code{gnus-summary-next-unread-article}).
4962
4963 @item G p
4964 @itemx p
4965 @kindex p (Summary)
4966 @findex gnus-summary-prev-unread-article
4967 @c @icon{gnus-summary-prev-unread}
4968 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4969
4970 @item G N
4971 @itemx N
4972 @kindex N (Summary)
4973 @kindex G N (Summary)
4974 @findex gnus-summary-next-article
4975 Go to the next article (@code{gnus-summary-next-article}).
4976
4977 @item G P
4978 @itemx P
4979 @kindex P (Summary)
4980 @kindex G P (Summary)
4981 @findex gnus-summary-prev-article
4982 Go to the previous article (@code{gnus-summary-prev-article}).
4983
4984 @item G C-n
4985 @kindex G C-n (Summary)
4986 @findex gnus-summary-next-same-subject
4987 Go to the next article with the same subject
4988 (@code{gnus-summary-next-same-subject}).
4989
4990 @item G C-p
4991 @kindex G C-p (Summary)
4992 @findex gnus-summary-prev-same-subject
4993 Go to the previous article with the same subject
4994 (@code{gnus-summary-prev-same-subject}).
4995
4996 @item G f
4997 @itemx .
4998 @kindex G f  (Summary)
4999 @kindex .  (Summary)
5000 @findex gnus-summary-first-unread-article
5001 Go to the first unread article
5002 (@code{gnus-summary-first-unread-article}).
5003
5004 @item G b
5005 @itemx ,
5006 @kindex G b (Summary)
5007 @kindex , (Summary)
5008 @findex gnus-summary-best-unread-article
5009 Go to the unread article with the highest score
5010 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5011 go to the first unread article that has a score over the default score.
5012
5013 @item G l
5014 @itemx l
5015 @kindex l (Summary)
5016 @kindex G l (Summary)
5017 @findex gnus-summary-goto-last-article
5018 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5019
5020 @item G o
5021 @kindex G o (Summary)
5022 @findex gnus-summary-pop-article
5023 @cindex history
5024 @cindex article history
5025 Pop an article off the summary history and go to this article
5026 (@code{gnus-summary-pop-article}).  This command differs from the
5027 command above in that you can pop as many previous articles off the
5028 history as you like, while @kbd{l} toggles the two last read articles.
5029 For a somewhat related issue (if you use these commands a lot),
5030 @pxref{Article Backlog}.
5031
5032 @item G j
5033 @itemx j
5034 @kindex j (Summary)
5035 @kindex G j (Summary)
5036 @findex gnus-summary-goto-article
5037 Ask for an article number or @code{Message-ID}, and then go to that
5038 article (@code{gnus-summary-goto-article}).
5039
5040 @end table
5041
5042
5043 @node Choosing Variables
5044 @subsection Choosing Variables
5045
5046 Some variables relevant for moving and selecting articles:
5047
5048 @table @code
5049 @item gnus-auto-extend-newsgroup
5050 @vindex gnus-auto-extend-newsgroup
5051 All the movement commands will try to go to the previous (or next)
5052 article, even if that article isn't displayed in the Summary buffer if
5053 this variable is non-@code{nil}.  Gnus will then fetch the article from
5054 the server and display it in the article buffer.
5055
5056 @item gnus-select-article-hook
5057 @vindex gnus-select-article-hook
5058 This hook is called whenever an article is selected.  By default it
5059 exposes any threads hidden under the selected article.  If you would 
5060 like each article to be saved in the Agent as you read it, putting
5061 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5062
5063 @item gnus-mark-article-hook
5064 @vindex gnus-mark-article-hook
5065 @findex gnus-summary-mark-unread-as-read
5066 @findex gnus-summary-mark-read-and-unread-as-read
5067 @findex gnus-unread-mark
5068 This hook is called whenever an article is selected.  It is intended to
5069 be used for marking articles as read.  The default value is
5070 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5071 mark of almost any article you read to @code{gnus-unread-mark}.  The
5072 only articles not affected by this function are ticked, dormant, and
5073 expirable articles.  If you'd instead like to just have unread articles
5074 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5075 instead.  It will leave marks like @code{gnus-low-score-mark},
5076 @code{gnus-del-mark} (and so on) alone.
5077
5078 @end table
5079
5080
5081 @node Paging the Article
5082 @section Scrolling the Article
5083 @cindex article scrolling
5084
5085 @table @kbd
5086
5087 @item SPACE
5088 @kindex SPACE (Summary)
5089 @findex gnus-summary-next-page
5090 Pressing @kbd{SPACE} will scroll the current article forward one page,
5091 or, if you have come to the end of the current article, will choose the
5092 next article (@code{gnus-summary-next-page}).
5093
5094 @vindex gnus-article-boring-faces
5095 @vindex gnus-article-skip-boring
5096 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5097 the article consists only of citations and signature, then it will be
5098 skipped; the next article will be shown instead.  You can customize
5099 what is considered uninteresting with
5100 @code{gnus-article-boring-faces}.  You can manually view the article's
5101 pages, no matter how boring, using @kbd{C-M-v}.
5102
5103 @item DEL
5104 @kindex DEL (Summary)
5105 @findex gnus-summary-prev-page
5106 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5107
5108 @item RET
5109 @kindex RET (Summary)
5110 @findex gnus-summary-scroll-up
5111 Scroll the current article one line forward
5112 (@code{gnus-summary-scroll-up}).
5113
5114 @item M-RET
5115 @kindex M-RET (Summary)
5116 @findex gnus-summary-scroll-down
5117 Scroll the current article one line backward
5118 (@code{gnus-summary-scroll-down}).
5119
5120 @item A g
5121 @itemx g
5122 @kindex A g (Summary)
5123 @kindex g (Summary)
5124 @findex gnus-summary-show-article
5125 @vindex gnus-summary-show-article-charset-alist
5126 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5127 given a prefix, fetch the current article, but don't run any of the
5128 article treatment functions.  This will give you a ``raw'' article, just
5129 the way it came from the server.
5130
5131 If given a numerical prefix, you can do semi-manual charset stuff.
5132 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5133 encoded in the @code{cn-gb-2312} charset.  If you have
5134
5135 @lisp
5136 (setq gnus-summary-show-article-charset-alist
5137       '((1 . cn-gb-2312)
5138         (2 . big5)))
5139 @end lisp
5140
5141 then you can say @kbd{C-u 1 g} to get the same effect.
5142
5143 @item A <
5144 @itemx <
5145 @kindex < (Summary)
5146 @kindex A < (Summary)
5147 @findex gnus-summary-beginning-of-article
5148 Scroll to the beginning of the article
5149 (@code{gnus-summary-beginning-of-article}).
5150
5151 @item A >
5152 @itemx >
5153 @kindex > (Summary)
5154 @kindex A > (Summary)
5155 @findex gnus-summary-end-of-article
5156 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5157
5158 @item A s
5159 @itemx s
5160 @kindex A s (Summary)
5161 @kindex s (Summary)
5162 @findex gnus-summary-isearch-article
5163 Perform an isearch in the article buffer
5164 (@code{gnus-summary-isearch-article}).
5165
5166 @item h
5167 @kindex h (Summary)
5168 @findex gnus-summary-select-article-buffer
5169 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5170
5171 @end table
5172
5173
5174 @node Reply Followup and Post
5175 @section Reply, Followup and Post
5176
5177 @menu
5178 * Summary Mail Commands::       Sending mail.
5179 * Summary Post Commands::       Sending news.
5180 * Summary Message Commands::    Other Message-related commands.
5181 * Canceling and Superseding::   
5182 @end menu
5183
5184
5185 @node Summary Mail Commands
5186 @subsection Summary Mail Commands
5187 @cindex mail
5188 @cindex composing mail
5189
5190 Commands for composing a mail message:
5191
5192 @table @kbd
5193
5194 @item S r
5195 @itemx r
5196 @kindex S r (Summary)
5197 @kindex r (Summary)
5198 @findex gnus-summary-reply
5199 @c @icon{gnus-summary-mail-reply}
5200 @c @icon{gnus-summary-reply}
5201 Mail a reply to the author of the current article
5202 (@code{gnus-summary-reply}).
5203
5204 @item S R
5205 @itemx R
5206 @kindex R (Summary)
5207 @kindex S R (Summary)
5208 @findex gnus-summary-reply-with-original
5209 @c @icon{gnus-summary-reply-with-original}
5210 Mail a reply to the author of the current article and include the
5211 original message (@code{gnus-summary-reply-with-original}).  This
5212 command uses the process/prefix convention.
5213
5214 @item S w
5215 @kindex S w (Summary)
5216 @findex gnus-summary-wide-reply
5217 Mail a wide reply to the author of the current article
5218 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5219 goes out to all people listed in the @code{To}, @code{From} (or
5220 @code{Reply-to}) and @code{Cc} headers.
5221
5222 @item S W
5223 @kindex S W (Summary)
5224 @findex gnus-summary-wide-reply-with-original
5225 Mail a wide reply to the current article and include the original
5226 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5227 the process/prefix convention.
5228
5229 @item S v
5230 @kindex S v (Summary)
5231 @findex gnus-summary-very-wide-reply
5232 Mail a very wide reply to the author of the current article
5233 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5234 that goes out to all people listed in the @code{To}, @code{From} (or
5235 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5236 articles.  This command uses the process/prefix convention.
5237
5238 @item S V
5239 @kindex S V (Summary)
5240 @findex gnus-summary-very-wide-reply-with-original
5241 Mail a very wide reply to the author of the current article and include the
5242 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5243 command uses the process/prefix convention.
5244
5245 @item S B r
5246 @kindex S B r (Summary)
5247 @findex gnus-summary-reply-broken-reply-to
5248 Mail a reply to the author of the current article but ignore the
5249 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5250 If you need this because a mailing list incorrectly sets a
5251 @code{Reply-To} header pointing to the list, you probably want to set
5252 the @code{broken-reply-to} group parameter instead, so things will work
5253 correctly.  @xref{Group Parameters}.
5254
5255 @item S B R
5256 @kindex S B R (Summary)
5257 @findex gnus-summary-reply-broken-reply-to-with-original
5258 Mail a reply to the author of the current article and include the
5259 original message but ignore the @code{Reply-To} field
5260 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5261
5262 @item S o m
5263 @itemx C-c C-f
5264 @kindex S o m (Summary)
5265 @kindex C-c C-f (Summary)
5266 @findex gnus-summary-mail-forward
5267 @c @icon{gnus-summary-mail-forward}
5268 Forward the current article to some other person
5269 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5270 is forwarded according to the value of (@code{message-forward-as-mime})
5271 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5272 message and forward directly inline; if the prefix is 2, forward message
5273 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5274 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5275 directly inline; otherwise, the message is forwarded as no prefix given
5276 but use the flipped value of (@code{message-forward-as-mime}).  By
5277 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5278 section.
5279
5280 @item S m
5281 @itemx m
5282 @kindex m (Summary)
5283 @kindex S m (Summary)
5284 @findex gnus-summary-mail-other-window
5285 @c @icon{gnus-summary-mail-originate}
5286 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5287 the posting style of the current group.  If given a prefix, disable that.
5288 If the prefix is 1, prompt for a group name to find the posting style.
5289
5290 @item S i
5291 @itemx i
5292 @kindex i (Summary)
5293 @kindex S i (Summary)
5294 @findex gnus-summary-news-other-window
5295 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5296 post to the current group.  If given a prefix, disable that.  If the
5297 prefix is 1, prompt for a group to post to.
5298
5299 This function actually prepares a news even when using mail groups.
5300 This is useful for ``posting'' messages to mail groups without actually
5301 sending them over the network: they're just saved directly to the group
5302 in question.  The corresponding back end must have a request-post method
5303 for this to work though.
5304
5305 @item S D b
5306 @kindex S D b (Summary)
5307 @findex gnus-summary-resend-bounced-mail
5308 @cindex bouncing mail
5309 If you have sent a mail, but the mail was bounced back to you for some
5310 reason (wrong address, transient failure), you can use this command to
5311 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5312 will be popped into a mail buffer where you can edit the headers before
5313 sending the mail off again.  If you give a prefix to this command, and
5314 the bounced mail is a reply to some other mail, Gnus will try to fetch
5315 that mail and display it for easy perusal of its headers.  This might
5316 very well fail, though.
5317
5318 @item S D r
5319 @kindex S D r (Summary)
5320 @findex gnus-summary-resend-message
5321 Not to be confused with the previous command,
5322 @code{gnus-summary-resend-message} will prompt you for an address to
5323 send the current message off to, and then send it to that place.  The
5324 headers of the message won't be altered---but lots of headers that say
5325 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5326 means that you actually send a mail to someone that has a @code{To}
5327 header that (probably) points to yourself.  This will confuse people.
5328 So, natcherly you'll only do that if you're really eVIl.
5329
5330 This command is mainly used if you have several accounts and want to
5331 ship a mail to a different account of yours.  (If you're both
5332 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5333 to the @code{root} account, you may want to resend it to
5334 @code{postmaster}.  Ordnung muss sein!
5335
5336 This command understands the process/prefix convention
5337 (@pxref{Process/Prefix}).
5338
5339 @item S O m
5340 @kindex S O m (Summary)
5341 @findex gnus-uu-digest-mail-forward
5342 Digest the current series (@pxref{Decoding Articles}) and forward the
5343 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5344 uses the process/prefix convention (@pxref{Process/Prefix}).
5345
5346 @item S M-c
5347 @kindex S M-c (Summary)
5348 @findex gnus-summary-mail-crosspost-complaint
5349 @cindex crossposting
5350 @cindex excessive crossposting
5351 Send a complaint about excessive crossposting to the author of the
5352 current article (@code{gnus-summary-mail-crosspost-complaint}).
5353
5354 @findex gnus-crosspost-complaint
5355 This command is provided as a way to fight back against the current
5356 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5357 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5358 command understands the process/prefix convention
5359 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5360
5361 @end table
5362
5363 Also @xref{Header Commands, ,Header Commands, message, The Message
5364 Manual}, for more information.
5365
5366
5367 @node Summary Post Commands
5368 @subsection Summary Post Commands
5369 @cindex post
5370 @cindex composing news
5371
5372 Commands for posting a news article:
5373
5374 @table @kbd
5375 @item S p
5376 @itemx a
5377 @kindex a (Summary)
5378 @kindex S p (Summary)
5379 @findex gnus-summary-post-news
5380 @c @icon{gnus-summary-post-news}
5381 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5382 default, post to the current group.  If given a prefix, disable that.
5383 If the prefix is 1, prompt for another group instead.
5384
5385 @item S f
5386 @itemx f
5387 @kindex f (Summary)
5388 @kindex S f (Summary)
5389 @findex gnus-summary-followup
5390 @c @icon{gnus-summary-followup}
5391 Post a followup to the current article (@code{gnus-summary-followup}).
5392
5393 @item S F
5394 @itemx F
5395 @kindex S F (Summary)
5396 @kindex F (Summary)
5397 @c @icon{gnus-summary-followup-with-original}
5398 @findex gnus-summary-followup-with-original
5399 Post a followup to the current article and include the original message
5400 (@code{gnus-summary-followup-with-original}).   This command uses the
5401 process/prefix convention.
5402
5403 @item S n
5404 @kindex S n (Summary)
5405 @findex gnus-summary-followup-to-mail
5406 Post a followup to the current article via news, even if you got the
5407 message through mail (@code{gnus-summary-followup-to-mail}).
5408
5409 @item S N
5410 @kindex S N (Summary)
5411 @findex gnus-summary-followup-to-mail-with-original
5412 Post a followup to the current article via news, even if you got the
5413 message through mail and include the original message
5414 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5415 the process/prefix convention.
5416
5417 @item S o p
5418 @kindex S o p (Summary)
5419 @findex gnus-summary-post-forward
5420 Forward the current article to a newsgroup
5421 (@code{gnus-summary-post-forward}).
5422  If no prefix is given, the message is forwarded according to the value
5423 of (@code{message-forward-as-mime}) and
5424 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5425 message and forward directly inline; if the prefix is 2, forward message
5426 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5427 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5428 directly inline; otherwise, the message is forwarded as no prefix given
5429 but use the flipped value of (@code{message-forward-as-mime}).  By
5430 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5431
5432 @item S O p
5433 @kindex S O p (Summary)
5434 @findex gnus-uu-digest-post-forward
5435 @cindex digests
5436 @cindex making digests
5437 Digest the current series and forward the result to a newsgroup
5438 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5439 process/prefix convention.
5440
5441 @item S u
5442 @kindex S u (Summary)
5443 @findex gnus-uu-post-news
5444 @c @icon{gnus-uu-post-news}
5445 Uuencode a file, split it into parts, and post it as a series
5446 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5447 @end table
5448
5449 Also @xref{Header Commands, ,Header Commands, message, The Message
5450 Manual}, for more information.
5451
5452
5453 @node Summary Message Commands
5454 @subsection Summary Message Commands
5455
5456 @table @kbd
5457 @item S y
5458 @kindex S y (Summary)
5459 @findex gnus-summary-yank-message
5460 Yank the current article into an already existing Message composition
5461 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5462 what message buffer you want to yank into, and understands the
5463 process/prefix convention (@pxref{Process/Prefix}).
5464
5465 @end table
5466
5467
5468 @node Canceling and Superseding
5469 @subsection Canceling Articles
5470 @cindex canceling articles
5471 @cindex superseding articles
5472
5473 Have you ever written something, and then decided that you really,
5474 really, really wish you hadn't posted that?
5475
5476 Well, you can't cancel mail, but you can cancel posts.
5477
5478 @findex gnus-summary-cancel-article
5479 @kindex C (Summary)
5480 @c @icon{gnus-summary-cancel-article}
5481 Find the article you wish to cancel (you can only cancel your own
5482 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5483 c} (@code{gnus-summary-cancel-article}).  Your article will be
5484 canceled---machines all over the world will be deleting your article.
5485 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5486
5487 Be aware, however, that not all sites honor cancels, so your article may
5488 live on here and there, while most sites will delete the article in
5489 question.
5490
5491 Gnus will use the ``current'' select method when canceling.  If you
5492 want to use the standard posting method, use the @samp{a} symbolic
5493 prefix (@pxref{Symbolic Prefixes}).
5494
5495 If you discover that you have made some mistakes and want to do some
5496 corrections, you can post a @dfn{superseding} article that will replace
5497 your original article.
5498
5499 @findex gnus-summary-supersede-article
5500 @kindex S (Summary)
5501 Go to the original article and press @kbd{S s}
5502 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5503 where you can edit the article all you want before sending it off the
5504 usual way.
5505
5506 The same goes for superseding as for canceling, only more so: Some
5507 sites do not honor superseding.  On those sites, it will appear that you
5508 have posted almost the same article twice.
5509
5510 If you have just posted the article, and change your mind right away,
5511 there is a trick you can use to cancel/supersede the article without
5512 waiting for the article to appear on your site first.  You simply return
5513 to the post buffer (which is called @code{*sent ...*}).  There you will
5514 find the article you just posted, with all the headers intact.  Change
5515 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5516 header by substituting one of those words for the word
5517 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5518 you would do normally.  The previous article will be
5519 canceled/superseded.
5520
5521 Just remember, kids: There is no 'c' in 'supersede'.
5522
5523 @node Delayed Articles
5524 @section Delayed Articles
5525 @cindex delayed sending
5526 @cindex send delayed
5527
5528 Sometimes, you might wish to delay the sending of a message.  For
5529 example, you might wish to arrange for a message to turn up just in time
5530 to remind your about the birthday of your Significant Other.  For this,
5531 there is the @code{gnus-delay} package.  Setup is simple:
5532
5533 @lisp
5534 (gnus-delay-initialize)
5535 @end lisp
5536
5537 @findex gnus-delay-article
5538 Normally, to send a message you use the @kbd{C-c C-c} command from
5539 Message mode.  To delay a message, use @kbd{C-c C-j}
5540 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5541 message should be delayed.  Possible answers are:
5542
5543 @itemize @bullet
5544 @item
5545 A time span.  Consists of an integer and a letter.  For example,
5546 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5547 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5548 (months) and @code{Y} (years).
5549
5550 @item
5551 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5552 delayed until that day, at a specific time (eight o'clock by default).
5553 See also @code{gnus-delay-default-hour}.
5554
5555 @item
5556 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5557 stuff.  The deadline will be at that time today, except if that time has
5558 already passed, then it's at the given time tomorrow.  So if it's ten
5559 o'clock in the morning and you specify @code{11:15}, then the deadline
5560 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5561 that means a time tomorrow.
5562 @end itemize
5563
5564 The action of the @code{gnus-delay-article} command is influenced by a
5565 couple of variables:
5566
5567 @table @code
5568 @item gnus-delay-default-hour
5569 @vindex gnus-delay-default-hour
5570 When you specify a specific date, the message will be due on that hour
5571 on the given date.  Possible values are integers 0 through 23.
5572
5573 @item gnus-delay-default-delay
5574 @vindex gnus-delay-default-delay
5575 This is a string and gives the default delay.  It can be of any of the
5576 formats described above.
5577
5578 @item gnus-delay-group
5579 @vindex gnus-delay-group
5580 Delayed articles will be kept in this group on the drafts server until
5581 they are due.  You probably don't need to change this.  The default
5582 value is @code{"delayed"}.
5583
5584 @item gnus-delay-header
5585 @vindex gnus-delay-header
5586 The deadline for each article will be stored in a header.  This variable
5587 is a string and gives the header name.  You probably don't need to
5588 change this.  The default value is @code{"X-Gnus-Delayed"}.
5589 @end table
5590
5591 The way delaying works is like this: when you use the
5592 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5593 calculates the deadline of the message and stores it in the
5594 @code{X-Gnus-Delayed} header and puts the message in the
5595 @code{nndraft:delayed} group.
5596
5597 @findex gnus-delay-send-queue
5598 And whenever you get new news, Gnus looks through the group for articles
5599 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5600 function for this.  By default, this function is added to the hook
5601 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5602 Maybe you want to use the demon to send drafts?  Just tell the demon to
5603 execute the @code{gnus-delay-send-queue} function.
5604
5605 @table @code
5606 @item gnus-delay-initialize
5607 @findex gnus-delay-initialize
5608 By default, this function installs @code{gnus-delay-send-queue} in
5609 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5610 argument @code{no-check}.  If it is non-@code{nil},
5611 @code{gnus-get-new-news-hook} is not changed.  The optional first
5612 argument is ignored.
5613
5614 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5615 Presumably, you want to use the demon for sending due delayed articles.
5616 Just don't forget to set that up :-)
5617 @end table
5618
5619
5620 @node Marking Articles
5621 @section Marking Articles
5622 @cindex article marking
5623 @cindex article ticking
5624 @cindex marks
5625
5626 There are several marks you can set on an article.
5627
5628 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5629 neologism ohoy!) of the article.  Alphabetic marks generally mean
5630 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5631
5632 In addition, you also have marks that do not affect readedness.
5633
5634 @menu
5635 * Unread Articles::             Marks for unread articles.
5636 * Read Articles::               Marks for read articles.
5637 * Other Marks::                 Marks that do not affect readedness.
5638 @end menu
5639
5640 @ifinfo
5641 There's a plethora of commands for manipulating these marks:
5642 @end ifinfo
5643
5644 @menu
5645 * Setting Marks::             How to set and remove marks.
5646 * Generic Marking Commands::  How to customize the marking.
5647 * Setting Process Marks::     How to mark articles for later processing.
5648 @end menu
5649
5650
5651 @node Unread Articles
5652 @subsection Unread Articles
5653
5654 The following marks mark articles as (kinda) unread, in one form or
5655 other.
5656
5657 @table @samp
5658 @item !
5659 @vindex gnus-ticked-mark
5660 Marked as ticked (@code{gnus-ticked-mark}).
5661
5662 @dfn{Ticked articles} are articles that will remain visible always.  If
5663 you see an article that you find interesting, or you want to put off
5664 reading it, or replying to it, until sometime later, you'd typically
5665 tick it.  However, articles can be expired (from news servers by the
5666 news server software, Gnus itself never expires ticked messages), so if
5667 you want to keep an article forever, you'll have to make it persistent
5668 (@pxref{Persistent Articles}).
5669
5670 @item ?
5671 @vindex gnus-dormant-mark
5672 Marked as dormant (@code{gnus-dormant-mark}).
5673
5674 @dfn{Dormant articles} will only appear in the summary buffer if there
5675 are followups to it.  If you want to see them even if they don't have
5676 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5677 Otherwise (except for the visibility issue), they are just like ticked
5678 messages.
5679
5680 @item SPACE
5681 @vindex gnus-unread-mark
5682 Marked as unread (@code{gnus-unread-mark}).
5683
5684 @dfn{Unread articles} are articles that haven't been read at all yet.
5685 @end table
5686
5687
5688 @node Read Articles
5689 @subsection Read Articles
5690 @cindex expirable mark
5691
5692 All the following marks mark articles as read.
5693
5694 @table @samp
5695
5696 @item r
5697 @vindex gnus-del-mark
5698 These are articles that the user has marked as read with the @kbd{d}
5699 command manually, more or less (@code{gnus-del-mark}).
5700
5701 @item R
5702 @vindex gnus-read-mark
5703 Articles that have actually been read (@code{gnus-read-mark}).
5704
5705 @item O
5706 @vindex gnus-ancient-mark
5707 Articles that were marked as read in previous sessions and are now
5708 @dfn{old} (@code{gnus-ancient-mark}).
5709
5710 @item K
5711 @vindex gnus-killed-mark
5712 Marked as killed (@code{gnus-killed-mark}).
5713
5714 @item X
5715 @vindex gnus-kill-file-mark
5716 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5717
5718 @item Y
5719 @vindex gnus-low-score-mark
5720 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5721
5722 @item C
5723 @vindex gnus-catchup-mark
5724 Marked as read by a catchup (@code{gnus-catchup-mark}).
5725
5726 @item G
5727 @vindex gnus-canceled-mark
5728 Canceled article (@code{gnus-canceled-mark})
5729
5730 @item F
5731 @vindex gnus-souped-mark
5732 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5733
5734 @item Q
5735 @vindex gnus-sparse-mark
5736 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5737 Threading}.
5738
5739 @item M
5740 @vindex gnus-duplicate-mark
5741 Article marked as read by duplicate suppression
5742 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5743
5744 @end table
5745
5746 All these marks just mean that the article is marked as read, really.
5747 They are interpreted differently when doing adaptive scoring, though.
5748
5749 One more special mark, though:
5750
5751 @table @samp
5752 @item E
5753 @vindex gnus-expirable-mark
5754 Marked as expirable (@code{gnus-expirable-mark}).
5755
5756 Marking articles as @dfn{expirable} (or have them marked as such
5757 automatically) doesn't make much sense in normal groups---a user doesn't
5758 control expiring of news articles, but in mail groups, for instance,
5759 articles marked as @dfn{expirable} can be deleted by Gnus at
5760 any time.
5761 @end table
5762
5763
5764 @node Other Marks
5765 @subsection Other Marks
5766 @cindex process mark
5767 @cindex bookmarks
5768
5769 There are some marks that have nothing to do with whether the article is
5770 read or not.
5771
5772 @itemize @bullet
5773
5774 @item
5775 You can set a bookmark in the current article.  Say you are reading a
5776 long thesis on cats' urinary tracts, and have to go home for dinner
5777 before you've finished reading the thesis.  You can then set a bookmark
5778 in the article, and Gnus will jump to this bookmark the next time it
5779 encounters the article.  @xref{Setting Marks}.
5780
5781 @item
5782 @vindex gnus-replied-mark
5783 All articles that you have replied to or made a followup to (i.e., have
5784 answered) will be marked with an @samp{A} in the second column
5785 (@code{gnus-replied-mark}).
5786
5787 @item
5788 @vindex gnus-forwarded-mark
5789 All articles that you have forwarded will be marked with an @samp{F} in
5790 the second column (@code{gnus-forwarded-mark}).
5791
5792 @item
5793 @vindex gnus-cached-mark
5794 Articles stored in the article cache will be marked with an @samp{*} in
5795 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5796
5797 @item
5798 @vindex gnus-saved-mark
5799 Articles ``saved'' (in some manner or other; not necessarily
5800 religiously) are marked with an @samp{S} in the second column
5801 (@code{gnus-saved-mark}).
5802
5803 @item
5804 @vindex gnus-recent-mark
5805 Articles that according to the server haven't been shown to the user
5806 before are marked with a @samp{N} in the second column
5807 (@code{gnus-recent-mark}).  Note that not all servers support this
5808 mark, in which case it simply never appears. Compare with
5809 @code{gnus-unseen-mark}.
5810
5811 @item
5812 @vindex gnus-unseen-mark
5813 Articles that haven't been seen before in Gnus by the user are marked
5814 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5815 Compare with @code{gnus-recent-mark}.
5816
5817 @item
5818 @vindex gnus-downloaded-mark
5819 When using the Gnus agent @pxref{Agent Basics}, articles may be
5820 downloaded for unplugged (offline) viewing.  If you are using the
5821 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5822 (The variable @code{gnus-downloaded-mark} controls which character to
5823 use.)
5824
5825 @item
5826 @vindex gnus-undownloaded-mark
5827 When using the Gnus agent @pxref{Agent Basics}, some articles might
5828 not have been downloaded.  Such articles cannot be viewed while you
5829 are unplugged (offline).  If you are using the @samp{%O} spec, these
5830 articles get the @samp{-} mark in that spec.  (The variable
5831 @code{gnus-undownloaded-mark} controls which character to use.)
5832
5833 @item
5834 @vindex gnus-downloadable-mark
5835 The Gnus agent @pxref{Agent Basics} downloads some articles
5836 automatically, but it is also possible to explicitly mark articles for
5837 download, even if they would not be downloaded automatically.  Such
5838 explicitly-marked articles get the @samp{%} mark in the first column.
5839 (The variable @code{gnus-downloadable-mark} controls which character to
5840 use.)
5841
5842 @item
5843 @vindex gnus-not-empty-thread-mark
5844 @vindex gnus-empty-thread-mark
5845 If the @samp{%e} spec is used, the presence of threads or not will be
5846 marked with @code{gnus-not-empty-thread-mark} and
5847 @code{gnus-empty-thread-mark} in the third column, respectively.
5848
5849 @item
5850 @vindex gnus-process-mark
5851 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5852 variety of commands react to the presence of the process mark.  For
5853 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5854 all articles that have been marked with the process mark.  Articles
5855 marked with the process mark have a @samp{#} in the second column.
5856
5857 @end itemize
5858
5859 You might have noticed that most of these ``non-readedness'' marks
5860 appear in the second column by default.  So if you have a cached, saved,
5861 replied article that you have process-marked, what will that look like?
5862
5863 Nothing much.  The precedence rules go as follows: process -> cache ->
5864 replied -> saved.  So if the article is in the cache and is replied,
5865 you'll only see the cache mark and not the replied mark.
5866
5867
5868 @node Setting Marks
5869 @subsection Setting Marks
5870 @cindex setting marks
5871
5872 All the marking commands understand the numeric prefix.
5873
5874 @table @kbd
5875 @item M c
5876 @itemx M-u
5877 @kindex M c (Summary)
5878 @kindex M-u (Summary)
5879 @findex gnus-summary-clear-mark-forward
5880 @cindex mark as unread
5881 Clear all readedness-marks from the current article
5882 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5883 article as unread.
5884
5885 @item M t
5886 @itemx !
5887 @kindex ! (Summary)
5888 @kindex M t (Summary)
5889 @findex gnus-summary-tick-article-forward
5890 Tick the current article (@code{gnus-summary-tick-article-forward}).
5891 @xref{Article Caching}.
5892
5893 @item M ?
5894 @itemx ?
5895 @kindex ? (Summary)
5896 @kindex M ? (Summary)
5897 @findex gnus-summary-mark-as-dormant
5898 Mark the current article as dormant
5899 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5900
5901 @item M d
5902 @itemx d
5903 @kindex M d (Summary)
5904 @kindex d (Summary)
5905 @findex gnus-summary-mark-as-read-forward
5906 Mark the current article as read
5907 (@code{gnus-summary-mark-as-read-forward}).
5908
5909 @item D
5910 @kindex D (Summary)
5911 @findex gnus-summary-mark-as-read-backward
5912 Mark the current article as read and move point to the previous line
5913 (@code{gnus-summary-mark-as-read-backward}).
5914
5915 @item M k
5916 @itemx k
5917 @kindex k (Summary)
5918 @kindex M k (Summary)
5919 @findex gnus-summary-kill-same-subject-and-select
5920 Mark all articles that have the same subject as the current one as read,
5921 and then select the next unread article
5922 (@code{gnus-summary-kill-same-subject-and-select}).
5923
5924 @item M K
5925 @itemx C-k
5926 @kindex M K (Summary)
5927 @kindex C-k (Summary)
5928 @findex gnus-summary-kill-same-subject
5929 Mark all articles that have the same subject as the current one as read
5930 (@code{gnus-summary-kill-same-subject}).
5931
5932 @item M C
5933 @kindex M C (Summary)
5934 @findex gnus-summary-catchup
5935 @c @icon{gnus-summary-catchup}
5936 Mark all unread articles as read (@code{gnus-summary-catchup}).
5937
5938 @item M C-c
5939 @kindex M C-c (Summary)
5940 @findex gnus-summary-catchup-all
5941 Mark all articles in the group as read---even the ticked and dormant
5942 articles (@code{gnus-summary-catchup-all}).
5943
5944 @item M H
5945 @kindex M H (Summary)
5946 @findex gnus-summary-catchup-to-here
5947 Catchup the current group to point (before the point)
5948 (@code{gnus-summary-catchup-to-here}).
5949
5950 @item M h
5951 @kindex M h (Summary)
5952 @findex gnus-summary-catchup-from-here
5953 Catchup the current group from point (after the point)
5954 (@code{gnus-summary-catchup-from-here}).
5955
5956 @item C-w
5957 @kindex C-w (Summary)
5958 @findex gnus-summary-mark-region-as-read
5959 Mark all articles between point and mark as read
5960 (@code{gnus-summary-mark-region-as-read}).
5961
5962 @item M V k
5963 @kindex M V k (Summary)
5964 @findex gnus-summary-kill-below
5965 Kill all articles with scores below the default score (or below the
5966 numeric prefix) (@code{gnus-summary-kill-below}).
5967
5968 @item M e
5969 @itemx E
5970 @kindex M e (Summary)
5971 @kindex E (Summary)
5972 @findex gnus-summary-mark-as-expirable
5973 Mark the current article as expirable
5974 (@code{gnus-summary-mark-as-expirable}).
5975
5976 @item M b
5977 @kindex M b (Summary)
5978 @findex gnus-summary-set-bookmark
5979 Set a bookmark in the current article
5980 (@code{gnus-summary-set-bookmark}).
5981
5982 @item M B
5983 @kindex M B (Summary)
5984 @findex gnus-summary-remove-bookmark
5985 Remove the bookmark from the current article
5986 (@code{gnus-summary-remove-bookmark}).
5987
5988 @item M V c
5989 @kindex M V c (Summary)
5990 @findex gnus-summary-clear-above
5991 Clear all marks from articles with scores over the default score (or
5992 over the numeric prefix) (@code{gnus-summary-clear-above}).
5993
5994 @item M V u
5995 @kindex M V u (Summary)
5996 @findex gnus-summary-tick-above
5997 Tick all articles with scores over the default score (or over the
5998 numeric prefix) (@code{gnus-summary-tick-above}).
5999
6000 @item M V m
6001 @kindex M V m (Summary)
6002 @findex gnus-summary-mark-above
6003 Prompt for a mark, and mark all articles with scores over the default
6004 score (or over the numeric prefix) with this mark
6005 (@code{gnus-summary-clear-above}).
6006 @end table
6007
6008 @vindex gnus-summary-goto-unread
6009 The @code{gnus-summary-goto-unread} variable controls what action should
6010 be taken after setting a mark.  If non-@code{nil}, point will move to
6011 the next/previous unread article.  If @code{nil}, point will just move
6012 one line up or down.  As a special case, if this variable is
6013 @code{never}, all the marking commands as well as other commands (like
6014 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6015 The default is @code{t}.
6016
6017
6018 @node Generic Marking Commands
6019 @subsection Generic Marking Commands
6020
6021 Some people would like the command that ticks an article (@kbd{!}) go to
6022 the next article.  Others would like it to go to the next unread
6023 article.  Yet others would like it to stay on the current article.  And
6024 even though I haven't heard of anybody wanting it to go to the
6025 previous (unread) article, I'm sure there are people that want that as
6026 well.
6027
6028 Multiply these five behaviors with five different marking commands, and
6029 you get a potentially complex set of variable to control what each
6030 command should do.
6031
6032 To sidestep that mess, Gnus provides commands that do all these
6033 different things.  They can be found on the @kbd{M M} map in the summary
6034 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6035 to list in this manual.
6036
6037 While you can use these commands directly, most users would prefer
6038 altering the summary mode keymap.  For instance, if you would like the
6039 @kbd{!} command to go to the next article instead of the next unread
6040 article, you could say something like:
6041
6042 @lisp
6043 @group
6044 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6045 (defun my-alter-summary-map ()
6046   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6047 @end group
6048 @end lisp
6049
6050 @noindent
6051 or
6052
6053 @lisp
6054 (defun my-alter-summary-map ()
6055   (local-set-key "!" "MM!n"))
6056 @end lisp
6057
6058
6059 @node Setting Process Marks
6060 @subsection Setting Process Marks
6061 @cindex setting process marks
6062
6063 Process marks are displayed as @code{#} in the summary buffer, and are
6064 used for marking articles in such a way that other commands will
6065 process these articles.  For instance, if you process mark four
6066 articles and then use the @kbd{*} command, Gnus will enter these four
6067 commands into the cache.  For more information,
6068 @pxref{Process/Prefix}.
6069
6070 @table @kbd
6071
6072 @item M P p
6073 @itemx #
6074 @kindex # (Summary)
6075 @kindex M P p (Summary)
6076 @findex gnus-summary-mark-as-processable
6077 Mark the current article with the process mark
6078 (@code{gnus-summary-mark-as-processable}).
6079 @findex gnus-summary-unmark-as-processable
6080
6081 @item M P u
6082 @itemx M-#
6083 @kindex M P u (Summary)
6084 @kindex M-# (Summary)
6085 Remove the process mark, if any, from the current article
6086 (@code{gnus-summary-unmark-as-processable}).
6087
6088 @item M P U
6089 @kindex M P U (Summary)
6090 @findex gnus-summary-unmark-all-processable
6091 Remove the process mark from all articles
6092 (@code{gnus-summary-unmark-all-processable}).
6093
6094 @item M P i
6095 @kindex M P i (Summary)
6096 @findex gnus-uu-invert-processable
6097 Invert the list of process marked articles
6098 (@code{gnus-uu-invert-processable}).
6099
6100 @item M P R
6101 @kindex M P R (Summary)
6102 @findex gnus-uu-mark-by-regexp
6103 Mark articles that have a @code{Subject} header that matches a regular
6104 expression (@code{gnus-uu-mark-by-regexp}).
6105
6106 @item M P G
6107 @kindex M P G (Summary)
6108 @findex gnus-uu-unmark-by-regexp
6109 Unmark articles that have a @code{Subject} header that matches a regular
6110 expression (@code{gnus-uu-unmark-by-regexp}).
6111
6112 @item M P r
6113 @kindex M P r (Summary)
6114 @findex gnus-uu-mark-region
6115 Mark articles in region (@code{gnus-uu-mark-region}).
6116
6117 @item M P g
6118 @kindex M P g
6119 @findex gnus-uu-unmark-region
6120 Unmark articles in region (@code{gnus-uu-unmark-region}).
6121
6122 @item M P t
6123 @kindex M P t (Summary)
6124 @findex gnus-uu-mark-thread
6125 Mark all articles in the current (sub)thread
6126 (@code{gnus-uu-mark-thread}).
6127
6128 @item M P T
6129 @kindex M P T (Summary)
6130 @findex gnus-uu-unmark-thread
6131 Unmark all articles in the current (sub)thread
6132 (@code{gnus-uu-unmark-thread}).
6133
6134 @item M P v
6135 @kindex M P v (Summary)
6136 @findex gnus-uu-mark-over
6137 Mark all articles that have a score above the prefix argument
6138 (@code{gnus-uu-mark-over}).
6139
6140 @item M P s
6141 @kindex M P s (Summary)
6142 @findex gnus-uu-mark-series
6143 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6144
6145 @item M P S
6146 @kindex M P S (Summary)
6147 @findex gnus-uu-mark-sparse
6148 Mark all series that have already had some articles marked
6149 (@code{gnus-uu-mark-sparse}).
6150
6151 @item M P a
6152 @kindex M P a (Summary)
6153 @findex gnus-uu-mark-all
6154 Mark all articles in series order (@code{gnus-uu-mark-series}).
6155
6156 @item M P b
6157 @kindex M P b (Summary)
6158 @findex gnus-uu-mark-buffer
6159 Mark all articles in the buffer in the order they appear
6160 (@code{gnus-uu-mark-buffer}).
6161
6162 @item M P k
6163 @kindex M P k (Summary)
6164 @findex gnus-summary-kill-process-mark
6165 Push the current process mark set onto the stack and unmark all articles
6166 (@code{gnus-summary-kill-process-mark}).
6167
6168 @item M P y
6169 @kindex M P y (Summary)
6170 @findex gnus-summary-yank-process-mark
6171 Pop the previous process mark set from the stack and restore it
6172 (@code{gnus-summary-yank-process-mark}).
6173
6174 @item M P w
6175 @kindex M P w (Summary)
6176 @findex gnus-summary-save-process-mark
6177 Push the current process mark set onto the stack
6178 (@code{gnus-summary-save-process-mark}).
6179
6180 @end table
6181
6182 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6183 set process marks based on article body contents.
6184
6185
6186 @node Limiting
6187 @section Limiting
6188 @cindex limiting
6189
6190 It can be convenient to limit the summary buffer to just show some
6191 subset of the articles currently in the group.  The effect most limit
6192 commands have is to remove a few (or many) articles from the summary
6193 buffer.
6194
6195 All limiting commands work on subsets of the articles already fetched
6196 from the servers.  None of these commands query the server for
6197 additional articles.
6198
6199 @table @kbd
6200
6201 @item / /
6202 @itemx / s
6203 @kindex / / (Summary)
6204 @findex gnus-summary-limit-to-subject
6205 Limit the summary buffer to articles that match some subject
6206 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6207 matching articles.
6208
6209 @item / a
6210 @kindex / a (Summary)
6211 @findex gnus-summary-limit-to-author
6212 Limit the summary buffer to articles that match some author
6213 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6214 matching articles.
6215
6216 @item / x
6217 @kindex / x (Summary)
6218 @findex gnus-summary-limit-to-extra
6219 Limit the summary buffer to articles that match one of the ``extra''
6220 headers (@pxref{To From Newsgroups})
6221 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6222 matching articles.
6223
6224 @item / u
6225 @itemx x
6226 @kindex / u (Summary)
6227 @kindex x (Summary)
6228 @findex gnus-summary-limit-to-unread
6229 Limit the summary buffer to articles not marked as read
6230 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6231 buffer to articles strictly unread.  This means that ticked and
6232 dormant articles will also be excluded.
6233
6234 @item / m
6235 @kindex / m (Summary)
6236 @findex gnus-summary-limit-to-marks
6237 Ask for a mark and then limit to all articles that have been marked
6238 with that mark (@code{gnus-summary-limit-to-marks}).
6239
6240 @item / t
6241 @kindex / t (Summary)
6242 @findex gnus-summary-limit-to-age
6243 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6244 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6245 articles younger than that number of days.
6246
6247 @item / n
6248 @kindex / n (Summary)
6249 @findex gnus-summary-limit-to-articles
6250 Limit the summary buffer to the current article
6251 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6252 convention (@pxref{Process/Prefix}).
6253
6254 @item / w
6255 @kindex / w (Summary)
6256 @findex gnus-summary-pop-limit
6257 Pop the previous limit off the stack and restore it
6258 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6259 the stack.
6260
6261 @item / .
6262 @kindex / . (Summary)
6263 @findex gnus-summary-limit-to-unseen
6264 Limit the summary buffer to the unseen articles
6265 (@code{gnus-summary-limit-to-unseen}).
6266
6267 @item / v
6268 @kindex / v (Summary)
6269 @findex gnus-summary-limit-to-score
6270 Limit the summary buffer to articles that have a score at or above some
6271 score (@code{gnus-summary-limit-to-score}).
6272
6273 @item / p
6274 @kindex / p (Summary)
6275 @findex gnus-summary-limit-to-display-predicate
6276 Limit the summary buffer to articles that satisfy the @code{display}
6277 group parameter predicate
6278 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6279 Parameters} for more on this predicate.
6280
6281 @item / E
6282 @itemx M S
6283 @kindex M S (Summary)
6284 @kindex / E (Summary)
6285 @findex gnus-summary-limit-include-expunged
6286 Include all expunged articles in the limit
6287 (@code{gnus-summary-limit-include-expunged}).
6288
6289 @item / D
6290 @kindex / D (Summary)
6291 @findex gnus-summary-limit-include-dormant
6292 Include all dormant articles in the limit
6293 (@code{gnus-summary-limit-include-dormant}).
6294
6295 @item / *
6296 @kindex / * (Summary)
6297 @findex gnus-summary-limit-include-cached
6298 Include all cached articles in the limit
6299 (@code{gnus-summary-limit-include-cached}).
6300
6301 @item / d
6302 @kindex / d (Summary)
6303 @findex gnus-summary-limit-exclude-dormant
6304 Exclude all dormant articles from the limit
6305 (@code{gnus-summary-limit-exclude-dormant}).
6306
6307 @item / M
6308 @kindex / M (Summary)
6309 @findex gnus-summary-limit-exclude-marks
6310 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6311
6312 @item / T
6313 @kindex / T (Summary)
6314 @findex gnus-summary-limit-include-thread
6315 Include all the articles in the current thread in the limit.
6316
6317 @item / c
6318 @kindex / c (Summary)
6319 @findex gnus-summary-limit-exclude-childless-dormant
6320 Exclude all dormant articles that have no children from the limit@*
6321 (@code{gnus-summary-limit-exclude-childless-dormant}).
6322
6323 @item / C
6324 @kindex / C (Summary)
6325 @findex gnus-summary-limit-mark-excluded-as-read
6326 Mark all excluded unread articles as read
6327 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6328 also mark excluded ticked and dormant articles as read.
6329
6330 @item / N
6331 @kindex / N (Summary)
6332 @findex gnus-summary-insert-new-articles
6333 Insert all new articles in the summary buffer. It scans for new emails
6334 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6335
6336 @item / o
6337 @kindex / o (Summary)
6338 @findex gnus-summary-insert-old-articles
6339 Insert all old articles in the summary buffer. If given a numbered
6340 prefix, fetch this number of articles.
6341
6342 @end table
6343
6344
6345 @node Threading
6346 @section Threading
6347 @cindex threading
6348 @cindex article threading
6349
6350 Gnus threads articles by default.  @dfn{To thread} is to put responses
6351 to articles directly after the articles they respond to---in a
6352 hierarchical fashion.
6353
6354 Threading is done by looking at the @code{References} headers of the
6355 articles.  In a perfect world, this would be enough to build pretty
6356 trees, but unfortunately, the @code{References} header is often broken
6357 or simply missing.  Weird news propagation exacerbates the problem,
6358 so one has to employ other heuristics to get pleasing results.  A
6359 plethora of approaches exists, as detailed in horrible detail in
6360 @pxref{Customizing Threading}.
6361
6362 First, a quick overview of the concepts:
6363
6364 @table @dfn
6365 @item root
6366 The top-most article in a thread; the first article in the thread.
6367
6368 @item thread
6369 A tree-like article structure.
6370
6371 @item sub-thread
6372 A small(er) section of this tree-like structure.
6373
6374 @item loose threads
6375 Threads often lose their roots due to article expiry, or due to the root
6376 already having been read in a previous session, and not displayed in the
6377 summary buffer.  We then typically have many sub-threads that really
6378 belong to one thread, but are without connecting roots.  These are
6379 called loose threads.
6380
6381 @item thread gathering
6382 An attempt to gather loose threads into bigger threads.
6383
6384 @item sparse threads
6385 A thread where the missing articles have been ``guessed'' at, and are
6386 displayed as empty lines in the summary buffer.
6387
6388 @end table
6389
6390
6391 @menu
6392 * Customizing Threading::       Variables you can change to affect the threading.
6393 * Thread Commands::             Thread based commands in the summary buffer.
6394 @end menu
6395
6396
6397 @node Customizing Threading
6398 @subsection Customizing Threading
6399 @cindex customizing threading
6400
6401 @menu
6402 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6403 * Filling In Threads::          Making the threads displayed look fuller.
6404 * More Threading::              Even more variables for fiddling with threads.
6405 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6406 @end menu
6407
6408
6409 @node Loose Threads
6410 @subsubsection Loose Threads
6411 @cindex <
6412 @cindex >
6413 @cindex loose threads
6414
6415 @table @code
6416 @item gnus-summary-make-false-root
6417 @vindex gnus-summary-make-false-root
6418 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6419 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6420 Yup.)  Loose subtrees occur when the real root has expired, or you've
6421 read or killed the root in a previous session.
6422
6423 When there is no real root of a thread, Gnus will have to fudge
6424 something.  This variable says what fudging method Gnus should use.
6425 There are four possible values:
6426
6427 @iftex
6428 @iflatex
6429 \gnusfigure{The Summary Buffer}{390}{
6430 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6431 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6432 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6433 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6434 }
6435 @end iflatex
6436 @end iftex
6437
6438 @cindex adopting articles
6439
6440 @table @code
6441
6442 @item adopt
6443 Gnus will make the first of the orphaned articles the parent.  This
6444 parent will adopt all the other articles.  The adopted articles will be
6445 marked as such by pointy brackets (@samp{<>}) instead of the standard
6446 square brackets (@samp{[]}).  This is the default method.
6447
6448 @item dummy
6449 @vindex gnus-summary-dummy-line-format
6450 @vindex gnus-summary-make-false-root-always
6451 Gnus will create a dummy summary line that will pretend to be the
6452 parent.  This dummy line does not correspond to any real article, so
6453 selecting it will just select the first real article after the dummy
6454 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6455 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6456 which is the subject of the article.  @xref{Formatting Variables}.
6457 If you want all threads to have a dummy root, even the non-gathered
6458 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6459
6460 @item empty
6461 Gnus won't actually make any article the parent, but simply leave the
6462 subject field of all orphans except the first empty.  (Actually, it will
6463 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6464 Buffer Format}).)
6465
6466 @item none
6467 Don't make any article parent at all.  Just gather the threads and
6468 display them after one another.
6469
6470 @item nil
6471 Don't gather loose threads.
6472 @end table
6473
6474 @item gnus-summary-gather-subject-limit
6475 @vindex gnus-summary-gather-subject-limit
6476 Loose threads are gathered by comparing subjects of articles.  If this
6477 variable is @code{nil}, Gnus requires an exact match between the
6478 subjects of the loose threads before gathering them into one big
6479 super-thread.  This might be too strict a requirement, what with the
6480 presence of stupid newsreaders that chop off long subject lines.  If
6481 you think so, set this variable to, say, 20 to require that only the
6482 first 20 characters of the subjects have to match.  If you set this
6483 variable to a really low number, you'll find that Gnus will gather
6484 everything in sight into one thread, which isn't very helpful.
6485
6486 @cindex fuzzy article gathering
6487 If you set this variable to the special value @code{fuzzy}, Gnus will
6488 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6489 Matching}).
6490
6491 @item gnus-simplify-subject-fuzzy-regexp
6492 @vindex gnus-simplify-subject-fuzzy-regexp
6493 This can either be a regular expression or list of regular expressions
6494 that match strings that will be removed from subjects if fuzzy subject
6495 simplification is used.
6496
6497 @item gnus-simplify-ignored-prefixes
6498 @vindex gnus-simplify-ignored-prefixes
6499 If you set @code{gnus-summary-gather-subject-limit} to something as low
6500 as 10, you might consider setting this variable to something sensible:
6501
6502 @c Written by Michael Ernst <mernst@cs.rice.edu>
6503 @lisp
6504 (setq gnus-simplify-ignored-prefixes
6505       (concat
6506        "\\`\\[?\\("
6507        (mapconcat
6508         'identity
6509         '("looking"
6510           "wanted" "followup" "summary\\( of\\)?"
6511           "help" "query" "problem" "question"
6512           "answer" "reference" "announce"
6513           "How can I" "How to" "Comparison of"
6514           ;; ...
6515           )
6516         "\\|")
6517        "\\)\\s *\\("
6518        (mapconcat 'identity
6519                   '("for" "for reference" "with" "about")
6520                   "\\|")
6521        "\\)?\\]?:?[ \t]*"))
6522 @end lisp
6523
6524 All words that match this regexp will be removed before comparing two
6525 subjects.
6526
6527 @item gnus-simplify-subject-functions
6528 @vindex gnus-simplify-subject-functions
6529 If non-@code{nil}, this variable overrides
6530 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6531 list of functions to apply to the @code{Subject} string iteratively to
6532 arrive at the simplified version of the string.
6533
6534 Useful functions to put in this list include:
6535
6536 @table @code
6537 @item gnus-simplify-subject-re
6538 @findex gnus-simplify-subject-re
6539 Strip the leading @samp{Re:}.
6540
6541 @item gnus-simplify-subject-fuzzy
6542 @findex gnus-simplify-subject-fuzzy
6543 Simplify fuzzily.
6544
6545 @item gnus-simplify-whitespace
6546 @findex gnus-simplify-whitespace
6547 Remove excessive whitespace.
6548
6549 @item gnus-simplify-all-whitespace
6550 @findex gnus-simplify-all-whitespace
6551 Remove all whitespace.
6552 @end table
6553
6554 You may also write your own functions, of course.
6555
6556
6557 @item gnus-summary-gather-exclude-subject
6558 @vindex gnus-summary-gather-exclude-subject
6559 Since loose thread gathering is done on subjects only, that might lead
6560 to many false hits, especially with certain common subjects like
6561 @samp{} and @samp{(none)}.  To make the situation slightly better,
6562 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6563 what subjects should be excluded from the gathering process.@*
6564 The default is @samp{^ *$\\|^(none)$}.
6565
6566 @item gnus-summary-thread-gathering-function
6567 @vindex gnus-summary-thread-gathering-function
6568 Gnus gathers threads by looking at @code{Subject} headers.  This means
6569 that totally unrelated articles may end up in the same ``thread'', which
6570 is confusing.  An alternate approach is to look at all the
6571 @code{Message-ID}s in all the @code{References} headers to find matches.
6572 This will ensure that no gathered threads ever include unrelated
6573 articles, but it also means that people who have posted with broken
6574 newsreaders won't be gathered properly.  The choice is yours---plague or
6575 cholera:
6576
6577 @table @code
6578 @item gnus-gather-threads-by-subject
6579 @findex gnus-gather-threads-by-subject
6580 This function is the default gathering function and looks at
6581 @code{Subject}s exclusively.
6582
6583 @item gnus-gather-threads-by-references
6584 @findex gnus-gather-threads-by-references
6585 This function looks at @code{References} headers exclusively.
6586 @end table
6587
6588 If you want to test gathering by @code{References}, you could say
6589 something like:
6590
6591 @lisp
6592 (setq gnus-summary-thread-gathering-function
6593       'gnus-gather-threads-by-references)
6594 @end lisp
6595
6596 @end table
6597
6598
6599 @node Filling In Threads
6600 @subsubsection Filling In Threads
6601
6602 @table @code
6603 @item gnus-fetch-old-headers
6604 @vindex gnus-fetch-old-headers
6605 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6606 more old headers---headers to articles marked as read.  If you
6607 would like to display as few summary lines as possible, but still
6608 connect as many loose threads as possible, you should set this variable
6609 to @code{some} or a number.  If you set it to a number, no more than
6610 that number of extra old headers will be fetched.  In either case,
6611 fetching old headers only works if the back end you are using carries
6612 overview files---this would normally be @code{nntp}, @code{nnspool},
6613 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6614 the thread has been expired by the server, there's not much Gnus can do
6615 about that.
6616
6617 This variable can also be set to @code{invisible}.  This won't have any
6618 visible effects, but is useful if you use the @kbd{A T} command a lot
6619 (@pxref{Finding the Parent}).
6620
6621 @item gnus-fetch-old-ephemeral-headers
6622 @vindex gnus-fetch-old-ephemeral-headers
6623 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6624 newsgroups.
6625
6626 @item gnus-build-sparse-threads
6627 @vindex gnus-build-sparse-threads
6628 Fetching old headers can be slow.  A low-rent similar effect can be
6629 gotten by setting this variable to @code{some}.  Gnus will then look at
6630 the complete @code{References} headers of all articles and try to string
6631 together articles that belong in the same thread.  This will leave
6632 @dfn{gaps} in the threading display where Gnus guesses that an article
6633 is missing from the thread.  (These gaps appear like normal summary
6634 lines.  If you select a gap, Gnus will try to fetch the article in
6635 question.)  If this variable is @code{t}, Gnus will display all these
6636 ``gaps'' without regard for whether they are useful for completing the
6637 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6638 off sparse leaf nodes that don't lead anywhere.  This variable is
6639 @code{nil} by default.
6640
6641 @item gnus-read-all-available-headers
6642 @vindex gnus-read-all-available-headers
6643 This is a rather obscure variable that few will find useful.  It's
6644 intended for those non-news newsgroups where the back end has to fetch
6645 quite a lot to present the summary buffer, and where it's impossible to
6646 go back to parents of articles.  This is mostly the case in the
6647 web-based groups, like the @code{nnultimate} groups.
6648
6649 If you don't use those, then it's safe to leave this as the default
6650 @code{nil}.  If you want to use this variable, it should be a regexp
6651 that matches the group name, or @code{t} for all groups.
6652
6653 @end table
6654
6655
6656 @node More Threading
6657 @subsubsection More Threading
6658
6659 @table @code
6660 @item gnus-show-threads
6661 @vindex gnus-show-threads
6662 If this variable is @code{nil}, no threading will be done, and all of
6663 the rest of the variables here will have no effect.  Turning threading
6664 off will speed group selection up a bit, but it is sure to make reading
6665 slower and more awkward.
6666
6667 @item gnus-thread-hide-subtree
6668 @vindex gnus-thread-hide-subtree
6669 If non-@code{nil}, all threads will be hidden when the summary buffer is
6670 generated.
6671
6672 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6673 Available predicates are @code{gnus-article-unread-p} and
6674 @code{gnus-article-unseen-p}.
6675
6676 Here's an example:
6677
6678 @lisp
6679 (setq gnus-thread-hide-subtree
6680       '(or gnus-article-unread-p
6681            gnus-article-unseen-p))
6682 @end lisp
6683
6684 (It's a pretty nonsensical example, since all unseen articles are also
6685 unread, but you get my drift.)
6686
6687
6688 @item gnus-thread-expunge-below
6689 @vindex gnus-thread-expunge-below
6690 All threads that have a total score (as defined by
6691 @code{gnus-thread-score-function}) less than this number will be
6692 expunged.  This variable is @code{nil} by default, which means that no
6693 threads are expunged.
6694
6695 @item gnus-thread-hide-killed
6696 @vindex gnus-thread-hide-killed
6697 if you kill a thread and this variable is non-@code{nil}, the subtree
6698 will be hidden.
6699
6700 @item gnus-thread-ignore-subject
6701 @vindex gnus-thread-ignore-subject
6702 Sometimes somebody changes the subject in the middle of a thread.  If
6703 this variable is non-@code{nil}, which is the default, the subject
6704 change is ignored.  If it is @code{nil}, a change in the subject will
6705 result in a new thread.
6706
6707 @item gnus-thread-indent-level
6708 @vindex gnus-thread-indent-level
6709 This is a number that says how much each sub-thread should be indented.
6710 The default is 4.
6711
6712 @item gnus-sort-gathered-threads-function
6713 @vindex gnus-sort-gathered-threads-function
6714 Sometimes, particularly with mailing lists, the order in which mails
6715 arrive locally is not necessarily the same as the order in which they
6716 arrived on the mailing list.  Consequently, when sorting sub-threads
6717 using the default @code{gnus-thread-sort-by-number}, responses can end
6718 up appearing before the article to which they are responding to.
6719 Setting this variable to an alternate value
6720 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6721 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6722 more logical sub-thread ordering in such instances.
6723
6724 @end table
6725
6726
6727 @node Low-Level Threading
6728 @subsubsection Low-Level Threading
6729
6730 @table @code
6731
6732 @item gnus-parse-headers-hook
6733 @vindex gnus-parse-headers-hook
6734 Hook run before parsing any headers.
6735
6736 @item gnus-alter-header-function
6737 @vindex gnus-alter-header-function
6738 If non-@code{nil}, this function will be called to allow alteration of
6739 article header structures.  The function is called with one parameter,
6740 the article header vector, which it may alter in any way.  For instance,
6741 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6742 in systematic ways (by adding prefixes and such), you can use this
6743 variable to un-scramble the @code{Message-ID}s so that they are more
6744 meaningful.  Here's one example:
6745
6746 @lisp
6747 (setq gnus-alter-header-function 'my-alter-message-id)
6748
6749 (defun my-alter-message-id (header)
6750   (let ((id (mail-header-id header)))
6751     (when (string-match
6752            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6753       (mail-header-set-id
6754        (concat (match-string 1 id) "@@" (match-string 2 id))
6755        header))))
6756 @end lisp
6757
6758 @end table
6759
6760
6761 @node Thread Commands
6762 @subsection Thread Commands
6763 @cindex thread commands
6764
6765 @table @kbd
6766
6767 @item T k
6768 @itemx C-M-k
6769 @kindex T k (Summary)
6770 @kindex C-M-k (Summary)
6771 @findex gnus-summary-kill-thread
6772 Mark all articles in the current (sub-)thread as read
6773 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6774 remove all marks instead.  If the prefix argument is negative, tick
6775 articles instead.
6776
6777 @item T l
6778 @itemx C-M-l
6779 @kindex T l (Summary)
6780 @kindex C-M-l (Summary)
6781 @findex gnus-summary-lower-thread
6782 Lower the score of the current (sub-)thread
6783 (@code{gnus-summary-lower-thread}).
6784
6785 @item T i
6786 @kindex T i (Summary)
6787 @findex gnus-summary-raise-thread
6788 Increase the score of the current (sub-)thread
6789 (@code{gnus-summary-raise-thread}).
6790
6791 @item T #
6792 @kindex T # (Summary)
6793 @findex gnus-uu-mark-thread
6794 Set the process mark on the current (sub-)thread
6795 (@code{gnus-uu-mark-thread}).
6796
6797 @item T M-#
6798 @kindex T M-# (Summary)
6799 @findex gnus-uu-unmark-thread
6800 Remove the process mark from the current (sub-)thread
6801 (@code{gnus-uu-unmark-thread}).
6802
6803 @item T T
6804 @kindex T T (Summary)
6805 @findex gnus-summary-toggle-threads
6806 Toggle threading (@code{gnus-summary-toggle-threads}).
6807
6808 @item T s
6809 @kindex T s (Summary)
6810 @findex gnus-summary-show-thread
6811 Expose the (sub-)thread hidden under the current article, if any@*
6812 (@code{gnus-summary-show-thread}).
6813
6814 @item T h
6815 @kindex T h (Summary)
6816 @findex gnus-summary-hide-thread
6817 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6818
6819 @item T S
6820 @kindex T S (Summary)
6821 @findex gnus-summary-show-all-threads
6822 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6823
6824 @item T H
6825 @kindex T H (Summary)
6826 @findex gnus-summary-hide-all-threads
6827 Hide all threads (@code{gnus-summary-hide-all-threads}).
6828
6829 @item T t
6830 @kindex T t (Summary)
6831 @findex gnus-summary-rethread-current
6832 Re-thread the current article's thread
6833 (@code{gnus-summary-rethread-current}).  This works even when the
6834 summary buffer is otherwise unthreaded.
6835
6836 @item T ^
6837 @kindex T ^ (Summary)
6838 @findex gnus-summary-reparent-thread
6839 Make the current article the child of the marked (or previous) article
6840 (@code{gnus-summary-reparent-thread}).
6841
6842 @end table
6843
6844 The following commands are thread movement commands.  They all
6845 understand the numeric prefix.
6846
6847 @table @kbd
6848
6849 @item T n
6850 @kindex T n (Summary)
6851 @itemx C-M-f
6852 @kindex C-M-n (Summary)
6853 @itemx M-down
6854 @kindex M-down (Summary)
6855 @findex gnus-summary-next-thread
6856 Go to the next thread (@code{gnus-summary-next-thread}).
6857
6858 @item T p
6859 @kindex T p (Summary)
6860 @itemx C-M-b
6861 @kindex C-M-p (Summary)
6862 @itemx M-up
6863 @kindex M-up (Summary)
6864 @findex gnus-summary-prev-thread
6865 Go to the previous thread (@code{gnus-summary-prev-thread}).
6866
6867 @item T d
6868 @kindex T d (Summary)
6869 @findex gnus-summary-down-thread
6870 Descend the thread (@code{gnus-summary-down-thread}).
6871
6872 @item T u
6873 @kindex T u (Summary)
6874 @findex gnus-summary-up-thread
6875 Ascend the thread (@code{gnus-summary-up-thread}).
6876
6877 @item T o
6878 @kindex T o (Summary)
6879 @findex gnus-summary-top-thread
6880 Go to the top of the thread (@code{gnus-summary-top-thread}).
6881 @end table
6882
6883 @vindex gnus-thread-operation-ignore-subject
6884 If you ignore subject while threading, you'll naturally end up with
6885 threads that have several different subjects in them.  If you then issue
6886 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6887 wish to kill the entire thread, but just those parts of the thread that
6888 have the same subject as the current article.  If you like this idea,
6889 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6890 is non-@code{nil} (which it is by default), subjects will be ignored
6891 when doing thread commands.  If this variable is @code{nil}, articles in
6892 the same thread with different subjects will not be included in the
6893 operation in question.  If this variable is @code{fuzzy}, only articles
6894 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6895 Matching}).
6896
6897
6898 @node Sorting the Summary Buffer
6899 @section Sorting the Summary Buffer
6900
6901 @findex gnus-thread-sort-by-total-score
6902 @findex gnus-thread-sort-by-date
6903 @findex gnus-thread-sort-by-score
6904 @findex gnus-thread-sort-by-subject
6905 @findex gnus-thread-sort-by-author
6906 @findex gnus-thread-sort-by-number
6907 @findex gnus-thread-sort-by-random
6908 @vindex gnus-thread-sort-functions
6909 @findex gnus-thread-sort-by-most-recent-thread
6910 If you are using a threaded summary display, you can sort the threads by
6911 setting @code{gnus-thread-sort-functions}, which can be either a single
6912 function, a list of functions, or a list containing functions and
6913 @code{(not some-function)} elements.
6914
6915 By default, sorting is done on article numbers.  Ready-made sorting
6916 predicate functions include @code{gnus-thread-sort-by-number},
6917 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6918 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6919 @code{gnus-thread-sort-by-most-recent-number},
6920 @code{gnus-thread-sort-by-most-recent-date},
6921 @code{gnus-thread-sort-by-random} and
6922 @code{gnus-thread-sort-by-total-score}.
6923
6924 Each function takes two threads and returns non-@code{nil} if the first
6925 thread should be sorted before the other.  Note that sorting really is
6926 normally done by looking only at the roots of each thread.
6927
6928 If you use more than one function, the primary sort key should be the
6929 last function in the list.  You should probably always include
6930 @code{gnus-thread-sort-by-number} in the list of sorting
6931 functions---preferably first.  This will ensure that threads that are
6932 equal with respect to the other sort criteria will be displayed in
6933 ascending article order.
6934
6935 If you would like to sort by reverse score, then by subject, and finally
6936 by number, you could do something like:
6937
6938 @lisp
6939 (setq gnus-thread-sort-functions
6940       '(gnus-thread-sort-by-number
6941         gnus-thread-sort-by-subject
6942         (not gnus-thread-sort-by-total-score)))
6943 @end lisp
6944
6945 The threads that have highest score will be displayed first in the
6946 summary buffer.  When threads have the same score, they will be sorted
6947 alphabetically.  The threads that have the same score and the same
6948 subject will be sorted by number, which is (normally) the sequence in
6949 which the articles arrived.
6950
6951 If you want to sort by score and then reverse arrival order, you could
6952 say something like:
6953
6954 @lisp
6955 (setq gnus-thread-sort-functions
6956       '((lambda (t1 t2)
6957           (not (gnus-thread-sort-by-number t1 t2)))
6958         gnus-thread-sort-by-score))
6959 @end lisp
6960
6961 @vindex gnus-thread-score-function
6962 The function in the @code{gnus-thread-score-function} variable (default
6963 @code{+}) is used for calculating the total score of a thread.  Useful
6964 functions might be @code{max}, @code{min}, or squared means, or whatever
6965 tickles your fancy.
6966
6967 @findex gnus-article-sort-functions
6968 @findex gnus-article-sort-by-date
6969 @findex gnus-article-sort-by-score
6970 @findex gnus-article-sort-by-subject
6971 @findex gnus-article-sort-by-author
6972 @findex gnus-article-sort-by-random
6973 @findex gnus-article-sort-by-number
6974 If you are using an unthreaded display for some strange reason or
6975 other, you have to fiddle with the @code{gnus-article-sort-functions}
6976 variable.  It is very similar to the
6977 @code{gnus-thread-sort-functions}, except that it uses slightly
6978 different functions for article comparison.  Available sorting
6979 predicate functions are @code{gnus-article-sort-by-number},
6980 @code{gnus-article-sort-by-author},
6981 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6982 @code{gnus-article-sort-by-random}, and
6983 @code{gnus-article-sort-by-score}.
6984
6985 If you want to sort an unthreaded summary display by subject, you could
6986 say something like:
6987
6988 @lisp
6989 (setq gnus-article-sort-functions
6990       '(gnus-article-sort-by-number
6991         gnus-article-sort-by-subject))
6992 @end lisp
6993
6994
6995
6996 @node Asynchronous Fetching
6997 @section Asynchronous Article Fetching
6998 @cindex asynchronous article fetching
6999 @cindex article pre-fetch
7000 @cindex pre-fetch
7001
7002 If you read your news from an @acronym{NNTP} server that's far away, the
7003 network latencies may make reading articles a chore.  You have to wait
7004 for a while after pressing @kbd{n} to go to the next article before the
7005 article appears.  Why can't Gnus just go ahead and fetch the article
7006 while you are reading the previous one?  Why not, indeed.
7007
7008 First, some caveats.  There are some pitfalls to using asynchronous
7009 article fetching, especially the way Gnus does it.
7010
7011 Let's say you are reading article 1, which is short, and article 2 is
7012 quite long, and you are not interested in reading that.  Gnus does not
7013 know this, so it goes ahead and fetches article 2.  You decide to read
7014 article 3, but since Gnus is in the process of fetching article 2, the
7015 connection is blocked.
7016
7017 To avoid these situations, Gnus will open two (count 'em two)
7018 connections to the server.  Some people may think this isn't a very nice
7019 thing to do, but I don't see any real alternatives.  Setting up that
7020 extra connection takes some time, so Gnus startup will be slower.
7021
7022 Gnus will fetch more articles than you will read.  This will mean that
7023 the link between your machine and the @acronym{NNTP} server will become more
7024 loaded than if you didn't use article pre-fetch.  The server itself will
7025 also become more loaded---both with the extra article requests, and the
7026 extra connection.
7027
7028 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7029 you really want to.
7030
7031 @vindex gnus-asynchronous
7032 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7033 happen automatically.
7034
7035 @vindex gnus-use-article-prefetch
7036 You can control how many articles are to be pre-fetched by setting
7037 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7038 that when you read an article in the group, the back end will pre-fetch
7039 the next 30 articles.  If this variable is @code{t}, the back end will
7040 pre-fetch all the articles it can without bound.  If it is
7041 @code{nil}, no pre-fetching will be done.
7042
7043 @vindex gnus-async-prefetch-article-p
7044 @findex gnus-async-read-p
7045 There are probably some articles that you don't want to pre-fetch---read
7046 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7047 variable controls whether an article is to be pre-fetched.  This
7048 function should return non-@code{nil} when the article in question is
7049 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7050 returns @code{nil} on read articles.  The function is called with an
7051 article data structure as the only parameter.
7052
7053 If, for instance, you wish to pre-fetch only unread articles shorter
7054 than 100 lines, you could say something like:
7055
7056 @lisp
7057 (defun my-async-short-unread-p (data)
7058   "Return non-nil for short, unread articles."
7059   (and (gnus-data-unread-p data)
7060        (< (mail-header-lines (gnus-data-header data))
7061           100)))
7062
7063 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7064 @end lisp
7065
7066 These functions will be called many, many times, so they should
7067 preferably be short and sweet to avoid slowing down Gnus too much.
7068 It's probably a good idea to byte-compile things like this.
7069
7070 @vindex gnus-prefetched-article-deletion-strategy
7071 Articles have to be removed from the asynch buffer sooner or later.  The
7072 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7073 articles.  This is a list that may contain the following elements:
7074
7075 @table @code
7076 @item read
7077 Remove articles when they are read.
7078
7079 @item exit
7080 Remove articles when exiting the group.
7081 @end table
7082
7083 The default value is @code{(read exit)}.
7084
7085 @c @vindex gnus-use-header-prefetch
7086 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7087 @c from the next group.
7088
7089
7090 @node Article Caching
7091 @section Article Caching
7092 @cindex article caching
7093 @cindex caching
7094
7095 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7096 consider turning article caching on.  Each article will then be stored
7097 locally under your home directory.  As you may surmise, this could
7098 potentially use @emph{huge} amounts of disk space, as well as eat up all
7099 your inodes so fast it will make your head swim.  In vodka.
7100
7101 Used carefully, though, it could be just an easier way to save articles.
7102
7103 @vindex gnus-use-long-file-name
7104 @vindex gnus-cache-directory
7105 @vindex gnus-use-cache
7106 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7107 all articles ticked or marked as dormant will then be copied
7108 over to your local cache (@code{gnus-cache-directory}).  Whether this
7109 cache is flat or hierarchical is controlled by the
7110 @code{gnus-use-long-file-name} variable, as usual.
7111
7112 When re-selecting a ticked or dormant article, it will be fetched from the
7113 cache instead of from the server.  As articles in your cache will never
7114 expire, this might serve as a method of saving articles while still
7115 keeping them where they belong.  Just mark all articles you want to save
7116 as dormant, and don't worry.
7117
7118 When an article is marked as read, is it removed from the cache.
7119
7120 @vindex gnus-cache-remove-articles
7121 @vindex gnus-cache-enter-articles
7122 The entering/removal of articles from the cache is controlled by the
7123 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7124 variables.  Both are lists of symbols.  The first is @code{(ticked
7125 dormant)} by default, meaning that ticked and dormant articles will be
7126 put in the cache.  The latter is @code{(read)} by default, meaning that
7127 articles marked as read are removed from the cache.  Possibly
7128 symbols in these two lists are @code{ticked}, @code{dormant},
7129 @code{unread} and @code{read}.
7130
7131 @findex gnus-jog-cache
7132 So where does the massive article-fetching and storing come into the
7133 picture?  The @code{gnus-jog-cache} command will go through all
7134 subscribed newsgroups, request all unread articles, score them, and
7135 store them in the cache.  You should only ever, ever ever ever, use this
7136 command if 1) your connection to the @acronym{NNTP} server is really, really,
7137 really slow and 2) you have a really, really, really huge disk.
7138 Seriously.  One way to cut down on the number of articles downloaded is
7139 to score unwanted articles down and have them marked as read.  They will
7140 not then be downloaded by this command.
7141
7142 @vindex gnus-uncacheable-groups
7143 @vindex gnus-cacheable-groups
7144 It is likely that you do not want caching on all groups.  For instance,
7145 if your @code{nnml} mail is located under your home directory, it makes no
7146 sense to cache it somewhere else under your home directory.  Unless you
7147 feel that it's neat to use twice as much space.
7148
7149 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7150 regexp of groups to cache, @samp{^nntp} for instance, or set the
7151 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7152 Both variables are @code{nil} by default.  If a group matches both
7153 variables, the group is not cached.
7154
7155 @findex gnus-cache-generate-nov-databases
7156 @findex gnus-cache-generate-active
7157 @vindex gnus-cache-active-file
7158 The cache stores information on what articles it contains in its active
7159 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7160 of the cache) becomes all messed up for some reason or other, Gnus
7161 offers two functions that will try to set things right.  @kbd{M-x
7162 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7163 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7164 file.
7165
7166 @findex gnus-cache-move-cache
7167 @code{gnus-cache-move-cache} will move your whole
7168 @code{gnus-cache-directory} to some other location. You get asked to
7169 where, isn't that cool?
7170
7171 @node Persistent Articles
7172 @section Persistent Articles
7173 @cindex persistent articles
7174
7175 Closely related to article caching, we have @dfn{persistent articles}.
7176 In fact, it's just a different way of looking at caching, and much more
7177 useful in my opinion.
7178
7179 Say you're reading a newsgroup, and you happen on to some valuable gem
7180 that you want to keep and treasure forever.  You'd normally just save it
7181 (using one of the many saving commands) in some file.  The problem with
7182 that is that it's just, well, yucky.  Ideally you'd prefer just having
7183 the article remain in the group where you found it forever; untouched by
7184 the expiry going on at the news server.
7185
7186 This is what a @dfn{persistent article} is---an article that just won't
7187 be deleted.  It's implemented using the normal cache functions, but
7188 you use two explicit commands for managing persistent articles:
7189
7190 @table @kbd
7191
7192 @item *
7193 @kindex * (Summary)
7194 @findex gnus-cache-enter-article
7195 Make the current article persistent (@code{gnus-cache-enter-article}).
7196
7197 @item M-*
7198 @kindex M-* (Summary)
7199 @findex gnus-cache-remove-article
7200 Remove the current article from the persistent articles
7201 (@code{gnus-cache-remove-article}).  This will normally delete the
7202 article.
7203 @end table
7204
7205 Both these commands understand the process/prefix convention.
7206
7207 To avoid having all ticked articles (and stuff) entered into the cache,
7208 you should set @code{gnus-use-cache} to @code{passive} if you're just
7209 interested in persistent articles:
7210
7211 @lisp
7212 (setq gnus-use-cache 'passive)
7213 @end lisp
7214
7215
7216 @node Article Backlog
7217 @section Article Backlog
7218 @cindex backlog
7219 @cindex article backlog
7220
7221 If you have a slow connection, but the idea of using caching seems
7222 unappealing to you (and it is, really), you can help the situation some
7223 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7224 already read articles so that it doesn't have to re-fetch articles
7225 you've already read.  This only helps if you are in the habit of
7226 re-selecting articles you've recently read, of course.  If you never do
7227 that, turning the backlog on will slow Gnus down a little bit, and
7228 increase memory usage some.
7229
7230 @vindex gnus-keep-backlog
7231 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7232 at most @var{n} old articles in a buffer for later re-fetching.  If this
7233 variable is non-@code{nil} and is not a number, Gnus will store
7234 @emph{all} read articles, which means that your Emacs will grow without
7235 bound before exploding and taking your machine down with you.  I put
7236 that in there just to keep y'all on your toes.
7237
7238 The default value is 20.
7239
7240
7241 @node Saving Articles
7242 @section Saving Articles
7243 @cindex saving articles
7244
7245 Gnus can save articles in a number of ways.  Below is the documentation
7246 for saving articles in a fairly straight-forward fashion (i.e., little
7247 processing of the article is done before it is saved).  For a different
7248 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7249 (@pxref{Decoding Articles}).
7250
7251 For the commands listed here, the target is a file.  If you want to
7252 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7253 command (@pxref{Mail Group Commands}).
7254
7255 @vindex gnus-save-all-headers
7256 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7257 unwanted headers before saving the article.
7258
7259 @vindex gnus-saved-headers
7260 If the preceding variable is @code{nil}, all headers that match the
7261 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7262 deleted before saving.
7263
7264 @table @kbd
7265
7266 @item O o
7267 @itemx o
7268 @kindex O o (Summary)
7269 @kindex o (Summary)
7270 @findex gnus-summary-save-article
7271 @c @icon{gnus-summary-save-article}
7272 Save the current article using the default article saver
7273 (@code{gnus-summary-save-article}).
7274
7275 @item O m
7276 @kindex O m (Summary)
7277 @findex gnus-summary-save-article-mail
7278 Save the current article in mail format
7279 (@code{gnus-summary-save-article-mail}).
7280
7281 @item O r
7282 @kindex O r (Summary)
7283 @findex gnus-summary-save-article-rmail
7284 Save the current article in Rmail format
7285 (@code{gnus-summary-save-article-rmail}).
7286
7287 @item O f
7288 @kindex O f (Summary)
7289 @findex gnus-summary-save-article-file
7290 @c @icon{gnus-summary-save-article-file}
7291 Save the current article in plain file format
7292 (@code{gnus-summary-save-article-file}).
7293
7294 @item O F
7295 @kindex O F (Summary)
7296 @findex gnus-summary-write-article-file
7297 Write the current article in plain file format, overwriting any previous
7298 file contents (@code{gnus-summary-write-article-file}).
7299
7300 @item O b
7301 @kindex O b (Summary)
7302 @findex gnus-summary-save-article-body-file
7303 Save the current article body in plain file format
7304 (@code{gnus-summary-save-article-body-file}).
7305
7306 @item O h
7307 @kindex O h (Summary)
7308 @findex gnus-summary-save-article-folder
7309 Save the current article in mh folder format
7310 (@code{gnus-summary-save-article-folder}).
7311
7312 @item O v
7313 @kindex O v (Summary)
7314 @findex gnus-summary-save-article-vm
7315 Save the current article in a VM folder
7316 (@code{gnus-summary-save-article-vm}).
7317
7318 @item O p
7319 @itemx |
7320 @kindex O p (Summary)
7321 @kindex | (Summary)
7322 @findex gnus-summary-pipe-output
7323 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7324 the current article to a process (@code{gnus-summary-pipe-output}).
7325 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7326 complete headers in the piped output.
7327
7328 @item O P
7329 @kindex O P (Summary)
7330 @findex gnus-summary-muttprint
7331 @vindex gnus-summary-muttprint-program
7332 Save the current article into muttprint. That is, print it using the
7333 external program @uref{http://muttprint.sourceforge.net/,
7334 Muttprint}. The program name and options to use is controlled by the
7335 variable @code{gnus-summary-muttprint-program}.
7336 (@code{gnus-summary-muttprint}).
7337
7338 @end table
7339
7340 @vindex gnus-prompt-before-saving
7341 All these commands use the process/prefix convention
7342 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7343 functions, you might get tired of being prompted for files to save each
7344 and every article in.  The prompting action is controlled by
7345 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7346 default, giving you that excessive prompting action you know and
7347 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7348 just once for each series of articles you save.  If you like to really
7349 have Gnus do all your thinking for you, you can even set this variable
7350 to @code{nil}, which means that you will never be prompted for files to
7351 save articles in.  Gnus will simply save all the articles in the default
7352 files.
7353
7354
7355 @vindex gnus-default-article-saver
7356 You can customize the @code{gnus-default-article-saver} variable to make
7357 Gnus do what you want it to.  You can use any of the six ready-made
7358 functions below, or you can create your own.
7359
7360 @table @code
7361
7362 @item gnus-summary-save-in-rmail
7363 @findex gnus-summary-save-in-rmail
7364 @vindex gnus-rmail-save-name
7365 @findex gnus-plain-save-name
7366 This is the default format, @dfn{Babyl}.  Uses the function in the
7367 @code{gnus-rmail-save-name} variable to get a file name to save the
7368 article in.  The default is @code{gnus-plain-save-name}.
7369
7370 @item gnus-summary-save-in-mail
7371 @findex gnus-summary-save-in-mail
7372 @vindex gnus-mail-save-name
7373 Save in a Unix mail (mbox) file.  Uses the function in the
7374 @code{gnus-mail-save-name} variable to get a file name to save the
7375 article in.  The default is @code{gnus-plain-save-name}.
7376
7377 @item gnus-summary-save-in-file
7378 @findex gnus-summary-save-in-file
7379 @vindex gnus-file-save-name
7380 @findex gnus-numeric-save-name
7381 Append the article straight to an ordinary file.  Uses the function in
7382 the @code{gnus-file-save-name} variable to get a file name to save the
7383 article in.  The default is @code{gnus-numeric-save-name}.
7384
7385 @item gnus-summary-write-to-file
7386 @findex gnus-summary-write-to-file
7387 Write the article straight to an ordinary file.  The file is
7388 overwritten if it exists.  Uses the function in the
7389 @code{gnus-file-save-name} variable to get a file name to save the
7390 article in.  The default is @code{gnus-numeric-save-name}.
7391
7392 @item gnus-summary-save-body-in-file
7393 @findex gnus-summary-save-body-in-file
7394 Append the article body to an ordinary file.  Uses the function in the
7395 @code{gnus-file-save-name} variable to get a file name to save the
7396 article in.  The default is @code{gnus-numeric-save-name}.
7397
7398 @item gnus-summary-save-in-folder
7399 @findex gnus-summary-save-in-folder
7400 @findex gnus-folder-save-name
7401 @findex gnus-Folder-save-name
7402 @vindex gnus-folder-save-name
7403 @cindex rcvstore
7404 @cindex MH folders
7405 Save the article to an MH folder using @code{rcvstore} from the MH
7406 library.  Uses the function in the @code{gnus-folder-save-name} variable
7407 to get a file name to save the article in.  The default is
7408 @code{gnus-folder-save-name}, but you can also use
7409 @code{gnus-Folder-save-name}, which creates capitalized names.
7410
7411 @item gnus-summary-save-in-vm
7412 @findex gnus-summary-save-in-vm
7413 Save the article in a VM folder.  You have to have the VM mail
7414 reader to use this setting.
7415 @end table
7416
7417 @vindex gnus-article-save-directory
7418 All of these functions, except for the last one, will save the article
7419 in the @code{gnus-article-save-directory}, which is initialized from the
7420 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7421 default.
7422
7423 As you can see above, the functions use different functions to find a
7424 suitable name of a file to save the article in.  Below is a list of
7425 available functions that generate names:
7426
7427 @table @code
7428
7429 @item gnus-Numeric-save-name
7430 @findex gnus-Numeric-save-name
7431 File names like @file{~/News/Alt.andrea-dworkin/45}.
7432
7433 @item gnus-numeric-save-name
7434 @findex gnus-numeric-save-name
7435 File names like @file{~/News/alt.andrea-dworkin/45}.
7436
7437 @item gnus-Plain-save-name
7438 @findex gnus-Plain-save-name
7439 File names like @file{~/News/Alt.andrea-dworkin}.
7440
7441 @item gnus-plain-save-name
7442 @findex gnus-plain-save-name
7443 File names like @file{~/News/alt.andrea-dworkin}.
7444
7445 @item gnus-sender-save-name
7446 @findex gnus-sender-save-name
7447 File names like @file{~/News/larsi}.
7448 @end table
7449
7450 @vindex gnus-split-methods
7451 You can have Gnus suggest where to save articles by plonking a regexp into
7452 the @code{gnus-split-methods} alist.  For instance, if you would like to
7453 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7454 related to VM in @file{vm-stuff}, you could set this variable to something
7455 like:
7456
7457 @lisp
7458 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7459  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7460  (my-choosing-function "../other-dir/my-stuff")
7461  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7462 @end lisp
7463
7464 We see that this is a list where each element is a list that has two
7465 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7466 a string (in which case it is used as a regexp to match on the article
7467 head); it can be a symbol (which will be called as a function with the
7468 group name as a parameter); or it can be a list (which will be
7469 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7470 the @dfn{file} will be used as a default prompt.  In addition, the
7471 result of the operation itself will be used if the function or form
7472 called returns a string or a list of strings.
7473
7474 You basically end up with a list of file names that might be used when
7475 saving the current article.  (All ``matches'' will be used.)  You will
7476 then be prompted for what you really want to use as a name, with file
7477 name completion over the results from applying this variable.
7478
7479 This variable is @code{((gnus-article-archive-name))} by default, which
7480 means that Gnus will look at the articles it saves for an
7481 @code{Archive-name} line and use that as a suggestion for the file
7482 name.
7483
7484 Here's an example function to clean up file names somewhat.  If you have
7485 lots of mail groups called things like
7486 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7487 these group names before creating the file name to save to.  The
7488 following will do just that:
7489
7490 @lisp
7491 (defun my-save-name (group)
7492   (when (string-match "^nnml:mail." group)
7493     (substring group (match-end 0))))
7494
7495 (setq gnus-split-methods
7496       '((gnus-article-archive-name)
7497         (my-save-name)))
7498 @end lisp
7499
7500
7501 @vindex gnus-use-long-file-name
7502 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7503 @code{nil}, all the preceding functions will replace all periods
7504 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7505 the functions will generate hierarchies of directories instead of having
7506 all the files in the top level directory
7507 (@file{~/News/alt/andrea-dworkin} instead of
7508 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7509 on most systems.  However, for historical reasons, this is @code{nil} on
7510 Xenix and usg-unix-v machines by default.
7511
7512 This function also affects kill and score file names.  If this variable
7513 is a list, and the list contains the element @code{not-score}, long file
7514 names will not be used for score files, if it contains the element
7515 @code{not-save}, long file names will not be used for saving, and if it
7516 contains the element @code{not-kill}, long file names will not be used
7517 for kill files.
7518
7519 If you'd like to save articles in a hierarchy that looks something like
7520 a spool, you could
7521
7522 @lisp
7523 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7524 (setq gnus-default-article-saver
7525       'gnus-summary-save-in-file)          ; @r{no encoding}
7526 @end lisp
7527
7528 Then just save with @kbd{o}.  You'd then read this hierarchy with
7529 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7530 the top level directory as the argument (@file{~/News/}).  Then just walk
7531 around to the groups/directories with @code{nneething}.
7532
7533
7534 @node Decoding Articles
7535 @section Decoding Articles
7536 @cindex decoding articles
7537
7538 Sometime users post articles (or series of articles) that have been
7539 encoded in some way or other.  Gnus can decode them for you.
7540
7541 @menu
7542 * Uuencoded Articles::          Uudecode articles.
7543 * Shell Archives::              Unshar articles.
7544 * PostScript Files::            Split PostScript.
7545 * Other Files::                 Plain save and binhex.
7546 * Decoding Variables::          Variables for a happy decoding.
7547 * Viewing Files::               You want to look at the result of the decoding?
7548 @end menu
7549
7550 @cindex series
7551 @cindex article series
7552 All these functions use the process/prefix convention
7553 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7554 the extension that a ``single article'' means ``a single series''.  Gnus
7555 can find out by itself what articles belong to a series, decode all the
7556 articles and unpack/view/save the resulting file(s).
7557
7558 Gnus guesses what articles are in the series according to the following
7559 simplish rule: The subjects must be (nearly) identical, except for the
7560 last two numbers of the line.  (Spaces are largely ignored, however.)
7561
7562 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7563 will find all the articles that match the regexp @samp{^cat.gif
7564 ([0-9]+/[0-9]+).*$}.
7565
7566 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7567 series}, will not be properly recognized by any of the automatic viewing
7568 commands, and you have to mark the articles manually with @kbd{#}.
7569
7570
7571 @node Uuencoded Articles
7572 @subsection Uuencoded Articles
7573 @cindex uudecode
7574 @cindex uuencoded articles
7575
7576 @table @kbd
7577
7578 @item X u
7579 @kindex X u (Summary)
7580 @findex gnus-uu-decode-uu
7581 @c @icon{gnus-uu-decode-uu}
7582 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7583
7584 @item X U
7585 @kindex X U (Summary)
7586 @findex gnus-uu-decode-uu-and-save
7587 Uudecodes and saves the current series
7588 (@code{gnus-uu-decode-uu-and-save}).
7589
7590 @item X v u
7591 @kindex X v u (Summary)
7592 @findex gnus-uu-decode-uu-view
7593 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7594
7595 @item X v U
7596 @kindex X v U (Summary)
7597 @findex gnus-uu-decode-uu-and-save-view
7598 Uudecodes, views and saves the current series
7599 (@code{gnus-uu-decode-uu-and-save-view}).
7600
7601 @end table
7602
7603 Remember that these all react to the presence of articles marked with
7604 the process mark.  If, for instance, you'd like to decode and save an
7605 entire newsgroup, you'd typically do @kbd{M P a}
7606 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7607 (@code{gnus-uu-decode-uu-and-save}).
7608
7609 All this is very much different from how @code{gnus-uu} worked with
7610 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7611 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7612 articles in some way (@pxref{Setting Process Marks}) and then press
7613 @kbd{X u}.
7614
7615 @vindex gnus-uu-notify-files
7616 Note: When trying to decode articles that have names matching
7617 @code{gnus-uu-notify-files}, which is hard-coded to
7618 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7619 automatically post an article on @samp{comp.unix.wizards} saying that
7620 you have just viewed the file in question.  This feature can't be turned
7621 off.
7622
7623
7624 @node Shell Archives
7625 @subsection Shell Archives
7626 @cindex unshar
7627 @cindex shell archives
7628 @cindex shared articles
7629
7630 Shell archives (``shar files'') used to be a popular way to distribute
7631 sources, but it isn't used all that much today.  In any case, we have
7632 some commands to deal with these:
7633
7634 @table @kbd
7635
7636 @item X s
7637 @kindex X s (Summary)
7638 @findex gnus-uu-decode-unshar
7639 Unshars the current series (@code{gnus-uu-decode-unshar}).
7640
7641 @item X S
7642 @kindex X S (Summary)
7643 @findex gnus-uu-decode-unshar-and-save
7644 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7645
7646 @item X v s
7647 @kindex X v s (Summary)
7648 @findex gnus-uu-decode-unshar-view
7649 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7650
7651 @item X v S
7652 @kindex X v S (Summary)
7653 @findex gnus-uu-decode-unshar-and-save-view
7654 Unshars, views and saves the current series
7655 (@code{gnus-uu-decode-unshar-and-save-view}).
7656 @end table
7657
7658
7659 @node PostScript Files
7660 @subsection PostScript Files
7661 @cindex PostScript
7662
7663 @table @kbd
7664
7665 @item X p
7666 @kindex X p (Summary)
7667 @findex gnus-uu-decode-postscript
7668 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7669
7670 @item X P
7671 @kindex X P (Summary)
7672 @findex gnus-uu-decode-postscript-and-save
7673 Unpack and save the current PostScript series
7674 (@code{gnus-uu-decode-postscript-and-save}).
7675
7676 @item X v p
7677 @kindex X v p (Summary)
7678 @findex gnus-uu-decode-postscript-view
7679 View the current PostScript series
7680 (@code{gnus-uu-decode-postscript-view}).
7681
7682 @item X v P
7683 @kindex X v P (Summary)
7684 @findex gnus-uu-decode-postscript-and-save-view
7685 View and save the current PostScript series
7686 (@code{gnus-uu-decode-postscript-and-save-view}).
7687 @end table
7688
7689
7690 @node Other Files
7691 @subsection Other Files
7692
7693 @table @kbd
7694 @item X o
7695 @kindex X o (Summary)
7696 @findex gnus-uu-decode-save
7697 Save the current series
7698 (@code{gnus-uu-decode-save}).
7699
7700 @item X b
7701 @kindex X b (Summary)
7702 @findex gnus-uu-decode-binhex
7703 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7704 doesn't really work yet.
7705 @end table
7706
7707
7708 @node Decoding Variables
7709 @subsection Decoding Variables
7710
7711 Adjective, not verb.
7712
7713 @menu
7714 * Rule Variables::              Variables that say how a file is to be viewed.
7715 * Other Decode Variables::      Other decode variables.
7716 * Uuencoding and Posting::      Variables for customizing uuencoding.
7717 @end menu
7718
7719
7720 @node Rule Variables
7721 @subsubsection Rule Variables
7722 @cindex rule variables
7723
7724 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7725 variables are of the form
7726
7727 @lisp
7728       (list '(regexp1 command2)
7729             '(regexp2 command2)
7730             ...)
7731 @end lisp
7732
7733 @table @code
7734
7735 @item gnus-uu-user-view-rules
7736 @vindex gnus-uu-user-view-rules
7737 @cindex sox
7738 This variable is consulted first when viewing files.  If you wish to use,
7739 for instance, @code{sox} to convert an @file{.au} sound file, you could
7740 say something like:
7741 @lisp
7742 (setq gnus-uu-user-view-rules
7743       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7744 @end lisp
7745
7746 @item gnus-uu-user-view-rules-end
7747 @vindex gnus-uu-user-view-rules-end
7748 This variable is consulted if Gnus couldn't make any matches from the
7749 user and default view rules.
7750
7751 @item gnus-uu-user-archive-rules
7752 @vindex gnus-uu-user-archive-rules
7753 This variable can be used to say what commands should be used to unpack
7754 archives.
7755 @end table
7756
7757
7758 @node Other Decode Variables
7759 @subsubsection Other Decode Variables
7760
7761 @table @code
7762 @vindex gnus-uu-grabbed-file-functions
7763
7764 @item gnus-uu-grabbed-file-functions
7765 All functions in this list will be called right after each file has been
7766 successfully decoded---so that you can move or view files right away,
7767 and don't have to wait for all files to be decoded before you can do
7768 anything.  Ready-made functions you can put in this list are:
7769
7770 @table @code
7771
7772 @item gnus-uu-grab-view
7773 @findex gnus-uu-grab-view
7774 View the file.
7775
7776 @item gnus-uu-grab-move
7777 @findex gnus-uu-grab-move
7778 Move the file (if you're using a saving function.)
7779 @end table
7780
7781 @item gnus-uu-be-dangerous
7782 @vindex gnus-uu-be-dangerous
7783 Specifies what to do if unusual situations arise during decoding.  If
7784 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7785 that didn't work, and overwrite existing files.  Otherwise, ask each
7786 time.
7787
7788 @item gnus-uu-ignore-files-by-name
7789 @vindex gnus-uu-ignore-files-by-name
7790 Files with name matching this regular expression won't be viewed.
7791
7792 @item gnus-uu-ignore-files-by-type
7793 @vindex gnus-uu-ignore-files-by-type
7794 Files with a @acronym{MIME} type matching this variable won't be viewed.
7795 Note that Gnus tries to guess what type the file is based on the name.
7796 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7797 kludgey.
7798
7799 @item gnus-uu-tmp-dir
7800 @vindex gnus-uu-tmp-dir
7801 Where @code{gnus-uu} does its work.
7802
7803 @item gnus-uu-do-not-unpack-archives
7804 @vindex gnus-uu-do-not-unpack-archives
7805 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7806 looking for files to display.
7807
7808 @item gnus-uu-view-and-save
7809 @vindex gnus-uu-view-and-save
7810 Non-@code{nil} means that the user will always be asked to save a file
7811 after viewing it.
7812
7813 @item gnus-uu-ignore-default-view-rules
7814 @vindex gnus-uu-ignore-default-view-rules
7815 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7816 rules.
7817
7818 @item gnus-uu-ignore-default-archive-rules
7819 @vindex gnus-uu-ignore-default-archive-rules
7820 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7821 unpacking commands.
7822
7823 @item gnus-uu-kill-carriage-return
7824 @vindex gnus-uu-kill-carriage-return
7825 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7826 from articles.
7827
7828 @item gnus-uu-unmark-articles-not-decoded
7829 @vindex gnus-uu-unmark-articles-not-decoded
7830 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7831 decoded articles as unread.
7832
7833 @item gnus-uu-correct-stripped-uucode
7834 @vindex gnus-uu-correct-stripped-uucode
7835 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7836 uuencoded files that have had trailing spaces deleted.
7837
7838 @item gnus-uu-pre-uudecode-hook
7839 @vindex gnus-uu-pre-uudecode-hook
7840 Hook run before sending a message to @code{uudecode}.
7841
7842 @item gnus-uu-view-with-metamail
7843 @vindex gnus-uu-view-with-metamail
7844 @cindex metamail
7845 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7846 commands defined by the rule variables and just fudge a @acronym{MIME}
7847 content type based on the file name.  The result will be fed to
7848 @code{metamail} for viewing.
7849
7850 @item gnus-uu-save-in-digest
7851 @vindex gnus-uu-save-in-digest
7852 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7853 decoding, will save in digests.  If this variable is @code{nil},
7854 @code{gnus-uu} will just save everything in a file without any
7855 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7856 to specify any meaningful volume and issue numbers were found, so I
7857 simply dropped them.
7858
7859 @end table
7860
7861
7862 @node Uuencoding and Posting
7863 @subsubsection Uuencoding and Posting
7864
7865 @table @code
7866
7867 @item gnus-uu-post-include-before-composing
7868 @vindex gnus-uu-post-include-before-composing
7869 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7870 before you compose the article.  If this variable is @code{t}, you can
7871 either include an encoded file with @kbd{C-c C-i} or have one included
7872 for you when you post the article.
7873
7874 @item gnus-uu-post-length
7875 @vindex gnus-uu-post-length
7876 Maximum length of an article.  The encoded file will be split into how
7877 many articles it takes to post the entire file.
7878
7879 @item gnus-uu-post-threaded
7880 @vindex gnus-uu-post-threaded
7881 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7882 thread.  This may not be smart, as no other decoder I have seen is able
7883 to follow threads when collecting uuencoded articles.  (Well, I have
7884 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7885 think that counts@dots{}) Default is @code{nil}.
7886
7887 @item gnus-uu-post-separate-description
7888 @vindex gnus-uu-post-separate-description
7889 Non-@code{nil} means that the description will be posted in a separate
7890 article.  The first article will typically be numbered (0/x).  If this
7891 variable is @code{nil}, the description the user enters will be included
7892 at the beginning of the first article, which will be numbered (1/x).
7893 Default is @code{t}.
7894
7895 @end table
7896
7897
7898 @node Viewing Files
7899 @subsection Viewing Files
7900 @cindex viewing files
7901 @cindex pseudo-articles
7902
7903 After decoding, if the file is some sort of archive, Gnus will attempt
7904 to unpack the archive and see if any of the files in the archive can be
7905 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7906 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7907 uncompress and de-tar the main file, and then view the two pictures.
7908 This unpacking process is recursive, so if the archive contains archives
7909 of archives, it'll all be unpacked.
7910
7911 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7912 extracted file into the summary buffer.  If you go to these
7913 ``articles'', you will be prompted for a command to run (usually Gnus
7914 will make a suggestion), and then the command will be run.
7915
7916 @vindex gnus-view-pseudo-asynchronously
7917 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7918 until the viewing is done before proceeding.
7919
7920 @vindex gnus-view-pseudos
7921 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7922 the pseudo-articles into the summary buffer, but view them
7923 immediately.  If this variable is @code{not-confirm}, the user won't even
7924 be asked for a confirmation before viewing is done.
7925
7926 @vindex gnus-view-pseudos-separately
7927 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7928 pseudo-article will be created for each file to be viewed.  If
7929 @code{nil}, all files that use the same viewing command will be given as
7930 a list of parameters to that command.
7931
7932 @vindex gnus-insert-pseudo-articles
7933 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7934 pseudo-articles when decoding.  It is @code{t} by default.
7935
7936 So; there you are, reading your @emph{pseudo-articles} in your
7937 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7938 Why isn't anything real anymore? How did we get here?
7939
7940
7941 @node Article Treatment
7942 @section Article Treatment
7943
7944 Reading through this huge manual, you may have quite forgotten that the
7945 object of newsreaders is to actually, like, read what people have
7946 written.  Reading articles.  Unfortunately, people are quite bad at
7947 writing, so there are tons of functions and variables to make reading
7948 these articles easier.
7949
7950 @menu
7951 * Article Highlighting::        You want to make the article look like fruit salad.
7952 * Article Fontisizing::         Making emphasized text look nice.
7953 * Article Hiding::              You also want to make certain info go away.
7954 * Article Washing::             Lots of way-neat functions to make life better.
7955 * Article Header::              Doing various header transformations.
7956 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7957 * Article Button Levels::       Controlling appearance of buttons.
7958 * Article Date::                Grumble, UT!
7959 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7960 * Article Signature::           What is a signature?
7961 * Article Miscellanea::         Various other stuff.
7962 @end menu
7963
7964
7965 @node Article Highlighting
7966 @subsection Article Highlighting
7967 @cindex highlighting
7968
7969 Not only do you want your article buffer to look like fruit salad, but
7970 you want it to look like technicolor fruit salad.
7971
7972 @table @kbd
7973
7974 @item W H a
7975 @kindex W H a (Summary)
7976 @findex gnus-article-highlight
7977 @findex gnus-article-maybe-highlight
7978 Do much highlighting of the current article
7979 (@code{gnus-article-highlight}).  This function highlights header, cited
7980 text, the signature, and adds buttons to the body and the head.
7981
7982 @item W H h
7983 @kindex W H h (Summary)
7984 @findex gnus-article-highlight-headers
7985 @vindex gnus-header-face-alist
7986 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7987 highlighting will be done according to the @code{gnus-header-face-alist}
7988 variable, which is a list where each element has the form
7989 @code{(@var{regexp} @var{name} @var{content})}.
7990 @var{regexp} is a regular expression for matching the
7991 header, @var{name} is the face used for highlighting the header name
7992 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7993 the header value.  The first match made will be used.  Note that
7994 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7995
7996 @item W H c
7997 @kindex W H c (Summary)
7998 @findex gnus-article-highlight-citation
7999 Highlight cited text (@code{gnus-article-highlight-citation}).
8000
8001 Some variables to customize the citation highlights:
8002
8003 @table @code
8004 @vindex gnus-cite-parse-max-size
8005
8006 @item gnus-cite-parse-max-size
8007 If the article size if bigger than this variable (which is 25000 by
8008 default), no citation highlighting will be performed.
8009
8010 @item gnus-cite-max-prefix
8011 @vindex gnus-cite-max-prefix
8012 Maximum possible length for a citation prefix (default 20).
8013
8014 @item gnus-cite-face-list
8015 @vindex gnus-cite-face-list
8016 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8017 When there are citations from multiple articles in the same message,
8018 Gnus will try to give each citation from each article its own face.
8019 This should make it easier to see who wrote what.
8020
8021 @item gnus-supercite-regexp
8022 @vindex gnus-supercite-regexp
8023 Regexp matching normal Supercite attribution lines.
8024
8025 @item gnus-supercite-secondary-regexp
8026 @vindex gnus-supercite-secondary-regexp
8027 Regexp matching mangled Supercite attribution lines.
8028
8029 @item gnus-cite-minimum-match-count
8030 @vindex gnus-cite-minimum-match-count
8031 Minimum number of identical prefixes we have to see before we believe
8032 that it's a citation.
8033
8034 @item gnus-cite-attribution-prefix
8035 @vindex gnus-cite-attribution-prefix
8036 Regexp matching the beginning of an attribution line.
8037
8038 @item gnus-cite-attribution-suffix
8039 @vindex gnus-cite-attribution-suffix
8040 Regexp matching the end of an attribution line.
8041
8042 @item gnus-cite-attribution-face
8043 @vindex gnus-cite-attribution-face
8044 Face used for attribution lines.  It is merged with the face for the
8045 cited text belonging to the attribution.
8046
8047 @end table
8048
8049
8050 @item W H s
8051 @kindex W H s (Summary)
8052 @vindex gnus-signature-separator
8053 @vindex gnus-signature-face
8054 @findex gnus-article-highlight-signature
8055 Highlight the signature (@code{gnus-article-highlight-signature}).
8056 Everything after @code{gnus-signature-separator} (@pxref{Article
8057 Signature}) in an article will be considered a signature and will be
8058 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8059 default.
8060
8061 @end table
8062
8063 @xref{Customizing Articles}, for how to highlight articles automatically.
8064
8065
8066 @node Article Fontisizing
8067 @subsection Article Fontisizing
8068 @cindex emphasis
8069 @cindex article emphasis
8070
8071 @findex gnus-article-emphasize
8072 @kindex W e (Summary)
8073 People commonly add emphasis to words in news articles by writing things
8074 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8075 this look nicer by running the article through the @kbd{W e}
8076 (@code{gnus-article-emphasize}) command.
8077
8078 @vindex gnus-emphasis-alist
8079 How the emphasis is computed is controlled by the
8080 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8081 element is a regular expression to be matched.  The second is a number
8082 that says what regular expression grouping is used to find the entire
8083 emphasized word.  The third is a number that says what regexp grouping
8084 should be displayed and highlighted.  (The text between these two
8085 groupings will be hidden.)  The fourth is the face used for
8086 highlighting.
8087
8088 @lisp
8089 (setq gnus-emphasis-alist
8090       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8091         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8092 @end lisp
8093
8094 @cindex slash
8095 @cindex asterisk
8096 @cindex underline
8097 @cindex /
8098 @cindex *
8099
8100 @vindex gnus-emphasis-underline
8101 @vindex gnus-emphasis-bold
8102 @vindex gnus-emphasis-italic
8103 @vindex gnus-emphasis-underline-bold
8104 @vindex gnus-emphasis-underline-italic
8105 @vindex gnus-emphasis-bold-italic
8106 @vindex gnus-emphasis-underline-bold-italic
8107 By default, there are seven rules, and they use the following faces:
8108 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8109 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8110 @code{gnus-emphasis-underline-italic},
8111 @code{gnus-emphasis-underline-bold}, and
8112 @code{gnus-emphasis-underline-bold-italic}.
8113
8114 If you want to change these faces, you can either use @kbd{M-x
8115 customize}, or you can use @code{copy-face}.  For instance, if you want
8116 to make @code{gnus-emphasis-italic} use a red face instead, you could
8117 say something like:
8118
8119 @lisp
8120 (copy-face 'red 'gnus-emphasis-italic)
8121 @end lisp
8122
8123 @vindex gnus-group-highlight-words-alist
8124
8125 If you want to highlight arbitrary words, you can use the
8126 @code{gnus-group-highlight-words-alist} variable, which uses the same
8127 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8128 parameter (@pxref{Group Parameters}) can also be used.
8129
8130 @xref{Customizing Articles}, for how to fontize articles automatically.
8131
8132
8133 @node Article Hiding
8134 @subsection Article Hiding
8135 @cindex article hiding
8136
8137 Or rather, hiding certain things in each article.  There usually is much
8138 too much cruft in most articles.
8139
8140 @table @kbd
8141
8142 @item W W a
8143 @kindex W W a (Summary)
8144 @findex gnus-article-hide
8145 Do quite a lot of hiding on the article buffer
8146 (@kbd{gnus-article-hide}).  In particular, this function will hide
8147 headers, @acronym{PGP}, cited text and the signature.
8148
8149 @item W W h
8150 @kindex W W h (Summary)
8151 @findex gnus-article-hide-headers
8152 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8153 Headers}.
8154
8155 @item W W b
8156 @kindex W W b (Summary)
8157 @findex gnus-article-hide-boring-headers
8158 Hide headers that aren't particularly interesting
8159 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8160
8161 @item W W s
8162 @kindex W W s (Summary)
8163 @findex gnus-article-hide-signature
8164 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8165 Signature}.
8166
8167 @item W W l
8168 @kindex W W l (Summary)
8169 @findex gnus-article-hide-list-identifiers
8170 @vindex gnus-list-identifiers
8171 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8172 are strings some mailing list servers add to the beginning of all
8173 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8174 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8175 may not contain @code{\\(..\\)}.
8176
8177 @table @code
8178
8179 @item gnus-list-identifiers
8180 @vindex gnus-list-identifiers
8181 A regular expression that matches list identifiers to be removed from
8182 subject.  This can also be a list of regular expressions.
8183
8184 @end table
8185
8186 @item W W P
8187 @kindex W W P (Summary)
8188 @findex gnus-article-hide-pem
8189 Hide @acronym{PEM} (privacy enhanced messages) cruft
8190 (@code{gnus-article-hide-pem}).
8191
8192 @item W W B
8193 @kindex W W B (Summary)
8194 @findex gnus-article-strip-banner
8195 @vindex gnus-article-banner-alist
8196 @vindex gnus-article-address-banner-alist
8197 @cindex banner
8198 @cindex OneList
8199 @cindex stripping advertisements
8200 @cindex advertisements
8201 Strip the banner specified by the @code{banner} group parameter
8202 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8203 annoying banners and/or signatures that some mailing lists and moderated
8204 groups adds to all the messages.  The way to use this function is to add
8205 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8206 group you want banners stripped from.  The parameter either be a string,
8207 which will be interpreted as a regular expression matching text to be
8208 removed, or the symbol @code{signature}, meaning that the (last)
8209 signature should be removed, or other symbol, meaning that the
8210 corresponding regular expression in @code{gnus-article-banner-alist} is
8211 used.
8212
8213 Regardless of a group, you can hide things like advertisements only when
8214 the sender of an article has a certain mail address specified in
8215 @code{gnus-article-address-banner-alist}.
8216
8217 @table @code
8218
8219 @item gnus-article-address-banner-alist
8220 @vindex gnus-article-address-banner-alist
8221 Alist of mail addresses and banners.  Each element has the form
8222 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8223 matching a mail address in the From header, @var{banner} is one of a
8224 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8225 a regexp and @code{nil}.  If @var{address} matches author's mail
8226 address, it will remove things like advertisements.  For example, if a
8227 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8228 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8229 sends, you can use the following element to remove them:
8230
8231 @lisp
8232 ("@@yoo-hoo\\.co\\.jp\\'" . 
8233  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8234 @end lisp
8235
8236 @end table
8237
8238 @item W W c
8239 @kindex W W c (Summary)
8240 @findex gnus-article-hide-citation
8241 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8242 customizing the hiding:
8243
8244 @table @code
8245
8246 @item gnus-cited-opened-text-button-line-format
8247 @itemx gnus-cited-closed-text-button-line-format
8248 @vindex gnus-cited-closed-text-button-line-format
8249 @vindex gnus-cited-opened-text-button-line-format
8250 Gnus adds buttons to show where the cited text has been hidden, and to
8251 allow toggle hiding the text.  The format of the variable is specified
8252 by these format-like variable (@pxref{Formatting Variables}).  These
8253 specs are valid:
8254
8255 @table @samp
8256 @item b
8257 Starting point of the hidden text.
8258 @item e
8259 Ending point of the hidden text.
8260 @item l
8261 Number of characters in the hidden region.
8262 @item n
8263 Number of lines of hidden text.
8264 @end table
8265
8266 @item gnus-cited-lines-visible
8267 @vindex gnus-cited-lines-visible
8268 The number of lines at the beginning of the cited text to leave
8269 shown. This can also be a cons cell with the number of lines at the top
8270 and bottom of the text, respectively, to remain visible.
8271
8272 @end table
8273
8274 @item W W C-c
8275 @kindex W W C-c (Summary)
8276 @findex gnus-article-hide-citation-maybe
8277
8278 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8279 following two variables:
8280
8281 @table @code
8282 @item gnus-cite-hide-percentage
8283 @vindex gnus-cite-hide-percentage
8284 If the cited text is of a bigger percentage than this variable (default
8285 50), hide the cited text.
8286
8287 @item gnus-cite-hide-absolute
8288 @vindex gnus-cite-hide-absolute
8289 The cited text must have at least this length (default 10) before it
8290 is hidden.
8291 @end table
8292
8293 @item W W C
8294 @kindex W W C (Summary)
8295 @findex gnus-article-hide-citation-in-followups
8296 Hide cited text in articles that aren't roots
8297 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8298 useful as an interactive command, but might be a handy function to stick
8299 have happen automatically (@pxref{Customizing Articles}).
8300
8301 @end table
8302
8303 All these ``hiding'' commands are toggles, but if you give a negative
8304 prefix to these commands, they will show what they have previously
8305 hidden.  If you give a positive prefix, they will always hide.
8306
8307 Also @pxref{Article Highlighting} for further variables for
8308 citation customization.
8309
8310 @xref{Customizing Articles}, for how to hide article elements
8311 automatically.
8312
8313
8314 @node Article Washing
8315 @subsection Article Washing
8316 @cindex washing
8317 @cindex article washing
8318
8319 We call this ``article washing'' for a really good reason.  Namely, the
8320 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8321
8322 @dfn{Washing} is defined by us as ``changing something from something to
8323 something else'', but normally results in something looking better.
8324 Cleaner, perhaps.
8325
8326 @xref{Customizing Articles}, if you want to change how Gnus displays
8327 articles by default.
8328
8329 @table @kbd
8330
8331 @item C-u g
8332 This is not really washing, it's sort of the opposite of washing.  If
8333 you type this, you see the article exactly as it exists on disk or on
8334 the server.
8335
8336 @item g
8337 Force redisplaying of the current article
8338 (@code{gnus-summary-show-article}).  This is also not really washing.
8339 If you type this, you see the article without any previously applied
8340 interactive Washing functions but with all default treatments
8341 (@pxref{Customizing Articles}).
8342
8343 @item W l
8344 @kindex W l (Summary)
8345 @findex gnus-summary-stop-page-breaking
8346 Remove page breaks from the current article
8347 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8348 delimiters.
8349
8350 @item W r
8351 @kindex W r (Summary)
8352 @findex gnus-summary-caesar-message
8353 @c @icon{gnus-summary-caesar-message}
8354 Do a Caesar rotate (rot13) on the article buffer
8355 (@code{gnus-summary-caesar-message}).
8356 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8357 (Typically offensive jokes and such.)
8358
8359 It's commonly called ``rot13'' because each letter is rotated 13
8360 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8361 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8362 is rumored to have employed this form of, uh, somewhat weak encryption.
8363
8364 @item W m
8365 @kindex W m (Summary)
8366 @findex gnus-summary-morse-message
8367 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8368
8369 @item W t
8370 @item t
8371 @kindex W t (Summary)
8372 @kindex t (Summary)
8373 @findex gnus-summary-toggle-header
8374 Toggle whether to display all headers in the article buffer
8375 (@code{gnus-summary-toggle-header}).
8376
8377 @item W v
8378 @kindex W v (Summary)
8379 @findex gnus-summary-verbose-headers
8380 Toggle whether to display all headers in the article buffer permanently
8381 (@code{gnus-summary-verbose-headers}).
8382
8383 @item W o
8384 @kindex W o (Summary)
8385 @findex gnus-article-treat-overstrike
8386 Treat overstrike (@code{gnus-article-treat-overstrike}).
8387
8388 @item W d
8389 @kindex W d (Summary)
8390 @findex gnus-article-treat-dumbquotes
8391 @vindex gnus-article-dumbquotes-map
8392 @cindex Smartquotes
8393 @cindex M****s*** sm*rtq**t*s
8394 @cindex Latin 1
8395 Treat M****s*** sm*rtq**t*s according to
8396 @code{gnus-article-dumbquotes-map}
8397 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8398 whether a character is a sm*rtq**t* or not, so it should only be used
8399 interactively.
8400
8401 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8402 an attempt to provide more quoting characters.  If you see something
8403 like @code{\222} or @code{\264} where you're expecting some kind of
8404 apostrophe or quotation mark, then try this wash.
8405
8406 @item W Y f
8407 @kindex W Y f (Summary)
8408 @findex gnus-article-outlook-deuglify-article
8409 @cindex Outlook Express
8410 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8411 unwrap lines, repair attribution and rearrange citation.
8412 (@code{gnus-article-outlook-deuglify-article}).
8413
8414 @item W Y u
8415 @kindex W Y u (Summary)
8416 @findex gnus-article-outlook-unwrap-lines
8417 @vindex gnus-outlook-deuglify-unwrap-min
8418 @vindex gnus-outlook-deuglify-unwrap-max
8419 Unwrap lines that appear to be wrapped citation lines.  You can control
8420 what lines will be unwrapped by frobbing
8421 @code{gnus-outlook-deuglify-unwrap-min} and
8422 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8423 maximum length of an unwrapped citation line.
8424 (@code{gnus-article-outlook-unwrap-lines}).
8425
8426 @item W Y a
8427 @kindex W Y a (Summary)
8428 @findex gnus-article-outlook-repair-attribution
8429 Repair a broken attribution line.@*
8430 (@code{gnus-article-outlook-repair-attribution}).
8431
8432 @item W Y c
8433 @kindex W Y c (Summary)
8434 @findex gnus-article-outlook-rearrange-citation
8435 Repair broken citations by rearranging the text.
8436 (@code{gnus-article-outlook-rearrange-citation}).
8437
8438 @item W w
8439 @kindex W w (Summary)
8440 @findex gnus-article-fill-cited-article
8441 Do word wrap (@code{gnus-article-fill-cited-article}).
8442
8443 You can give the command a numerical prefix to specify the width to use
8444 when filling.
8445
8446 @item W Q
8447 @kindex W Q (Summary)
8448 @findex gnus-article-fill-long-lines
8449 Fill long lines (@code{gnus-article-fill-long-lines}).
8450
8451 @item W C
8452 @kindex W C (Summary)
8453 @findex gnus-article-capitalize-sentences
8454 Capitalize the first word in each sentence
8455 (@code{gnus-article-capitalize-sentences}).
8456
8457 @item W c
8458 @kindex W c (Summary)
8459 @findex gnus-article-remove-cr
8460 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8461 (this takes care of DOS line endings), and then translate any remaining
8462 CRs into LF (this takes care of Mac line endings)
8463 (@code{gnus-article-remove-cr}).
8464
8465 @item W q
8466 @kindex W q (Summary)
8467 @findex gnus-article-de-quoted-unreadable
8468 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8469 Quoted-Printable is one common @acronym{MIME} encoding employed when
8470 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8471 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8472 doesn't look very readable to me.  Note that this is usually done
8473 automatically by Gnus if the message in question has a
8474 @code{Content-Transfer-Encoding} header that says that this encoding
8475 has been done.  If a prefix is given, a charset will be asked for.
8476
8477 @item W 6
8478 @kindex W 6 (Summary)
8479 @findex gnus-article-de-base64-unreadable
8480 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8481 one common @acronym{MIME} encoding employed when sending
8482 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8483 usually done automatically by Gnus if the message in question has a
8484 @code{Content-Transfer-Encoding} header that says that this encoding
8485 has been done.  If a prefix is given, a charset will be asked for.
8486
8487 @item W Z
8488 @kindex W Z (Summary)
8489 @findex gnus-article-decode-HZ
8490 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8491 common encoding employed when sending Chinese articles.  It typically
8492 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8493
8494 @item W u
8495 @kindex W u (Summary)
8496 @findex gnus-article-unsplit-urls
8497 Remove newlines from within URLs.  Some mailers insert newlines into
8498 outgoing email messages to keep lines short.  This reformatting can
8499 split long URLs onto multiple lines.  Repair those URLs by removing
8500 the newlines (@code{gnus-article-unsplit-urls}).
8501
8502 @item W h
8503 @kindex W h (Summary)
8504 @findex gnus-article-wash-html
8505 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8506 usually done automatically by Gnus if the message in question has a
8507 @code{Content-Type} header that says that the message is @acronym{HTML}.
8508
8509 If a prefix is given, a charset will be asked for.
8510
8511 @vindex gnus-article-wash-function
8512 The default is to use the function specified by
8513 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8514 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8515 @acronym{HTML}, but this is controlled by the
8516 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8517 can use include:
8518
8519 @table @code
8520 @item w3
8521 Use Emacs/w3.
8522
8523 @item w3m
8524 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8525
8526 @item links
8527 Use @uref{http://links.sf.net/, Links}.
8528
8529 @item lynx
8530 Use @uref{http://lynx.isc.org/, Lynx}.
8531
8532 @item html2text
8533 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8534
8535 @end table
8536
8537 @item W b
8538 @kindex W b (Summary)
8539 @findex gnus-article-add-buttons
8540 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8541 @xref{Article Buttons}.
8542
8543 @item W B
8544 @kindex W B (Summary)
8545 @findex gnus-article-add-buttons-to-head
8546 Add clickable buttons to the article headers
8547 (@code{gnus-article-add-buttons-to-head}).
8548
8549 @item W p
8550 @kindex W p (Summary)
8551 @findex gnus-article-verify-x-pgp-sig
8552 Verify a signed control message
8553 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8554 @code{newgroup} and @code{checkgroups} are usually signed by the
8555 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8556 the maintainer to your keyring to verify the
8557 message.@footnote{@acronym{PGP} keys for many hierarchies are
8558 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8559
8560 @item W s
8561 @kindex W s (Summary)
8562 @findex gnus-summary-force-verify-and-decrypt
8563 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8564 @acronym{S/MIME}) message
8565 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8566
8567 @item W a
8568 @kindex W a (Summary)
8569 @findex gnus-article-strip-headers-in-body
8570 Strip headers like the @code{X-No-Archive} header from the beginning of
8571 article bodies (@code{gnus-article-strip-headers-in-body}).
8572
8573 @item W E l
8574 @kindex W E l (Summary)
8575 @findex gnus-article-strip-leading-blank-lines
8576 Remove all blank lines from the beginning of the article
8577 (@code{gnus-article-strip-leading-blank-lines}).
8578
8579 @item W E m
8580 @kindex W E m (Summary)
8581 @findex gnus-article-strip-multiple-blank-lines
8582 Replace all blank lines with empty lines and then all multiple empty
8583 lines with a single empty line.
8584 (@code{gnus-article-strip-multiple-blank-lines}).
8585
8586 @item W E t
8587 @kindex W E t (Summary)
8588 @findex gnus-article-remove-trailing-blank-lines
8589 Remove all blank lines at the end of the article
8590 (@code{gnus-article-remove-trailing-blank-lines}).
8591
8592 @item W E a
8593 @kindex W E a (Summary)
8594 @findex gnus-article-strip-blank-lines
8595 Do all the three commands above
8596 (@code{gnus-article-strip-blank-lines}).
8597
8598 @item W E A
8599 @kindex W E A (Summary)
8600 @findex gnus-article-strip-all-blank-lines
8601 Remove all blank lines
8602 (@code{gnus-article-strip-all-blank-lines}).
8603
8604 @item W E s
8605 @kindex W E s (Summary)
8606 @findex gnus-article-strip-leading-space
8607 Remove all white space from the beginning of all lines of the article
8608 body (@code{gnus-article-strip-leading-space}).
8609
8610 @item W E e
8611 @kindex W E e (Summary)
8612 @findex gnus-article-strip-trailing-space
8613 Remove all white space from the end of all lines of the article
8614 body (@code{gnus-article-strip-trailing-space}).
8615
8616 @end table
8617
8618 @xref{Customizing Articles}, for how to wash articles automatically.
8619
8620
8621 @node Article Header
8622 @subsection Article Header
8623
8624 These commands perform various transformations of article header.
8625
8626 @table @kbd
8627
8628 @item W G u
8629 @kindex W G u (Summary)
8630 @findex gnus-article-treat-unfold-headers
8631 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8632
8633 @item W G n
8634 @kindex W G n (Summary)
8635 @findex gnus-article-treat-fold-newsgroups
8636 Fold the @code{Newsgroups} and @code{Followup-To} headers
8637 (@code{gnus-article-treat-fold-newsgroups}).
8638
8639 @item W G f
8640 @kindex W G f (Summary)
8641 @findex gnus-article-treat-fold-headers
8642 Fold all the message headers
8643 (@code{gnus-article-treat-fold-headers}).
8644
8645 @item W E w
8646 @kindex W E w
8647 @findex gnus-article-remove-leading-whitespace
8648 Remove excessive whitespace from all headers
8649 (@code{gnus-article-remove-leading-whitespace}).
8650
8651 @end table
8652
8653
8654 @node Article Buttons
8655 @subsection Article Buttons
8656 @cindex buttons
8657
8658 People often include references to other stuff in articles, and it would
8659 be nice if Gnus could just fetch whatever it is that people talk about
8660 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8661 button on these references.
8662
8663 @vindex gnus-button-man-handler
8664 Gnus adds @dfn{buttons} to certain standard references by default:
8665 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8666 Emacs or Gnus related references.  This is controlled by two variables,
8667 one that handles article bodies and one that handles article heads:
8668
8669 @table @code
8670
8671 @item gnus-button-alist
8672 @vindex gnus-button-alist
8673 This is an alist where each entry has this form:
8674
8675 @lisp
8676 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8677 @end lisp
8678
8679 @table @var
8680
8681 @item regexp
8682 All text that match this regular expression (case insensitive) will be
8683 considered an external reference.  Here's a typical regexp that matches
8684 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8685 variable containing a regexp, useful variables to use include
8686 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8687
8688 @item button-par
8689 Gnus has to know which parts of the matches is to be highlighted.  This
8690 is a number that says what sub-expression of the regexp is to be
8691 highlighted.  If you want it all highlighted, you use 0 here.
8692
8693 @item use-p
8694 This form will be @code{eval}ed, and if the result is non-@code{nil},
8695 this is considered a match.  This is useful if you want extra sifting to
8696 avoid false matches.  Often variables named
8697 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8698 Levels}, but any other form may be used too.
8699
8700 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8701
8702 @item function
8703 This function will be called when you click on this button.
8704
8705 @item data-par
8706 As with @var{button-par}, this is a sub-expression number, but this one
8707 says which part of the match is to be sent as data to @var{function}.
8708
8709 @end table
8710
8711 So the full entry for buttonizing URLs is then
8712
8713 @lisp
8714 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8715 @end lisp
8716
8717 @item gnus-header-button-alist
8718 @vindex gnus-header-button-alist
8719 This is just like the other alist, except that it is applied to the
8720 article head only, and that each entry has an additional element that is
8721 used to say what headers to apply the buttonize coding to:
8722
8723 @lisp
8724 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8725 @end lisp
8726
8727 @var{header} is a regular expression.
8728 @end table
8729
8730 @subsubsection Related variables and functions
8731
8732 @table @code
8733 @item gnus-button-@var{*}-level
8734 @xref{Article Button Levels}.
8735
8736 @c Stuff related to gnus-button-browse-level
8737
8738 @item gnus-button-url-regexp
8739 @vindex gnus-button-url-regexp
8740 A regular expression that matches embedded URLs.  It is used in the
8741 default values of the variables above.
8742
8743 @c Stuff related to gnus-button-man-level
8744
8745 @item gnus-button-man-handler
8746 @vindex gnus-button-man-handler
8747 The function to use for displaying man pages.  It must take at least one
8748 argument with a string naming the man page.
8749
8750 @c Stuff related to gnus-button-message-level
8751
8752 @item gnus-button-mid-or-mail-regexp
8753 @vindex gnus-button-mid-or-mail-regexp
8754 Regular expression that matches a message ID or a mail address.
8755
8756 @item gnus-button-prefer-mid-or-mail
8757 @vindex gnus-button-prefer-mid-or-mail
8758 This variable determines what to do when the button on a string as
8759 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8760 message ID or a mail address.  If it is one of the symbols @code{mid} or
8761 @code{mail}, Gnus will always assume that the string is a message ID or
8762 a mail address, respectively.  If this variable is set to the symbol
8763 @code{ask}, always query the user what do do.  If it is a function, this
8764 function will be called with the string as it's only argument.  The
8765 function must return @code{mid}, @code{mail}, @code{invalid} or
8766 @code{ask}.  The default value is the function
8767 @code{gnus-button-mid-or-mail-heuristic}.
8768
8769 @item gnus-button-mid-or-mail-heuristic
8770 @findex gnus-button-mid-or-mail-heuristic
8771 Function that guesses whether it's argument is a message ID or a mail
8772 address.  Returns @code{mid} it's a message IDs, @code{mail} if it's a
8773 mail address, @code{ask} if unsure and @code{invalid} if the string is
8774 invalid.
8775
8776 @item gnus-button-mid-or-mail-heuristic-alist
8777 @vindex gnus-button-mid-or-mail-heuristic-alist
8778 An alist of @code{(RATE . REGEXP)} pairs used by the function
8779 @code{gnus-button-mid-or-mail-heuristic}.
8780
8781 @c Stuff related to gnus-button-tex-level
8782
8783 @item gnus-button-ctan-handler
8784 @findex gnus-button-ctan-handler
8785 The function to use for displaying CTAN links.  It must take one
8786 argument, the string naming the URL.
8787
8788 @item gnus-ctan-url
8789 @vindex gnus-ctan-url
8790 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8791 by @code{gnus-button-ctan-handler}.
8792
8793 @c Misc stuff
8794
8795 @item gnus-article-button-face
8796 @vindex gnus-article-button-face
8797 Face used on buttons.
8798
8799 @item gnus-article-mouse-face
8800 @vindex gnus-article-mouse-face
8801 Face used when the mouse cursor is over a button.
8802
8803 @end table
8804
8805 @xref{Customizing Articles}, for how to buttonize articles automatically.
8806
8807
8808 @node Article Button Levels
8809 @subsection Article button levels
8810 @cindex button levels
8811 The higher the value of the variables @code{gnus-button-@var{*}-level},
8812 the more buttons will appear.  If the level is zero, no corresponding
8813 buttons are displayed.  With the default value (which is 5) you should
8814 already see quite a lot of buttons.  With higher levels, you will see
8815 more buttons, but you may also get more false positives.  To avoid them,
8816 you can set the variables @code{gnus-button-@var{*}-level} local to
8817 specific groups (@pxref{Group Parameters}).  Here's an example for the
8818 variable @code{gnus-parameters}:
8819
8820 @lisp
8821 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8822 (setq gnus-parameters
8823       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8824         ("\\<unix\\>"               (gnus-button-man-level 10))
8825         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8826 @end lisp
8827
8828 @table @code
8829
8830 @item gnus-button-browse-level
8831 @vindex gnus-button-browse-level
8832 Controls the display of references to message IDs, mail addresses and
8833 news URLs.  Related variables and functions include
8834 @code{gnus-button-url-regexp}, @code{browse-url}, and
8835 @code{browse-url-browser-function}.
8836
8837 @item gnus-button-emacs-level
8838 @vindex gnus-button-emacs-level
8839 Controls the display of Emacs or Gnus references.  Related functions are
8840 @code{gnus-button-handle-custom},
8841 @code{gnus-button-handle-describe-function},
8842 @code{gnus-button-handle-describe-variable},
8843 @code{gnus-button-handle-symbol},
8844 @code{gnus-button-handle-describe-key},
8845 @code{gnus-button-handle-apropos},
8846 @code{gnus-button-handle-apropos-command},
8847 @code{gnus-button-handle-apropos-variable},
8848 @code{gnus-button-handle-apropos-documentation}, and
8849 @code{gnus-button-handle-library}.
8850
8851 @item gnus-button-man-level
8852 @vindex gnus-button-man-level
8853 Controls the display of references to (Unix) man pages.
8854 See @code{gnus-button-man-handler}.
8855
8856 @item gnus-button-message-level
8857 @vindex gnus-button-message-level
8858 Controls the display of message IDs, mail addresses and news URLs.
8859 Related variables and functions include
8860 @code{gnus-button-mid-or-mail-regexp},
8861 @code{gnus-button-prefer-mid-or-mail},
8862 @code{gnus-button-mid-or-mail-heuristic}, and
8863 @code{gnus-button-mid-or-mail-heuristic-alist}.
8864
8865 @item gnus-button-tex-level
8866 @vindex gnus-button-tex-level
8867 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8868 URLs.  See the variables @code{gnus-ctan-url},
8869 @code{gnus-button-ctan-handler},
8870 @code{gnus-button-ctan-directory-regexp}, and
8871 @code{gnus-button-handle-ctan-bogus-regexp}.
8872
8873 @end table
8874
8875
8876 @node Article Date
8877 @subsection Article Date
8878
8879 The date is most likely generated in some obscure timezone you've never
8880 heard of, so it's quite nice to be able to find out what the time was
8881 when the article was sent.
8882
8883 @table @kbd
8884
8885 @item W T u
8886 @kindex W T u (Summary)
8887 @findex gnus-article-date-ut
8888 Display the date in UT (aka. GMT, aka ZULU)
8889 (@code{gnus-article-date-ut}).
8890
8891 @item W T i
8892 @kindex W T i (Summary)
8893 @findex gnus-article-date-iso8601
8894 @cindex ISO 8601
8895 Display the date in international format, aka. ISO 8601
8896 (@code{gnus-article-date-iso8601}).
8897
8898 @item W T l
8899 @kindex W T l (Summary)
8900 @findex gnus-article-date-local
8901 Display the date in the local timezone (@code{gnus-article-date-local}).
8902
8903 @item W T p
8904 @kindex W T p (Summary)
8905 @findex gnus-article-date-english
8906 Display the date in a format that's easily pronounceable in English
8907 (@code{gnus-article-date-english}).
8908
8909 @item W T s
8910 @kindex W T s (Summary)
8911 @vindex gnus-article-time-format
8912 @findex gnus-article-date-user
8913 @findex format-time-string
8914 Display the date using a user-defined format
8915 (@code{gnus-article-date-user}).  The format is specified by the
8916 @code{gnus-article-time-format} variable, and is a string that's passed
8917 to @code{format-time-string}.  See the documentation of that variable
8918 for a list of possible format specs.
8919
8920 @item W T e
8921 @kindex W T e (Summary)
8922 @findex gnus-article-date-lapsed
8923 @findex gnus-start-date-timer
8924 @findex gnus-stop-date-timer
8925 Say how much time has elapsed between the article was posted and now
8926 (@code{gnus-article-date-lapsed}).  It looks something like:
8927
8928 @example
8929 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8930 @end example
8931
8932 @vindex gnus-article-date-lapsed-new-header
8933 The value of @code{gnus-article-date-lapsed-new-header} determines
8934 whether this header will just be added below the old Date one, or will
8935 replace it.
8936
8937 An advantage of using Gnus to read mail is that it converts simple bugs
8938 into wonderful absurdities.
8939
8940 If you want to have this line updated continually, you can put
8941
8942 @lisp
8943 (gnus-start-date-timer)
8944 @end lisp
8945
8946 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8947 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8948 command.
8949
8950 @item W T o
8951 @kindex W T o (Summary)
8952 @findex gnus-article-date-original
8953 Display the original date (@code{gnus-article-date-original}).  This can
8954 be useful if you normally use some other conversion function and are
8955 worried that it might be doing something totally wrong.  Say, claiming
8956 that the article was posted in 1854.  Although something like that is
8957 @emph{totally} impossible.  Don't you trust me? *titter*
8958
8959 @end table
8960
8961 @xref{Customizing Articles}, for how to display the date in your
8962 preferred format automatically.
8963
8964
8965 @node Article Display
8966 @subsection Article Display
8967 @cindex picons
8968 @cindex x-face
8969 @cindex smileys
8970
8971 These commands add various frivolous display gimmicks to the article
8972 buffer in Emacs versions that support them.
8973
8974 @code{X-Face} headers are small black-and-white images supplied by the
8975 message headers (@pxref{X-Face}).
8976
8977 Picons, on the other hand, reside on your own system, and Gnus will
8978 try to match the headers to what you have (@pxref{Picons}).
8979
8980 Smileys are those little @samp{:-)} symbols that people like to litter
8981 their messages with (@pxref{Smileys}).
8982
8983 All these functions are toggles---if the elements already exist,
8984 they'll be removed.
8985
8986 @table @kbd
8987 @item W D x
8988 @kindex W D x (Summary)
8989 @findex gnus-article-display-x-face
8990 Display an @code{X-Face} in the @code{From} header.
8991 (@code{gnus-article-display-x-face}).
8992
8993 @item W D d
8994 @kindex W D d (Summary)
8995 @findex gnus-article-display-face
8996 Display a @code{Face} in the @code{From} header.
8997 (@code{gnus-article-display-face}).
8998
8999 @item W D s
9000 @kindex W D s (Summary)
9001 @findex gnus-treat-smiley
9002 Display smileys (@code{gnus-treat-smiley}).
9003
9004 @item W D f
9005 @kindex W D f (Summary)
9006 @findex gnus-treat-from-picon
9007 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9008
9009 @item W D m
9010 @kindex W D m (Summary)
9011 @findex gnus-treat-mail-picon
9012 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9013 (@code{gnus-treat-mail-picon}).
9014
9015 @item W D n
9016 @kindex W D n (Summary)
9017 @findex gnus-treat-newsgroups-picon
9018 Piconify all news headers (i. e., @code{Newsgroups} and
9019 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9020
9021 @item W D D
9022 @kindex W D D (Summary)
9023 @findex gnus-article-remove-images
9024 Remove all images from the article buffer
9025 (@code{gnus-article-remove-images}).
9026
9027 @end table
9028
9029
9030
9031 @node Article Signature
9032 @subsection Article Signature
9033 @cindex signatures
9034 @cindex article signature
9035
9036 @vindex gnus-signature-separator
9037 Each article is divided into two parts---the head and the body.  The
9038 body can be divided into a signature part and a text part.  The variable
9039 that says what is to be considered a signature is
9040 @code{gnus-signature-separator}.  This is normally the standard
9041 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9042 non-standard signature separators, so this variable can also be a list
9043 of regular expressions to be tested, one by one.  (Searches are done
9044 from the end of the body towards the beginning.)  One likely value is:
9045
9046 @lisp
9047 (setq gnus-signature-separator
9048       '("^-- $"         ; @r{The standard}
9049         "^-- *$"        ; @r{A common mangling}
9050         "^-------*$"    ; @r{Many people just use a looong}
9051                         ; @r{line of dashes.  Shame!}
9052         "^ *--------*$" ; @r{Double-shame!}
9053         "^________*$"   ; @r{Underscores are also popular}
9054         "^========*$")) ; @r{Pervert!}
9055 @end lisp
9056
9057 The more permissive you are, the more likely it is that you'll get false
9058 positives.
9059
9060 @vindex gnus-signature-limit
9061 @code{gnus-signature-limit} provides a limit to what is considered a
9062 signature when displaying articles.
9063
9064 @enumerate
9065 @item
9066 If it is an integer, no signature may be longer (in characters) than
9067 that integer.
9068 @item
9069 If it is a floating point number, no signature may be longer (in lines)
9070 than that number.
9071 @item
9072 If it is a function, the function will be called without any parameters,
9073 and if it returns @code{nil}, there is no signature in the buffer.
9074 @item
9075 If it is a string, it will be used as a regexp.  If it matches, the text
9076 in question is not a signature.
9077 @end enumerate
9078
9079 This variable can also be a list where the elements may be of the types
9080 listed above.  Here's an example:
9081
9082 @lisp
9083 (setq gnus-signature-limit
9084       '(200.0 "^---*Forwarded article"))
9085 @end lisp
9086
9087 This means that if there are more than 200 lines after the signature
9088 separator, or the text after the signature separator is matched by
9089 the regular expression @samp{^---*Forwarded article}, then it isn't a
9090 signature after all.
9091
9092
9093 @node Article Miscellanea
9094 @subsection Article Miscellanea
9095
9096 @table @kbd
9097 @item A t
9098 @kindex A t (Summary)
9099 @findex gnus-article-babel
9100 Translate the article from one language to another
9101 (@code{gnus-article-babel}).
9102
9103 @end table
9104
9105
9106 @node MIME Commands
9107 @section MIME Commands
9108 @cindex MIME decoding
9109 @cindex attachments
9110 @cindex viewing attachments
9111
9112 The following commands all understand the numerical prefix.  For
9113 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9114
9115 @table @kbd
9116 @item b
9117 @itemx K v
9118 @kindex b (Summary)
9119 @kindex K v (Summary)
9120 View the @acronym{MIME} part.
9121
9122 @item K o
9123 @kindex K o (Summary)
9124 Save the @acronym{MIME} part.
9125
9126 @item K c
9127 @kindex K c (Summary)
9128 Copy the @acronym{MIME} part.
9129
9130 @item K e
9131 @kindex K e (Summary)
9132 View the @acronym{MIME} part externally.
9133
9134 @item K i
9135 @kindex K i (Summary)
9136 View the @acronym{MIME} part internally.
9137
9138 @item K |
9139 @kindex K | (Summary)
9140 Pipe the @acronym{MIME} part to an external command.
9141 @end table
9142
9143 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9144 the same manner:
9145
9146 @table @kbd
9147 @item K b
9148 @kindex K b (Summary)
9149 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9150 mostly useful if you wish to save (or perform other actions) on inlined
9151 parts.
9152
9153 @item K m
9154 @kindex K m (Summary)
9155 @findex gnus-summary-repair-multipart
9156 Some multipart messages are transmitted with missing or faulty headers.
9157 This command will attempt to ``repair'' these messages so that they can
9158 be viewed in a more pleasant manner
9159 (@code{gnus-summary-repair-multipart}).
9160
9161 @item X m
9162 @kindex X m (Summary)
9163 @findex gnus-summary-save-parts
9164 Save all parts matching a @acronym{MIME} type to a directory
9165 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9166 convention (@pxref{Process/Prefix}).
9167
9168 @item M-t
9169 @kindex M-t (Summary)
9170 @findex gnus-summary-toggle-display-buttonized
9171 Toggle the buttonized display of the article buffer
9172 (@code{gnus-summary-toggle-display-buttonized}).
9173
9174 @item W M w
9175 @kindex W M w (Summary)
9176 @findex gnus-article-decode-mime-words
9177 Decode RFC 2047-encoded words in the article headers
9178 (@code{gnus-article-decode-mime-words}).
9179
9180 @item W M c
9181 @kindex W M c (Summary)
9182 @findex gnus-article-decode-charset
9183 Decode encoded article bodies as well as charsets
9184 (@code{gnus-article-decode-charset}).
9185
9186 This command looks in the @code{Content-Type} header to determine the
9187 charset.  If there is no such header in the article, you can give it a
9188 prefix, which will prompt for the charset to decode as.  In regional
9189 groups where people post using some common encoding (but do not
9190 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9191 parameter to the required charset (@pxref{Group Parameters}).
9192
9193 @item W M v
9194 @kindex W M v (Summary)
9195 @findex gnus-mime-view-all-parts
9196 View all the @acronym{MIME} parts in the current article
9197 (@code{gnus-mime-view-all-parts}).
9198
9199 @end table
9200
9201 Relevant variables:
9202
9203 @table @code
9204 @item gnus-ignored-mime-types
9205 @vindex gnus-ignored-mime-types
9206 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9207 this list will be completely ignored by Gnus.  The default value is
9208 @code{nil}.
9209
9210 To have all Vcards be ignored, you'd say something like this:
9211
9212 @lisp
9213 (setq gnus-ignored-mime-types
9214       '("text/x-vcard"))
9215 @end lisp
9216
9217 @item gnus-article-loose-mime
9218 @vindex gnus-article-loose-mime
9219 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9220 before interpreting the message as a @acronym{MIME} message.  This helps
9221 when reading messages from certain broken mail user agents.  The
9222 default is @code{nil}.
9223
9224 @item gnus-article-emulate-mime
9225 @vindex gnus-article-emulate-mime
9226 There are other, non-@acronym{MIME} encoding methods used.  The most common
9227 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9228 this variable is non-@code{nil}, Gnus will look in message bodies to
9229 see if it finds these encodings, and if so, it'll run them through the
9230 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9231
9232 @item gnus-unbuttonized-mime-types
9233 @vindex gnus-unbuttonized-mime-types
9234 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9235 this list won't have @acronym{MIME} buttons inserted unless they aren't
9236 displayed or this variable is overridden by
9237 @code{gnus-buttonized-mime-types}.  The default value is
9238 @code{(".*/.*")}.  This variable is only used when
9239 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9240
9241 @item gnus-buttonized-mime-types
9242 @vindex gnus-buttonized-mime-types
9243 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9244 this list will have @acronym{MIME} buttons inserted unless they aren't
9245 displayed.  This variable overrides
9246 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9247 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9248 is @code{nil}.
9249
9250 To see e.g. security buttons but no other buttons, you could set this
9251 variable to @code{("multipart/signed")} and leave
9252 @code{gnus-unbuttonized-mime-types} at the default value.
9253
9254 @item gnus-inhibit-mime-unbuttonizing
9255 @vindex gnus-inhibit-mime-unbuttonizing
9256 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9257 default value is @code{nil}.
9258
9259 @item gnus-article-mime-part-function
9260 @vindex gnus-article-mime-part-function
9261 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9262 handle as the parameter.  The function is meant to be used to allow
9263 users to gather information from the article (e. g., add Vcard info to
9264 the bbdb database) or to do actions based on parts (e. g., automatically
9265 save all jpegs into some directory).
9266
9267 Here's an example function the does the latter:
9268
9269 @lisp
9270 (defun my-save-all-jpeg-parts (handle)
9271   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9272     (with-temp-buffer
9273       (insert (mm-get-part handle))
9274       (write-region (point-min) (point-max)
9275                     (read-file-name "Save jpeg to: ")))))
9276 (setq gnus-article-mime-part-function
9277       'my-save-all-jpeg-parts)
9278 @end lisp
9279
9280 @vindex gnus-mime-multipart-functions
9281 @item gnus-mime-multipart-functions
9282 Alist of @acronym{MIME} multipart types and functions to handle them.
9283
9284 @vindex mm-file-name-rewrite-functions
9285 @item mm-file-name-rewrite-functions
9286 List of functions used for rewriting file names of @acronym{MIME} parts.
9287 Each function takes a file name as input and returns a file name.
9288
9289 Ready-made functions include@*
9290 @code{mm-file-name-delete-whitespace},
9291 @code{mm-file-name-trim-whitespace},
9292 @code{mm-file-name-collapse-whitespace}, and
9293 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9294 the variable @code{mm-file-name-replace-whitespace} to replace each
9295 whitespace character in a file name with that string; default value
9296 is @code{"_"} (a single underscore).
9297 @findex mm-file-name-delete-whitespace
9298 @findex mm-file-name-trim-whitespace
9299 @findex mm-file-name-collapse-whitespace
9300 @findex mm-file-name-replace-whitespace
9301 @vindex mm-file-name-replace-whitespace
9302
9303 The standard functions @code{capitalize}, @code{downcase},
9304 @code{upcase}, and @code{upcase-initials} may be useful, too.
9305
9306 Everybody knows that whitespace characters in file names are evil,
9307 except those who don't know.  If you receive lots of attachments from
9308 such unenlightened users, you can make live easier by adding
9309
9310 @lisp
9311 (setq mm-file-name-rewrite-functions
9312       '(mm-file-name-trim-whitespace
9313         mm-file-name-collapse-whitespace
9314         mm-file-name-replace-whitespace))
9315 @end lisp
9316
9317 @noindent
9318 to your @file{~/.gnus.el} file.
9319
9320 @end table
9321
9322
9323 @node Charsets
9324 @section Charsets
9325 @cindex charsets
9326
9327 People use different charsets, and we have @acronym{MIME} to let us know what
9328 charsets they use.  Or rather, we wish we had.  Many people use
9329 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9330 just send out messages without saying what character sets they use.  To
9331 help a bit with this, some local news hierarchies have policies that say
9332 what character set is the default.  For instance, the @samp{fj}
9333 hierarchy uses @code{iso-2022-jp-2}.
9334
9335 @vindex gnus-group-charset-alist
9336 This knowledge is encoded in the @code{gnus-group-charset-alist}
9337 variable, which is an alist of regexps (use the first item to match full
9338 group names) and default charsets to be used when reading these groups.
9339
9340 @vindex gnus-newsgroup-ignored-charsets
9341 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9342 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9343 even if they really are in @code{koi-8}.  To help here, the
9344 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9345 charsets that are listed here will be ignored.  The variable can be
9346 set on a group-by-group basis using the group parameters (@pxref{Group
9347 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9348 which includes values some agents insist on having in there.
9349
9350 @vindex gnus-group-posting-charset-alist
9351 When posting, @code{gnus-group-posting-charset-alist} is used to
9352 determine which charsets should not be encoded using the @acronym{MIME}
9353 encodings.  For instance, some hierarchies discourage using
9354 quoted-printable header encoding.
9355
9356 This variable is an alist of regexps and permitted unencoded charsets
9357 for posting.  Each element of the alist has the form @code{(}@var{test
9358 header body-list}@code{)}, where:
9359
9360 @table @var
9361 @item test
9362 is either a regular expression matching the newsgroup header or a
9363 variable to query,
9364 @item header
9365 is the charset which may be left unencoded in the header (@code{nil}
9366 means encode all charsets),
9367 @item body-list
9368 is a list of charsets which may be encoded using 8bit content-transfer
9369 encoding in the body, or one of the special values @code{nil} (always
9370 encode using quoted-printable) or @code{t} (always use 8bit).
9371 @end table
9372
9373 @cindex Russian
9374 @cindex koi8-r
9375 @cindex koi8-u
9376 @cindex iso-8859-5
9377 @cindex coding system aliases
9378 @cindex preferred charset
9379
9380 Other charset tricks that may be useful, although not Gnus-specific:
9381
9382 If there are several @acronym{MIME} charsets that encode the same Emacs
9383 charset, you can choose what charset to use by saying the following:
9384
9385 @lisp
9386 (put-charset-property 'cyrillic-iso8859-5
9387                       'preferred-coding-system 'koi8-r)
9388 @end lisp
9389
9390 This means that Russian will be encoded using @code{koi8-r} instead of
9391 the default @code{iso-8859-5} @acronym{MIME} charset.
9392
9393 If you want to read messages in @code{koi8-u}, you can cheat and say
9394
9395 @lisp
9396 (define-coding-system-alias 'koi8-u 'koi8-r)
9397 @end lisp
9398
9399 This will almost do the right thing.
9400
9401 And finally, to read charsets like @code{windows-1251}, you can say
9402 something like
9403
9404 @lisp
9405 (codepage-setup 1251)
9406 (define-coding-system-alias 'windows-1251 'cp1251)
9407 @end lisp
9408
9409
9410 @node Article Commands
9411 @section Article Commands
9412
9413 @table @kbd
9414
9415 @item A P
9416 @cindex PostScript
9417 @cindex printing
9418 @kindex A P (Summary)
9419 @vindex gnus-ps-print-hook
9420 @findex gnus-summary-print-article
9421 Generate and print a PostScript image of the article buffer
9422 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9423 be run just before printing the buffer.  An alternative way to print
9424 article is to use Muttprint (@pxref{Saving Articles}).
9425
9426 @end table
9427
9428
9429 @node Summary Sorting
9430 @section Summary Sorting
9431 @cindex summary sorting
9432
9433 You can have the summary buffer sorted in various ways, even though I
9434 can't really see why you'd want that.
9435
9436 @table @kbd
9437
9438 @item C-c C-s C-n
9439 @kindex C-c C-s C-n (Summary)
9440 @findex gnus-summary-sort-by-number
9441 Sort by article number (@code{gnus-summary-sort-by-number}).
9442
9443 @item C-c C-s C-a
9444 @kindex C-c C-s C-a (Summary)
9445 @findex gnus-summary-sort-by-author
9446 Sort by author (@code{gnus-summary-sort-by-author}).
9447
9448 @item C-c C-s C-s
9449 @kindex C-c C-s C-s (Summary)
9450 @findex gnus-summary-sort-by-subject
9451 Sort by subject (@code{gnus-summary-sort-by-subject}).
9452
9453 @item C-c C-s C-d
9454 @kindex C-c C-s C-d (Summary)
9455 @findex gnus-summary-sort-by-date
9456 Sort by date (@code{gnus-summary-sort-by-date}).
9457
9458 @item C-c C-s C-l
9459 @kindex C-c C-s C-l (Summary)
9460 @findex gnus-summary-sort-by-lines
9461 Sort by lines (@code{gnus-summary-sort-by-lines}).
9462
9463 @item C-c C-s C-c
9464 @kindex C-c C-s C-c (Summary)
9465 @findex gnus-summary-sort-by-chars
9466 Sort by article length (@code{gnus-summary-sort-by-chars}).
9467
9468 @item C-c C-s C-i
9469 @kindex C-c C-s C-i (Summary)
9470 @findex gnus-summary-sort-by-score
9471 Sort by score (@code{gnus-summary-sort-by-score}).
9472
9473 @item C-c C-s C-r
9474 @kindex C-c C-s C-r (Summary)
9475 @findex gnus-summary-sort-by-random
9476 Randomize (@code{gnus-summary-sort-by-random}).
9477
9478 @item C-c C-s C-o
9479 @kindex C-c C-s C-o (Summary)
9480 @findex gnus-summary-sort-by-original
9481 Sort using the default sorting method
9482 (@code{gnus-summary-sort-by-original}).
9483 @end table
9484
9485 These functions will work both when you use threading and when you don't
9486 use threading.  In the latter case, all summary lines will be sorted,
9487 line by line.  In the former case, sorting will be done on a
9488 root-by-root basis, which might not be what you were looking for.  To
9489 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9490 Commands}).
9491
9492
9493 @node Finding the Parent
9494 @section Finding the Parent
9495 @cindex parent articles
9496 @cindex referring articles
9497
9498 @table @kbd
9499 @item ^
9500 @kindex ^ (Summary)
9501 @findex gnus-summary-refer-parent-article
9502 If you'd like to read the parent of the current article, and it is not
9503 displayed in the summary buffer, you might still be able to.  That is,
9504 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9505 and the @code{References} in the current article are not mangled, you
9506 can just press @kbd{^} or @kbd{A r}
9507 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9508 you'll get the parent.  If the parent is already displayed in the
9509 summary buffer, point will just move to this article.
9510
9511 If given a positive numerical prefix, fetch that many articles back into
9512 the ancestry.  If given a negative numerical prefix, fetch just that
9513 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9514 grandparent and the grandgrandparent of the current article.  If you say
9515 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9516 article.
9517
9518 @item A R (Summary)
9519 @findex gnus-summary-refer-references
9520 @kindex A R (Summary)
9521 Fetch all articles mentioned in the @code{References} header of the
9522 article (@code{gnus-summary-refer-references}).
9523
9524 @item A T (Summary)
9525 @findex gnus-summary-refer-thread
9526 @kindex A T (Summary)
9527 Display the full thread where the current article appears
9528 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9529 headers in the current group to work, so it usually takes a while.  If
9530 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9531 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9532 visible effects normally, but it'll make this command work a whole lot
9533 faster.  Of course, it'll make group entry somewhat slow.
9534
9535 @vindex gnus-refer-thread-limit
9536 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9537 articles before the first displayed in the current group) headers to
9538 fetch when doing this command.  The default is 200.  If @code{t}, all
9539 the available headers will be fetched.  This variable can be overridden
9540 by giving the @kbd{A T} command a numerical prefix.
9541
9542 @item M-^ (Summary)
9543 @findex gnus-summary-refer-article
9544 @kindex M-^ (Summary)
9545 @cindex Message-ID
9546 @cindex fetching by Message-ID
9547 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9548 matter what group it belongs to.  @kbd{M-^}
9549 (@code{gnus-summary-refer-article}) will ask you for a
9550 @code{Message-ID}, which is one of those long, hard-to-read thingies
9551 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9552 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9553 @end table
9554
9555 The current select method will be used when fetching by
9556 @code{Message-ID} from non-news select method, but you can override this
9557 by giving this command a prefix.
9558
9559 @vindex gnus-refer-article-method
9560 If the group you are reading is located on a back end that does not
9561 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9562 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9563 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9564 updating the spool you are reading from, but that's not really
9565 necessary.
9566
9567 It can also be a list of select methods, as well as the special symbol
9568 @code{current}, which means to use the current select method.  If it
9569 is a list, Gnus will try all the methods in the list until it finds a
9570 match.
9571
9572 Here's an example setting that will first try the current method, and
9573 then ask Google if that fails:
9574
9575 @lisp
9576 (setq gnus-refer-article-method
9577       '(current
9578         (nnweb "google" (nnweb-type google))))
9579 @end lisp
9580
9581 Most of the mail back ends support fetching by @code{Message-ID}, but
9582 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9583 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9584 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9585 only able to locate articles that have been posted to the current group.
9586 (Anything else would be too time consuming.)  @code{nnmh} does not
9587 support this at all.
9588
9589
9590 @node Alternative Approaches
9591 @section Alternative Approaches
9592
9593 Different people like to read news using different methods.  This being
9594 Gnus, we offer a small selection of minor modes for the summary buffers.
9595
9596 @menu
9597 * Pick and Read::               First mark articles and then read them.
9598 * Binary Groups::               Auto-decode all articles.
9599 @end menu
9600
9601
9602 @node Pick and Read
9603 @subsection Pick and Read
9604 @cindex pick and read
9605
9606 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9607 a two-phased reading interface.  The user first marks in a summary
9608 buffer the articles she wants to read.  Then she starts reading the
9609 articles with just an article buffer displayed.
9610
9611 @findex gnus-pick-mode
9612 @kindex M-x gnus-pick-mode
9613 Gnus provides a summary buffer minor mode that allows
9614 this---@code{gnus-pick-mode}.  This basically means that a few process
9615 mark commands become one-keystroke commands to allow easy marking, and
9616 it provides one additional command for switching to the summary buffer.
9617
9618 Here are the available keystrokes when using pick mode:
9619
9620 @table @kbd
9621 @item .
9622 @kindex . (Pick)
9623 @findex gnus-pick-article-or-thread
9624 Pick the article or thread on the current line
9625 (@code{gnus-pick-article-or-thread}).  If the variable
9626 @code{gnus-thread-hide-subtree} is true, then this key selects the
9627 entire thread when used at the first article of the thread.  Otherwise,
9628 it selects just the article.  If given a numerical prefix, go to that
9629 thread or article and pick it.  (The line number is normally displayed
9630 at the beginning of the summary pick lines.)
9631
9632 @item SPACE
9633 @kindex SPACE (Pick)
9634 @findex gnus-pick-next-page
9635 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9636 at the end of the buffer, start reading the picked articles.
9637
9638 @item u
9639 @kindex u (Pick)
9640 @findex gnus-pick-unmark-article-or-thread.
9641 Unpick the thread or article
9642 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9643 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9644 thread if used at the first article of the thread.  Otherwise it unpicks
9645 just the article.  You can give this key a numerical prefix to unpick
9646 the thread or article at that line.
9647
9648 @item RET
9649 @kindex RET (Pick)
9650 @findex gnus-pick-start-reading
9651 @vindex gnus-pick-display-summary
9652 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9653 given a prefix, mark all unpicked articles as read first.  If
9654 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9655 will still be visible when you are reading.
9656
9657 @end table
9658
9659 All the normal summary mode commands are still available in the
9660 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9661 which is mapped to the same function
9662 @code{gnus-summary-tick-article-forward}.
9663
9664 If this sounds like a good idea to you, you could say:
9665
9666 @lisp
9667 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9668 @end lisp
9669
9670 @vindex gnus-pick-mode-hook
9671 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9672
9673 @vindex gnus-mark-unpicked-articles-as-read
9674 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9675 all unpicked articles as read.  The default is @code{nil}.
9676
9677 @vindex gnus-summary-pick-line-format
9678 The summary line format in pick mode is slightly different from the
9679 standard format.  At the beginning of each line the line number is
9680 displayed.  The pick mode line format is controlled by the
9681 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9682 Variables}).  It accepts the same format specs that
9683 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9684
9685
9686 @node Binary Groups
9687 @subsection Binary Groups
9688 @cindex binary groups
9689
9690 @findex gnus-binary-mode
9691 @kindex M-x gnus-binary-mode
9692 If you spend much time in binary groups, you may grow tired of hitting
9693 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9694 is a minor mode for summary buffers that makes all ordinary Gnus article
9695 selection functions uudecode series of articles and display the result
9696 instead of just displaying the articles the normal way.
9697
9698 @kindex g (Binary)
9699 @findex gnus-binary-show-article
9700 The only way, in fact, to see the actual articles is the @kbd{g}
9701 command, when you have turned on this mode
9702 (@code{gnus-binary-show-article}).
9703
9704 @vindex gnus-binary-mode-hook
9705 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9706
9707
9708 @node Tree Display
9709 @section Tree Display
9710 @cindex trees
9711
9712 @vindex gnus-use-trees
9713 If you don't like the normal Gnus summary display, you might try setting
9714 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9715 additional @dfn{tree buffer}.  You can execute all summary mode commands
9716 in the tree buffer.
9717
9718 There are a few variables to customize the tree display, of course:
9719
9720 @table @code
9721 @item gnus-tree-mode-hook
9722 @vindex gnus-tree-mode-hook
9723 A hook called in all tree mode buffers.
9724
9725 @item gnus-tree-mode-line-format
9726 @vindex gnus-tree-mode-line-format
9727 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9728 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9729 of valid specs, @pxref{Summary Buffer Mode Line}.
9730
9731 @item gnus-selected-tree-face
9732 @vindex gnus-selected-tree-face
9733 Face used for highlighting the selected article in the tree buffer.  The
9734 default is @code{modeline}.
9735
9736 @item gnus-tree-line-format
9737 @vindex gnus-tree-line-format
9738 A format string for the tree nodes.  The name is a bit of a misnomer,
9739 though---it doesn't define a line, but just the node.  The default value
9740 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9741 the name of the poster.  It is vital that all nodes are of the same
9742 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9743
9744 Valid specs are:
9745
9746 @table @samp
9747 @item n
9748 The name of the poster.
9749 @item f
9750 The @code{From} header.
9751 @item N
9752 The number of the article.
9753 @item [
9754 The opening bracket.
9755 @item ]
9756 The closing bracket.
9757 @item s
9758 The subject.
9759 @end table
9760
9761 @xref{Formatting Variables}.
9762
9763 Variables related to the display are:
9764
9765 @table @code
9766 @item gnus-tree-brackets
9767 @vindex gnus-tree-brackets
9768 This is used for differentiating between ``real'' articles and
9769 ``sparse'' articles.  The format is 
9770 @example
9771 ((@var{real-open} . @var{real-close}) 
9772  (@var{sparse-open} . @var{sparse-close}) 
9773  (@var{dummy-open} . @var{dummy-close}))
9774 @end example
9775 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9776
9777 @item gnus-tree-parent-child-edges
9778 @vindex gnus-tree-parent-child-edges
9779 This is a list that contains the characters used for connecting parent
9780 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9781
9782 @end table
9783
9784 @item gnus-tree-minimize-window
9785 @vindex gnus-tree-minimize-window
9786 If this variable is non-@code{nil}, Gnus will try to keep the tree
9787 buffer as small as possible to allow more room for the other Gnus
9788 windows.  If this variable is a number, the tree buffer will never be
9789 higher than that number.  The default is @code{t}.  Note that if you
9790 have several windows displayed side-by-side in a frame and the tree
9791 buffer is one of these, minimizing the tree window will also resize all
9792 other windows displayed next to it.
9793
9794 You may also wish to add the following hook to keep the window minimized
9795 at all times:
9796
9797 @lisp
9798 (add-hook 'gnus-configure-windows-hook
9799           'gnus-tree-perhaps-minimize)
9800 @end lisp
9801
9802 @item gnus-generate-tree-function
9803 @vindex gnus-generate-tree-function
9804 @findex gnus-generate-horizontal-tree
9805 @findex gnus-generate-vertical-tree
9806 The function that actually generates the thread tree.  Two predefined
9807 functions are available: @code{gnus-generate-horizontal-tree} and
9808 @code{gnus-generate-vertical-tree} (which is the default).
9809
9810 @end table
9811
9812 Here's an example from a horizontal tree buffer:
9813
9814 @example
9815 @{***@}-(***)-[odd]-[Gun]
9816      |      \[Jan]
9817      |      \[odd]-[Eri]
9818      |      \(***)-[Eri]
9819      |            \[odd]-[Paa]
9820      \[Bjo]
9821      \[Gun]
9822      \[Gun]-[Jor]
9823 @end example
9824
9825 Here's the same thread displayed in a vertical tree buffer:
9826
9827 @example
9828 @group
9829 @{***@}
9830   |--------------------------\-----\-----\
9831 (***)                         [Bjo] [Gun] [Gun]
9832   |--\-----\-----\                          |
9833 [odd] [Jan] [odd] (***)                   [Jor]
9834   |           |     |--\
9835 [Gun]       [Eri] [Eri] [odd]
9836                           |
9837                         [Paa]
9838 @end group
9839 @end example
9840
9841 If you're using horizontal trees, it might be nice to display the trees
9842 side-by-side with the summary buffer.  You could add something like the
9843 following to your @file{~/.gnus.el} file:
9844
9845 @lisp
9846 (setq gnus-use-trees t
9847       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9848       gnus-tree-minimize-window nil)
9849 (gnus-add-configuration
9850  '(article
9851    (vertical 1.0
9852              (horizontal 0.25
9853                          (summary 0.75 point)
9854                          (tree 1.0))
9855              (article 1.0))))
9856 @end lisp
9857
9858 @xref{Window Layout}.
9859
9860
9861 @node Mail Group Commands
9862 @section Mail Group Commands
9863 @cindex mail group commands
9864
9865 Some commands only make sense in mail groups.  If these commands are
9866 invalid in the current group, they will raise a hell and let you know.
9867
9868 All these commands (except the expiry and edit commands) use the
9869 process/prefix convention (@pxref{Process/Prefix}).
9870
9871 @table @kbd
9872
9873 @item B e
9874 @kindex B e (Summary)
9875 @findex gnus-summary-expire-articles
9876 Run all expirable articles in the current group through the expiry
9877 process (@code{gnus-summary-expire-articles}).  That is, delete all
9878 expirable articles in the group that have been around for a while.
9879 (@pxref{Expiring Mail}).
9880
9881 @item B C-M-e
9882 @kindex B C-M-e (Summary)
9883 @findex gnus-summary-expire-articles-now
9884 Delete all the expirable articles in the group
9885 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9886 articles eligible for expiry in the current group will
9887 disappear forever into that big @file{/dev/null} in the sky.
9888
9889 @item B DEL
9890 @kindex B DEL (Summary)
9891 @findex gnus-summary-delete-article
9892 @c @icon{gnus-summary-mail-delete}
9893 Delete the mail article.  This is ``delete'' as in ``delete it from your
9894 disk forever and ever, never to return again.'' Use with caution.
9895 (@code{gnus-summary-delete-article}).
9896
9897 @item B m
9898 @kindex B m (Summary)
9899 @cindex move mail
9900 @findex gnus-summary-move-article
9901 @vindex gnus-preserve-marks
9902 Move the article from one mail group to another
9903 (@code{gnus-summary-move-article}).  Marks will be preserved if
9904 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9905
9906 @item B c
9907 @kindex B c (Summary)
9908 @cindex copy mail
9909 @findex gnus-summary-copy-article
9910 @c @icon{gnus-summary-mail-copy}
9911 Copy the article from one group (mail group or not) to a mail group
9912 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9913 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9914
9915 @item B B
9916 @kindex B B (Summary)
9917 @cindex crosspost mail
9918 @findex gnus-summary-crosspost-article
9919 Crosspost the current article to some other group
9920 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9921 the article in the other group, and the Xref headers of the article will
9922 be properly updated.
9923
9924 @item B i
9925 @kindex B i (Summary)
9926 @findex gnus-summary-import-article
9927 Import an arbitrary file into the current mail newsgroup
9928 (@code{gnus-summary-import-article}).  You will be prompted for a file
9929 name, a @code{From} header and a @code{Subject} header.
9930
9931 @item B I
9932 @kindex B I (Summary)
9933 @findex gnus-summary-create-article
9934 Create an empty article in the current mail newsgroups
9935 (@code{gnus-summary-create-article}).  You will be prompted for a
9936 @code{From} header and a @code{Subject} header.
9937
9938 @item B r
9939 @kindex B r (Summary)
9940 @findex gnus-summary-respool-article
9941 @vindex gnus-summary-respool-default-method
9942 Respool the mail article (@code{gnus-summary-respool-article}).
9943 @code{gnus-summary-respool-default-method} will be used as the default
9944 select method when respooling.  This variable is @code{nil} by default,
9945 which means that the current group select method will be used instead.
9946 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9947 (which is the default).
9948
9949 @item B w
9950 @itemx e
9951 @kindex B w (Summary)
9952 @kindex e (Summary)
9953 @findex gnus-summary-edit-article
9954 @kindex C-c C-c (Article)
9955 @findex gnus-summary-edit-article-done
9956 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9957 editing and make the changes permanent, type @kbd{C-c C-c}
9958 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9959 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9960
9961 @item B q
9962 @kindex B q (Summary)
9963 @findex gnus-summary-respool-query
9964 If you want to re-spool an article, you might be curious as to what group
9965 the article will end up in before you do the re-spooling.  This command
9966 will tell you (@code{gnus-summary-respool-query}).
9967
9968 @item B t
9969 @kindex B t (Summary)
9970 @findex gnus-summary-respool-trace
9971 Similarly, this command will display all fancy splitting patterns used
9972 when respooling, if any (@code{gnus-summary-respool-trace}).
9973
9974 @item B p
9975 @kindex B p (Summary)
9976 @findex gnus-summary-article-posted-p
9977 Some people have a tendency to send you ``courtesy'' copies when they
9978 follow up to articles you have posted.  These usually have a
9979 @code{Newsgroups} header in them, but not always.  This command
9980 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9981 article from your news server (or rather, from
9982 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9983 report back whether it found the article or not.  Even if it says that
9984 it didn't find the article, it may have been posted anyway---mail
9985 propagation is much faster than news propagation, and the news copy may
9986 just not have arrived yet.
9987
9988 @item K E
9989 @kindex K E (Summary)
9990 @findex gnus-article-encrypt-body
9991 @vindex gnus-article-encrypt-protocol
9992 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9993 The body is encrypted with the encryption protocol specified by the
9994 variable @code{gnus-article-encrypt-protocol}.
9995
9996 @end table
9997
9998 @vindex gnus-move-split-methods
9999 @cindex moving articles
10000 If you move (or copy) articles regularly, you might wish to have Gnus
10001 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10002 variable that uses the same syntax as @code{gnus-split-methods}
10003 (@pxref{Saving Articles}).  You may customize that variable to create
10004 suggestions you find reasonable.  (Note that
10005 @code{gnus-move-split-methods} uses group names where
10006 @code{gnus-split-methods} uses file names.)
10007
10008 @lisp
10009 (setq gnus-move-split-methods
10010       '(("^From:.*Lars Magne" "nnml:junk")
10011         ("^Subject:.*gnus" "nnfolder:important")
10012         (".*" "nnml:misc")))
10013 @end lisp
10014
10015
10016 @node Various Summary Stuff
10017 @section Various Summary Stuff
10018
10019 @menu
10020 * Summary Group Information::   Information oriented commands.
10021 * Searching for Articles::      Multiple article commands.
10022 * Summary Generation Commands::  
10023 * Really Various Summary Commands::  Those pesky non-conformant commands.
10024 @end menu
10025
10026 @table @code
10027 @vindex gnus-summary-display-while-building
10028 @item gnus-summary-display-while-building
10029 If non-@code{nil}, show and update the summary buffer as it's being
10030 built.  If @code{t}, update the buffer after every line is inserted.
10031 If the value is an integer, @var{n}, update the display every @var{n}
10032 lines.  The default is @code{nil}.
10033
10034 @vindex gnus-summary-display-arrow
10035 @item gnus-summary-display-arrow
10036 If non-@code{nil}, display an arrow in the fringe to indicate the
10037 current article.
10038
10039 @vindex gnus-summary-mode-hook
10040 @item gnus-summary-mode-hook
10041 This hook is called when creating a summary mode buffer.
10042
10043 @vindex gnus-summary-generate-hook
10044 @item gnus-summary-generate-hook
10045 This is called as the last thing before doing the threading and the
10046 generation of the summary buffer.  It's quite convenient for customizing
10047 the threading variables based on what data the newsgroup has.  This hook
10048 is called from the summary buffer after most summary buffer variables
10049 have been set.
10050
10051 @vindex gnus-summary-prepare-hook
10052 @item gnus-summary-prepare-hook
10053 It is called after the summary buffer has been generated.  You might use
10054 it to, for instance, highlight lines or modify the look of the buffer in
10055 some other ungodly manner.  I don't care.
10056
10057 @vindex gnus-summary-prepared-hook
10058 @item gnus-summary-prepared-hook
10059 A hook called as the very last thing after the summary buffer has been
10060 generated.
10061
10062 @vindex gnus-summary-ignore-duplicates
10063 @item gnus-summary-ignore-duplicates
10064 When Gnus discovers two articles that have the same @code{Message-ID},
10065 it has to do something drastic.  No articles are allowed to have the
10066 same @code{Message-ID}, but this may happen when reading mail from some
10067 sources.  Gnus allows you to customize what happens with this variable.
10068 If it is @code{nil} (which is the default), Gnus will rename the
10069 @code{Message-ID} (for display purposes only) and display the article as
10070 any other article.  If this variable is @code{t}, it won't display the
10071 article---it'll be as if it never existed.
10072
10073 @vindex gnus-alter-articles-to-read-function
10074 @item gnus-alter-articles-to-read-function
10075 This function, which takes two parameters (the group name and the list
10076 of articles to be selected), is called to allow the user to alter the
10077 list of articles to be selected.
10078
10079 For instance, the following function adds the list of cached articles to
10080 the list in one particular group:
10081
10082 @lisp
10083 (defun my-add-cached-articles (group articles)
10084   (if (string= group "some.group")
10085       (append gnus-newsgroup-cached articles)
10086     articles))
10087 @end lisp
10088
10089 @vindex gnus-newsgroup-variables
10090 @item gnus-newsgroup-variables
10091 A list of newsgroup (summary buffer) local variables, or cons of
10092 variables and their default values (when the default values are not
10093 @code{nil}), that should be made global while the summary buffer is
10094 active.  These variables can be used to set variables in the group
10095 parameters while still allowing them to affect operations done in
10096 other buffers. For example:
10097
10098 @lisp
10099 (setq gnus-newsgroup-variables
10100       '(message-use-followup-to
10101         (gnus-visible-headers .
10102  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10103 @end lisp
10104
10105 @end table
10106
10107
10108 @node Summary Group Information
10109 @subsection Summary Group Information
10110
10111 @table @kbd
10112
10113 @item H f
10114 @kindex H f (Summary)
10115 @findex gnus-summary-fetch-faq
10116 @vindex gnus-group-faq-directory
10117 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10118 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10119 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10120 is usually a directory on a remote machine.  This variable can also be
10121 a list of directories.  In that case, giving a prefix to this command
10122 will allow you to choose between the various sites.  @code{ange-ftp}
10123 or @code{efs} will probably be used for fetching the file.
10124
10125 @item H d
10126 @kindex H d (Summary)
10127 @findex gnus-summary-describe-group
10128 Give a brief description of the current group
10129 (@code{gnus-summary-describe-group}).  If given a prefix, force
10130 rereading the description from the server.
10131
10132 @item H h
10133 @kindex H h (Summary)
10134 @findex gnus-summary-describe-briefly
10135 Give an extremely brief description of the most important summary
10136 keystrokes (@code{gnus-summary-describe-briefly}).
10137
10138 @item H i
10139 @kindex H i (Summary)
10140 @findex gnus-info-find-node
10141 Go to the Gnus info node (@code{gnus-info-find-node}).
10142 @end table
10143
10144
10145 @node Searching for Articles
10146 @subsection Searching for Articles
10147
10148 @table @kbd
10149
10150 @item M-s
10151 @kindex M-s (Summary)
10152 @findex gnus-summary-search-article-forward
10153 Search through all subsequent (raw) articles for a regexp
10154 (@code{gnus-summary-search-article-forward}).
10155
10156 @item M-r
10157 @kindex M-r (Summary)
10158 @findex gnus-summary-search-article-backward
10159 Search through all previous (raw) articles for a regexp
10160 (@code{gnus-summary-search-article-backward}).
10161
10162 @item &
10163 @kindex & (Summary)
10164 @findex gnus-summary-execute-command
10165 This command will prompt you for a header, a regular expression to match
10166 on this field, and a command to be executed if the match is made
10167 (@code{gnus-summary-execute-command}).  If the header is an empty
10168 string, the match is done on the entire article.  If given a prefix,
10169 search backward instead.
10170
10171 For instance, @kbd{& RET some.*string #} will put the process mark on
10172 all articles that have heads or bodies that match @samp{some.*string}.
10173
10174 @item M-&
10175 @kindex M-& (Summary)
10176 @findex gnus-summary-universal-argument
10177 Perform any operation on all articles that have been marked with
10178 the process mark (@code{gnus-summary-universal-argument}).
10179 @end table
10180
10181 @node Summary Generation Commands
10182 @subsection Summary Generation Commands
10183
10184 @table @kbd
10185
10186 @item Y g
10187 @kindex Y g (Summary)
10188 @findex gnus-summary-prepare
10189 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10190
10191 @item Y c
10192 @kindex Y c (Summary)
10193 @findex gnus-summary-insert-cached-articles
10194 Pull all cached articles (for the current group) into the summary buffer
10195 (@code{gnus-summary-insert-cached-articles}).
10196
10197 @item Y d
10198 @kindex Y d (Summary)
10199 @findex gnus-summary-insert-dormant-articles
10200 Pull all dormant articles (for the current group) into the summary buffer
10201 (@code{gnus-summary-insert-dormant-articles}).
10202
10203 @end table
10204
10205
10206 @node Really Various Summary Commands
10207 @subsection Really Various Summary Commands
10208
10209 @table @kbd
10210
10211 @item A D
10212 @itemx C-d
10213 @kindex C-d (Summary)
10214 @kindex A D (Summary)
10215 @findex gnus-summary-enter-digest-group
10216 If the current article is a collection of other articles (for instance,
10217 a digest), you might use this command to enter a group based on the that
10218 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10219 guess what article type is currently displayed unless you give a prefix
10220 to this command, which forces a ``digest'' interpretation.  Basically,
10221 whenever you see a message that is a collection of other messages of
10222 some format, you @kbd{C-d} and read these messages in a more convenient
10223 fashion.
10224
10225 @item C-M-d
10226 @kindex C-M-d (Summary)
10227 @findex gnus-summary-read-document
10228 This command is very similar to the one above, but lets you gather
10229 several documents into one biiig group
10230 (@code{gnus-summary-read-document}).  It does this by opening several
10231 @code{nndoc} groups for each document, and then opening an
10232 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10233 command understands the process/prefix convention
10234 (@pxref{Process/Prefix}).
10235
10236 @item C-t
10237 @kindex C-t (Summary)
10238 @findex gnus-summary-toggle-truncation
10239 Toggle truncation of summary lines
10240 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10241 line centering function in the summary buffer, so it's not a good idea
10242 to have truncation switched off while reading articles.
10243
10244 @item =
10245 @kindex = (Summary)
10246 @findex gnus-summary-expand-window
10247 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10248 If given a prefix, force an @code{article} window configuration.
10249
10250 @item C-M-e
10251 @kindex C-M-e (Summary)
10252 @findex gnus-summary-edit-parameters
10253 Edit the group parameters (@pxref{Group Parameters}) of the current
10254 group (@code{gnus-summary-edit-parameters}).
10255
10256 @item C-M-a
10257 @kindex C-M-a (Summary)
10258 @findex gnus-summary-customize-parameters
10259 Customize the group parameters (@pxref{Group Parameters}) of the current
10260 group (@code{gnus-summary-customize-parameters}).
10261
10262 @end table
10263
10264
10265 @node Exiting the Summary Buffer
10266 @section Exiting the Summary Buffer
10267 @cindex summary exit
10268 @cindex exiting groups
10269
10270 Exiting from the summary buffer will normally update all info on the
10271 group and return you to the group buffer.
10272
10273 @table @kbd
10274
10275 @item Z Z
10276 @itemx q
10277 @kindex Z Z (Summary)
10278 @kindex q (Summary)
10279 @findex gnus-summary-exit
10280 @vindex gnus-summary-exit-hook
10281 @vindex gnus-summary-prepare-exit-hook
10282 @vindex gnus-group-no-more-groups-hook
10283 @c @icon{gnus-summary-exit}
10284 Exit the current group and update all information on the group
10285 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10286 called before doing much of the exiting, which calls
10287 @code{gnus-summary-expire-articles} by default.
10288 @code{gnus-summary-exit-hook} is called after finishing the exit
10289 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10290 group mode having no more (unread) groups.
10291
10292 @item Z E
10293 @itemx Q
10294 @kindex Z E (Summary)
10295 @kindex Q (Summary)
10296 @findex gnus-summary-exit-no-update
10297 Exit the current group without updating any information on the group
10298 (@code{gnus-summary-exit-no-update}).
10299
10300 @item Z c
10301 @itemx c
10302 @kindex Z c (Summary)
10303 @kindex c (Summary)
10304 @findex gnus-summary-catchup-and-exit
10305 @c @icon{gnus-summary-catchup-and-exit}
10306 Mark all unticked articles in the group as read and then exit
10307 (@code{gnus-summary-catchup-and-exit}).
10308
10309 @item Z C
10310 @kindex Z C (Summary)
10311 @findex gnus-summary-catchup-all-and-exit
10312 Mark all articles, even the ticked ones, as read and then exit
10313 (@code{gnus-summary-catchup-all-and-exit}).
10314
10315 @item Z n
10316 @kindex Z n (Summary)
10317 @findex gnus-summary-catchup-and-goto-next-group
10318 Mark all articles as read and go to the next group
10319 (@code{gnus-summary-catchup-and-goto-next-group}).
10320
10321 @item Z R
10322 @kindex Z R (Summary)
10323 @findex gnus-summary-reselect-current-group
10324 Exit this group, and then enter it again
10325 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10326 all articles, both read and unread.
10327
10328 @item Z G
10329 @itemx M-g
10330 @kindex Z G (Summary)
10331 @kindex M-g (Summary)
10332 @findex gnus-summary-rescan-group
10333 @c @icon{gnus-summary-mail-get}
10334 Exit the group, check for new articles in the group, and select the
10335 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10336 articles, both read and unread.
10337
10338 @item Z N
10339 @kindex Z N (Summary)
10340 @findex gnus-summary-next-group
10341 Exit the group and go to the next group
10342 (@code{gnus-summary-next-group}).
10343
10344 @item Z P
10345 @kindex Z P (Summary)
10346 @findex gnus-summary-prev-group
10347 Exit the group and go to the previous group
10348 (@code{gnus-summary-prev-group}).
10349
10350 @item Z s
10351 @kindex Z s (Summary)
10352 @findex gnus-summary-save-newsrc
10353 Save the current number of read/marked articles in the dribble buffer
10354 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10355 given a prefix, also save the @file{.newsrc} file(s).  Using this
10356 command will make exit without updating (the @kbd{Q} command) worthless.
10357 @end table
10358
10359 @vindex gnus-exit-group-hook
10360 @code{gnus-exit-group-hook} is called when you exit the current group
10361 with an ``updating'' exit.  For instance @kbd{Q}
10362 (@code{gnus-summary-exit-no-update}) does not call this hook.
10363
10364 @findex gnus-summary-wake-up-the-dead
10365 @findex gnus-dead-summary-mode
10366 @vindex gnus-kill-summary-on-exit
10367 If you're in the habit of exiting groups, and then changing your mind
10368 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10369 If you do that, Gnus won't kill the summary buffer when you exit it.
10370 (Quelle surprise!)  Instead it will change the name of the buffer to
10371 something like @samp{*Dead Summary ... *} and install a minor mode
10372 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10373 buffer, you'll find that all keys are mapped to a function called
10374 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10375 summary buffer will result in a live, normal summary buffer.
10376
10377 There will never be more than one dead summary buffer at any one time.
10378
10379 @vindex gnus-use-cross-reference
10380 The data on the current group will be updated (which articles you have
10381 read, which articles you have replied to, etc.) when you exit the
10382 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10383 @code{t} (which is the default), articles that are cross-referenced to
10384 this group and are marked as read, will also be marked as read in the
10385 other subscribed groups they were cross-posted to.  If this variable is
10386 neither @code{nil} nor @code{t}, the article will be marked as read in
10387 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10388
10389
10390 @node Crosspost Handling
10391 @section Crosspost Handling
10392
10393 @cindex velveeta
10394 @cindex spamming
10395 Marking cross-posted articles as read ensures that you'll never have to
10396 read the same article more than once.  Unless, of course, somebody has
10397 posted it to several groups separately.  Posting the same article to
10398 several groups (not cross-posting) is called @dfn{spamming}, and you are
10399 by law required to send nasty-grams to anyone who perpetrates such a
10400 heinous crime.  You may want to try NoCeM handling to filter out spam
10401 (@pxref{NoCeM}).
10402
10403 Remember: Cross-posting is kinda ok, but posting the same article
10404 separately to several groups is not.  Massive cross-posting (aka.
10405 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10406 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10407 excessive crossposting (@pxref{Summary Mail Commands}).
10408
10409 @cindex cross-posting
10410 @cindex Xref
10411 @cindex @acronym{NOV}
10412 One thing that may cause Gnus to not do the cross-posting thing
10413 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10414 (which is very nice, because it speeds things up considerably) which
10415 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10416 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10417 even with @sc{xover} by registering the @code{Xref} lines of all
10418 articles you actually read, but if you kill the articles, or just mark
10419 them as read without reading them, Gnus will not get a chance to snoop
10420 the @code{Xref} lines out of these articles, and will be unable to use
10421 the cross reference mechanism.
10422
10423 @cindex LIST overview.fmt
10424 @cindex overview.fmt
10425 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10426 in its overview files, try @samp{telnet your.nntp.server nntp},
10427 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10428 overview.fmt}.  This may not work, but if it does, and the last line you
10429 get does not read @samp{Xref:full}, then you should shout and whine at
10430 your news admin until she includes the @code{Xref} header in the
10431 overview files.
10432
10433 @vindex gnus-nov-is-evil
10434 If you want Gnus to get the @code{Xref}s right all the time, you have to
10435 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10436 considerably.
10437
10438 C'est la vie.
10439
10440 For an alternative approach, @pxref{Duplicate Suppression}.
10441
10442
10443 @node Duplicate Suppression
10444 @section Duplicate Suppression
10445
10446 By default, Gnus tries to make sure that you don't have to read the same
10447 article more than once by utilizing the crossposting mechanism
10448 (@pxref{Crosspost Handling}).  However, that simple and efficient
10449 approach may not work satisfactory for some users for various
10450 reasons.
10451
10452 @enumerate
10453 @item
10454 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10455 is evil and not very common.
10456
10457 @item
10458 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10459 @file{.overview} data bases.  This is evil and all too common, alas.
10460
10461 @item
10462 You may be reading the same group (or several related groups) from
10463 different @acronym{NNTP} servers.
10464
10465 @item
10466 You may be getting mail that duplicates articles posted to groups.
10467 @end enumerate
10468
10469 I'm sure there are other situations where @code{Xref} handling fails as
10470 well, but these four are the most common situations.
10471
10472 If, and only if, @code{Xref} handling fails for you, then you may
10473 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10474 will remember the @code{Message-ID}s of all articles you have read or
10475 otherwise marked as read, and then, as if by magic, mark them as read
10476 all subsequent times you see them---in @emph{all} groups.  Using this
10477 mechanism is quite likely to be somewhat inefficient, but not overly
10478 so.  It's certainly preferable to reading the same articles more than
10479 once.
10480
10481 Duplicate suppression is not a very subtle instrument.  It's more like a
10482 sledge hammer than anything else.  It works in a very simple
10483 fashion---if you have marked an article as read, it adds this Message-ID
10484 to a cache.  The next time it sees this Message-ID, it will mark the
10485 article as read with the @samp{M} mark.  It doesn't care what group it
10486 saw the article in.
10487
10488 @table @code
10489 @item gnus-suppress-duplicates
10490 @vindex gnus-suppress-duplicates
10491 If non-@code{nil}, suppress duplicates.
10492
10493 @item gnus-save-duplicate-list
10494 @vindex gnus-save-duplicate-list
10495 If non-@code{nil}, save the list of duplicates to a file.  This will
10496 make startup and shutdown take longer, so the default is @code{nil}.
10497 However, this means that only duplicate articles read in a single Gnus
10498 session are suppressed.
10499
10500 @item gnus-duplicate-list-length
10501 @vindex gnus-duplicate-list-length
10502 This variable says how many @code{Message-ID}s to keep in the duplicate
10503 suppression list.  The default is 10000.
10504
10505 @item gnus-duplicate-file
10506 @vindex gnus-duplicate-file
10507 The name of the file to store the duplicate suppression list in.  The
10508 default is @file{~/News/suppression}.
10509 @end table
10510
10511 If you have a tendency to stop and start Gnus often, setting
10512 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10513 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10514 the other hand, saving the list makes startup and shutdown much slower,
10515 so that means that if you stop and start Gnus often, you should set
10516 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10517 to you to figure out, I think.
10518
10519 @node Security
10520 @section Security
10521
10522 Gnus is able to verify signed messages or decrypt encrypted messages.
10523 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10524 and @acronym{S/MIME}, however you need some external programs to get
10525 things to work:
10526
10527 @enumerate
10528 @item
10529 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10530 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10531 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10532 Manual}), but Mailcrypt and gpg.el are also supported.
10533
10534 @item
10535 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10536 or newer is recommended.
10537
10538 @end enumerate
10539
10540 More information on how to set things up can be found in the message
10541 manual (@pxref{Security, ,Security, message, Message Manual}).
10542
10543 @table @code
10544 @item mm-verify-option
10545 @vindex mm-verify-option
10546 Option of verifying signed parts.  @code{never}, not verify;
10547 @code{always}, always verify; @code{known}, only verify known
10548 protocols. Otherwise, ask user.
10549
10550 @item mm-decrypt-option
10551 @vindex mm-decrypt-option
10552 Option of decrypting encrypted parts.  @code{never}, no decryption;
10553 @code{always}, always decrypt; @code{known}, only decrypt known
10554 protocols. Otherwise, ask user.
10555
10556 @item mml1991-use
10557 @vindex mml1991-use
10558 Symbol indicating elisp interface to OpenPGP implementation for
10559 @acronym{PGP} messages.  The default is @code{pgg}, but
10560 @code{mailcrypt} and @code{gpg} are also supported although
10561 deprecated.
10562
10563 @item mml2015-use
10564 @vindex mml2015-use
10565 Symbol indicating elisp interface to OpenPGP implementation for
10566 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10567 @code{mailcrypt} and @code{gpg} are also supported although
10568 deprecated.
10569
10570 @end table
10571
10572 @cindex snarfing keys
10573 @cindex importing PGP keys
10574 @cindex PGP key ring import
10575 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10576 key ring) is not supported explicitly through a menu item or command,
10577 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10578 allowing you to specify whatever action you think is appropriate
10579 through the usual @acronym{MIME} infrastructure.  You can use a
10580 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10581 Emacs MIME Manual}) such as the following to import keys using GNU
10582 Privacy Guard when you click on the @acronym{MIME} button
10583 (@pxref{Using MIME}).
10584
10585 @example
10586 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10587 @end example
10588 @noindent
10589 This happens to also be the default action defined in
10590 @code{mailcap-mime-data}.
10591
10592 @node Mailing List
10593 @section Mailing List
10594 @cindex mailing list
10595 @cindex RFC 2396
10596
10597 @kindex A M (summary)
10598 @findex gnus-mailing-list-insinuate
10599 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10600 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10601 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10602 summary buffer.
10603
10604 That enables the following commands to the summary buffer:
10605
10606 @table @kbd
10607
10608 @item C-c C-n h
10609 @kindex C-c C-n h (Summary)
10610 @findex gnus-mailing-list-help
10611 Send a message to fetch mailing list help, if List-Help field exists.
10612
10613 @item C-c C-n s
10614 @kindex C-c C-n s (Summary)
10615 @findex gnus-mailing-list-subscribe
10616 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10617
10618 @item C-c C-n u
10619 @kindex C-c C-n u (Summary)
10620 @findex gnus-mailing-list-unsubscribe
10621 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10622 field exists.
10623
10624 @item C-c C-n p
10625 @kindex C-c C-n p (Summary)
10626 @findex gnus-mailing-list-post
10627 Post to the mailing list, if List-Post field exists.
10628
10629 @item C-c C-n o
10630 @kindex C-c C-n o (Summary)
10631 @findex gnus-mailing-list-owner
10632 Send a message to the mailing list owner, if List-Owner field exists.
10633
10634 @item C-c C-n a
10635 @kindex C-c C-n a (Summary)
10636 @findex gnus-mailing-list-owner
10637 Browse the mailing list archive, if List-Archive field exists.
10638
10639 @end table
10640
10641
10642 @node Article Buffer
10643 @chapter Article Buffer
10644 @cindex article buffer
10645
10646 The articles are displayed in the article buffer, of which there is only
10647 one.  All the summary buffers share the same article buffer unless you
10648 tell Gnus otherwise.
10649
10650 @menu
10651 * Hiding Headers::              Deciding what headers should be displayed.
10652 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10653 * Customizing Articles::        Tailoring the look of the articles.
10654 * Article Keymap::              Keystrokes available in the article buffer.
10655 * Misc Article::                Other stuff.
10656 @end menu
10657
10658
10659 @node Hiding Headers
10660 @section Hiding Headers
10661 @cindex hiding headers
10662 @cindex deleting headers
10663
10664 The top section of each article is the @dfn{head}.  (The rest is the
10665 @dfn{body}, but you may have guessed that already.)
10666
10667 @vindex gnus-show-all-headers
10668 There is a lot of useful information in the head: the name of the person
10669 who wrote the article, the date it was written and the subject of the
10670 article.  That's well and nice, but there's also lots of information
10671 most people do not want to see---what systems the article has passed
10672 through before reaching you, the @code{Message-ID}, the
10673 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10674 of some of those lines.  If you want to keep all those lines in the
10675 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10676
10677 Gnus provides you with two variables for sifting headers:
10678
10679 @table @code
10680
10681 @item gnus-visible-headers
10682 @vindex gnus-visible-headers
10683 If this variable is non-@code{nil}, it should be a regular expression
10684 that says what headers you wish to keep in the article buffer.  All
10685 headers that do not match this variable will be hidden.
10686
10687 For instance, if you only want to see the name of the person who wrote
10688 the article and the subject, you'd say:
10689
10690 @lisp
10691 (setq gnus-visible-headers "^From:\\|^Subject:")
10692 @end lisp
10693
10694 This variable can also be a list of regexps to match headers to
10695 remain visible.
10696
10697 @item gnus-ignored-headers
10698 @vindex gnus-ignored-headers
10699 This variable is the reverse of @code{gnus-visible-headers}.  If this
10700 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10701 should be a regular expression that matches all lines that you want to
10702 hide.  All lines that do not match this variable will remain visible.
10703
10704 For instance, if you just want to get rid of the @code{References} line
10705 and the @code{Xref} line, you might say:
10706
10707 @lisp
10708 (setq gnus-ignored-headers "^References:\\|^Xref:")
10709 @end lisp
10710
10711 This variable can also be a list of regexps to match headers to
10712 be removed.
10713
10714 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10715 variable will have no effect.
10716
10717 @end table
10718
10719 @vindex gnus-sorted-header-list
10720 Gnus can also sort the headers for you.  (It does this by default.)  You
10721 can control the sorting by setting the @code{gnus-sorted-header-list}
10722 variable.  It is a list of regular expressions that says in what order
10723 the headers are to be displayed.
10724
10725 For instance, if you want the name of the author of the article first,
10726 and then the subject, you might say something like:
10727
10728 @lisp
10729 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10730 @end lisp
10731
10732 Any headers that are to remain visible, but are not listed in this
10733 variable, will be displayed in random order after all the headers listed in this variable.
10734
10735 @findex gnus-article-hide-boring-headers
10736 @vindex gnus-boring-article-headers
10737 You can hide further boring headers by setting
10738 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10739 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10740 list, but this list doesn't actually contain header names.  Instead is
10741 lists various @dfn{boring conditions} that Gnus can check and remove
10742 from sight.
10743
10744 These conditions are:
10745 @table @code
10746 @item empty
10747 Remove all empty headers.
10748 @item followup-to
10749 Remove the @code{Followup-To} header if it is identical to the
10750 @code{Newsgroups} header.
10751 @item reply-to
10752 Remove the @code{Reply-To} header if it lists the same address as the
10753 @code{From} header, or if the @code{broken-reply-to} group parameter is
10754 set.
10755 @item newsgroups
10756 Remove the @code{Newsgroups} header if it only contains the current group
10757 name.
10758 @item to-address
10759 Remove the @code{To} header if it only contains the address identical to
10760 the current groups's @code{to-address} parameter.
10761 @item to-list
10762 Remove the @code{To} header if it only contains the address identical to
10763 the current groups's @code{to-list} parameter.
10764 @item cc-list
10765 Remove the @code{CC} header if it only contains the address identical to
10766 the current groups's @code{to-list} parameter.
10767 @item date
10768 Remove the @code{Date} header if the article is less than three days
10769 old.
10770 @item long-to
10771 Remove the @code{To} header if it is very long.
10772 @item many-to
10773 Remove all @code{To} headers if there are more than one.
10774 @end table
10775
10776 To include these three elements, you could say something like:
10777
10778 @lisp
10779 (setq gnus-boring-article-headers
10780       '(empty followup-to reply-to))
10781 @end lisp
10782
10783 This is also the default value for this variable.
10784
10785
10786 @node Using MIME
10787 @section Using MIME
10788 @cindex @acronym{MIME}
10789
10790 Mime is a standard for waving your hands through the air, aimlessly,
10791 while people stand around yawning.
10792
10793 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10794 while all newsreaders die of fear.
10795
10796 @acronym{MIME} may specify what character set the article uses, the encoding
10797 of the characters, and it also makes it possible to embed pictures and
10798 other naughty stuff in innocent-looking articles.
10799
10800 @vindex gnus-display-mime-function
10801 @findex gnus-display-mime
10802 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10803 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10804 default, which creates a bundle of clickable buttons that can be used to
10805 display, save and manipulate the @acronym{MIME} objects.
10806
10807 The following commands are available when you have placed point over a
10808 @acronym{MIME} button:
10809
10810 @table @kbd
10811 @findex gnus-article-press-button
10812 @item RET (Article)
10813 @kindex RET (Article)
10814 @itemx BUTTON-2 (Article)
10815 Toggle displaying of the @acronym{MIME} object
10816 (@code{gnus-article-press-button}). If built-in viewers can not display
10817 the object, Gnus resorts to external viewers in the @file{mailcap}
10818 files.  If a viewer has the @samp{copiousoutput} specification, the
10819 object is displayed inline.
10820
10821 @findex gnus-mime-view-part
10822 @item M-RET (Article)
10823 @kindex M-RET (Article)
10824 @itemx v (Article)
10825 Prompt for a method, and then view the @acronym{MIME} object using this
10826 method (@code{gnus-mime-view-part}).
10827
10828 @findex gnus-mime-view-part-as-type
10829 @item t (Article)
10830 @kindex t (Article)
10831 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10832 (@code{gnus-mime-view-part-as-type}).
10833
10834 @findex gnus-mime-view-part-as-charset
10835 @item C (Article)
10836 @kindex C (Article)
10837 Prompt for a charset, and then view the @acronym{MIME} object using this
10838 charset (@code{gnus-mime-view-part-as-charset}).
10839
10840 @findex gnus-mime-save-part
10841 @item o (Article)
10842 @kindex o (Article)
10843 Prompt for a file name, and then save the @acronym{MIME} object
10844 (@code{gnus-mime-save-part}).
10845
10846 @findex gnus-mime-save-part-and-strip
10847 @item C-o (Article)
10848 @kindex C-o (Article)
10849 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10850 the article.  Then proceed to article editing, where a reasonable
10851 suggestion is being made on how the altered article should look
10852 like.  The stripped @acronym{MIME} object will be referred via the
10853 message/external-body @acronym{MIME} type.
10854 (@code{gnus-mime-save-part-and-strip}).
10855
10856 @findex gnus-mime-delete-part
10857 @item d (Article)
10858 @kindex d (Article)
10859 Delete the @acronym{MIME} object from the article and replace it with some
10860 information about the removed @acronym{MIME} object
10861 (@code{gnus-mime-delete-part}).
10862
10863 @findex gnus-mime-copy-part
10864 @item c (Article)
10865 @kindex c (Article)
10866 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10867 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10868 @file{.bz2} are automatically decompressed if
10869 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10870 Accessing Compressed Files, emacs, The Emacs Editor}).
10871
10872 @findex gnus-mime-print-part
10873 @item p (Article)
10874 @kindex p (Article)
10875 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10876 command respects the @samp{print=} specifications in the
10877 @file{.mailcap} file.
10878
10879 @findex gnus-mime-inline-part
10880 @item i (Article)
10881 @kindex i (Article)
10882 Insert the contents of the @acronym{MIME} object into the buffer
10883 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10884 the raw contents without decoding.  If given a numerical prefix, you can
10885 do semi-manual charset stuff (see
10886 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10887 Article}).
10888
10889 @findex gnus-mime-view-part-internally
10890 @item E (Article)
10891 @kindex E (Article)
10892 View the @acronym{MIME} object with an internal viewer.  If no internal
10893 viewer is available, use an external viewer
10894 (@code{gnus-mime-view-part-internally}).
10895
10896 @findex gnus-mime-view-part-externally
10897 @item e (Article)
10898 @kindex e (Article)
10899 View the @acronym{MIME} object with an external viewer.
10900 (@code{gnus-mime-view-part-externally}).
10901
10902 @findex gnus-mime-pipe-part
10903 @item | (Article)
10904 @kindex | (Article)
10905 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10906
10907 @findex gnus-mime-action-on-part
10908 @item . (Article)
10909 @kindex . (Article)
10910 Interactively run an action on the @acronym{MIME} object
10911 (@code{gnus-mime-action-on-part}).
10912
10913 @end table
10914
10915 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10916 determines which parts to do this with is described in the Emacs
10917 @acronym{MIME} manual.
10918
10919 It might be best to just use the toggling functions from the article
10920 buffer to avoid getting nasty surprises.  (For instance, you enter the
10921 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10922 decoded the sound file in the article and some horrible sing-a-long song
10923 comes screaming out your speakers, and you can't find the volume button,
10924 because there isn't one, and people are starting to look at you, and you
10925 try to stop the program, but you can't, and you can't find the program
10926 to control the volume, and everybody else in the room suddenly decides
10927 to look at you disdainfully, and you'll feel rather stupid.)
10928
10929 Any similarity to real events and people is purely coincidental.  Ahem.
10930
10931 Also see @pxref{MIME Commands}.
10932
10933
10934 @node Customizing Articles
10935 @section Customizing Articles
10936 @cindex article customization
10937
10938 A slew of functions for customizing how the articles are to look like
10939 exist.  You can call these functions interactively
10940 (@pxref{Article Washing}), or you can have them
10941 called automatically when you select the articles.
10942
10943 To have them called automatically, you should set the corresponding
10944 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10945 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10946 be set, but first we discuss the values these variables can have.
10947
10948 Note: Some values, while valid, make little sense.  Check the list below
10949 for sensible values.
10950
10951 @enumerate
10952 @item
10953 @code{nil}: Don't do this treatment.
10954
10955 @item
10956 @code{t}: Do this treatment on all body parts.
10957
10958 @item
10959 @code{head}: Do the treatment on the headers.
10960
10961 @item
10962 @code{last}: Do this treatment on the last part.
10963
10964 @item
10965 An integer: Do this treatment on all body parts that have a length less
10966 than this number.
10967
10968 @item
10969 A list of strings: Do this treatment on all body parts that are in
10970 articles that are read in groups that have names that match one of the
10971 regexps in the list.
10972
10973 @item
10974 A list where the first element is not a string:
10975
10976 The list is evaluated recursively.  The first element of the list is a
10977 predicate.  The following predicates are recognized: @code{or},
10978 @code{and}, @code{not} and @code{typep}.  Here's an example:
10979
10980 @lisp
10981 (or last
10982     (typep "text/x-vcard"))
10983 @end lisp
10984
10985 @end enumerate
10986
10987 You may have noticed that the word @dfn{part} is used here.  This refers
10988 to the fact that some messages are @acronym{MIME} multipart articles that may
10989 be divided into several parts.  Articles that are not multiparts are
10990 considered to contain just a single part.
10991
10992 @vindex gnus-article-treat-types
10993 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10994 want to, but by default, only @samp{text/plain} parts are given the
10995 treatment.  This is controlled by the @code{gnus-article-treat-types}
10996 variable, which is a list of regular expressions that are matched to the
10997 type of the part.  This variable is ignored if the value of the
10998 controlling variable is a predicate list, as described above.
10999
11000 The following treatment options are available.  The easiest way to
11001 customize this is to examine the @code{gnus-article-treat} customization
11002 group.  Values in parenthesis are suggested sensible values.  Others are
11003 possible but those listed are probably sufficient for most people.
11004
11005 @table @code
11006 @item gnus-treat-buttonize (t, integer)
11007 @item gnus-treat-buttonize-head (head)
11008
11009 @xref{Article Buttons}.
11010
11011 @item gnus-treat-capitalize-sentences (t, integer)
11012 @item gnus-treat-overstrike (t, integer)
11013 @item gnus-treat-strip-cr (t, integer)
11014 @item gnus-treat-strip-headers-in-body (t, integer)
11015 @item gnus-treat-strip-leading-blank-lines (t, integer)
11016 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11017 @item gnus-treat-strip-pem (t, last, integer)
11018 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11019 @item gnus-treat-unsplit-urls (t, integer)
11020 @item gnus-treat-wash-html (t, integer)
11021
11022 @xref{Article Washing}.
11023
11024 @item gnus-treat-date-english (head)
11025 @item gnus-treat-date-iso8601 (head)
11026 @item gnus-treat-date-lapsed (head)
11027 @item gnus-treat-date-local (head)
11028 @item gnus-treat-date-original (head)
11029 @item gnus-treat-date-user-defined (head)
11030 @item gnus-treat-date-ut (head)
11031
11032 @xref{Article Date}.
11033
11034 @item gnus-treat-from-picon (head)
11035 @item gnus-treat-mail-picon (head)
11036 @item gnus-treat-newsgroups-picon (head)
11037
11038 @xref{Picons}.
11039
11040 @item gnus-treat-display-smileys (t, integer)
11041
11042 @item gnus-treat-body-boundary (head)
11043
11044 @vindex gnus-body-boundary-delimiter
11045 Adds a delimiter between header and body, the string used as delimiter
11046 is controlled by @code{gnus-body-boundary-delimiter}.
11047
11048 @xref{Smileys}.
11049
11050 @item gnus-treat-display-xface (head)
11051
11052 @xref{X-Face}.
11053
11054 @item gnus-treat-emphasize (t, head, integer)
11055 @item gnus-treat-fill-article (t, integer)
11056 @item gnus-treat-fill-long-lines (t, integer)
11057 @item gnus-treat-hide-boring-headers (head)
11058 @item gnus-treat-hide-citation (t, integer)
11059 @item gnus-treat-hide-citation-maybe (t, integer)
11060 @item gnus-treat-hide-headers (head)
11061 @item gnus-treat-hide-signature (t, last)
11062 @item gnus-treat-strip-banner (t, last)
11063 @item gnus-treat-strip-list-identifiers (head)
11064
11065 @xref{Article Hiding}.
11066
11067 @item gnus-treat-highlight-citation (t, integer)
11068 @item gnus-treat-highlight-headers (head)
11069 @item gnus-treat-highlight-signature (t, last, integer)
11070
11071 @xref{Article Highlighting}.
11072
11073 @item gnus-treat-play-sounds
11074 @item gnus-treat-translate
11075 @item gnus-treat-x-pgp-sig (head)
11076
11077 @item gnus-treat-unfold-headers (head)
11078 @item gnus-treat-fold-headers (head)
11079 @item gnus-treat-fold-newsgroups (head)
11080 @item gnus-treat-leading-whitespace (head)
11081
11082 @xref{Article Header}.
11083
11084
11085 @end table
11086
11087 @vindex gnus-part-display-hook
11088 You can, of course, write your own functions to be called from
11089 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11090 part, and you can do anything you like, pretty much.  There is no
11091 information that you have to keep in the buffer---you can change
11092 everything.
11093
11094
11095 @node Article Keymap
11096 @section Article Keymap
11097
11098 Most of the keystrokes in the summary buffer can also be used in the
11099 article buffer.  They should behave as if you typed them in the summary
11100 buffer, which means that you don't actually have to have a summary
11101 buffer displayed while reading.  You can do it all from the article
11102 buffer.
11103
11104 A few additional keystrokes are available:
11105
11106 @table @kbd
11107
11108 @item SPACE
11109 @kindex SPACE (Article)
11110 @findex gnus-article-next-page
11111 Scroll forwards one page (@code{gnus-article-next-page}).
11112 This is exactly the same as @kbd{h SPACE h}.
11113
11114 @item DEL
11115 @kindex DEL (Article)
11116 @findex gnus-article-prev-page
11117 Scroll backwards one page (@code{gnus-article-prev-page}).
11118 This is exactly the same as @kbd{h DEL h}.
11119
11120 @item C-c ^
11121 @kindex C-c ^ (Article)
11122 @findex gnus-article-refer-article
11123 If point is in the neighborhood of a @code{Message-ID} and you press
11124 @kbd{C-c ^}, Gnus will try to get that article from the server
11125 (@code{gnus-article-refer-article}).
11126
11127 @item C-c C-m
11128 @kindex C-c C-m (Article)
11129 @findex gnus-article-mail
11130 Send a reply to the address near point (@code{gnus-article-mail}).  If
11131 given a prefix, include the mail.
11132
11133 @item s
11134 @kindex s (Article)
11135 @findex gnus-article-show-summary
11136 Reconfigure the buffers so that the summary buffer becomes visible
11137 (@code{gnus-article-show-summary}).
11138
11139 @item ?
11140 @kindex ? (Article)
11141 @findex gnus-article-describe-briefly
11142 Give a very brief description of the available keystrokes
11143 (@code{gnus-article-describe-briefly}).
11144
11145 @item TAB
11146 @kindex TAB (Article)
11147 @findex gnus-article-next-button
11148 Go to the next button, if any (@code{gnus-article-next-button}).  This
11149 only makes sense if you have buttonizing turned on.
11150
11151 @item M-TAB
11152 @kindex M-TAB (Article)
11153 @findex gnus-article-prev-button
11154 Go to the previous button, if any (@code{gnus-article-prev-button}).
11155
11156 @item R
11157 @kindex R (Article)
11158 @findex gnus-article-reply-with-original
11159 Send a reply to the current article and yank the current article
11160 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11161 wide reply.  If the region is active, only yank the text in the
11162 region.
11163
11164 @item F
11165 @kindex F (Article)
11166 @findex gnus-article-followup-with-original
11167 Send a followup to the current article and yank the current article
11168 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11169 a wide reply.  If the region is active, only yank the text in the
11170 region.
11171
11172
11173 @end table
11174
11175
11176 @node Misc Article
11177 @section Misc Article
11178
11179 @table @code
11180
11181 @item gnus-single-article-buffer
11182 @vindex gnus-single-article-buffer
11183 If non-@code{nil}, use the same article buffer for all the groups.
11184 (This is the default.)  If @code{nil}, each group will have its own
11185 article buffer.
11186
11187 @vindex gnus-article-decode-hook
11188 @item gnus-article-decode-hook
11189 @cindex @acronym{MIME}
11190 Hook used to decode @acronym{MIME} articles.  The default value is
11191 @code{(article-decode-charset article-decode-encoded-words)}
11192
11193 @vindex gnus-article-prepare-hook
11194 @item gnus-article-prepare-hook
11195 This hook is called right after the article has been inserted into the
11196 article buffer.  It is mainly intended for functions that do something
11197 depending on the contents; it should probably not be used for changing
11198 the contents of the article buffer.
11199
11200 @item gnus-article-mode-hook
11201 @vindex gnus-article-mode-hook
11202 Hook called in article mode buffers.
11203
11204 @item gnus-article-mode-syntax-table
11205 @vindex gnus-article-mode-syntax-table
11206 Syntax table used in article buffers.  It is initialized from
11207 @code{text-mode-syntax-table}.
11208
11209 @vindex gnus-article-over-scroll
11210 @item gnus-article-over-scroll
11211 If non-@code{nil}, allow scrolling the article buffer even when there
11212 no more new text to scroll in.  The default is @code{nil}.
11213
11214 @vindex gnus-article-mode-line-format
11215 @item gnus-article-mode-line-format
11216 This variable is a format string along the same lines as
11217 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11218 accepts the same format specifications as that variable, with two
11219 extensions:
11220
11221 @table @samp
11222
11223 @item w
11224 The @dfn{wash status} of the article.  This is a short string with one
11225 character for each possible article wash operation that may have been
11226 performed.  The characters and their meaning:
11227
11228 @table @samp
11229
11230 @item c
11231 Displayed when cited text may be hidden in the article buffer.
11232
11233 @item h
11234 Displayed when headers are hidden in the article buffer.
11235
11236 @item p
11237 Displayed when article is digitally signed or encrypted, and Gnus has
11238 hidden the security headers.  (N.B. does not tell anything about
11239 security status, i.e. good or bad signature.)
11240
11241 @item s
11242 Displayed when the signature has been hidden in the Article buffer.
11243
11244 @item o
11245 Displayed when Gnus has treated overstrike characters in the article buffer.
11246
11247 @item e
11248 Displayed when Gnus has treated emphasised strings in the article buffer.
11249
11250 @end table
11251
11252 @item m
11253 The number of @acronym{MIME} parts in the article.
11254
11255 @end table
11256
11257 @vindex gnus-break-pages
11258
11259 @item gnus-break-pages
11260 Controls whether @dfn{page breaking} is to take place.  If this variable
11261 is non-@code{nil}, the articles will be divided into pages whenever a
11262 page delimiter appears in the article.  If this variable is @code{nil},
11263 paging will not be done.
11264
11265 @item gnus-page-delimiter
11266 @vindex gnus-page-delimiter
11267 This is the delimiter mentioned above.  By default, it is @samp{^L}
11268 (formfeed).
11269
11270 @cindex IDNA
11271 @cindex internationalized domain names
11272 @vindex gnus-use-idna
11273 @item gnus-use-idna
11274 This variable controls whether Gnus performs IDNA decoding of
11275 internationalized domain names inside @samp{From}, @samp{To} and
11276 @samp{Cc} headers.  This requires
11277 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11278 variable is only enabled if you have installed it.
11279
11280 @end table
11281
11282
11283 @node Composing Messages
11284 @chapter Composing Messages
11285 @cindex composing messages
11286 @cindex messages
11287 @cindex mail
11288 @cindex sending mail
11289 @cindex reply
11290 @cindex followup
11291 @cindex post
11292 @cindex using gpg
11293 @cindex using s/mime
11294 @cindex using smime
11295
11296 @kindex C-c C-c (Post)
11297 All commands for posting and mailing will put you in a message buffer
11298 where you can edit the article all you like, before you send the
11299 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11300 Message Manual}.  Where the message will be posted/mailed to depends
11301 on your setup (@pxref{Posting Server}).
11302
11303 @menu
11304 * Mail::                        Mailing and replying.
11305 * Posting Server::              What server should you post and mail via?
11306 * Mail and Post::               Mailing and posting at the same time.
11307 * Archived Messages::           Where Gnus stores the messages you've sent.
11308 * Posting Styles::              An easier way to specify who you are.
11309 * Drafts::                      Postponing messages and rejected messages.
11310 * Rejected Articles::           What happens if the server doesn't like your article?
11311 * Signing and encrypting::      How to compose secure messages.
11312 @end menu
11313
11314 Also see @pxref{Canceling and Superseding} for information on how to
11315 remove articles you shouldn't have posted.
11316
11317
11318 @node Mail
11319 @section Mail
11320
11321 Variables for customizing outgoing mail:
11322
11323 @table @code
11324 @item gnus-uu-digest-headers
11325 @vindex gnus-uu-digest-headers
11326 List of regexps to match headers included in digested messages.  The
11327 headers will be included in the sequence they are matched.  If
11328 @code{nil} include all headers.
11329
11330 @item gnus-add-to-list
11331 @vindex gnus-add-to-list
11332 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11333 that have none when you do a @kbd{a}.
11334
11335 @item gnus-confirm-mail-reply-to-news
11336 @vindex gnus-confirm-mail-reply-to-news
11337 This can also be a function receiving the group name as the only
11338 parameter which should return non-@code{nil} if a confirmation is
11339 needed, or a regular expression matching group names, where
11340 confirmation is should be asked for.
11341
11342 If you find yourself never wanting to reply to mail, but occasionally
11343 press R anyway, this variable might be for you.
11344
11345 @item gnus-confirm-treat-mail-like-news
11346 @vindex gnus-confirm-treat-mail-like-news
11347 If non-@code{nil}, Gnus also requests confirmation according to
11348 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11349 useful for treating mailing lists like newsgroups.
11350  
11351 @end table
11352
11353
11354 @node Posting Server
11355 @section Posting Server
11356
11357 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11358 (extremely intelligent, of course) article, where does it go?
11359
11360 Thank you for asking.  I hate you.
11361
11362 It can be quite complicated.
11363
11364 @vindex gnus-post-method
11365 When posting news, Message usually invokes @code{message-send-news}
11366 (@pxref{News Variables, , News Variables, message, Message Manual}).
11367 Normally, Gnus will post using the same select method as you're
11368 reading from (which might be convenient if you're reading lots of
11369 groups from different private servers).  However.  If the server
11370 you're reading from doesn't allow posting, just reading, you probably
11371 want to use some other server to post your (extremely intelligent and
11372 fabulously interesting) articles.  You can then set the
11373 @code{gnus-post-method} to some other method:
11374
11375 @lisp
11376 (setq gnus-post-method '(nnspool ""))
11377 @end lisp
11378
11379 Now, if you've done this, and then this server rejects your article, or
11380 this server is down, what do you do then?  To override this variable you
11381 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11382 the ``current'' server, to get back the default behavior, for posting.
11383
11384 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11385 Gnus will prompt you for what method to use for posting.
11386
11387 You can also set @code{gnus-post-method} to a list of select methods.
11388 If that's the case, Gnus will always prompt you for what method to use
11389 for posting.
11390
11391 Finally, if you want to always post using the native select method,
11392 you can set this variable to @code{native}.
11393
11394 When sending mail, Message invokes @code{message-send-mail-function}.
11395 The default function, @code{message-send-mail-with-sendmail}, pipes
11396 your article to the @code{sendmail} binary for further queuing and
11397 sending.  When your local system is not configured for sending mail
11398 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11399 server, you can set @code{message-send-mail-function} to
11400 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11401 package correctly.  An example:
11402
11403 @lisp
11404 (setq message-send-mail-function 'smtpmail-send-it
11405       smtpmail-default-smtp-server "YOUR SMTP HOST")
11406 @end lisp
11407
11408 To the thing similar to this, there is
11409 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11410 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11411 documentation for the function @code{mail-source-touch-pop}.
11412
11413 Other possible choices for @code{message-send-mail-function} includes
11414 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11415 and @code{feedmail-send-it}.
11416
11417 @node Mail and Post
11418 @section Mail and Post
11419
11420 Here's a list of variables relevant to both mailing and
11421 posting:
11422
11423 @table @code
11424 @item gnus-mailing-list-groups
11425 @findex gnus-mailing-list-groups
11426 @cindex mailing lists
11427
11428 If your news server offers groups that are really mailing lists
11429 gatewayed to the @acronym{NNTP} server, you can read those groups without
11430 problems, but you can't post/followup to them without some difficulty.
11431 One solution is to add a @code{to-address} to the group parameters
11432 (@pxref{Group Parameters}).  An easier thing to do is set the
11433 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11434 really are mailing lists.  Then, at least, followups to the mailing
11435 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11436 still a pain, though.
11437
11438 @item gnus-user-agent
11439 @vindex gnus-user-agent
11440 @cindex User-Agent
11441
11442 This variable controls which information should be exposed in the
11443 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11444 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11445 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11446 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11447 system type) or a custom string.  If you set it to a string, be sure to
11448 use a valid format, see RFC 2616.
11449
11450 @end table
11451
11452 You may want to do spell-checking on messages that you send out.  Or, if
11453 you don't want to spell-check by hand, you could add automatic
11454 spell-checking via the @code{ispell} package:
11455
11456 @cindex ispell
11457 @findex ispell-message
11458 @lisp
11459 (add-hook 'message-send-hook 'ispell-message)
11460 @end lisp
11461
11462 If you want to change the @code{ispell} dictionary based on what group
11463 you're in, you could say something like the following:
11464
11465 @lisp
11466 (add-hook 'gnus-select-group-hook
11467           (lambda ()
11468             (cond
11469              ((string-match
11470                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11471               (ispell-change-dictionary "deutsch"))
11472              (t
11473               (ispell-change-dictionary "english")))))
11474 @end lisp
11475
11476 Modify to suit your needs.
11477
11478
11479 @node Archived Messages
11480 @section Archived Messages
11481 @cindex archived messages
11482 @cindex sent messages
11483
11484 Gnus provides a few different methods for storing the mail and news you
11485 send.  The default method is to use the @dfn{archive virtual server} to
11486 store the messages.  If you want to disable this completely, the
11487 @code{gnus-message-archive-group} variable should be @code{nil}, which
11488 is the default.
11489
11490 For archiving interesting messages in a group you read, see the
11491 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11492 Group Commands}).
11493
11494 @vindex gnus-message-archive-method
11495 @code{gnus-message-archive-method} says what virtual server Gnus is to
11496 use to store sent messages.  The default is:
11497
11498 @lisp
11499 (nnfolder "archive"
11500           (nnfolder-directory   "~/Mail/archive")
11501           (nnfolder-active-file "~/Mail/archive/active")
11502           (nnfolder-get-new-mail nil)
11503           (nnfolder-inhibit-expiry t))
11504 @end lisp
11505
11506 You can, however, use any mail select method (@code{nnml},
11507 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11508 for doing this sort of thing, though.  If you don't like the default
11509 directory chosen, you could say something like:
11510
11511 @lisp
11512 (setq gnus-message-archive-method
11513       '(nnfolder "archive"
11514                  (nnfolder-inhibit-expiry t)
11515                  (nnfolder-active-file "~/News/sent-mail/active")
11516                  (nnfolder-directory "~/News/sent-mail/")))
11517 @end lisp
11518
11519 @vindex gnus-message-archive-group
11520 @cindex Gcc
11521 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11522 to one or more group(s) on that server.  Which group to use is
11523 determined by the @code{gnus-message-archive-group} variable.
11524
11525 This variable can be used to do the following:
11526
11527 @itemize @bullet
11528 @item
11529 a string
11530 Messages will be saved in that group.
11531
11532 Note that you can include a select method in the group name, then the
11533 message will not be stored in the select method given by
11534 @code{gnus-message-archive-method}, but in the select method specified
11535 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11536 has the default value shown above.  Then setting
11537 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11538 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11539 value @code{"nnml:foo"}, then outgoing messages will be stored in
11540 @samp{nnml:foo}.
11541 @item
11542 a list of strings
11543 Messages will be saved in all those groups.
11544 @item
11545 an alist of regexps, functions and forms
11546 When a key ``matches'', the result is used.
11547 @item
11548 @code{nil}
11549 No message archiving will take place.  This is the default.
11550 @end itemize
11551
11552 Let's illustrate:
11553
11554 Just saving to a single group called @samp{MisK}:
11555 @lisp
11556 (setq gnus-message-archive-group "MisK")
11557 @end lisp
11558
11559 Saving to two groups, @samp{MisK} and @samp{safe}:
11560 @lisp
11561 (setq gnus-message-archive-group '("MisK" "safe"))
11562 @end lisp
11563
11564 Save to different groups based on what group you are in:
11565 @lisp
11566 (setq gnus-message-archive-group
11567       '(("^alt" "sent-to-alt")
11568         ("mail" "sent-to-mail")
11569         (".*" "sent-to-misc")))
11570 @end lisp
11571
11572 More complex stuff:
11573 @lisp
11574 (setq gnus-message-archive-group
11575       '((if (message-news-p)
11576             "misc-news"
11577           "misc-mail")))
11578 @end lisp
11579
11580 How about storing all news messages in one file, but storing all mail
11581 messages in one file per month:
11582
11583 @lisp
11584 (setq gnus-message-archive-group
11585       '((if (message-news-p)
11586             "misc-news"
11587           (concat "mail." (format-time-string "%Y-%m")))))
11588 @end lisp
11589
11590 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11591 @c use a different value for @code{gnus-message-archive-group} there.)
11592
11593 Now, when you send a message off, it will be stored in the appropriate
11594 group.  (If you want to disable storing for just one particular message,
11595 you can just remove the @code{Gcc} header that has been inserted.)  The
11596 archive group will appear in the group buffer the next time you start
11597 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11598 enter it and read the articles in it just like you'd read any other
11599 group.  If the group gets really big and annoying, you can simply rename
11600 if (using @kbd{G r} in the group buffer) to something
11601 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11602 continue to be stored in the old (now empty) group.
11603
11604 That's the default method of archiving sent messages.  Gnus offers a
11605 different way for the people who don't like the default method.  In that
11606 case you should set @code{gnus-message-archive-group} to @code{nil};
11607 this will disable archiving.
11608
11609 @table @code
11610 @item gnus-outgoing-message-group
11611 @vindex gnus-outgoing-message-group
11612 All outgoing messages will be put in this group.  If you want to store
11613 all your outgoing mail and articles in the group @samp{nnml:archive},
11614 you set this variable to that value.  This variable can also be a list of
11615 group names.
11616
11617 If you want to have greater control over what group to put each
11618 message in, you can set this variable to a function that checks the
11619 current newsgroup name and then returns a suitable group name (or list
11620 of names).
11621
11622 This variable can be used instead of @code{gnus-message-archive-group},
11623 but the latter is the preferred method.
11624
11625 @item gnus-gcc-mark-as-read
11626 @vindex gnus-gcc-mark-as-read
11627 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11628
11629 @item gnus-gcc-externalize-attachments
11630 @vindex gnus-gcc-externalize-attachments
11631 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11632 and matches the Gcc group name, attach files as external parts; if it is
11633 @code{all}, attach local files as external parts; if it is other
11634 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11635 changed in the future.
11636
11637 @end table
11638
11639
11640 @node Posting Styles
11641 @section Posting Styles
11642 @cindex posting styles
11643 @cindex styles
11644
11645 All them variables, they make my head swim.
11646
11647 So what if you want a different @code{Organization} and signature based
11648 on what groups you post to?  And you post both from your home machine
11649 and your work machine, and you want different @code{From} lines, and so
11650 on?
11651
11652 @vindex gnus-posting-styles
11653 One way to do stuff like that is to write clever hooks that change the
11654 variables you need to have changed.  That's a bit boring, so somebody
11655 came up with the bright idea of letting the user specify these things in
11656 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11657 variable:
11658
11659 @lisp
11660 ((".*"
11661   (signature "Peace and happiness")
11662   (organization "What me?"))
11663  ("^comp"
11664   (signature "Death to everybody"))
11665  ("comp.emacs.i-love-it"
11666   (organization "Emacs is it")))
11667 @end lisp
11668
11669 As you might surmise from this example, this alist consists of several
11670 @dfn{styles}.  Each style will be applicable if the first element
11671 ``matches'', in some form or other.  The entire alist will be iterated
11672 over, from the beginning towards the end, and each match will be
11673 applied, which means that attributes in later styles that match override
11674 the same attributes in earlier matching styles.  So
11675 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11676 signature and the @samp{What me?} @code{Organization} header.
11677
11678 The first element in each style is called the @code{match}.  If it's a
11679 string, then Gnus will try to regexp match it against the group name.
11680 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11681 will look in the original article for a header whose name is
11682 @var{match} and compare that @var{regexp}.  @var{match} and
11683 @var{regexp} are strings.  (There original article is the one you are
11684 replying or following up to.  If you are not composing a reply or a
11685 followup, then there is nothing to match against.)  If the
11686 @code{match} is a function symbol, that function will be called with
11687 no arguments.  If it's a variable symbol, then the variable will be
11688 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11689 any case, if this returns a non-@code{nil} value, then the style is
11690 said to @dfn{match}.
11691
11692 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11693 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11694 attribute name can be one of @code{signature}, @code{signature-file},
11695 @code{x-face-file}, @code{address} (overriding
11696 @code{user-mail-address}), @code{name} (overriding
11697 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11698 be a string or a symbol.  In that case, this will be used as a header
11699 name, and the value will be inserted in the headers of the article; if
11700 the value is @code{nil}, the header name will be removed.  If the
11701 attribute name is @code{eval}, the form is evaluated, and the result
11702 is thrown away.
11703
11704 The attribute value can be a string (used verbatim), a function with
11705 zero arguments (the return value will be used), a variable (its value
11706 will be used) or a list (it will be @code{eval}ed and the return value
11707 will be used).  The functions and sexps are called/@code{eval}ed in the
11708 message buffer that is being set up.  The headers of the current article
11709 are available through the @code{message-reply-headers} variable, which
11710 is a vector of the following headers: number subject from date id
11711 references chars lines xref extra.
11712
11713 @vindex message-reply-headers
11714
11715 If you wish to check whether the message you are about to compose is
11716 meant to be a news article or a mail message, you can check the values
11717 of the @code{message-news-p} and @code{message-mail-p} functions.
11718
11719 @findex message-mail-p
11720 @findex message-news-p
11721
11722 So here's a new example:
11723
11724 @lisp
11725 (setq gnus-posting-styles
11726       '((".*"
11727          (signature-file "~/.signature")
11728          (name "User Name")
11729          ("X-Home-Page" (getenv "WWW_HOME"))
11730          (organization "People's Front Against MWM"))
11731         ("^rec.humor"
11732          (signature my-funny-signature-randomizer))
11733         ((equal (system-name) "gnarly")  ;; @r{A form}
11734          (signature my-quote-randomizer))
11735         (message-news-p        ;; @r{A function symbol}
11736          (signature my-news-signature))
11737         (window-system         ;; @r{A value symbol}
11738          ("X-Window-System" (format "%s" window-system)))
11739         ;; @r{If I'm replying to Larsi, set the Organization header.}
11740         ((header "from" "larsi.*org")
11741          (Organization "Somewhere, Inc."))
11742         ((posting-from-work-p) ;; @r{A user defined function}
11743          (signature-file "~/.work-signature")
11744          (address "user@@bar.foo")
11745          (body "You are fired.\n\nSincerely, your boss.")
11746          (organization "Important Work, Inc"))
11747         ("nnml:.*"
11748          (From (save-excursion
11749                  (set-buffer gnus-article-buffer)
11750                  (message-fetch-field "to"))))
11751         ("^nn.+:"
11752          (signature-file "~/.mail-signature"))))
11753 @end lisp
11754
11755 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11756 @code{From} address in all your outgoing replies, which might be handy
11757 if you fill many roles.
11758
11759
11760 @node Drafts
11761 @section Drafts
11762 @cindex drafts
11763
11764 If you are writing a message (mail or news) and suddenly remember that
11765 you have a steak in the oven (or some pesto in the food processor, you
11766 craaazy vegetarians), you'll probably wish there was a method to save
11767 the message you are writing so that you can continue editing it some
11768 other day, and send it when you feel its finished.
11769
11770 Well, don't worry about it.  Whenever you start composing a message of
11771 some sort using the Gnus mail and post commands, the buffer you get will
11772 automatically associate to an article in a special @dfn{draft} group.
11773 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11774 article will be saved there.  (Auto-save files also go to the draft
11775 group.)
11776
11777 @cindex nndraft
11778 @vindex nndraft-directory
11779 The draft group is a special group (which is implemented as an
11780 @code{nndraft} group, if you absolutely have to know) called
11781 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11782 @code{nndraft} is to store its files.  What makes this group special is
11783 that you can't tick any articles in it or mark any articles as
11784 read---all articles in the group are permanently unread.
11785
11786 If the group doesn't exist, it will be created and you'll be subscribed
11787 to it.  The only way to make it disappear from the Group buffer is to
11788 unsubscribe it.  The special properties of the draft group comes from
11789 a group property (@pxref{Group Parameters}), and if lost the group
11790 behaves like any other group.  This means the commands below will not
11791 be available.  To restore the special properties of the group, the
11792 simplest way is to kill the group, using @kbd{C-k}, and restart
11793 Gnus.  The group is automatically created again with the
11794 correct parameters.  The content of the group is not lost.
11795
11796 @c @findex gnus-dissociate-buffer-from-draft
11797 @c @kindex C-c M-d (Mail)
11798 @c @kindex C-c M-d (Post)
11799 @c @findex gnus-associate-buffer-with-draft
11800 @c @kindex C-c C-d (Mail)
11801 @c @kindex C-c C-d (Post)
11802 @c If you're writing some super-secret message that you later want to
11803 @c encode with PGP before sending, you may wish to turn the auto-saving
11804 @c (and association with the draft group) off.  You never know who might be
11805 @c interested in reading all your extremely valuable and terribly horrible
11806 @c and interesting secrets.  The @kbd{C-c M-d}
11807 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11808 @c If you change your mind and want to turn the auto-saving back on again,
11809 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11810 @c
11811 @c @vindex gnus-use-draft
11812 @c To leave association with the draft group off by default, set
11813 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11814
11815 @findex gnus-draft-edit-message
11816 @kindex D e (Draft)
11817 When you want to continue editing the article, you simply enter the
11818 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11819 that.  You will be placed in a buffer where you left off.
11820
11821 Rejected articles will also be put in this draft group (@pxref{Rejected
11822 Articles}).
11823
11824 @findex gnus-draft-send-all-messages
11825 @kindex D s (Draft)
11826 @findex gnus-draft-send-message
11827 @kindex D S (Draft)
11828 If you have lots of rejected messages you want to post (or mail) without
11829 doing further editing, you can use the @kbd{D s} command
11830 (@code{gnus-draft-send-message}).  This command understands the
11831 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11832 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11833 in the buffer.
11834
11835 @findex gnus-draft-toggle-sending
11836 @kindex D t (Draft)
11837 If you have some messages that you wish not to send, you can use the
11838 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11839 as unsendable.  This is a toggling command.
11840
11841
11842 @node Rejected Articles
11843 @section Rejected Articles
11844 @cindex rejected articles
11845
11846 Sometimes a news server will reject an article.  Perhaps the server
11847 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11848 @emph{there be demons}.  Perhaps you have included too much cited text.
11849 Perhaps the disk is full.  Perhaps the server is down.
11850
11851 These situations are, of course, totally beyond the control of Gnus.
11852 (Gnus, of course, loves the way you look, always feels great, has angels
11853 fluttering around inside of it, doesn't care about how much cited text
11854 you include, never runs full and never goes down.)  So Gnus saves these
11855 articles until some later time when the server feels better.
11856
11857 The rejected articles will automatically be put in a special draft group
11858 (@pxref{Drafts}).  When the server comes back up again, you'd then
11859 typically enter that group and send all the articles off.
11860
11861 @node Signing and encrypting
11862 @section Signing and encrypting
11863 @cindex using gpg
11864 @cindex using s/mime
11865 @cindex using smime
11866
11867 Gnus can digitally sign and encrypt your messages, using vanilla
11868 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11869 decoding such messages, see the @code{mm-verify-option} and
11870 @code{mm-decrypt-option} options (@pxref{Security}).
11871
11872 @vindex gnus-message-replysign
11873 @vindex gnus-message-replyencrypt
11874 @vindex gnus-message-replysignencrypted
11875 Often, you would like to sign replies to people who send you signed
11876 messages.  Even more often, you might want to encrypt messages which
11877 are in reply to encrypted messages.  Gnus offers
11878 @code{gnus-message-replysign} to enable the former, and
11879 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11880 @code{gnus-message-replysignencrypted} (on by default) will sign
11881 automatically encrypted messages.
11882
11883 Instructing MML to perform security operations on a @acronym{MIME} part is
11884 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11885 C-m c} key map for encryption, as follows.
11886
11887 @table @kbd
11888
11889 @item C-c C-m s s
11890 @kindex C-c C-m s s
11891 @findex mml-secure-message-sign-smime
11892
11893 Digitally sign current message using @acronym{S/MIME}.
11894
11895 @item C-c C-m s o
11896 @kindex C-c C-m s o
11897 @findex mml-secure-message-sign-pgp
11898
11899 Digitally sign current message using @acronym{PGP}.
11900
11901 @item C-c C-m s p
11902 @kindex C-c C-m s p
11903 @findex mml-secure-message-sign-pgp
11904
11905 Digitally sign current message using @acronym{PGP/MIME}.
11906
11907 @item C-c C-m c s
11908 @kindex C-c C-m c s
11909 @findex mml-secure-message-encrypt-smime
11910
11911 Digitally encrypt current message using @acronym{S/MIME}.
11912
11913 @item C-c C-m c o
11914 @kindex C-c C-m c o
11915 @findex mml-secure-message-encrypt-pgp
11916
11917 Digitally encrypt current message using @acronym{PGP}.
11918
11919 @item C-c C-m c p
11920 @kindex C-c C-m c p
11921 @findex mml-secure-message-encrypt-pgpmime
11922
11923 Digitally encrypt current message using @acronym{PGP/MIME}.
11924
11925 @item C-c C-m C-n
11926 @kindex C-c C-m C-n
11927 @findex mml-unsecure-message
11928 Remove security related MML tags from message.
11929
11930 @end table
11931
11932 @xref{Security, ,Security, message, Message Manual}, for more information.
11933
11934 @node Select Methods
11935 @chapter Select Methods
11936 @cindex foreign groups
11937 @cindex select methods
11938
11939 A @dfn{foreign group} is a group not read by the usual (or
11940 default) means.  It could be, for instance, a group from a different
11941 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11942 personal mail group.
11943
11944 A foreign group (or any group, really) is specified by a @dfn{name} and
11945 a @dfn{select method}.  To take the latter first, a select method is a
11946 list where the first element says what back end to use (e.g. @code{nntp},
11947 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11948 name}.  There may be additional elements in the select method, where the
11949 value may have special meaning for the back end in question.
11950
11951 One could say that a select method defines a @dfn{virtual server}---so
11952 we do just that (@pxref{Server Buffer}).
11953
11954 The @dfn{name} of the group is the name the back end will recognize the
11955 group as.
11956
11957 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11958 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11959 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11960 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11961 back end just knows this group as @samp{soc.motss}.
11962
11963 The different methods all have their peculiarities, of course.
11964
11965 @menu
11966 * Server Buffer::               Making and editing virtual servers.
11967 * Getting News::                Reading USENET news with Gnus.
11968 * Getting Mail::                Reading your personal mail with Gnus.
11969 * Browsing the Web::            Getting messages from a plethora of Web sources.
11970 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11971 * Other Sources::               Reading directories, files, SOUP packets.
11972 * Combined Groups::             Combining groups into one group.
11973 * Gnus Unplugged::              Reading news and mail offline.
11974 @end menu
11975
11976
11977 @node Server Buffer
11978 @section Server Buffer
11979
11980 Traditionally, a @dfn{server} is a machine or a piece of software that
11981 one connects to, and then requests information from.  Gnus does not
11982 connect directly to any real servers, but does all transactions through
11983 one back end or other.  But that's just putting one layer more between
11984 the actual media and Gnus, so we might just as well say that each
11985 back end represents a virtual server.
11986
11987 For instance, the @code{nntp} back end may be used to connect to several
11988 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11989 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11990 use, and what parameters to set by specifying a @dfn{select method}.
11991
11992 These select method specifications can sometimes become quite
11993 complicated---say, for instance, that you want to read from the
11994 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11995 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11996 Anyway, if you had to specify that for each group that used this
11997 server, that would be too much work, so Gnus offers a way of naming
11998 select methods, which is what you do in the server buffer.
11999
12000 To enter the server buffer, use the @kbd{^}
12001 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12002
12003 @menu
12004 * Server Buffer Format::        You can customize the look of this buffer.
12005 * Server Commands::             Commands to manipulate servers.
12006 * Example Methods::             Examples server specifications.
12007 * Creating a Virtual Server::   An example session.
12008 * Server Variables::            Which variables to set.
12009 * Servers and Methods::         You can use server names as select methods.
12010 * Unavailable Servers::         Some servers you try to contact may be down.
12011 @end menu
12012
12013 @vindex gnus-server-mode-hook
12014 @code{gnus-server-mode-hook} is run when creating the server buffer.
12015
12016
12017 @node Server Buffer Format
12018 @subsection Server Buffer Format
12019 @cindex server buffer format
12020
12021 @vindex gnus-server-line-format
12022 You can change the look of the server buffer lines by changing the
12023 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12024 variable, with some simple extensions:
12025
12026 @table @samp
12027
12028 @item h
12029 How the news is fetched---the back end name.
12030
12031 @item n
12032 The name of this server.
12033
12034 @item w
12035 Where the news is to be fetched from---the address.
12036
12037 @item s
12038 The opened/closed/denied status of the server.
12039 @end table
12040
12041 @vindex gnus-server-mode-line-format
12042 The mode line can also be customized by using the
12043 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12044 Formatting}).  The following specs are understood:
12045
12046 @table @samp
12047 @item S
12048 Server name.
12049
12050 @item M
12051 Server method.
12052 @end table
12053
12054 Also @pxref{Formatting Variables}.
12055
12056
12057 @node Server Commands
12058 @subsection Server Commands
12059 @cindex server commands
12060
12061 @table @kbd
12062
12063 @item a
12064 @kindex a (Server)
12065 @findex gnus-server-add-server
12066 Add a new server (@code{gnus-server-add-server}).
12067
12068 @item e
12069 @kindex e (Server)
12070 @findex gnus-server-edit-server
12071 Edit a server (@code{gnus-server-edit-server}).
12072
12073 @item SPACE
12074 @kindex SPACE (Server)
12075 @findex gnus-server-read-server
12076 Browse the current server (@code{gnus-server-read-server}).
12077
12078 @item q
12079 @kindex q (Server)
12080 @findex gnus-server-exit
12081 Return to the group buffer (@code{gnus-server-exit}).
12082
12083 @item k
12084 @kindex k (Server)
12085 @findex gnus-server-kill-server
12086 Kill the current server (@code{gnus-server-kill-server}).
12087
12088 @item y
12089 @kindex y (Server)
12090 @findex gnus-server-yank-server
12091 Yank the previously killed server (@code{gnus-server-yank-server}).
12092
12093 @item c
12094 @kindex c (Server)
12095 @findex gnus-server-copy-server
12096 Copy the current server (@code{gnus-server-copy-server}).
12097
12098 @item l
12099 @kindex l (Server)
12100 @findex gnus-server-list-servers
12101 List all servers (@code{gnus-server-list-servers}).
12102
12103 @item s
12104 @kindex s (Server)
12105 @findex gnus-server-scan-server
12106 Request that the server scan its sources for new articles
12107 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12108 servers.
12109
12110 @item g
12111 @kindex g (Server)
12112 @findex gnus-server-regenerate-server
12113 Request that the server regenerate all its data structures
12114 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12115 a mail back end that has gotten out of sync.
12116
12117 @end table
12118
12119
12120 @node Example Methods
12121 @subsection Example Methods
12122
12123 Most select methods are pretty simple and self-explanatory:
12124
12125 @lisp
12126 (nntp "news.funet.fi")
12127 @end lisp
12128
12129 Reading directly from the spool is even simpler:
12130
12131 @lisp
12132 (nnspool "")
12133 @end lisp
12134
12135 As you can see, the first element in a select method is the name of the
12136 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12137 will.
12138
12139 After these two elements, there may be an arbitrary number of
12140 @code{(@var{variable} @var{form})} pairs.
12141
12142 To go back to the first example---imagine that you want to read from
12143 port 15 on that machine.  This is what the select method should
12144 look like then:
12145
12146 @lisp
12147 (nntp "news.funet.fi" (nntp-port-number 15))
12148 @end lisp
12149
12150 You should read the documentation to each back end to find out what
12151 variables are relevant, but here's an @code{nnmh} example:
12152
12153 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12154 you have two structures that you wish to access: One is your private
12155 mail spool, and the other is a public one.  Here's the possible spec for
12156 your private mail:
12157
12158 @lisp
12159 (nnmh "private" (nnmh-directory "~/private/mail/"))
12160 @end lisp
12161
12162 (This server is then called @samp{private}, but you may have guessed
12163 that.)
12164
12165 Here's the method for a public spool:
12166
12167 @lisp
12168 (nnmh "public"
12169       (nnmh-directory "/usr/information/spool/")
12170       (nnmh-get-new-mail nil))
12171 @end lisp
12172
12173 @cindex proxy
12174 @cindex firewall
12175
12176 If you are behind a firewall and only have access to the @acronym{NNTP}
12177 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12178 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12179 Doing this can be rather fiddly, but your virtual server definition
12180 should probably look something like this:
12181
12182 @lisp
12183 (nntp "firewall"
12184       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12185       (nntp-via-address "the.firewall.machine")
12186       (nntp-address "the.real.nntp.host")
12187       (nntp-end-of-line "\n"))
12188 @end lisp
12189
12190 If you want to use the wonderful @code{ssh} program to provide a
12191 compressed connection over the modem line, you could add the following
12192 configuration to the example above:
12193
12194 @lisp
12195       (nntp-via-rlogin-command "ssh")
12196 @end lisp
12197
12198 See also @code{nntp-via-rlogin-command-switches}.
12199
12200 If you're behind a firewall, but have direct access to the outside world
12201 through a wrapper command like "runsocks", you could open a socksified
12202 telnet connection to the news server as follows:
12203
12204 @lisp
12205 (nntp "outside"
12206       (nntp-pre-command "runsocks")
12207       (nntp-open-connection-function nntp-open-via-telnet)
12208       (nntp-address "the.news.server")
12209       (nntp-end-of-line "\n"))
12210 @end lisp
12211
12212 This means that you have to have set up @code{ssh-agent} correctly to
12213 provide automatic authorization, of course.  And to get a compressed
12214 connection, you have to have the @samp{Compression} option in the
12215 @code{ssh} @file{config} file.
12216
12217
12218 @node Creating a Virtual Server
12219 @subsection Creating a Virtual Server
12220
12221 If you're saving lots of articles in the cache by using persistent
12222 articles, you may want to create a virtual server to read the cache.
12223
12224 First you need to add a new server.  The @kbd{a} command does that.  It
12225 would probably be best to use @code{nnspool} to read the cache.  You
12226 could also use @code{nnml} or @code{nnmh}, though.
12227
12228 Type @kbd{a nnspool RET cache RET}.
12229
12230 You should now have a brand new @code{nnspool} virtual server called
12231 @samp{cache}.  You now need to edit it to have the right definitions.
12232 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12233 will contain the following:
12234
12235 @lisp
12236 (nnspool "cache")
12237 @end lisp
12238
12239 Change that to:
12240
12241 @lisp
12242 (nnspool "cache"
12243          (nnspool-spool-directory "~/News/cache/")
12244          (nnspool-nov-directory "~/News/cache/")
12245          (nnspool-active-file "~/News/cache/active"))
12246 @end lisp
12247
12248 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12249 @kbd{RET} over this virtual server, you should be entered into a browse
12250 buffer, and you should be able to enter any of the groups displayed.
12251
12252
12253 @node Server Variables
12254 @subsection Server Variables
12255 @cindex server variables
12256 @cindex server parameters
12257
12258 One sticky point when defining variables (both on back ends and in Emacs
12259 in general) is that some variables are typically initialized from other
12260 variables when the definition of the variables is being loaded.  If you
12261 change the ``base'' variable after the variables have been loaded, you
12262 won't change the ``derived'' variables.
12263
12264 This typically affects directory and file variables.  For instance,
12265 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12266 directory variables are initialized from that variable, so
12267 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12268 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12269 @code{nnml-directory}---you have to explicitly set all the file
12270 variables to be what you want them to be.  For a complete list of
12271 variables for each back end, see each back end's section later in this
12272 manual, but here's an example @code{nnml} definition:
12273
12274 @lisp
12275 (nnml "public"
12276       (nnml-directory "~/my-mail/")
12277       (nnml-active-file "~/my-mail/active")
12278       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12279 @end lisp
12280
12281 Server variables are often called @dfn{server parameters}.
12282
12283 @node Servers and Methods
12284 @subsection Servers and Methods
12285
12286 Wherever you would normally use a select method
12287 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12288 when browsing a foreign server) you can use a virtual server name
12289 instead.  This could potentially save lots of typing.  And it's nice all
12290 over.
12291
12292
12293 @node Unavailable Servers
12294 @subsection Unavailable Servers
12295
12296 If a server seems to be unreachable, Gnus will mark that server as
12297 @code{denied}.  That means that any subsequent attempt to make contact
12298 with that server will just be ignored.  ``It can't be opened,'' Gnus
12299 will tell you, without making the least effort to see whether that is
12300 actually the case or not.
12301
12302 That might seem quite naughty, but it does make sense most of the time.
12303 Let's say you have 10 groups subscribed to on server
12304 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12305 away from you and the machine is quite slow, so it takes 1 minute just
12306 to find out that it refuses connection to you today.  If Gnus were to
12307 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12308 attempt to do that.  Once it has gotten a single ``connection refused'',
12309 it will regard that server as ``down''.
12310
12311 So, what happens if the machine was only feeling unwell temporarily?
12312 How do you test to see whether the machine has come up again?
12313
12314 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12315 with the following commands:
12316
12317 @table @kbd
12318
12319 @item O
12320 @kindex O (Server)
12321 @findex gnus-server-open-server
12322 Try to establish connection to the server on the current line
12323 (@code{gnus-server-open-server}).
12324
12325 @item C
12326 @kindex C (Server)
12327 @findex gnus-server-close-server
12328 Close the connection (if any) to the server
12329 (@code{gnus-server-close-server}).
12330
12331 @item D
12332 @kindex D (Server)
12333 @findex gnus-server-deny-server
12334 Mark the current server as unreachable
12335 (@code{gnus-server-deny-server}).
12336
12337 @item M-o
12338 @kindex M-o (Server)
12339 @findex gnus-server-open-all-servers
12340 Open the connections to all servers in the buffer
12341 (@code{gnus-server-open-all-servers}).
12342
12343 @item M-c
12344 @kindex M-c (Server)
12345 @findex gnus-server-close-all-servers
12346 Close the connections to all servers in the buffer
12347 (@code{gnus-server-close-all-servers}).
12348
12349 @item R
12350 @kindex R (Server)
12351 @findex gnus-server-remove-denials
12352 Remove all marks to whether Gnus was denied connection from any servers
12353 (@code{gnus-server-remove-denials}).
12354
12355 @item L
12356 @kindex L (Server)
12357 @findex gnus-server-offline-server
12358 Set server status to offline (@code{gnus-server-offline-server}).
12359
12360 @end table
12361
12362
12363 @node Getting News
12364 @section Getting News
12365 @cindex reading news
12366 @cindex news back ends
12367
12368 A newsreader is normally used for reading news.  Gnus currently provides
12369 only two methods of getting news---it can read from an @acronym{NNTP} server,
12370 or it can read from a local spool.
12371
12372 @menu
12373 * NNTP::                        Reading news from an @acronym{NNTP} server.
12374 * News Spool::                  Reading news from the local spool.
12375 @end menu
12376
12377
12378 @node NNTP
12379 @subsection NNTP
12380 @cindex nntp
12381
12382 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12383 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12384 server as the, uhm, address.
12385
12386 If the @acronym{NNTP} server is located at a non-standard port, setting the
12387 third element of the select method to this port number should allow you
12388 to connect to the right port.  You'll have to edit the group info for
12389 that (@pxref{Foreign Groups}).
12390
12391 The name of the foreign group can be the same as a native group.  In
12392 fact, you can subscribe to the same group from as many different servers
12393 you feel like.  There will be no name collisions.
12394
12395 The following variables can be used to create a virtual @code{nntp}
12396 server:
12397
12398 @table @code
12399
12400 @item nntp-server-opened-hook
12401 @vindex nntp-server-opened-hook
12402 @cindex @sc{mode reader}
12403 @cindex authinfo
12404 @cindex authentification
12405 @cindex nntp authentification
12406 @findex nntp-send-authinfo
12407 @findex nntp-send-mode-reader
12408 is run after a connection has been made.  It can be used to send
12409 commands to the @acronym{NNTP} server after it has been contacted.  By
12410 default it sends the command @code{MODE READER} to the server with the
12411 @code{nntp-send-mode-reader} function.  This function should always be
12412 present in this hook.
12413
12414 @item nntp-authinfo-function
12415 @vindex nntp-authinfo-function
12416 @findex nntp-send-authinfo
12417 @vindex nntp-authinfo-file
12418 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12419 server.  The default function is @code{nntp-send-authinfo}, which looks
12420 through your @file{~/.authinfo} (or whatever you've set the
12421 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12422 are found, it will prompt you for a login name and a password.  The
12423 format of the @file{~/.authinfo} file is (almost) the same as the
12424 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12425 manual page, but here are the salient facts:
12426
12427 @enumerate
12428 @item
12429 The file contains one or more line, each of which define one server.
12430
12431 @item
12432 Each line may contain an arbitrary number of token/value pairs.
12433
12434 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12435 @samp{default}.  In addition Gnus introduces two new tokens, not present
12436 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12437 @samp{force}.  (This is the only way the @file{.authinfo} file format
12438 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12439 indicate what port on the server the credentials apply to and
12440 @samp{force} is explained below.
12441
12442 @end enumerate
12443
12444 Here's an example file:
12445
12446 @example
12447 machine news.uio.no login larsi password geheimnis
12448 machine nntp.ifi.uio.no login larsi force yes
12449 @end example
12450
12451 The token/value pairs may appear in any order; @samp{machine} doesn't
12452 have to be first, for instance.
12453
12454 In this example, both login name and password have been supplied for the
12455 former server, while the latter has only the login name listed, and the
12456 user will be prompted for the password.  The latter also has the
12457 @samp{force} tag, which means that the authinfo will be sent to the
12458 @var{nntp} server upon connection; the default (i.e., when there is not
12459 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12460 until the @var{nntp} server asks for it.
12461
12462 You can also add @samp{default} lines that will apply to all servers
12463 that don't have matching @samp{machine} lines.
12464
12465 @example
12466 default force yes
12467 @end example
12468
12469 This will force sending @samp{AUTHINFO} commands to all servers not
12470 previously mentioned.
12471
12472 Remember to not leave the @file{~/.authinfo} file world-readable.
12473
12474 @item nntp-server-action-alist
12475 @vindex nntp-server-action-alist
12476 This is a list of regexps to match on server types and actions to be
12477 taken when matches are made.  For instance, if you want Gnus to beep
12478 every time you connect to innd, you could say something like:
12479
12480 @lisp
12481 (setq nntp-server-action-alist
12482       '(("innd" (ding))))
12483 @end lisp
12484
12485 You probably don't want to do that, though.
12486
12487 The default value is
12488
12489 @lisp
12490 '(("nntpd 1\\.5\\.11t"
12491    (remove-hook 'nntp-server-opened-hook
12492                 'nntp-send-mode-reader)))
12493 @end lisp
12494
12495 This ensures that Gnus doesn't send the @code{MODE READER} command to
12496 nntpd 1.5.11t, since that command chokes that server, I've been told.
12497
12498 @item nntp-maximum-request
12499 @vindex nntp-maximum-request
12500 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12501 will collect headers by sending a series of @code{head} commands.  To
12502 speed things up, the back end sends lots of these commands without
12503 waiting for reply, and then reads all the replies.  This is controlled
12504 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12505 your network is buggy, you should set this to 1.
12506
12507 @item nntp-connection-timeout
12508 @vindex nntp-connection-timeout
12509 If you have lots of foreign @code{nntp} groups that you connect to
12510 regularly, you're sure to have problems with @acronym{NNTP} servers not
12511 responding properly, or being too loaded to reply within reasonable
12512 time.  This is can lead to awkward problems, which can be helped
12513 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12514 that says how many seconds the @code{nntp} back end should wait for a
12515 connection before giving up.  If it is @code{nil}, which is the default,
12516 no timeouts are done.
12517
12518 @c @item nntp-command-timeout
12519 @c @vindex nntp-command-timeout
12520 @c @cindex PPP connections
12521 @c @cindex dynamic IP addresses
12522 @c If you're running Gnus on a machine that has a dynamically assigned
12523 @c address, Gnus may become confused.  If the address of your machine
12524 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12525 @c waiting forever for replies from the server.  To help with this
12526 @c unfortunate problem, you can set this command to a number.  Gnus will
12527 @c then, if it sits waiting for a reply from the server longer than that
12528 @c number of seconds, shut down the connection, start a new one, and resend
12529 @c the command.  This should hopefully be transparent to the user.  A
12530 @c likely number is 30 seconds.
12531 @c
12532 @c @item nntp-retry-on-break
12533 @c @vindex nntp-retry-on-break
12534 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12535 @c hangs.  This will have much the same effect as the command timeout
12536 @c described above.
12537
12538 @item nntp-server-hook
12539 @vindex nntp-server-hook
12540 This hook is run as the last step when connecting to an @acronym{NNTP}
12541 server.
12542
12543 @item nntp-buggy-select
12544 @vindex nntp-buggy-select
12545 Set this to non-@code{nil} if your select routine is buggy.
12546
12547 @item nntp-nov-is-evil
12548 @vindex nntp-nov-is-evil
12549 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12550 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12551 can be used.
12552
12553 @item nntp-xover-commands
12554 @vindex nntp-xover-commands
12555 @cindex @acronym{NOV}
12556 @cindex XOVER
12557 List of strings used as commands to fetch @acronym{NOV} lines from a
12558 server.  The default value of this variable is @code{("XOVER"
12559 "XOVERVIEW")}.
12560
12561 @item nntp-nov-gap
12562 @vindex nntp-nov-gap
12563 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12564 the server.  The server responds with one huge list of lines.  However,
12565 if you have read articles 2-5000 in the group, and only want to read
12566 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12567 lines that you will not need.  This variable says how
12568 big a gap between two consecutive articles is allowed to be before the
12569 @code{XOVER} request is split into several request.  Note that if your
12570 network is fast, setting this variable to a really small number means
12571 that fetching will probably be slower.  If this variable is @code{nil},
12572 @code{nntp} will never split requests.  The default is 5.
12573
12574 @item nntp-prepare-server-hook
12575 @vindex nntp-prepare-server-hook
12576 A hook run before attempting to connect to an @acronym{NNTP} server.
12577
12578 @item nntp-warn-about-losing-connection
12579 @vindex nntp-warn-about-losing-connection
12580 If this variable is non-@code{nil}, some noise will be made when a
12581 server closes connection.
12582
12583 @item nntp-record-commands
12584 @vindex nntp-record-commands
12585 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12586 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12587 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12588 that doesn't seem to work.
12589
12590 @item nntp-open-connection-function
12591 @vindex nntp-open-connection-function
12592 It is possible to customize how the connection to the nntp server will
12593 be opened.  If you specify an @code{nntp-open-connection-function}
12594 parameter, Gnus will use that function to establish the connection.
12595 Five pre-made functions are supplied.  These functions can be grouped in
12596 two categories: direct connection functions (three pre-made), and
12597 indirect ones (two pre-made).
12598
12599 @item nntp-prepare-post-hook
12600 @vindex nntp-prepare-post-hook
12601 A hook run just before posting an article.  If there is no
12602 @code{Message-ID} header in the article and the news server provides the
12603 recommended ID, it will be added to the article before running this
12604 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12605 inhibit Gnus to add a @code{Message-ID} header, you could say:
12606
12607 @lisp
12608 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12609 @end lisp
12610
12611 Note that not all servers support the recommended ID.  This works for
12612 INN versions 2.3.0 and later, for instance.
12613
12614 @item nntp-read-timeout
12615 @vindex nntp-read-timeout
12616 How long nntp should wait between checking for the end of output.
12617 Shorter values mean quicker response, but is more CPU intensive.  The
12618 default is 0.1 seconds.  If you have a slow line to the server (and
12619 don't like to see Emacs eat your available CPU power), you might set
12620 this to, say, 1.
12621
12622 @end table
12623
12624 @menu
12625 * Direct Functions::            Connecting directly to the server.
12626 * Indirect Functions::          Connecting indirectly to the server.
12627 * Common Variables::            Understood by several connection functions.
12628 @end menu
12629
12630
12631 @node Direct Functions
12632 @subsubsection Direct Functions
12633 @cindex direct connection functions
12634
12635 These functions are called direct because they open a direct connection
12636 between your machine and the @acronym{NNTP} server.  The behavior of these
12637 functions is also affected by commonly understood variables
12638 (@pxref{Common Variables}).
12639
12640 @table @code
12641 @findex nntp-open-network-stream
12642 @item nntp-open-network-stream
12643 This is the default, and simply connects to some port or other on the
12644 remote system.
12645
12646 @findex nntp-open-tls-stream
12647 @item nntp-open-tls-stream
12648 Opens a connection to a server over a @dfn{secure} channel.  To use
12649 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12650 installed.  You then define a server as follows:
12651
12652 @lisp
12653 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12654 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12655 ;;
12656 (nntp "snews.bar.com"
12657       (nntp-open-connection-function nntp-open-tls-stream)
12658       (nntp-port-number )
12659       (nntp-address "snews.bar.com"))
12660 @end lisp
12661
12662 @findex nntp-open-ssl-stream
12663 @item nntp-open-ssl-stream
12664 Opens a connection to a server over a @dfn{secure} channel.  To use
12665 this you must have @uref{http://www.openssl.org, OpenSSL} or
12666 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12667 then define a server as follows:
12668
12669 @lisp
12670 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12671 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12672 ;;
12673 (nntp "snews.bar.com"
12674       (nntp-open-connection-function nntp-open-ssl-stream)
12675       (nntp-port-number 563)
12676       (nntp-address "snews.bar.com"))
12677 @end lisp
12678
12679 @findex nntp-open-telnet-stream
12680 @item nntp-open-telnet-stream
12681 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12682 it.  You might wonder why this function exists, since we have the
12683 default @code{nntp-open-network-stream} which would do the job.  (One
12684 of) the reason(s) is that if you are behind a firewall but have direct
12685 connections to the outside world thanks to a command wrapper like
12686 @code{runsocks}, you can use it like this:
12687
12688 @lisp
12689 (nntp "socksified"
12690       (nntp-pre-command "runsocks")
12691       (nntp-open-connection-function nntp-open-telnet-stream)
12692       (nntp-address "the.news.server"))
12693 @end lisp
12694
12695 With the default method, you would need to wrap your whole Emacs
12696 session, which is not a good idea.
12697 @end table
12698
12699
12700 @node Indirect Functions
12701 @subsubsection Indirect Functions
12702 @cindex indirect connection functions
12703
12704 These functions are called indirect because they connect to an
12705 intermediate host before actually connecting to the @acronym{NNTP} server.
12706 All of these functions and related variables are also said to belong to
12707 the ``via'' family of connection: they're all prefixed with ``via'' to make
12708 things cleaner.  The behavior of these functions is also affected by
12709 commonly understood variables (@pxref{Common Variables}).
12710
12711 @table @code
12712 @item nntp-open-via-rlogin-and-telnet
12713 @findex nntp-open-via-rlogin-and-telnet
12714 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12715 to the real @acronym{NNTP} server from there.  This is useful for instance if
12716 you need to connect to a firewall machine first.
12717
12718 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12719
12720 @table @code
12721 @item nntp-via-rlogin-command
12722 @vindex nntp-via-rlogin-command
12723 Command used to log in on the intermediate host.  The default is
12724 @samp{rsh}, but @samp{ssh} is a popular alternative.
12725
12726 @item nntp-via-rlogin-command-switches
12727 @vindex nntp-via-rlogin-command-switches
12728 List of strings to be used as the switches to
12729 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12730 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12731 @samp{("-C")} in order to compress all data connections, otherwise set
12732 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12733 the telnet command requires a pseudo-tty allocation on an intermediate
12734 host.
12735 @end table
12736
12737 @item nntp-open-via-telnet-and-telnet
12738 @findex nntp-open-via-telnet-and-telnet
12739 Does essentially the same, but uses @samp{telnet} instead of
12740 @samp{rlogin} to connect to the intermediate host.
12741
12742 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12743
12744 @table @code
12745 @item nntp-via-telnet-command
12746 @vindex nntp-via-telnet-command
12747 Command used to @code{telnet} the intermediate host.  The default is
12748 @samp{telnet}.
12749
12750 @item nntp-via-telnet-switches
12751 @vindex nntp-via-telnet-switches
12752 List of strings to be used as the switches to the
12753 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12754
12755 @item nntp-via-user-password
12756 @vindex nntp-via-user-password
12757 Password to use when logging in on the intermediate host.
12758
12759 @item nntp-via-envuser
12760 @vindex nntp-via-envuser
12761 If non-@code{nil}, the intermediate @code{telnet} session (client and
12762 server both) will support the @code{ENVIRON} option and not prompt for
12763 login name. This works for Solaris @code{telnet}, for instance.
12764
12765 @item nntp-via-shell-prompt
12766 @vindex nntp-via-shell-prompt
12767 Regexp matching the shell prompt on the intermediate host.  The default
12768 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12769
12770 @end table
12771
12772 @end table
12773
12774
12775 Here are some additional variables that are understood by all the above
12776 functions:
12777
12778 @table @code
12779
12780 @item nntp-via-user-name
12781 @vindex nntp-via-user-name
12782 User name to use when connecting to the intermediate host.
12783
12784 @item nntp-via-address
12785 @vindex nntp-via-address
12786 Address of the intermediate host to connect to.
12787
12788 @end table
12789
12790
12791 @node Common Variables
12792 @subsubsection Common Variables
12793
12794 The following variables affect the behavior of all, or several of the
12795 pre-made connection functions. When not specified, all functions are
12796 affected.
12797
12798 @table @code
12799
12800 @item nntp-pre-command
12801 @vindex nntp-pre-command
12802 A command wrapper to use when connecting through a non native
12803 connection function (all except @code{nntp-open-network-stream},
12804 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12805 where you would put a @samp{SOCKS} wrapper for instance.
12806
12807 @item nntp-address
12808 @vindex nntp-address
12809 The address of the @acronym{NNTP} server.
12810
12811 @item nntp-port-number
12812 @vindex nntp-port-number
12813 Port number to connect to the @acronym{NNTP} server.  The default is
12814 @samp{nntp}.  If you use @acronym{NNTP} over
12815 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12816 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12817 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12818 not work with named ports.
12819
12820 @item nntp-end-of-line
12821 @vindex nntp-end-of-line
12822 String to use as end-of-line marker when talking to the @acronym{NNTP}
12823 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12824 using a non native connection function.
12825
12826 @item nntp-telnet-command
12827 @vindex nntp-telnet-command
12828 Command to use when connecting to the @acronym{NNTP} server through
12829 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12830 just for the real @acronym{NNTP} server.  The default is
12831 @samp{telnet}.
12832
12833 @item nntp-telnet-switches
12834 @vindex nntp-telnet-switches
12835 A list of switches to pass to @code{nntp-telnet-command}.  The default
12836 is @samp{("-8")}.
12837
12838 @end table
12839
12840
12841 @node News Spool
12842 @subsection News Spool
12843 @cindex nnspool
12844 @cindex news spool
12845
12846 Subscribing to a foreign group from the local spool is extremely easy,
12847 and might be useful, for instance, to speed up reading groups that
12848 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12849 instance.
12850
12851 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12852 anything else) as the address.
12853
12854 If you have access to a local spool, you should probably use that as the
12855 native select method (@pxref{Finding the News}).  It is normally faster
12856 than using an @code{nntp} select method, but might not be.  It depends.
12857 You just have to try to find out what's best at your site.
12858
12859 @table @code
12860
12861 @item nnspool-inews-program
12862 @vindex nnspool-inews-program
12863 Program used to post an article.
12864
12865 @item nnspool-inews-switches
12866 @vindex nnspool-inews-switches
12867 Parameters given to the inews program when posting an article.
12868
12869 @item nnspool-spool-directory
12870 @vindex nnspool-spool-directory
12871 Where @code{nnspool} looks for the articles.  This is normally
12872 @file{/usr/spool/news/}.
12873
12874 @item nnspool-nov-directory
12875 @vindex nnspool-nov-directory
12876 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12877 @file{/usr/spool/news/over.view/}.
12878
12879 @item nnspool-lib-dir
12880 @vindex nnspool-lib-dir
12881 Where the news lib dir is (@file{/usr/lib/news/} by default).
12882
12883 @item nnspool-active-file
12884 @vindex nnspool-active-file
12885 The name of the active file.
12886
12887 @item nnspool-newsgroups-file
12888 @vindex nnspool-newsgroups-file
12889 The name of the group descriptions file.
12890
12891 @item nnspool-history-file
12892 @vindex nnspool-history-file
12893 The name of the news history file.
12894
12895 @item nnspool-active-times-file
12896 @vindex nnspool-active-times-file
12897 The name of the active date file.
12898
12899 @item nnspool-nov-is-evil
12900 @vindex nnspool-nov-is-evil
12901 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12902 that it finds.
12903
12904 @item nnspool-sift-nov-with-sed
12905 @vindex nnspool-sift-nov-with-sed
12906 @cindex sed
12907 If non-@code{nil}, which is the default, use @code{sed} to get the
12908 relevant portion from the overview file.  If @code{nil},
12909 @code{nnspool} will load the entire file into a buffer and process it
12910 there.
12911
12912 @end table
12913
12914
12915 @node Getting Mail
12916 @section Getting Mail
12917 @cindex reading mail
12918 @cindex mail
12919
12920 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12921 course.
12922
12923 @menu
12924 * Mail in a Newsreader::        Important introductory notes.
12925 * Getting Started Reading Mail::  A simple cookbook example.
12926 * Splitting Mail::              How to create mail groups.
12927 * Mail Sources::                How to tell Gnus where to get mail from.
12928 * Mail Back End Variables::     Variables for customizing mail handling.
12929 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12930 * Group Mail Splitting::        Use group customize to drive mail splitting.
12931 * Incorporating Old Mail::      What about the old mail you have?
12932 * Expiring Mail::               Getting rid of unwanted mail.
12933 * Washing Mail::                Removing gruft from the mail you get.
12934 * Duplicates::                  Dealing with duplicated mail.
12935 * Not Reading Mail::            Using mail back ends for reading other files.
12936 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12937 @end menu
12938
12939
12940 @node Mail in a Newsreader
12941 @subsection Mail in a Newsreader
12942
12943 If you are used to traditional mail readers, but have decided to switch
12944 to reading mail with Gnus, you may find yourself experiencing something
12945 of a culture shock.
12946
12947 Gnus does not behave like traditional mail readers.  If you want to make
12948 it behave that way, you can, but it's an uphill battle.
12949
12950 Gnus, by default, handles all its groups using the same approach.  This
12951 approach is very newsreaderly---you enter a group, see the new/unread
12952 messages, and when you read the messages, they get marked as read, and
12953 you don't see them any more.  (Unless you explicitly ask for them.)
12954
12955 In particular, you do not do anything explicitly to delete messages.
12956
12957 Does this mean that all the messages that have been marked as read are
12958 deleted?  How awful!
12959
12960 But, no, it means that old messages are @dfn{expired} according to some
12961 scheme or other.  For news messages, the expire process is controlled by
12962 the news administrator; for mail, the expire process is controlled by
12963 you.  The expire process for mail is covered in depth in @pxref{Expiring
12964 Mail}.
12965
12966 What many Gnus users find, after using it a while for both news and
12967 mail, is that the transport mechanism has very little to do with how
12968 they want to treat a message.
12969
12970 Many people subscribe to several mailing lists.  These are transported
12971 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12972 answering, or even reading these messages very carefully.  We may not
12973 need to save them because if we should need to read one again, they are
12974 archived somewhere else.
12975
12976 Some people have local news groups which have only a handful of readers.
12977 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12978 to read and answer a large fraction of the messages very carefully in
12979 order to do our work.  And there may not be an archive, so we may need
12980 to save the interesting messages the same way we would personal mail.
12981
12982 The important distinction turns out to be not the transport mechanism,
12983 but other factors such as how interested we are in the subject matter,
12984 or how easy it is to retrieve the message if we need to read it again.
12985
12986 Gnus provides many options for sorting mail into ``groups'' which behave
12987 like newsgroups, and for treating each group (whether mail or news)
12988 differently.
12989
12990 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12991 that Gnus should grow up and be a male, er, mail reader.  It is possible
12992 to whip Gnus into a more mailreaderly being, but, as said before, it's
12993 not easy.  People who prefer proper mail readers should try @sc{vm}
12994 instead, which is an excellent, and proper, mail reader.
12995
12996 I don't mean to scare anybody off, but I want to make it clear that you
12997 may be required to learn a new way of thinking about messages.  After
12998 you've been subjected to The Gnus Way, you will come to love it.  I can
12999 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13000 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13001 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13002 You Do.)
13003
13004
13005 @node Getting Started Reading Mail
13006 @subsection Getting Started Reading Mail
13007
13008 It's quite easy to use Gnus to read your new mail.  You just plonk the
13009 mail back end of your choice into @code{gnus-secondary-select-methods},
13010 and things will happen automatically.
13011
13012 For instance, if you want to use @code{nnml} (which is a ``one file per
13013 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13014
13015 @lisp
13016 (setq gnus-secondary-select-methods '((nnml "")))
13017 @end lisp
13018
13019 Now, the next time you start Gnus, this back end will be queried for new
13020 articles, and it will move all the messages in your spool file to its
13021 directory, which is @file{~/Mail/} by default.  The new group that will
13022 be created (@samp{mail.misc}) will be subscribed, and you can read it
13023 like any other group.
13024
13025 You will probably want to split the mail into several groups, though:
13026
13027 @lisp
13028 (setq nnmail-split-methods
13029       '(("junk" "^From:.*Lars Ingebrigtsen")
13030         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13031         ("other" "")))
13032 @end lisp
13033
13034 This will result in three new @code{nnml} mail groups being created:
13035 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13036 mail that doesn't fit into the first two groups will be placed in the
13037 last group.
13038
13039 This should be sufficient for reading mail with Gnus.  You might want to
13040 give the other sections in this part of the manual a perusal, though.
13041 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13042
13043
13044 @node Splitting Mail
13045 @subsection Splitting Mail
13046 @cindex splitting mail
13047 @cindex mail splitting
13048
13049 @vindex nnmail-split-methods
13050 The @code{nnmail-split-methods} variable says how the incoming mail is
13051 to be split into groups.
13052
13053 @lisp
13054 (setq nnmail-split-methods
13055   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13056     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13057     ("mail.other" "")))
13058 @end lisp
13059
13060 This variable is a list of lists, where the first element of each of
13061 these lists is the name of the mail group (they do not have to be called
13062 something beginning with @samp{mail}, by the way), and the second
13063 element is a regular expression used on the header of each mail to
13064 determine if it belongs in this mail group.  The first string may
13065 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13066 insert sub-expressions from the matched text.  For instance:
13067
13068 @lisp
13069 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13070 @end lisp
13071
13072 The second element can also be a function.  In that case, it will be
13073 called narrowed to the headers with the first element of the rule as the
13074 argument.  It should return a non-@code{nil} value if it thinks that the
13075 mail belongs in that group.
13076
13077 The last of these groups should always be a general one, and the regular
13078 expression should @emph{always} be @samp{*} so that it matches any mails
13079 that haven't been matched by any of the other regexps.  (These rules are
13080 processed from the beginning of the alist toward the end.  The first
13081 rule to make a match will ``win'', unless you have crossposting enabled.
13082 In that case, all matching rules will ``win''.)
13083
13084 If you like to tinker with this yourself, you can set this variable to a
13085 function of your choice.  This function will be called without any
13086 arguments in a buffer narrowed to the headers of an incoming mail
13087 message.  The function should return a list of group names that it
13088 thinks should carry this mail message.
13089
13090 Note that the mail back ends are free to maul the poor, innocent,
13091 incoming headers all they want to.  They all add @code{Lines} headers;
13092 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13093 @code{From<SPACE>} line to something else.
13094
13095 @vindex nnmail-crosspost
13096 The mail back ends all support cross-posting.  If several regexps match,
13097 the mail will be ``cross-posted'' to all those groups.
13098 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13099 that no articles are crossposted to the general (@samp{*}) group.
13100
13101 @vindex nnmail-crosspost-link-function
13102 @cindex crosspost
13103 @cindex links
13104 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13105 the crossposted articles.  However, not all file systems support hard
13106 links.  If that's the case for you, set
13107 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13108 variable is @code{add-name-to-file} by default.)
13109
13110 @kindex M-x nnmail-split-history
13111 @findex nnmail-split-history
13112 If you wish to see where the previous mail split put the messages, you
13113 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13114 where re-spooling messages would put the messages, you can use
13115 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13116 Group Commands}).
13117
13118 @vindex nnmail-split-header-length-limit
13119 Header lines longer than the value of
13120 @code{nnmail-split-header-length-limit} are excluded from the split
13121 function.
13122
13123 @vindex nnmail-mail-splitting-charset
13124 @vindex nnmail-mail-splitting-decodes
13125 By default the splitting codes @acronym{MIME} decodes headers so you
13126 can match on non-@acronym{ASCII} strings.  The
13127 @code{nnmail-mail-splitting-charset} variable specifies the default
13128 charset for decoding.  The behaviour can be turned off completely by
13129 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13130 useful if you want to match articles based on the raw header data.
13131
13132 @vindex nnmail-resplit-incoming
13133 By default, splitting is performed on all incoming messages.  If you
13134 specify a @code{directory} entry for the variable @code{mail-sources}
13135 @pxref{Mail Source Specifiers}, however, then splitting does
13136 @emph{not} happen by default.  You can set the variable
13137 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13138 splitting happen even in this case.  (This variable has no effect on
13139 other kinds of entries.)
13140
13141 Gnus gives you all the opportunity you could possibly want for shooting
13142 yourself in the foot.  Let's say you create a group that will contain
13143 all the mail you get from your boss.  And then you accidentally
13144 unsubscribe from the group.  Gnus will still put all the mail from your
13145 boss in the unsubscribed group, and so, when your boss mails you ``Have
13146 that report ready by Monday or you're fired!'', you'll never see it and,
13147 come Tuesday, you'll still believe that you're gainfully employed while
13148 you really should be out collecting empty bottles to save up for next
13149 month's rent money.
13150
13151
13152 @node Mail Sources
13153 @subsection Mail Sources
13154
13155 Mail can be gotten from many different sources---the mail spool, from
13156 a @acronym{POP} mail server, from a procmail directory, or from a
13157 maildir, for instance.
13158
13159 @menu
13160 * Mail Source Specifiers::      How to specify what a mail source is.
13161 * Mail Source Customization::   Some variables that influence things.
13162 * Fetching Mail::               Using the mail source specifiers.
13163 @end menu
13164
13165
13166 @node Mail Source Specifiers
13167 @subsubsection Mail Source Specifiers
13168 @cindex POP
13169 @cindex mail server
13170 @cindex procmail
13171 @cindex mail spool
13172 @cindex mail source
13173
13174 You tell Gnus how to fetch mail by setting @code{mail-sources}
13175 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13176
13177 Here's an example:
13178
13179 @lisp
13180 (pop :server "pop3.mailserver.com" :user "myname")
13181 @end lisp
13182
13183 As can be observed, a mail source specifier is a list where the first
13184 element is a @dfn{mail source type}, followed by an arbitrary number of
13185 @dfn{keywords}.  Keywords that are not explicitly specified are given
13186 default values.
13187
13188 The following mail source types are available:
13189
13190 @table @code
13191 @item file
13192 Get mail from a single file; typically from the mail spool.
13193
13194 Keywords:
13195
13196 @table @code
13197 @item :path
13198 The file name.  Defaults to the value of the @env{MAIL}
13199 environment variable or the value of @code{rmail-spool-directory}
13200 (usually something like @file{/usr/mail/spool/user-name}).
13201
13202 @item :prescript
13203 @itemx :postscript
13204 Script run before/after fetching mail.
13205 @end table
13206
13207 An example file mail source:
13208
13209 @lisp
13210 (file :path "/usr/spool/mail/user-name")
13211 @end lisp
13212
13213 Or using the default file name:
13214
13215 @lisp
13216 (file)
13217 @end lisp
13218
13219 If the mail spool file is not located on the local machine, it's best
13220 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13221 You can not use ange-ftp file names here---it has no way to lock the
13222 mail spool while moving the mail.
13223
13224 If it's impossible to set up a proper server, you can use ssh instead.
13225
13226 @lisp
13227 (setq mail-sources
13228       '((file :prescript "ssh host bin/getmail >%t")))
13229 @end lisp
13230
13231 The @samp{getmail} script would look something like the following:
13232
13233 @example
13234 #!/bin/sh
13235 #  getmail - move mail from spool to stdout
13236 #  flu@@iki.fi
13237
13238 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13239 TMP=$HOME/Mail/tmp
13240 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13241 @end example
13242
13243 Alter this script to fit find the @samp{movemail} you want to use.
13244
13245
13246 @item directory
13247 @vindex nnmail-scan-directory-mail-source-once
13248 Get mail from several files in a directory.  This is typically used
13249 when you have procmail split the incoming mail into several files.
13250 That is, there is a one-to-one correspondence between files in that
13251 directory and groups, so that mail from the file @file{foo.bar.spool}
13252 will be put in the group @code{foo.bar}.  (You can change the suffix
13253 to be used instead of @code{.spool}.)  Setting
13254 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13255 Gnus to scan the mail source only once.  This is particularly useful
13256 if you want to scan mail groups at a specified level.
13257
13258 @vindex nnmail-resplit-incoming
13259 There is also the variable @code{nnmail-resplit-incoming}, if you set
13260 that to a non-@code{nil} value, then the normal splitting process is
13261 applied to all the files from the directory, @ref{Splitting Mail}.
13262
13263 Keywords:
13264
13265 @table @code
13266 @item :path
13267 The name of the directory where the files are.  There is no default
13268 value.
13269
13270 @item :suffix
13271 Only files ending with this suffix are used.  The default is
13272 @samp{.spool}.
13273
13274 @item :predicate
13275 Only files that have this predicate return non-@code{nil} are returned.
13276 The default is @code{identity}.  This is used as an additional
13277 filter---only files that have the right suffix @emph{and} satisfy this
13278 predicate are considered.
13279
13280 @item :prescript
13281 @itemx :postscript
13282 Script run before/after fetching mail.
13283
13284 @end table
13285
13286 An example directory mail source:
13287
13288 @lisp
13289 (directory :path "/home/user-name/procmail-dir/"
13290            :suffix ".prcml")
13291 @end lisp
13292
13293 @item pop
13294 Get mail from a @acronym{POP} server.
13295
13296 Keywords:
13297
13298 @table @code
13299 @item :server
13300 The name of the @acronym{POP} server.  The default is taken from the
13301 @env{MAILHOST} environment variable.
13302
13303 @item :port
13304 The port number of the @acronym{POP} server.  This can be a number (eg,
13305 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13306 string, it should be a service name as listed in @file{/etc/services} on
13307 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13308 need to specify it as @samp{"pop-3"} instead.
13309
13310 @item :user
13311 The user name to give to the @acronym{POP} server.  The default is the login
13312 name.
13313
13314 @item :password
13315 The password to give to the @acronym{POP} server.  If not specified,
13316 the user is prompted.
13317
13318 @item :program
13319 The program to use to fetch mail from the @acronym{POP} server.  This
13320 should be a @code{format}-like string.  Here's an example:
13321
13322 @example
13323 fetchmail %u@@%s -P %p %t
13324 @end example
13325
13326 The valid format specifier characters are:
13327
13328 @table @samp
13329 @item t
13330 The name of the file the mail is to be moved to.  This must always be
13331 included in this string.
13332
13333 @item s
13334 The name of the server.
13335
13336 @item P
13337 The port number of the server.
13338
13339 @item u
13340 The user name to use.
13341
13342 @item p
13343 The password to use.
13344 @end table
13345
13346 The values used for these specs are taken from the values you give the
13347 corresponding keywords.
13348
13349 @item :prescript
13350 A script to be run before fetching the mail.  The syntax is the same as
13351 the @code{:program} keyword.  This can also be a function to be run.
13352
13353 @item :postscript
13354 A script to be run after fetching the mail.  The syntax is the same as
13355 the @code{:program} keyword.  This can also be a function to be run.
13356
13357 @item :function
13358 The function to use to fetch mail from the @acronym{POP} server.  The
13359 function is called with one parameter---the name of the file where the
13360 mail should be moved to.
13361
13362 @item :authentication
13363 This can be either the symbol @code{password} or the symbol @code{apop}
13364 and says what authentication scheme to use.  The default is
13365 @code{password}.
13366
13367 @end table
13368
13369 If the @code{:program} and @code{:function} keywords aren't specified,
13370 @code{pop3-movemail} will be used.
13371
13372 Here are some examples.  Fetch from the default @acronym{POP} server,
13373 using the default user name, and default fetcher:
13374
13375 @lisp
13376 (pop)
13377 @end lisp
13378
13379 Fetch from a named server with a named user and password:
13380
13381 @lisp
13382 (pop :server "my.pop.server"
13383      :user "user-name" :password "secret")
13384 @end lisp
13385
13386 Use @samp{movemail} to move the mail:
13387
13388 @lisp
13389 (pop :program "movemail po:%u %t %p")
13390 @end lisp
13391
13392 @item maildir
13393 Get mail from a maildir.  This is a type of mailbox that is supported by
13394 at least qmail and postfix, where each file in a special directory
13395 contains exactly one mail.
13396
13397 Keywords:
13398
13399 @table @code
13400 @item :path
13401 The name of the directory where the mails are stored.  The default is
13402 taken from the @env{MAILDIR} environment variable or
13403 @file{~/Maildir/}.
13404 @item :subdirs
13405 The subdirectories of the Maildir.  The default is
13406 @samp{("new" "cur")}.
13407
13408 @c If you sometimes look at your mail through a pop3 daemon before fetching
13409 @c them with Gnus, you may also have to fetch your mails from the
13410 @c @code{cur} directory inside the maildir, like in the first example
13411 @c below.
13412
13413 You can also get mails from remote hosts (because maildirs don't suffer
13414 from locking problems).
13415
13416 @end table
13417
13418 Two example maildir mail sources:
13419
13420 @lisp
13421 (maildir :path "/home/user-name/Maildir/"
13422          :subdirs ("cur" "new"))
13423 @end lisp
13424
13425 @lisp
13426 (maildir :path "/user@@remotehost.org:~/Maildir/"
13427          :subdirs ("new"))
13428 @end lisp
13429
13430 @item imap
13431 Get mail from a @acronym{IMAP} server.  If you don't want to use
13432 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13433 with nnimap), for some reason or other, Gnus let you treat it similar
13434 to a @acronym{POP} server and fetches articles from a given
13435 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13436
13437 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13438 may need external programs and libraries, @xref{IMAP}.
13439
13440 Keywords:
13441
13442 @table @code
13443 @item :server
13444 The name of the @acronym{IMAP} server.  The default is taken from the
13445 @env{MAILHOST} environment variable.
13446
13447 @item :port
13448 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13449 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13450
13451 @item :user
13452 The user name to give to the @acronym{IMAP} server.  The default is the login
13453 name.
13454
13455 @item :password
13456 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13457 prompted.
13458
13459 @item :stream
13460 What stream to use for connecting to the server, this is one of the
13461 symbols in @code{imap-stream-alist}.  Right now, this means
13462 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13463 @samp{ssl}, @samp{shell} or the default @samp{network}.
13464
13465 @item :authentication
13466 Which authenticator to use for authenticating to the server, this is
13467 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13468 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13469 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13470
13471 @item :program
13472 When using the `shell' :stream, the contents of this variable is
13473 mapped into the @code{imap-shell-program} variable.  This should be a
13474 @code{format}-like string (or list of strings).  Here's an example:
13475
13476 @example
13477 ssh %s imapd
13478 @end example
13479
13480 The valid format specifier characters are:
13481
13482 @table @samp
13483 @item s
13484 The name of the server.
13485
13486 @item l
13487 User name from @code{imap-default-user}.
13488
13489 @item p
13490 The port number of the server.
13491 @end table
13492
13493 The values used for these specs are taken from the values you give the
13494 corresponding keywords.
13495
13496 @item :mailbox
13497 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13498 which normally is the mailbox which receive incoming mail.
13499
13500 @item :predicate
13501 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13502 UNDELETED}, is probably the best choice for most people, but if you
13503 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13504 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13505 Then all articles in the mailbox is fetched, no matter what.  For a
13506 complete list of predicates, see RFC 2060 section 6.4.4.
13507
13508 @item :fetchflag
13509 How to flag fetched articles on the server, the default @samp{\Deleted}
13510 will mark them as deleted, an alternative would be @samp{\Seen} which
13511 would simply mark them as read.  These are the two most likely choices,
13512 but more flags are defined in RFC 2060 section 2.3.2.
13513
13514 @item :dontexpunge
13515 If non-@code{nil}, don't remove all articles marked as deleted in the
13516 mailbox after finishing the fetch.
13517
13518 @end table
13519
13520 An example @acronym{IMAP} mail source:
13521
13522 @lisp
13523 (imap :server "mail.mycorp.com"
13524       :stream kerberos4
13525       :fetchflag "\\Seen")
13526 @end lisp
13527
13528 @item webmail
13529 Get mail from a webmail server, such as @uref{www.hotmail.com},
13530 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13531 @uref{mail.yahoo.com}.
13532
13533 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13534 required for url "4.0pre.46".
13535
13536 WARNING: Mails may be lost.  NO WARRANTY.
13537
13538 Keywords:
13539
13540 @table @code
13541 @item :subtype
13542 The type of the webmail server.  The default is @code{hotmail}.  The
13543 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13544
13545 @item :user
13546 The user name to give to the webmail server.  The default is the login
13547 name.
13548
13549 @item :password
13550 The password to give to the webmail server.  If not specified, the user is
13551 prompted.
13552
13553 @item :dontexpunge
13554 If non-@code{nil}, only fetch unread articles and don't move them to
13555 trash folder after finishing the fetch.
13556
13557 @end table
13558
13559 An example webmail source:
13560
13561 @lisp
13562 (webmail :subtype 'hotmail
13563          :user "user-name"
13564          :password "secret")
13565 @end lisp
13566 @end table
13567
13568 @table @dfn
13569 @item Common Keywords
13570 Common keywords can be used in any type of mail source.
13571
13572 Keywords:
13573
13574 @table @code
13575 @item :plugged
13576 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13577 use directory source to get mail, you can specify it as in this
13578 example:
13579
13580 @lisp
13581 (setq mail-sources
13582       '((directory :path "/home/pavel/.Spool/"
13583                    :suffix ""
13584                    :plugged t)))
13585 @end lisp
13586
13587 Gnus will then fetch your mail even when you are unplugged.  This is
13588 useful when you use local mail and news.
13589
13590 @end table
13591 @end table
13592
13593 @subsubsection Function Interface
13594
13595 Some of the above keywords specify a Lisp function to be executed.
13596 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13597 the value of the keyword while the function is executing.  For example,
13598 consider the following mail-source setting:
13599
13600 @lisp
13601 (setq mail-sources '((pop :user "jrl"
13602                           :server "pophost" :function fetchfunc)))
13603 @end lisp
13604
13605 While the function @code{fetchfunc} is executing, the symbol @code{user}
13606 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13607 @code{"pophost"}.  The symbols @code{port}, @code{password},
13608 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13609 and @code{authentication} are also bound (to their default values).
13610
13611 See above for a list of keywords for each type of mail source.
13612
13613
13614 @node Mail Source Customization
13615 @subsubsection Mail Source Customization
13616
13617 The following is a list of variables that influence how the mail is
13618 fetched.  You would normally not need to set or change any of these
13619 variables.
13620
13621 @table @code
13622 @item mail-source-crash-box
13623 @vindex mail-source-crash-box
13624 File where mail will be stored while processing it.  The default is@*
13625 @file{~/.emacs-mail-crash-box}.
13626
13627 @item mail-source-delete-incoming
13628 @vindex mail-source-delete-incoming
13629 If non-@code{nil}, delete incoming files after handling them.  If
13630 @code{t}, delete the files immediately, if @code{nil}, never delete any
13631 files.  If a positive number, delete files older than number of days
13632 (This will only happen, when receiving new mail).  You may also set
13633 @code{mail-source-delete-incoming} to @code{nil} and call
13634 @code{mail-source-delete-old-incoming} from a hook or interactively.
13635
13636 @item mail-source-delete-old-incoming-confirm
13637 @vindex mail-source-delete-old-incoming-confirm
13638 If non-@code{nil}, ask for for confirmation before deleting old incoming
13639 files.  This variable only applies when
13640 @code{mail-source-delete-incoming} is a positive number.
13641
13642 @item mail-source-ignore-errors
13643 @vindex mail-source-ignore-errors
13644 If non-@code{nil}, ignore errors when reading mail from a mail source.
13645
13646 @item mail-source-directory
13647 @vindex mail-source-directory
13648 Directory where files (if any) will be stored.  The default is
13649 @file{~/Mail/}.  At present, the only thing this is used for is to say
13650 where the incoming files will be stored if the previous variable is
13651 @code{nil}.
13652
13653 @item mail-source-incoming-file-prefix
13654 @vindex mail-source-incoming-file-prefix
13655 Prefix for file name for storing incoming mail.  The default is
13656 @file{Incoming}, in which case files will end up with names like
13657 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13658 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13659
13660 @item mail-source-default-file-modes
13661 @vindex mail-source-default-file-modes
13662 All new mail files will get this file mode.  The default is 384.
13663
13664 @item mail-source-movemail-program
13665 @vindex mail-source-movemail-program
13666 If non-@code{nil}, name of program for fetching new mail.  If
13667 @code{nil}, @code{movemail} in @var{exec-directory}.
13668
13669 @end table
13670
13671
13672 @node Fetching Mail
13673 @subsubsection Fetching Mail
13674
13675 @vindex mail-sources
13676 @vindex nnmail-spool-file
13677 The way to actually tell Gnus where to get new mail from is to set
13678 @code{mail-sources} to a list of mail source specifiers
13679 (@pxref{Mail Source Specifiers}).
13680
13681 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13682 @code{nil}, the mail back ends will never attempt to fetch mail by
13683 themselves.
13684
13685 If you want to fetch mail both from your local spool as well as a
13686 @acronym{POP} mail server, you'd say something like:
13687
13688 @lisp
13689 (setq mail-sources
13690       '((file)
13691         (pop :server "pop3.mail.server"
13692              :password "secret")))
13693 @end lisp
13694
13695 Or, if you don't want to use any of the keyword defaults:
13696
13697 @lisp
13698 (setq mail-sources
13699       '((file :path "/var/spool/mail/user-name")
13700         (pop :server "pop3.mail.server"
13701              :user "user-name"
13702              :port "pop3"
13703              :password "secret")))
13704 @end lisp
13705
13706
13707 When you use a mail back end, Gnus will slurp all your mail from your
13708 inbox and plonk it down in your home directory.  Gnus doesn't move any
13709 mail if you're not using a mail back end---you have to do a lot of magic
13710 invocations first.  At the time when you have finished drawing the
13711 pentagram, lightened the candles, and sacrificed the goat, you really
13712 shouldn't be too surprised when Gnus moves your mail.
13713
13714
13715
13716 @node Mail Back End Variables
13717 @subsection Mail Back End Variables
13718
13719 These variables are (for the most part) pertinent to all the various
13720 mail back ends.
13721
13722 @table @code
13723 @vindex nnmail-read-incoming-hook
13724 @item nnmail-read-incoming-hook
13725 The mail back ends all call this hook after reading new mail.  You can
13726 use this hook to notify any mail watch programs, if you want to.
13727
13728 @vindex nnmail-split-hook
13729 @item nnmail-split-hook
13730 @findex gnus-article-decode-encoded-words
13731 @cindex RFC 1522 decoding
13732 @cindex RFC 2047 decoding
13733 Hook run in the buffer where the mail headers of each message is kept
13734 just before the splitting based on these headers is done.  The hook is
13735 free to modify the buffer contents in any way it sees fit---the buffer
13736 is discarded after the splitting has been done, and no changes performed
13737 in the buffer will show up in any files.
13738 @code{gnus-article-decode-encoded-words} is one likely function to add
13739 to this hook.
13740
13741 @vindex nnmail-pre-get-new-mail-hook
13742 @vindex nnmail-post-get-new-mail-hook
13743 @item nnmail-pre-get-new-mail-hook
13744 @itemx nnmail-post-get-new-mail-hook
13745 These are two useful hooks executed when treating new incoming
13746 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13747 starting to handle the new mail) and
13748 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13749 is done).  Here's and example of using these two hooks to change the
13750 default file modes the new mail files get:
13751
13752 @lisp
13753 (add-hook 'nnmail-pre-get-new-mail-hook
13754           (lambda () (set-default-file-modes 511)))
13755
13756 (add-hook 'nnmail-post-get-new-mail-hook
13757           (lambda () (set-default-file-modes 551)))
13758 @end lisp
13759
13760 @item nnmail-use-long-file-names
13761 @vindex nnmail-use-long-file-names
13762 If non-@code{nil}, the mail back ends will use long file and directory
13763 names.  Groups like @samp{mail.misc} will end up in directories
13764 (assuming use of @code{nnml} back end) or files (assuming use of
13765 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13766 the same group will end up in @file{mail/misc}.
13767
13768 @item nnmail-delete-file-function
13769 @vindex nnmail-delete-file-function
13770 @findex delete-file
13771 Function called to delete files.  It is @code{delete-file} by default.
13772
13773 @item nnmail-cache-accepted-message-ids
13774 @vindex nnmail-cache-accepted-message-ids
13775 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13776 the back end (via @code{Gcc}, for instance) into the mail duplication
13777 discovery cache.  The default is @code{nil}.
13778
13779 @item nnmail-cache-ignore-groups
13780 @vindex nnmail-cache-ignore-groups
13781 This can be a regular expression or a list of regular expressions.
13782 Group names that match any of the regular expressions will never be
13783 recorded in the @code{Message-ID} cache.
13784
13785 This can be useful, for example, when using Fancy Splitting
13786 (@pxref{Fancy Mail Splitting}) together with the function
13787 @code{nnmail-split-fancy-with-parent}.
13788
13789 @end table
13790
13791
13792 @node Fancy Mail Splitting
13793 @subsection Fancy Mail Splitting
13794 @cindex mail splitting
13795 @cindex fancy mail splitting
13796
13797 @vindex nnmail-split-fancy
13798 @findex nnmail-split-fancy
13799 If the rather simple, standard method for specifying how to split mail
13800 doesn't allow you to do what you want, you can set
13801 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13802 play with the @code{nnmail-split-fancy} variable.
13803
13804 Let's look at an example value of this variable first:
13805
13806 @lisp
13807 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13808 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13809 ;; @r{from real errors.}
13810 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13811                    "mail.misc"))
13812    ;; @r{Non-error messages are crossposted to all relevant}
13813    ;; @r{groups, but we don't crosspost between the group for the}
13814    ;; @r{(ding) list and the group for other (ding) related mail.}
13815    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13816          ("subject" "ding" "ding.misc"))
13817       ;; @r{Other mailing lists@dots{}}
13818       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13819       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13820       ;; @r{Both lists below have the same suffix, so prevent}
13821       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13822       ;; @r{the bugs- list, but allow cross-posting when the}
13823       ;; @r{message was really cross-posted.}
13824       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13825       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13826       ;; @r{People@dots{}}
13827       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13828    ;; @r{Unmatched mail goes to the catch all group.}
13829    "misc.misc")
13830 @end lisp
13831
13832 This variable has the format of a @dfn{split}.  A split is a (possibly)
13833 recursive structure where each split may contain other splits.  Here are
13834 the five possible split syntaxes:
13835
13836 @enumerate
13837
13838 @item
13839 @samp{group}: If the split is a string, that will be taken as a group
13840 name.  Normal regexp match expansion will be done.  See below for
13841 examples.
13842
13843 @item
13844 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13845 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13846 first element of which is a string, then store the message as
13847 specified by @var{split}, if header @var{field} (a regexp) contains
13848 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13849 matches some string after @var{field} and before the end of the
13850 matched @var{value}, the @var{split} is ignored.  If none of the
13851 @var{restrict} clauses match, @var{split} is processed.
13852
13853 @item
13854 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13855 element is @code{|} (vertical bar), then process each @var{split} until
13856 one of them matches.  A @var{split} is said to match if it will cause
13857 the mail message to be stored in one or more groups.
13858
13859 @item
13860 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13861 element is @code{&}, then process all @var{split}s in the list.
13862
13863 @item
13864 @code{junk}: If the split is the symbol @code{junk}, then don't save
13865 (i.e., delete) this message.  Use with extreme caution.
13866
13867 @item
13868 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13869 a list, and the first element is @code{:}, then the second element will
13870 be called as a function with @var{args} given as arguments.  The
13871 function should return a @var{split}.
13872
13873 @cindex body split
13874 For instance, the following function could be used to split based on the
13875 body of the messages:
13876
13877 @lisp
13878 (defun split-on-body ()
13879   (save-excursion
13880     (set-buffer " *nnmail incoming*")
13881     (goto-char (point-min))
13882     (when (re-search-forward "Some.*string" nil t)
13883       "string.group")))
13884 @end lisp
13885
13886 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13887 when the @code{:} function is run.
13888
13889 @item
13890 @code{(! @var{func} @var{split})}: If the split is a list, and the
13891 first element is @code{!}, then @var{split} will be processed, and
13892 @var{func} will be called as a function with the result of @var{split}
13893 as argument.  @var{func} should return a split.
13894
13895 @item
13896 @code{nil}: If the split is @code{nil}, it is ignored.
13897
13898 @end enumerate
13899
13900 In these splits, @var{field} must match a complete field name.
13901 @var{value} must match a complete word according to the fundamental mode
13902 syntax table.  You can use @code{.*} in the regexps to match partial
13903 field names or words.  In other words, all @var{value}'s are wrapped in
13904 @samp{\<} and @samp{\>} pairs.
13905
13906 @vindex nnmail-split-abbrev-alist
13907 @var{field} and @var{value} can also be Lisp symbols, in that case they
13908 are expanded as specified by the variable
13909 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13910 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13911 value.
13912
13913 @vindex nnmail-split-fancy-syntax-table
13914 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13915 when all this splitting is performed.
13916
13917 If you want to have Gnus create groups dynamically based on some
13918 information in the headers (i.e., do @code{replace-match}-like
13919 substitutions in the group names), you can say things like:
13920
13921 @example
13922 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13923 @end example
13924
13925 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13926 will be filed in @samp{mail.debian.foo}.
13927
13928 If the string contains the element @samp{\&}, then the previously
13929 matched string will be substituted.  Similarly, the elements @samp{\\1}
13930 up to @samp{\\9} will be substituted with the text matched by the
13931 groupings 1 through 9.
13932
13933 @findex nnmail-split-fancy-with-parent
13934 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13935 split followups into the same groups their parents are in.  Sometimes
13936 you can't make splitting rules for all your mail.  For example, your
13937 boss might send you personal mail regarding different projects you are
13938 working on, and as you can't tell your boss to put a distinguishing
13939 string into the subject line, you have to resort to manually moving the
13940 messages into the right group.  With this function, you only have to do
13941 it once per thread.
13942
13943 To use this feature, you have to set @code{nnmail-treat-duplicates}
13944 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13945 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13946 using the colon feature, like so:
13947 @lisp
13948 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13949       nnmail-cache-accepted-message-ids t
13950       nnmail-split-fancy
13951       '(| (: nnmail-split-fancy-with-parent)
13952           ;; @r{other splits go here}
13953         ))
13954 @end lisp
13955
13956 This feature works as follows: when @code{nnmail-treat-duplicates} is
13957 non-@code{nil}, Gnus records the message id of every message it sees
13958 in the file specified by the variable
13959 @code{nnmail-message-id-cache-file}, together with the group it is in
13960 (the group is omitted for non-mail messages).  When mail splitting is
13961 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13962 at the References (and In-Reply-To) header of each message to split
13963 and searches the file specified by @code{nnmail-message-id-cache-file}
13964 for the message ids.  When it has found a parent, it returns the
13965 corresponding group name unless the group name matches the regexp
13966 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13967 recommended that you set @code{nnmail-message-id-cache-length} to a
13968 somewhat higher number than the default so that the message ids are
13969 still in the cache.  (A value of 5000 appears to create a file some
13970 300 kBytes in size.)
13971 @vindex nnmail-cache-accepted-message-ids
13972 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13973 also records the message ids of moved articles, so that the followup
13974 messages goes into the new group.
13975
13976 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13977 want certain groups to be recorded in the cache.  For example, if all
13978 outgoing messages are written to an `outgoing' group, you could set
13979 @code{nnmail-cache-ignore-groups} to match that group name.
13980 Otherwise, answers to all your messages would end up in the
13981 `outgoing' group.
13982
13983
13984 @node Group Mail Splitting
13985 @subsection Group Mail Splitting
13986 @cindex mail splitting
13987 @cindex group mail splitting
13988
13989 @findex gnus-group-split
13990 If you subscribe to dozens of mailing lists but you don't want to
13991 maintain mail splitting rules manually, group mail splitting is for you.
13992 You just have to set @var{to-list} and/or @var{to-address} in group
13993 parameters or group customization and set @code{nnmail-split-methods} to
13994 @code{gnus-group-split}.  This splitting function will scan all groups
13995 for those parameters and split mail accordingly, i.e., messages posted
13996 from or to the addresses specified in the parameters @var{to-list} or
13997 @var{to-address} of a mail group will be stored in that group.
13998
13999 Sometimes, mailing lists have multiple addresses, and you may want mail
14000 splitting to recognize them all: just set the @var{extra-aliases} group
14001 parameter to the list of additional addresses and it's done.  If you'd
14002 rather use a regular expression, set @var{split-regexp}.
14003
14004 All these parameters in a group will be used to create an
14005 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14006 the @var{value} is a single regular expression that matches
14007 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14008 matches of @var{split-regexp}, and the @var{split} is the name of the
14009 group.  @var{restrict}s are also supported: just set the
14010 @var{split-exclude} parameter to a list of regular expressions.
14011
14012 If you can't get the right split to be generated using all these
14013 parameters, or you just need something fancier, you can set the
14014 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14015 this case, all other aforementioned parameters will be ignored by
14016 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14017 @code{nil}, in which case the group will be ignored by
14018 @code{gnus-group-split}.
14019
14020 @vindex gnus-group-split-default-catch-all-group
14021 @code{gnus-group-split} will do cross-posting on all groups that match,
14022 by defining a single @code{&} fancy split containing one split for each
14023 group.  If a message doesn't match any split, it will be stored in the
14024 group named in @code{gnus-group-split-default-catch-all-group}, unless
14025 some group has @var{split-spec} set to @code{catch-all}, in which case
14026 that group is used as the catch-all group.  Even though this variable is
14027 often used just to name a group, it may also be set to an arbitrarily
14028 complex fancy split (after all, a group name is a fancy split), and this
14029 may be useful to split mail that doesn't go to any mailing list to
14030 personal mail folders.  Note that this fancy split is added as the last
14031 element of a @code{|} split list that also contains a @code{&} split
14032 with the rules extracted from group parameters.
14033
14034 It's time for an example.  Assume the following group parameters have
14035 been defined:
14036
14037 @example
14038 nnml:mail.bar:
14039 ((to-address . "bar@@femail.com")
14040  (split-regexp . ".*@@femail\\.com"))
14041 nnml:mail.foo:
14042 ((to-list . "foo@@nowhere.gov")
14043  (extra-aliases "foo@@localhost" "foo-redist@@home")
14044  (split-exclude "bugs-foo" "rambling-foo")
14045  (admin-address . "foo-request@@nowhere.gov"))
14046 nnml:mail.others:
14047 ((split-spec . catch-all))
14048 @end example
14049
14050 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14051 behave as if @code{nnmail-split-fancy} had been selected and variable
14052 @code{nnmail-split-fancy} had been set as follows:
14053
14054 @lisp
14055 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14056       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14057            - "bugs-foo" - "rambling-foo" "mail.foo"))
14058    "mail.others")
14059 @end lisp
14060
14061 @findex gnus-group-split-fancy
14062 If you'd rather not use group splitting for all your mail groups, you
14063 may use it for only some of them, by using @code{nnmail-split-fancy}
14064 splits like this:
14065
14066 @lisp
14067 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14068 @end lisp
14069
14070 @var{groups} may be a regular expression or a list of group names whose
14071 parameters will be scanned to generate the output split.
14072 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14073 single @code{|} split will be output.  @var{catch-all} is the fall back
14074 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14075 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14076 empty string in any selected group, no catch-all split will be issued.
14077 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14078 this group will override the value of the @var{catch-all} argument.
14079
14080 @findex gnus-group-split-setup
14081 Unfortunately, scanning all groups and their parameters can be quite
14082 slow, especially considering that it has to be done for every message.
14083 But don't despair!  The function @code{gnus-group-split-setup} can be
14084 used to enable @code{gnus-group-split} in a much more efficient way.  It
14085 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14086 @code{nnmail-split-fancy} to the split produced by
14087 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14088 scanned once, no matter how many messages are split.
14089
14090 @findex gnus-group-split-update
14091 However, if you change group parameters, you'd have to update
14092 @code{nnmail-split-fancy} manually.  You can do it by running
14093 @code{gnus-group-split-update}.  If you'd rather have it updated
14094 automatically, just tell @code{gnus-group-split-setup} to do it for
14095 you.  For example, add to your @file{~/.gnus.el}:
14096
14097 @lisp
14098 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14099 @end lisp
14100
14101 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14102 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14103 have to worry about updating @code{nnmail-split-fancy} again.  If you
14104 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14105 @code{gnus-group-split-default-catch-all-group} will be set to its
14106 value.
14107
14108 @vindex gnus-group-split-updated-hook
14109 Because you may want to change @code{nnmail-split-fancy} after it is set
14110 by @code{gnus-group-split-update}, this function will run
14111 @code{gnus-group-split-updated-hook} just before finishing.
14112
14113 @node Incorporating Old Mail
14114 @subsection Incorporating Old Mail
14115 @cindex incorporating old mail
14116 @cindex import old mail
14117
14118 Most people have lots of old mail stored in various file formats.  If
14119 you have set up Gnus to read mail using one of the spiffy Gnus mail
14120 back ends, you'll probably wish to have that old mail incorporated into
14121 your mail groups.
14122
14123 Doing so can be quite easy.
14124
14125 To take an example: You're reading mail using @code{nnml}
14126 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14127 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14128 file filled with important, but old, mail.  You want to move it into
14129 your @code{nnml} groups.
14130
14131 Here's how:
14132
14133 @enumerate
14134 @item
14135 Go to the group buffer.
14136
14137 @item
14138 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14139 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14140
14141 @item
14142 Type @kbd{SPACE} to enter the newly created group.
14143
14144 @item
14145 Type @kbd{M P b} to process-mark all articles in this group's buffer
14146 (@pxref{Setting Process Marks}).
14147
14148 @item
14149 Type @kbd{B r} to respool all the process-marked articles, and answer
14150 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14151 @end enumerate
14152
14153 All the mail messages in the mbox file will now also be spread out over
14154 all your @code{nnml} groups.  Try entering them and check whether things
14155 have gone without a glitch.  If things look ok, you may consider
14156 deleting the mbox file, but I wouldn't do that unless I was absolutely
14157 sure that all the mail has ended up where it should be.
14158
14159 Respooling is also a handy thing to do if you're switching from one mail
14160 back end to another.  Just respool all the mail in the old mail groups
14161 using the new mail back end.
14162
14163
14164 @node Expiring Mail
14165 @subsection Expiring Mail
14166 @cindex article expiry
14167
14168 Traditional mail readers have a tendency to remove mail articles when
14169 you mark them as read, in some way.  Gnus takes a fundamentally
14170 different approach to mail reading.
14171
14172 Gnus basically considers mail just to be news that has been received in
14173 a rather peculiar manner.  It does not think that it has the power to
14174 actually change the mail, or delete any mail messages.  If you enter a
14175 mail group, and mark articles as ``read'', or kill them in some other
14176 fashion, the mail articles will still exist on the system.  I repeat:
14177 Gnus will not delete your old, read mail.  Unless you ask it to, of
14178 course.
14179
14180 To make Gnus get rid of your unwanted mail, you have to mark the
14181 articles as @dfn{expirable}.  (With the default key bindings, this means
14182 that you have to type @kbd{E}.)  This does not mean that the articles
14183 will disappear right away, however.  In general, a mail article will be
14184 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14185 more than one week old.  If you do not mark an article as expirable, it
14186 will remain on your system until hell freezes over.  This bears
14187 repeating one more time, with some spurious capitalizations: IF you do
14188 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14189
14190 You do not have to mark articles as expirable by hand.  Gnus provides
14191 two features, called `auto-expire' and `total-expire', that can help you
14192 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
14193 for you when you select an article.  And `total-expire' means that Gnus
14194 considers all articles as expirable that are read.  So, in addition to
14195 the articles marked @samp{E}, also the articles marked @samp{r},
14196 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14197 expirable.
14198
14199 When should either auto-expire or total-expire be used?  Most people
14200 who are subscribed to mailing lists split each list into its own group
14201 and then turn on auto-expire or total-expire for those groups.
14202 (@xref{Splitting Mail}, for more information on splitting each list
14203 into its own group.)
14204
14205 Which one is better, auto-expire or total-expire?  It's not easy to
14206 answer.  Generally speaking, auto-expire is probably faster.  Another
14207 advantage of auto-expire is that you get more marks to work with: for
14208 the articles that are supposed to stick around, you can still choose
14209 between tick and dormant and read marks.  But with total-expire, you
14210 only have dormant and ticked to choose from.  The advantage of
14211 total-expire is that it works well with adaptive scoring @pxref{Adaptive
14212 Scoring}.  Auto-expire works with normal scoring but not with adaptive
14213 scoring.
14214
14215 @vindex gnus-auto-expirable-newsgroups
14216 Groups that match the regular expression
14217 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14218 read marked as expirable automatically.  All articles marked as
14219 expirable have an @samp{E} in the first column in the summary buffer.
14220
14221 By default, if you have auto expiry switched on, Gnus will mark all the
14222 articles you read as expirable, no matter if they were read or unread
14223 before.  To avoid having articles marked as read marked as expirable
14224 automatically, you can put something like the following in your
14225 @file{~/.gnus.el} file:
14226
14227 @vindex gnus-mark-article-hook
14228 @lisp
14229 (remove-hook 'gnus-mark-article-hook
14230              'gnus-summary-mark-read-and-unread-as-read)
14231 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14232 @end lisp
14233
14234 Note that making a group auto-expirable doesn't mean that all read
14235 articles are expired---only the articles marked as expirable
14236 will be expired.  Also note that using the @kbd{d} command won't make
14237 articles expirable---only semi-automatic marking of articles as read will
14238 mark the articles as expirable in auto-expirable groups.
14239
14240 Let's say you subscribe to a couple of mailing lists, and you want the
14241 articles you have read to disappear after a while:
14242
14243 @lisp
14244 (setq gnus-auto-expirable-newsgroups
14245       "mail.nonsense-list\\|mail.nice-list")
14246 @end lisp
14247
14248 Another way to have auto-expiry happen is to have the element
14249 @code{auto-expire} in the group parameters of the group.
14250
14251 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14252 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14253 don't really mix very well.
14254
14255 @vindex nnmail-expiry-wait
14256 The @code{nnmail-expiry-wait} variable supplies the default time an
14257 expirable article has to live.  Gnus starts counting days from when the
14258 message @emph{arrived}, not from when it was sent.  The default is seven
14259 days.
14260
14261 Gnus also supplies a function that lets you fine-tune how long articles
14262 are to live, based on what group they are in.  Let's say you want to
14263 have one month expiry period in the @samp{mail.private} group, a one day
14264 expiry period in the @samp{mail.junk} group, and a six day expiry period
14265 everywhere else:
14266
14267 @vindex nnmail-expiry-wait-function
14268 @lisp
14269 (setq nnmail-expiry-wait-function
14270       (lambda (group)
14271        (cond ((string= group "mail.private")
14272                31)
14273              ((string= group "mail.junk")
14274                1)
14275              ((string= group "important")
14276                'never)
14277              (t
14278                6))))
14279 @end lisp
14280
14281 The group names this function is fed are ``unadorned'' group
14282 names---no @samp{nnml:} prefixes and the like.
14283
14284 The @code{nnmail-expiry-wait} variable and
14285 @code{nnmail-expiry-wait-function} function can either be a number (not
14286 necessarily an integer) or one of the symbols @code{immediate} or
14287 @code{never}.
14288
14289 You can also use the @code{expiry-wait} group parameter to selectively
14290 change the expiry period (@pxref{Group Parameters}).
14291
14292 @vindex nnmail-expiry-target
14293 The normal action taken when expiring articles is to delete them.
14294 However, in some circumstances it might make more sense to move them
14295 to other groups instead of deleting them.  The variable
14296 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14297 parameter) controls this.  The variable supplies a default value for
14298 all groups, which can be overridden for specific groups by the group
14299 parameter.  default value is @code{delete}, but this can also be a
14300 string (which should be the name of the group the message should be
14301 moved to), or a function (which will be called in a buffer narrowed to
14302 the message in question, and with the name of the group being moved
14303 from as its parameter) which should return a target---either a group
14304 name or @code{delete}.
14305
14306 Here's an example for specifying a group name:
14307 @lisp
14308 (setq nnmail-expiry-target "nnml:expired")
14309 @end lisp
14310
14311 @findex nnmail-fancy-expiry-target
14312 @vindex nnmail-fancy-expiry-targets
14313 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14314 expire mail to groups according to the variable
14315 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14316
14317 @lisp
14318  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14319        nnmail-fancy-expiry-targets
14320        '((to-from "boss" "nnfolder:Work")
14321          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14322          ("from" ".*" "nnfolder:Archive-%Y")))
14323 @end lisp
14324
14325 With this setup, any mail that has @code{IMPORTANT} in its Subject
14326 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14327 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
14328 From or To header contains the string @code{boss}, it will get expired
14329 to @code{nnfolder:Work}. All other mail will get expired to
14330 @code{nnfolder:Archive-YYYY}.
14331
14332 @vindex nnmail-keep-last-article
14333 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14334 expire the final article in a mail newsgroup.  This is to make life
14335 easier for procmail users.
14336
14337 @vindex gnus-total-expirable-newsgroups
14338 By the way: That line up there, about Gnus never expiring non-expirable
14339 articles, is a lie.  If you put @code{total-expire} in the group
14340 parameters, articles will not be marked as expirable, but all read
14341 articles will be put through the expiry process.  Use with extreme
14342 caution.  Even more dangerous is the
14343 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14344 this regexp will have all read articles put through the expiry process,
14345 which means that @emph{all} old mail articles in the groups in question
14346 will be deleted after a while.  Use with extreme caution, and don't come
14347 crying to me when you discover that the regexp you used matched the
14348 wrong group and all your important mail has disappeared.  Be a
14349 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14350 with!  So there!
14351
14352 Most people make most of their mail groups total-expirable, though.
14353
14354 @vindex gnus-inhibit-user-auto-expire
14355 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14356 commands will not mark an article as expirable, even if the group has
14357 auto-expire turned on.
14358
14359
14360 @node Washing Mail
14361 @subsection Washing Mail
14362 @cindex mail washing
14363 @cindex list server brain damage
14364 @cindex incoming mail treatment
14365
14366 Mailers and list servers are notorious for doing all sorts of really,
14367 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14368 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14369 end of all lines passing through our server, so let's do that!!!!1!''
14370 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14371 considered to be self-evident were not discussed.  So.  Here we are.
14372
14373 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14374 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14375 be shocked and dismayed by this, but I haven't got the energy.  It is to
14376 laugh.
14377
14378 Gnus provides a plethora of functions for washing articles while
14379 displaying them, but it might be nicer to do the filtering before
14380 storing the mail to disk.  For that purpose, we have three hooks and
14381 various functions that can be put in these hooks.
14382
14383 @table @code
14384 @item nnmail-prepare-incoming-hook
14385 @vindex nnmail-prepare-incoming-hook
14386 This hook is called before doing anything with the mail and is meant for
14387 grand, sweeping gestures.  It is called in a buffer that contains all
14388 the new, incoming mail.  Functions to be used include:
14389
14390 @table @code
14391 @item nnheader-ms-strip-cr
14392 @findex nnheader-ms-strip-cr
14393 Remove trailing carriage returns from each line.  This is default on
14394 Emacs running on MS machines.
14395
14396 @end table
14397
14398 @item nnmail-prepare-incoming-header-hook
14399 @vindex nnmail-prepare-incoming-header-hook
14400 This hook is called narrowed to each header.  It can be used when
14401 cleaning up the headers.  Functions that can be used include:
14402
14403 @table @code
14404 @item nnmail-remove-leading-whitespace
14405 @findex nnmail-remove-leading-whitespace
14406 Clear leading white space that ``helpful'' listservs have added to the
14407 headers to make them look nice.  Aaah.
14408
14409 (Note that this function works on both the header on the body of all
14410 messages, so it is a potentially dangerous function to use (if a body
14411 of a message contains something that looks like a header line).  So
14412 rather than fix the bug, it is of course the right solution to make it
14413 into a feature by documenting it.)
14414
14415 @item nnmail-remove-list-identifiers
14416 @findex nnmail-remove-list-identifiers
14417 Some list servers add an identifier---for example, @samp{(idm)}---to the
14418 beginning of all @code{Subject} headers.  I'm sure that's nice for
14419 people who use stone age mail readers.  This function will remove
14420 strings that match the @code{nnmail-list-identifiers} regexp, which can
14421 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14422 @code{\\(..\\)}.
14423
14424 For instance, if you want to remove the @samp{(idm)} and the
14425 @samp{nagnagnag} identifiers:
14426
14427 @lisp
14428 (setq nnmail-list-identifiers
14429       '("(idm)" "nagnagnag"))
14430 @end lisp
14431
14432 This can also be done non-destructively with
14433 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14434
14435 @item nnmail-remove-tabs
14436 @findex nnmail-remove-tabs
14437 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14438
14439 @item nnmail-fix-eudora-headers
14440 @findex nnmail-fix-eudora-headers
14441 @cindex Eudora
14442 Eudora produces broken @code{References} headers, but OK
14443 @code{In-Reply-To} headers.  This function will get rid of the
14444 @code{References} headers.
14445
14446 @end table
14447
14448 @item nnmail-prepare-incoming-message-hook
14449 @vindex nnmail-prepare-incoming-message-hook
14450 This hook is called narrowed to each message.  Functions to be used
14451 include:
14452
14453 @table @code
14454 @item article-de-quoted-unreadable
14455 @findex article-de-quoted-unreadable
14456 Decode Quoted Readable encoding.
14457
14458 @end table
14459 @end table
14460
14461
14462 @node Duplicates
14463 @subsection Duplicates
14464
14465 @vindex nnmail-treat-duplicates
14466 @vindex nnmail-message-id-cache-length
14467 @vindex nnmail-message-id-cache-file
14468 @cindex duplicate mails
14469 If you are a member of a couple of mailing lists, you will sometimes
14470 receive two copies of the same mail.  This can be quite annoying, so
14471 @code{nnmail} checks for and treats any duplicates it might find.  To do
14472 this, it keeps a cache of old @code{Message-ID}s---
14473 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14474 default.  The approximate maximum number of @code{Message-ID}s stored
14475 there is controlled by the @code{nnmail-message-id-cache-length}
14476 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14477 stored.) If all this sounds scary to you, you can set
14478 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14479 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14480 will insert a warning into the head of the mail saying that it thinks
14481 that this is a duplicate of a different message.
14482
14483 This variable can also be a function.  If that's the case, the function
14484 will be called from a buffer narrowed to the message in question with
14485 the @code{Message-ID} as a parameter.  The function must return either
14486 @code{nil}, @code{warn}, or @code{delete}.
14487
14488 You can turn this feature off completely by setting the variable to
14489 @code{nil}.
14490
14491 If you want all the duplicate mails to be put into a special
14492 @dfn{duplicates} group, you could do that using the normal mail split
14493 methods:
14494
14495 @lisp
14496 (setq nnmail-split-fancy
14497       '(| ;; @r{Messages duplicates go to a separate group.}
14498         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14499         ;; @r{Message from daemons, postmaster, and the like to another.}
14500         (any mail "mail.misc")
14501         ;; @r{Other rules.}
14502         [...] ))
14503 @end lisp
14504 @noindent
14505 Or something like:
14506 @lisp
14507 (setq nnmail-split-methods
14508       '(("duplicates" "^Gnus-Warning:.*duplicate")
14509         ;; @r{Other rules.}
14510         [...]))
14511 @end lisp
14512
14513 Here's a neat feature: If you know that the recipient reads her mail
14514 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14515 @code{delete}, you can send her as many insults as you like, just by
14516 using a @code{Message-ID} of a mail that you know that she's already
14517 received.  Think of all the fun!  She'll never see any of it!  Whee!
14518
14519
14520 @node Not Reading Mail
14521 @subsection Not Reading Mail
14522
14523 If you start using any of the mail back ends, they have the annoying
14524 habit of assuming that you want to read mail with them.  This might not
14525 be unreasonable, but it might not be what you want.
14526
14527 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14528 @code{nil}, none of the back ends will ever attempt to read incoming
14529 mail, which should help.
14530
14531 @vindex nnbabyl-get-new-mail
14532 @vindex nnmbox-get-new-mail
14533 @vindex nnml-get-new-mail
14534 @vindex nnmh-get-new-mail
14535 @vindex nnfolder-get-new-mail
14536 This might be too much, if, for instance, you are reading mail quite
14537 happily with @code{nnml} and just want to peek at some old Rmail
14538 file you have stashed away with @code{nnbabyl}.  All back ends have
14539 variables called back-end-@code{get-new-mail}.  If you want to disable
14540 the @code{nnbabyl} mail reading, you edit the virtual server for the
14541 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14542
14543 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14544 narrowed to the article to be saved before saving it when reading
14545 incoming mail.
14546
14547
14548 @node Choosing a Mail Back End
14549 @subsection Choosing a Mail Back End
14550
14551 Gnus will read the mail spool when you activate a mail group.  The mail
14552 file is first copied to your home directory.  What happens after that
14553 depends on what format you want to store your mail in.
14554
14555 There are six different mail back ends in the standard Gnus, and more
14556 back ends are available separately.  The mail back end most people use
14557 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14558 Spool}).
14559
14560 @menu
14561 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14562 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14563 * Mail Spool::                  Store your mail in a private spool?
14564 * MH Spool::                    An mhspool-like back end.
14565 * Maildir::                     Another one-file-per-message format.
14566 * Mail Folders::                Having one file for each group.
14567 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14568 @end menu
14569
14570
14571 @node Unix Mail Box
14572 @subsubsection Unix Mail Box
14573 @cindex nnmbox
14574 @cindex unix mail box
14575
14576 @vindex nnmbox-active-file
14577 @vindex nnmbox-mbox-file
14578 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14579 mail.  @code{nnmbox} will add extra headers to each mail article to say
14580 which group it belongs in.
14581
14582 Virtual server settings:
14583
14584 @table @code
14585 @item nnmbox-mbox-file
14586 @vindex nnmbox-mbox-file
14587 The name of the mail box in the user's home directory.  Default is
14588 @file{~/mbox}.
14589
14590 @item nnmbox-active-file
14591 @vindex nnmbox-active-file
14592 The name of the active file for the mail box.  Default is
14593 @file{~/.mbox-active}.
14594
14595 @item nnmbox-get-new-mail
14596 @vindex nnmbox-get-new-mail
14597 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14598 into groups.  Default is @code{t}.
14599 @end table
14600
14601
14602 @node Rmail Babyl
14603 @subsubsection Rmail Babyl
14604 @cindex nnbabyl
14605 @cindex Rmail mbox
14606
14607 @vindex nnbabyl-active-file
14608 @vindex nnbabyl-mbox-file
14609 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14610 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14611 mail article to say which group it belongs in.
14612
14613 Virtual server settings:
14614
14615 @table @code
14616 @item nnbabyl-mbox-file
14617 @vindex nnbabyl-mbox-file
14618 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14619
14620 @item nnbabyl-active-file
14621 @vindex nnbabyl-active-file
14622 The name of the active file for the rmail box.  The default is
14623 @file{~/.rmail-active}
14624
14625 @item nnbabyl-get-new-mail
14626 @vindex nnbabyl-get-new-mail
14627 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14628 @code{t}
14629 @end table
14630
14631
14632 @node Mail Spool
14633 @subsubsection Mail Spool
14634 @cindex nnml
14635 @cindex mail @acronym{NOV} spool
14636
14637 The @dfn{nnml} spool mail format isn't compatible with any other known
14638 format.  It should be used with some caution.
14639
14640 @vindex nnml-directory
14641 If you use this back end, Gnus will split all incoming mail into files,
14642 one file for each mail, and put the articles into the corresponding
14643 directories under the directory specified by the @code{nnml-directory}
14644 variable.  The default value is @file{~/Mail/}.
14645
14646 You do not have to create any directories beforehand; Gnus will take
14647 care of all that.
14648
14649 If you have a strict limit as to how many files you are allowed to store
14650 in your account, you should not use this back end.  As each mail gets its
14651 own file, you might very well occupy thousands of inodes within a few
14652 weeks.  If this is no problem for you, and it isn't a problem for you
14653 having your friendly systems administrator walking around, madly,
14654 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14655 know that this is probably the fastest format to use.  You do not have
14656 to trudge through a big mbox file just to read your new mail.
14657
14658 @code{nnml} is probably the slowest back end when it comes to article
14659 splitting.  It has to create lots of files, and it also generates
14660 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14661 fastest back end when it comes to reading mail.
14662
14663 @cindex self contained nnml servers
14664 @cindex marks
14665 When the marks file is used (which it is by default), @code{nnml}
14666 servers have the property that you may backup them using @code{tar} or
14667 similar, and later be able to restore them into Gnus (by adding the
14668 proper @code{nnml} server) and have all your marks be preserved.  Marks
14669 for a group is usually stored in the @code{.marks} file (but see
14670 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14671 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14672 to restore the group (after restoring the backup into the nnml
14673 directory).
14674
14675 If for some reason you believe your @file{.marks} files are screwed
14676 up, you can just delete them all.  Gnus will then correctly regenerate
14677 them next time it starts.
14678
14679 Virtual server settings:
14680
14681 @table @code
14682 @item nnml-directory
14683 @vindex nnml-directory
14684 All @code{nnml} directories will be placed under this directory.  The
14685 default is the value of @code{message-directory} (whose default value
14686 is @file{~/Mail}).
14687
14688 @item nnml-active-file
14689 @vindex nnml-active-file
14690 The active file for the @code{nnml} server.  The default is
14691 @file{~/Mail/active}.
14692
14693 @item nnml-newsgroups-file
14694 @vindex nnml-newsgroups-file
14695 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14696 Format}.  The default is @file{~/Mail/newsgroups}.
14697
14698 @item nnml-get-new-mail
14699 @vindex nnml-get-new-mail
14700 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14701 @code{t}.
14702
14703 @item nnml-nov-is-evil
14704 @vindex nnml-nov-is-evil
14705 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14706 default is @code{nil}.
14707
14708 @item nnml-nov-file-name
14709 @vindex nnml-nov-file-name
14710 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14711
14712 @item nnml-prepare-save-mail-hook
14713 @vindex nnml-prepare-save-mail-hook
14714 Hook run narrowed to an article before saving.
14715
14716 @item nnml-marks-is-evil
14717 @vindex nnml-marks-is-evil
14718 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14719 default is @code{nil}.
14720
14721 @item nnml-marks-file-name
14722 @vindex nnml-marks-file-name
14723 The name of the @dfn{marks} files.  The default is @file{.marks}.
14724
14725 @item nnml-use-compressed-files
14726 @vindex nnml-use-compressed-files
14727 If non-@code{nil}, @code{nnml} will allow using compressed message
14728 files.
14729
14730 @end table
14731
14732 @findex nnml-generate-nov-databases
14733 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14734 you can do a complete update by typing @kbd{M-x
14735 nnml-generate-nov-databases}.  This command will trawl through the
14736 entire @code{nnml} hierarchy, looking at each and every article, so it
14737 might take a while to complete.  A better interface to this
14738 functionality can be found in the server buffer (@pxref{Server
14739 Commands}).
14740
14741
14742 @node MH Spool
14743 @subsubsection MH Spool
14744 @cindex nnmh
14745 @cindex mh-e mail spool
14746
14747 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14748 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14749 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14750 but it also makes it easier to write procmail scripts for.
14751
14752 Virtual server settings:
14753
14754 @table @code
14755 @item nnmh-directory
14756 @vindex nnmh-directory
14757 All @code{nnmh} directories will be located under this directory.  The
14758 default is the value of @code{message-directory} (whose default is
14759 @file{~/Mail})
14760
14761 @item nnmh-get-new-mail
14762 @vindex nnmh-get-new-mail
14763 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14764 @code{t}.
14765
14766 @item nnmh-be-safe
14767 @vindex nnmh-be-safe
14768 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14769 sure that the articles in the folder are actually what Gnus thinks they
14770 are.  It will check date stamps and stat everything in sight, so
14771 setting this to @code{t} will mean a serious slow-down.  If you never
14772 use anything but Gnus to read the @code{nnmh} articles, you do not have
14773 to set this variable to @code{t}.  The default is @code{nil}.
14774 @end table
14775
14776
14777 @node Maildir
14778 @subsubsection Maildir
14779 @cindex nnmaildir
14780 @cindex maildir
14781
14782 @code{nnmaildir} stores mail in the maildir format, with each maildir
14783 corresponding to a group in Gnus.  This format is documented here:
14784 @uref{http://cr.yp.to/proto/maildir.html} and here:
14785 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14786 stores extra information in the @file{.nnmaildir/} directory within a
14787 maildir.
14788
14789 Maildir format was designed to allow concurrent deliveries and
14790 reading, without needing locks.  With other back ends, you would have
14791 your mail delivered to a spool of some kind, and then you would
14792 configure Gnus to split mail from that spool into your groups.  You
14793 can still do that with nnmaildir, but the more common configuration is
14794 to have your mail delivered directly to the maildirs that appear as
14795 group in Gnus.
14796
14797 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14798 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14799 data in the filesystem.
14800
14801 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14802 can copy a whole maildir from one Gnus setup to another, and you will
14803 keep your marks.
14804
14805 Virtual server settings:
14806
14807 @table @code
14808 @item directory
14809 For each of your nnmaildir servers (it's very unlikely that you'd need
14810 more than one), you need to create a directory and populate it with
14811 maildirs or symlinks to maildirs (and nothing else; do not choose a
14812 directory already used for other purposes).  Each maildir will be
14813 represented in Gnus as a newsgroup on that server; the filename of the
14814 symlink will be the name of the group.  Any filenames in the directory
14815 starting with `.' are ignored.  The directory is scanned when you
14816 first start Gnus, and each time you type @kbd{g} in the group buffer;
14817 if any maildirs have been removed or added, nnmaildir notices at these
14818 times.
14819
14820 The value of the @code{directory} parameter should be a Lisp form
14821 which is processed by @code{eval} and @code{expand-file-name} to get
14822 the path of the directory for this server.  The form is @code{eval}ed
14823 only when the server is opened; the resulting string is used until the
14824 server is closed.  (If you don't know about forms and @code{eval},
14825 don't worry---a simple string will work.)  This parameter is not
14826 optional; you must specify it.  I don't recommend using
14827 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14828 use that directory by default for various things, and may get confused
14829 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14830
14831 @item target-prefix
14832 This should be a Lisp form which is processed by @code{eval} and
14833 @code{expand-file-name}.  The form is @code{eval}ed only when the
14834 server is opened; the resulting string is used until the server is
14835 closed.
14836
14837 When you create a group on an nnmaildir server, the maildir is created
14838 with @code{target-prefix} prepended to its name, and a symlink
14839 pointing to that maildir is created, named with the plain group name.
14840 So if @code{directory} is @code{"~/.nnmaildir"} and
14841 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14842 the group @code{foo}, nnmaildir will create
14843 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14844 @file{~/.nnmaildir/foo} as a symlink pointing to
14845 @file{../maildirs/foo}.
14846
14847 You can set @code{target-prefix} to a string without any slashes to
14848 create both maildirs and symlinks in the same @code{directory}; in
14849 this case, any maildirs found in @code{directory} whose names start
14850 with @code{target-prefix} will not be listed as groups (but the
14851 symlinks pointing to them will be).
14852
14853 As a special case, if @code{target-prefix} is @code{""} (the default),
14854 then when you create a group, the maildir will be created in
14855 @code{directory} without a corresponding symlink.  Beware that you
14856 cannot use @code{gnus-group-delete-group} on such groups without the
14857 @code{force} argument.
14858
14859 @item directory-files
14860 This should be a function with the same interface as
14861 @code{directory-files} (such as @code{directory-files} itself).  It is
14862 used to scan the server's @code{directory} for maildirs.  This
14863 parameter is optional; the default is
14864 @code{nnheader-directory-files-safe} if
14865 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14866 @code{directory-files} otherwise.
14867 (@code{nnheader-directory-files-is-safe} is checked only once when the
14868 server is opened; if you want to check it each time the directory is
14869 scanned, you'll have to provide your own function that does that.)
14870
14871 @item get-new-mail
14872 If non-@code{nil}, then after scanning for new mail in the group
14873 maildirs themselves as usual, this server will also incorporate mail
14874 the conventional Gnus way, from @code{mail-sources} according to
14875 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14876 value is @code{nil}.
14877
14878 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14879 an nnmaildir group.  The results might happen to be useful, but that
14880 would be by chance, not by design, and the results might be different
14881 in the future.  If your split rules create new groups, remember to
14882 supply a @code{create-directory} server parameter.
14883 @end table
14884
14885 @subsubsection Group parameters
14886
14887 nnmaildir uses several group parameters.  It's safe to ignore all
14888 this; the default behavior for nnmaildir is the same as the default
14889 behavior for other mail back ends: articles are deleted after one week,
14890 etc.  Except for the expiry parameters, all this functionality is
14891 unique to nnmaildir, so you can ignore it if you're just trying to
14892 duplicate the behavior you already have with another back end.
14893
14894 If the value of any of these parameters is a vector, the first element
14895 is evaluated as a Lisp form and the result is used, rather than the
14896 original value.  If the value is not a vector, the value itself is
14897 evaluated as a Lisp form.  (This is why these parameters use names
14898 different from those of other, similar parameters supported by other
14899 back ends: they have different, though similar, meanings.)  (For
14900 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14901 @code{eval} business again; for other values, remember to use an extra
14902 quote and wrap the value in a vector when appropriate.)
14903
14904 @table @code
14905 @item expire-age
14906 An integer specifying the minimum age, in seconds, of an article before
14907 it will be expired, or the symbol @code{never} to specify that
14908 articles should never be expired.  If this parameter is not set,
14909 nnmaildir falls back to the usual
14910 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14911 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14912 wanted a value of 3 days, you could use something like @code{[(* 3 24
14913 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14914 article's age is measured starting from the article file's
14915 modification time.  Normally, this is the same as the article's
14916 delivery time, but editing an article makes it younger.  Moving an
14917 article (other than via expiry) may also make an article younger.
14918
14919 @item expire-group
14920 If this is set to a string such as a full Gnus group name, like
14921 @example
14922 "backend+server.address.string:group.name"
14923 @end example
14924 and if it is not the name of the same group that the parameter belongs
14925 to, then articles will be moved to the specified group during expiry
14926 before being deleted.  @emph{If this is set to an nnmaildir group, the
14927 article will be just as old in the destination group as it was in the
14928 source group.}  So be careful with @code{expire-age} in the
14929 destination group.  If this is set to the name of the same group that
14930 the parameter belongs to, then the article is not expired at all.  If
14931 you use the vector form, the first element is evaluated once for each
14932 article.  So that form can refer to
14933 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14934 article.  @emph{If this parameter is not set, nnmaildir does not fall
14935 back to the @code{expiry-target} group parameter or the
14936 @code{nnmail-expiry-target} variable.}
14937
14938 @item read-only
14939 If this is set to @code{t}, nnmaildir will treat the articles in this
14940 maildir as read-only.  This means: articles are not renamed from
14941 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14942 not @file{cur/}; articles are never deleted; articles cannot be
14943 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14944 directory of another maildir---e.g., a system-wide mailbox containing
14945 a mailing list of common interest.  Everything in the maildir outside
14946 @file{new/} is @emph{not} treated as read-only, so for a shared
14947 mailbox, you do still need to set up your own maildir (or have write
14948 permission to the shared mailbox); your maildir just won't contain
14949 extra copies of the articles.
14950
14951 @item directory-files
14952 A function with the same interface as @code{directory-files}.  It is
14953 used to scan the directories in the maildir corresponding to this
14954 group to find articles.  The default is the function specified by the
14955 server's @code{directory-files} parameter.
14956
14957 @item distrust-Lines:
14958 If non-@code{nil}, nnmaildir will always count the lines of an
14959 article, rather than use the @code{Lines:} header field.  If
14960 @code{nil}, the header field will be used if present.
14961
14962 @item always-marks
14963 A list of mark symbols, such as
14964 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14965 article marks, nnmaildir will say that all articles have these
14966 marks, regardless of whether the marks stored in the filesystem
14967 say so.  This is a proof-of-concept feature that will probably be
14968 removed eventually; it ought to be done in Gnus proper, or
14969 abandoned if it's not worthwhile.
14970
14971 @item never-marks
14972 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14973 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14974 articles have these marks, regardless of whether the marks stored in
14975 the filesystem say so.  @code{never-marks} overrides
14976 @code{always-marks}.  This is a proof-of-concept feature that will
14977 probably be removed eventually; it ought to be done in Gnus proper, or
14978 abandoned if it's not worthwhile.
14979
14980 @item nov-cache-size
14981 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
14982 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
14983 articles in each group.  (This is probably not worthwhile, and will
14984 probably be removed in the future.)  This parameter's value is noticed
14985 only the first time a group is seen after the server is opened---i.e.,
14986 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
14987 until the server is closed and reopened.  The default is an estimate
14988 of the number of articles that would be displayed in the summary
14989 buffer: a count of articles that are either marked with @code{tick} or
14990 not marked with @code{read}, plus a little extra.
14991 @end table
14992
14993 @subsubsection Article identification
14994 Articles are stored in the @file{cur/} subdirectory of each maildir.
14995 Each article file is named like @code{uniq:info}, where @code{uniq}
14996 contains no colons.  nnmaildir ignores, but preserves, the
14997 @code{:info} part.  (Other maildir readers typically use this part of
14998 the filename to store marks.)  The @code{uniq} part uniquely
14999 identifies the article, and is used in various places in the
15000 @file{.nnmaildir/} subdirectory of the maildir to store information
15001 about the corresponding article.  The full pathname of an article is
15002 available in the variable @code{nnmaildir-article-file-name} after you
15003 request the article in the summary buffer.
15004
15005 @subsubsection NOV data
15006 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15007 generate lines in the summary buffer) stored in
15008 @code{.nnmaildir/nov/uniq}.  There is no
15009 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15010 need for it---an article's @acronym{NOV} data is updated automatically when the
15011 article or @code{nnmail-extra-headers} has changed.)  You can force
15012 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15013 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15014 cause nnmaildir to assign a new article number for this article, which
15015 may cause trouble with @code{seen} marks, the Agent, and the cache.
15016
15017 @subsubsection Article marks
15018 An article identified by @code{uniq} is considered to have the mark
15019 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15020 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15021 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15022 to store a new set of marks, nnmaildir creates and deletes the
15023 corresponding files as needed.  (Actually, rather than create a new
15024 file for each mark, it just creates hard links to
15025 @file{.nnmaildir/markfile}, to save inodes.)
15026
15027 You can invent new marks by creating a new directory in
15028 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15029 your server, untar it later, and keep your marks.  You can add and
15030 remove marks yourself by creating and deleting mark files.  If you do
15031 this while Gnus is running and your nnmaildir server is open, it's
15032 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15033 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15034 group buffer afterwards.  Otherwise, Gnus might not pick up the
15035 changes, and might undo them.
15036
15037
15038 @node Mail Folders
15039 @subsubsection Mail Folders
15040 @cindex nnfolder
15041 @cindex mbox folders
15042 @cindex mail folders
15043
15044 @code{nnfolder} is a back end for storing each mail group in a separate
15045 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15046 will add extra headers to keep track of article numbers and arrival
15047 dates.
15048
15049 @cindex self contained nnfolder servers
15050 @cindex marks
15051 When the marks file is used (which it is by default), @code{nnfolder}
15052 servers have the property that you may backup them using @code{tar} or
15053 similar, and later be able to restore them into Gnus (by adding the
15054 proper @code{nnfolder} server) and have all your marks be preserved.
15055 Marks for a group is usually stored in a file named as the mbox file
15056 with @code{.mrk} concatenated to it (but see
15057 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15058 Individual @code{nnfolder} groups are also possible to backup, use
15059 @kbd{G m} to restore the group (after restoring the backup into the
15060 @code{nnfolder} directory).
15061
15062 Virtual server settings:
15063
15064 @table @code
15065 @item nnfolder-directory
15066 @vindex nnfolder-directory
15067 All the @code{nnfolder} mail boxes will be stored under this directory.
15068 The default is the value of @code{message-directory} (whose default is
15069 @file{~/Mail})
15070
15071 @item nnfolder-active-file
15072 @vindex nnfolder-active-file
15073 The name of the active file.  The default is @file{~/Mail/active}.
15074
15075 @item nnfolder-newsgroups-file
15076 @vindex nnfolder-newsgroups-file
15077 The name of the group descriptions file.  @xref{Newsgroups File
15078 Format}.  The default is @file{~/Mail/newsgroups}
15079
15080 @item nnfolder-get-new-mail
15081 @vindex nnfolder-get-new-mail
15082 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15083 is @code{t}
15084
15085 @item nnfolder-save-buffer-hook
15086 @vindex nnfolder-save-buffer-hook
15087 @cindex backup files
15088 Hook run before saving the folders.  Note that Emacs does the normal
15089 backup renaming of files even with the @code{nnfolder} buffers.  If you
15090 wish to switch this off, you could say something like the following in
15091 your @file{.emacs} file:
15092
15093 @lisp
15094 (defun turn-off-backup ()
15095   (set (make-local-variable 'backup-inhibited) t))
15096
15097 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15098 @end lisp
15099
15100 @item nnfolder-delete-mail-hook
15101 @vindex nnfolder-delete-mail-hook
15102 Hook run in a buffer narrowed to the message that is to be deleted.
15103 This function can be used to copy the message to somewhere else, or to
15104 extract some information from it before removing it.
15105
15106 @item nnfolder-nov-is-evil
15107 @vindex nnfolder-nov-is-evil
15108 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15109 default is @code{nil}.
15110
15111 @item nnfolder-nov-file-suffix
15112 @vindex nnfolder-nov-file-suffix
15113 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15114
15115 @item nnfolder-nov-directory
15116 @vindex nnfolder-nov-directory
15117 The directory where the @acronym{NOV} files should be stored.  If
15118 @code{nil}, @code{nnfolder-directory} is used.
15119
15120 @item nnfolder-marks-is-evil
15121 @vindex nnfolder-marks-is-evil
15122 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15123 default is @code{nil}.
15124
15125 @item nnfolder-marks-file-suffix
15126 @vindex nnfolder-marks-file-suffix
15127 The extension for @sc{marks} files.  The default is @file{.mrk}.
15128
15129 @item nnfolder-marks-directory
15130 @vindex nnfolder-marks-directory
15131 The directory where the @sc{marks} files should be stored.  If
15132 @code{nil}, @code{nnfolder-directory} is used.
15133
15134 @end table
15135
15136
15137 @findex nnfolder-generate-active-file
15138 @kindex M-x nnfolder-generate-active-file
15139 If you have lots of @code{nnfolder}-like files you'd like to read with
15140 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15141 command to make @code{nnfolder} aware of all likely files in
15142 @code{nnfolder-directory}.  This only works if you use long file names,
15143 though.
15144
15145 @node Comparing Mail Back Ends
15146 @subsubsection Comparing Mail Back Ends
15147
15148 First, just for terminology, the @dfn{back end} is the common word for a
15149 low-level access method---a transport, if you will, by which something
15150 is acquired.  The sense is that one's mail has to come from somewhere,
15151 and so selection of a suitable back end is required in order to get that
15152 mail within spitting distance of Gnus.
15153
15154 The same concept exists for Usenet itself: Though access to articles is
15155 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15156 in the world got at Usenet by running a reader on the machine where the
15157 articles lay (the machine which today we call an @acronym{NNTP} server), and
15158 access was by the reader stepping into the articles' directory spool
15159 area directly.  One can still select between either the @code{nntp} or
15160 @code{nnspool} back ends, to select between these methods, if one happens
15161 actually to live on the server (or can see its spool directly, anyway,
15162 via NFS).
15163
15164 The goal in selecting a mail back end is to pick one which
15165 simultaneously represents a suitable way of dealing with the original
15166 format plus leaving mail in a form that is convenient to use in the
15167 future.  Here are some high and low points on each:
15168
15169 @table @code
15170 @item nnmbox
15171
15172 UNIX systems have historically had a single, very common, and well-
15173 defined format.  All messages arrive in a single @dfn{spool file}, and
15174 they are delineated by a line whose regular expression matches
15175 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15176 to make it clear in this instance that this is not the RFC-specified
15177 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15178 historically from the Unix environment, it is simplest if one does not
15179 mess a great deal with the original mailbox format, so if one chooses
15180 this back end, Gnus' primary activity in getting mail from the real spool
15181 area to Gnus' preferred directory is simply to copy it, with no
15182 (appreciable) format change in the process.  It is the ``dumbest'' way
15183 to move mail into availability in the Gnus environment.  This makes it
15184 fast to move into place, but slow to parse, when Gnus has to look at
15185 what's where.
15186
15187 @item nnbabyl
15188
15189 Once upon a time, there was the DEC-10 and DEC-20, running operating
15190 systems called TOPS and related things, and the usual (only?) mail
15191 reading environment was a thing called Babyl.  I don't know what format
15192 was used for mail landing on the system, but Babyl had its own internal
15193 format to which mail was converted, primarily involving creating a
15194 spool-file-like entity with a scheme for inserting Babyl-specific
15195 headers and status bits above the top of each message in the file.
15196 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15197 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15198 to understand the mail files folks already had in existence.  Gnus (and
15199 VM, for that matter) continue to support this format because it's
15200 perceived as having some good qualities in those mailer-specific
15201 headers/status bits stuff.  Rmail itself still exists as well, of
15202 course, and is still maintained by Stallman.
15203
15204 Both of the above forms leave your mail in a single file on your
15205 file system, and they must parse that entire file each time you take a
15206 look at your mail.
15207
15208 @item nnml
15209
15210 @code{nnml} is the back end which smells the most as though you were
15211 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15212 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15213 lo these years ago.)  One's mail is taken from the original spool file,
15214 and is then cut up into individual message files, 1:1.  It maintains a
15215 Usenet-style active file (analogous to what one finds in an INN- or
15216 CNews-based news system in (for instance) @file{/var/lib/news/active},
15217 or what is returned via the @samp{NNTP LIST} verb) and also creates
15218 @dfn{overview} files for efficient group entry, as has been defined for
15219 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15220 due to the creation of lots of files, updates to the @code{nnml} active
15221 file, and additions to overview files on a per-message basis, but it is
15222 extremely fast on access because of what amounts to the indexing support
15223 provided by the active file and overviews.
15224
15225 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15226 resource which defines available places in the file system to put new
15227 files.  Sysadmins take a dim view of heavy inode occupation within
15228 tight, shared file systems.  But if you live on a personal machine where
15229 the file system is your own and space is not at a premium, @code{nnml}
15230 wins big.
15231
15232 It is also problematic using this back end if you are living in a
15233 FAT16-based Windows world, since much space will be wasted on all these
15234 tiny files.
15235
15236 @item nnmh
15237
15238 The Rand MH mail-reading system has been around UNIX systems for a very
15239 long time; it operates by splitting one's spool file of messages into
15240 individual files, but with little or no indexing support---@code{nnmh}
15241 is considered to be semantically equivalent to ``@code{nnml} without
15242 active file or overviews''.  This is arguably the worst choice, because
15243 one gets the slowness of individual file creation married to the
15244 slowness of access parsing when learning what's new in one's groups.
15245
15246 @item nnfolder
15247
15248 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15249 method described above) on a per-group basis.  That is, @code{nnmbox}
15250 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15251 little bit of optimization to this so that each of one's mail groups has
15252 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15253 can be parsed separately, and still provides the simple Unix mail box
15254 format requiring minimal effort in moving the mail around.  In addition,
15255 it maintains an ``active'' file making it much faster for Gnus to figure
15256 out how many messages there are in each separate group.
15257
15258 If you have groups that are expected to have a massive amount of
15259 messages, @code{nnfolder} is not the best choice, but if you receive
15260 only a moderate amount of mail, @code{nnfolder} is probably the most
15261 friendly mail back end all over.
15262
15263 @item nnmaildir
15264
15265 For configuring expiry and other things, @code{nnmaildir} uses
15266 incompatible group parameters, slightly different from those of other
15267 mail back ends.
15268
15269 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15270 differences.  Each message is stored in a separate file, but the
15271 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15272 also stores the equivalent of @code{nnml}'s overview files in one file
15273 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15274 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15275 you down or takes up very much space, consider switching to 
15276 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15277 file system.
15278
15279 Since maildirs don't require locking for delivery, the maildirs you use
15280 as groups can also be the maildirs your mail is directly delivered to.
15281 This means you can skip Gnus's mail splitting if your mail is already
15282 organized into different mailboxes during delivery.  A @code{directory}
15283 entry in @code{mail-sources} would have a similar effect, but would
15284 require one set of mailboxes for spooling deliveries (in mbox format,
15285 thus damaging message bodies), and another set to be used as groups (in
15286 whatever format you like).  A maildir has a built-in spool, in the
15287 @code{new/} subdirectory.  Beware that currently, mail moved from
15288 @code{new/} to @code{cur/} instead of via mail splitting will not
15289 undergo treatment such as duplicate checking.
15290
15291 @code{nnmaildir} stores article marks for a given group in the
15292 corresponding maildir, in a way designed so that it's easy to manipulate
15293 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15294 else, and still have your marks.  @code{nnml} also stores marks, but
15295 it's not as easy to work with them from outside Gnus as with
15296 @code{nnmaildir}.
15297
15298 @code{nnmaildir} uses a significant amount of memory to speed things up.
15299 (It keeps in memory some of the things that @code{nnml} stores in files
15300 and that @code{nnmh} repeatedly parses out of message files.)  If this
15301 is a problem for you, you can set the @code{nov-cache-size} group
15302 parameter to something small (0 would probably not work, but 1 probably
15303 would) to make it use less memory.  This caching will probably be
15304 removed in the future.
15305
15306 Startup is likely to be slower with @code{nnmaildir} than with other
15307 back ends.  Everything else is likely to be faster, depending in part
15308 on your file system.
15309
15310 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15311 to write an @code{nnmaildir}-derived back end.
15312
15313 @end table
15314
15315
15316 @node Browsing the Web
15317 @section Browsing the Web
15318 @cindex web
15319 @cindex browsing the web
15320 @cindex www
15321 @cindex http
15322
15323 Web-based discussion forums are getting more and more popular.  On many
15324 subjects, the web-based forums have become the most important forums,
15325 eclipsing the importance of mailing lists and news groups.  The reason
15326 is easy to understand---they are friendly to new users; you just point
15327 and click, and there's the discussion.  With mailing lists, you have to
15328 go through a cumbersome subscription procedure, and most people don't
15329 even know what a news group is.
15330
15331 The problem with this scenario is that web browsers are not very good at
15332 being newsreaders.  They do not keep track of what articles you've read;
15333 they do not allow you to score on subjects you're interested in; they do
15334 not allow off-line browsing; they require you to click around and drive
15335 you mad in the end.
15336
15337 So---if web browsers suck at reading discussion forums, why not use Gnus
15338 to do it instead?
15339
15340 Gnus has been getting a bit of a collection of back ends for providing
15341 interfaces to these sources.
15342
15343 @menu
15344 * Archiving Mail::              
15345 * Web Searches::                Creating groups from articles that match a string.
15346 * Slashdot::                    Reading the Slashdot comments.
15347 * Ultimate::                    The Ultimate Bulletin Board systems.
15348 * Web Archive::                 Reading mailing list archived on web.
15349 * RSS::                         Reading RDF site summary.
15350 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15351 @end menu
15352
15353 All the web sources require Emacs/w3 and the url library to work.
15354
15355 The main caveat with all these web sources is that they probably won't
15356 work for a very long time.  Gleaning information from the @acronym{HTML} data
15357 is guesswork at best, and when the layout is altered, the Gnus back end
15358 will fail.  If you have reasonably new versions of these back ends,
15359 though, you should be ok.
15360
15361 One thing all these Web methods have in common is that the Web sources
15362 are often down, unavailable or just plain too slow to be fun.  In those
15363 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15364 Unplugged}) handle downloading articles, and then you can read them at
15365 leisure from your local disk.  No more World Wide Wait for you.
15366
15367 @node Archiving Mail
15368 @subsection Archiving Mail
15369 @cindex archiving mail
15370 @cindex backup of mail
15371
15372 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15373 @code{nnmaildir}, now actually store the article marks with each group.
15374 For these servers, archiving and restoring a group while preserving
15375 marks is fairly simple.
15376
15377 (Preserving the group level and group parameters as well still
15378 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15379 though.)
15380
15381 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15382 server, take a recursive copy of the server directory.  There is no need
15383 to shut down Gnus, so archiving may be invoked by @code{cron} or
15384 similar.  You restore the data by restoring the directory tree, and
15385 adding a server definition pointing to that directory in Gnus. The
15386 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15387 might interfere with overwriting data, so you may want to shut down Gnus
15388 before you restore the data.
15389
15390 It is also possible to archive individual @code{nnml},
15391 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15392 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15393 directory.  For @code{nnfolder} you need to copy both the base folder
15394 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15395 this example). Restoring the group is done with @kbd{G m} from the Group
15396 buffer.  The last step makes Gnus notice the new directory.
15397 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15398 is unnecessary in that case.
15399
15400 @node Web Searches
15401 @subsection Web Searches
15402 @cindex nnweb
15403 @cindex Google
15404 @cindex dejanews
15405 @cindex gmane
15406 @cindex Usenet searches
15407 @cindex searching the Usenet
15408
15409 It's, like, too neat to search the Usenet for articles that match a
15410 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15411 those, like, Web browsers, and you, like, have to, rilly, like, look at
15412 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15413 searches without having to use a browser.
15414
15415 The @code{nnweb} back end allows an easy interface to the mighty search
15416 engine.  You create an @code{nnweb} group, enter a search pattern, and
15417 then enter the group and read the articles like you would any normal
15418 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15419 Groups}) will do this in an easy-to-use fashion.
15420
15421 @code{nnweb} groups don't really lend themselves to being solid
15422 groups---they have a very fleeting idea of article numbers.  In fact,
15423 each time you enter an @code{nnweb} group (not even changing the search
15424 pattern), you are likely to get the articles ordered in a different
15425 manner.  Not even using duplicate suppression (@pxref{Duplicate
15426 Suppression}) will help, since @code{nnweb} doesn't even know the
15427 @code{Message-ID} of the articles before reading them using some search
15428 engines (Google, for instance).  The only possible way to keep track
15429 of which articles you've read is by scoring on the @code{Date}
15430 header---mark all articles posted before the last date you read the
15431 group as read.
15432
15433 If the search engine changes its output substantially, @code{nnweb}
15434 won't be able to parse it and will fail.  One could hardly fault the Web
15435 providers if they were to do this---their @emph{raison d'être} is to
15436 make money off of advertisements, not to provide services to the
15437 community.  Since @code{nnweb} washes the ads off all the articles, one
15438 might think that the providers might be somewhat miffed.  We'll see.
15439
15440 You must have the @code{url} and @code{w3} package installed to be able
15441 to use @code{nnweb}.
15442
15443 Virtual server variables:
15444
15445 @table @code
15446 @item nnweb-type
15447 @vindex nnweb-type
15448 What search engine type is being used.  The currently supported types
15449 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
15450 @code{dejanews} is an alias to @code{google}.
15451
15452 @item nnweb-search
15453 @vindex nnweb-search
15454 The search string to feed to the search engine.
15455
15456 @item nnweb-max-hits
15457 @vindex nnweb-max-hits
15458 Advisory maximum number of hits per search to display.  The default is
15459 999.
15460
15461 @item nnweb-type-definition
15462 @vindex nnweb-type-definition
15463 Type-to-definition alist.  This alist says what @code{nnweb} should do
15464 with the various search engine types.  The following elements must be
15465 present:
15466
15467 @table @code
15468 @item article
15469 Function to decode the article and provide something that Gnus
15470 understands.
15471
15472 @item map
15473 Function to create an article number to message header and URL alist.
15474
15475 @item search
15476 Function to send the search string to the search engine.
15477
15478 @item address
15479 The address the aforementioned function should send the search string
15480 to.
15481
15482 @item id
15483 Format string URL to fetch an article by @code{Message-ID}.
15484 @end table
15485
15486 @end table
15487
15488
15489 @node Slashdot
15490 @subsection Slashdot
15491 @cindex Slashdot
15492 @cindex nnslashdot
15493
15494 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15495 lively discussion following the news articles.  @code{nnslashdot} will
15496 let you read this forum in a convenient manner.
15497
15498 The easiest way to read this source is to put something like the
15499 following in your @file{~/.gnus.el} file:
15500
15501 @lisp
15502 (setq gnus-secondary-select-methods
15503       '((nnslashdot "")))
15504 @end lisp
15505
15506 This will make Gnus query the @code{nnslashdot} back end for new comments
15507 and groups.  The @kbd{F} command will subscribe each new news article as
15508 a new Gnus group, and you can read the comments by entering these
15509 groups.  (Note that the default subscription method is to subscribe new
15510 groups as zombies.  Other methods are available (@pxref{Subscription
15511 Methods}).
15512
15513 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15514 command is the most handy tool (@pxref{Foreign Groups}).
15515
15516 When following up to @code{nnslashdot} comments (or posting new
15517 comments), some light @acronym{HTML}izations will be performed.  In
15518 particular, text quoted with @samp{> } will be quoted with
15519 @code{blockquote} instead, and signatures will have @code{br} added to
15520 the end of each line.  Other than that, you can just write @acronym{HTML}
15521 directly into the message buffer.  Note that Slashdot filters out some
15522 @acronym{HTML} forms.
15523
15524 The following variables can be altered to change its behavior:
15525
15526 @table @code
15527 @item nnslashdot-threaded
15528 Whether @code{nnslashdot} should display threaded groups or not.  The
15529 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15530 has to retrieve absolutely all comments in a group upon entry.  If a
15531 threaded display is not required, @code{nnslashdot} will only retrieve
15532 the comments that are actually wanted by the user.  Threading is nicer,
15533 but much, much slower than unthreaded.
15534
15535 @item nnslashdot-login-name
15536 @vindex nnslashdot-login-name
15537 The login name to use when posting.
15538
15539 @item nnslashdot-password
15540 @vindex nnslashdot-password
15541 The password to use when posting.
15542
15543 @item nnslashdot-directory
15544 @vindex nnslashdot-directory
15545 Where @code{nnslashdot} will store its files.  The default is
15546 @file{~/News/slashdot/}.
15547
15548 @item nnslashdot-active-url
15549 @vindex nnslashdot-active-url
15550 The @sc{url} format string that will be used to fetch the information on
15551 news articles and comments.  The default is@*
15552 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15553
15554 @item nnslashdot-comments-url
15555 @vindex nnslashdot-comments-url
15556 The @sc{url} format string that will be used to fetch comments.  The
15557 default is
15558 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15559
15560 @item nnslashdot-article-url
15561 @vindex nnslashdot-article-url
15562 The @sc{url} format string that will be used to fetch the news article.  The
15563 default is
15564 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15565
15566 @item nnslashdot-threshold
15567 @vindex nnslashdot-threshold
15568 The score threshold.  The default is -1.
15569
15570 @item nnslashdot-group-number
15571 @vindex nnslashdot-group-number
15572 The number of old groups, in addition to the ten latest, to keep
15573 updated.  The default is 0.
15574
15575 @end table
15576
15577
15578
15579 @node Ultimate
15580 @subsection Ultimate
15581 @cindex nnultimate
15582 @cindex Ultimate Bulletin Board
15583
15584 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15585 probably the most popular Web bulletin board system used.  It has a
15586 quite regular and nice interface, and it's possible to get the
15587 information Gnus needs to keep groups updated.
15588
15589 The easiest way to get started with @code{nnultimate} is to say
15590 something like the following in the group buffer:  @kbd{B nnultimate RET
15591 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15592 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15593 you're interested in; there's quite a list of them on the Ultimate web
15594 site.)  Then subscribe to the groups you're interested in from the
15595 server buffer, and read them from the group buffer.
15596
15597 The following @code{nnultimate} variables can be altered:
15598
15599 @table @code
15600 @item nnultimate-directory
15601 @vindex nnultimate-directory
15602 The directory where @code{nnultimate} stores its files.  The default is@*
15603 @file{~/News/ultimate/}.
15604 @end table
15605
15606
15607 @node Web Archive
15608 @subsection Web Archive
15609 @cindex nnwarchive
15610 @cindex Web Archive
15611
15612 Some mailing lists only have archives on Web servers, such as
15613 @uref{http://www.egroups.com/} and
15614 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15615 interface, and it's possible to get the information Gnus needs to keep
15616 groups updated.
15617
15618 @findex gnus-group-make-warchive-group
15619 The easiest way to get started with @code{nnwarchive} is to say
15620 something like the following in the group buffer: @kbd{M-x
15621 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15622 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15623 @var{an_egroup} with the mailing list you subscribed, the
15624 @var{your@@email.address} with your email address.), or to browse the
15625 back end by @kbd{B nnwarchive RET mail-archive RET}.
15626
15627 The following @code{nnwarchive} variables can be altered:
15628
15629 @table @code
15630 @item nnwarchive-directory
15631 @vindex nnwarchive-directory
15632 The directory where @code{nnwarchive} stores its files.  The default is@*
15633 @file{~/News/warchive/}.
15634
15635 @item nnwarchive-login
15636 @vindex nnwarchive-login
15637 The account name on the web server.
15638
15639 @item nnwarchive-passwd
15640 @vindex nnwarchive-passwd
15641 The password for your account on the web server.
15642 @end table
15643
15644 @node RSS
15645 @subsection RSS
15646 @cindex nnrss
15647 @cindex RSS
15648
15649 Some sites have RDF site summary (RSS)
15650 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15651 interface, and it's possible to get the information Gnus needs to keep
15652 groups updated.
15653
15654 The easiest way to get started with @code{nnrss} is to say something
15655 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15656 subscribe groups.
15657
15658 The following @code{nnrss} variables can be altered:
15659
15660 @table @code
15661 @item nnrss-directory
15662 @vindex nnrss-directory
15663 The directory where @code{nnrss} stores its files.  The default is
15664 @file{~/News/rss/}.
15665
15666 @end table
15667
15668 The following code may be helpful, if you want to show the description in
15669 the summary buffer.
15670
15671 @lisp
15672 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15673 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15674
15675 (defun gnus-user-format-function-X (header)
15676   (let ((descr
15677          (assq nnrss-description-field (mail-header-extra header))))
15678     (if descr (concat "\n\t" (cdr descr)) "")))
15679 @end lisp
15680
15681 The following code may be useful to open an nnrss url directly from the
15682 summary buffer.
15683 @lisp
15684 (require 'browse-url)
15685
15686 (defun browse-nnrss-url( arg )
15687   (interactive "p")
15688   (let ((url (assq nnrss-url-field
15689                    (mail-header-extra
15690                     (gnus-data-header
15691                      (assq (gnus-summary-article-number)
15692                            gnus-newsgroup-data))))))
15693     (if url
15694         (progn
15695           (browse-url (cdr url))
15696           (gnus-summary-mark-as-read-forward 1))
15697       (gnus-summary-scroll-up arg))))
15698
15699 (eval-after-load "gnus"
15700   #'(define-key gnus-summary-mode-map
15701       (kbd "<RET>") 'browse-nnrss-url))
15702 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15703 @end lisp
15704
15705 @node Customizing w3
15706 @subsection Customizing w3
15707 @cindex w3
15708 @cindex html
15709 @cindex url
15710 @cindex Netscape
15711
15712 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15713 pages.  Emacs/w3 is documented in its own manual, but there are some
15714 things that may be more relevant for Gnus users.
15715
15716 For instance, a common question is how to make Emacs/w3 follow links
15717 using the @code{browse-url} functions (which will call some external web
15718 browser like Netscape).  Here's one way:
15719
15720 @lisp
15721 (eval-after-load "w3"
15722   '(progn
15723     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15724     (defun w3-fetch (&optional url target)
15725       (interactive (list (w3-read-url-with-default)))
15726       (if (eq major-mode 'gnus-article-mode)
15727           (browse-url url)
15728         (w3-fetch-orig url target)))))
15729 @end lisp
15730
15731 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15732 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15733 follow the link.
15734
15735
15736 @node IMAP
15737 @section IMAP
15738 @cindex nnimap
15739 @cindex @acronym{IMAP}
15740
15741 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15742 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15743 server is much similar to connecting to a news server, you just
15744 specify the network address of the server.
15745
15746 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15747 everything that @acronym{POP} can, it can hence be viewed as a
15748 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15749 similar to @acronym{NNTP} being a news storage protocol---however,
15750 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15751 is more or less read-only whereas mail is read-write.
15752
15753 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15754 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15755 the @acronym{IMAP} server and store them on the local disk.  This is
15756 not the usage described in this section---@xref{Mail Sources}.
15757
15758 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15759 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15760 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15761 usage explained in this section.
15762
15763 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} servers
15764 might look something like the following. (Note that for @acronym{TLS}/@acronym{SSL}, you
15765 need external programs and libraries, see below.)
15766
15767 @lisp
15768 (setq gnus-secondary-select-methods
15769       '((nnimap "simpleserver") ; @r{no special configuration}
15770         ; @r{perhaps a ssh port forwarded server:}
15771         (nnimap "dolk"
15772                 (nnimap-address "localhost")
15773                 (nnimap-server-port 1430))
15774         ; @r{a UW server running on localhost}
15775         (nnimap "barbar"
15776                 (nnimap-server-port 143)
15777                 (nnimap-address "localhost")
15778                 (nnimap-list-pattern ("INBOX" "mail/*")))
15779         ; @r{anonymous public cyrus server:}
15780         (nnimap "cyrus.andrew.cmu.edu"
15781                 (nnimap-authenticator anonymous)
15782                 (nnimap-list-pattern "archive.*")
15783                 (nnimap-stream network))
15784         ; @r{a ssl server on a non-standard port:}
15785         (nnimap "vic20"
15786                 (nnimap-address "vic20.somewhere.com")
15787                 (nnimap-server-port 9930)
15788                 (nnimap-stream ssl))))
15789 @end lisp
15790
15791 After defining the new server, you can subscribe to groups on the
15792 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15793 (@pxref{Subscription Commands}) or via the Server Buffer
15794 (@pxref{Server Buffer}).
15795
15796 The following variables can be used to create a virtual @code{nnimap}
15797 server:
15798
15799 @table @code
15800
15801 @item nnimap-address
15802 @vindex nnimap-address
15803
15804 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15805 server name if not specified.
15806
15807 @item nnimap-server-port
15808 @vindex nnimap-server-port
15809 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15810
15811 Note that this should be an integer, example server specification:
15812
15813 @lisp
15814 (nnimap "mail.server.com"
15815         (nnimap-server-port 4711))
15816 @end lisp
15817
15818 @item nnimap-list-pattern
15819 @vindex nnimap-list-pattern
15820 String or list of strings of mailboxes to limit available groups to.
15821 This is used when the server has very many mailboxes and you're only
15822 interested in a few---some servers export your home directory via
15823 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15824 @file{~/Mail/*} then.
15825
15826 The string can also be a cons of REFERENCE and the string as above, what
15827 REFERENCE is used for is server specific, but on the University of
15828 Washington server it's a directory that will be concatenated with the
15829 mailbox.
15830
15831 Example server specification:
15832
15833 @lisp
15834 (nnimap "mail.server.com"
15835         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15836                                ("~friend/Mail/" . "list/*"))))
15837 @end lisp
15838
15839 @item nnimap-stream
15840 @vindex nnimap-stream
15841 The type of stream used to connect to your server.  By default, nnimap
15842 will detect and automatically use all of the below, with the exception
15843 of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which
15844 can be automatically detected, but it's not widely deployed yet.)
15845
15846 Example server specification:
15847
15848 @lisp
15849 (nnimap "mail.server.com"
15850         (nnimap-stream ssl))
15851 @end lisp
15852
15853 Please note that the value of @code{nnimap-stream} is a symbol!
15854
15855 @itemize @bullet
15856 @item
15857 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15858 @samp{gsasl} or @samp{imtest} program.
15859 @item
15860 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15861 @item
15862 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15863 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15864 @samp{starttls}.
15865 @item
15866 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15867 @samp{gnutls-cli}).
15868 @item
15869 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15870 @samp{openssl}) or SSLeay (@samp{s_client}).
15871 @item
15872 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15873 @item
15874 @dfn{network:} Plain, TCP/IP network connection.
15875 @end itemize
15876
15877 @vindex imap-kerberos4-program
15878 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15879 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15880 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15881 to make @code{imap.el} use a pty instead of a pipe when communicating
15882 with @samp{imtest}.  You will then suffer from a line length
15883 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15884 indefinitely if you have many articles in a mailbox.  The variable
15885 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15886 program.
15887
15888 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15889 needed.  It is available from
15890 @uref{http://www.gnu.org/software/gnutls/}.
15891
15892 @vindex imap-gssapi-program
15893 This parameter specifies a list of command lines that invoke a GSSAPI
15894 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15895 sequentially until a connection is made, or the list has been
15896 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15897 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15898 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15899 tried.
15900
15901 @vindex imap-ssl-program
15902 For @acronym{SSL} connections, the OpenSSL program is available from
15903 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15904 and nnimap support it too---although the most recent versions of
15905 SSLeay, 0.9.x, are known to have serious bugs making it
15906 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15907 work. The variable @code{imap-ssl-program} contain parameters to pass
15908 to OpenSSL/SSLeay.
15909
15910 @vindex imap-shell-program
15911 @vindex imap-shell-host
15912 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15913 @code{imap-shell-program} specify what program to call.
15914
15915 @item nnimap-authenticator
15916 @vindex nnimap-authenticator
15917
15918 The authenticator used to connect to the server.  By default, nnimap
15919 will use the most secure authenticator your server is capable of.
15920
15921 Example server specification:
15922
15923 @lisp
15924 (nnimap "mail.server.com"
15925         (nnimap-authenticator anonymous))
15926 @end lisp
15927
15928 Please note that the value of @code{nnimap-authenticator} is a symbol!
15929
15930 @itemize @bullet
15931 @item
15932 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15933 external program @code{gsasl} or @code{imtest}.
15934 @item
15935 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15936 @code{imtest}.
15937 @item
15938 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15939 external library @code{digest-md5.el}.
15940 @item
15941 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15942 @item
15943 @dfn{login:} Plain-text username/password via LOGIN.
15944 @item
15945 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15946 @end itemize
15947
15948 @item nnimap-expunge-on-close
15949 @cindex expunging
15950 @vindex nnimap-expunge-on-close
15951 Unlike Parmenides the @acronym{IMAP} designers has decided that things that
15952 doesn't exist actually does exist.  More specifically, @acronym{IMAP} has
15953 this concept of marking articles @code{Deleted} which doesn't actually
15954 delete them, and this (marking them @code{Deleted}, that is) is what
15955 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15956 similar).
15957
15958 Since the articles aren't really removed when we mark them with the
15959 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15960 running in circles yet?
15961
15962 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15963 when closing a mailbox but this is now configurable by this server
15964 variable.
15965
15966 The possible options are:
15967
15968 @table @code
15969
15970 @item always
15971 The default behavior, delete all articles marked as ``Deleted'' when
15972 closing a mailbox.
15973 @item never
15974 Never actually delete articles.  Currently there is no way of showing
15975 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
15976 may allow you to do this.  If you ever want to run the EXPUNGE command
15977 manually, @xref{Expunging mailboxes}.
15978 @item ask
15979 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15980 articles or not.
15981
15982 @end table
15983
15984 @item nnimap-importantize-dormant
15985 @vindex nnimap-importantize-dormant
15986
15987 If non-@code{nil} (the default), marks dormant articles as ticked (as
15988 well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will
15989 naturally still (only) be marked as dormant.  This is to make dormant
15990 articles stand out, just like ticked articles, in other @acronym{IMAP}
15991 clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
15992 has only one.)
15993
15994 Probably the only reason for frobing this would be if you're trying
15995 enable per-user persistent dormant flags, using something like:
15996
15997 @lisp
15998 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15999         (format "gnus-dormant-%s" (user-login-name)))
16000 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16001         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16002 @end lisp
16003
16004 In this case, you would not want the per-user dormant flag showing up
16005 as ticked for other users.
16006
16007 @item nnimap-expunge-search-string
16008 @cindex expunging
16009 @vindex nnimap-expunge-search-string
16010
16011 This variable contain the @acronym{IMAP} search command sent to server when
16012 searching for articles eligible for expiring.  The default is
16013 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16014 UID set and the second @code{%s} is replaced by a date.
16015
16016 Probably the only useful value to change this to is
16017 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16018 messages instead of the internal article date. See section 6.4.4 of
16019 RFC 2060 for more information on valid strings.
16020
16021 @item nnimap-authinfo-file
16022 @vindex nnimap-authinfo-file
16023
16024 A file containing credentials used to log in on servers.  The format is
16025 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16026 variable @code{nntp-authinfo-file} for exact syntax; also see
16027 @ref{NNTP}.
16028
16029 @item nnimap-need-unselect-to-notice-new-mail
16030 @vindex nnimap-need-unselect-to-notice-new-mail
16031
16032 Unselect mailboxes before looking for new mail in them.  Some servers
16033 seem to need this under some circumstances; it was reported that
16034 Courier 1.7.1 did.
16035
16036 @end table
16037
16038 @menu
16039 * Splitting in IMAP::           Splitting mail with nnimap.
16040 * Expiring in IMAP::            Expiring mail with nnimap.
16041 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16042 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16043 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16044 @end menu
16045
16046
16047
16048 @node Splitting in IMAP
16049 @subsection Splitting in IMAP
16050 @cindex splitting imap mail
16051
16052 Splitting is something Gnus users has loved and used for years, and now
16053 the rest of the world is catching up.  Yeah, dream on, not many
16054 @acronym{IMAP} server has server side splitting and those that have splitting
16055 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16056 support for Gnus has to do it's own splitting.
16057
16058 And it does.
16059
16060 Here are the variables of interest:
16061
16062 @table @code
16063
16064 @item nnimap-split-crosspost
16065 @cindex splitting, crosspost
16066 @cindex crosspost
16067 @vindex nnimap-split-crosspost
16068
16069 If non-@code{nil}, do crossposting if several split methods match the
16070 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16071 found will be used.
16072
16073 Nnmail equivalent: @code{nnmail-crosspost}.
16074
16075 @item nnimap-split-inbox
16076 @cindex splitting, inbox
16077 @cindex inbox
16078 @vindex nnimap-split-inbox
16079
16080 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16081 mailboxes to split from.  Defaults to @code{nil}, which means that
16082 splitting is disabled!
16083
16084 @lisp
16085 (setq nnimap-split-inbox
16086       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16087 @end lisp
16088
16089 No nnmail equivalent.
16090
16091 @item nnimap-split-rule
16092 @cindex splitting, rules
16093 @vindex nnimap-split-rule
16094
16095 New mail found in @code{nnimap-split-inbox} will be split according to
16096 this variable.
16097
16098 This variable contains a list of lists, where the first element in the
16099 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16100 matching the regexp in the second element in the sublist.  Got that?
16101 Neither did I, we need examples.
16102
16103 @lisp
16104 (setq nnimap-split-rule
16105       '(("INBOX.nnimap"
16106          "^Sender: owner-nnimap@@vic20.globalcom.se")
16107         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16108         ("INBOX.private" "")))
16109 @end lisp
16110
16111 This will put all articles from the nnimap mailing list into mailbox
16112 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16113 into INBOX.junk and everything else in INBOX.private.
16114
16115 The first string may contain `\\1' forms, like the ones used by
16116 replace-match to insert sub-expressions from the matched text.  For
16117 instance:
16118
16119 @lisp
16120 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16121 @end lisp
16122
16123 The first element can also be the symbol @code{junk} to indicate that
16124 matching messages should simply be deleted.  Use with care.
16125
16126 The second element can also be a function.  In that case, it will be
16127 called with the first element of the rule as the argument, in a buffer
16128 containing the headers of the article.  It should return a
16129 non-@code{nil} value if it thinks that the mail belongs in that group.
16130
16131 Nnmail users might recollect that the last regexp had to be empty to
16132 match all articles (like in the example above).  This is not required in
16133 nnimap.  Articles not matching any of the regexps will not be moved out
16134 of your inbox.  (This might affect performance if you keep lots of
16135 unread articles in your inbox, since the splitting code would go over
16136 them every time you fetch new mail.)
16137
16138 These rules are processed from the beginning of the alist toward the
16139 end.  The first rule to make a match will ``win'', unless you have
16140 crossposting enabled.  In that case, all matching rules will ``win''.
16141
16142 This variable can also have a function as its value, the function will
16143 be called with the headers narrowed and should return a group where it
16144 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16145
16146 The splitting code tries to create mailboxes if it needs to.
16147
16148 To allow for different split rules on different virtual servers, and
16149 even different split rules in different inboxes on the same server,
16150 the syntax of this variable have been extended along the lines of:
16151
16152 @lisp
16153 (setq nnimap-split-rule
16154       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16155                                ("junk"    "From:.*Simon"))))
16156         ("my2server"    ("INBOX" nnimap-split-fancy))
16157         ("my[34]server" (".*" (("private" "To:.*Simon")
16158                                ("junk"    my-junk-func))))))
16159 @end lisp
16160
16161 The virtual server name is in fact a regexp, so that the same rules
16162 may apply to several servers.  In the example, the servers
16163 @code{my3server} and @code{my4server} both use the same rules.
16164 Similarly, the inbox string is also a regexp.  The actual splitting
16165 rules are as before, either a function, or a list with group/regexp or
16166 group/function elements.
16167
16168 Nnmail equivalent: @code{nnmail-split-methods}.
16169
16170 @item nnimap-split-predicate
16171 @cindex splitting
16172 @vindex nnimap-split-predicate
16173
16174 Mail matching this predicate in @code{nnimap-split-inbox} will be
16175 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16176
16177 This might be useful if you use another @acronym{IMAP} client to read mail in
16178 your inbox but would like Gnus to split all articles in the inbox
16179 regardless of readedness. Then you might change this to
16180 @samp{UNDELETED}.
16181
16182 @item nnimap-split-fancy
16183 @cindex splitting, fancy
16184 @findex nnimap-split-fancy
16185 @vindex nnimap-split-fancy
16186
16187 It's possible to set @code{nnimap-split-rule} to
16188 @code{nnmail-split-fancy} if you want to use fancy
16189 splitting. @xref{Fancy Mail Splitting}.
16190
16191 However, to be able to have different fancy split rules for nnmail and
16192 nnimap back ends you can set @code{nnimap-split-rule} to
16193 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16194 rule in @code{nnimap-split-fancy}.
16195
16196 Example:
16197
16198 @lisp
16199 (setq nnimap-split-rule 'nnimap-split-fancy
16200       nnimap-split-fancy ...)
16201 @end lisp
16202
16203 Nnmail equivalent: @code{nnmail-split-fancy}.
16204
16205 @item nnimap-split-download-body
16206 @findex nnimap-split-download-body
16207 @vindex nnimap-split-download-body
16208
16209 Set to non-@code{nil} to download entire articles during splitting.
16210 This is generally not required, and will slow things down
16211 considerably.  You may need it if you want to use an advanced
16212 splitting function that analyses the body to split the article.
16213
16214 @end table
16215
16216 @node Expiring in IMAP
16217 @subsection Expiring in IMAP
16218 @cindex expiring imap mail
16219
16220 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16221 end, it supports most features in regular expiring (@pxref{Expiring
16222 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16223 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16224 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16225 follows below are the variables used by the @code{nnimap} expiry
16226 process.
16227
16228 A note on how the expire mark is stored on the @acronym{IMAP} server is
16229 appropriate here as well.  The expire mark is translated into a
16230 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16231 message.  This means that likely only Gnus will understand and treat
16232 the @code{gnus-expire} mark properly, although other clients may allow
16233 you to view client specific flags on the message.  It also means that
16234 your server must support permanent storage of client specific flags on
16235 messages.  Most do, fortunately.
16236
16237 @table @code
16238
16239 @item nnmail-expiry-wait
16240 @item nnmail-expiry-wait-function
16241
16242 These variables are fully supported.  The expire value can be a
16243 number, the symbol @code{immediate} or @code{never}.
16244
16245 @item nnmail-expiry-target
16246
16247 This variable is supported, and internally implemented by calling the
16248 @code{nnmail} functions that handle this.  It contains an optimization
16249 that if the destination is a @acronym{IMAP} group on the same server, the
16250 article is copied instead of appended (that is, uploaded again).
16251
16252 @end table
16253
16254 @node Editing IMAP ACLs
16255 @subsection Editing IMAP ACLs
16256 @cindex editing imap acls
16257 @cindex Access Control Lists
16258 @cindex Editing @acronym{IMAP} ACLs
16259 @kindex G l
16260 @findex gnus-group-nnimap-edit-acl
16261
16262 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16263 limiting (or enabling) other users access to your mail boxes.  Not all
16264 @acronym{IMAP} servers support this, this function will give an error if it
16265 doesn't.
16266
16267 To edit an ACL for a mailbox, type @kbd{G l}
16268 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16269 editing window with detailed instructions.
16270
16271 Some possible uses:
16272
16273 @itemize @bullet
16274 @item
16275 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16276 on your mailing list mailboxes enables other users on the same server to
16277 follow the list without subscribing to it.
16278 @item
16279 At least with the Cyrus server, you are required to give the user
16280 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16281 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16282 INBOX.mailbox).
16283 @end itemize
16284
16285 @node Expunging mailboxes
16286 @subsection Expunging mailboxes
16287 @cindex expunging
16288
16289 @cindex expunge
16290 @cindex manual expunging
16291 @kindex G x
16292 @findex gnus-group-nnimap-expunge
16293
16294 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16295 you may want the option of expunging all deleted articles in a mailbox
16296 manually.  This is exactly what @kbd{G x} does.
16297
16298 Currently there is no way of showing deleted articles, you can just
16299 delete them.
16300
16301 @node A note on namespaces
16302 @subsection A note on namespaces
16303 @cindex IMAP namespace
16304 @cindex namespaces
16305
16306 The @acronym{IMAP} protocol has a concept called namespaces, described
16307 by the following text in the RFC:
16308
16309 @display
16310 5.1.2.  Mailbox Namespace Naming Convention
16311
16312    By convention, the first hierarchical element of any mailbox name
16313    which begins with "#" identifies the "namespace" of the remainder of
16314    the name.  This makes it possible to disambiguate between different
16315    types of mailbox stores, each of which have their own namespaces.
16316
16317       For example, implementations which offer access to USENET
16318       newsgroups MAY use the "#news" namespace to partition the USENET
16319       newsgroup namespace from that of other mailboxes.  Thus, the
16320       comp.mail.misc newsgroup would have an mailbox name of
16321       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16322       to a different object (e.g. a user's private mailbox).
16323 @end display
16324
16325 While there is nothing in this text that warrants concern for the
16326 @acronym{IMAP} implementation in Gnus, some servers use namespace
16327 prefixes in a way that does not work with how Gnus uses mailbox names.
16328
16329 Specifically, University of Washington's @acronym{IMAP} server uses
16330 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16331 in the @sc{create} and @sc{append} commands.  After the mailbox is
16332 created (or a messages is appended to a mailbox), it must be accessed
16333 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16334 not make it possible for the user to guarantee that user entered
16335 mailbox names will only be used with the CREATE and APPEND commands,
16336 you should simply not use the namespace prefixed mailbox names in
16337 Gnus.
16338
16339 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16340 for more information on how to use the prefixes.  They are a power
16341 tool and should be used only if you are sure what the effects are.
16342
16343 @node Other Sources
16344 @section Other Sources
16345
16346 Gnus can do more than just read news or mail.  The methods described
16347 below allow Gnus to view directories and files as if they were
16348 newsgroups.
16349
16350 @menu
16351 * Directory Groups::            You can read a directory as if it was a newsgroup.
16352 * Anything Groups::             Dired?  Who needs dired?
16353 * Document Groups::             Single files can be the basis of a group.
16354 * SOUP::                        Reading @sc{soup} packets ``offline''.
16355 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16356 @end menu
16357
16358
16359 @node Directory Groups
16360 @subsection Directory Groups
16361 @cindex nndir
16362 @cindex directory groups
16363
16364 If you have a directory that has lots of articles in separate files in
16365 it, you might treat it as a newsgroup.  The files have to have numerical
16366 names, of course.
16367
16368 This might be an opportune moment to mention @code{ange-ftp} (and its
16369 successor @code{efs}), that most wonderful of all wonderful Emacs
16370 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16371 back end to read directories.  Big deal.
16372
16373 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16374 enter the @code{ange-ftp} file name
16375 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16376 @code{ange-ftp} or @code{efs} will actually allow you to read this
16377 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16378
16379 @code{nndir} will use @acronym{NOV} files if they are present.
16380
16381 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16382 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16383 whatever you use @code{nndir} for, so you could switch to any of those
16384 methods if you feel the need to have a non-read-only @code{nndir}.
16385
16386
16387 @node Anything Groups
16388 @subsection Anything Groups
16389 @cindex nneething
16390
16391 From the @code{nndir} back end (which reads a single spool-like
16392 directory), it's just a hop and a skip to @code{nneething}, which
16393 pretends that any arbitrary directory is a newsgroup.  Strange, but
16394 true.
16395
16396 When @code{nneething} is presented with a directory, it will scan this
16397 directory and assign article numbers to each file.  When you enter such
16398 a group, @code{nneething} must create ``headers'' that Gnus can use.
16399 After all, Gnus is a newsreader, in case you're forgetting.
16400 @code{nneething} does this in a two-step process.  First, it snoops each
16401 file in question.  If the file looks like an article (i.e., the first
16402 few lines look like headers), it will use this as the head.  If this is
16403 just some arbitrary file without a head (e.g. a C source file),
16404 @code{nneething} will cobble up a header out of thin air.  It will use
16405 file ownership, name and date and do whatever it can with these
16406 elements.
16407
16408 All this should happen automatically for you, and you will be presented
16409 with something that looks very much like a newsgroup.  Totally like a
16410 newsgroup, to be precise.  If you select an article, it will be displayed
16411 in the article buffer, just as usual.
16412
16413 If you select a line that represents a directory, Gnus will pop you into
16414 a new summary buffer for this @code{nneething} group.  And so on.  You can
16415 traverse the entire disk this way, if you feel like, but remember that
16416 Gnus is not dired, really, and does not intend to be, either.
16417
16418 There are two overall modes to this action---ephemeral or solid.  When
16419 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16420 will not store information on what files you have read, and what files
16421 are new, and so on.  If you create a solid @code{nneething} group the
16422 normal way with @kbd{G m}, Gnus will store a mapping table between
16423 article numbers and file names, and you can treat this group like any
16424 other groups.  When you activate a solid @code{nneething} group, you will
16425 be told how many unread articles it contains, etc., etc.
16426
16427 Some variables:
16428
16429 @table @code
16430 @item nneething-map-file-directory
16431 @vindex nneething-map-file-directory
16432 All the mapping files for solid @code{nneething} groups will be stored
16433 in this directory, which defaults to @file{~/.nneething/}.
16434
16435 @item nneething-exclude-files
16436 @vindex nneething-exclude-files
16437 All files that match this regexp will be ignored.  Nice to use to exclude
16438 auto-save files and the like, which is what it does by default.
16439
16440 @item nneething-include-files
16441 @vindex nneething-include-files
16442 Regexp saying what files to include in the group.  If this variable is
16443 non-@code{nil}, only files matching this regexp will be included.
16444
16445 @item nneething-map-file
16446 @vindex nneething-map-file
16447 Name of the map files.
16448 @end table
16449
16450
16451 @node Document Groups
16452 @subsection Document Groups
16453 @cindex nndoc
16454 @cindex documentation group
16455 @cindex help group
16456
16457 @code{nndoc} is a cute little thing that will let you read a single file
16458 as a newsgroup.  Several files types are supported:
16459
16460 @table @code
16461 @cindex Babyl
16462 @cindex Rmail mbox
16463
16464 @item babyl
16465 The Babyl (Rmail) mail box.
16466 @cindex mbox
16467 @cindex Unix mbox
16468
16469 @item mbox
16470 The standard Unix mbox file.
16471
16472 @cindex MMDF mail box
16473 @item mmdf
16474 The MMDF mail box format.
16475
16476 @item news
16477 Several news articles appended into a file.
16478
16479 @item rnews
16480 @cindex rnews batch files
16481 The rnews batch transport format.
16482 @cindex forwarded messages
16483
16484 @item forward
16485 Forwarded articles.
16486
16487 @item nsmail
16488 Netscape mail boxes.
16489
16490 @item mime-parts
16491 @acronym{MIME} multipart messages.
16492
16493 @item standard-digest
16494 The standard (RFC 1153) digest format.
16495
16496 @item mime-digest
16497 A @acronym{MIME} digest of messages.
16498
16499 @item lanl-gov-announce
16500 Announcement messages from LANL Gov Announce.
16501
16502 @item rfc822-forward
16503 A message forwarded according to RFC822.
16504
16505 @item outlook
16506 The Outlook mail box.
16507
16508 @item oe-dbx
16509 The Outlook Express dbx mail box.
16510
16511 @item exim-bounce
16512 A bounce message from the Exim MTA.
16513
16514 @item forward
16515 A message forwarded according to informal rules.
16516
16517 @item rfc934
16518 An RFC934-forwarded message.
16519
16520 @item mailman
16521 A mailman digest.
16522
16523 @item clari-briefs
16524 A digest of Clarinet brief news items.
16525
16526 @item slack-digest
16527 Non-standard digest format---matches most things, but does it badly.
16528
16529 @item mail-in-mail
16530 The last resort.
16531 @end table
16532
16533 You can also use the special ``file type'' @code{guess}, which means
16534 that @code{nndoc} will try to guess what file type it is looking at.
16535 @code{digest} means that @code{nndoc} should guess what digest type the
16536 file is.
16537
16538 @code{nndoc} will not try to change the file or insert any extra headers into
16539 it---it will simply, like, let you use the file as the basis for a
16540 group.  And that's it.
16541
16542 If you have some old archived articles that you want to insert into your
16543 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16544 that.  Say you have an old @file{RMAIL} file with mail that you now want
16545 to split into your new @code{nnml} groups.  You look at that file using
16546 @code{nndoc} (using the @kbd{G f} command in the group buffer
16547 (@pxref{Foreign Groups})), set the process mark on all the articles in
16548 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16549 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16550 file is now also stored in lots of @code{nnml} directories, and you can
16551 delete that pesky @file{RMAIL} file.  If you have the guts!
16552
16553 Virtual server variables:
16554
16555 @table @code
16556 @item nndoc-article-type
16557 @vindex nndoc-article-type
16558 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16559 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16560 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16561 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16562 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16563
16564 @item nndoc-post-type
16565 @vindex nndoc-post-type
16566 This variable says whether Gnus is to consider the group a news group or
16567 a mail group.  There are two valid values:  @code{mail} (the default)
16568 and @code{news}.
16569 @end table
16570
16571 @menu
16572 * Document Server Internals::   How to add your own document types.
16573 @end menu
16574
16575
16576 @node Document Server Internals
16577 @subsubsection Document Server Internals
16578
16579 Adding new document types to be recognized by @code{nndoc} isn't
16580 difficult.  You just have to whip up a definition of what the document
16581 looks like, write a predicate function to recognize that document type,
16582 and then hook into @code{nndoc}.
16583
16584 First, here's an example document type definition:
16585
16586 @example
16587 (mmdf
16588  (article-begin .  "^\^A\^A\^A\^A\n")
16589  (body-end .  "^\^A\^A\^A\^A\n"))
16590 @end example
16591
16592 The definition is simply a unique @dfn{name} followed by a series of
16593 regexp pseudo-variable settings.  Below are the possible
16594 variables---don't be daunted by the number of variables; most document
16595 types can be defined with very few settings:
16596
16597 @table @code
16598 @item first-article
16599 If present, @code{nndoc} will skip past all text until it finds
16600 something that match this regexp.  All text before this will be
16601 totally ignored.
16602
16603 @item article-begin
16604 This setting has to be present in all document type definitions.  It
16605 says what the beginning of each article looks like.
16606
16607 @item head-begin-function
16608 If present, this should be a function that moves point to the head of
16609 the article.
16610
16611 @item nndoc-head-begin
16612 If present, this should be a regexp that matches the head of the
16613 article.
16614
16615 @item nndoc-head-end
16616 This should match the end of the head of the article.  It defaults to
16617 @samp{^$}---the empty line.
16618
16619 @item body-begin-function
16620 If present, this function should move point to the beginning of the body
16621 of the article.
16622
16623 @item body-begin
16624 This should match the beginning of the body of the article.  It defaults
16625 to @samp{^\n}.
16626
16627 @item body-end-function
16628 If present, this function should move point to the end of the body of
16629 the article.
16630
16631 @item body-end
16632 If present, this should match the end of the body of the article.
16633
16634 @item file-end
16635 If present, this should match the end of the file.  All text after this
16636 regexp will be totally ignored.
16637
16638 @end table
16639
16640 So, using these variables @code{nndoc} is able to dissect a document
16641 file into a series of articles, each with a head and a body.  However, a
16642 few more variables are needed since not all document types are all that
16643 news-like---variables needed to transform the head or the body into
16644 something that's palatable for Gnus:
16645
16646 @table @code
16647 @item prepare-body-function
16648 If present, this function will be called when requesting an article.  It
16649 will be called with point at the start of the body, and is useful if the
16650 document has encoded some parts of its contents.
16651
16652 @item article-transform-function
16653 If present, this function is called when requesting an article.  It's
16654 meant to be used for more wide-ranging transformation of both head and
16655 body of the article.
16656
16657 @item generate-head-function
16658 If present, this function is called to generate a head that Gnus can
16659 understand.  It is called with the article number as a parameter, and is
16660 expected to generate a nice head for the article in question.  It is
16661 called when requesting the headers of all articles.
16662
16663 @end table
16664
16665 Let's look at the most complicated example I can come up with---standard
16666 digests:
16667
16668 @example
16669 (standard-digest
16670  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16671  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16672  (prepare-body-function . nndoc-unquote-dashes)
16673  (body-end-function . nndoc-digest-body-end)
16674  (head-end . "^ ?$")
16675  (body-begin . "^ ?\n")
16676  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16677  (subtype digest guess))
16678 @end example
16679
16680 We see that all text before a 70-width line of dashes is ignored; all
16681 text after a line that starts with that @samp{^End of} is also ignored;
16682 each article begins with a 30-width line of dashes; the line separating
16683 the head from the body may contain a single space; and that the body is
16684 run through @code{nndoc-unquote-dashes} before being delivered.
16685
16686 To hook your own document definition into @code{nndoc}, use the
16687 @code{nndoc-add-type} function.  It takes two parameters---the first
16688 is the definition itself and the second (optional) parameter says
16689 where in the document type definition alist to put this definition.
16690 The alist is traversed sequentially, and
16691 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16692 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16693 @code{mmdf} type, and so on.  These type predicates should return
16694 @code{nil} if the document is not of the correct type; @code{t} if it
16695 is of the correct type; and a number if the document might be of the
16696 correct type.  A high number means high probability; a low number
16697 means low probability with @samp{0} being the lowest valid number.
16698
16699
16700 @node SOUP
16701 @subsection SOUP
16702 @cindex SOUP
16703 @cindex offline
16704
16705 In the PC world people often talk about ``offline'' newsreaders.  These
16706 are thingies that are combined reader/news transport monstrosities.
16707 With built-in modem programs.  Yecchh!
16708
16709 Of course, us Unix Weenie types of human beans use things like
16710 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16711 transport things like Ghod intended.  And then we just use normal
16712 newsreaders.
16713
16714 However, it can sometimes be convenient to do something that's a bit
16715 easier on the brain if you have a very slow modem, and you're not really
16716 that interested in doing things properly.
16717
16718 A file format called @sc{soup} has been developed for transporting news
16719 and mail from servers to home machines and back again.  It can be a bit
16720 fiddly.
16721
16722 First some terminology:
16723
16724 @table @dfn
16725
16726 @item server
16727 This is the machine that is connected to the outside world and where you
16728 get news and/or mail from.
16729
16730 @item home machine
16731 This is the machine that you want to do the actual reading and responding
16732 on.  It is typically not connected to the rest of the world in any way.
16733
16734 @item packet
16735 Something that contains messages and/or commands.  There are two kinds
16736 of packets:
16737
16738 @table @dfn
16739 @item message packets
16740 These are packets made at the server, and typically contain lots of
16741 messages for you to read.  These are called @file{SoupoutX.tgz} by
16742 default, where @var{x} is a number.
16743
16744 @item response packets
16745 These are packets made at the home machine, and typically contains
16746 replies that you've written.  These are called @file{SoupinX.tgz} by
16747 default, where @var{x} is a number.
16748
16749 @end table
16750
16751 @end table
16752
16753
16754 @enumerate
16755
16756 @item
16757 You log in on the server and create a @sc{soup} packet.  You can either
16758 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16759 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16760 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16761
16762 @item
16763 You transfer the packet home.  Rail, boat, car or modem will do fine.
16764
16765 @item
16766 You put the packet in your home directory.
16767
16768 @item
16769 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16770 the native or secondary server.
16771
16772 @item
16773 You read articles and mail and answer and followup to the things you
16774 want (@pxref{SOUP Replies}).
16775
16776 @item
16777 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16778 packet.
16779
16780 @item
16781 You transfer this packet to the server.
16782
16783 @item
16784 You use Gnus to mail this packet out with the @kbd{G s s} command.
16785
16786 @item
16787 You then repeat until you die.
16788
16789 @end enumerate
16790
16791 So you basically have a bipartite system---you use @code{nnsoup} for
16792 reading and Gnus for packing/sending these @sc{soup} packets.
16793
16794 @menu
16795 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16796 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16797 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16798 @end menu
16799
16800
16801 @node SOUP Commands
16802 @subsubsection SOUP Commands
16803
16804 These are commands for creating and manipulating @sc{soup} packets.
16805
16806 @table @kbd
16807 @item G s b
16808 @kindex G s b (Group)
16809 @findex gnus-group-brew-soup
16810 Pack all unread articles in the current group
16811 (@code{gnus-group-brew-soup}).  This command understands the
16812 process/prefix convention.
16813
16814 @item G s w
16815 @kindex G s w (Group)
16816 @findex gnus-soup-save-areas
16817 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16818
16819 @item G s s
16820 @kindex G s s (Group)
16821 @findex gnus-soup-send-replies
16822 Send all replies from the replies packet
16823 (@code{gnus-soup-send-replies}).
16824
16825 @item G s p
16826 @kindex G s p (Group)
16827 @findex gnus-soup-pack-packet
16828 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16829
16830 @item G s r
16831 @kindex G s r (Group)
16832 @findex nnsoup-pack-replies
16833 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16834
16835 @item O s
16836 @kindex O s (Summary)
16837 @findex gnus-soup-add-article
16838 This summary-mode command adds the current article to a @sc{soup} packet
16839 (@code{gnus-soup-add-article}).  It understands the process/prefix
16840 convention (@pxref{Process/Prefix}).
16841
16842 @end table
16843
16844
16845 There are a few variables to customize where Gnus will put all these
16846 thingies:
16847
16848 @table @code
16849
16850 @item gnus-soup-directory
16851 @vindex gnus-soup-directory
16852 Directory where Gnus will save intermediate files while composing
16853 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16854
16855 @item gnus-soup-replies-directory
16856 @vindex gnus-soup-replies-directory
16857 This is what Gnus will use as a temporary directory while sending our
16858 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16859
16860 @item gnus-soup-prefix-file
16861 @vindex gnus-soup-prefix-file
16862 Name of the file where Gnus stores the last used prefix.  The default is
16863 @samp{gnus-prefix}.
16864
16865 @item gnus-soup-packer
16866 @vindex gnus-soup-packer
16867 A format string command for packing a @sc{soup} packet.  The default is
16868 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16869
16870 @item gnus-soup-unpacker
16871 @vindex gnus-soup-unpacker
16872 Format string command for unpacking a @sc{soup} packet.  The default is
16873 @samp{gunzip -c %s | tar xvf -}.
16874
16875 @item gnus-soup-packet-directory
16876 @vindex gnus-soup-packet-directory
16877 Where Gnus will look for reply packets.  The default is @file{~/}.
16878
16879 @item gnus-soup-packet-regexp
16880 @vindex gnus-soup-packet-regexp
16881 Regular expression matching @sc{soup} reply packets in
16882 @code{gnus-soup-packet-directory}.
16883
16884 @end table
16885
16886
16887 @node SOUP Groups
16888 @subsubsection SOUP Groups
16889 @cindex nnsoup
16890
16891 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16892 read incoming packets, unpack them, and put them in a directory where
16893 you can read them at leisure.
16894
16895 These are the variables you can use to customize its behavior:
16896
16897 @table @code
16898
16899 @item nnsoup-tmp-directory
16900 @vindex nnsoup-tmp-directory
16901 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16902 directory.  (@file{/tmp/} by default.)
16903
16904 @item nnsoup-directory
16905 @vindex nnsoup-directory
16906 @code{nnsoup} then moves each message and index file to this directory.
16907 The default is @file{~/SOUP/}.
16908
16909 @item nnsoup-replies-directory
16910 @vindex nnsoup-replies-directory
16911 All replies will be stored in this directory before being packed into a
16912 reply packet.  The default is @file{~/SOUP/replies/}.
16913
16914 @item nnsoup-replies-format-type
16915 @vindex nnsoup-replies-format-type
16916 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16917 (rnews), and I don't think you should touch that variable.  I probably
16918 shouldn't even have documented it.  Drats!  Too late!
16919
16920 @item nnsoup-replies-index-type
16921 @vindex nnsoup-replies-index-type
16922 The index type of the replies packet.  The default is @samp{?n}, which
16923 means ``none''.  Don't fiddle with this one either!
16924
16925 @item nnsoup-active-file
16926 @vindex nnsoup-active-file
16927 Where @code{nnsoup} stores lots of information.  This is not an ``active
16928 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16929 this file or mess it up in any way, you're dead.  The default is
16930 @file{~/SOUP/active}.
16931
16932 @item nnsoup-packer
16933 @vindex nnsoup-packer
16934 Format string command for packing a reply @sc{soup} packet.  The default
16935 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16936
16937 @item nnsoup-unpacker
16938 @vindex nnsoup-unpacker
16939 Format string command for unpacking incoming @sc{soup} packets.  The
16940 default is @samp{gunzip -c %s | tar xvf -}.
16941
16942 @item nnsoup-packet-directory
16943 @vindex nnsoup-packet-directory
16944 Where @code{nnsoup} will look for incoming packets.  The default is
16945 @file{~/}.
16946
16947 @item nnsoup-packet-regexp
16948 @vindex nnsoup-packet-regexp
16949 Regular expression matching incoming @sc{soup} packets.  The default is
16950 @samp{Soupout}.
16951
16952 @item nnsoup-always-save
16953 @vindex nnsoup-always-save
16954 If non-@code{nil}, save the replies buffer after each posted message.
16955
16956 @end table
16957
16958
16959 @node SOUP Replies
16960 @subsubsection SOUP Replies
16961
16962 Just using @code{nnsoup} won't mean that your postings and mailings end
16963 up in @sc{soup} reply packets automagically.  You have to work a bit
16964 more for that to happen.
16965
16966 @findex nnsoup-set-variables
16967 The @code{nnsoup-set-variables} command will set the appropriate
16968 variables to ensure that all your followups and replies end up in the
16969 @sc{soup} system.
16970
16971 In specific, this is what it does:
16972
16973 @lisp
16974 (setq message-send-news-function 'nnsoup-request-post)
16975 (setq message-send-mail-function 'nnsoup-request-mail)
16976 @end lisp
16977
16978 And that's it, really.  If you only want news to go into the @sc{soup}
16979 system you just use the first line.  If you only want mail to be
16980 @sc{soup}ed you use the second.
16981
16982
16983 @node Mail-To-News Gateways
16984 @subsection Mail-To-News Gateways
16985 @cindex mail-to-news gateways
16986 @cindex gateways
16987
16988 If your local @code{nntp} server doesn't allow posting, for some reason
16989 or other, you can post using one of the numerous mail-to-news gateways.
16990 The @code{nngateway} back end provides the interface.
16991
16992 Note that you can't read anything from this back end---it can only be
16993 used to post with.
16994
16995 Server variables:
16996
16997 @table @code
16998 @item nngateway-address
16999 @vindex nngateway-address
17000 This is the address of the mail-to-news gateway.
17001
17002 @item nngateway-header-transformation
17003 @vindex nngateway-header-transformation
17004 News headers often have to be transformed in some odd way or other
17005 for the mail-to-news gateway to accept it.  This variable says what
17006 transformation should be called, and defaults to
17007 @code{nngateway-simple-header-transformation}.  The function is called
17008 narrowed to the headers to be transformed and with one parameter---the
17009 gateway address.
17010
17011 This default function just inserts a new @code{To} header based on the
17012 @code{Newsgroups} header and the gateway address.
17013 For instance, an article with this @code{Newsgroups} header:
17014
17015 @example
17016 Newsgroups: alt.religion.emacs
17017 @end example
17018
17019 will get this @code{To} header inserted:
17020
17021 @example
17022 To: alt-religion-emacs@@GATEWAY
17023 @end example
17024
17025 The following pre-defined functions exist:
17026
17027 @findex nngateway-simple-header-transformation
17028 @table @code
17029
17030 @item nngateway-simple-header-transformation
17031 Creates a @code{To} header that looks like
17032 @var{newsgroup}@@@code{nngateway-address}.
17033
17034 @findex nngateway-mail2news-header-transformation
17035
17036 @item nngateway-mail2news-header-transformation
17037 Creates a @code{To} header that looks like
17038 @code{nngateway-address}.
17039 @end table
17040
17041 @end table
17042
17043 Here's an example:
17044
17045 @lisp
17046 (setq gnus-post-method
17047       '(nngateway
17048         "mail2news@@replay.com"
17049         (nngateway-header-transformation
17050          nngateway-mail2news-header-transformation)))
17051 @end lisp
17052
17053 So, to use this, simply say something like:
17054
17055 @lisp
17056 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17057 @end lisp
17058
17059
17060
17061 @node Combined Groups
17062 @section Combined Groups
17063
17064 Gnus allows combining a mixture of all the other group types into bigger
17065 groups.
17066
17067 @menu
17068 * Virtual Groups::              Combining articles from many groups.
17069 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17070 @end menu
17071
17072
17073 @node Virtual Groups
17074 @subsection Virtual Groups
17075 @cindex nnvirtual
17076 @cindex virtual groups
17077 @cindex merging groups
17078
17079 An @dfn{nnvirtual group} is really nothing more than a collection of
17080 other groups.
17081
17082 For instance, if you are tired of reading many small groups, you can
17083 put them all in one big group, and then grow tired of reading one
17084 big, unwieldy group.  The joys of computing!
17085
17086 You specify @code{nnvirtual} as the method.  The address should be a
17087 regexp to match component groups.
17088
17089 All marks in the virtual group will stick to the articles in the
17090 component groups.  So if you tick an article in a virtual group, the
17091 article will also be ticked in the component group from whence it
17092 came.  (And vice versa---marks from the component groups will also be
17093 shown in the virtual group.). To create an empty virtual group, run
17094 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17095 and edit the method regexp with @kbd{M-e}
17096 (@code{gnus-group-edit-group-method})
17097
17098 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17099 newsgroups into one, big, happy newsgroup:
17100
17101 @lisp
17102 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17103 @end lisp
17104
17105 The component groups can be native or foreign; everything should work
17106 smoothly, but if your computer explodes, it was probably my fault.
17107
17108 Collecting the same group from several servers might actually be a good
17109 idea if users have set the Distribution header to limit distribution.
17110 If you would like to read @samp{soc.motss} both from a server in Japan
17111 and a server in Norway, you could use the following as the group regexp:
17112
17113 @example
17114 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17115 @end example
17116
17117 (Remember, though, that if you're creating the group with @kbd{G m}, you
17118 shouldn't double the backslashes, and you should leave off the quote
17119 characters at the beginning and the end of the string.)
17120
17121 This should work kinda smoothly---all articles from both groups should
17122 end up in this one, and there should be no duplicates.  Threading (and
17123 the rest) will still work as usual, but there might be problems with the
17124 sequence of articles.  Sorting on date might be an option here
17125 (@pxref{Selecting a Group}).
17126
17127 One limitation, however---all groups included in a virtual
17128 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17129 zombie groups can't be component groups for @code{nnvirtual} groups.
17130
17131 @vindex nnvirtual-always-rescan
17132 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17133 @code{nnvirtual} will always scan groups for unread articles when
17134 entering a virtual group.  If this variable is @code{nil} (which is the
17135 default) and you read articles in a component group after the virtual
17136 group has been activated, the read articles from the component group
17137 will show up when you enter the virtual group.  You'll also see this
17138 effect if you have two virtual groups that have a component group in
17139 common.  If that's the case, you should set this variable to @code{t}.
17140 Or you can just tap @code{M-g} on the virtual group every time before
17141 you enter it---it'll have much the same effect.
17142
17143 @code{nnvirtual} can have both mail and news groups as component groups.
17144 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17145 has to ask the back end of the component group the article comes from
17146 whether it is a news or mail back end.  However, when you do a @kbd{^},
17147 there is typically no sure way for the component back end to know this,
17148 and in that case @code{nnvirtual} tells Gnus that the article came from a
17149 not-news back end.  (Just to be on the safe side.)
17150
17151 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17152 line from the article you respond to in these cases.
17153
17154 @code{nnvirtual} groups do not inherit anything but articles and marks
17155 from component groups---group parameters, for instance, are not
17156 inherited.
17157
17158
17159 @node Kibozed Groups
17160 @subsection Kibozed Groups
17161 @cindex nnkiboze
17162 @cindex kibozing
17163
17164 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17165 the news feed''.  @code{nnkiboze} is a back end that will do this for
17166 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17167 with useless requests!  Oh happiness!
17168
17169 @kindex G k (Group)
17170 To create a kibozed group, use the @kbd{G k} command in the group
17171 buffer.
17172
17173 The address field of the @code{nnkiboze} method is, as with
17174 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17175 @code{nnkiboze} group.  That's where most similarities between
17176 @code{nnkiboze} and @code{nnvirtual} end.
17177
17178 In addition to this regexp detailing component groups, an
17179 @code{nnkiboze} group must have a score file to say what articles are
17180 to be included in the group (@pxref{Scoring}).
17181
17182 @kindex M-x nnkiboze-generate-groups
17183 @findex nnkiboze-generate-groups
17184 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17185 @code{nnkiboze} groups you want to have.  This command will take time.
17186 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17187 headers from all the articles in all the component groups and run them
17188 through the scoring process to determine if there are any articles in
17189 the groups that are to be part of the @code{nnkiboze} groups.
17190
17191 Please limit the number of component groups by using restrictive
17192 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17193 @acronym{NNTP} site may throw you off and never let you back in again.
17194 Stranger things have happened.
17195
17196 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17197 and they can be foreign.  No restrictions.
17198
17199 @vindex nnkiboze-directory
17200 The generation of an @code{nnkiboze} group means writing two files in
17201 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17202 contains the @acronym{NOV} header lines for all the articles in the group,
17203 and the other is an additional @file{.newsrc} file to store information
17204 on what groups have been searched through to find component articles.
17205
17206 Articles marked as read in the @code{nnkiboze} group will have
17207 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17208
17209
17210 @node Gnus Unplugged
17211 @section Gnus Unplugged
17212 @cindex offline
17213 @cindex unplugged
17214 @cindex agent
17215 @cindex Gnus agent
17216 @cindex Gnus unplugged
17217
17218 In olden times (ca. February '88), people used to run their newsreaders
17219 on big machines with permanent connections to the net.  News transport
17220 was dealt with by news servers, and all the newsreaders had to do was to
17221 read news.  Believe it or not.
17222
17223 Nowadays most people read news and mail at home, and use some sort of
17224 modem to connect to the net.  To avoid running up huge phone bills, it
17225 would be nice to have a way to slurp down all the news and mail, hang up
17226 the phone, read for several hours, and then upload any responses you
17227 have to make.  And then you repeat the procedure.
17228
17229 Of course, you can use news servers for doing this as well.  I've used
17230 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17231 for some years, but doing that's a bore.  Moving the news server
17232 functionality up to the newsreader makes sense if you're the only person
17233 reading news on a machine.
17234
17235 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17236 fact, you don't even have to configure anything.
17237
17238 Of course, to use it as such, you have to learn a few new commands.
17239
17240 @menu
17241 * Agent Basics::                How it all is supposed to work.
17242 * Agent Categories::            How to tell the Gnus Agent what to download.
17243 * Agent Commands::              New commands for all the buffers.
17244 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17245 * Agent as Cache::              The Agent is a big cache too.
17246 * Agent Expiry::                How to make old articles go away.
17247 * Agent Regeneration::          How to recover from lost connections and other accidents.
17248 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17249 * Outgoing Messages::           What happens when you post/mail something?
17250 * Agent Variables::             Customizing is fun.
17251 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17252 * Batching Agents::             How to fetch news from a @code{cron} job.
17253 * Agent Caveats::               What you think it'll do and what it does.
17254 @end menu
17255
17256
17257 @node Agent Basics
17258 @subsection Agent Basics
17259
17260 First, let's get some terminology out of the way.
17261
17262 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17263 connection to the net (and notified the Agent that this is the case).
17264 When the connection to the net is up again (and Gnus knows this), the
17265 Agent is @dfn{plugged}.
17266
17267 The @dfn{local} machine is the one you're running on, and which isn't
17268 connected to the net continuously.
17269
17270 @dfn{Downloading} means fetching things from the net to your local
17271 machine.  @dfn{Uploading} is doing the opposite.
17272
17273 You know that Gnus gives you all the opportunity you'd ever want for
17274 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17275 is also customizable to a great extent, which means that the user has a
17276 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17277 you in your foot, but with Gnus, you have a choice!
17278
17279 Gnus is never really in plugged or unplugged state.  Rather, it applies
17280 that state to each server individually.  This means that some servers
17281 can be plugged while others can be unplugged.  Additionally, some
17282 servers can be ignored by the Agent altogether (which means that
17283 they're kinda like plugged always).
17284
17285 So when you unplug the Agent and then wonder why is Gnus opening a
17286 connection to the Net, the next step to do is to look whether all
17287 servers are agentized.  If there is an unagentized server, you found
17288 the culprit.
17289
17290 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17291 reachable.  When Gnus notices this, it asks you whether you want the
17292 server to be switched to offline state.  If you say yes, then the
17293 server will behave somewhat as if it was unplugged, except that Gnus
17294 will ask you whether you want to switch it back online again.
17295
17296 Let's take a typical Gnus session using the Agent.
17297
17298 @itemize @bullet
17299
17300 @item
17301 @findex gnus-unplugged
17302 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17303 Agent in a disconnected state.  You can read all the news that you have
17304 already fetched while in this mode.
17305
17306 @item
17307 You then decide to see whether any new news has arrived.  You connect
17308 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17309 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17310 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
17311 Source Specifiers}).
17312
17313 @item
17314 You can then read the new news immediately, or you can download the news
17315 onto your local machine.  If you want to do the latter, you press @kbd{g}
17316 to check if there are any new news and then @kbd{J
17317 s} to fetch all the eligible articles in all the groups.  (To let Gnus
17318 know which articles you want to download, @pxref{Agent Categories}.)
17319
17320 @item
17321 After fetching the articles, you press @kbd{J j} to make Gnus become
17322 unplugged again, and you shut down the PPP thing (or whatever).  And
17323 then you read the news offline.
17324
17325 @item
17326 And then you go to step 2.
17327 @end itemize
17328
17329 Here are some things you should do the first time (or so) that you use
17330 the Agent.
17331
17332 @itemize @bullet
17333
17334 @item
17335 Decide which servers should be covered by the Agent.  If you have a mail
17336 back end, it would probably be nonsensical to have it covered by the
17337 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17338 @kbd{J a} on the server (or servers) that you wish to have covered by the
17339 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17340 added servers you do not wish to have covered by the Agent.  By default,
17341 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17342 @code{gnus-secondary-select-methods} are agentized.
17343
17344 @item
17345 Decide on download policy.  It's fairly simple once you decide whether
17346 you are going to use agent categories, topic parameters, and/or group
17347 parameters to implement your policy.  If you're new to gnus, it
17348 is probably best to start with a category @xref{Agent Categories}.
17349
17350 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17351 (@pxref{Agent Categories}) provide for setting a policy that applies
17352 to multiple groups.  Which you use is entirely up to you.  Topic
17353 parameters do override categories so, if you mix the two, you'll have
17354 to take that into account.  If you have a few groups that deviate from
17355 your policy, you can use group parameters (@pxref{Group Parameters}) to
17356 configure them.
17357
17358 @item
17359 Uhm@dots{} that's it.
17360 @end itemize
17361
17362
17363 @node Agent Categories
17364 @subsection Agent Categories
17365
17366 One of the main reasons to integrate the news transport layer into the
17367 newsreader is to allow greater control over what articles to download.
17368 There's not much point in downloading huge amounts of articles, just to
17369 find out that you're not interested in reading any of them.  It's better
17370 to be somewhat more conservative in choosing what to download, and then
17371 mark the articles for downloading manually if it should turn out that
17372 you're interested in the articles anyway.
17373
17374 One of the more effective methods for controlling what is to be
17375 downloaded is to create a @dfn{category} and then assign some (or all)
17376 groups to this category.  Groups that do not belong in any other
17377 category belong to the @code{default} category.  Gnus has its own
17378 buffer for creating and managing categories.
17379
17380 If you prefer, you can also use group parameters (@pxref{Group
17381 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17382 alternative approach to controlling the agent.  The only real
17383 difference is that categories are specific to the agent (so there is
17384 less to learn) while group and topic parameters include the kitchen
17385 sink.
17386
17387 Since you can set agent parameters in several different places we have
17388 a rule to decide which source to believe.  This rule specifies that
17389 the parameter sources are checked in the following order: group
17390 parameters, topic parameters, agent category, and finally customizable
17391 variables. So you can mix all of these sources to produce a wide range
17392 of behavior, just don't blame me if you don't remember where you put
17393 your settings.
17394
17395 @menu
17396 * Category Syntax::             What a category looks like.
17397 * Category Buffer::             A buffer for maintaining categories.
17398 * Category Variables::          Customize'r'Us.
17399 @end menu
17400
17401
17402 @node Category Syntax
17403 @subsubsection Category Syntax
17404
17405 A category consists of a name, the list of groups belonging to the
17406 category, and a number of optional parameters that override the
17407 customizable variables.  The complete list of agent parameters are
17408 listed below.
17409
17410 @table @code
17411 @item gnus-agent-cat-name
17412 The name of the category.
17413
17414 @item gnus-agent-cat-groups
17415 The list of groups that are in this category.
17416
17417 @item gnus-agent-cat-predicate
17418 A predicate which (generally) gives a rough outline of which articles
17419 are eligible for downloading; and
17420
17421 @item gnus-agent-cat-score-file
17422 a score rule which (generally) gives you a finer granularity when
17423 deciding what articles to download.  (Note that this @dfn{download
17424 score} is not necessarily related to normal scores.)
17425
17426 @item gnus-agent-cat-enable-expiration
17427 a boolean indicating whether the agent should expire old articles in
17428 this group.  Most groups should be expired to conserve disk space.  In
17429 fact, its probably safe to say that the gnus.* hierarchy contains the
17430 only groups that should not be expired.
17431
17432 @item gnus-agent-cat-days-until-old
17433 an integer indicating the number of days that the agent should wait
17434 before deciding that a read article is safe to expire.
17435
17436 @item gnus-agent-cat-low-score
17437 an integer that overrides the value of @code{gnus-agent-low-score}.
17438
17439 @item gnus-agent-cat-high-score
17440 an integer that overrides the value of @code{gnus-agent-high-score}.
17441
17442 @item gnus-agent-cat-length-when-short
17443 an integer that overrides the value of
17444 @code{gnus-agent-short-article}.
17445
17446 @item gnus-agent-cat-length-when-long
17447 an integer that overrides the value of @code{gnus-agent-long-article}.
17448 @end table
17449
17450 The name of a category can not be changed once the category has been
17451 created.
17452
17453 Each category maintains a list of groups that are exclusive members of
17454 that category.  The exclusivity rule is automatically enforced, add a
17455 group to a new category and it is automatically removed from its old
17456 category.
17457
17458 A predicate in its simplest form can be a single predicate such as
17459 @code{true} or @code{false}.  These two will download every available
17460 article or nothing respectively.  In the case of these two special
17461 predicates an additional score rule is superfluous.
17462
17463 Predicates of @code{high} or @code{low} download articles in respect of
17464 their scores in relationship to @code{gnus-agent-high-score} and
17465 @code{gnus-agent-low-score} as described below.
17466
17467 To gain even finer control of what is to be regarded eligible for
17468 download a predicate can consist of a number of predicates with logical
17469 operators sprinkled in between.
17470
17471 Perhaps some examples are in order.
17472
17473 Here's a simple predicate.  (It's the default predicate, in fact, used
17474 for all groups that don't belong to any other category.)
17475
17476 @lisp
17477 short
17478 @end lisp
17479
17480 Quite simple, eh?  This predicate is true if and only if the article is
17481 short (for some value of ``short'').
17482
17483 Here's a more complex predicate:
17484
17485 @lisp
17486 (or high
17487     (and
17488      (not low)
17489      (not long)))
17490 @end lisp
17491
17492 This means that an article should be downloaded if it has a high score,
17493 or if the score is not low and the article is not long.  You get the
17494 drift.
17495
17496 The available logical operators are @code{or}, @code{and} and
17497 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17498 @samp{|}, @code{&} and @code{!} instead.)
17499
17500 The following predicates are pre-defined, but if none of these fit what
17501 you want to do, you can write your own.
17502
17503 When evaluating each of these predicates, the named constant will be
17504 bound to the value determined by calling
17505 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17506 example, gnus-agent-short-article will be bound to
17507 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17508 means that you can specify a predicate in your category then tune that
17509 predicate to individual groups.
17510
17511 @table @code
17512 @item short
17513 True iff the article is shorter than @code{gnus-agent-short-article}
17514 lines; default 100.
17515
17516 @item long
17517 True iff the article is longer than @code{gnus-agent-long-article}
17518 lines; default 200.
17519
17520 @item low
17521 True iff the article has a download score less than
17522 @code{gnus-agent-low-score}; default 0.
17523
17524 @item high
17525 True iff the article has a download score greater than
17526 @code{gnus-agent-high-score}; default 0.
17527
17528 @item spam
17529 True iff the Gnus Agent guesses that the article is spam.  The
17530 heuristics may change over time, but at present it just computes a
17531 checksum and sees whether articles match.
17532
17533 @item true
17534 Always true.
17535
17536 @item false
17537 Always false.
17538 @end table
17539
17540 If you want to create your own predicate function, here's what you have
17541 to know:  The functions are called with no parameters, but the
17542 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17543 useful values.
17544
17545 For example, you could decide that you don't want to download articles
17546 that were posted more than a certain number of days ago (e.g. posted
17547 more than @code{gnus-agent-expire-days} ago) you might write a function
17548 something along the lines of the following:
17549
17550 @lisp
17551 (defun my-article-old-p ()
17552   "Say whether an article is old."
17553   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17554      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17555 @end lisp
17556
17557 with the predicate then defined as:
17558
17559 @lisp
17560 (not my-article-old-p)
17561 @end lisp
17562
17563 or you could append your predicate to the predefined
17564 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17565 wherever.
17566
17567 @lisp
17568 (require 'gnus-agent)
17569 (setq  gnus-category-predicate-alist
17570   (append gnus-category-predicate-alist
17571          '((old . my-article-old-p))))
17572 @end lisp
17573
17574 and simply specify your predicate as:
17575
17576 @lisp
17577 (not old)
17578 @end lisp
17579
17580 If/when using something like the above, be aware that there are many
17581 misconfigured systems/mailers out there and so an article's date is not
17582 always a reliable indication of when it was posted.  Hell, some people
17583 just don't give a damn.
17584
17585 The above predicates apply to @emph{all} the groups which belong to the
17586 category.  However, if you wish to have a specific predicate for an
17587 individual group within a category, or you're just too lazy to set up a
17588 new category, you can enter a group's individual predicate in it's group
17589 parameters like so:
17590
17591 @lisp
17592 (agent-predicate . short)
17593 @end lisp
17594
17595 This is the group/topic parameter equivalent of the agent category default.
17596 Note that when specifying a single word predicate like this, the
17597 @code{agent-predicate} specification must be in dotted pair notation.
17598
17599 The equivalent of the longer example from above would be:
17600
17601 @lisp
17602 (agent-predicate or high (and (not low) (not long)))
17603 @end lisp
17604
17605 The outer parenthesis required in the category specification are not
17606 entered here as, not being in dotted pair notation, the value of the
17607 predicate is assumed to be a list.
17608
17609
17610 Now, the syntax of the download score is the same as the syntax of
17611 normal score files, except that all elements that require actually
17612 seeing the article itself are verboten.  This means that only the
17613 following headers can be scored on: @code{Subject}, @code{From},
17614 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17615 @code{Lines}, and @code{Xref}.
17616
17617 As with predicates, the specification of the @code{download score rule}
17618 to use in respect of a group can be in either the category definition if
17619 it's to be applicable to all groups in therein, or a group's parameters
17620 if it's to be specific to that group.
17621
17622 In both of these places the @code{download score rule} can take one of
17623 three forms:
17624
17625 @enumerate
17626 @item
17627 Score rule
17628
17629 This has the same syntax as a normal gnus score file except only a
17630 subset of scoring keywords are available as mentioned above.
17631
17632 example:
17633
17634 @itemize @bullet
17635 @item
17636 Category specification
17637
17638 @lisp
17639 (("from"
17640        ("Lars Ingebrigtsen" 1000000 nil s))
17641 ("lines"
17642        (500 -100 nil <)))
17643 @end lisp
17644
17645 @item
17646 Group/Topic Parameter specification
17647
17648 @lisp
17649 (agent-score ("from"
17650                    ("Lars Ingebrigtsen" 1000000 nil s))
17651              ("lines"
17652                    (500 -100 nil <)))
17653 @end lisp
17654
17655 Again, note the omission of the outermost parenthesis here.
17656 @end itemize
17657
17658 @item
17659 Agent score file
17660
17661 These score files must @emph{only} contain the permitted scoring
17662 keywords stated above.
17663
17664 example:
17665
17666 @itemize @bullet
17667 @item
17668 Category specification
17669
17670 @lisp
17671 ("~/News/agent.SCORE")
17672 @end lisp
17673
17674 or perhaps
17675
17676 @lisp
17677 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17678 @end lisp
17679
17680 @item
17681 Group Parameter specification
17682
17683 @lisp
17684 (agent-score "~/News/agent.SCORE")
17685 @end lisp
17686
17687 Additional score files can be specified as above.  Need I say anything
17688 about parenthesis?
17689 @end itemize
17690
17691 @item
17692 Use @code{normal} score files
17693
17694 If you don't want to maintain two sets of scoring rules for a group, and
17695 your desired @code{downloading} criteria for a group are the same as your
17696 @code{reading} criteria then you can tell the agent to refer to your
17697 @code{normal} score files when deciding what to download.
17698
17699 These directives in either the category definition or a group's
17700 parameters will cause the agent to read in all the applicable score
17701 files for a group, @emph{filtering out} those sections that do not
17702 relate to one of the permitted subset of scoring keywords.
17703
17704 @itemize @bullet
17705 @item
17706 Category Specification
17707
17708 @lisp
17709 file
17710 @end lisp
17711
17712 @item
17713 Group Parameter specification
17714
17715 @lisp
17716 (agent-score . file)
17717 @end lisp
17718 @end itemize
17719 @end enumerate
17720
17721 @node Category Buffer
17722 @subsubsection Category Buffer
17723
17724 You'd normally do all category maintenance from the category buffer.
17725 When you enter it for the first time (with the @kbd{J c} command from
17726 the group buffer), you'll only see the @code{default} category.
17727
17728 The following commands are available in this buffer:
17729
17730 @table @kbd
17731 @item q
17732 @kindex q (Category)
17733 @findex gnus-category-exit
17734 Return to the group buffer (@code{gnus-category-exit}).
17735
17736 @item e
17737 @kindex e (Category)
17738 @findex gnus-category-customize-category
17739 Use a customization buffer to set all of the selected category's
17740 parameters at one time (@code{gnus-category-customize-category}).
17741
17742 @item k
17743 @kindex k (Category)
17744 @findex gnus-category-kill
17745 Kill the current category (@code{gnus-category-kill}).
17746
17747 @item c
17748 @kindex c (Category)
17749 @findex gnus-category-copy
17750 Copy the current category (@code{gnus-category-copy}).
17751
17752 @item a
17753 @kindex a (Category)
17754 @findex gnus-category-add
17755 Add a new category (@code{gnus-category-add}).
17756
17757 @item p
17758 @kindex p (Category)
17759 @findex gnus-category-edit-predicate
17760 Edit the predicate of the current category
17761 (@code{gnus-category-edit-predicate}).
17762
17763 @item g
17764 @kindex g (Category)
17765 @findex gnus-category-edit-groups
17766 Edit the list of groups belonging to the current category
17767 (@code{gnus-category-edit-groups}).
17768
17769 @item s
17770 @kindex s (Category)
17771 @findex gnus-category-edit-score
17772 Edit the download score rule of the current category
17773 (@code{gnus-category-edit-score}).
17774
17775 @item l
17776 @kindex l (Category)
17777 @findex gnus-category-list
17778 List all the categories (@code{gnus-category-list}).
17779 @end table
17780
17781
17782 @node Category Variables
17783 @subsubsection Category Variables
17784
17785 @table @code
17786 @item gnus-category-mode-hook
17787 @vindex gnus-category-mode-hook
17788 Hook run in category buffers.
17789
17790 @item gnus-category-line-format
17791 @vindex gnus-category-line-format
17792 Format of the lines in the category buffer (@pxref{Formatting
17793 Variables}).  Valid elements are:
17794
17795 @table @samp
17796 @item c
17797 The name of the category.
17798
17799 @item g
17800 The number of groups in the category.
17801 @end table
17802
17803 @item gnus-category-mode-line-format
17804 @vindex gnus-category-mode-line-format
17805 Format of the category mode line (@pxref{Mode Line Formatting}).
17806
17807 @item gnus-agent-short-article
17808 @vindex gnus-agent-short-article
17809 Articles that have fewer lines than this are short.  Default 100.
17810
17811 @item gnus-agent-long-article
17812 @vindex gnus-agent-long-article
17813 Articles that have more lines than this are long.  Default 200.
17814
17815 @item gnus-agent-low-score
17816 @vindex gnus-agent-low-score
17817 Articles that have a score lower than this have a low score.  Default
17818 0.
17819
17820 @item gnus-agent-high-score
17821 @vindex gnus-agent-high-score
17822 Articles that have a score higher than this have a high score.  Default
17823 0.
17824
17825 @item gnus-agent-expire-days
17826 @vindex gnus-agent-expire-days
17827 The number of days that a @samp{read} article must stay in the agent's
17828 local disk before becoming eligible for expiration (While the name is
17829 the same, this doesn't mean expiring the article on the server.  It
17830 just means deleting the local copy of the article).  What is also
17831 important to understand is that the counter starts with the time the
17832 article was written to the local disk and not the time the article was
17833 read.
17834 Default 7.
17835
17836 @item gnus-agent-enable-expiration
17837 @vindex gnus-agent-enable-expiration
17838 Determines whether articles in a group are, by default, expired or
17839 retained indefinitely.  The default is @code{ENABLE} which means that
17840 you'll have to disable expiration when desired.  On the other hand,
17841 you could set this to @code{DISABLE}.  In that case, you would then
17842 have to enable expiration in selected groups.
17843
17844 @end table
17845
17846
17847 @node Agent Commands
17848 @subsection Agent Commands
17849 @findex gnus-agent-toggle-plugged
17850 @kindex J j (Agent)
17851
17852 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17853 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17854 toggles the plugged/unplugged state of the Gnus Agent.
17855
17856
17857 @menu
17858 * Group Agent Commands::        Configure groups and fetch their contents.
17859 * Summary Agent Commands::      Manually select then fetch specific articles.
17860 * Server Agent Commands::       Select the servers that are supported by the agent.
17861 @end menu
17862
17863
17864
17865
17866 @node Group Agent Commands
17867 @subsubsection Group Agent Commands
17868
17869 @table @kbd
17870 @item J u
17871 @kindex J u (Agent Group)
17872 @findex gnus-agent-fetch-groups
17873 Fetch all eligible articles in the current group
17874 (@code{gnus-agent-fetch-groups}).
17875
17876 @item J c
17877 @kindex J c (Agent Group)
17878 @findex gnus-enter-category-buffer
17879 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17880
17881 @item J s
17882 @kindex J s (Agent Group)
17883 @findex gnus-agent-fetch-session
17884 Fetch all eligible articles in all groups
17885 (@code{gnus-agent-fetch-session}).
17886
17887 @item J S
17888 @kindex J S (Agent Group)
17889 @findex gnus-group-send-queue
17890 Send all sendable messages in the queue group
17891 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17892
17893 @item J a
17894 @kindex J a (Agent Group)
17895 @findex gnus-agent-add-group
17896 Add the current group to an Agent category
17897 (@code{gnus-agent-add-group}).  This command understands the
17898 process/prefix convention (@pxref{Process/Prefix}).
17899
17900 @item J r
17901 @kindex J r (Agent Group)
17902 @findex gnus-agent-remove-group
17903 Remove the current group from its category, if any
17904 (@code{gnus-agent-remove-group}).  This command understands the
17905 process/prefix convention (@pxref{Process/Prefix}).
17906
17907 @item J Y
17908 @kindex J Y (Agent Group)
17909 @findex gnus-agent-synchronize-flags
17910 Synchronize flags changed while unplugged with remote server, if any.
17911
17912
17913 @end table
17914
17915
17916 @node Summary Agent Commands
17917 @subsubsection Summary Agent Commands
17918
17919 @table @kbd
17920 @item J #
17921 @kindex J # (Agent Summary)
17922 @findex gnus-agent-mark-article
17923 Mark the article for downloading (@code{gnus-agent-mark-article}).
17924
17925 @item J M-#
17926 @kindex J M-# (Agent Summary)
17927 @findex gnus-agent-unmark-article
17928 Remove the downloading mark from the article
17929 (@code{gnus-agent-unmark-article}).
17930
17931 @cindex %
17932 @item @@
17933 @kindex @@ (Agent Summary)
17934 @findex gnus-agent-toggle-mark
17935 Toggle whether to download the article
17936 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17937 default. 
17938
17939 @item J c
17940 @kindex J c (Agent Summary)
17941 @findex gnus-agent-catchup
17942 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17943
17944 @item J S
17945 @kindex J S (Agent Summary)
17946 @findex gnus-agent-fetch-group
17947 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17948 (@code{gnus-agent-fetch-group}).
17949
17950 @item J s
17951 @kindex J s (Agent Summary)
17952 @findex gnus-agent-fetch-series
17953 Download all processable articles in this group.
17954 (@code{gnus-agent-fetch-series}).
17955
17956 @item J u
17957 @kindex J u (Agent Summary)
17958 @findex gnus-agent-summary-fetch-group
17959 Download all downloadable articles in the current group
17960 (@code{gnus-agent-summary-fetch-group}).
17961
17962 @end table
17963
17964
17965 @node Server Agent Commands
17966 @subsubsection Server Agent Commands
17967
17968 @table @kbd
17969 @item J a
17970 @kindex J a (Agent Server)
17971 @findex gnus-agent-add-server
17972 Add the current server to the list of servers covered by the Gnus Agent
17973 (@code{gnus-agent-add-server}).
17974
17975 @item J r
17976 @kindex J r (Agent Server)
17977 @findex gnus-agent-remove-server
17978 Remove the current server from the list of servers covered by the Gnus
17979 Agent (@code{gnus-agent-remove-server}).
17980
17981 @end table
17982
17983
17984 @node Agent Visuals
17985 @subsection Agent Visuals
17986
17987 If you open a summary while unplugged and, Gnus knows from the group's
17988 active range that there are more articles than the headers currently
17989 stored in the Agent, you may see some articles whose subject looks
17990 something like @samp{[Undownloaded article #####]}.  These are
17991 placeholders for the missing headers.  Aside from setting a mark,
17992 there is not much that can be done with one of these placeholders.
17993 When Gnus finally gets a chance to fetch the group's headers, the
17994 placeholders will automatically be replaced by the actual headers.
17995 You can configure the summary buffer's maneuvering to skip over the
17996 placeholders if you care (See @code{gnus-auto-goto-ignores}).
17997
17998 While it may be obvious to all, the only headers and articles
17999 available while unplugged are those headers and articles that were
18000 fetched into the Agent while previously plugged.  To put it another
18001 way, "If you forget to fetch something while plugged, you might have a
18002 less than satisfying unplugged session".  For this reason, the Agent
18003 adds two visual effects to your summary buffer.  These effects display
18004 the download status of each article so that you always know which
18005 articles will be available when unplugged.
18006
18007 The first visual effect is the @samp{%O} spec.  If you customize
18008 gnus-summary-line-format to include this specifier, you will add a
18009 single character field that indicates an article's download status.
18010 Articles that have been fetched into either the Agent or the Cache,
18011 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18012 other articles will display @code{gnus-undownloaded-mark} (defaults to
18013 @samp{-}).  If you open a group that has not been agentized, a space
18014 (@samp{ }) will be displayed.
18015
18016 The second visual effect are the undownloaded faces.  The faces, there
18017 are three indicating the article's score (low, normal, high), seem to
18018 result in a love/hate response from many Gnus users.  The problem is
18019 that the face selection is controlled by a list of condition tests and
18020 face names (See @code{gnus-summary-highlight}).  Each condition is
18021 tested in the order in which it appears in the list so early
18022 conditions have precedence over later conditions.  All of this means
18023 that, if you tick an undownloaded article, the article will continue
18024 to be displayed in the undownloaded face rather than the ticked face.
18025
18026 If you use the Agent as a cache (to avoid downloading the same article
18027 each time you visit it or to minimize your connection time), the
18028 undownloaded face will probably seem like a good idea.  The reason
18029 being that you do all of our work (marking, reading, deleting) with
18030 downloaded articles so the normal faces always appear.
18031
18032 For occasional Agent users, the undownloaded faces may appear to be an
18033 absolutely horrible idea.  The issue being that, since most of their
18034 articles have not been fetched into the Agent, most of the normal
18035 faces will be obscured by the undownloaded faces.  If this is your
18036 situation, you have two choices available.  First, you can completely
18037 disable the undownload faces by customizing
18038 @code{gnus-summary-highlight} to delete the three cons-cells that
18039 refer to the gnus-summary*-undownloaded-face faces.  Second, if you
18040 prefer to take a more fine-grained approach, you may set the
18041 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18042 parameter, like all other agent parameters, may be set on an Agent
18043 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18044 Parameters}), or an individual group (@pxref{Group Parameters}).
18045
18046 @node Agent as Cache
18047 @subsection Agent as Cache
18048
18049 When Gnus is plugged, it is not efficient to download headers or
18050 articles from the server again, if they are already stored in the
18051 Agent.  So, Gnus normally only downloads headers once, and stores them
18052 in the Agent.  These headers are later used when generating the summary
18053 buffer, regardless of whether you are plugged or unplugged.  Articles
18054 are not cached in the Agent by default though (that would potentially
18055 consume lots of disk space), but if you have already downloaded an
18056 article into the Agent, Gnus will not download the article from the
18057 server again but use the locally stored copy instead.
18058
18059 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18060 @pxref{Agent Variables}) to always download headers and articles while
18061 plugged.  Gnus will almost certainly be slower, but it will be kept
18062 synchronized with the server.  That last point probably won't make any
18063 sense if you are using a nntp or nnimap back end.
18064
18065 @node Agent Expiry
18066 @subsection Agent Expiry
18067
18068 @vindex gnus-agent-expire-days
18069 @findex gnus-agent-expire
18070 @kindex M-x gnus-agent-expire
18071 @kindex M-x gnus-agent-expire-group
18072 @findex gnus-agent-expire-group
18073 @cindex agent expiry
18074 @cindex Gnus agent expiry
18075 @cindex expiry
18076
18077 The Agent back end, @code{nnagent}, doesn't handle expiry. Well, at
18078 least it doesn't handle it like other back ends.  Instead, there are
18079 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18080 commands that will expire all read articles that are older than
18081 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18082 that you're running out of space.  Neither are particularly fast or
18083 efficient, and it's not a particularly good idea to interrupt them (with
18084 @kbd{C-g} or anything else) once you've started one of them.
18085
18086 Note that other functions, e.g. @code{gnus-request-expire-articles},
18087 might run @code{gnus-agent-expire} for you to keep the agent 
18088 synchronized with the group.
18089
18090 The agent parameter @code{agent-enable-expiration} may be used to
18091 prevent expiration in selected groups.
18092
18093 @vindex gnus-agent-expire-all
18094 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18095 expiration commands will expire all articles---unread, read, ticked
18096 and dormant.  If @code{nil} (which is the default), only read articles
18097 are eligible for expiry, and unread, ticked and dormant articles will
18098 be kept indefinitely.
18099
18100 If you find that some articles eligible for expiry are never expired,
18101 perhaps some Gnus Agent files are corrupted.  There's are special
18102 commands, @code{gnus-agent-regenerate} and
18103 @code{gnus-agent-regenerate-group}, to fix possible problems.
18104
18105 @node Agent Regeneration
18106 @subsection Agent Regeneration
18107
18108 @cindex agent regeneration
18109 @cindex Gnus agent regeneration
18110 @cindex regeneration
18111
18112 The local data structures used by @code{nnagent} may become corrupted
18113 due to certain exceptional conditions.  When this happens,
18114 @code{nnagent} functionality may degrade or even fail.  The solution
18115 to this problem is to repair the local data structures by removing all
18116 internal inconsistencies.
18117
18118 For example, if your connection to your server is lost while
18119 downloaded articles into the agent, the local data structures will not
18120 know about articles successfully downloaded prior to the connection
18121 failure.  Running @code{gnus-agent-regenerate} or
18122 @code{gnus-agent-regenerate-group} will update the data structures
18123 such that you don't need to download these articles a second time.
18124
18125 @findex gnus-agent-regenerate
18126 @kindex M-x gnus-agent-regenerate
18127 The command @code{gnus-agent-regenerate} will perform
18128 @code{gnus-agent-regenerate-group} on every agentized group.  While
18129 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18130 recommended that you first close all summary buffers.
18131
18132 @findex gnus-agent-regenerate-group
18133 @kindex M-x gnus-agent-regenerate-group
18134 The command @code{gnus-agent-regenerate-group} uses the local copies
18135 of individual articles to repair the local @acronym{NOV}(header) database.  It
18136 then updates the internal data structures that document which articles
18137 are stored locally.  An optional argument will mark articles in the
18138 agent as unread.
18139
18140 @node Agent and IMAP
18141 @subsection Agent and IMAP
18142
18143 The Agent works with any Gnus back end, including nnimap.  However,
18144 since there are some conceptual differences between @acronym{NNTP} and
18145 @acronym{IMAP}, this section (should) provide you with some information to
18146 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18147
18148 The first thing to keep in mind is that all flags (read, ticked, etc)
18149 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18150 case for nntp.  Thus Gnus need to remember flag changes when
18151 disconnected, and synchronize these flags when you plug back in.
18152
18153 Gnus keeps track of flag changes when reading nnimap groups under the
18154 Agent.  When you plug back in, Gnus will check if you have any changed
18155 any flags and ask if you wish to synchronize these with the server.
18156 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18157
18158 @vindex gnus-agent-synchronize-flags
18159 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18160 never automatically synchronize flags.  If it is @code{ask}, which is
18161 the default, the Agent will check if you made any changes and if so
18162 ask if you wish to synchronize these when you re-connect.  If it has
18163 any other value, all flags will be synchronized automatically.
18164
18165 If you do not wish to synchronize flags automatically when you
18166 re-connect, you can do it manually with the
18167 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18168 in the group buffer.
18169
18170 Some things are currently not implemented in the Agent that you'd might
18171 expect from a disconnected @acronym{IMAP} client, including:
18172
18173 @itemize @bullet
18174
18175 @item
18176 Copying/moving articles into nnimap groups when unplugged.
18177
18178 @item
18179 Creating/deleting nnimap groups when unplugged.
18180
18181 @end itemize
18182
18183 Technical note: the synchronization algorithm does not work by ``pushing''
18184 all local flags to the server, but rather incrementally update the
18185 server view of flags by changing only those flags that were changed by
18186 the user.  Thus, if you set one flag on an article, quit the group and
18187 re-select the group and remove the flag; the flag will be set and
18188 removed from the server when you ``synchronize''.  The queued flag
18189 operations can be found in the per-server @code{flags} file in the Agent
18190 directory.  It's emptied when you synchronize flags.
18191
18192
18193 @node Outgoing Messages
18194 @subsection Outgoing Messages
18195
18196 When Gnus is unplugged, all outgoing messages (both mail and news) are
18197 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18198 them there after posting, and edit them at will.
18199
18200 When Gnus is plugged again, you can send the messages either from the
18201 draft group with the special commands available there, or you can use
18202 the @kbd{J S} command in the group buffer to send all the sendable
18203 messages in the draft group.
18204
18205
18206
18207 @node Agent Variables
18208 @subsection Agent Variables
18209
18210 @table @code
18211 @item gnus-agent-directory
18212 @vindex gnus-agent-directory
18213 Where the Gnus Agent will store its files.  The default is
18214 @file{~/News/agent/}.
18215
18216 @item gnus-agent-handle-level
18217 @vindex gnus-agent-handle-level
18218 Groups on levels (@pxref{Group Levels}) higher than this variable will
18219 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18220 which means that only subscribed group will be considered by the Agent
18221 by default.
18222
18223 @item gnus-agent-plugged-hook
18224 @vindex gnus-agent-plugged-hook
18225 Hook run when connecting to the network.
18226
18227 @item gnus-agent-unplugged-hook
18228 @vindex gnus-agent-unplugged-hook
18229 Hook run when disconnecting from the network.
18230
18231 @item gnus-agent-fetched-hook
18232 @vindex gnus-agent-fetched-hook
18233 Hook run when finished fetching articles.
18234
18235 @item gnus-agent-cache
18236 @vindex gnus-agent-cache
18237 Variable to control whether use the locally stored @acronym{NOV} and
18238 articles when plugged, e.g. essentially using the Agent as a cache.
18239 The default is non-@code{nil}, which means to use the Agent as a cache.
18240
18241 @item gnus-agent-go-online
18242 @vindex gnus-agent-go-online
18243 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18244 automatically switch offline servers into online status.  If it is
18245 @code{ask}, the default, the Agent will ask if you wish to switch
18246 offline servers into online status when you re-connect.  If it has any
18247 other value, all offline servers will be automatically switched into
18248 online status.
18249
18250 @item gnus-agent-mark-unread-after-downloaded
18251 @vindex gnus-agent-mark-unread-after-downloaded
18252 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18253 mark articles as unread after downloading.  This is usually a safe
18254 thing to do as the newly downloaded article has obviously not been
18255 read.  The default is t.
18256
18257 @item gnus-agent-consider-all-articles
18258 @vindex gnus-agent-consider-all-articles
18259 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18260 agent will fetch all missing headers.  When @code{nil}, the agent will
18261 fetch only new headers. The default is @code{nil}.
18262
18263 @item gnus-agent-max-fetch-size
18264 @vindex gnus-agent-max-fetch-size
18265 The agent fetches articles into a temporary buffer prior to parsing
18266 them into individual files.  To avoid exceeding the max. buffer size,
18267 the agent alternates between fetching and parsing until all articles
18268 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18269 limit to control how often the cycling occurs.  A large value improves
18270 performance.  A small value minimizes the time lost should the
18271 connection be lost while fetching (You may need to run
18272 @code{gnus-agent-regenerate-group} to update the group's state.
18273 However, all articles parsed prior to loosing the connection will be
18274 available while unplugged).  The default is 10M so it is unusual to
18275 see any cycling.
18276
18277 @item gnus-server-unopen-status
18278 @vindex gnus-server-unopen-status
18279 Perhaps not an Agent variable, but closely related to the Agent, this
18280 variable says what will happen if Gnus cannot open a server.  If the
18281 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18282 whether to deny the server or whether to unplug the agent.  If the
18283 Agent is disabled, Gnus always simply deny the server.  Other choices
18284 for this variable include @code{denied} and @code{offline} the latter
18285 is only valid if the Agent is used.
18286
18287 @item gnus-auto-goto-ignores
18288 @vindex gnus-auto-goto-ignores
18289 Another variable that isn't an Agent variable, yet so closely related
18290 that most will look for it here, this variable tells the summary
18291 buffer how to maneuver around undownloaded (only headers stored in the
18292 agent) and unfetched (neither article nor headers stored) articles.
18293
18294 The legal values are @code{nil} (maneuver to any article),
18295 @code{undownloaded} (maneuvering while unplugged ignores articles that
18296 have not been fetched), @code{always-undownloaded} (maneuvering always
18297 ignores articles that have not been fetched), @code{unfetched}
18298 (maneuvering ignores articles whose headers have not been fetched).
18299
18300 @end table
18301
18302
18303 @node Example Setup
18304 @subsection Example Setup
18305
18306 If you don't want to read this manual, and you have a fairly standard
18307 setup, you may be able to use something like the following as your
18308 @file{~/.gnus.el} file to get started.
18309
18310 @lisp
18311 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18312 ;;; @r{from your ISP's server.}
18313 (setq gnus-select-method '(nntp "news.your-isp.com"))
18314
18315 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18316 ;;; @r{your ISP's @acronym{POP} server.}
18317 (setq mail-sources '((pop :server "pop.your-isp.com")))
18318
18319 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18320 (setq gnus-secondary-select-methods '((nnml "")))
18321
18322 ;;; @r{Make Gnus into an offline newsreader.}
18323 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18324 ;;; (setq gnus-agent t) ; @r{Now the default.}
18325 @end lisp
18326
18327 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18328 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18329 gnus}.
18330
18331 If this is the first time you've run Gnus, you will be subscribed
18332 automatically to a few default newsgroups.  You'll probably want to
18333 subscribe to more groups, and to do that, you have to query the
18334 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18335 command.  This usually takes quite a while, but you only have to do it
18336 once.
18337
18338 After reading and parsing a while, you'll be presented with a list of
18339 groups.  Subscribe to the ones you want to read with the @kbd{u}
18340 command.  @kbd{l} to make all the killed groups disappear after you've
18341 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18342 back all the killed groups.)
18343
18344 You can now read the groups at once, or you can download the articles
18345 with the @kbd{J s} command.  And then read the rest of this manual to
18346 find out which of the other gazillion things you want to customize.
18347
18348
18349 @node Batching Agents
18350 @subsection Batching Agents
18351 @findex gnus-agent-batch
18352
18353 Having the Gnus Agent fetch articles (and post whatever messages you've
18354 written) is quite easy once you've gotten things set up properly.  The
18355 following shell script will do everything that is necessary:
18356
18357 You can run a complete batch command from the command line with the
18358 following incantation:
18359
18360 @example
18361 #!/bin/sh
18362 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18363 @end example
18364
18365
18366 @node Agent Caveats
18367 @subsection Agent Caveats
18368
18369 The Gnus Agent doesn't seem to work like most other offline
18370 newsreaders.  Here are some common questions that some imaginary people
18371 may ask:
18372
18373 @table @dfn
18374 @item If I read an article while plugged, do they get entered into the Agent?
18375
18376 @strong{No}.  If you want this behaviour, add
18377 @code{gnus-agent-fetch-selected-article} to
18378 @code{gnus-select-article-hook}.
18379
18380 @item If I read an article while plugged, and the article already exists in 
18381 the Agent, will it get downloaded once more?
18382
18383 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18384
18385 @end table
18386
18387 In short, when Gnus is unplugged, it only looks into the locally stored
18388 articles; when it's plugged, it talks to your ISP and may also use the
18389 locally stored articles.
18390
18391
18392 @node Scoring
18393 @chapter Scoring
18394 @cindex scoring
18395
18396 Other people use @dfn{kill files}, but we here at Gnus Towers like
18397 scoring better than killing, so we'd rather switch than fight.  They do
18398 something completely different as well, so sit up straight and pay
18399 attention!
18400
18401 @vindex gnus-summary-mark-below
18402 All articles have a default score (@code{gnus-summary-default-score}),
18403 which is 0 by default.  This score may be raised or lowered either
18404 interactively or by score files.  Articles that have a score lower than
18405 @code{gnus-summary-mark-below} are marked as read.
18406
18407 Gnus will read any @dfn{score files} that apply to the current group
18408 before generating the summary buffer.
18409
18410 There are several commands in the summary buffer that insert score
18411 entries based on the current article.  You can, for instance, ask Gnus to
18412 lower or increase the score of all articles with a certain subject.
18413
18414 There are two sorts of scoring entries: Permanent and temporary.
18415 Temporary score entries are self-expiring entries.  Any entries that are
18416 temporary and have not been used for, say, a week, will be removed
18417 silently to help keep the sizes of the score files down.
18418
18419 @menu
18420 * Summary Score Commands::      Adding score entries for the current group.
18421 * Group Score Commands::        General score commands.
18422 * Score Variables::             Customize your scoring.  (My, what terminology).
18423 * Score File Format::           What a score file may contain.
18424 * Score File Editing::          You can edit score files by hand as well.
18425 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18426 * Home Score File::             How to say where new score entries are to go.
18427 * Followups To Yourself::       Having Gnus notice when people answer you.
18428 * Scoring On Other Headers::    Scoring on non-standard headers.
18429 * Scoring Tips::                How to score effectively.
18430 * Reverse Scoring::             That problem child of old is not problem.
18431 * Global Score Files::          Earth-spanning, ear-splitting score files.
18432 * Kill Files::                  They are still here, but they can be ignored.
18433 * Converting Kill Files::       Translating kill files to score files.
18434 * GroupLens::                   Getting predictions on what you like to read.
18435 * Advanced Scoring::            Using logical expressions to build score rules.
18436 * Score Decays::                It can be useful to let scores wither away.
18437 @end menu
18438
18439
18440 @node Summary Score Commands
18441 @section Summary Score Commands
18442 @cindex score commands
18443
18444 The score commands that alter score entries do not actually modify real
18445 score files.  That would be too inefficient.  Gnus maintains a cache of
18446 previously loaded score files, one of which is considered the
18447 @dfn{current score file alist}.  The score commands simply insert
18448 entries into this list, and upon group exit, this list is saved.
18449
18450 The current score file is by default the group's local score file, even
18451 if no such score file actually exists.  To insert score commands into
18452 some other score file (e.g. @file{all.SCORE}), you must first make this
18453 score file the current one.
18454
18455 General score commands that don't actually change the score file:
18456
18457 @table @kbd
18458
18459 @item V s
18460 @kindex V s (Summary)
18461 @findex gnus-summary-set-score
18462 Set the score of the current article (@code{gnus-summary-set-score}).
18463
18464 @item V S
18465 @kindex V S (Summary)
18466 @findex gnus-summary-current-score
18467 Display the score of the current article
18468 (@code{gnus-summary-current-score}).
18469
18470 @item V t
18471 @kindex V t (Summary)
18472 @findex gnus-score-find-trace
18473 Display all score rules that have been used on the current article
18474 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18475 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18476 When point is on a string within the match element, @kbd{e} will try to
18477 bring you to this string in the score file.
18478
18479 @item V w
18480 @kindex V w (Summary)
18481 @findex gnus-score-find-favourite-words
18482 List words used in scoring (@code{gnus-score-find-favourite-words}).
18483
18484 @item V R
18485 @kindex V R (Summary)
18486 @findex gnus-summary-rescore
18487 Run the current summary through the scoring process
18488 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18489 around with your score files behind Gnus' back and want to see the
18490 effect you're having.
18491
18492 @item V c
18493 @kindex V c (Summary)
18494 @findex gnus-score-change-score-file
18495 Make a different score file the current
18496 (@code{gnus-score-change-score-file}).
18497
18498 @item V e
18499 @kindex V e (Summary)
18500 @findex gnus-score-edit-current-scores
18501 Edit the current score file (@code{gnus-score-edit-current-scores}).
18502 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18503 File Editing}).
18504
18505 @item V f
18506 @kindex V f (Summary)
18507 @findex gnus-score-edit-file
18508 Edit a score file and make this score file the current one
18509 (@code{gnus-score-edit-file}).
18510
18511 @item V F
18512 @kindex V F (Summary)
18513 @findex gnus-score-flush-cache
18514 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18515 after editing score files.
18516
18517 @item V C
18518 @kindex V C (Summary)
18519 @findex gnus-score-customize
18520 Customize a score file in a visually pleasing manner
18521 (@code{gnus-score-customize}).
18522
18523 @end table
18524
18525 The rest of these commands modify the local score file.
18526
18527 @table @kbd
18528
18529 @item V m
18530 @kindex V m (Summary)
18531 @findex gnus-score-set-mark-below
18532 Prompt for a score, and mark all articles with a score below this as
18533 read (@code{gnus-score-set-mark-below}).
18534
18535 @item V x
18536 @kindex V x (Summary)
18537 @findex gnus-score-set-expunge-below
18538 Prompt for a score, and add a score rule to the current score file to
18539 expunge all articles below this score
18540 (@code{gnus-score-set-expunge-below}).
18541 @end table
18542
18543 The keystrokes for actually making score entries follow a very regular
18544 pattern, so there's no need to list all the commands.  (Hundreds of
18545 them.)
18546
18547 @findex gnus-summary-increase-score
18548 @findex gnus-summary-lower-score
18549
18550 @enumerate
18551 @item
18552 The first key is either @kbd{I} (upper case i) for increasing the score
18553 or @kbd{L} for lowering the score.
18554 @item
18555 The second key says what header you want to score on.  The following
18556 keys are available:
18557 @table @kbd
18558
18559 @item a
18560 Score on the author name.
18561
18562 @item s
18563 Score on the subject line.
18564
18565 @item x
18566 Score on the @code{Xref} line---i.e., the cross-posting line.
18567
18568 @item r
18569 Score on the @code{References} line.
18570
18571 @item d
18572 Score on the date.
18573
18574 @item l
18575 Score on the number of lines.
18576
18577 @item i
18578 Score on the @code{Message-ID} header.
18579
18580 @item e
18581 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18582 if your @acronym{NNTP} server tracks additional header data in overviews.
18583
18584 @item f
18585 Score on followups---this matches the author name, and adds scores to
18586 the followups to this author.  (Using this key leads to the creation of
18587 @file{ADAPT} files.)
18588
18589 @item b
18590 Score on the body.
18591
18592 @item h
18593 Score on the head.
18594
18595 @item t
18596 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18597 files.)
18598
18599 @end table
18600
18601 @item
18602 The third key is the match type.  Which match types are valid depends on
18603 what headers you are scoring on.
18604
18605 @table @code
18606
18607 @item strings
18608
18609 @table @kbd
18610
18611 @item e
18612 Exact matching.
18613
18614 @item s
18615 Substring matching.
18616
18617 @item f
18618 Fuzzy matching (@pxref{Fuzzy Matching}).
18619
18620 @item r
18621 Regexp matching
18622 @end table
18623
18624 @item date
18625 @table @kbd
18626
18627 @item b
18628 Before date.
18629
18630 @item a
18631 After date.
18632
18633 @item n
18634 This date.
18635 @end table
18636
18637 @item number
18638 @table @kbd
18639
18640 @item <
18641 Less than number.
18642
18643 @item =
18644 Equal to number.
18645
18646 @item >
18647 Greater than number.
18648 @end table
18649 @end table
18650
18651 @item
18652 The fourth and usually final key says whether this is a temporary (i.e.,
18653 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18654 or whether it is to be done immediately, without adding to the score
18655 file.
18656 @table @kbd
18657
18658 @item t
18659 Temporary score entry.
18660
18661 @item p
18662 Permanent score entry.
18663
18664 @item i
18665 Immediately scoring.
18666 @end table
18667
18668 @item
18669 If you are scoring on `e' (extra) headers, you will then be prompted for
18670 the header name on which you wish to score.  This must be a header named
18671 in gnus-extra-headers, and @samp{TAB} completion is available.
18672
18673 @end enumerate
18674
18675 So, let's say you want to increase the score on the current author with
18676 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18677 score based on the subject line, using substring matching, and make a
18678 temporary score entry: @kbd{L s s t}.  Pretty easy.
18679
18680 To make things a bit more complicated, there are shortcuts.  If you use
18681 a capital letter on either the second or third keys, Gnus will use
18682 defaults for the remaining one or two keystrokes.  The defaults are
18683 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18684 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18685
18686 These functions take both the numerical prefix and the symbolic prefix
18687 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18688 (or increase) the score of the article.  A symbolic prefix of @code{a}
18689 says to use the @file{all.SCORE} file for the command instead of the
18690 current score file.
18691
18692 @vindex gnus-score-mimic-keymap
18693 The @code{gnus-score-mimic-keymap} says whether these commands will
18694 pretend they are keymaps or not.
18695
18696
18697 @node Group Score Commands
18698 @section Group Score Commands
18699 @cindex group score commands
18700
18701 There aren't many of these as yet, I'm afraid.
18702
18703 @table @kbd
18704
18705 @item W f
18706 @kindex W f (Group)
18707 @findex gnus-score-flush-cache
18708 Gnus maintains a cache of score alists to avoid having to reload them
18709 all the time.  This command will flush the cache
18710 (@code{gnus-score-flush-cache}).
18711
18712 @end table
18713
18714 You can do scoring from the command line by saying something like:
18715
18716 @findex gnus-batch-score
18717 @cindex batch scoring
18718 @example
18719 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18720 @end example
18721
18722
18723 @node Score Variables
18724 @section Score Variables
18725 @cindex score variables
18726
18727 @table @code
18728
18729 @item gnus-use-scoring
18730 @vindex gnus-use-scoring
18731 If @code{nil}, Gnus will not check for score files, and will not, in
18732 general, do any score-related work.  This is @code{t} by default.
18733
18734 @item gnus-kill-killed
18735 @vindex gnus-kill-killed
18736 If this variable is @code{nil}, Gnus will never apply score files to
18737 articles that have already been through the kill process.  While this
18738 may save you lots of time, it also means that if you apply a kill file
18739 to a group, and then change the kill file and want to run it over you
18740 group again to kill more articles, it won't work.  You have to set this
18741 variable to @code{t} to do that.  (It is @code{t} by default.)
18742
18743 @item gnus-kill-files-directory
18744 @vindex gnus-kill-files-directory
18745 All kill and score files will be stored in this directory, which is
18746 initialized from the @env{SAVEDIR} environment variable by default.
18747 This is @file{~/News/} by default.
18748
18749 @item gnus-score-file-suffix
18750 @vindex gnus-score-file-suffix
18751 Suffix to add to the group name to arrive at the score file name
18752 (@file{SCORE} by default.)
18753
18754 @item gnus-score-uncacheable-files
18755 @vindex gnus-score-uncacheable-files
18756 @cindex score cache
18757 All score files are normally cached to avoid excessive re-loading of
18758 score files.  However, if this might make your Emacs grow big and
18759 bloated, so this regexp can be used to weed out score files unlikely
18760 to be needed again.  It would be a bad idea to deny caching of
18761 @file{all.SCORE}, while it might be a good idea to not cache
18762 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18763 variable is @samp{ADAPT$} by default, so no adaptive score files will
18764 be cached.
18765
18766 @item gnus-save-score
18767 @vindex gnus-save-score
18768 If you have really complicated score files, and do lots of batch
18769 scoring, then you might set this variable to @code{t}.  This will make
18770 Gnus save the scores into the @file{.newsrc.eld} file.
18771
18772 If you do not set this to @code{t}, then manual scores (like those set
18773 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18774 across group visits.
18775
18776 @item gnus-score-interactive-default-score
18777 @vindex gnus-score-interactive-default-score
18778 Score used by all the interactive raise/lower commands to raise/lower
18779 score with.  Default is 1000, which may seem excessive, but this is to
18780 ensure that the adaptive scoring scheme gets enough room to play with.
18781 We don't want the small changes from the adaptive scoring to overwrite
18782 manually entered data.
18783
18784 @item gnus-summary-default-score
18785 @vindex gnus-summary-default-score
18786 Default score of an article, which is 0 by default.
18787
18788 @item gnus-summary-expunge-below
18789 @vindex gnus-summary-expunge-below
18790 Don't display the summary lines of articles that have scores lower than
18791 this variable.  This is @code{nil} by default, which means that no
18792 articles will be hidden.  This variable is local to the summary buffers,
18793 and has to be set from @code{gnus-summary-mode-hook}.
18794
18795 @item gnus-score-over-mark
18796 @vindex gnus-score-over-mark
18797 Mark (in the third column) used for articles with a score over the
18798 default.  Default is @samp{+}.
18799
18800 @item gnus-score-below-mark
18801 @vindex gnus-score-below-mark
18802 Mark (in the third column) used for articles with a score below the
18803 default.  Default is @samp{-}.
18804
18805 @item gnus-score-find-score-files-function
18806 @vindex gnus-score-find-score-files-function
18807 Function used to find score files for the current group.  This function
18808 is called with the name of the group as the argument.
18809
18810 Predefined functions available are:
18811 @table @code
18812
18813 @item gnus-score-find-single
18814 @findex gnus-score-find-single
18815 Only apply the group's own score file.
18816
18817 @item gnus-score-find-bnews
18818 @findex gnus-score-find-bnews
18819 Apply all score files that match, using bnews syntax.  This is the
18820 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18821 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18822 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18823 @samp{all} in the score file names are translated into @samp{.*}, and
18824 then a regexp match is done.
18825
18826 This means that if you have some score entries that you want to apply to
18827 all groups, then you put those entries in the @file{all.SCORE} file.
18828
18829 The score files are applied in a semi-random order, although Gnus will
18830 try to apply the more general score files before the more specific score
18831 files.  It does this by looking at the number of elements in the score
18832 file names---discarding the @samp{all} elements.
18833
18834 @item gnus-score-find-hierarchical
18835 @findex gnus-score-find-hierarchical
18836 Apply all score files from all the parent groups.  This means that you
18837 can't have score files like @file{all.SCORE}, but you can have
18838 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18839 server.
18840
18841 @end table
18842 This variable can also be a list of functions.  In that case, all
18843 these functions will be called with the group name as argument, and
18844 all the returned lists of score files will be applied.  These
18845 functions can also return lists of lists of score alists directly.  In
18846 that case, the functions that return these non-file score alists
18847 should probably be placed before the ``real'' score file functions, to
18848 ensure that the last score file returned is the local score file.
18849 Phu.
18850
18851 For example, to do hierarchical scoring but use a non-server-specific
18852 overall score file, you could use the value
18853 @example
18854 (list (lambda (group) ("all.SCORE"))
18855       'gnus-score-find-hierarchical)
18856 @end example
18857
18858 @item gnus-score-expiry-days
18859 @vindex gnus-score-expiry-days
18860 This variable says how many days should pass before an unused score file
18861 entry is expired.  If this variable is @code{nil}, no score file entries
18862 are expired.  It's 7 by default.
18863
18864 @item gnus-update-score-entry-dates
18865 @vindex gnus-update-score-entry-dates
18866 If this variable is non-@code{nil}, temporary score entries that have
18867 been triggered (matched) will have their dates updated.  (This is how Gnus
18868 controls expiry---all non-matched-entries will become too old while
18869 matched entries will stay fresh and young.)  However, if you set this
18870 variable to @code{nil}, even matched entries will grow old and will
18871 have to face that oh-so grim reaper.
18872
18873 @item gnus-score-after-write-file-function
18874 @vindex gnus-score-after-write-file-function
18875 Function called with the name of the score file just written.
18876
18877 @item gnus-score-thread-simplify
18878 @vindex gnus-score-thread-simplify
18879 If this variable is non-@code{nil}, article subjects will be
18880 simplified for subject scoring purposes in the same manner as with
18881 threading---according to the current value of
18882 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18883 @code{substring} or @code{exact} matching, the match will also be
18884 simplified in this manner.
18885
18886 @end table
18887
18888
18889 @node Score File Format
18890 @section Score File Format
18891 @cindex score file format
18892
18893 A score file is an @code{emacs-lisp} file that normally contains just a
18894 single form.  Casual users are not expected to edit these files;
18895 everything can be changed from the summary buffer.
18896
18897 Anyway, if you'd like to dig into it yourself, here's an example:
18898
18899 @lisp
18900 (("from"
18901   ("Lars Ingebrigtsen" -10000)
18902   ("Per Abrahamsen")
18903   ("larsi\\|lmi" -50000 nil R))
18904  ("subject"
18905   ("Ding is Badd" nil 728373))
18906  ("xref"
18907   ("alt.politics" -1000 728372 s))
18908  ("lines"
18909   (2 -100 nil <))
18910  (mark 0)
18911  (expunge -1000)
18912  (mark-and-expunge -10)
18913  (read-only nil)
18914  (orphan -10)
18915  (adapt t)
18916  (files "/hom/larsi/News/gnu.SCORE")
18917  (exclude-files "all.SCORE")
18918  (local (gnus-newsgroup-auto-expire t)
18919         (gnus-summary-make-false-root empty))
18920  (eval (ding)))
18921 @end lisp
18922
18923 This example demonstrates most score file elements.  For a different
18924 approach, see @pxref{Advanced Scoring}.
18925
18926 Even though this looks much like Lisp code, nothing here is actually
18927 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18928 has to be valid syntactically, if not semantically.
18929
18930 Six keys are supported by this alist:
18931
18932 @table @code
18933
18934 @item STRING
18935 If the key is a string, it is the name of the header to perform the
18936 match on.  Scoring can only be performed on these eight headers:
18937 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18938 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18939 these headers, there are three strings to tell Gnus to fetch the entire
18940 article and do the match on larger parts of the article: @code{Body}
18941 will perform the match on the body of the article, @code{Head} will
18942 perform the match on the head of the article, and @code{All} will
18943 perform the match on the entire article.  Note that using any of these
18944 last three keys will slow down group entry @emph{considerably}.  The
18945 final ``header'' you can score on is @code{Followup}.  These score
18946 entries will result in new score entries being added for all follow-ups
18947 to articles that matches these score entries.
18948
18949 Following this key is an arbitrary number of score entries, where each
18950 score entry has one to four elements.
18951 @enumerate
18952
18953 @item
18954 The first element is the @dfn{match element}.  On most headers this will
18955 be a string, but on the Lines and Chars headers, this must be an
18956 integer.
18957
18958 @item
18959 If the second element is present, it should be a number---the @dfn{score
18960 element}.  This number should be an integer in the neginf to posinf
18961 interval.  This number is added to the score of the article if the match
18962 is successful.  If this element is not present, the
18963 @code{gnus-score-interactive-default-score} number will be used
18964 instead.  This is 1000 by default.
18965
18966 @item
18967 If the third element is present, it should be a number---the @dfn{date
18968 element}.  This date says when the last time this score entry matched,
18969 which provides a mechanism for expiring the score entries.  It this
18970 element is not present, the score entry is permanent.  The date is
18971 represented by the number of days since December 31, 1 BCE.
18972
18973 @item
18974 If the fourth element is present, it should be a symbol---the @dfn{type
18975 element}.  This element specifies what function should be used to see
18976 whether this score entry matches the article.  What match types that can
18977 be used depends on what header you wish to perform the match on.
18978 @table @dfn
18979
18980 @item From, Subject, References, Xref, Message-ID
18981 For most header types, there are the @code{r} and @code{R} (regexp), as
18982 well as @code{s} and @code{S} (substring) types, and @code{e} and
18983 @code{E} (exact match), and @code{w} (word match) types.  If this
18984 element is not present, Gnus will assume that substring matching should
18985 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18986 that the matches will be done in a case-sensitive manner.  All these
18987 one-letter types are really just abbreviations for the @code{regexp},
18988 @code{string}, @code{exact}, and @code{word} types, which you can use
18989 instead, if you feel like.
18990
18991 @item Extra
18992 Just as for the standard string overview headers, if you are using
18993 gnus-extra-headers, you can score on these headers' values.  In this
18994 case, there is a 5th element in the score entry, being the name of the
18995 header to be scored.  The following entry is useful in your
18996 @file{all.SCORE} file in case of spam attacks from a single origin host,
18997 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
18998
18999 @lisp
19000 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19001 @end lisp
19002
19003 @item Lines, Chars
19004 These two headers use different match types: @code{<}, @code{>},
19005 @code{=}, @code{>=} and @code{<=}.
19006
19007 These predicates are true if
19008
19009 @example
19010 (PREDICATE HEADER MATCH)
19011 @end example
19012
19013 evaluates to non-@code{nil}.  For instance, the advanced match
19014 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19015 following form:
19016
19017 @lisp
19018 (< header-value 4)
19019 @end lisp
19020
19021 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19022 the match, we get the score added if the article has less than 4 lines.
19023 (It's easy to get confused and think it's the other way around.  But
19024 it's not.  I think.)
19025
19026 When matching on @code{Lines}, be careful because some back ends (like
19027 @code{nndir}) do not generate @code{Lines} header, so every article ends
19028 up being marked as having 0 lines.  This can lead to strange results if
19029 you happen to lower score of the articles with few lines.
19030
19031 @item Date
19032 For the Date header we have three kinda silly match types:
19033 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19034 ever being useful, but, like, it would feel kinda silly not to provide
19035 this function.  Just in case.  You never know.  Better safe than sorry.
19036 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19037 sex on a first date.  (I have been told that at least one person, and I
19038 quote, ``found this function indispensable'', however.)
19039
19040 @cindex ISO8601
19041 @cindex date
19042 A more useful match type is @code{regexp}.  With it, you can match the
19043 date string using a regular expression.  The date is normalized to
19044 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19045 you want to match all articles that have been posted on April 1st in
19046 every year, you could use @samp{....0401.........} as a match string,
19047 for instance.  (Note that the date is kept in its original time zone, so
19048 this will match articles that were posted when it was April 1st where
19049 the article was posted from.  Time zones are such wholesome fun for the
19050 whole family, eh?)
19051
19052 @item Head, Body, All
19053 These three match keys use the same match types as the @code{From} (etc)
19054 header uses.
19055
19056 @item Followup
19057 This match key is somewhat special, in that it will match the
19058 @code{From} header, and affect the score of not only the matching
19059 articles, but also all followups to the matching articles.  This allows
19060 you e.g. increase the score of followups to your own articles, or
19061 decrease the score of followups to the articles of some known
19062 trouble-maker.  Uses the same match types as the @code{From} header
19063 uses.  (Using this match key will lead to creation of @file{ADAPT}
19064 files.)
19065
19066 @item Thread
19067 This match key works along the same lines as the @code{Followup} match
19068 key.  If you say that you want to score on a (sub-)thread started by an
19069 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19070 match.  This will add a new @samp{thread} match for each article that
19071 has @var{x} in its @code{References} header.  (These new @samp{thread}
19072 matches will use the @code{Message-ID}s of these matching articles.)
19073 This will ensure that you can raise/lower the score of an entire thread,
19074 even though some articles in the thread may not have complete
19075 @code{References} headers.  Note that using this may lead to
19076 undeterministic scores of the articles in the thread.  (Using this match
19077 key will lead to creation of @file{ADAPT} files.)
19078 @end table
19079 @end enumerate
19080
19081 @cindex score file atoms
19082 @item mark
19083 The value of this entry should be a number.  Any articles with a score
19084 lower than this number will be marked as read.
19085
19086 @item expunge
19087 The value of this entry should be a number.  Any articles with a score
19088 lower than this number will be removed from the summary buffer.
19089
19090 @item mark-and-expunge
19091 The value of this entry should be a number.  Any articles with a score
19092 lower than this number will be marked as read and removed from the
19093 summary buffer.
19094
19095 @item thread-mark-and-expunge
19096 The value of this entry should be a number.  All articles that belong to
19097 a thread that has a total score below this number will be marked as read
19098 and removed from the summary buffer.  @code{gnus-thread-score-function}
19099 says how to compute the total score for a thread.
19100
19101 @item files
19102 The value of this entry should be any number of file names.  These files
19103 are assumed to be score files as well, and will be loaded the same way
19104 this one was.
19105
19106 @item exclude-files
19107 The clue of this entry should be any number of files.  These files will
19108 not be loaded, even though they would normally be so, for some reason or
19109 other.
19110
19111 @item eval
19112 The value of this entry will be @code{eval}el.  This element will be
19113 ignored when handling global score files.
19114
19115 @item read-only
19116 Read-only score files will not be updated or saved.  Global score files
19117 should feature this atom (@pxref{Global Score Files}).  (Note:
19118 @dfn{Global} here really means @dfn{global}; not your personal
19119 apply-to-all-groups score files.)
19120
19121 @item orphan
19122 The value of this entry should be a number.  Articles that do not have
19123 parents will get this number added to their scores.  Imagine you follow
19124 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19125 will only follow a few of the threads, also want to see any new threads.
19126
19127 You can do this with the following two score file entries:
19128
19129 @example
19130         (orphan -500)
19131         (mark-and-expunge -100)
19132 @end example
19133
19134 When you enter the group the first time, you will only see the new
19135 threads.  You then raise the score of the threads that you find
19136 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19137 rest.  Next time you enter the group, you will see new articles in the
19138 interesting threads, plus any new threads.
19139
19140 I.e.---the orphan score atom is for high-volume groups where a few
19141 interesting threads which can't be found automatically by ordinary
19142 scoring rules exist.
19143
19144 @item adapt
19145 This entry controls the adaptive scoring.  If it is @code{t}, the
19146 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19147 adaptive scoring will be performed on this group.  If it is a list, this
19148 list will be used as the adaptive scoring rules.  If it isn't present,
19149 or is something other than @code{t} or @code{ignore}, the default
19150 adaptive scoring rules will be used.  If you want to use adaptive
19151 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19152 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19153 not want adaptive scoring.  If you only want adaptive scoring in a few
19154 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19155 insert @code{(adapt t)} in the score files of the groups where you want
19156 it.
19157
19158 @item adapt-file
19159 All adaptive score entries will go to the file named by this entry.  It
19160 will also be applied when entering the group.  This atom might be handy
19161 if you want to adapt on several groups at once, using the same adaptive
19162 file for a number of groups.
19163
19164 @item local
19165 @cindex local variables
19166 The value of this entry should be a list of @code{(@var{var}
19167 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19168 current summary buffer, and set to the value specified.  This is a
19169 convenient, if somewhat strange, way of setting variables in some
19170 groups if you don't like hooks much.  Note that the @var{value} won't
19171 be evaluated.
19172 @end table
19173
19174
19175 @node Score File Editing
19176 @section Score File Editing
19177
19178 You normally enter all scoring commands from the summary buffer, but you
19179 might feel the urge to edit them by hand as well, so we've supplied you
19180 with a mode for that.
19181
19182 It's simply a slightly customized @code{emacs-lisp} mode, with these
19183 additional commands:
19184
19185 @table @kbd
19186
19187 @item C-c C-c
19188 @kindex C-c C-c (Score)
19189 @findex gnus-score-edit-done
19190 Save the changes you have made and return to the summary buffer
19191 (@code{gnus-score-edit-done}).
19192
19193 @item C-c C-d
19194 @kindex C-c C-d (Score)
19195 @findex gnus-score-edit-insert-date
19196 Insert the current date in numerical format
19197 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19198 you were wondering.
19199
19200 @item C-c C-p
19201 @kindex C-c C-p (Score)
19202 @findex gnus-score-pretty-print
19203 The adaptive score files are saved in an unformatted fashion.  If you
19204 intend to read one of these files, you want to @dfn{pretty print} it
19205 first.  This command (@code{gnus-score-pretty-print}) does that for
19206 you.
19207
19208 @end table
19209
19210 Type @kbd{M-x gnus-score-mode} to use this mode.
19211
19212 @vindex gnus-score-mode-hook
19213 @code{gnus-score-menu-hook} is run in score mode buffers.
19214
19215 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19216 e} to begin editing score files.
19217
19218
19219 @node Adaptive Scoring
19220 @section Adaptive Scoring
19221 @cindex adaptive scoring
19222
19223 If all this scoring is getting you down, Gnus has a way of making it all
19224 happen automatically---as if by magic.  Or rather, as if by artificial
19225 stupidity, to be precise.
19226
19227 @vindex gnus-use-adaptive-scoring
19228 When you read an article, or mark an article as read, or kill an
19229 article, you leave marks behind.  On exit from the group, Gnus can sniff
19230 these marks and add score elements depending on what marks it finds.
19231 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19232 @code{t} or @code{(line)}.  If you want score adaptively on separate
19233 words appearing in the subjects, you should set this variable to
19234 @code{(word)}.  If you want to use both adaptive methods, set this
19235 variable to @code{(word line)}.
19236
19237 @vindex gnus-default-adaptive-score-alist
19238 To give you complete control over the scoring process, you can customize
19239 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19240 might look something like this:
19241
19242 @lisp
19243 (setq gnus-default-adaptive-score-alist
19244   '((gnus-unread-mark)
19245     (gnus-ticked-mark (from 4))
19246     (gnus-dormant-mark (from 5))
19247     (gnus-del-mark (from -4) (subject -1))
19248     (gnus-read-mark (from 4) (subject 2))
19249     (gnus-expirable-mark (from -1) (subject -1))
19250     (gnus-killed-mark (from -1) (subject -3))
19251     (gnus-kill-file-mark)
19252     (gnus-ancient-mark)
19253     (gnus-low-score-mark)
19254     (gnus-catchup-mark (from -1) (subject -1))))
19255 @end lisp
19256
19257 As you see, each element in this alist has a mark as a key (either a
19258 variable name or a ``real'' mark---a character).  Following this key is
19259 a arbitrary number of header/score pairs.  If there are no header/score
19260 pairs following the key, no adaptive scoring will be done on articles
19261 that have that key as the article mark.  For instance, articles with
19262 @code{gnus-unread-mark} in the example above will not get adaptive score
19263 entries.
19264
19265 Each article can have only one mark, so just a single of these rules
19266 will be applied to each article.
19267
19268 To take @code{gnus-del-mark} as an example---this alist says that all
19269 articles that have that mark (i.e., are marked with @samp{e}) will have a
19270 score entry added to lower based on the @code{From} header by -4, and
19271 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19272
19273 If you have marked 10 articles with the same subject with
19274 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19275 That means that that subject will get a score of ten times -1, which
19276 should be, unless I'm much mistaken, -10.
19277
19278 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19279 the read articles will be marked with the @samp{E} mark.  This'll
19280 probably make adaptive scoring slightly impossible, so auto-expiring and
19281 adaptive scoring doesn't really mix very well.
19282
19283 The headers you can score on are @code{from}, @code{subject},
19284 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19285 @code{chars} and @code{date}.  In addition, you can score on
19286 @code{followup}, which will create an adaptive score entry that matches
19287 on the @code{References} header using the @code{Message-ID} of the
19288 current article, thereby matching the following thread.
19289
19290 If you use this scheme, you should set the score file atom @code{mark}
19291 to something small---like -300, perhaps, to avoid having small random
19292 changes result in articles getting marked as read.
19293
19294 After using adaptive scoring for a week or so, Gnus should start to
19295 become properly trained and enhance the authors you like best, and kill
19296 the authors you like least, without you having to say so explicitly.
19297
19298 You can control what groups the adaptive scoring is to be performed on
19299 by using the score files (@pxref{Score File Format}).  This will also
19300 let you use different rules in different groups.
19301
19302 @vindex gnus-adaptive-file-suffix
19303 The adaptive score entries will be put into a file where the name is the
19304 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19305 is @file{ADAPT}.
19306
19307 @vindex gnus-score-exact-adapt-limit
19308 When doing adaptive scoring, substring or fuzzy matching would probably
19309 give you the best results in most cases.  However, if the header one
19310 matches is short, the possibility for false positives is great, so if
19311 the length of the match is less than
19312 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19313 this variable is @code{nil}, exact matching will always be used to avoid
19314 this problem.
19315
19316 @vindex gnus-default-adaptive-word-score-alist
19317 As mentioned above, you can adapt either on individual words or entire
19318 headers.  If you adapt on words, the
19319 @code{gnus-default-adaptive-word-score-alist} variable says what score
19320 each instance of a word should add given a mark.
19321
19322 @lisp
19323 (setq gnus-default-adaptive-word-score-alist
19324       `((,gnus-read-mark . 30)
19325         (,gnus-catchup-mark . -10)
19326         (,gnus-killed-mark . -20)
19327         (,gnus-del-mark . -15)))
19328 @end lisp
19329
19330 This is the default value.  If you have adaption on words enabled, every
19331 word that appears in subjects of articles marked with
19332 @code{gnus-read-mark} will result in a score rule that increase the
19333 score with 30 points.
19334
19335 @vindex gnus-default-ignored-adaptive-words
19336 @vindex gnus-ignored-adaptive-words
19337 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19338 will be ignored.  If you wish to add more words to be ignored, use the
19339 @code{gnus-ignored-adaptive-words} list instead.
19340
19341 @vindex gnus-adaptive-word-length-limit
19342 Some may feel that short words shouldn't count when doing adaptive
19343 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19344 an integer.  Words shorter than this number will be ignored.  This
19345 variable defaults to @code{nil}.
19346
19347 @vindex gnus-adaptive-word-syntax-table
19348 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19349 syntax table in effect.  It is similar to the standard syntax table, but
19350 it considers numbers to be non-word-constituent characters.
19351
19352 @vindex gnus-adaptive-word-minimum
19353 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19354 word scoring process will never bring down the score of an article to
19355 below this number.  The default is @code{nil}.
19356
19357 @vindex gnus-adaptive-word-no-group-words
19358 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19359 won't adaptively word score any of the words in the group name.  Useful
19360 for groups like @samp{comp.editors.emacs}, where most of the subject
19361 lines contain the word @samp{emacs}.
19362
19363 After using this scheme for a while, it might be nice to write a
19364 @code{gnus-psychoanalyze-user} command to go through the rules and see
19365 what words you like and what words you don't like.  Or perhaps not.
19366
19367 Note that the adaptive word scoring thing is highly experimental and is
19368 likely to change in the future.  Initial impressions seem to indicate
19369 that it's totally useless as it stands.  Some more work (involving more
19370 rigorous statistical methods) will have to be done to make this useful.
19371
19372
19373 @node Home Score File
19374 @section Home Score File
19375
19376 The score file where new score file entries will go is called the
19377 @dfn{home score file}.  This is normally (and by default) the score file
19378 for the group itself.  For instance, the home score file for
19379 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19380
19381 However, this may not be what you want.  It is often convenient to share
19382 a common home score file among many groups---all @samp{emacs} groups
19383 could perhaps use the same home score file.
19384
19385 @vindex gnus-home-score-file
19386 The variable that controls this is @code{gnus-home-score-file}.  It can
19387 be:
19388
19389 @enumerate
19390 @item
19391 A string.  Then this file will be used as the home score file for all
19392 groups.
19393
19394 @item
19395 A function.  The result of this function will be used as the home score
19396 file.  The function will be called with the name of the group as the
19397 parameter.
19398
19399 @item
19400 A list.  The elements in this list can be:
19401
19402 @enumerate
19403 @item
19404 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19405 group name, the @var{file-name} will be used as the home score file.
19406
19407 @item
19408 A function.  If the function returns non-@code{nil}, the result will
19409 be used as the home score file.
19410
19411 @item
19412 A string.  Use the string as the home score file.
19413 @end enumerate
19414
19415 The list will be traversed from the beginning towards the end looking
19416 for matches.
19417
19418 @end enumerate
19419
19420 So, if you want to use just a single score file, you could say:
19421
19422 @lisp
19423 (setq gnus-home-score-file
19424       "my-total-score-file.SCORE")
19425 @end lisp
19426
19427 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19428 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19429
19430 @findex gnus-hierarchial-home-score-file
19431 @lisp
19432 (setq gnus-home-score-file
19433       'gnus-hierarchial-home-score-file)
19434 @end lisp
19435
19436 This is a ready-made function provided for your convenience.
19437 Other functions include
19438
19439 @table @code
19440 @item gnus-current-home-score-file
19441 @findex gnus-current-home-score-file
19442 Return the ``current'' regular score file.  This will make scoring
19443 commands add entry to the ``innermost'' matching score file.
19444
19445 @end table
19446
19447 If you want to have one score file for the @samp{emacs} groups and
19448 another for the @samp{comp} groups, while letting all other groups use
19449 their own home score files:
19450
19451 @lisp
19452 (setq gnus-home-score-file
19453       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19454       '(("\\.emacs" "emacs.SCORE")
19455         ;; @r{All the comp groups in one score file}
19456         ("^comp" "comp.SCORE")))
19457 @end lisp
19458
19459 @vindex gnus-home-adapt-file
19460 @code{gnus-home-adapt-file} works exactly the same way as
19461 @code{gnus-home-score-file}, but says what the home adaptive score file
19462 is instead.  All new adaptive file entries will go into the file
19463 specified by this variable, and the same syntax is allowed.
19464
19465 In addition to using @code{gnus-home-score-file} and
19466 @code{gnus-home-adapt-file}, you can also use group parameters
19467 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19468 Parameters}) to achieve much the same.  Group and topic parameters take
19469 precedence over this variable.
19470
19471
19472 @node Followups To Yourself
19473 @section Followups To Yourself
19474
19475 Gnus offers two commands for picking out the @code{Message-ID} header in
19476 the current buffer.  Gnus will then add a score rule that scores using
19477 this @code{Message-ID} on the @code{References} header of other
19478 articles.  This will, in effect, increase the score of all articles that
19479 respond to the article in the current buffer.  Quite useful if you want
19480 to easily note when people answer what you've said.
19481
19482 @table @code
19483
19484 @item gnus-score-followup-article
19485 @findex gnus-score-followup-article
19486 This will add a score to articles that directly follow up your own
19487 article.
19488
19489 @item gnus-score-followup-thread
19490 @findex gnus-score-followup-thread
19491 This will add a score to all articles that appear in a thread ``below''
19492 your own article.
19493 @end table
19494
19495 @vindex message-sent-hook
19496 These two functions are both primarily meant to be used in hooks like
19497 @code{message-sent-hook}, like this:
19498 @lisp
19499 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19500 @end lisp
19501
19502
19503 If you look closely at your own @code{Message-ID}, you'll notice that
19504 the first two or three characters are always the same.  Here's two of
19505 mine:
19506
19507 @example
19508 <x6u3u47icf.fsf@@eyesore.no>
19509 <x6sp9o7ibw.fsf@@eyesore.no>
19510 @end example
19511
19512 So ``my'' ident on this machine is @samp{x6}.  This can be
19513 exploited---the following rule will raise the score on all followups to
19514 myself:
19515
19516 @lisp
19517 ("references"
19518  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19519   1000 nil r))
19520 @end lisp
19521
19522 Whether it's the first two or first three characters that are ``yours''
19523 is system-dependent.
19524
19525
19526 @node Scoring On Other Headers
19527 @section Scoring On Other Headers
19528 @cindex scoring on other headers
19529
19530 Gnus is quite fast when scoring the ``traditional''
19531 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19532 other headers requires writing a @code{head} scoring rule, which means
19533 that Gnus has to request every single article from the back end to find
19534 matches.  This takes a long time in big groups.
19535
19536 Now, there's not much you can do about this for news groups, but for
19537 mail groups, you have greater control.  In the @pxref{To From
19538 Newsgroups} section of the manual, it's explained in greater detail what
19539 this mechanism does, but here's a cookbook example for @code{nnml} on
19540 how to allow scoring on the @samp{To} and @samp{Cc} headers.
19541
19542 Put the following in your @file{~/.gnus.el} file.
19543
19544 @lisp
19545 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19546       nnmail-extra-headers gnus-extra-headers)
19547 @end lisp
19548
19549 Restart Gnus and rebuild your @code{nnml} overview files with the
19550 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19551 time if you have much mail.
19552
19553 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19554 so: @kbd{I e s p To RET <your name> RET}.
19555
19556 See?  Simple.
19557
19558
19559 @node Scoring Tips
19560 @section Scoring Tips
19561 @cindex scoring tips
19562
19563 @table @dfn
19564
19565 @item Crossposts
19566 @cindex crossposts
19567 @cindex scoring crossposts
19568 If you want to lower the score of crossposts, the line to match on is
19569 the @code{Xref} header.
19570 @lisp
19571 ("xref" (" talk.politics.misc:" -1000))
19572 @end lisp
19573
19574 @item Multiple crossposts
19575 If you want to lower the score of articles that have been crossposted to
19576 more than, say, 3 groups:
19577 @lisp
19578 ("xref"
19579   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19580    -1000 nil r))
19581 @end lisp
19582
19583 @item Matching on the body
19584 This is generally not a very good idea---it takes a very long time.
19585 Gnus actually has to fetch each individual article from the server.  But
19586 you might want to anyway, I guess.  Even though there are three match
19587 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19588 and stick with it in each score file.  If you use any two, each article
19589 will be fetched @emph{twice}.  If you want to match a bit on the
19590 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19591 the matches.
19592
19593 @item Marking as read
19594 You will probably want to mark articles that have scores below a certain
19595 number as read.  This is most easily achieved by putting the following
19596 in your @file{all.SCORE} file:
19597 @lisp
19598 ((mark -100))
19599 @end lisp
19600 You may also consider doing something similar with @code{expunge}.
19601
19602 @item Negated character classes
19603 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19604 That will match newlines, which might lead to, well, The Unknown.  Say
19605 @code{[^abcd\n]*} instead.
19606 @end table
19607
19608
19609 @node Reverse Scoring
19610 @section Reverse Scoring
19611 @cindex reverse scoring
19612
19613 If you want to keep just articles that have @samp{Sex with Emacs} in the
19614 subject header, and expunge all other articles, you could put something
19615 like this in your score file:
19616
19617 @lisp
19618 (("subject"
19619   ("Sex with Emacs" 2))
19620  (mark 1)
19621  (expunge 1))
19622 @end lisp
19623
19624 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19625 rest as read, and expunge them to boot.
19626
19627
19628 @node Global Score Files
19629 @section Global Score Files
19630 @cindex global score files
19631
19632 Sure, other newsreaders have ``global kill files''.  These are usually
19633 nothing more than a single kill file that applies to all groups, stored
19634 in the user's home directory.  Bah!  Puny, weak newsreaders!
19635
19636 What I'm talking about here are Global Score Files.  Score files from
19637 all over the world, from users everywhere, uniting all nations in one
19638 big, happy score file union!  Ange-score!  New and untested!
19639
19640 @vindex gnus-global-score-files
19641 All you have to do to use other people's score files is to set the
19642 @code{gnus-global-score-files} variable.  One entry for each score file,
19643 or each score file directory.  Gnus will decide by itself what score
19644 files are applicable to which group.
19645
19646 To use the score file
19647 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19648 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19649 say this:
19650
19651 @lisp
19652 (setq gnus-global-score-files
19653       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19654         "/ftp@@ftp.some-where:/pub/score/"))
19655 @end lisp
19656
19657 @findex gnus-score-search-global-directories
19658 @noindent
19659 Simple, eh?  Directory names must end with a @samp{/}.  These
19660 directories are typically scanned only once during each Gnus session.
19661 If you feel the need to manually re-scan the remote directories, you can
19662 use the @code{gnus-score-search-global-directories} command.
19663
19664 Note that, at present, using this option will slow down group entry
19665 somewhat.  (That is---a lot.)
19666
19667 If you want to start maintaining score files for other people to use,
19668 just put your score file up for anonymous ftp and announce it to the
19669 world.  Become a retro-moderator!  Participate in the retro-moderator
19670 wars sure to ensue, where retro-moderators battle it out for the
19671 sympathy of the people, luring them to use their score files on false
19672 premises!  Yay!  The net is saved!
19673
19674 Here are some tips for the would-be retro-moderator, off the top of my
19675 head:
19676
19677 @itemize @bullet
19678
19679 @item
19680 Articles heavily crossposted are probably junk.
19681 @item
19682 To lower a single inappropriate article, lower by @code{Message-ID}.
19683 @item
19684 Particularly brilliant authors can be raised on a permanent basis.
19685 @item
19686 Authors that repeatedly post off-charter for the group can safely be
19687 lowered out of existence.
19688 @item
19689 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19690 articles completely.
19691
19692 @item
19693 Use expiring score entries to keep the size of the file down.  You
19694 should probably have a long expiry period, though, as some sites keep
19695 old articles for a long time.
19696 @end itemize
19697
19698 @dots{} I wonder whether other newsreaders will support global score files
19699 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19700 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19701 holding our breath yet?
19702
19703
19704 @node Kill Files
19705 @section Kill Files
19706 @cindex kill files
19707
19708 Gnus still supports those pesky old kill files.  In fact, the kill file
19709 entries can now be expiring, which is something I wrote before Daniel
19710 Quinlan thought of doing score files, so I've left the code in there.
19711
19712 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19713 than score processing, so it might be a good idea to rewrite your kill
19714 files into score files.
19715
19716 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19717 forms into this file, which means that you can use kill files as some
19718 sort of primitive hook function to be run on group entry, even though
19719 that isn't a very good idea.
19720
19721 Normal kill files look like this:
19722
19723 @lisp
19724 (gnus-kill "From" "Lars Ingebrigtsen")
19725 (gnus-kill "Subject" "ding")
19726 (gnus-expunge "X")
19727 @end lisp
19728
19729 This will mark every article written by me as read, and remove the
19730 marked articles from the summary buffer.  Very useful, you'll agree.
19731
19732 Other programs use a totally different kill file syntax.  If Gnus
19733 encounters what looks like a @code{rn} kill file, it will take a stab at
19734 interpreting it.
19735
19736 Two summary functions for editing a @sc{gnus} kill file:
19737
19738 @table @kbd
19739
19740 @item M-k
19741 @kindex M-k (Summary)
19742 @findex gnus-summary-edit-local-kill
19743 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19744
19745 @item M-K
19746 @kindex M-K (Summary)
19747 @findex gnus-summary-edit-global-kill
19748 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19749 @end table
19750
19751 Two group mode functions for editing the kill files:
19752
19753 @table @kbd
19754
19755 @item M-k
19756 @kindex M-k (Group)
19757 @findex gnus-group-edit-local-kill
19758 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19759
19760 @item M-K
19761 @kindex M-K (Group)
19762 @findex gnus-group-edit-global-kill
19763 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19764 @end table
19765
19766 Kill file variables:
19767
19768 @table @code
19769 @item gnus-kill-file-name
19770 @vindex gnus-kill-file-name
19771 A kill file for the group @samp{soc.motss} is normally called
19772 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19773 this file name is detailed by the @code{gnus-kill-file-name} variable.
19774 The ``global'' kill file (not in the score file sense of ``global'', of
19775 course) is just called @file{KILL}.
19776
19777 @vindex gnus-kill-save-kill-file
19778 @item gnus-kill-save-kill-file
19779 If this variable is non-@code{nil}, Gnus will save the
19780 kill file after processing, which is necessary if you use expiring
19781 kills.
19782
19783 @item gnus-apply-kill-hook
19784 @vindex gnus-apply-kill-hook
19785 @findex gnus-apply-kill-file-unless-scored
19786 @findex gnus-apply-kill-file
19787 A hook called to apply kill files to a group.  It is
19788 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19789 kill file if you have a score file for the same group, you can set this
19790 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19791 kill files to be processed, you should set this variable to @code{nil}.
19792
19793 @item gnus-kill-file-mode-hook
19794 @vindex gnus-kill-file-mode-hook
19795 A hook called in kill-file mode buffers.
19796
19797 @end table
19798
19799
19800 @node Converting Kill Files
19801 @section Converting Kill Files
19802 @cindex kill files
19803 @cindex converting kill files
19804
19805 If you have loads of old kill files, you may want to convert them into
19806 score files.  If they are ``regular'', you can use
19807 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19808 by hand.
19809
19810 The kill to score conversion package isn't included in Gnus by default.
19811 You can fetch it from
19812 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19813
19814 If your old kill files are very complex---if they contain more
19815 non-@code{gnus-kill} forms than not, you'll have to convert them by
19816 hand.  Or just let them be as they are.  Gnus will still use them as
19817 before.
19818
19819
19820 @node GroupLens
19821 @section GroupLens
19822 @cindex GroupLens
19823
19824 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19825 collaborative filtering system that helps you work together with other
19826 people to find the quality news articles out of the huge volume of
19827 news articles generated every day.
19828
19829 To accomplish this the GroupLens system combines your opinions about
19830 articles you have already read with the opinions of others who have done
19831 likewise and gives you a personalized prediction for each unread news
19832 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19833 rate articles, and finds other people that rate articles the same way.
19834 Once it has found some people you agree with it tells you, in the form
19835 of a prediction, what they thought of the article.  You can use this
19836 prediction to help you decide whether or not you want to read the
19837 article.
19838
19839 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19840 so this section is mostly of historical interest.
19841
19842 @menu
19843 * Using GroupLens::             How to make Gnus use GroupLens.
19844 * Rating Articles::             Letting GroupLens know how you rate articles.
19845 * Displaying Predictions::      Displaying predictions given by GroupLens.
19846 * GroupLens Variables::         Customizing GroupLens.
19847 @end menu
19848
19849
19850 @node Using GroupLens
19851 @subsection Using GroupLens
19852
19853 To use GroupLens you must register a pseudonym with your local
19854 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19855 Bureau (BBB)} is the only better bit in town at the moment.
19856
19857 Once you have registered you'll need to set a couple of variables.
19858
19859 @table @code
19860
19861 @item gnus-use-grouplens
19862 @vindex gnus-use-grouplens
19863 Setting this variable to a non-@code{nil} value will make Gnus hook into
19864 all the relevant GroupLens functions.
19865
19866 @item grouplens-pseudonym
19867 @vindex grouplens-pseudonym
19868 This variable should be set to the pseudonym you got when registering
19869 with the Better Bit Bureau.
19870
19871 @item grouplens-newsgroups
19872 @vindex grouplens-newsgroups
19873 A list of groups that you want to get GroupLens predictions for.
19874
19875 @end table
19876
19877 That's the minimum of what you need to get up and running with GroupLens.
19878 Once you've registered, GroupLens will start giving you scores for
19879 articles based on the average of what other people think.  But, to get
19880 the real benefit of GroupLens you need to start rating articles
19881 yourself.  Then the scores GroupLens gives you will be personalized for
19882 you, based on how the people you usually agree with have already rated.
19883
19884
19885 @node Rating Articles
19886 @subsection Rating Articles
19887
19888 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19889 Where 1 means something like this article is a waste of bandwidth and 5
19890 means that the article was really good.  The basic question to ask
19891 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19892 like this one?''
19893
19894 There are four ways to enter a rating for an article in GroupLens.
19895
19896 @table @kbd
19897
19898 @item r
19899 @kindex r (GroupLens)
19900 @findex bbb-summary-rate-article
19901 This function will prompt you for a rating on a scale of one to five.
19902
19903 @item k
19904 @kindex k (GroupLens)
19905 @findex grouplens-score-thread
19906 This function will prompt you for a rating, and rate all the articles in
19907 the thread.  This is really useful for some of those long running giant
19908 threads in rec.humor.
19909
19910 @end table
19911
19912 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19913 the score of the article you're reading.
19914
19915 @table @kbd
19916
19917 @item 1-5 n
19918 @kindex n (GroupLens)
19919 @findex grouplens-next-unread-article
19920 Rate the article and go to the next unread article.
19921
19922 @item 1-5 ,
19923 @kindex , (GroupLens)
19924 @findex grouplens-best-unread-article
19925 Rate the article and go to the next unread article with the highest score.
19926
19927 @end table
19928
19929 If you want to give the current article a score of 4 and then go to the
19930 next article, just type @kbd{4 n}.
19931
19932
19933 @node Displaying Predictions
19934 @subsection Displaying Predictions
19935
19936 GroupLens makes a prediction for you about how much you will like a
19937 news article.  The predictions from GroupLens are on a scale from 1 to
19938 5, where 1 is the worst and 5 is the best.  You can use the predictions
19939 from GroupLens in one of three ways controlled by the variable
19940 @code{gnus-grouplens-override-scoring}.
19941
19942 @vindex gnus-grouplens-override-scoring
19943 There are three ways to display predictions in grouplens.  You may
19944 choose to have the GroupLens scores contribute to, or override the
19945 regular gnus scoring mechanism.  override is the default; however, some
19946 people prefer to see the Gnus scores plus the grouplens scores.  To get
19947 the separate scoring behavior you need to set
19948 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19949 GroupLens predictions combined with the grouplens scores set it to
19950 @code{'override} and to combine the scores set
19951 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19952 the combine option you will also want to set the values for
19953 @code{grouplens-prediction-offset} and
19954 @code{grouplens-score-scale-factor}.
19955
19956 @vindex grouplens-prediction-display
19957 In either case, GroupLens gives you a few choices for how you would like
19958 to see your predictions displayed.  The display of predictions is
19959 controlled by the @code{grouplens-prediction-display} variable.
19960
19961 The following are valid values for that variable.
19962
19963 @table @code
19964 @item prediction-spot
19965 The higher the prediction, the further to the right an @samp{*} is
19966 displayed.
19967
19968 @item confidence-interval
19969 A numeric confidence interval.
19970
19971 @item prediction-bar
19972 The higher the prediction, the longer the bar.
19973
19974 @item confidence-bar
19975 Numerical confidence.
19976
19977 @item confidence-spot
19978 The spot gets bigger with more confidence.
19979
19980 @item prediction-num
19981 Plain-old numeric value.
19982
19983 @item confidence-plus-minus
19984 Prediction +/- confidence.
19985
19986 @end table
19987
19988
19989 @node GroupLens Variables
19990 @subsection GroupLens Variables
19991
19992 @table @code
19993
19994 @item gnus-summary-grouplens-line-format
19995 The summary line format used in GroupLens-enhanced summary buffers.  It
19996 accepts the same specs as the normal summary line format (@pxref{Summary
19997 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
19998 %s\n}.
19999
20000 @item grouplens-bbb-host
20001 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20002 default.
20003
20004 @item grouplens-bbb-port
20005 Port of the host running the bbbd server.  The default is 9000.
20006
20007 @item grouplens-score-offset
20008 Offset the prediction by this value.  In other words, subtract the
20009 prediction value by this number to arrive at the effective score.  The
20010 default is 0.
20011
20012 @item grouplens-score-scale-factor
20013 This variable allows the user to magnify the effect of GroupLens scores.
20014 The scale factor is applied after the offset.  The default is 1.
20015
20016 @end table
20017
20018
20019 @node Advanced Scoring
20020 @section Advanced Scoring
20021
20022 Scoring on Subjects and From headers is nice enough, but what if you're
20023 really interested in what a person has to say only when she's talking
20024 about a particular subject?  Or what if you really don't want to
20025 read what person A has to say when she's following up to person B, but
20026 want to read what she says when she's following up to person C?
20027
20028 By using advanced scoring rules you may create arbitrarily complex
20029 scoring patterns.
20030
20031 @menu
20032 * Advanced Scoring Syntax::     A definition.
20033 * Advanced Scoring Examples::   What they look like.
20034 * Advanced Scoring Tips::       Getting the most out of it.
20035 @end menu
20036
20037
20038 @node Advanced Scoring Syntax
20039 @subsection Advanced Scoring Syntax
20040
20041 Ordinary scoring rules have a string as the first element in the rule.
20042 Advanced scoring rules have a list as the first element.  The second
20043 element is the score to be applied if the first element evaluated to a
20044 non-@code{nil} value.
20045
20046 These lists may consist of three logical operators, one redirection
20047 operator, and various match operators.
20048
20049 Logical operators:
20050
20051 @table @code
20052 @item &
20053 @itemx and
20054 This logical operator will evaluate each of its arguments until it finds
20055 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20056 evaluate to @code{true} values, then this operator will return
20057 @code{true}.
20058
20059 @item |
20060 @itemx or
20061 This logical operator will evaluate each of its arguments until it finds
20062 one that evaluates to @code{true}.  If no arguments are @code{true},
20063 then this operator will return @code{false}.
20064
20065 @item !
20066 @itemx not
20067 @itemx Â¬
20068 This logical operator only takes a single argument.  It returns the
20069 logical negation of the value of its argument.
20070
20071 @end table
20072
20073 There is an @dfn{indirection operator} that will make its arguments
20074 apply to the ancestors of the current article being scored.  For
20075 instance, @code{1-} will make score rules apply to the parent of the
20076 current article.  @code{2-} will make score rules apply to the
20077 grandparent of the current article.  Alternatively, you can write
20078 @code{^^}, where the number of @code{^}s (carets) says how far back into
20079 the ancestry you want to go.
20080
20081 Finally, we have the match operators.  These are the ones that do the
20082 real work.  Match operators are header name strings followed by a match
20083 and a match type.  A typical match operator looks like @samp{("from"
20084 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20085 simple scoring, and the match types are also the same.
20086
20087
20088 @node Advanced Scoring Examples
20089 @subsection Advanced Scoring Examples
20090
20091 Please note that the following examples are score file rules.  To
20092 make a complete score file from them, surround them with another pair
20093 of parentheses.
20094
20095 Let's say you want to increase the score of articles written by Lars
20096 when he's talking about Gnus:
20097
20098 @example
20099 @group
20100 ((&
20101   ("from" "Lars Ingebrigtsen")
20102   ("subject" "Gnus"))
20103  1000)
20104 @end group
20105 @end example
20106
20107 Quite simple, huh?
20108
20109 When he writes long articles, he sometimes has something nice to say:
20110
20111 @example
20112 ((&
20113   ("from" "Lars Ingebrigtsen")
20114   (|
20115    ("subject" "Gnus")
20116    ("lines" 100 >)))
20117  1000)
20118 @end example
20119
20120 However, when he responds to things written by Reig Eigil Logge, you
20121 really don't want to read what he's written:
20122
20123 @example
20124 ((&
20125   ("from" "Lars Ingebrigtsen")
20126   (1- ("from" "Reig Eigir Logge")))
20127  -100000)
20128 @end example
20129
20130 Everybody that follows up Redmondo when he writes about disappearing
20131 socks should have their scores raised, but only when they talk about
20132 white socks.  However, when Lars talks about socks, it's usually not
20133 very interesting:
20134
20135 @example
20136 ((&
20137   (1-
20138    (&
20139     ("from" "redmondo@@.*no" r)
20140     ("body" "disappearing.*socks" t)))
20141   (! ("from" "Lars Ingebrigtsen"))
20142   ("body" "white.*socks"))
20143  1000)
20144 @end example
20145
20146 The possibilities are endless.
20147
20148
20149 @node Advanced Scoring Tips
20150 @subsection Advanced Scoring Tips
20151
20152 The @code{&} and @code{|} logical operators do short-circuit logic.
20153 That is, they stop processing their arguments when it's clear what the
20154 result of the operation will be.  For instance, if one of the arguments
20155 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20156 the rest of the arguments.  This means that you should put slow matches
20157 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20158 @samp{subject}) first.
20159
20160 The indirection arguments (@code{1-} and so on) will make their
20161 arguments work on previous generations of the thread.  If you say
20162 something like:
20163
20164 @example
20165 ...
20166 (1-
20167  (1-
20168   ("from" "lars")))
20169 ...
20170 @end example
20171
20172 Then that means "score on the from header of the grandparent of the
20173 current article".  An indirection is quite fast, but it's better to say:
20174
20175 @example
20176 (1-
20177  (&
20178   ("from" "Lars")
20179   ("subject" "Gnus")))
20180 @end example
20181
20182 than it is to say:
20183
20184 @example
20185 (&
20186  (1- ("from" "Lars"))
20187  (1- ("subject" "Gnus")))
20188 @end example
20189
20190
20191 @node Score Decays
20192 @section Score Decays
20193 @cindex score decays
20194 @cindex decays
20195
20196 You may find that your scores have a tendency to grow without
20197 bounds, especially if you're using adaptive scoring.  If scores get too
20198 big, they lose all meaning---they simply max out and it's difficult to
20199 use them in any sensible way.
20200
20201 @vindex gnus-decay-scores
20202 @findex gnus-decay-score
20203 @vindex gnus-decay-score-function
20204 Gnus provides a mechanism for decaying scores to help with this problem.
20205 When score files are loaded and @code{gnus-decay-scores} is
20206 non-@code{nil}, Gnus will run the score files through the decaying
20207 mechanism thereby lowering the scores of all non-permanent score rules.
20208 The decay itself if performed by the @code{gnus-decay-score-function}
20209 function, which is @code{gnus-decay-score} by default.  Here's the
20210 definition of that function:
20211
20212 @lisp
20213 (defun gnus-decay-score (score)
20214   "Decay SCORE.
20215 This is done according to `gnus-score-decay-constant'
20216 and `gnus-score-decay-scale'."
20217   (floor
20218    (- score
20219       (* (if (< score 0) 1 -1)
20220          (min (abs score)
20221               (max gnus-score-decay-constant
20222                    (* (abs score)
20223                       gnus-score-decay-scale)))))))
20224 @end lisp
20225
20226 @vindex gnus-score-decay-scale
20227 @vindex gnus-score-decay-constant
20228 @code{gnus-score-decay-constant} is 3 by default and
20229 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20230
20231 @enumerate
20232 @item
20233 Scores between -3 and 3 will be set to 0 when this function is called.
20234
20235 @item
20236 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20237
20238 @item
20239 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20240 score.
20241 @end enumerate
20242
20243 If you don't like this decay function, write your own.  It is called
20244 with the score to be decayed as its only parameter, and it should return
20245 the new score, which should be an integer.
20246
20247 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20248 four days, Gnus will decay the scores four times, for instance.
20249
20250 @iftex
20251 @iflatex
20252 @chapter Message
20253 @include message.texi
20254 @chapter Emacs MIME
20255 @include emacs-mime.texi
20256 @chapter Sieve
20257 @include sieve.texi
20258 @chapter PGG
20259 @include pgg.texi
20260 @end iflatex
20261 @end iftex
20262
20263 @node Various
20264 @chapter Various
20265
20266 @menu
20267 * Process/Prefix::              A convention used by many treatment commands.
20268 * Interactive::                 Making Gnus ask you many questions.
20269 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20270 * Formatting Variables::        You can specify what buffers should look like.
20271 * Window Layout::               Configuring the Gnus buffer windows.
20272 * Faces and Fonts::             How to change how faces look.
20273 * Compilation::                 How to speed Gnus up.
20274 * Mode Lines::                  Displaying information in the mode lines.
20275 * Highlighting and Menus::      Making buffers look all nice and cozy.
20276 * Buttons::                     Get tendinitis in ten easy steps!
20277 * Daemons::                     Gnus can do things behind your back.
20278 * NoCeM::                       How to avoid spam and other fatty foods.
20279 * Undo::                        Some actions can be undone.
20280 * Predicate Specifiers::        Specifying predicates.
20281 * Moderation::                  What to do if you're a moderator.
20282 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20283 * Fuzzy Matching::              What's the big fuzz?
20284 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20285 * Various Various::             Things that are really various.
20286 @end menu
20287
20288
20289 @node Process/Prefix
20290 @section Process/Prefix
20291 @cindex process/prefix convention
20292
20293 Many functions, among them functions for moving, decoding and saving
20294 articles, use what is known as the @dfn{Process/Prefix convention}.
20295
20296 This is a method for figuring out what articles the user wants the
20297 command to be performed on.
20298
20299 It goes like this:
20300
20301 If the numeric prefix is N, perform the operation on the next N
20302 articles, starting with the current one.  If the numeric prefix is
20303 negative, perform the operation on the previous N articles, starting
20304 with the current one.
20305
20306 @vindex transient-mark-mode
20307 If @code{transient-mark-mode} in non-@code{nil} and the region is
20308 active, all articles in the region will be worked upon.
20309
20310 If there is no numeric prefix, but some articles are marked with the
20311 process mark, perform the operation on the articles marked with
20312 the process mark.
20313
20314 If there is neither a numeric prefix nor any articles marked with the
20315 process mark, just perform the operation on the current article.
20316
20317 Quite simple, really, but it needs to be made clear so that surprises
20318 are avoided.
20319
20320 Commands that react to the process mark will push the current list of
20321 process marked articles onto a stack and will then clear all process
20322 marked articles.  You can restore the previous configuration with the
20323 @kbd{M P y} command (@pxref{Setting Process Marks}).
20324
20325 @vindex gnus-summary-goto-unread
20326 One thing that seems to shock & horrify lots of people is that, for
20327 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20328 Since each @kbd{d} (which marks the current article as read) by default
20329 goes to the next unread article after marking, this means that @kbd{3 d}
20330 will mark the next three unread articles as read, no matter what the
20331 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20332 @code{nil} for a more straightforward action.
20333
20334 Many commands do not use the process/prefix convention.  All commands
20335 that do explicitly say so in this manual.  To apply the process/prefix
20336 convention to commands that do not use it, you can use the @kbd{M-&}
20337 command.  For instance, to mark all the articles in the group as
20338 expirable, you could say @kbd{M P b M-& E}.
20339
20340
20341 @node Interactive
20342 @section Interactive
20343 @cindex interaction
20344
20345 @table @code
20346
20347 @item gnus-novice-user
20348 @vindex gnus-novice-user
20349 If this variable is non-@code{nil}, you are either a newcomer to the
20350 World of Usenet, or you are very cautious, which is a nice thing to be,
20351 really.  You will be given questions of the type ``Are you sure you want
20352 to do this?'' before doing anything dangerous.  This is @code{t} by
20353 default.
20354
20355 @item gnus-expert-user
20356 @vindex gnus-expert-user
20357 If this variable is non-@code{nil}, you will seldom be asked any
20358 questions by Gnus.  It will simply assume you know what you're doing, no
20359 matter how strange.
20360
20361 @item gnus-interactive-catchup
20362 @vindex gnus-interactive-catchup
20363 Require confirmation before catching up a group if non-@code{nil}.  It
20364 is @code{t} by default.
20365
20366 @item gnus-interactive-exit
20367 @vindex gnus-interactive-exit
20368 Require confirmation before exiting Gnus.  This variable is @code{t} by
20369 default.
20370 @end table
20371
20372
20373 @node Symbolic Prefixes
20374 @section Symbolic Prefixes
20375 @cindex symbolic prefixes
20376
20377 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20378 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20379 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20380 rule of 900 to the current article.
20381
20382 This is all nice and well, but what if you want to give a command some
20383 additional information?  Well, what most commands do is interpret the
20384 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20385 doesn't want a backup file to be created when saving the current buffer,
20386 for instance.  But what if you want to save without making a backup
20387 file, and you want Emacs to flash lights and play a nice tune at the
20388 same time?  You can't, and you're probably perfectly happy that way.
20389
20390 @kindex M-i (Summary)
20391 @findex gnus-symbolic-argument
20392 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20393 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20394 character typed in is the value.  You can stack as many @kbd{M-i}
20395 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20396 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20397 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20398 @code{b}''.  You get the drift.
20399
20400 Typing in symbolic prefixes to commands that don't accept them doesn't
20401 hurt, but it doesn't do any good either.  Currently not many Gnus
20402 functions make use of the symbolic prefix.
20403
20404 If you're interested in how Gnus implements this, @pxref{Extended
20405 Interactive}.
20406
20407
20408 @node Formatting Variables
20409 @section Formatting Variables
20410 @cindex formatting variables
20411
20412 Throughout this manual you've probably noticed lots of variables called
20413 things like @code{gnus-group-line-format} and
20414 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20415 output lines in the various buffers.  There's quite a lot of them.
20416 Fortunately, they all use the same syntax, so there's not that much to
20417 be annoyed by.
20418
20419 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20420 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20421 lots of percentages everywhere.
20422
20423 @menu
20424 * Formatting Basics::           A formatting variable is basically a format string.
20425 * Mode Line Formatting::        Some rules about mode line formatting variables.
20426 * Advanced Formatting::         Modifying output in various ways.
20427 * User-Defined Specs::          Having Gnus call your own functions.
20428 * Formatting Fonts::            Making the formatting look colorful and nice.
20429 * Positioning Point::           Moving point to a position after an operation.
20430 * Tabulation::                  Tabulating your output.
20431 * Wide Characters::             Dealing with wide characters.
20432 @end menu
20433
20434 Currently Gnus uses the following formatting variables:
20435 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20436 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20437 @code{gnus-group-mode-line-format},
20438 @code{gnus-summary-mode-line-format},
20439 @code{gnus-article-mode-line-format},
20440 @code{gnus-server-mode-line-format}, and
20441 @code{gnus-summary-pick-line-format}.
20442
20443 All these format variables can also be arbitrary elisp forms.  In that
20444 case, they will be @code{eval}ed to insert the required lines.
20445
20446 @kindex M-x gnus-update-format
20447 @findex gnus-update-format
20448 Gnus includes a command to help you while creating your own format
20449 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20450 update the spec in question and pop you to a buffer where you can
20451 examine the resulting Lisp code to be run to generate the line.
20452
20453
20454
20455 @node Formatting Basics
20456 @subsection Formatting Basics
20457
20458 Each @samp{%} element will be replaced by some string or other when the
20459 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20460 spec, and pad with spaces to get a 5-character field''.
20461
20462 As with normal C and Emacs Lisp formatting strings, the numerical
20463 modifier between the @samp{%} and the formatting type character will
20464 @dfn{pad} the output so that it is always at least that long.
20465 @samp{%5y} will make the field always (at least) five characters wide by
20466 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20467 the right instead.
20468
20469 You may also wish to limit the length of the field to protect against
20470 particularly wide values.  For that you can say @samp{%4,6y}, which
20471 means that the field will never be more than 6 characters wide and never
20472 less than 4 characters wide.
20473
20474 Also Gnus supports some extended format specifications, such as
20475 @samp{%&user-date;}.
20476
20477
20478 @node Mode Line Formatting
20479 @subsection Mode Line Formatting
20480
20481 Mode line formatting variables (e.g.,
20482 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20483 buffer line oriented formatting variables (@pxref{Formatting Basics})
20484 with the following two differences:
20485
20486 @enumerate
20487
20488 @item
20489 There must be no newline (@samp{\n}) at the end.
20490
20491 @item
20492 The special @samp{%%b} spec can be used to display the buffer name.
20493 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20494 @samp{%} to allow it to pass through the formatting machinery unmangled,
20495 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20496 display interprets to mean ``show the buffer name''.  For a full list of
20497 mode line specs Emacs understands, see the documentation of the
20498 @code{mode-line-format} variable.
20499
20500 @end enumerate
20501
20502
20503 @node Advanced Formatting
20504 @subsection Advanced Formatting
20505
20506 It is frequently useful to post-process the fields in some way.
20507 Padding, limiting, cutting off parts and suppressing certain values can
20508 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20509 look like @samp{%~(cut 3)~(ignore "0")y}.
20510
20511 These are the valid modifiers:
20512
20513 @table @code
20514 @item pad
20515 @itemx pad-left
20516 Pad the field to the left with spaces until it reaches the required
20517 length.
20518
20519 @item pad-right
20520 Pad the field to the right with spaces until it reaches the required
20521 length.
20522
20523 @item max
20524 @itemx max-left
20525 Cut off characters from the left until it reaches the specified length.
20526
20527 @item max-right
20528 Cut off characters from the right until it reaches the specified
20529 length.
20530
20531 @item cut
20532 @itemx cut-left
20533 Cut off the specified number of characters from the left.
20534
20535 @item cut-right
20536 Cut off the specified number of characters from the right.
20537
20538 @item ignore
20539 Return an empty string if the field is equal to the specified value.
20540
20541 @item form
20542 Use the specified form as the field value when the @samp{@@} spec is
20543 used.
20544
20545 Here's an example:
20546
20547 @lisp
20548 "~(form (current-time-string))@@"
20549 @end lisp
20550
20551 @end table
20552
20553 Let's take an example.  The @samp{%o} spec in the summary mode lines
20554 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20555 This is quite a mouthful, so we want to shave off the century number and
20556 the time, leaving us with a six-character date.  That would be
20557 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20558 maxing, and we need the padding to ensure that the date is never less
20559 than 6 characters to make it look nice in columns.)
20560
20561 Ignoring is done first; then cutting; then maxing; and then as the very
20562 last operation, padding.
20563
20564 If you use lots of these advanced thingies, you'll find that Gnus gets
20565 quite slow.  This can be helped enormously by running @kbd{M-x
20566 gnus-compile} when you are satisfied with the look of your lines.
20567 @xref{Compilation}.
20568
20569
20570 @node User-Defined Specs
20571 @subsection User-Defined Specs
20572
20573 All the specs allow for inserting user defined specifiers---@samp{u}.
20574 The next character in the format string should be a letter.  Gnus
20575 will call the function @code{gnus-user-format-function-}@samp{X}, where
20576 @samp{X} is the letter following @samp{%u}.  The function will be passed
20577 a single parameter---what the parameter means depends on what buffer
20578 it's being called from.  The function should return a string, which will
20579 be inserted into the buffer just like information from any other
20580 specifier.  This function may also be called with dummy values, so it
20581 should protect against that.
20582
20583 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20584 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20585
20586 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20587 much the same without defining new functions.  Here's an example:
20588 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20589 given here will be evaluated to yield the current line number, and then
20590 inserted.
20591
20592
20593 @node Formatting Fonts
20594 @subsection Formatting Fonts
20595
20596 There are specs for highlighting, and these are shared by all the format
20597 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20598 the special @code{mouse-face} property set, which means that it will be
20599 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20600 over it.
20601
20602 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20603 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20604 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20605 and so on.  Create as many faces as you wish.  The same goes for the
20606 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20607 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20608
20609 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20610 special @code{balloon-help} property set to
20611 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20612 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20613 variables should be either strings or symbols naming functions that
20614 return a string.  When the mouse passes over text with this property
20615 set, a balloon window will appear and display the string.  Please
20616 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20617 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20618 XEmacs) for more information on this.  (For technical reasons, the
20619 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20620 paragraph.)
20621
20622 Here's an alternative recipe for the group buffer:
20623
20624 @lisp
20625 ;; @r{Create three face types.}
20626 (setq gnus-face-1 'bold)
20627 (setq gnus-face-3 'italic)
20628
20629 ;; @r{We want the article count to be in}
20630 ;; @r{a bold and green face.  So we create}
20631 ;; @r{a new face called @code{my-green-bold}.}
20632 (copy-face 'bold 'my-green-bold)
20633 ;; @r{Set the color.}
20634 (set-face-foreground 'my-green-bold "ForestGreen")
20635 (setq gnus-face-2 'my-green-bold)
20636
20637 ;; @r{Set the new & fancy format.}
20638 (setq gnus-group-line-format
20639       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20640 @end lisp
20641
20642 I'm sure you'll be able to use this scheme to create totally unreadable
20643 and extremely vulgar displays.  Have fun!
20644
20645 Note that the @samp{%(} specs (and friends) do not make any sense on the
20646 mode-line variables.
20647
20648 @node Positioning Point
20649 @subsection Positioning Point
20650
20651 Gnus usually moves point to a pre-defined place on each line in most
20652 buffers.  By default, point move to the first colon character on the
20653 line.  You can customize this behaviour in three different ways.
20654
20655 You can move the colon character to somewhere else on the line.
20656
20657 @findex gnus-goto-colon
20658 You can redefine the function that moves the point to the colon.  The
20659 function is called @code{gnus-goto-colon}.
20660
20661 But perhaps the most convenient way to deal with this, if you don't want
20662 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20663 put a @samp{%*} somewhere in your format line definition, Gnus will
20664 place point there.
20665
20666
20667 @node Tabulation
20668 @subsection Tabulation
20669
20670 You can usually line up your displays by padding and cutting your
20671 strings.  However, when combining various strings of different size, it
20672 can often be more convenient to just output the strings, and then worry
20673 about lining up the following text afterwards.
20674
20675 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20676 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20677
20678 @samp{%50=} will insert space characters to pad the line up to column
20679 50.  If the text is already past column 50, nothing will be inserted.
20680 This is the soft tabulator.
20681
20682 @samp{%-50=} will insert space characters to pad the line up to column
20683 50.  If the text is already past column 50, the excess text past column
20684 50 will be removed.  This is the hard tabulator.
20685
20686
20687 @node Wide Characters
20688 @subsection Wide Characters
20689
20690 Fixed width fonts in most countries have characters of the same width.
20691 Some countries, however, use Latin characters mixed with wider
20692 characters---most notable East Asian countries.
20693
20694 The problem is that when formatting, Gnus assumes that if a string is 10
20695 characters wide, it'll be 10 Latin characters wide on the screen.  In
20696 these countries, that's not true.
20697
20698 @vindex gnus-use-correct-string-widths
20699 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20700 @code{t}.  This makes buffer generation slower, but the results will be
20701 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20702 for Emacs.
20703
20704
20705 @node Window Layout
20706 @section Window Layout
20707 @cindex window layout
20708
20709 No, there's nothing here about X, so be quiet.
20710
20711 @vindex gnus-use-full-window
20712 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20713 other windows and occupy the entire Emacs screen by itself.  It is
20714 @code{t} by default.
20715
20716 Setting this variable to @code{nil} kinda works, but there are
20717 glitches.  Use at your own peril.
20718
20719 @vindex gnus-buffer-configuration
20720 @code{gnus-buffer-configuration} describes how much space each Gnus
20721 buffer should be given.  Here's an excerpt of this variable:
20722
20723 @lisp
20724 ((group (vertical 1.0 (group 1.0 point)
20725                       (if gnus-carpal (group-carpal 4))))
20726  (article (vertical 1.0 (summary 0.25 point)
20727                         (article 1.0))))
20728 @end lisp
20729
20730 This is an alist.  The @dfn{key} is a symbol that names some action or
20731 other.  For instance, when displaying the group buffer, the window
20732 configuration function will use @code{group} as the key.  A full list of
20733 possible names is listed below.
20734
20735 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20736 should occupy.  To take the @code{article} split as an example -
20737
20738 @lisp
20739 (article (vertical 1.0 (summary 0.25 point)
20740                        (article 1.0)))
20741 @end lisp
20742
20743 This @dfn{split} says that the summary buffer should occupy 25% of upper
20744 half of the screen, and that it is placed over the article buffer.  As
20745 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20746 reaching for that calculator there).  However, the special number
20747 @code{1.0} is used to signal that this buffer should soak up all the
20748 rest of the space available after the rest of the buffers have taken
20749 whatever they need.  There should be only one buffer with the @code{1.0}
20750 size spec per split.
20751
20752 Point will be put in the buffer that has the optional third element
20753 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20754 split where the tag @code{frame-focus} is a member (i.e. is the third or
20755 fourth element in the list, depending on whether the @code{point} tag is
20756 present) gets focus.
20757
20758 Here's a more complicated example:
20759
20760 @lisp
20761 (article (vertical 1.0 (group 4)
20762                        (summary 0.25 point)
20763                        (if gnus-carpal (summary-carpal 4))
20764                        (article 1.0)))
20765 @end lisp
20766
20767 If the size spec is an integer instead of a floating point number,
20768 then that number will be used to say how many lines a buffer should
20769 occupy, not a percentage.
20770
20771 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20772 precise---if the @code{car} of the split is a function or a subr), this
20773 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20774 be used as a split.  This means that there will be three buffers if
20775 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20776 is non-@code{nil}.
20777
20778 Not complicated enough for you?  Well, try this on for size:
20779
20780 @lisp
20781 (article (horizontal 1.0
20782              (vertical 0.5
20783                  (group 1.0)
20784                  (gnus-carpal 4))
20785              (vertical 1.0
20786                  (summary 0.25 point)
20787                  (summary-carpal 4)
20788                  (article 1.0))))
20789 @end lisp
20790
20791 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20792 @code{horizontal} thingie?
20793
20794 If the first element in one of the split is @code{horizontal}, Gnus will
20795 split the window horizontally, giving you two windows side-by-side.
20796 Inside each of these strips you may carry on all you like in the normal
20797 fashion.  The number following @code{horizontal} says what percentage of
20798 the screen is to be given to this strip.
20799
20800 For each split, there @emph{must} be one element that has the 100% tag.
20801 The splitting is never accurate, and this buffer will eat any leftover
20802 lines from the splits.
20803
20804 To be slightly more formal, here's a definition of what a valid split
20805 may look like:
20806
20807 @example
20808 @group
20809 split      = frame | horizontal | vertical | buffer | form
20810 frame      = "(frame " size *split ")"
20811 horizontal = "(horizontal " size *split ")"
20812 vertical   = "(vertical " size *split ")"
20813 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20814 size       = number | frame-params
20815 buf-name   = group | article | summary ...
20816 @end group
20817 @end example
20818
20819 The limitations are that the @code{frame} split can only appear as the
20820 top-level split.  @var{form} should be an Emacs Lisp form that should
20821 return a valid split.  We see that each split is fully recursive, and
20822 may contain any number of @code{vertical} and @code{horizontal} splits.
20823
20824 @vindex gnus-window-min-width
20825 @vindex gnus-window-min-height
20826 @cindex window height
20827 @cindex window width
20828 Finding the right sizes can be a bit complicated.  No window may be less
20829 than @code{gnus-window-min-height} (default 1) characters high, and all
20830 windows must be at least @code{gnus-window-min-width} (default 1)
20831 characters wide.  Gnus will try to enforce this before applying the
20832 splits.  If you want to use the normal Emacs window width/height limit,
20833 you can just set these two variables to @code{nil}.
20834
20835 If you're not familiar with Emacs terminology, @code{horizontal} and
20836 @code{vertical} splits may work the opposite way of what you'd expect.
20837 Windows inside a @code{horizontal} split are shown side-by-side, and
20838 windows within a @code{vertical} split are shown above each other.
20839
20840 @findex gnus-configure-frame
20841 If you want to experiment with window placement, a good tip is to call
20842 @code{gnus-configure-frame} directly with a split.  This is the function
20843 that does all the real work when splitting buffers.  Below is a pretty
20844 nonsensical configuration with 5 windows; two for the group buffer and
20845 three for the article buffer.  (I said it was nonsensical.)  If you
20846 @code{eval} the statement below, you can get an idea of how that would
20847 look straight away, without going through the normal Gnus channels.
20848 Play with it until you're satisfied, and then use
20849 @code{gnus-add-configuration} to add your new creation to the buffer
20850 configuration list.
20851
20852 @lisp
20853 (gnus-configure-frame
20854  '(horizontal 1.0
20855     (vertical 10
20856       (group 1.0)
20857       (article 0.3 point))
20858     (vertical 1.0
20859       (article 1.0)
20860       (horizontal 4
20861         (group 1.0)
20862         (article 10)))))
20863 @end lisp
20864
20865 You might want to have several frames as well.  No prob---just use the
20866 @code{frame} split:
20867
20868 @lisp
20869 (gnus-configure-frame
20870  '(frame 1.0
20871          (vertical 1.0
20872                    (summary 0.25 point frame-focus)
20873                    (article 1.0))
20874          (vertical ((height . 5) (width . 15)
20875                     (user-position . t)
20876                     (left . -1) (top . 1))
20877                    (picon 1.0))))
20878
20879 @end lisp
20880
20881 This split will result in the familiar summary/article window
20882 configuration in the first (or ``main'') frame, while a small additional
20883 frame will be created where picons will be shown.  As you can see,
20884 instead of the normal @code{1.0} top-level spec, each additional split
20885 should have a frame parameter alist as the size spec.
20886 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20887 Reference Manual}.  Under XEmacs, a frame property list will be
20888 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20889 is such a plist.
20890 The list of all possible keys for @code{gnus-buffer-configuration} can
20891 be found in its default value.
20892
20893 Note that the @code{message} key is used for both
20894 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20895 it is desirable to distinguish between the two, something like this
20896 might be used:
20897
20898 @lisp
20899 (message (horizontal 1.0
20900                      (vertical 1.0 (message 1.0 point))
20901                      (vertical 0.24
20902                                (if (buffer-live-p gnus-summary-buffer)
20903                                    '(summary 0.5))
20904                                (group 1.0))))
20905 @end lisp
20906
20907 One common desire for a multiple frame split is to have a separate frame
20908 for composing mail and news while leaving the original frame intact.  To
20909 accomplish that, something like the following can be done:
20910
20911 @lisp
20912 (message
20913   (frame 1.0
20914          (if (not (buffer-live-p gnus-summary-buffer))
20915              (car (cdr (assoc 'group gnus-buffer-configuration)))
20916            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20917          (vertical ((user-position . t) (top . 1) (left . 1)
20918                     (name . "Message"))
20919                    (message 1.0 point))))
20920 @end lisp
20921
20922 @findex gnus-add-configuration
20923 Since the @code{gnus-buffer-configuration} variable is so long and
20924 complicated, there's a function you can use to ease changing the config
20925 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20926 you want to change the @code{article} setting, you could say:
20927
20928 @lisp
20929 (gnus-add-configuration
20930  '(article (vertical 1.0
20931                (group 4)
20932                (summary .25 point)
20933                (article 1.0))))
20934 @end lisp
20935
20936 You'd typically stick these @code{gnus-add-configuration} calls in your
20937 @file{~/.gnus.el} file or in some startup hook---they should be run after
20938 Gnus has been loaded.
20939
20940 @vindex gnus-always-force-window-configuration
20941 If all windows mentioned in the configuration are already visible, Gnus
20942 won't change the window configuration.  If you always want to force the
20943 ``right'' window configuration, you can set
20944 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20945
20946 If you're using tree displays (@pxref{Tree Display}), and the tree
20947 window is displayed vertically next to another window, you may also want
20948 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20949 windows resized.
20950
20951 @subsection Example Window Configurations
20952
20953 @itemize @bullet
20954 @item
20955 Narrow left hand side occupied by group buffer.  Right hand side split
20956 between summary buffer (top one-sixth) and article buffer (bottom).
20957
20958 @ifinfo
20959 @example
20960 +---+---------+
20961 | G | Summary |
20962 | r +---------+
20963 | o |         |
20964 | u | Article |
20965 | p |         |
20966 +---+---------+
20967 @end example
20968 @end ifinfo
20969
20970 @lisp
20971 (gnus-add-configuration
20972  '(article
20973    (horizontal 1.0
20974                (vertical 25 (group 1.0))
20975                (vertical 1.0
20976                          (summary 0.16 point)
20977                          (article 1.0)))))
20978
20979 (gnus-add-configuration
20980  '(summary
20981    (horizontal 1.0
20982                (vertical 25 (group 1.0))
20983                (vertical 1.0 (summary 1.0 point)))))
20984 @end lisp
20985
20986 @end itemize
20987
20988
20989 @node Faces and Fonts
20990 @section Faces and Fonts
20991 @cindex faces
20992 @cindex fonts
20993 @cindex colors
20994
20995 Fiddling with fonts and faces used to be very difficult, but these days
20996 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
20997 the face you want to alter, and alter it via the standard Customize
20998 interface.
20999
21000
21001 @node Compilation
21002 @section Compilation
21003 @cindex compilation
21004 @cindex byte-compilation
21005
21006 @findex gnus-compile
21007
21008 Remember all those line format specification variables?
21009 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21010 on.  Now, Gnus will of course heed whatever these variables are, but,
21011 unfortunately, changing them will mean a quite significant slow-down.
21012 (The default values of these variables have byte-compiled functions
21013 associated with them, while the user-generated versions do not, of
21014 course.)
21015
21016 To help with this, you can run @kbd{M-x gnus-compile} after you've
21017 fiddled around with the variables and feel that you're (kind of)
21018 satisfied.  This will result in the new specs being byte-compiled, and
21019 you'll get top speed again.  Gnus will save these compiled specs in the
21020 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21021 this function, though---you should compile them yourself by sticking
21022 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21023
21024
21025 @node Mode Lines
21026 @section Mode Lines
21027 @cindex mode lines
21028
21029 @vindex gnus-updated-mode-lines
21030 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21031 lines updated.  It is a list of symbols.  Supported symbols include
21032 @code{group}, @code{article}, @code{summary}, @code{server},
21033 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21034 Gnus will keep that mode line updated with information that may be
21035 pertinent.  If this variable is @code{nil}, screen refresh may be
21036 quicker.
21037
21038 @cindex display-time
21039
21040 @vindex gnus-mode-non-string-length
21041 By default, Gnus displays information on the current article in the mode
21042 lines of the summary and article buffers.  The information Gnus wishes
21043 to display (e.g. the subject of the article) is often longer than the
21044 mode lines, and therefore have to be cut off at some point.  The
21045 @code{gnus-mode-non-string-length} variable says how long the other
21046 elements on the line is (i.e., the non-info part).  If you put
21047 additional elements on the mode line (e.g. a clock), you should modify
21048 this variable:
21049
21050 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21051 @lisp
21052 (add-hook 'display-time-hook
21053           (lambda () (setq gnus-mode-non-string-length
21054                            (+ 21
21055                               (if line-number-mode 5 0)
21056                               (if column-number-mode 4 0)
21057                               (length display-time-string)))))
21058 @end lisp
21059
21060 If this variable is @code{nil} (which is the default), the mode line
21061 strings won't be chopped off, and they won't be padded either.  Note
21062 that the default is unlikely to be desirable, as even the percentage
21063 complete in the buffer may be crowded off the mode line; the user should
21064 configure this variable appropriately for her configuration.
21065
21066
21067 @node Highlighting and Menus
21068 @section Highlighting and Menus
21069 @cindex visual
21070 @cindex highlighting
21071 @cindex menus
21072
21073 @vindex gnus-visual
21074 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21075 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21076 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21077 file.
21078
21079 This variable can be a list of visual properties that are enabled.  The
21080 following elements are valid, and are all included by default:
21081
21082 @table @code
21083 @item group-highlight
21084 Do highlights in the group buffer.
21085 @item summary-highlight
21086 Do highlights in the summary buffer.
21087 @item article-highlight
21088 Do highlights in the article buffer.
21089 @item highlight
21090 Turn on highlighting in all buffers.
21091 @item group-menu
21092 Create menus in the group buffer.
21093 @item summary-menu
21094 Create menus in the summary buffers.
21095 @item article-menu
21096 Create menus in the article buffer.
21097 @item browse-menu
21098 Create menus in the browse buffer.
21099 @item server-menu
21100 Create menus in the server buffer.
21101 @item score-menu
21102 Create menus in the score buffers.
21103 @item menu
21104 Create menus in all buffers.
21105 @end table
21106
21107 So if you only want highlighting in the article buffer and menus in all
21108 buffers, you could say something like:
21109
21110 @lisp
21111 (setq gnus-visual '(article-highlight menu))
21112 @end lisp
21113
21114 If you want highlighting only and no menus whatsoever, you'd say:
21115
21116 @lisp
21117 (setq gnus-visual '(highlight))
21118 @end lisp
21119
21120 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21121 in all Gnus buffers.
21122
21123 Other general variables that influence the look of all buffers include:
21124
21125 @table @code
21126 @item gnus-mouse-face
21127 @vindex gnus-mouse-face
21128 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21129 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21130
21131 @end table
21132
21133 There are hooks associated with the creation of all the different menus:
21134
21135 @table @code
21136
21137 @item gnus-article-menu-hook
21138 @vindex gnus-article-menu-hook
21139 Hook called after creating the article mode menu.
21140
21141 @item gnus-group-menu-hook
21142 @vindex gnus-group-menu-hook
21143 Hook called after creating the group mode menu.
21144
21145 @item gnus-summary-menu-hook
21146 @vindex gnus-summary-menu-hook
21147 Hook called after creating the summary mode menu.
21148
21149 @item gnus-server-menu-hook
21150 @vindex gnus-server-menu-hook
21151 Hook called after creating the server mode menu.
21152
21153 @item gnus-browse-menu-hook
21154 @vindex gnus-browse-menu-hook
21155 Hook called after creating the browse mode menu.
21156
21157 @item gnus-score-menu-hook
21158 @vindex gnus-score-menu-hook
21159 Hook called after creating the score mode menu.
21160
21161 @end table
21162
21163
21164 @node Buttons
21165 @section Buttons
21166 @cindex buttons
21167 @cindex mouse
21168 @cindex click
21169
21170 Those new-fangled @dfn{mouse} contraptions is very popular with the
21171 young, hep kids who don't want to learn the proper way to do things
21172 these days.  Why, I remember way back in the summer of '89, when I was
21173 using Emacs on a Tops 20 system.  Three hundred users on one single
21174 machine, and every user was running Simula compilers.  Bah!
21175
21176 Right.
21177
21178 @vindex gnus-carpal
21179 Well, you can make Gnus display bufferfuls of buttons you can click to
21180 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21181 really.  Tell the chiropractor I sent you.
21182
21183
21184 @table @code
21185
21186 @item gnus-carpal-mode-hook
21187 @vindex gnus-carpal-mode-hook
21188 Hook run in all carpal mode buffers.
21189
21190 @item gnus-carpal-button-face
21191 @vindex gnus-carpal-button-face
21192 Face used on buttons.
21193
21194 @item gnus-carpal-header-face
21195 @vindex gnus-carpal-header-face
21196 Face used on carpal buffer headers.
21197
21198 @item gnus-carpal-group-buffer-buttons
21199 @vindex gnus-carpal-group-buffer-buttons
21200 Buttons in the group buffer.
21201
21202 @item gnus-carpal-summary-buffer-buttons
21203 @vindex gnus-carpal-summary-buffer-buttons
21204 Buttons in the summary buffer.
21205
21206 @item gnus-carpal-server-buffer-buttons
21207 @vindex gnus-carpal-server-buffer-buttons
21208 Buttons in the server buffer.
21209
21210 @item gnus-carpal-browse-buffer-buttons
21211 @vindex gnus-carpal-browse-buffer-buttons
21212 Buttons in the browse buffer.
21213 @end table
21214
21215 All the @code{buttons} variables are lists.  The elements in these list
21216 are either cons cells where the @code{car} contains a text to be displayed and
21217 the @code{cdr} contains a function symbol, or a simple string.
21218
21219
21220 @node Daemons
21221 @section Daemons
21222 @cindex demons
21223 @cindex daemons
21224
21225 Gnus, being larger than any program ever written (allegedly), does lots
21226 of strange stuff that you may wish to have done while you're not
21227 present.  For instance, you may want it to check for new mail once in a
21228 while.  Or you may want it to close down all connections to all servers
21229 when you leave Emacs idle.  And stuff like that.
21230
21231 Gnus will let you do stuff like that by defining various
21232 @dfn{handlers}.  Each handler consists of three elements:  A
21233 @var{function}, a @var{time}, and an @var{idle} parameter.
21234
21235 Here's an example of a handler that closes connections when Emacs has
21236 been idle for thirty minutes:
21237
21238 @lisp
21239 (gnus-demon-close-connections nil 30)
21240 @end lisp
21241
21242 Here's a handler that scans for @acronym{PGP} headers every hour when
21243 Emacs is idle:
21244
21245 @lisp
21246 (gnus-demon-scan-pgp 60 t)
21247 @end lisp
21248
21249 This @var{time} parameter and than @var{idle} parameter work together
21250 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21251 @code{nil}, then the function will be called every @var{time} minutes.
21252
21253 If @var{idle} is @code{t}, then the function will be called after
21254 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21255 the function will never be called.  But once Emacs goes idle, the
21256 function will be called every @var{time} minutes.
21257
21258 If @var{idle} is a number and @var{time} is a number, the function will
21259 be called every @var{time} minutes only when Emacs has been idle for
21260 @var{idle} minutes.
21261
21262 If @var{idle} is a number and @var{time} is @code{nil}, the function
21263 will be called once every time Emacs has been idle for @var{idle}
21264 minutes.
21265
21266 And if @var{time} is a string, it should look like @samp{07:31}, and
21267 the function will then be called once every day somewhere near that
21268 time.  Modified by the @var{idle} parameter, of course.
21269
21270 @vindex gnus-demon-timestep
21271 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21272 seconds.  This is 60 by default.  If you change that variable,
21273 all the timings in the handlers will be affected.)
21274
21275 So, if you want to add a handler, you could put something like this in
21276 your @file{~/.gnus.el} file:
21277
21278 @findex gnus-demon-add-handler
21279 @lisp
21280 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21281 @end lisp
21282
21283 @findex gnus-demon-add-nocem
21284 @findex gnus-demon-add-scanmail
21285 @findex gnus-demon-add-rescan
21286 @findex gnus-demon-add-scan-timestamps
21287 @findex gnus-demon-add-disconnection
21288 Some ready-made functions to do this have been created:
21289 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21290 @code{gnus-demon-add-nntp-close-connection},
21291 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21292 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21293 @file{~/.gnus.el} if you want those abilities.
21294
21295 @findex gnus-demon-init
21296 @findex gnus-demon-cancel
21297 @vindex gnus-demon-handlers
21298 If you add handlers to @code{gnus-demon-handlers} directly, you should
21299 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21300 daemons, you can use the @code{gnus-demon-cancel} function.
21301
21302 Note that adding daemons can be pretty naughty if you over do it.  Adding
21303 functions that scan all news and mail from all servers every two seconds
21304 is a sure-fire way of getting booted off any respectable system.  So
21305 behave.
21306
21307
21308 @node NoCeM
21309 @section NoCeM
21310 @cindex nocem
21311 @cindex spam
21312
21313 @dfn{Spamming} is posting the same article lots and lots of times.
21314 Spamming is bad.  Spamming is evil.
21315
21316 Spamming is usually canceled within a day or so by various anti-spamming
21317 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21318 NoCeM is pronounced ``no see-'em'', and means what the name
21319 implies---these are messages that make the offending articles, like, go
21320 away.
21321
21322 What use are these NoCeM messages if the articles are canceled anyway?
21323 Some sites do not honor cancel messages and some sites just honor cancels
21324 from a select few people.  Then you may wish to make use of the NoCeM
21325 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21326
21327 Gnus can read and parse the messages in this group automatically, and
21328 this will make spam disappear.
21329
21330 There are some variables to customize, of course:
21331
21332 @table @code
21333 @item gnus-use-nocem
21334 @vindex gnus-use-nocem
21335 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21336 by default.
21337
21338 @item gnus-nocem-groups
21339 @vindex gnus-nocem-groups
21340 Gnus will look for NoCeM messages in the groups in this list.  The
21341 default is 
21342 @lisp
21343 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21344  "alt.nocem.misc" "news.admin.net-abuse.announce")
21345 @end lisp
21346
21347 @item gnus-nocem-issuers
21348 @vindex gnus-nocem-issuers
21349 There are many people issuing NoCeM messages.  This list says what
21350 people you want to listen to.  The default is
21351 @lisp
21352 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21353  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21354 @end lisp
21355 fine, upstanding citizens all of them.
21356
21357 Known despammers that you can put in this list are listed at@*
21358 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21359
21360 You do not have to heed NoCeM messages from all these people---just the
21361 ones you want to listen to.  You also don't have to accept all NoCeM
21362 messages from the people you like.  Each NoCeM message has a @dfn{type}
21363 header that gives the message a (more or less, usually less) rigorous
21364 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21365 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21366 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21367 Each condition is either a string (which is a regexp that matches types
21368 you want to use) or a list on the form @code{(not @var{string})}, where
21369 @var{string} is a regexp that matches types you don't want to use.
21370
21371 For instance, if you want all NoCeM messages from Chris Lewis except his
21372 @samp{troll} messages, you'd say:
21373
21374 @lisp
21375 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21376 @end lisp
21377
21378 On the other hand, if you just want nothing but his @samp{spam} and
21379 @samp{spew} messages, you'd say:
21380
21381 @lisp
21382 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21383 @end lisp
21384
21385 The specs are applied left-to-right.
21386
21387
21388 @item gnus-nocem-verifyer
21389 @vindex gnus-nocem-verifyer
21390 @findex mc-verify
21391 This should be a function for verifying that the NoCeM issuer is who she
21392 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21393 function.  If this is too slow and you don't care for verification
21394 (which may be dangerous), you can set this variable to @code{nil}.
21395
21396 If you want signed NoCeM messages to be verified and unsigned messages
21397 not to be verified (but used anyway), you could do something like:
21398
21399 @lisp
21400 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21401
21402 (defun my-gnus-mc-verify ()
21403   (not (eq 'forged
21404            (ignore-errors
21405              (if (mc-verify)
21406                  t
21407                'forged)))))
21408 @end lisp
21409
21410 This might be dangerous, though.
21411
21412 @item gnus-nocem-directory
21413 @vindex gnus-nocem-directory
21414 This is where Gnus will store its NoCeM cache files.  The default is@*
21415 @file{~/News/NoCeM/}.
21416
21417 @item gnus-nocem-expiry-wait
21418 @vindex gnus-nocem-expiry-wait
21419 The number of days before removing old NoCeM entries from the cache.
21420 The default is 15.  If you make it shorter Gnus will be faster, but you
21421 might then see old spam.
21422
21423 @item gnus-nocem-check-from
21424 @vindex gnus-nocem-check-from
21425 Non-@code{nil} means check for valid issuers in message bodies.
21426 Otherwise don't bother fetching articles unless their author matches a
21427 valid issuer; that is much faster if you are selective about the
21428 issuers.
21429
21430 @item gnus-nocem-check-article-limit
21431 @vindex gnus-nocem-check-article-limit
21432 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21433 group.  NoCeM groups can be huge and very slow to process.
21434
21435 @end table
21436
21437 Using NoCeM could potentially be a memory hog.  If you have many living
21438 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21439 big.  If this is a problem, you should kill off all (or most) of your
21440 unsubscribed groups (@pxref{Subscription Commands}).
21441
21442
21443 @node Undo
21444 @section Undo
21445 @cindex undo
21446
21447 It is very useful to be able to undo actions one has done.  In normal
21448 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21449 In Gnus buffers, however, it isn't that simple.
21450
21451 The things Gnus displays in its buffer is of no value whatsoever to
21452 Gnus---it's all just data designed to look nice to the user.
21453 Killing a group in the group buffer with @kbd{C-k} makes the line
21454 disappear, but that's just a side-effect of the real action---the
21455 removal of the group in question from the internal Gnus structures.
21456 Undoing something like that can't be done by the normal Emacs
21457 @code{undo} function.
21458
21459 Gnus tries to remedy this somewhat by keeping track of what the user
21460 does and coming up with actions that would reverse the actions the user
21461 takes.  When the user then presses the @code{undo} key, Gnus will run
21462 the code to reverse the previous action, or the previous actions.
21463 However, not all actions are easily reversible, so Gnus currently offers
21464 a few key functions to be undoable.  These include killing groups,
21465 yanking groups, and changing the list of read articles of groups.
21466 That's it, really.  More functions may be added in the future, but each
21467 added function means an increase in data to be stored, so Gnus will
21468 never be totally undoable.
21469
21470 @findex gnus-undo-mode
21471 @vindex gnus-use-undo
21472 @findex gnus-undo
21473 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21474 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21475 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21476 command, which should feel kinda like the normal Emacs @code{undo}
21477 command.
21478
21479
21480 @node Predicate Specifiers
21481 @section Predicate Specifiers
21482 @cindex predicate specifiers
21483
21484 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21485 form that allows flexible specification of predicates without having
21486 to type all that much.
21487
21488 These specifiers are lists consisting of functions, symbols and lists.
21489
21490 Here's an example:
21491
21492 @lisp
21493 (or gnus-article-unseen-p
21494     gnus-article-unread-p)
21495 @end lisp
21496
21497 The available symbols are @code{or}, @code{and} and @code{not}.  The
21498 functions all take one parameter.
21499
21500 @findex gnus-make-predicate
21501 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21502 to create a function that can be called.  This input parameter to this
21503 function will be passed along to all the functions in the predicate
21504 specifier.
21505
21506
21507 @node Moderation
21508 @section Moderation
21509 @cindex moderation
21510
21511 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21512 It is not included in the standard Gnus package.  Write a mail to
21513 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21514 get a copy.
21515
21516 The moderation package is implemented as a minor mode for summary
21517 buffers.  Put
21518
21519 @lisp
21520 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21521 @end lisp
21522
21523 in your @file{~/.gnus.el} file.
21524
21525 If you are the moderator of @samp{rec.zoofle}, this is how it's
21526 supposed to work:
21527
21528 @enumerate
21529 @item
21530 You split your incoming mail by matching on
21531 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21532 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21533
21534 @item
21535 You enter that group once in a while and post articles using the @kbd{e}
21536 (edit-and-post) or @kbd{s} (just send unedited) commands.
21537
21538 @item
21539 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21540 articles that weren't approved by you, you can cancel them with the
21541 @kbd{c} command.
21542 @end enumerate
21543
21544 To use moderation mode in these two groups, say:
21545
21546 @lisp
21547 (setq gnus-moderated-list
21548       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21549 @end lisp
21550
21551
21552 @node Image Enhancements
21553 @section Image Enhancements
21554
21555 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21556 support images yet.}, is able to display pictures and stuff, so Gnus has
21557 taken advantage of that.
21558
21559 @menu
21560 * Picons::                      How to display pictures of what you're reading.
21561 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21562 * X-Face::                      Display a funky, teensy black-and-white image.
21563 * XVarious::                    Other XEmacsy Gnusey variables.
21564 @end menu
21565
21566
21567 @node Picons
21568 @subsection Picons
21569
21570 @iftex
21571 @iflatex
21572 \include{picons}
21573 @end iflatex
21574 @end iftex
21575
21576 So@dots{}  You want to slow down your news reader even more!  This is a
21577 good way to do so.  Its also a great way to impress people staring
21578 over your shoulder as you read news.
21579
21580 What are Picons?  To quote directly from the Picons Web site:
21581
21582 @iftex
21583 @iflatex
21584 \margindex{}
21585 @end iflatex
21586 @end iftex
21587
21588 @quotation
21589 @dfn{Picons} is short for ``personal icons''.  They're small,
21590 constrained images used to represent users and domains on the net,
21591 organized into databases so that the appropriate image for a given
21592 e-mail address can be found.  Besides users and domains, there are picon
21593 databases for Usenet newsgroups and weather forecasts.  The picons are
21594 in either monochrome @code{XBM} format or color @code{XPM} and
21595 @code{GIF} formats.
21596 @end quotation
21597
21598 @vindex gnus-picon-databases
21599 For instructions on obtaining and installing the picons databases,
21600 point your Web browser at
21601 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21602
21603 If you are using Debian GNU/Linux, saying @samp{apt-get install
21604 picons.*} will install the picons where Gnus can find them.
21605
21606 To enable displaying picons, simply make sure that
21607 @code{gnus-picon-databases} points to the directory containing the
21608 Picons databases.
21609
21610 The following variables offer control over where things are located.
21611
21612 @table @code
21613
21614 @item gnus-picon-databases
21615 @vindex gnus-picon-databases
21616 The location of the picons database.  This is a list of directories
21617 containing the @file{news}, @file{domains}, @file{users} (and so on)
21618 subdirectories.  Defaults to @code{("/usr/lib/picon"
21619 "/usr/local/faces")}.
21620
21621 @item gnus-picon-news-directories
21622 @vindex gnus-picon-news-directories
21623 List of subdirectories to search in @code{gnus-picon-databases} for
21624 newsgroups faces.  @code{("news")} is the default.
21625
21626 @item gnus-picon-user-directories
21627 @vindex gnus-picon-user-directories
21628 List of subdirectories to search in @code{gnus-picon-databases} for user
21629 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21630
21631 @item gnus-picon-domain-directories
21632 @vindex gnus-picon-domain-directories
21633 List of subdirectories to search in @code{gnus-picon-databases} for
21634 domain name faces.  Defaults to @code{("domains")}.  Some people may
21635 want to add @samp{"unknown"} to this list.
21636
21637 @item gnus-picon-file-types
21638 @vindex gnus-picon-file-types
21639 Ordered list of suffixes on picon file names to try.  Defaults to
21640 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21641
21642 @end table
21643
21644 @node Smileys
21645 @subsection Smileys
21646 @cindex smileys
21647
21648 @iftex
21649 @iflatex
21650 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21651 \input{smiley}
21652 @end iflatex
21653 @end iftex
21654
21655 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21656 currently the only package that uses Smiley, it is documented here.
21657
21658 In short---to use Smiley in Gnus, put the following in your
21659 @file{~/.gnus.el} file:
21660
21661 @lisp
21662 (setq gnus-treat-display-smileys t)
21663 @end lisp
21664
21665 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21666 the like---to pictures and displays those instead of the text smiley
21667 faces.  The conversion is controlled by a list of regexps that matches
21668 text and maps that to file names.
21669
21670 @vindex smiley-regexp-alist
21671 The alist used is specified by the @code{smiley-regexp-alist}
21672 variable.  The first item in each element is the regexp to be matched;
21673 the second element is the regexp match group that is to be replaced by
21674 the picture; and the third element is the name of the file to be
21675 displayed.
21676
21677 The following variables customize where Smiley will look for these
21678 files:
21679
21680 @table @code
21681
21682 @item smiley-data-directory
21683 @vindex smiley-data-directory
21684 Where Smiley will look for smiley faces files.
21685
21686 @item gnus-smiley-file-types
21687 @vindex gnus-smiley-file-types
21688 List of suffixes on smiley file names to try.
21689
21690 @end table
21691
21692
21693 @node X-Face
21694 @subsection X-Face
21695 @cindex x-face
21696
21697 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21698 depth) image that's supposed to represent the author of the message.
21699 It seems to be supported by an ever-growing number of mail and news
21700 readers.
21701
21702 @cindex x-face
21703 @findex gnus-article-display-x-face
21704 @findex gnus-article-x-face-command
21705 @vindex gnus-article-x-face-command
21706 @vindex gnus-article-x-face-too-ugly
21707 @iftex
21708 @iflatex
21709 \include{xface}
21710 @end iflatex
21711 @end iftex
21712 @c @anchor{X-Face}
21713
21714 Decoding an @code{X-Face} header either requires an Emacs that has
21715 @samp{compface} support (which most XEmacs versions has), or that you
21716 have @samp{compface} installed on your system.  If either is true,
21717 Gnus will default to displaying @code{X-Face} headers.
21718
21719 The variable that controls this is the
21720 @code{gnus-article-x-face-command} variable.  If this variable is a
21721 string, this string will be executed in a sub-shell.  If it is a
21722 function, this function will be called with the face as the argument.
21723 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21724 the @code{From} header, the face will not be shown.
21725
21726 The default action under Emacs 20 is to fork off the @code{display}
21727 program@footnote{@code{display} is from the ImageMagick package.  For
21728 the @code{uncompface} and @code{icontopbm} programs look for a package
21729 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21730 view the face.
21731
21732 Under XEmacs or Emacs 21+ with suitable image support, the default
21733 action is to display the face before the @code{From} header.  (It's
21734 nicer if XEmacs has been compiled with @code{X-Face} support---that
21735 will make display somewhat faster.  If there's no native @code{X-Face}
21736 support, Gnus will try to convert the @code{X-Face} header using
21737 external programs from the @code{pbmplus} package and
21738 friends.@footnote{On a GNU/Linux system look for packages with names
21739 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21740
21741 (Note: @code{x-face} is used in the variable/function names, not
21742 @code{xface}).
21743
21744 Gnus provides a few convenience functions and variables to allow
21745 easier insertion of X-Face headers in outgoing messages.
21746
21747 @findex gnus-random-x-face
21748 @vindex gnus-convert-pbm-to-x-face-command
21749 @vindex gnus-x-face-directory
21750 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21751 @code{gnus-x-face-directory} and picks one at random, and then
21752 converts it to the X-Face format by using the
21753 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21754 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21755 header data as a string.
21756
21757 @findex gnus-insert-random-x-face-header
21758 @code{gnus-insert-random-x-face-header} calls
21759 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21760 randomly generated data.
21761
21762 @findex gnus-x-face-from-file
21763 @vindex gnus-convert-image-to-x-face-command
21764 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21765 converts the file to X-Face format by using the
21766 @code{gnus-convert-image-to-x-face-command} shell command.
21767
21768 Here's how you would typically use the first function.  Put something
21769 like the following in your @file{~/.gnus.el} file:
21770
21771 @lisp
21772 (setq message-required-news-headers
21773       (nconc message-required-news-headers
21774              (list '(X-Face . gnus-random-x-face))))
21775 @end lisp
21776
21777 Using the last function would be something like this:
21778
21779 @lisp
21780 (setq message-required-news-headers
21781       (nconc message-required-news-headers
21782              (list '(X-Face . (lambda ()
21783                                 (gnus-x-face-from-file
21784                                  "~/My-face.gif"))))))
21785 @end lisp
21786
21787
21788 @node XVarious
21789 @subsection Various XEmacs Variables
21790
21791 @table @code
21792 @item gnus-xmas-glyph-directory
21793 @vindex gnus-xmas-glyph-directory
21794 This is where Gnus will look for pictures.  Gnus will normally
21795 auto-detect this directory, but you may set it manually if you have an
21796 unusual directory structure.
21797
21798 @item gnus-xmas-logo-color-alist
21799 @vindex gnus-xmas-logo-color-alist
21800 This is an alist where the key is a type symbol and the values are the
21801 foreground and background color of the splash page glyph.
21802
21803 @item gnus-xmas-logo-color-style
21804 @vindex gnus-xmas-logo-color-style
21805 This is the key used to look up the color in the alist described above.
21806 Valid values include @code{flame}, @code{pine}, @code{moss},
21807 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21808 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21809
21810 @item gnus-xmas-modeline-glyph
21811 @vindex gnus-xmas-modeline-glyph
21812 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21813 default.
21814
21815 @end table
21816
21817 @subsubsection Toolbar
21818
21819 @table @code
21820
21821 @item gnus-use-toolbar
21822 @vindex gnus-use-toolbar
21823 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21824 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21825 @code{right-toolbar}, or @code{left-toolbar}.
21826
21827 @item gnus-group-toolbar
21828 @vindex gnus-group-toolbar
21829 The toolbar in the group buffer.
21830
21831 @item gnus-summary-toolbar
21832 @vindex gnus-summary-toolbar
21833 The toolbar in the summary buffer.
21834
21835 @item gnus-summary-mail-toolbar
21836 @vindex gnus-summary-mail-toolbar
21837 The toolbar in the summary buffer of mail groups.
21838
21839 @end table
21840
21841 @iftex
21842 @iflatex
21843 \margindex{}
21844 @end iflatex
21845 @end iftex
21846
21847
21848 @node Fuzzy Matching
21849 @section Fuzzy Matching
21850 @cindex fuzzy matching
21851
21852 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21853 things like scoring, thread gathering and thread comparison.
21854
21855 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21856 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21857 means, and the implementation has changed over time.
21858
21859 Basically, it tries to remove all noise from lines before comparing.
21860 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21861 out of the strings before comparing the results.  This often leads to
21862 adequate results---even when faced with strings generated by text
21863 manglers masquerading as newsreaders.
21864
21865
21866 @node Thwarting Email Spam
21867 @section Thwarting Email Spam
21868 @cindex email spam
21869 @cindex spam
21870 @cindex UCE
21871 @cindex unsolicited commercial email
21872
21873 In these last days of the Usenet, commercial vultures are hanging about
21874 and grepping through news like crazy to find email addresses they can
21875 foist off their scams and products to.  As a reaction to this, many
21876 people have started putting nonsense addresses into their @code{From}
21877 lines.  I think this is counterproductive---it makes it difficult for
21878 people to send you legitimate mail in response to things you write, as
21879 well as making it difficult to see who wrote what.  This rewriting may
21880 perhaps be a bigger menace than the unsolicited commercial email itself
21881 in the end.
21882
21883 The biggest problem I have with email spam is that it comes in under
21884 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21885 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21886 mail group, only to find two pyramid schemes, seven advertisements
21887 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21888 and one mail asking me to repent and find some god.
21889
21890 This is annoying.  Here's what you can do about it.
21891
21892 @menu
21893 * The problem of spam::         Some background, and some solutions
21894 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21895 * SpamAssassin::                How to use external anti-spam tools.
21896 * Hashcash::                    Reduce spam by burning CPU time.
21897 * Filtering Spam Using The Spam ELisp Package::  
21898 * Filtering Spam Using Statistics with spam-stat::  
21899 @end menu
21900
21901 @node The problem of spam
21902 @subsection The problem of spam
21903 @cindex email spam
21904 @cindex spam filtering approaches
21905 @cindex filtering approaches, spam
21906 @cindex UCE
21907 @cindex unsolicited commercial email
21908
21909 First, some background on spam.
21910
21911 If you have access to e-mail, you are familiar with spam (technically
21912 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21913 because e-mail delivery is very cheap compared to paper mail, so only
21914 a very small percentage of people need to respond to an UCE to make it
21915 worthwhile to the advertiser.  Ironically, one of the most common
21916 spams is the one offering a database of e-mail addresses for further
21917 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21918 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21919
21920 Spam comes from a wide variety of sources.  It is simply impossible to
21921 dispose of all spam without discarding useful messages.  A good
21922 example is the TMDA system, which requires senders
21923 unknown to you to confirm themselves as legitimate senders before
21924 their e-mail can reach you.  Without getting into the technical side
21925 of TMDA, a downside is clearly that e-mail from legitimate sources may
21926 be discarded if those sources can't or won't confirm themselves
21927 through the TMDA system.  Another problem with TMDA is that it
21928 requires its users to have a basic understanding of e-mail delivery
21929 and processing.
21930
21931 The simplest approach to filtering spam is filtering.  If you get 200
21932 spam messages per day from @samp{random-address@@vmadmin.com}, you
21933 block @samp{vmadmin.com}.  If you get 200 messages about
21934 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21935 message.  This, unfortunately, is a great way to discard legitimate
21936 e-mail.  For instance, the very informative and useful RISKS digest
21937 has been blocked by overzealous mail filters because it
21938 @strong{contained} words that were common in spam messages.
21939 Nevertheless, in isolated cases, with great care, direct filtering of
21940 mail can be useful.
21941
21942 Another approach to filtering e-mail is the distributed spam
21943 processing, for instance DCC implements such a system.  In essence,
21944 @code{N} systems around the world agree that a machine @samp{X} in
21945 China, Ghana, or California is sending out spam e-mail, and these
21946 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21947 a database.  The criteria for spam detection vary---it may be the
21948 number of messages sent, the content of the messages, and so on.  When
21949 a user of the distributed processing system wants to find out if a
21950 message is spam, he consults one of those @code{N} systems.
21951
21952 Distributed spam processing works very well against spammers that send
21953 a large number of messages at once, but it requires the user to set up
21954 fairly complicated checks.  There are commercial and free distributed
21955 spam processing systems.  Distributed spam processing has its risks as
21956 well.  For instance legitimate e-mail senders have been accused of
21957 sending spam, and their web sites have been shut down for some time
21958 because of the incident.
21959
21960 The statistical approach to spam filtering is also popular.  It is
21961 based on a statistical analysis of previous spam messages.  Usually
21962 the analysis is a simple word frequency count, with perhaps pairs of
21963 words or 3-word combinations thrown into the mix.  Statistical
21964 analysis of spam works very well in most of the cases, but it can
21965 classify legitimate e-mail as spam in some cases.  It takes time to
21966 run the analysis, the full message must be analyzed, and the user has
21967 to store the database of spam analyses.
21968
21969 @node Anti-Spam Basics
21970 @subsection Anti-Spam Basics
21971 @cindex email spam
21972 @cindex spam
21973 @cindex UCE
21974 @cindex unsolicited commercial email
21975
21976 One way of dealing with spam is having Gnus split out all spam into a
21977 @samp{spam} mail group (@pxref{Splitting Mail}).
21978
21979 First, pick one (1) valid mail address that you can be reached at, and
21980 put it in your @code{From} header of all your news articles.  (I've
21981 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21982 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21983 sysadmin whether your sendmail installation accepts keywords in the local
21984 part of the mail address.)
21985
21986 @lisp
21987 (setq message-default-news-headers
21988       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21989 @end lisp
21990
21991 Then put the following split rule in @code{nnmail-split-fancy}
21992 (@pxref{Fancy Mail Splitting}):
21993
21994 @lisp
21995 (
21996  ...
21997  (to "larsi@@trym.ifi.uio.no"
21998       (| ("subject" "re:.*" "misc")
21999          ("references" ".*@@.*" "misc")
22000          "spam"))
22001  ...
22002 )
22003 @end lisp
22004
22005 This says that all mail to this address is suspect, but if it has a
22006 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22007 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22008 (This idea probably comes from Tim Pierce.)
22009
22010 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22011 and do not include your email address explicitly in the @code{To}
22012 header.  Why they do this is unknown---perhaps it's to thwart this
22013 thwarting scheme?  In any case, this is trivial to deal with---you just
22014 put anything not addressed to you in the @samp{spam} group by ending
22015 your fancy split rule in this way:
22016
22017 @lisp
22018 (
22019  ...
22020  (to "larsi" "misc")
22021  "spam")
22022 @end lisp
22023
22024 In my experience, this will sort virtually everything into the right
22025 group.  You still have to check the @samp{spam} group from time to time to
22026 check for legitimate mail, though.  If you feel like being a good net
22027 citizen, you can even send off complaints to the proper authorities on
22028 each unsolicited commercial email---at your leisure.
22029
22030 This works for me.  It allows people an easy way to contact me (they can
22031 just press @kbd{r} in the usual way), and I'm not bothered at all with
22032 spam.  It's a win-win situation.  Forging @code{From} headers to point
22033 to non-existent domains is yucky, in my opinion.
22034
22035
22036
22037 @node SpamAssassin
22038 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22039 @cindex SpamAssassin
22040 @cindex Vipul's Razor
22041 @cindex DCC
22042
22043 The days where the hints in the previous section was sufficient in
22044 avoiding spam is coming to an end.  There are many tools out there
22045 that claim to reduce the amount of spam you get.  This section could
22046 easily become outdated fast, as new products replace old, but
22047 fortunately most of these tools seem to have similar interfaces.  Even
22048 though this section will use SpamAssassin as an example, it should be
22049 easy to adapt it to most other tools.
22050
22051 If the tool you are using is not installed on the mail server, you
22052 need to invoke it yourself.  Ideas on how to use the
22053 @code{:postscript} mail source parameter (@pxref{Mail Source
22054 Specifiers}) follows.
22055
22056 @lisp
22057 (setq mail-sources
22058       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22059         (pop :user "jrl"
22060              :server "pophost"
22061              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22062 @end lisp
22063
22064 Once you managed to process your incoming spool somehow, thus making
22065 the mail contain e.g. a header indicating it is spam, you are ready to
22066 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22067
22068 @lisp
22069 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22070                              ...))
22071 @end lisp
22072
22073 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22074
22075 @lisp
22076 (setq nnmail-split-methods 'nnmail-split-fancy
22077       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22078                              ...))
22079 @end lisp
22080
22081 Some people might not like the idea of piping the mail through various
22082 programs using a @code{:prescript} (if some program is buggy, you
22083 might lose all mail).  If you are one of them, another solution is to
22084 call the external tools during splitting.  Example fancy split method:
22085
22086 @lisp
22087 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22088                              ...))
22089 (defun kevin-spamassassin ()
22090   (save-excursion
22091     (let ((buf (or (get-buffer " *nnmail incoming*")
22092                    (get-buffer " *nnml move*"))))
22093       (if (not buf)
22094           (progn (message "Oops, cannot find message buffer") nil)
22095         (set-buffer buf)
22096         (if (eq 1 (call-process-region (point-min) (point-max)
22097                                        "spamc" nil nil nil "-c"))
22098             "spam")))))
22099 @end lisp
22100
22101 That is about it.  As some spam is likely to get through anyway, you
22102 might want to have a nifty function to call when you happen to read
22103 spam.  And here is the nifty function:
22104
22105 @lisp
22106  (defun my-gnus-raze-spam ()
22107   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22108   (interactive)
22109   (gnus-summary-show-raw-article)
22110   (gnus-summary-save-in-pipe "razor-report -f -d")
22111   (gnus-summary-mark-as-expirable 1))
22112 @end lisp
22113
22114 @node Hashcash
22115 @subsection Hashcash
22116 @cindex hashcash
22117
22118 A novel technique to fight spam is to require senders to do something
22119 costly for each message they send.  This has the obvious drawback that
22120 you cannot rely on that everyone in the world uses this technique,
22121 since it is not part of the Internet standards, but it may be useful
22122 in smaller communities.
22123
22124 While the tools in the previous section work well in practice, they
22125 work only because the tools are constantly maintained and updated as
22126 new form of spam appears.  This means that a small percentage of spam
22127 will always get through.  It also means that somewhere, someone needs
22128 to read lots of spam to update these tools.  Hashcash avoids that, but
22129 instead requires that everyone you communicate with supports the
22130 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22131 The approaches have their own advantages and disadvantages, but as
22132 often in the real world, a combination of them is stronger than either
22133 one of them separately.
22134
22135 @cindex X-Hashcash
22136 The ``something costly'' is to burn CPU time, more specifically to
22137 compute a hash collision up to a certain number of bits.  The
22138 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22139 header. For more details, and for the external application
22140 @code{hashcash} you need to install to use this feature, see
22141 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22142 information can be found at @uref{http://www.camram.org/}.
22143
22144 If you wish to call hashcash for each message you send, say something
22145 like:
22146
22147 @lisp
22148 (require 'hashcash)
22149 (add-hook 'message-send-hook 'mail-add-payment)
22150 @end lisp
22151
22152 The @code{hashcash.el} library can be found in the Gnus development
22153 contrib directory. or at
22154 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22155
22156 You will need to set up some additional variables as well:
22157
22158 @table @code
22159
22160 @item hashcash-default-payment
22161 @vindex hashcash-default-payment
22162 This variable indicates the default number of bits the hash collision
22163 should consist of.  By default this is 0, meaning nothing will be
22164 done.  Suggested useful values include 17 to 29.
22165
22166 @item hashcash-payment-alist
22167 @vindex hashcash-payment-alist
22168 Some receivers may require you to spend burn more CPU time than the
22169 default.  This variable contains a list of @samp{(@var{addr}
22170 @var{amount})} cells, where @var{addr} is the receiver (email address
22171 or newsgroup) and @var{amount} is the number of bits in the collision
22172 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22173 @var{amount})} cells, where the @var{string} is the string to use
22174 (normally the email address or newsgroup name is used).
22175
22176 @item hashcash
22177 @vindex hashcash
22178 Where the @code{hashcash} binary is installed.
22179
22180 @end table
22181
22182 Currently there is no built in functionality in Gnus to verify
22183 hashcash cookies, it is expected that this is performed by your hand
22184 customized mail filtering scripts.  Improvements in this area would be
22185 a useful contribution, however.
22186
22187 @node Filtering Spam Using The Spam ELisp Package
22188 @subsection Filtering Spam Using The Spam ELisp Package
22189 @cindex spam filtering
22190 @cindex spam
22191
22192 The idea behind @code{spam.el} is to have a control center for spam detection
22193 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
22194 filters incoming mail, and it analyzes mail known to be spam or ham.
22195 @emph{Ham} is the name used throughout @code{spam.el} to indicate
22196 non-spam messages.
22197
22198 So, what happens when you load @code{spam.el}?  First of all, you get
22199 the following keyboard commands:
22200
22201 @table @kbd
22202
22203 @item M-d
22204 @itemx M s x
22205 @itemx S x
22206 @kindex M-d
22207 @kindex S x
22208 @kindex M s x
22209 @findex gnus-summary-mark-as-spam
22210 @code{gnus-summary-mark-as-spam}.
22211
22212 Mark current article as spam, showing it with the @samp{$} mark.
22213 Whenever you see a spam article, make sure to mark its summary line
22214 with @kbd{M-d} before leaving the group.  This is done automatically
22215 for unread articles in @emph{spam} groups.
22216
22217 @item M s t
22218 @itemx S t
22219 @kindex M s t
22220 @kindex S t
22221 @findex spam-bogofilter-score
22222 @code{spam-bogofilter-score}.
22223
22224 You must have Bogofilter installed for that command to work properly.
22225
22226 @xref{Bogofilter}.
22227
22228 @end table
22229
22230 Also, when you load @code{spam.el}, you will be able to customize its
22231 variables.  Try @code{customize-group} on the @samp{spam} variable
22232 group.
22233
22234 @vindex gnus-spam-process-newsgroups
22235 The concepts of ham processors and spam processors are very important.
22236 Ham processors and spam processors for a group can be set with the
22237 @code{spam-process} group parameter, or the
22238 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22239 mail known to be non-spam (@emph{ham}) and process it in some way so
22240 that later similar mail will also be considered non-spam.  Spam
22241 processors take mail known to be spam and process it so similar spam
22242 will be detected later.
22243
22244 @vindex gnus-spam-newsgroup-contents
22245 Gnus learns from the spam you get.  You have to collect your spam in
22246 one or more spam groups, and set or customize the variable
22247 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22248 groups to contain spam by setting their group parameter
22249 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22250 by customizing the corresponding variable
22251 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22252 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22253 also be used to declare groups as @emph{ham} groups if you set their
22254 classification to @code{gnus-group-spam-classification-ham}.  If
22255 groups are not classified by means of @code{spam-junk-mailgroups},
22256 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22257 considered @emph{unclassified}.  All groups are unclassified by
22258 default.
22259
22260 @vindex gnus-spam-mark
22261 @cindex $
22262 In spam groups, all messages are considered to be spam by default:
22263 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22264 group.  If you have seen a message, had it marked as spam, then
22265 unmarked it, it won't be marked as spam when you enter the group
22266 thereafter.  You can disable that behavior, so all unread messages
22267 will get the @samp{$} mark, if you set the
22268 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22269 remove the @samp{$} mark when you are in the group summary buffer for
22270 every message that is not spam after all.  To remove the @samp{$}
22271 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22272 declaring it read the non-spam way.  When you leave a group, all
22273 spam-marked (@samp{$}) articles are sent to a spam processor which
22274 will study them as spam samples.
22275
22276 Messages may also be deleted in various other ways, and unless
22277 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22278 and @samp{r} for default read or explicit delete, marks @samp{X} and
22279 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22280 low scores, are all considered to be associated with articles which
22281 are not spam.  This assumption might be false, in particular if you
22282 use kill files or score files as means for detecting genuine spam, you
22283 should then adjust the @code{ham-marks} group parameter.
22284
22285 @defvar ham-marks
22286 You can customize this group or topic parameter to be the list of
22287 marks you want to consider ham.  By default, the list contains the
22288 deleted, read, killed, kill-filed, and low-score marks.
22289 @end defvar
22290
22291 @defvar spam-marks
22292 You can customize this group or topic parameter to be the list of
22293 marks you want to consider spam.  By default, the list contains only
22294 the spam mark.
22295 @end defvar
22296
22297 When you leave @emph{any} group, regardless of its
22298 @code{spam-contents} classification, all spam-marked articles are sent
22299 to a spam processor, which will study these as spam samples.  If you
22300 explicit kill a lot, you might sometimes end up with articles marked
22301 @samp{K} which you never saw, and which might accidentally contain
22302 spam.  Best is to make sure that real spam is marked with @samp{$},
22303 and nothing else.
22304
22305 @vindex gnus-ham-process-destinations
22306 When you leave a @emph{spam} group, all spam-marked articles are
22307 marked as expired after processing with the spam processor.  This is
22308 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22309 @strong{ham} articles in a spam group will be moved to a location
22310 determined by either the @code{ham-process-destination} group
22311 parameter or a match in the @code{gnus-ham-process-destinations}
22312 variable, which is a list of regular expressions matched with group
22313 names (it's easiest to customize this variable with
22314 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22315 location is a group name.  If the @code{ham-process-destination}
22316 parameter is not set, ham articles are left in place.  If the
22317 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22318 set, the ham articles are marked as unread before being moved.
22319
22320 When you leave a @emph{ham} group, all ham-marked articles are sent to
22321 a ham processor, which will study these as non-spam samples.
22322
22323 @vindex gnus-spam-process-destinations
22324 When you leave a @emph{ham} or @emph{unclassified} group, all
22325 @strong{spam} articles are moved to a location determined by either
22326 the @code{spam-process-destination} group parameter or a match in the
22327 @code{gnus-spam-process-destinations} variable, which is a list of
22328 regular expressions matched with group names (it's easiest to
22329 customize this variable with @code{customize-variable
22330 gnus-spam-process-destinations}).  The ultimate location is a group
22331 name.  If the @code{spam-process-destination} parameter is not set,
22332 the spam articles are only expired.
22333
22334 To use the @code{spam.el} facilities for incoming mail filtering, you
22335 must add the following to your fancy split list
22336 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22337
22338 @example
22339 (: spam-split)
22340 @end example
22341
22342 Note that the fancy split may be called @code{nnmail-split-fancy} or
22343 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22344 nnimap back ends to retrieve your mail.
22345
22346 The @code{spam-split} function will process incoming mail and send the
22347 mail considered to be spam into the group name given by the variable
22348 @code{spam-split-group}.  By default that group name is @samp{spam},
22349 but you can customize @code{spam-split-group}.
22350
22351 You can also give @code{spam-split} a parameter,
22352 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22353
22354 Take these split rules (with @code{spam-use-regex-headers} and
22355 @code{spam-use-blackholes} set):
22356
22357 @example
22358  nnimap-split-fancy '(|
22359                       (any "ding" "ding")
22360                       (: spam-split)
22361                       ;; default mailbox
22362                       "mail")
22363 @end example
22364
22365 Now, the problem is that you want all ding messages to make it to the
22366 ding folder.  But that will let obvious spam (for example, spam
22367 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22368 when it's sent to the ding list.  On the other hand, some messages to
22369 the ding list are from a mail server in the blackhole list, so the
22370 invocation of @code{spam-split} can't be before the ding rule.
22371
22372 You can let SpamAssassin headers supercede ding rules, but all other
22373 @code{spam-split} rules (including a second invocation of the
22374 regex-headers check) will be after the ding rule:
22375
22376 @example
22377  nnimap-split-fancy '(|
22378                       (: spam-split 'spam-use-regex-headers)
22379                       (any "ding" "ding")
22380                       (: spam-split)
22381                       ;; default mailbox
22382                       "mail")
22383 @end example
22384
22385 Basically, this lets you invoke specific @code{spam-split} checks
22386 depending on your particular needs.  You don't have to throw all mail
22387 into all the spam tests.  Another reason why this is nice is that
22388 messages to mailing lists you have rules for don't have to have
22389 resource-intensive blackhole checks performed on them.  You could also
22390 specify different spam checks for your nnmail split vs. your nnimap
22391 split.  Go crazy.
22392
22393 You still have to have specific checks such as
22394 @code{spam-use-regex-headers} set to t, even if you specifically
22395 invoke @code{spam-split} with the check.  The reason is that when
22396 loading @code{spam.el}, some conditional loading is done depending on
22397 what @code{spam-use-xyz} variables you have set.
22398
22399 @emph{Note for IMAP users}
22400
22401 The boolean variable @code{nnimap-split-download-body} needs to be
22402 set, if you want to split based on the whole message instead of just
22403 the headers.  By default, the nnimap back end will only retrieve the
22404 message headers.  If you use @code{spam-check-bogofilter},
22405 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22406 can benefit from the full message body), you should set this variable.
22407 It is not set by default because it will slow @acronym{IMAP} down, and
22408 that is not an appropriate decision to make on behalf of the user.
22409
22410 @xref{Splitting in IMAP}.
22411
22412 @emph{TODO: Currently, spam.el only supports insertion of articles
22413 into a back end.  There is no way to tell spam.el that an article is no
22414 longer spam or ham.}
22415
22416 @emph{TODO: spam.el needs to provide a uniform way of training all the
22417 statistical databases.  Some have that functionality built-in, others
22418 don't.}
22419
22420 The following are the methods you can use to control the behavior of
22421 @code{spam-split} and their corresponding spam and ham processors:
22422
22423 @menu
22424 * Blacklists and Whitelists::   
22425 * BBDB Whitelists::             
22426 * Gmane Spam Reporting::        
22427 * Anti-spam Hashcash Payments::  
22428 * Blackholes::                  
22429 * Regular Expressions Header Matching::  
22430 * Bogofilter::                  
22431 * ifile spam filtering::        
22432 * spam-stat spam filtering::    
22433 * Extending the spam elisp package::  
22434 @end menu
22435
22436 @node Blacklists and Whitelists
22437 @subsubsection Blacklists and Whitelists
22438 @cindex spam filtering
22439 @cindex whitelists, spam filtering
22440 @cindex blacklists, spam filtering
22441 @cindex spam
22442
22443 @defvar spam-use-blacklist
22444
22445 Set this variable to @code{t} if you want to use blacklists when
22446 splitting incoming mail.  Messages whose senders are in the blacklist
22447 will be sent to the @code{spam-split-group}.  This is an explicit
22448 filter, meaning that it acts only on mail senders @emph{declared} to
22449 be spammers.
22450
22451 @end defvar
22452
22453 @defvar spam-use-whitelist
22454
22455 Set this variable to @code{t} if you want to use whitelists when
22456 splitting incoming mail.  Messages whose senders are not in the
22457 whitelist will be sent to the next spam-split rule.  This is an
22458 explicit filter, meaning that unless someone is in the whitelist, their
22459 messages are not assumed to be spam or ham.
22460
22461 @end defvar
22462
22463 @defvar spam-use-whitelist-exclusive
22464
22465 Set this variable to @code{t} if you want to use whitelists as an
22466 implicit filter, meaning that every message will be considered spam
22467 unless the sender is in the whitelist.  Use with care.
22468
22469 @end defvar
22470
22471 @defvar gnus-group-spam-exit-processor-blacklist
22472
22473 Add this symbol to a group's @code{spam-process} parameter by
22474 customizing the group parameters or the
22475 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22476 added to a group's @code{spam-process} parameter, the senders of
22477 spam-marked articles will be added to the blacklist.
22478
22479 @end defvar
22480
22481 @defvar gnus-group-ham-exit-processor-whitelist
22482
22483 Add this symbol to a group's @code{spam-process} parameter by
22484 customizing the group parameters or the
22485 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22486 added to a group's @code{spam-process} parameter, the senders of
22487 ham-marked articles in @emph{ham} groups will be added to the
22488 whitelist.  Note that this ham processor has no effect in @emph{spam}
22489 or @emph{unclassified} groups.
22490
22491 @end defvar
22492
22493 Blacklists are lists of regular expressions matching addresses you
22494 consider to be spam senders.  For instance, to block mail from any
22495 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22496 blacklist.  You start out with an empty blacklist.  Blacklist entries
22497 use the Emacs regular expression syntax.
22498
22499 Conversely, whitelists tell Gnus what addresses are considered
22500 legitimate.  All messages from whitelisted addresses are considered
22501 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22502 Emacs regular expression syntax.
22503
22504 The blacklist and whitelist file locations can be customized with the
22505 @code{spam-directory} variable (@file{~/News/spam} by default), or
22506 the @code{spam-whitelist} and @code{spam-blacklist} variables
22507 directly.  The whitelist and blacklist files will by default be in the
22508 @code{spam-directory} directory, named @file{whitelist} and
22509 @file{blacklist} respectively.
22510
22511 @node BBDB Whitelists
22512 @subsubsection BBDB Whitelists
22513 @cindex spam filtering
22514 @cindex BBDB whitelists, spam filtering
22515 @cindex BBDB, spam filtering
22516 @cindex spam
22517
22518 @defvar spam-use-BBDB
22519
22520 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22521 Whitelists}), but uses the BBDB as the source of whitelisted
22522 addresses, without regular expressions.  You must have the BBDB loaded
22523 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22524 not in the BBDB will be sent to the next spam-split rule.  This is an
22525 explicit filter, meaning that unless someone is in the BBDB, their
22526 messages are not assumed to be spam or ham.
22527
22528 @end defvar
22529
22530 @defvar spam-use-BBDB-exclusive
22531
22532 Set this variable to @code{t} if you want to use the BBDB as an
22533 implicit filter, meaning that every message will be considered spam
22534 unless the sender is in the BBDB.  Use with care.  Only sender
22535 addresses in the BBDB will be allowed through; all others will be
22536 classified as spammers.
22537
22538 @end defvar
22539
22540 @defvar gnus-group-ham-exit-processor-BBDB
22541
22542 Add this symbol to a group's @code{spam-process} parameter by
22543 customizing the group parameters or the
22544 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22545 added to a group's @code{spam-process} parameter, the senders of
22546 ham-marked articles in @emph{ham} groups will be added to the
22547 BBDB.  Note that this ham processor has no effect in @emph{spam}
22548 or @emph{unclassified} groups.
22549
22550 @end defvar
22551
22552 @node Gmane Spam Reporting
22553 @subsubsection Gmane Spam Reporting
22554 @cindex spam reporting
22555 @cindex Gmane, spam reporting
22556 @cindex Gmane, spam reporting
22557 @cindex spam
22558
22559 @defvar gnus-group-spam-exit-processor-report-gmane
22560
22561 Add this symbol to a group's @code{spam-process} parameter by
22562 customizing the group parameters or the
22563 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22564 added to a group's @code{spam-process} parameter, the spam-marked
22565 articles groups will be reported to the Gmane administrators.
22566
22567 @end defvar
22568
22569 @node Anti-spam Hashcash Payments
22570 @subsubsection Anti-spam Hashcash Payments
22571 @cindex spam filtering
22572 @cindex hashcash, spam filtering
22573 @cindex spam
22574
22575 @defvar spam-use-hashcash
22576
22577 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22578 Whitelists}), but uses hashcash tokens for whitelisting messages
22579 instead of the sender address.  You must have the @code{hashcash.el}
22580 package loaded for @code{spam-use-hashcash} to work properly.
22581 Messages without a hashcash payment token will be sent to the next
22582 spam-split rule.  This is an explicit filter, meaning that unless a
22583 hashcash token is found, the messages are not assumed to be spam or
22584 ham.
22585
22586 @end defvar
22587
22588 @node Blackholes
22589 @subsubsection Blackholes
22590 @cindex spam filtering
22591 @cindex blackholes, spam filtering
22592 @cindex spam
22593
22594 @defvar spam-use-blackholes
22595
22596 This option is disabled by default.  You can let Gnus consult the
22597 blackhole-type distributed spam processing systems (DCC, for instance)
22598 when you set this option.  The variable @code{spam-blackhole-servers}
22599 holds the list of blackhole servers Gnus will consult.  The current
22600 list is fairly comprehensive, but make sure to let us know if it
22601 contains outdated servers.
22602
22603 The blackhole check uses the @code{dig.el} package, but you can tell
22604 @code{spam.el} to use @code{dns.el} instead for better performance if
22605 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22606 this time to set @code{spam-use-dig} to @code{nil} despite the
22607 possible performance improvements, because some users may be unable to
22608 use it, but you can try it and see if it works for you.
22609
22610 @end defvar
22611
22612 @defvar spam-blackhole-servers
22613
22614 The list of servers to consult for blackhole checks.
22615
22616 @end defvar
22617
22618 @defvar spam-blackhole-good-server-regex
22619
22620 A regular expression for IPs that should not be checked against the
22621 blackhole server list.  When set to @code{nil}, it has no effect.
22622
22623 @end defvar
22624
22625 @defvar spam-use-dig
22626
22627 Use the @code{dig.el} package instead of the @code{dns.el} package.
22628 The default setting of @code{t} is recommended.
22629
22630 @end defvar
22631
22632 Blackhole checks are done only on incoming mail.  There is no spam or
22633 ham processor for blackholes.
22634
22635 @node Regular Expressions Header Matching
22636 @subsubsection Regular Expressions Header Matching
22637 @cindex spam filtering
22638 @cindex regular expressions header matching, spam filtering
22639 @cindex spam
22640
22641 @defvar spam-use-regex-headers
22642
22643 This option is disabled by default.  You can let Gnus check the
22644 message headers against lists of regular expressions when you set this
22645 option.  The variables @code{spam-regex-headers-spam} and
22646 @code{spam-regex-headers-ham} hold the list of regular expressions.
22647 Gnus will check against the message headers to determine if the
22648 message is spam or ham, respectively.
22649
22650 @end defvar
22651
22652 @defvar spam-regex-headers-spam
22653
22654 The list of regular expressions that, when matched in the headers of
22655 the message, positively identify it as spam.
22656
22657 @end defvar
22658
22659 @defvar spam-regex-headers-ham
22660
22661 The list of regular expressions that, when matched in the headers of
22662 the message, positively identify it as ham.
22663
22664 @end defvar
22665
22666 Regular expression header checks are done only on incoming mail.
22667 There is no specific spam or ham processor for regular expressions.
22668
22669 @node Bogofilter
22670 @subsubsection Bogofilter
22671 @cindex spam filtering
22672 @cindex bogofilter, spam filtering
22673 @cindex spam
22674
22675 @defvar spam-use-bogofilter
22676
22677 Set this variable if you want @code{spam-split} to use Eric Raymond's
22678 speedy Bogofilter.
22679
22680 With a minimum of care for associating the @samp{$} mark for spam
22681 articles only, Bogofilter training all gets fairly automatic.  You
22682 should do this until you get a few hundreds of articles in each
22683 category, spam or not.  The command @kbd{S t} in summary mode, either
22684 for debugging or for curiosity, shows the @emph{spamicity} score of
22685 the current article (between 0.0 and 1.0).
22686
22687 Bogofilter determines if a message is spam based on an internal
22688 threshold, set at compilation time.  That threshold can't be
22689 customized.
22690
22691 If the @code{bogofilter} executable is not in your path, Bogofilter
22692 processing will be turned off.
22693
22694 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22695
22696 @end defvar
22697
22698 @defvar spam-use-bogofilter-headers
22699
22700 Set this variable if you want @code{spam-split} to use Eric Raymond's
22701 speedy Bogofilter, looking only at the message headers.  It works
22702 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22703 must be in the message already.  Normally you would do this with a
22704 procmail recipe or something similar; consult the Bogofilter
22705 installation documents for details.
22706
22707 You should not enable this if you use @code{spam-use-bogofilter}.
22708
22709 @end defvar
22710
22711 @defvar gnus-group-spam-exit-processor-bogofilter
22712 Add this symbol to a group's @code{spam-process} parameter by
22713 customizing the group parameters or the
22714 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22715 added to a group's @code{spam-process} parameter, spam-marked articles
22716 will be added to the Bogofilter spam database.
22717 @end defvar
22718
22719 @defvar gnus-group-ham-exit-processor-bogofilter
22720 Add this symbol to a group's @code{spam-process} parameter by
22721 customizing the group parameters or the
22722 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22723 added to a group's @code{spam-process} parameter, the ham-marked
22724 articles in @emph{ham} groups will be added to the Bogofilter database
22725 of non-spam messages.  Note that this ham processor has no effect in
22726 @emph{spam} or @emph{unclassified} groups.
22727 @end defvar
22728
22729 @defvar spam-bogofilter-database-directory
22730
22731 This is the directory where Bogofilter will store its databases.  It
22732 is not specified by default, so Bogofilter will use its own default
22733 database directory.
22734
22735 @end defvar
22736
22737 The Bogofilter mail classifier is similar to ifile in intent and
22738 purpose.  A ham and a spam processor are provided, plus the
22739 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22740 variables to indicate to spam-split that Bogofilter should either be
22741 used, or has already been used on the article.  The 0.9.2.1 version of
22742 Bogofilter was used to test this functionality.
22743
22744 @node ifile spam filtering
22745 @subsubsection ifile spam filtering
22746 @cindex spam filtering
22747 @cindex ifile, spam filtering
22748 @cindex spam
22749
22750 @defvar spam-use-ifile
22751
22752 Enable this variable if you want @code{spam-split} to use ifile, a
22753 statistical analyzer similar to Bogofilter.
22754
22755 @end defvar
22756
22757 @defvar spam-ifile-all-categories
22758
22759 Enable this variable if you want @code{spam-use-ifile} to give you all
22760 the ifile categories, not just spam/non-spam.  If you use this, make
22761 sure you train ifile as described in its documentation.
22762
22763 @end defvar
22764
22765 @defvar spam-ifile-spam-category
22766
22767 This is the category of spam messages as far as ifile is concerned.
22768 The actual string used is irrelevant, but you probably want to leave
22769 the default value of @samp{spam}.
22770 @end defvar
22771
22772 @defvar spam-ifile-database-path
22773
22774 This is the filename for the ifile database.  It is not specified by
22775 default, so ifile will use its own default database name.
22776
22777 @end defvar
22778
22779 The ifile mail classifier is similar to Bogofilter in intent and
22780 purpose.  A ham and a spam processor are provided, plus the
22781 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22782 should be used.  The 1.2.1 version of ifile was used to test this
22783 functionality.
22784
22785 @node spam-stat spam filtering
22786 @subsubsection spam-stat spam filtering
22787 @cindex spam filtering
22788 @cindex spam-stat, spam filtering
22789 @cindex spam-stat
22790 @cindex spam
22791
22792 @xref{Filtering Spam Using Statistics with spam-stat}.
22793
22794 @defvar spam-use-stat
22795
22796 Enable this variable if you want @code{spam-split} to use
22797 spam-stat.el, an Emacs Lisp statistical analyzer.
22798
22799 @end defvar
22800
22801 @defvar gnus-group-spam-exit-processor-stat
22802 Add this symbol to a group's @code{spam-process} parameter by
22803 customizing the group parameters or the
22804 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22805 added to a group's @code{spam-process} parameter, the spam-marked
22806 articles will be added to the spam-stat database of spam messages.
22807 @end defvar
22808
22809 @defvar gnus-group-ham-exit-processor-stat
22810 Add this symbol to a group's @code{spam-process} parameter by
22811 customizing the group parameters or the
22812 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22813 added to a group's @code{spam-process} parameter, the ham-marked
22814 articles in @emph{ham} groups will be added to the spam-stat database
22815 of non-spam messages.  Note that this ham processor has no effect in
22816 @emph{spam} or @emph{unclassified} groups.
22817 @end defvar
22818
22819 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
22820 provides an internal (Lisp-only) spam database, which unlike ifile or
22821 Bogofilter does not require external programs.  A spam and a ham
22822 processor, and the @code{spam-use-stat} variable for @code{spam-split}
22823 are provided.
22824
22825 @node Extending the spam elisp package
22826 @subsubsection Extending the spam elisp package
22827 @cindex spam filtering
22828 @cindex spam elisp package, extending
22829 @cindex extending the spam elisp package
22830
22831 Say you want to add a new back end called blackbox.  For filtering
22832 incoming mail, provide the following:
22833
22834 @enumerate
22835
22836 @item
22837 code
22838
22839 @lisp
22840 (defvar spam-use-blackbox nil
22841   "True if blackbox should be used.")
22842 @end lisp
22843
22844 Add
22845 @example
22846     (spam-use-blackbox   . spam-check-blackbox)
22847 @end example
22848 to @code{spam-list-of-checks}.
22849
22850 @item
22851 functionality
22852
22853 Write the @code{spam-check-blackbox} function.  It should return
22854 @samp{nil} or @code{spam-split-group}.  See the existing
22855 @code{spam-check-*} functions for examples of what you can do.
22856
22857 Make sure to add @code{spam-use-blackbox} to
22858 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
22859 mail analyzer that needs the full message body to operate.
22860
22861 @end enumerate
22862
22863 For processing spam and ham messages, provide the following:
22864
22865 @enumerate
22866
22867 @item
22868 code 
22869
22870 Note you don't have to provide a spam or a ham processor.  Only
22871 provide them if Blackbox supports spam or ham processing.
22872
22873 @lisp
22874 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
22875   "The Blackbox summary exit spam processor.
22876 Only applicable to spam groups.")
22877
22878 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
22879   "The whitelist summary exit ham processor.
22880 Only applicable to non-spam (unclassified and ham) groups.")
22881
22882 @end lisp
22883
22884 @item
22885 functionality
22886
22887 @lisp
22888 (defun spam-blackbox-register-spam-routine ()
22889   (spam-generic-register-routine
22890    ;; @r{the spam function}
22891    (lambda (article)
22892      (let ((from (spam-fetch-field-from-fast article)))
22893        (when (stringp from)
22894            (blackbox-do-something-with-this-spammer from))))
22895    ;; @r{the ham function}
22896    nil))
22897
22898 (defun spam-blackbox-register-ham-routine ()
22899   (spam-generic-register-routine
22900    ;; @r{the spam function}
22901    nil
22902    ;; @r{the ham function}
22903    (lambda (article)
22904      (let ((from (spam-fetch-field-from-fast article)))
22905        (when (stringp from)
22906            (blackbox-do-something-with-this-ham-sender from))))))
22907 @end lisp
22908
22909 Write the @code{blackbox-do-something-with-this-ham-sender} and
22910 @code{blackbox-do-something-with-this-spammer} functions.  You can add
22911 more complex code than fetching the message sender, but keep in mind
22912 that retrieving the whole message takes significantly longer than the
22913 sender through @code{spam-fetch-field-from-fast}, because the message
22914 senders are kept in memory by Gnus.
22915
22916 @end enumerate
22917
22918
22919 @node Filtering Spam Using Statistics with spam-stat
22920 @subsection Filtering Spam Using Statistics with spam-stat
22921 @cindex Paul Graham
22922 @cindex Graham, Paul
22923 @cindex naive Bayesian spam filtering
22924 @cindex Bayesian spam filtering, naive
22925 @cindex spam filtering, naive Bayesian
22926
22927 Paul Graham has written an excellent essay about spam filtering using
22928 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
22929 Spam}.  In it he describes the inherent deficiency of rule-based
22930 filtering as used by SpamAssassin, for example: Somebody has to write
22931 the rules, and everybody else has to install these rules.  You are
22932 always late.  It would be much better, he argues, to filter mail based
22933 on whether it somehow resembles spam or non-spam.  One way to measure
22934 this is word distribution.  He then goes on to describe a solution
22935 that checks whether a new mail resembles any of your other spam mails
22936 or not.
22937
22938 The basic idea is this:  Create a two collections of your mail, one
22939 with spam, one with non-spam.  Count how often each word appears in
22940 either collection, weight this by the total number of mails in the
22941 collections, and store this information in a dictionary.  For every
22942 word in a new mail, determine its probability to belong to a spam or a
22943 non-spam mail.  Use the 15 most conspicuous words, compute the total
22944 probability of the mail being spam.  If this probability is higher
22945 than a certain threshold, the mail is considered to be spam.
22946
22947 Gnus supports this kind of filtering.  But it needs some setting up.
22948 First, you need two collections of your mail, one with spam, one with
22949 non-spam.  Then you need to create a dictionary using these two
22950 collections, and save it.  And last but not least, you need to use
22951 this dictionary in your fancy mail splitting rules.
22952
22953 @menu
22954 * Creating a spam-stat dictionary::  
22955 * Splitting mail using spam-stat::  
22956 * Low-level interface to the spam-stat dictionary::  
22957 @end menu
22958
22959 @node Creating a spam-stat dictionary
22960 @subsubsection Creating a spam-stat dictionary
22961
22962 Before you can begin to filter spam based on statistics, you must
22963 create these statistics based on two mail collections, one with spam,
22964 one with non-spam.  These statistics are then stored in a dictionary
22965 for later use.  In order for these statistics to be meaningful, you
22966 need several hundred emails in both collections.
22967
22968 Gnus currently supports only the nnml back end for automated dictionary
22969 creation.  The nnml back end stores all mails in a directory, one file
22970 per mail.  Use the following:
22971
22972 @defun spam-stat-process-spam-directory
22973 Create spam statistics for every file in this directory.  Every file
22974 is treated as one spam mail.
22975 @end defun
22976
22977 @defun spam-stat-process-non-spam-directory
22978 Create non-spam statistics for every file in this directory.  Every
22979 file is treated as one non-spam mail.
22980 @end defun
22981
22982 Usually you would call @code{spam-stat-process-spam-directory} on a
22983 directory such as @file{~/Mail/mail/spam} (this usually corresponds
22984 the the group @samp{nnml:mail.spam}), and you would call
22985 @code{spam-stat-process-non-spam-directory} on a directory such as
22986 @file{~/Mail/mail/misc} (this usually corresponds the the group
22987 @samp{nnml:mail.misc}).
22988
22989 When you are using @acronym{IMAP}, you won't have the mails available
22990 locally, so that will not work.  One solution is to use the Gnus Agent
22991 to cache the articles.  Then you can use directories such as
22992 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
22993 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
22994
22995 @defvar spam-stat
22996 This variable holds the hash-table with all the statistics---the
22997 dictionary we have been talking about.  For every word in either
22998 collection, this hash-table stores a vector describing how often the
22999 word appeared in spam and often it appeared in non-spam mails.
23000 @end defvar
23001
23002 If you want to regenerate the statistics from scratch, you need to
23003 reset the dictionary.
23004
23005 @defun spam-stat-reset
23006 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23007 @end defun
23008
23009 When you are done, you must save the dictionary.  The dictionary may
23010 be rather large.  If you will not update the dictionary incrementally
23011 (instead, you will recreate it once a month, for example), then you
23012 can reduce the size of the dictionary by deleting all words that did
23013 not appear often enough or that do not clearly belong to only spam or
23014 only non-spam mails.
23015
23016 @defun spam-stat-reduce-size
23017 Reduce the size of the dictionary.  Use this only if you do not want
23018 to update the dictionary incrementally.
23019 @end defun
23020
23021 @defun spam-stat-save
23022 Save the dictionary.
23023 @end defun
23024
23025 @defvar spam-stat-file
23026 The filename used to store the dictionary.  This defaults to
23027 @file{~/.spam-stat.el}.
23028 @end defvar
23029
23030 @node Splitting mail using spam-stat
23031 @subsubsection Splitting mail using spam-stat
23032
23033 In order to use @code{spam-stat} to split your mail, you need to add the
23034 following to your @file{~/.gnus.el} file:
23035
23036 @lisp
23037 (require 'spam-stat)
23038 (spam-stat-load)
23039 @end lisp
23040
23041 This will load the necessary Gnus code, and the dictionary you
23042 created.
23043
23044 Next, you need to adapt your fancy splitting rules:  You need to
23045 determine how to use @code{spam-stat}.  The following examples are for
23046 the nnml back end.  Using the nnimap back end works just as well.  Just
23047 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23048
23049 In the simplest case, you only have two groups, @samp{mail.misc} and
23050 @samp{mail.spam}.  The following expression says that mail is either
23051 spam or it should go into @samp{mail.misc}.  If it is spam, then
23052 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23053
23054 @lisp
23055 (setq nnmail-split-fancy
23056       `(| (: spam-stat-split-fancy)
23057           "mail.misc"))
23058 @end lisp
23059
23060 @defvar spam-stat-split-fancy-spam-group
23061 The group to use for spam.  Default is @samp{mail.spam}.
23062 @end defvar
23063
23064 If you also filter mail with specific subjects into other groups, use
23065 the following expression.  Only mails not matching the regular
23066 expression are considered potential spam.
23067
23068 @lisp
23069 (setq nnmail-split-fancy
23070       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23071           (: spam-stat-split-fancy)
23072           "mail.misc"))
23073 @end lisp
23074
23075 If you want to filter for spam first, then you must be careful when
23076 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23077 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23078 non-spam, therefore both should be in your collection of non-spam
23079 mails, when creating the dictionary!
23080
23081 @lisp
23082 (setq nnmail-split-fancy
23083       `(| (: spam-stat-split-fancy)
23084           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23085           "mail.misc"))
23086 @end lisp
23087
23088 You can combine this with traditional filtering.  Here, we move all
23089 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23090 @code{spam-stat-split-fancy} will never see them, the mails in
23091 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23092 nor in your collection of non-spam mails, when creating the
23093 dictionary!
23094
23095 @lisp
23096 (setq nnmail-split-fancy
23097       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23098           (: spam-stat-split-fancy)
23099           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23100           "mail.misc"))
23101 @end lisp
23102
23103
23104 @node Low-level interface to the spam-stat dictionary
23105 @subsubsection Low-level interface to the spam-stat dictionary
23106
23107 The main interface to using @code{spam-stat}, are the following functions:
23108
23109 @defun spam-stat-buffer-is-spam
23110 Called in a buffer, that buffer is considered to be a new spam mail.
23111 Use this for new mail that has not been processed before.
23112 @end defun
23113
23114 @defun spam-stat-buffer-is-no-spam
23115 Called in a buffer, that buffer is considered to be a new non-spam
23116 mail.  Use this for new mail that has not been processed before.
23117 @end defun
23118
23119 @defun spam-stat-buffer-change-to-spam
23120 Called in a buffer, that buffer is no longer considered to be normal
23121 mail but spam.  Use this to change the status of a mail that has
23122 already been processed as non-spam.
23123 @end defun
23124
23125 @defun spam-stat-buffer-change-to-non-spam
23126 Called in a buffer, that buffer is no longer considered to be spam but
23127 normal mail.  Use this to change the status of a mail that has already
23128 been processed as spam.
23129 @end defun
23130
23131 @defun spam-stat-save
23132 Save the hash table to the file.  The filename used is stored in the
23133 variable @code{spam-stat-file}.
23134 @end defun
23135
23136 @defun spam-stat-load
23137 Load the hash table from a file.  The filename used is stored in the
23138 variable @code{spam-stat-file}.
23139 @end defun
23140
23141 @defun spam-stat-score-word
23142 Return the spam score for a word.
23143 @end defun
23144
23145 @defun spam-stat-score-buffer
23146 Return the spam score for a buffer.
23147 @end defun
23148
23149 @defun spam-stat-split-fancy
23150 Use this function for fancy mail splitting.  Add the rule @samp{(:
23151 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23152 @end defun
23153
23154 Make sure you load the dictionary before using it.  This requires the
23155 following in your @file{~/.gnus.el} file:
23156
23157 @lisp
23158 (require 'spam-stat)
23159 (spam-stat-load)
23160 @end lisp
23161
23162 Typical test will involve calls to the following functions:
23163
23164 @smallexample
23165 Reset: (setq spam-stat (make-hash-table :test 'equal))
23166 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23167 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23168 Save table: (spam-stat-save)
23169 File size: (nth 7 (file-attributes spam-stat-file))
23170 Number of words: (hash-table-count spam-stat)
23171 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23172 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23173 Reduce table size: (spam-stat-reduce-size)
23174 Save table: (spam-stat-save)
23175 File size: (nth 7 (file-attributes spam-stat-file))
23176 Number of words: (hash-table-count spam-stat)
23177 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23178 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23179 @end smallexample
23180
23181 Here is how you would create your dictionary:
23182
23183 @smallexample
23184 Reset: (setq spam-stat (make-hash-table :test 'equal))
23185 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23186 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23187 Repeat for any other non-spam group you need...
23188 Reduce table size: (spam-stat-reduce-size)
23189 Save table: (spam-stat-save)
23190 @end smallexample
23191
23192 @node Various Various
23193 @section Various Various
23194 @cindex mode lines
23195 @cindex highlights
23196
23197 @table @code
23198
23199 @item gnus-home-directory
23200 @vindex gnus-home-directory
23201 All Gnus file and directory variables will be initialized from this
23202 variable, which defaults to @file{~/}.
23203
23204 @item gnus-directory
23205 @vindex gnus-directory
23206 Most Gnus storage file and directory variables will be initialized from
23207 this variable, which defaults to the @env{SAVEDIR} environment
23208 variable, or @file{~/News/} if that variable isn't set.
23209
23210 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23211 This means that other directory variables that are initialized from this
23212 variable won't be set properly if you set this variable in
23213 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23214
23215 @item gnus-default-directory
23216 @vindex gnus-default-directory
23217 Not related to the above variable at all---this variable says what the
23218 default directory of all Gnus buffers should be.  If you issue commands
23219 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23220 default directory.  If this variable is @code{nil} (which is the
23221 default), the default directory will be the default directory of the
23222 buffer you were in when you started Gnus.
23223
23224 @item gnus-verbose
23225 @vindex gnus-verbose
23226 This variable is an integer between zero and ten.  The higher the value,
23227 the more messages will be displayed.  If this variable is zero, Gnus
23228 will never flash any messages, if it is seven (which is the default),
23229 most important messages will be shown, and if it is ten, Gnus won't ever
23230 shut up, but will flash so many messages it will make your head swim.
23231
23232 @item gnus-verbose-backends
23233 @vindex gnus-verbose-backends
23234 This variable works the same way as @code{gnus-verbose}, but it applies
23235 to the Gnus back ends instead of Gnus proper.
23236
23237 @item nnheader-max-head-length
23238 @vindex nnheader-max-head-length
23239 When the back ends read straight heads of articles, they all try to read
23240 as little as possible.  This variable (default 4096) specifies
23241 the absolute max length the back ends will try to read before giving up
23242 on finding a separator line between the head and the body.  If this
23243 variable is @code{nil}, there is no upper read bound.  If it is
23244 @code{t}, the back ends won't try to read the articles piece by piece,
23245 but read the entire articles.  This makes sense with some versions of
23246 @code{ange-ftp} or @code{efs}.
23247
23248 @item nnheader-head-chop-length
23249 @vindex nnheader-head-chop-length
23250 This variable (default 2048) says how big a piece of each article to
23251 read when doing the operation described above.
23252
23253 @item nnheader-file-name-translation-alist
23254 @vindex nnheader-file-name-translation-alist
23255 @cindex file names
23256 @cindex invalid characters in file names
23257 @cindex characters in file names
23258 This is an alist that says how to translate characters in file names.
23259 For instance, if @samp{:} is invalid as a file character in file names
23260 on your system (you OS/2 user you), you could say something like:
23261
23262 @lisp
23263 @group
23264 (setq nnheader-file-name-translation-alist
23265       '((?: . ?_)))
23266 @end group
23267 @end lisp
23268
23269 In fact, this is the default value for this variable on OS/2 and MS
23270 Windows (phooey) systems.
23271
23272 @item gnus-hidden-properties
23273 @vindex gnus-hidden-properties
23274 This is a list of properties to use to hide ``invisible'' text.  It is
23275 @code{(invisible t intangible t)} by default on most systems, which
23276 makes invisible text invisible and intangible.
23277
23278 @item gnus-parse-headers-hook
23279 @vindex gnus-parse-headers-hook
23280 A hook called before parsing headers.  It can be used, for instance, to
23281 gather statistics on the headers fetched, or perhaps you'd like to prune
23282 some headers.  I don't see why you'd want that, though.
23283
23284 @item gnus-shell-command-separator
23285 @vindex gnus-shell-command-separator
23286 String used to separate two shell commands.  The default is @samp{;}.
23287
23288 @item gnus-invalid-group-regexp
23289 @vindex gnus-invalid-group-regexp
23290
23291 Regexp to match ``invalid'' group names when querying user for a group
23292 name.  The default value catches some @strong{really} invalid group
23293 names who could possibly mess up Gnus internally (like allowing
23294 @samp{:} in a group name, which is normally used to delimit method and
23295 group).
23296
23297 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23298
23299
23300 @end table
23301
23302 @node The End
23303 @chapter The End
23304
23305 Well, that's the manual---you can get on with your life now.  Keep in
23306 touch.  Say hello to your cats from me.
23307
23308 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23309
23310 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23311
23312 @quotation
23313 @strong{Te Deum}
23314
23315 @sp 1
23316 Not because of victories @*
23317 I sing,@*
23318 having none,@*
23319 but for the common sunshine,@*
23320 the breeze,@*
23321 the largess of the spring.
23322
23323 @sp 1
23324 Not for victory@*
23325 but for the day's work done@*
23326 as well as I was able;@*
23327 not for a seat upon the dais@*
23328 but at the common table.@*
23329 @end quotation
23330
23331
23332 @node Appendices
23333 @chapter Appendices
23334
23335 @menu
23336 * XEmacs::                      Requirements for installing under XEmacs.
23337 * History::                     How Gnus got where it is today.
23338 * On Writing Manuals::          Why this is not a beginner's guide.
23339 * Terminology::                 We use really difficult, like, words here.
23340 * Customization::               Tailoring Gnus to your needs.
23341 * Troubleshooting::             What you might try if things do not work.
23342 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23343 * Emacs for Heathens::          A short introduction to Emacsian terms.
23344 * Frequently Asked Questions::  The Gnus FAQ
23345 @end menu
23346
23347
23348 @node XEmacs
23349 @section XEmacs
23350 @cindex XEmacs
23351 @cindex installing under XEmacs
23352
23353 XEmacs is distributed as a collection of packages.  You should install
23354 whatever packages the Gnus XEmacs package requires.  The current
23355 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23356 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23357 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23358 @samp{misc-games} package is required for Morse decoding.
23359
23360
23361 @node History
23362 @section History
23363
23364 @cindex history
23365 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23366 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23367
23368 If you want to investigate the person responsible for this outrage,
23369 you can point your (feh!) web browser to
23370 @uref{http://quimby.gnus.org/}.  This is also the primary
23371 distribution point for the new and spiffy versions of Gnus, and is
23372 known as The Site That Destroys Newsrcs And Drives People Mad.
23373
23374 During the first extended alpha period of development, the new Gnus was
23375 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23376 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23377 (Besides, the ``Gnus'' in this abbreviation should probably be
23378 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23379 appropriate name, don't you think?)
23380
23381 In any case, after spending all that energy on coming up with a new and
23382 spunky name, we decided that the name was @emph{too} spunky, so we
23383 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23384 ``@sc{gnus}''.  New vs. old.
23385
23386 @menu
23387 * Gnus Versions::               What Gnus versions have been released.
23388 * Other Gnus Versions::         Other Gnus versions that also have been released.
23389 * Why?::                        What's the point of Gnus?
23390 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23391 * Conformity::                  Gnus tries to conform to all standards.
23392 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23393 * Gnus Development::            How Gnus is developed.
23394 * Contributors::                Oodles of people.
23395 * New Features::                Pointers to some of the new stuff in Gnus.
23396 @end menu
23397
23398
23399 @node Gnus Versions
23400 @subsection Gnus Versions
23401 @cindex ding Gnus
23402 @cindex September Gnus
23403 @cindex Red Gnus
23404 @cindex Quassia Gnus
23405 @cindex Pterodactyl Gnus
23406 @cindex Oort Gnus
23407 @cindex No Gnus
23408 @cindex Gnus versions
23409
23410 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23411 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23412 plus 15 Gnus 5.0 releases).
23413
23414 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23415 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23416
23417 On July 28th 1996 work on Red Gnus was begun, and it was released on
23418 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23419
23420 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23421 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23422
23423 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23424 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23425 1999.
23426
23427 On the 26th of October 2000, Oort Gnus was begun.
23428
23429 If you happen upon a version of Gnus that has a prefixed name --
23430 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23431 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23432 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23433 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23434 released version of Gnus and snuggle up to that instead.
23435
23436
23437 @node Other Gnus Versions
23438 @subsection Other Gnus Versions
23439 @cindex Semi-gnus
23440
23441 In addition to the versions of Gnus which have had their releases
23442 coordinated by Lars, one major development has been Semi-gnus from
23443 Japan.  It's based on a library called @acronym{SEMI}, which provides
23444 @acronym{MIME} capabilities.
23445
23446 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23447 Collectively, they are called ``Semi-gnus'', and different strains are
23448 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23449 @acronym{MIME} and multilingualization things, especially important for
23450 Japanese users.
23451
23452
23453 @node Why?
23454 @subsection Why?
23455
23456 What's the point of Gnus?
23457
23458 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23459 newsreader, that lets you do anything you can think of.  That was my
23460 original motivation, but while working on Gnus, it has become clear to
23461 me that this generation of newsreaders really belong in the stone age.
23462 Newsreaders haven't developed much since the infancy of the net.  If the
23463 volume continues to rise with the current rate of increase, all current
23464 newsreaders will be pretty much useless.  How do you deal with
23465 newsgroups that have thousands of new articles each day?  How do you
23466 keep track of millions of people who post?
23467
23468 Gnus offers no real solutions to these questions, but I would very much
23469 like to see Gnus being used as a testing ground for new methods of
23470 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23471 to separate the newsreader from the back ends, Gnus now offers a simple
23472 interface for anybody who wants to write new back ends for fetching mail
23473 and news from different sources.  I have added hooks for customizations
23474 everywhere I could imagine it being useful.  By doing so, I'm inviting
23475 every one of you to explore and invent.
23476
23477 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23478 @kbd{C-u 100 M-x all-hail-xemacs}.
23479
23480
23481 @node Compatibility
23482 @subsection Compatibility
23483
23484 @cindex compatibility
23485 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23486 bindings have been kept.  More key bindings have been added, of course,
23487 but only in one or two obscure cases have old bindings been changed.
23488
23489 Our motto is:
23490 @quotation
23491 @cartouche
23492 @center In a cloud bones of steel.
23493 @end cartouche
23494 @end quotation
23495
23496 All commands have kept their names.  Some internal functions have changed
23497 their names.
23498
23499 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23500 Articles}.
23501
23502 One major compatibility question is the presence of several summary
23503 buffers.  All variables relevant while reading a group are
23504 buffer-local to the summary buffer they belong in.  Although many
23505 important variables have their values copied into their global
23506 counterparts whenever a command is executed in the summary buffer, this
23507 change might lead to incorrect values being used unless you are careful.
23508
23509 All code that relies on knowledge of @sc{gnus} internals will probably
23510 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23511 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23512 maintains a hash table that points to the entries in this alist (which
23513 speeds up many functions), and changing the alist directly will lead to
23514 peculiar results.
23515
23516 @cindex hilit19
23517 @cindex highlighting
23518 Old hilit19 code does not work at all.  In fact, you should probably
23519 remove all hilit code from all Gnus hooks
23520 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23521 Gnus provides various integrated functions for highlighting.  These are
23522 faster and more accurate.  To make life easier for everybody, Gnus will
23523 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23524 Away!
23525
23526 Packages like @code{expire-kill} will no longer work.  As a matter of
23527 fact, you should probably remove all old @sc{gnus} packages (and other
23528 code) when you start using Gnus.  More likely than not, Gnus already
23529 does what you have written code to make @sc{gnus} do.  (Snicker.)
23530
23531 Even though old methods of doing things are still supported, only the
23532 new methods are documented in this manual.  If you detect a new method of
23533 doing something while reading this manual, that does not mean you have
23534 to stop doing it the old way.
23535
23536 Gnus understands all @sc{gnus} startup files.
23537
23538 @kindex M-x gnus-bug
23539 @findex gnus-bug
23540 @cindex reporting bugs
23541 @cindex bugs
23542 Overall, a casual user who hasn't written much code that depends on
23543 @sc{gnus} internals should suffer no problems.  If problems occur,
23544 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23545
23546 @vindex gnus-bug-create-help-buffer
23547 If you are in the habit of sending bug reports @emph{very} often, you
23548 may find the helpful help buffer annoying after a while.  If so, set
23549 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23550 up at you.
23551
23552
23553 @node Conformity
23554 @subsection Conformity
23555
23556 No rebels without a clue here, ma'am.  We conform to all standards known
23557 to (wo)man.  Except for those standards and/or conventions we disagree
23558 with, of course.
23559
23560 @table @strong
23561
23562 @item RFC (2)822
23563 @cindex RFC 822
23564 @cindex RFC 2822
23565 There are no known breaches of this standard.
23566
23567 @item RFC 1036
23568 @cindex RFC 1036
23569 There are no known breaches of this standard, either.
23570
23571 @item Son-of-RFC 1036
23572 @cindex Son-of-RFC 1036
23573 We do have some breaches to this one.
23574
23575 @table @emph
23576
23577 @item X-Newsreader
23578 @itemx User-Agent
23579 These are considered to be ``vanity headers'', while I consider them
23580 to be consumer information.  After seeing so many badly formatted
23581 articles coming from @code{tin} and @code{Netscape} I know not to use
23582 either of those for posting articles.  I would not have known that if
23583 it wasn't for the @code{X-Newsreader} header.
23584 @end table
23585
23586 @item USEFOR
23587 @cindex USEFOR
23588 USEFOR is an IETF working group writing a successor to RFC 1036, based
23589 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23590 various changes to the format of news articles.  The Gnus towers will
23591 look into implementing the changes when the draft is accepted as an RFC.
23592
23593 @item MIME - RFC 2045-2049 etc
23594 @cindex @acronym{MIME}
23595 All the various @acronym{MIME} RFCs are supported.
23596
23597 @item Disposition Notifications - RFC 2298
23598 Message Mode is able to request notifications from the receiver.
23599
23600 @item PGP - RFC 1991 and RFC 2440
23601 @cindex RFC 1991
23602 @cindex RFC 2440
23603 RFC 1991 is the original @acronym{PGP} message specification,
23604 published as an informational RFC.  RFC 2440 was the follow-up, now
23605 called Open PGP, and put on the Standards Track.  Both document a
23606 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23607 encoding (signing and encryption) and decoding (verification and
23608 decryption).
23609
23610 @item PGP/MIME - RFC 2015/3156
23611 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23612 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23613 Gnus supports both encoding and decoding.
23614
23615 @item S/MIME - RFC 2633
23616 RFC 2633 describes the @acronym{S/MIME} format.
23617
23618 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23619 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23620 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23621 authentication for @acronym{IMAP}. RFC 2086 describes access control
23622 lists (ACLs) for @acronym{IMAP}. RFC 2359 describes a @acronym{IMAP}
23623 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23624 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23625 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23626
23627 @end table
23628
23629 If you ever notice Gnus acting non-compliant with regards to the texts
23630 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23631 know.
23632
23633
23634 @node Emacsen
23635 @subsection Emacsen
23636 @cindex Emacsen
23637 @cindex XEmacs
23638 @cindex Mule
23639 @cindex Emacs
23640
23641 Gnus should work on :
23642
23643 @itemize @bullet
23644
23645 @item
23646 Emacs 20.7 and up.
23647
23648 @item
23649 XEmacs 21.1 and up.
23650
23651 @end itemize
23652
23653 This Gnus version will absolutely not work on any Emacsen older than
23654 that.  Not reliably, at least.  Older versions of Gnus may work on older
23655 Emacs versions.
23656
23657 There are some vague differences between Gnus on the various
23658 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23659 other than that, things should look pretty much the same under all
23660 Emacsen.
23661
23662
23663 @node Gnus Development
23664 @subsection Gnus Development
23665
23666 Gnus is developed in a two-phased cycle.  The first phase involves much
23667 discussion on the @samp{ding@@gnus.org} mailing list, where people
23668 propose changes and new features, post patches and new back ends.  This
23669 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23670 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23671 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23672 unstable and should not be used by casual users.  Gnus alpha releases
23673 have names like ``Red Gnus'' and ``Quassia Gnus''.
23674
23675 After futzing around for 50-100 alpha releases, Gnus is declared
23676 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23677 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23678 supposed to be able to use these, and these are mostly discussed on the
23679 @samp{gnu.emacs.gnus} newsgroup.
23680
23681 @cindex Incoming*
23682 @vindex mail-source-delete-incoming
23683 Some variable defaults differ between alpha Gnusae and released Gnusae.
23684 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23685 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23686 lossage of mail if an alpha release hiccups while handling the mail.
23687
23688 The division of discussion between the ding mailing list and the Gnus
23689 newsgroup is not purely based on publicity concerns.  It's true that
23690 having people write about the horrible things that an alpha Gnus release
23691 can do (sometimes) in a public forum may scare people off, but more
23692 importantly, talking about new experimental features that have been
23693 introduced may confuse casual users.  New features are frequently
23694 introduced, fiddled with, and judged to be found wanting, and then
23695 either discarded or totally rewritten.  People reading the mailing list
23696 usually keep up with these rapid changes, while people on the newsgroup
23697 can't be assumed to do so.
23698
23699
23700
23701 @node Contributors
23702 @subsection Contributors
23703 @cindex contributors
23704
23705 The new Gnus version couldn't have been done without the help of all the
23706 people on the (ding) mailing list.  Every day for over a year I have
23707 gotten billions of nice bug reports from them, filling me with joy,
23708 every single one of them.  Smooches.  The people on the list have been
23709 tried beyond endurance, what with my ``oh, that's a neat idea <type
23710 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23711 work at all <type type>, yup, I'll ship that one off right away <ship
23712 off> no, wait, that absolutely does not work'' policy for releases.
23713 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23714 ``worser''? ``much worser''?  ``worsest''?)
23715
23716 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23717 wrong show.
23718
23719 @itemize @bullet
23720
23721 @item
23722 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23723
23724 @item
23725 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23726 nnwarchive and many, many other things connected with @acronym{MIME} and
23727 other types of en/decoding, as well as general bug fixing, new
23728 functionality and stuff.
23729
23730 @item
23731 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23732 well as numerous other things).
23733
23734 @item
23735 Luis Fernandes---design and graphics.
23736
23737 @item
23738 Joe Reiss---creator of the smiley faces.
23739
23740 @item
23741 Justin Sheehy--the @acronym{FAQ} maintainer.
23742
23743 @item
23744 Erik Naggum---help, ideas, support, code and stuff.
23745
23746 @item
23747 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23748 @dfn{picons} (@pxref{Picons}).
23749
23750 @item
23751 Kim-Minh Kaplan---further work on the picon code.
23752
23753 @item
23754 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23755 (@pxref{GroupLens}).
23756
23757 @item
23758 Sudish Joseph---innumerable bug fixes.
23759
23760 @item
23761 Ilja Weis---@file{gnus-topic.el}.
23762
23763 @item
23764 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23765
23766 @item
23767 Vladimir Alexiev---the refcard and reference booklets.
23768
23769 @item
23770 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23771 distribution by Felix Lee and JWZ.
23772
23773 @item
23774 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23775
23776 @item
23777 Peter Mutsaers---orphan article scoring code.
23778
23779 @item
23780 Ken Raeburn---POP mail support.
23781
23782 @item
23783 Hallvard B Furuseth---various bits and pieces, especially dealing with
23784 .newsrc files.
23785
23786 @item
23787 Brian Edmonds---@file{gnus-bbdb.el}.
23788
23789 @item
23790 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23791
23792 @item
23793 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23794
23795 @item
23796 François Pinard---many, many interesting and thorough bug reports, as
23797 well as autoconf support.
23798
23799 @end itemize
23800
23801 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23802 Borges, and Jost Krieger proof-reading parts of the manual.
23803
23804 The following people have contributed many patches and suggestions:
23805
23806 Christopher Davis,
23807 Andrew Eskilsson,
23808 Kai Grossjohann,
23809 Kevin Greiner,
23810 Jesper Harder,
23811 Paul Jarc,
23812 Simon Josefsson,
23813 David KÃ¥gedal,
23814 Richard Pieri,
23815 Fabrice Popineau,
23816 Daniel Quinlan,
23817 Michael Shields,
23818 Reiner Steib,
23819 Jason L. Tibbitts, III,
23820 Jack Vinson,
23821 Katsumi Yamaoka, @c Yamaoka
23822 and
23823 Teodor Zlatanov.
23824
23825 Also thanks to the following for patches and stuff:
23826
23827 Jari Aalto,
23828 Adrian Aichner,
23829 Vladimir Alexiev,
23830 Russ Allbery,
23831 Peter Arius,
23832 Matt Armstrong,
23833 Marc Auslander,
23834 Miles Bader,
23835 Alexei V. Barantsev,
23836 Frank Bennett,
23837 Robert Bihlmeyer,
23838 Chris Bone,
23839 Mark Borges,
23840 Mark Boyns,
23841 Lance A. Brown,
23842 Rob Browning,
23843 Kees de Bruin,
23844 Martin Buchholz,
23845 Joe Buehler,
23846 Kevin Buhr,
23847 Alastair Burt,
23848 Joao Cachopo,
23849 Zlatko Calusic,
23850 Massimo Campostrini,
23851 Castor,
23852 David Charlap,
23853 Dan Christensen,
23854 Kevin Christian,
23855 Jae-you Chung, @c ?
23856 James H. Cloos, Jr.,
23857 Laura Conrad,
23858 Michael R. Cook,
23859 Glenn Coombs,
23860 Andrew J. Cosgriff,
23861 Neil Crellin,
23862 Frank D. Cringle,
23863 Geoffrey T. Dairiki,
23864 Andre Deparade,
23865 Ulrik Dickow,
23866 Dave Disser,
23867 Rui-Tao Dong, @c ?
23868 Joev Dubach,
23869 Michael Welsh Duggan,
23870 Dave Edmondson,
23871 Paul Eggert,
23872 Mark W. Eichin,
23873 Karl Eichwalder,
23874 Enami Tsugutomo, @c Enami
23875 Michael Ernst,
23876 Luc Van Eycken,
23877 Sam Falkner,
23878 Nelson Jose dos Santos Ferreira,
23879 Sigbjorn Finne,
23880 Sven Fischer,
23881 Paul Fisher,
23882 Decklin Foster,
23883 Gary D. Foster,
23884 Paul Franklin,
23885 Guy Geens,
23886 Arne Georg Gleditsch,
23887 David S. Goldberg,
23888 Michelangelo Grigni,
23889 Dale Hagglund,
23890 D. Hall,
23891 Magnus Hammerin,
23892 Kenichi Handa, @c Handa
23893 Raja R. Harinath,
23894 Yoshiki Hayashi, @c Hayashi
23895 P. E. Jareth Hein,
23896 Hisashige Kenji, @c Hisashige
23897 Scott Hofmann,
23898 Marc Horowitz,
23899 Gunnar Horrigmo,
23900 Richard Hoskins,
23901 Brad Howes,
23902 Miguel de Icaza,
23903 François Felix Ingrand,
23904 Tatsuya Ichikawa, @c Ichikawa
23905 Ishikawa Ichiro, @c Ishikawa
23906 Lee Iverson,
23907 Iwamuro Motonori, @c Iwamuro
23908 Rajappa Iyer,
23909 Andreas Jaeger,
23910 Adam P. Jenkins,
23911 Randell Jesup,
23912 Fred Johansen,
23913 Gareth Jones,
23914 Greg Klanderman,
23915 Karl Kleinpaste,
23916 Michael Klingbeil,
23917 Peter Skov Knudsen,
23918 Shuhei Kobayashi, @c Kobayashi
23919 Petr Konecny,
23920 Koseki Yoshinori, @c Koseki
23921 Thor Kristoffersen,
23922 Jens Lautenbacher,
23923 Martin Larose,
23924 Seokchan Lee, @c Lee
23925 Joerg Lenneis,
23926 Carsten Leonhardt,
23927 James LewisMoss,
23928 Christian Limpach,
23929 Markus Linnala,
23930 Dave Love,
23931 Mike McEwan,
23932 Tonny Madsen,
23933 Shlomo Mahlab,
23934 Nat Makarevitch,
23935 Istvan Marko,
23936 David Martin,
23937 Jason R. Mastaler,
23938 Gordon Matzigkeit,
23939 Timo Metzemakers,
23940 Richard Mlynarik,
23941 Lantz Moore,
23942 Morioka Tomohiko, @c Morioka
23943 Erik Toubro Nielsen,
23944 Hrvoje Niksic,
23945 Andy Norman,
23946 Fred Oberhauser,
23947 C. R. Oldham,
23948 Alexandre Oliva,
23949 Ken Olstad,
23950 Masaharu Onishi, @c Onishi
23951 Hideki Ono, @c Ono
23952 Ettore Perazzoli,
23953 William Perry,
23954 Stephen Peters,
23955 Jens-Ulrik Holger Petersen,
23956 Ulrich Pfeifer,
23957 Matt Pharr,
23958 Andy Piper,
23959 John McClary Prevost,
23960 Bill Pringlemeir,
23961 Mike Pullen,
23962 Jim Radford,
23963 Colin Rafferty,
23964 Lasse Rasinen,
23965 Lars Balker Rasmussen,
23966 Joe Reiss,
23967 Renaud Rioboo,
23968 Roland B. Roberts,
23969 Bart Robinson,
23970 Christian von Roques,
23971 Markus Rost,
23972 Jason Rumney,
23973 Wolfgang Rupprecht,
23974 Jay Sachs,
23975 Dewey M. Sasser,
23976 Conrad Sauerwald,
23977 Loren Schall,
23978 Dan Schmidt,
23979 Ralph Schleicher,
23980 Philippe Schnoebelen,
23981 Andreas Schwab,
23982 Randal L. Schwartz,
23983 Danny Siu,
23984 Matt Simmons,
23985 Paul D. Smith,
23986 Jeff Sparkes,
23987 Toby Speight,
23988 Michael Sperber,
23989 Darren Stalder,
23990 Richard Stallman,
23991 Greg Stark,
23992 Sam Steingold,
23993 Paul Stevenson,
23994 Jonas Steverud,
23995 Paul Stodghill,
23996 Kiyokazu Suto, @c Suto
23997 Kurt Swanson,
23998 Samuel Tardieu,
23999 Teddy,
24000 Chuck Thompson,
24001 Tozawa Akihiko, @c Tozawa
24002 Philippe Troin,
24003 James Troup,
24004 Trung Tran-Duc,
24005 Jack Twilley,
24006 Aaron M. Ucko,
24007 Aki Vehtari,
24008 Didier Verna,
24009 Vladimir Volovich,
24010 Jan Vroonhof,
24011 Stefan Waldherr,
24012 Pete Ware,
24013 Barry A. Warsaw,
24014 Christoph Wedler,
24015 Joe Wells,
24016 Lee Willis,
24017 and
24018 Lloyd Zusman.
24019
24020
24021 For a full overview of what each person has done, the ChangeLogs
24022 included in the Gnus alpha distributions should give ample reading
24023 (550kB and counting).
24024
24025 Apologies to everybody that I've forgotten, of which there are many, I'm
24026 sure.
24027
24028 Gee, that's quite a list of people.  I guess that must mean that there
24029 actually are people who are using Gnus.  Who'd'a thunk it!
24030
24031
24032 @node New Features
24033 @subsection New Features
24034 @cindex new features
24035
24036 @menu
24037 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24038 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24039 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24040 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24041 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24042 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24043 @end menu
24044
24045 These lists are, of course, just @emph{short} overviews of the
24046 @emph{most} important new features.  No, really.  There are tons more.
24047 Yes, we have feeping creaturism in full effect.
24048
24049 @node ding Gnus
24050 @subsubsection (ding) Gnus
24051
24052 New features in Gnus 5.0/5.1:
24053
24054 @itemize @bullet
24055
24056 @item
24057 The look of all buffers can be changed by setting format-like variables
24058 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24059
24060 @item
24061 Local spool and several @acronym{NNTP} servers can be used at once
24062 (@pxref{Select Methods}).
24063
24064 @item
24065 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24066
24067 @item
24068 You can read a number of different mail formats (@pxref{Getting Mail}).
24069 All the mail back ends implement a convenient mail expiry scheme
24070 (@pxref{Expiring Mail}).
24071
24072 @item
24073 Gnus can use various strategies for gathering threads that have lost
24074 their roots (thereby gathering loose sub-threads into one thread) or it
24075 can go back and retrieve enough headers to build a complete thread
24076 (@pxref{Customizing Threading}).
24077
24078 @item
24079 Killed groups can be displayed in the group buffer, and you can read
24080 them as well (@pxref{Listing Groups}).
24081
24082 @item
24083 Gnus can do partial group updates---you do not have to retrieve the
24084 entire active file just to check for new articles in a few groups
24085 (@pxref{The Active File}).
24086
24087 @item
24088 Gnus implements a sliding scale of subscribedness to groups
24089 (@pxref{Group Levels}).
24090
24091 @item
24092 You can score articles according to any number of criteria
24093 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24094 articles for you (@pxref{Adaptive Scoring}).
24095
24096 @item
24097 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24098 manner, so it should be difficult to lose much data on what you have
24099 read if your machine should go down (@pxref{Auto Save}).
24100
24101 @item
24102 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24103 cluttering up the @file{.emacs} file.
24104
24105 @item
24106 You can set the process mark on both groups and articles and perform
24107 operations on all the marked items (@pxref{Process/Prefix}).
24108
24109 @item
24110 You can grep through a subset of groups and create a group from the
24111 results (@pxref{Kibozed Groups}).
24112
24113 @item
24114 You can list subsets of groups according to, well, anything
24115 (@pxref{Listing Groups}).
24116
24117 @item
24118 You can browse foreign servers and subscribe to groups from those
24119 servers (@pxref{Browse Foreign Server}).
24120
24121 @item
24122 Gnus can fetch articles, asynchronously, on a second connection to the
24123 server (@pxref{Asynchronous Fetching}).
24124
24125 @item
24126 You can cache articles locally (@pxref{Article Caching}).
24127
24128 @item
24129 The uudecode functions have been expanded and generalized
24130 (@pxref{Decoding Articles}).
24131
24132 @item
24133 You can still post uuencoded articles, which was a little-known feature
24134 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24135
24136 @item
24137 Fetching parents (and other articles) now actually works without
24138 glitches (@pxref{Finding the Parent}).
24139
24140 @item
24141 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24142
24143 @item
24144 Digests (and other files) can be used as the basis for groups
24145 (@pxref{Document Groups}).
24146
24147 @item
24148 Articles can be highlighted and customized (@pxref{Customizing
24149 Articles}).
24150
24151 @item
24152 URLs and other external references can be buttonized (@pxref{Article
24153 Buttons}).
24154
24155 @item
24156 You can do lots of strange stuff with the Gnus window & frame
24157 configuration (@pxref{Window Layout}).
24158
24159 @item
24160 You can click on buttons instead of using the keyboard
24161 (@pxref{Buttons}).
24162
24163 @end itemize
24164
24165
24166 @node September Gnus
24167 @subsubsection September Gnus
24168
24169 @iftex
24170 @iflatex
24171 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24172 @end iflatex
24173 @end iftex
24174
24175 New features in Gnus 5.2/5.3:
24176
24177 @itemize @bullet
24178
24179 @item
24180 A new message composition mode is used.  All old customization variables
24181 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24182 now obsolete.
24183
24184 @item
24185 Gnus is now able to generate @dfn{sparse} threads---threads where
24186 missing articles are represented by empty nodes (@pxref{Customizing
24187 Threading}).
24188
24189 @lisp
24190 (setq gnus-build-sparse-threads 'some)
24191 @end lisp
24192
24193 @item
24194 Outgoing articles are stored on a special archive server
24195 (@pxref{Archived Messages}).
24196
24197 @item
24198 Partial thread regeneration now happens when articles are
24199 referred.
24200
24201 @item
24202 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24203
24204 @item
24205 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24206
24207 @item
24208 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24209
24210 @lisp
24211 (setq gnus-use-trees t)
24212 @end lisp
24213
24214 @item
24215 An @code{nn}-like pick-and-read minor mode is available for the summary
24216 buffers (@pxref{Pick and Read}).
24217
24218 @lisp
24219 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24220 @end lisp
24221
24222 @item
24223 In binary groups you can use a special binary minor mode (@pxref{Binary
24224 Groups}).
24225
24226 @item
24227 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24228 Topics}).
24229
24230 @lisp
24231 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24232 @end lisp
24233
24234 @item
24235 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24236
24237 @item
24238 Groups can now have a score, and bubbling based on entry frequency
24239 is possible (@pxref{Group Score}).
24240
24241 @lisp
24242 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24243 @end lisp
24244
24245 @item
24246 Groups can be process-marked, and commands can be performed on
24247 groups of groups (@pxref{Marking Groups}).
24248
24249 @item
24250 Caching is possible in virtual groups.
24251
24252 @item
24253 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24254 news batches, ClariNet briefs collections, and just about everything
24255 else (@pxref{Document Groups}).
24256
24257 @item
24258 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24259 (@pxref{SOUP}).
24260
24261 @item
24262 The Gnus cache is much faster.
24263
24264 @item
24265 Groups can be sorted according to many criteria (@pxref{Sorting
24266 Groups}).
24267
24268 @item
24269 New group parameters have been introduced to set list-addresses and
24270 expiry times (@pxref{Group Parameters}).
24271
24272 @item
24273 All formatting specs allow specifying faces to be used
24274 (@pxref{Formatting Fonts}).
24275
24276 @item
24277 There are several more commands for setting/removing/acting on process
24278 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24279
24280 @item
24281 The summary buffer can be limited to show parts of the available
24282 articles based on a wide range of criteria.  These commands have been
24283 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24284
24285 @item
24286 Articles can be made persistent with the @kbd{*} command
24287 (@pxref{Persistent Articles}).
24288
24289 @item
24290 All functions for hiding article elements are now toggles.
24291
24292 @item
24293 Article headers can be buttonized (@pxref{Article Washing}).
24294
24295 @item
24296 All mail back ends support fetching articles by @code{Message-ID}.
24297
24298 @item
24299 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24300
24301 @item
24302 All summary mode commands are available directly from the article
24303 buffer (@pxref{Article Keymap}).
24304
24305 @item
24306 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24307 Layout}).
24308
24309 @item
24310 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24311 @iftex
24312 @iflatex
24313 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24314 @end iflatex
24315 @end iftex
24316
24317 @item
24318 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24319
24320 @lisp
24321 (setq gnus-use-nocem t)
24322 @end lisp
24323
24324 @item
24325 Groups can be made permanently visible (@pxref{Listing Groups}).
24326
24327 @lisp
24328 (setq gnus-permanently-visible-groups "^nnml:")
24329 @end lisp
24330
24331 @item
24332 Many new hooks have been introduced to make customizing easier.
24333
24334 @item
24335 Gnus respects the @code{Mail-Copies-To} header.
24336
24337 @item
24338 Threads can be gathered by looking at the @code{References} header
24339 (@pxref{Customizing Threading}).
24340
24341 @lisp
24342 (setq gnus-summary-thread-gathering-function
24343       'gnus-gather-threads-by-references)
24344 @end lisp
24345
24346 @item
24347 Read articles can be stored in a special backlog buffer to avoid
24348 refetching (@pxref{Article Backlog}).
24349
24350 @lisp
24351 (setq gnus-keep-backlog 50)
24352 @end lisp
24353
24354 @item
24355 A clean copy of the current article is always stored in a separate
24356 buffer to allow easier treatment.
24357
24358 @item
24359 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24360
24361 @item
24362 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24363 Articles}).
24364
24365 @lisp
24366 (setq gnus-prompt-before-saving t)
24367 @end lisp
24368
24369 @item
24370 @code{gnus-uu} can view decoded files asynchronously while fetching
24371 articles (@pxref{Other Decode Variables}).
24372
24373 @lisp
24374 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24375 @end lisp
24376
24377 @item
24378 Filling in the article buffer now works properly on cited text
24379 (@pxref{Article Washing}).
24380
24381 @item
24382 Hiding cited text adds buttons to toggle hiding, and how much
24383 cited text to hide is now customizable (@pxref{Article Hiding}).
24384
24385 @lisp
24386 (setq gnus-cited-lines-visible 2)
24387 @end lisp
24388
24389 @item
24390 Boring headers can be hidden (@pxref{Article Hiding}).
24391
24392 @item
24393 Default scoring values can now be set from the menu bar.
24394
24395 @item
24396 Further syntax checking of outgoing articles have been added.
24397
24398 @end itemize
24399
24400
24401 @node Red Gnus
24402 @subsubsection Red Gnus
24403
24404 New features in Gnus 5.4/5.5:
24405
24406 @iftex
24407 @iflatex
24408 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24409 @end iflatex
24410 @end iftex
24411
24412 @itemize @bullet
24413
24414 @item
24415 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24416
24417 @item
24418 Article prefetching functionality has been moved up into
24419 Gnus (@pxref{Asynchronous Fetching}).
24420
24421 @item
24422 Scoring can now be performed with logical operators like @code{and},
24423 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24424 Scoring}).
24425
24426 @item
24427 Article washing status can be displayed in the
24428 article mode line (@pxref{Misc Article}).
24429
24430 @item
24431 @file{gnus.el} has been split into many smaller files.
24432
24433 @item
24434 Suppression of duplicate articles based on Message-ID can be done
24435 (@pxref{Duplicate Suppression}).
24436
24437 @lisp
24438 (setq gnus-suppress-duplicates t)
24439 @end lisp
24440
24441 @item
24442 New variables for specifying what score and adapt files are to be
24443 considered home score and adapt files (@pxref{Home Score File}) have
24444 been added.
24445
24446 @item
24447 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24448 Server Internals}).
24449
24450 @item
24451 Groups can inherit group parameters from parent topics (@pxref{Topic
24452 Parameters}).
24453
24454 @item
24455 Article editing has been revamped and is now actually usable.
24456
24457 @item
24458 Signatures can be recognized in more intelligent fashions
24459 (@pxref{Article Signature}).
24460
24461 @item
24462 Summary pick mode has been made to look more @code{nn}-like.  Line
24463 numbers are displayed and the @kbd{.} command can be used to pick
24464 articles (@code{Pick and Read}).
24465
24466 @item
24467 Commands for moving the @file{.newsrc.eld} from one server to
24468 another have been added (@pxref{Changing Servers}).
24469
24470 @item
24471 There's a way now to specify that ``uninteresting'' fields be suppressed
24472 when generating lines in buffers (@pxref{Advanced Formatting}).
24473
24474 @item
24475 Several commands in the group buffer can be undone with @kbd{C-M-_}
24476 (@pxref{Undo}).
24477
24478 @item
24479 Scoring can be done on words using the new score type @code{w}
24480 (@pxref{Score File Format}).
24481
24482 @item
24483 Adaptive scoring can be done on a Subject word-by-word basis
24484 (@pxref{Adaptive Scoring}).
24485
24486 @lisp
24487 (setq gnus-use-adaptive-scoring '(word))
24488 @end lisp
24489
24490 @item
24491 Scores can be decayed (@pxref{Score Decays}).
24492
24493 @lisp
24494 (setq gnus-decay-scores t)
24495 @end lisp
24496
24497 @item
24498 Scoring can be performed using a regexp on the Date header.  The Date is
24499 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24500
24501 @item
24502 A new command has been added to remove all data on articles from
24503 the native server (@pxref{Changing Servers}).
24504
24505 @item
24506 A new command for reading collections of documents
24507 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24508 (@pxref{Really Various Summary Commands}).
24509
24510 @item
24511 Process mark sets can be pushed and popped (@pxref{Setting Process
24512 Marks}).
24513
24514 @item
24515 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24516 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24517
24518 @item
24519 A new back end for reading searches from Web search engines
24520 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24521 (@pxref{Web Searches}).
24522
24523 @item
24524 Groups inside topics can now be sorted using the standard sorting
24525 functions, and each topic can be sorted independently (@pxref{Topic
24526 Sorting}).
24527
24528 @item
24529 Subsets of the groups can be sorted independently (@code{Sorting
24530 Groups}).
24531
24532 @item
24533 Cached articles can be pulled into the groups (@pxref{Summary Generation
24534 Commands}).
24535 @iftex
24536 @iflatex
24537 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24538 @end iflatex
24539 @end iftex
24540
24541 @item
24542 Score files are now applied in a more reliable order (@pxref{Score
24543 Variables}).
24544
24545 @item
24546 Reports on where mail messages end up can be generated (@pxref{Splitting
24547 Mail}).
24548
24549 @item
24550 More hooks and functions have been added to remove junk from incoming
24551 mail before saving the mail (@pxref{Washing Mail}).
24552
24553 @item
24554 Emphasized text can be properly fontisized:
24555
24556 @end itemize
24557
24558
24559 @node Quassia Gnus
24560 @subsubsection Quassia Gnus
24561
24562 New features in Gnus 5.6:
24563
24564 @itemize @bullet
24565
24566 @item
24567 New functionality for using Gnus as an offline newsreader has been
24568 added.  A plethora of new commands and modes have been added.  See
24569 @pxref{Gnus Unplugged} for the full story.
24570
24571 @item
24572  The @code{nndraft} back end has returned, but works differently than
24573 before.  All Message buffers are now also articles in the @code{nndraft}
24574 group, which is created automatically.
24575
24576 @item
24577 @code{gnus-alter-header-function} can now be used to alter header
24578 values.
24579
24580 @item
24581  @code{gnus-summary-goto-article} now accept Message-ID's.
24582
24583 @item
24584  A new Message command for deleting text in the body of a message
24585 outside the region: @kbd{C-c C-v}.
24586
24587 @item
24588  You can now post to component group in @code{nnvirtual} groups with
24589 @kbd{C-u C-c C-c}.
24590
24591 @item
24592  @code{nntp-rlogin-program}---new variable to ease customization.
24593
24594 @item
24595  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24596 re-highlighting of the article buffer.
24597
24598 @item
24599  New element in @code{gnus-boring-article-headers}---@code{long-to}.
24600
24601 @item
24602  @kbd{M-i} symbolic prefix command.  See the section ``Symbolic
24603 Prefixes'' in the Gnus manual for details.
24604
24605 @item
24606  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24607 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24608
24609 @item
24610  @code{gnus-simplify-subject-functions} variable to allow greater
24611 control over simplification.
24612
24613 @item
24614  @kbd{A T}---new command for fetching the current thread.
24615
24616 @item
24617  @kbd{/ T}---new command for including the current thread in the
24618 limit.
24619
24620 @item
24621  @kbd{M-RET} is a new Message command for breaking cited text.
24622
24623 @item
24624  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24625
24626 @item
24627  The @code{custom-face-lookup} function has been removed.
24628 If you used this function in your initialization files, you must
24629 rewrite them to use @code{face-spec-set} instead.
24630
24631 @item
24632  Canceling now uses the current select method.  Symbolic prefix
24633 @kbd{a} forces normal posting method.
24634
24635 @item
24636  New command to translate M******** sm*rtq**t*s into proper
24637 text---@kbd{W d}.
24638
24639 @item
24640  For easier debugging of @code{nntp}, you can set
24641 @code{nntp-record-commands} to a non-@code{nil} value.
24642
24643 @item
24644  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24645 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24646
24647 @item
24648  A command for editing group parameters from the summary buffer
24649 has been added.
24650
24651 @item
24652  A history of where mails have been split is available.
24653
24654 @item
24655  A new article date command has been added---@code{article-date-iso8601}.
24656
24657 @item
24658  Subjects can be simplified when threading by setting
24659 @code{gnus-score-thread-simplify}.
24660
24661 @item
24662  A new function for citing in Message has been
24663 added---@code{message-cite-original-without-signature}.
24664
24665 @item
24666  @code{article-strip-all-blank-lines}---new article command.
24667
24668 @item
24669  A new Message command to kill to the end of the article has
24670 been added.
24671
24672 @item
24673  A minimum adaptive score can be specified by using the
24674 @code{gnus-adaptive-word-minimum} variable.
24675
24676 @item
24677  The ``lapsed date'' article header can be kept continually
24678 updated by the @code{gnus-start-date-timer} command.
24679
24680 @item
24681  Web listserv archives can be read with the @code{nnlistserv} back end.
24682
24683 @item
24684  Old dejanews archives can now be read by @code{nnweb}.
24685
24686 @end itemize
24687
24688 @node Pterodactyl Gnus
24689 @subsubsection Pterodactyl Gnus
24690
24691 New features in Gnus 5.8:
24692
24693 @itemize @bullet
24694
24695 @item
24696 The mail-fetching functions have changed.  See the manual for the
24697 many details.  In particular, all procmail fetching variables are gone.
24698
24699 If you used procmail like in
24700
24701 @lisp
24702 (setq nnmail-use-procmail t)
24703 (setq nnmail-spool-file 'procmail)
24704 (setq nnmail-procmail-directory "~/mail/incoming/")
24705 (setq nnmail-procmail-suffix "\\.in")
24706 @end lisp
24707
24708 this now has changed to
24709
24710 @lisp
24711 (setq mail-sources
24712       '((directory :path "~/mail/incoming/"
24713                    :suffix ".in")))
24714 @end lisp
24715
24716 @xref{Mail Source Specifiers}.
24717
24718 @item
24719 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24720 Gnus, and adds a slew of new commands.  See the manual for details.
24721
24722 @item
24723 Gnus has also been multilingualized.  This also affects too
24724 many parts of Gnus to summarize here, and adds many new variables.
24725
24726 @item
24727 @code{gnus-auto-select-first} can now be a function to be
24728 called to position point.
24729
24730 @item
24731 The user can now decide which extra headers should be included in
24732 summary buffers and @acronym{NOV} files.
24733
24734 @item
24735 @code{gnus-article-display-hook} has been removed.  Instead, a number
24736 of variables starting with @code{gnus-treat-} have been added.
24737
24738 @item
24739 The Gnus posting styles have been redone again and now works in a
24740 subtly different manner.
24741
24742 @item
24743 New web-based back ends have been added: @code{nnslashdot},
24744 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24745 again, to keep up with ever-changing layouts.
24746
24747 @item
24748 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24749
24750 @end itemize
24751
24752 @node Oort Gnus
24753 @subsubsection Oort Gnus
24754 @cindex Oort Gnus
24755
24756 New features in Gnus 5.10:
24757
24758 @itemize @bullet
24759
24760 @item
24761 The revised Gnus @acronym{FAQ} is included in the manual,
24762 @xref{Frequently Asked Questions}.
24763
24764 @item
24765 Upgrading from previous (stable) version if you have used Oort.
24766
24767 If you have tried Oort (the unstable Gnus branch leading to this
24768 release) but went back to a stable version, be careful when upgrading to
24769 this version.  In particular, you will probably want to remove all
24770 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24771 read from your @file{.newsrc.eld} instead of from the
24772 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24773 later entry for more information about marks.  Note that downgrading
24774 isn't save in general.
24775
24776 @item
24777 Article Buttons
24778
24779 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24780 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24781 variables @code{gnus-button-@var{*}-level} can be used to control the
24782 appearance of all article buttons.  @xref{Article Button Levels}.
24783
24784 @item
24785 Dired integration
24786
24787 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24788 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24789 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24790 (@kbd{C-c P}).  It is enabled with 
24791 @lisp
24792 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24793 @end lisp
24794
24795 @item
24796 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24797
24798 @item
24799 Single-part yenc encoded attachments can be decoded.
24800
24801 @item
24802 Picons
24803
24804 The picons code has been reimplemented to work in GNU Emacs---some of
24805 the previous options have been removed or renamed.
24806
24807 Picons are small ``personal icons'' representing users, domain and
24808 newsgroups, which can be displayed in the Article buffer.
24809 @xref{Picons}.
24810
24811 @item
24812 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
24813 boundary line is drawn at the end of the headers.
24814
24815 @item
24816 Retrieval of charters and control messages
24817
24818 There are new commands for fetching newsgroup charters (@kbd{H c}) and
24819 control messages (@kbd{H C}).
24820
24821 @item
24822 Delayed articles
24823
24824 You can delay the sending of a message with @kbd{C-c C-j} in the Message
24825 buffer.  The messages are delivered at specified time.  This is useful
24826 for sending yourself reminders.  @xref{Delayed Articles}.
24827
24828 @item
24829 If @code{auto-compression-mode} is enabled, attachments are automatically
24830 decompressed when activated.
24831
24832 @item
24833 If the new option @code{nnml-use-compressed-files} is non-@code{nil}, 
24834 the nnml back end allows compressed message files.
24835
24836 @item
24837 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
24838
24839 @item
24840 The Summary Buffer uses an arrow in the fringe to indicate the current 
24841 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
24842
24843 @item
24844 Warn about email replies to news
24845
24846 Do you often find yourself replying to news by email by mistake?  Then
24847 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
24848 you.
24849
24850 @item
24851 If the new option @code{gnus-summary-display-while-building} is
24852 non-@code{nil}, the summary buffer is shown and updated as it's being
24853 built.
24854
24855 @item
24856 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
24857 opposed to old but unread messages).
24858
24859 @item
24860 The new option @code{gnus-gcc-mark-as-read} automatically marks 
24861 Gcc articles as read.
24862
24863 @item
24864 The nndoc back end now supports mailman digests and exim bounces.
24865
24866 @item
24867 Gnus supports RFC 2369 mailing list headers, and adds a number of 
24868 related commands in mailing list groups.  @xref{Mailing List}.
24869
24870 @item
24871 The Date header can be displayed in a format that can be read aloud
24872 in English.  @xref{Article Date}.
24873
24874 @item
24875 The envelope sender address can be customized when using Sendmail.
24876 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
24877
24878 @item
24879 diffs are automatically highlighted in groups matching
24880 @code{mm-uu-diff-groups-regexp}
24881
24882 @item
24883 @acronym{TLS} wrapper shipped with Gnus
24884
24885 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
24886 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
24887 @acronym{TLS}/@acronym{SSL} support via (external third party)
24888 @file{ssl.el} and OpenSSL still works.
24889
24890 @item
24891 New @file{make.bat} for compiling and installing Gnus under MS Windows
24892
24893 Use @file{make.bat} if you want to install Gnus under MS Windows, the
24894 first argument to the batch-program should be the directory where
24895 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
24896 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
24897 the second parameter.
24898
24899 @file{make.bat} has been rewritten from scratch, it now features
24900 automatic recognition of XEmacs and GNU Emacs, generates
24901 @file{gnus-load.el}, checks if errors occur while compilation and
24902 generation of info files and reports them at the end of the build
24903 process. It now uses @code{makeinfo} if it is available and falls
24904 back to @file{infohack.el} otherwise.  @file{make.bat} should now
24905 install all files which are necessary to run Gnus and be generally a
24906 complete replacement for the @code{configure; make; make install}
24907 cycle used under Unix systems.
24908
24909 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
24910 been removed.
24911
24912 @item
24913 Support for non-@acronym{ASCII} domain names
24914
24915 Message supports non-@acronym{ASCII} domain names in From:, To: and
24916 Cc: and will query you whether to perform encoding when you try to
24917 send a message.  The variable @code{message-use-idna} controls this.
24918 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
24919 and Cc: when you view a message.  The variable @code{gnus-use-idna}
24920 controls this.
24921
24922 @item
24923 Better handling of Microsoft citation styles
24924
24925 Gnus now tries to recognize the mangled header block that some Microsoft
24926 mailers use to indicate that the rest of the message is a citation, even
24927 though it is not quoted in any way.  The variable
24928 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
24929 citations.
24930
24931 @item
24932 @code{gnus-article-skip-boring}
24933
24934 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
24935 not scroll down to show you a page that contains only boring text,
24936 which by default means cited text and signature.  You can customize
24937 what is skippable using @code{gnus-article-boring-faces}.
24938
24939 This feature is especially useful if you read many articles that
24940 consist of a little new content at the top with a long, untrimmed
24941 message cited below.
24942
24943 @item
24944 The format spec @code{%C} for positioning point has changed to @code{%*}.
24945
24946 @item
24947 The new variable @code{gnus-parameters} can be used to set group parameters.
24948
24949 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
24950 the parameters in @file{~/.newsrc.eld}, but via this variable you can
24951 enjoy the powers of customize, and simplified backups since you set the
24952 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
24953 variable maps regular expressions matching group names to group
24954 parameters, a'la:
24955 @lisp
24956 (setq gnus-parameters
24957       '(("mail\\..*"
24958          (gnus-show-threads nil)
24959          (gnus-use-scoring nil))
24960         ("^nnimap:\\(foo.bar\\)$"
24961          (to-group . "\\1"))))
24962 @end lisp
24963
24964 @item
24965 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
24966
24967 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
24968 disable it.
24969
24970 @item
24971 Gnus no longer generate the Sender: header automatically.
24972
24973 Earlier it was generated iff the user configurable email address was
24974 different from the Gnus guessed default user address.  As the guessing
24975 algorithm is rarely correct these days, and (more controversially) the
24976 only use of the Sender: header was to check if you are entitled to
24977 cancel/supersede news (which is now solved by Cancel Locks instead,
24978 see another entry), generation of the header has been disabled by
24979 default.  See the variables @code{message-required-headers},
24980 @code{message-required-news-headers}, and
24981 @code{message-required-mail-headers}.
24982
24983 @item
24984 Features from third party @file{message-utils.el} added to @file{message.el}.
24985
24986 Message now asks if you wish to remove @samp{(was: <old subject>)} from
24987 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
24988 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
24989 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
24990 appropriate headers and a note in the body for cross-postings and
24991 followups (see the variables @code{message-cross-post-@var{*}}).
24992
24993 @item
24994 References and X-Draft-Headers are no longer generated when you start
24995 composing messages and @code{message-generate-headers-first} is
24996 @code{nil}.
24997
24998 @item
24999 Improved anti-spam features.
25000
25001 Gnus is now able to take out spam from your mail and news streams
25002 using a wide variety of programs and filter rules. Among the supported
25003 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25004 for easy use of external packages such as SpamAssassin and Hashcash
25005 are also new.  @xref{Thwarting Email Spam}.
25006
25007 @item
25008 Easy inclusion of X-Faces headers.
25009
25010 @item
25011 In the summary buffer, the new command @kbd{/ N} inserts new messages
25012 and @kbd{/ o} inserts old messages.
25013
25014 @item
25015 Gnus decodes morse encoded messages if you press @kbd{W m}.
25016
25017 @item
25018 Unread count correct in nnimap groups.
25019
25020 The estimated number of unread articles in the group buffer should now
25021 be correct for nnimap groups.  This is achieved by calling
25022 @code{nnimap-fixup-unread-after-getting-new-news} from the
25023 @code{gnus-setup-news-hook} (called on startup) and
25024 @code{gnus-after-getting-new-news-hook}. (called after getting new
25025 mail).  If you have modified those variables from the default, you may
25026 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25027 you were happy with the estimate and want to save some (minimal) time
25028 when getting new mail, remove the function.
25029
25030 @item
25031 Group Carbon Copy (GCC) quoting
25032
25033 To support groups that contains SPC and other weird characters, groups
25034 are quoted before they are placed in the Gcc: header.  This means
25035 variables such as @code{gnus-message-archive-group} should no longer
25036 contain quote characters to make groups containing SPC work.  Also, if
25037 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25038 into two groups) you must change it to return the list
25039 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25040 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25041 was incorrect earlier, it just didn't generate any problems since it
25042 was inserted directly.
25043
25044 @item
25045 @file{~/News/overview/} not used.
25046
25047 As a result of the following change, the @file{~/News/overview/}
25048 directory is not used any more.  You can safely delete the entire
25049 hierarchy.
25050
25051 @item
25052 @code{gnus-agent}
25053
25054 The Gnus Agent has seen a major updated and is now enabled by default,
25055 and all nntp and nnimap servers from @code{gnus-select-method} and
25056 @code{gnus-secondary-select-method} are agentized by default. Earlier
25057 only the server in @code{gnus-select-method} was agentized by the
25058 default, and the agent was disabled by default.  When the agent is
25059 enabled, headers are now also retrieved from the Agent cache instead
25060 of the back ends when possible. Earlier this only happened in the
25061 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25062 @kbd{J r} in the server buffer.  Gnus will not download articles into
25063 the Agent cache, unless you instruct it to do so, though, by using
25064 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25065 behaviour of having the Agent disabled with @code{(setq gnus-agent
25066 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25067 is not needed any more.
25068
25069 @item
25070 @code{gnus-summary-line-format}
25071
25072 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25073 %s\n}.  Moreover @code{gnus-extra-headers},
25074 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25075 changed their default so that the users name will be replaced by the
25076 recipient's name or the group name posting to for @acronym{NNTP}
25077 groups.
25078
25079 @item
25080 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25081
25082 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25083 broken Outlook (Express) articles.
25084
25085 @item
25086 @code{(require 'gnus-load)}
25087
25088 If you use a stand-alone Gnus distribution, you'd better add
25089 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25090 lisp directory into load-path.
25091
25092 File @file{gnus-load.el} contains autoload commands, functions and variables,
25093 some of which may not be included in distributions of Emacsen.
25094
25095 @item
25096 @code{gnus-slave-unplugged}
25097
25098 A new command which starts Gnus offline in slave mode.
25099
25100 @item
25101 @code{message-insinuate-rmail}
25102
25103 Adding @code{(message-insinuate-rmail)} and @code{(setq
25104 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25105 compose, reply and forward messages in message-mode, where you can
25106 enjoy the power of @acronym{MML}.
25107
25108 @item
25109 @code{message-minibuffer-local-map}
25110
25111 The line below enables BBDB in resending a message:
25112 @lisp
25113 (define-key message-minibuffer-local-map [(tab)]
25114   'bbdb-complete-name)
25115 @end lisp
25116
25117 @item
25118 Externalizing and deleting of attachments.
25119
25120 If @code{gnus-gcc-externalize-attachments} or
25121 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25122 local files as external parts.
25123
25124 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25125 on @acronym{MIME} buttons) saves a part and replaces the part with an
25126 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25127 @acronym{MIME} buttons) removes a part. It works only on back ends
25128 that support editing.
25129
25130 @item
25131 @code{gnus-default-charset}
25132
25133 The default value is determined from the
25134 @code{current-language-environment} variable, instead of
25135 @code{iso-8859-1}.  Also the @samp{.*} item in
25136 @code{gnus-group-charset-alist} is removed.
25137
25138 @item
25139 @code{gnus-posting-styles}
25140
25141 Add a new format of match like
25142 @lisp
25143 ((header "to" "larsi.*org")
25144  (Organization "Somewhere, Inc."))
25145 @end lisp
25146 The old format like the lines below is obsolete, but still accepted.
25147 @lisp
25148 (header "to" "larsi.*org"
25149         (Organization "Somewhere, Inc."))
25150 @end lisp
25151
25152 @item
25153 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25154
25155 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25156 added into these two variables. If you customized those, perhaps you
25157 need add those two headers too.
25158
25159 @item
25160 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25161
25162 If one reads an article while plugged, and the article already exists
25163 in the Agent, it won't get downloaded once more.  @code{(setq
25164 gnus-agent-cache nil)} reverts to the old behavior.
25165
25166 @item
25167 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25168 composing messages, it is enabled by @code{use-hard-newlines}.
25169 Decoding format=flowed was present but not documented in earlier
25170 versions.
25171
25172 @item
25173 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25174
25175 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25176
25177 @item
25178 Gnus supports Maildir groups.
25179
25180 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25181
25182 @item
25183 Printing capabilities are enhanced.
25184
25185 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25186 Article buffers.  Also, each individual @acronym{MIME} part can be
25187 printed using @kbd{p} on the @acronym{MIME} button.
25188
25189 @item
25190 Message supports the Importance: (RFC 2156) header.
25191
25192 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25193 the valid values.
25194
25195 @item
25196 Gnus supports Cancel Locks in News.
25197
25198 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25199 used to determine if you wrote an article or not (for cancelling and
25200 superseding).  Gnus generates a random password string the first time
25201 you post a message, and saves it in your @file{~/.emacs} using the Custom
25202 system.  While the variable is called @code{canlock-password}, it is not
25203 security sensitive data.  Publishing your canlock string on the web
25204 will not allow anyone to be able to anything she could not already do.
25205 The behaviour can be changed by customizing @code{message-insert-canlock}.
25206
25207 @item
25208 Gnus supports server-side mail filtering using Sieve.
25209
25210 Sieve rules can be added as Group Parameters for groups, and the
25211 complete Sieve script is generated using @kbd{D g} from the Group
25212 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25213 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25214 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25215
25216 @item
25217 Extended format specs.
25218
25219 Format spec @samp{%&user-date;} is added into
25220 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25221 format specs are supported.  The extended format specs look like
25222 @samp{%u&foo;}, which invokes function
25223 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25224 escape character, old user defined format @samp{%u&} is no longer supported.
25225
25226 @item
25227 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25228
25229 It was aliased to @kbd{Y c}
25230 (@code{gnus-summary-insert-cached-articles}). The new function filters
25231 out other articles.
25232
25233 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25234
25235 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25236 s}, @kbd{/ a}, and @kbd{/ x}
25237 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25238 result will be to display all articles that do not match the expression.
25239
25240 @item
25241 Group names are treated as UTF-8 by default.
25242
25243 This is supposedly what USEFOR wanted to migrate to.  See
25244 @code{gnus-group-name-charset-group-alist} and
25245 @code{gnus-group-name-charset-method-alist} for customization.
25246
25247 @item
25248 The nnml and nnfolder back ends store marks for each groups.
25249
25250 This makes it possible to take backup of nnml/nnfolder servers/groups
25251 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25252 makes it possible to share articles and marks between users (without
25253 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25254 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25255 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25256 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25257 another machine, Gnus will automatically use the @file{.marks} or
25258 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25259 The new server variables @code{nnml-marks-is-evil} and
25260 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25261
25262 @item
25263 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25264 been renamed to ``Gnus''.
25265
25266 @item
25267 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25268 renamed to ``Attachments''.  Note that this menu also contains security
25269 related stuff, like signing and encryption (@pxref{Security, Security,,
25270 message, Message Manual}).
25271
25272 @item
25273 @code{gnus-group-charset-alist} and
25274 @code{gnus-group-ignored-charsets-alist}.
25275
25276 The regexps in these variables are compared with full group names
25277 instead of real group names in 5.8.  Users who customize these
25278 variables should change those regexps accordingly. For example:
25279 @lisp
25280 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25281 @end lisp
25282
25283 @item
25284 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25285 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25286
25287 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25288 additional Lisp libraries.  This add several menu items to the
25289 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25290 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25291
25292 @item
25293 Gnus inlines external parts (message/external).
25294
25295 @item
25296 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25297 C-m}.
25298
25299 This change was made to avoid conflict with the standard binding of
25300 @code{back-to-indentation}, which is also useful in message mode.
25301 @end itemize
25302
25303 @iftex
25304
25305 @page
25306 @node The Manual
25307 @section The Manual
25308 @cindex colophon
25309 @cindex manual
25310
25311 This manual was generated from a TeXinfo file and then run through
25312 either @code{texi2dvi}
25313 @iflatex
25314 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25315 and then run through @code{latex} and @code{dvips}
25316 @end iflatex
25317 to get what you hold in your hands now.
25318
25319 The following conventions have been used:
25320
25321 @enumerate
25322
25323 @item
25324 This is a @samp{string}
25325
25326 @item
25327 This is a @kbd{keystroke}
25328
25329 @item
25330 This is a @file{file}
25331
25332 @item
25333 This is a @code{symbol}
25334
25335 @end enumerate
25336
25337 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25338 mean:
25339
25340 @lisp
25341 (setq flargnoze "yes")
25342 @end lisp
25343
25344 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25345
25346 @lisp
25347 (setq flumphel 'yes)
25348 @end lisp
25349
25350 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25351 ever get them confused.
25352
25353 @iflatex
25354 @c @head
25355 Of course, everything in this manual is of vital interest, so you should
25356 read it all.  Several times.  However, if you feel like skimming the
25357 manual, look for that gnu head you should see in the margin over
25358 there---it means that what's being discussed is of more importance than
25359 the rest of the stuff.  (On the other hand, if everything is infinitely
25360 important, how can anything be more important than that?  Just one more
25361 of the mysteries of this world, I guess.)
25362 @end iflatex
25363
25364 @end iftex
25365
25366
25367 @node On Writing Manuals
25368 @section On Writing Manuals
25369
25370 I guess most manuals are written after-the-fact; documenting a program
25371 that's already there.  This is not how this manual is written.  When
25372 implementing something, I write the manual entry for that something
25373 straight away.  I then see that it's difficult to explain the
25374 functionality, so I write how it's supposed to be, and then I change the
25375 implementation.  Writing the documentation and writing the code goes
25376 hand in hand.
25377
25378 This, of course, means that this manual has no, or little, flow.  It
25379 documents absolutely everything in Gnus, but often not where you're
25380 looking for it.  It is a reference manual, and not a guide to how to get
25381 started with Gnus.
25382
25383 That would be a totally different book, that should be written using the
25384 reference manual as source material.  It would look quite differently.
25385
25386
25387 @page
25388 @node Terminology
25389 @section Terminology
25390
25391 @cindex terminology
25392 @table @dfn
25393
25394 @item news
25395 @cindex news
25396 This is what you are supposed to use this thing for---reading news.
25397 News is generally fetched from a nearby @acronym{NNTP} server, and is
25398 generally publicly available to everybody.  If you post news, the entire
25399 world is likely to read just what you have written, and they'll all
25400 snigger mischievously.  Behind your back.
25401
25402 @item mail
25403 @cindex mail
25404 Everything that's delivered to you personally is mail.  Some news/mail
25405 readers (like Gnus) blur the distinction between mail and news, but
25406 there is a difference.  Mail is private.  News is public.  Mailing is
25407 not posting, and replying is not following up.
25408
25409 @item reply
25410 @cindex reply
25411 Send a mail to the person who has written what you are reading.
25412
25413 @item follow up
25414 @cindex follow up
25415 Post an article to the current newsgroup responding to the article you
25416 are reading.
25417
25418 @item back end
25419 @cindex back end
25420 Gnus considers mail and news to be mostly the same, really.  The only
25421 difference is how to access the actual articles.  News articles are
25422 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25423 messages could be read from a file on the local disk.  The internal
25424 architecture of Gnus thus comprises a `front end' and a number of
25425 `back ends'.  Internally, when you enter a group (by hitting
25426 @key{RET}, say), you thereby invoke a function in the front end in
25427 Gnus.  The front end then `talks' to a back end and says things like
25428 ``Give me the list of articles in the foo group'' or ``Show me article
25429 number 4711''.
25430
25431 So a back end mainly defines either a protocol (the @code{nntp} back
25432 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25433 accesses mail via @acronym{IMAP}) or a file format and directory
25434 layout (the @code{nnspool} back end accesses news via the common
25435 `spool directory' format, the @code{nnml} back end access mail via a
25436 file format and directory layout that's quite similar).
25437
25438 Gnus does not handle the underlying media, so to speak---this is all
25439 done by the back ends.  A back end is a collection of functions to
25440 access the articles.
25441
25442 However, sometimes the term `back end' is also used where `server'
25443 would have been more appropriate.  And then there is the term `select
25444 method' which can mean either.  The Gnus terminology can be quite
25445 confusing.
25446
25447 @item native
25448 @cindex native
25449 Gnus will always use one method (and back end) as the @dfn{native}, or
25450 default, way of getting news.
25451
25452 @item foreign
25453 @cindex foreign
25454 You can also have any number of foreign groups active at the same time.
25455 These are groups that use non-native non-secondary back ends for getting
25456 news.
25457
25458 @item secondary
25459 @cindex secondary
25460 Secondary back ends are somewhere half-way between being native and being
25461 foreign, but they mostly act like they are native.
25462
25463 @item article
25464 @cindex article
25465 A message that has been posted as news.
25466
25467 @item mail message
25468 @cindex mail message
25469 A message that has been mailed.
25470
25471 @item message
25472 @cindex message
25473 A mail message or news article
25474
25475 @item head
25476 @cindex head
25477 The top part of a message, where administrative information (etc.) is
25478 put.
25479
25480 @item body
25481 @cindex body
25482 The rest of an article.  Everything not in the head is in the
25483 body.
25484
25485 @item header
25486 @cindex header
25487 A line from the head of an article.
25488
25489 @item headers
25490 @cindex headers
25491 A collection of such lines, or a collection of heads.  Or even a
25492 collection of @acronym{NOV} lines.
25493
25494 @item @acronym{NOV}
25495 @cindex @acronym{NOV}
25496 When Gnus enters a group, it asks the back end for the headers of all
25497 unread articles in the group.  Most servers support the News OverView
25498 format, which is more compact and much faster to read and parse than the
25499 normal @sc{head} format.
25500
25501 @item level
25502 @cindex levels
25503 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25504 that have a lower level are ``more'' subscribed than the groups with a
25505 higher level.  In fact, groups on levels 1-5 are considered
25506 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25507 are @dfn{killed}.  Commands for listing groups and scanning for new
25508 articles will all use the numeric prefix as @dfn{working level}.
25509
25510 @item killed groups
25511 @cindex killed groups
25512 No information on killed groups is stored or updated, which makes killed
25513 groups much easier to handle than subscribed groups.
25514
25515 @item zombie groups
25516 @cindex zombie groups
25517 Just like killed groups, only slightly less dead.
25518
25519 @item active file
25520 @cindex active file
25521 The news server has to keep track of what articles it carries, and what
25522 groups exist.  All this information in stored in the active file, which
25523 is rather large, as you might surmise.
25524
25525 @item bogus groups
25526 @cindex bogus groups
25527 A group that exists in the @file{.newsrc} file, but isn't known to the
25528 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25529 This means that the group probably doesn't exist (any more).
25530
25531 @item activating
25532 @cindex activating groups
25533 The act of asking the server for info on a group and computing the
25534 number of unread articles is called @dfn{activating the group}.
25535 Un-activated groups are listed with @samp{*} in the group buffer.
25536
25537 @item server
25538 @cindex server
25539 A machine one can connect to and get news (or mail) from.
25540
25541 @item select method
25542 @cindex select method
25543 A structure that specifies the back end, the server and the virtual
25544 server settings.
25545
25546 @item virtual server
25547 @cindex virtual server
25548 A named select method.  Since a select method defines all there is to
25549 know about connecting to a (physical) server, taking the thing as a
25550 whole is a virtual server.
25551
25552 @item washing
25553 @cindex washing
25554 Taking a buffer and running it through a filter of some sort.  The
25555 result will (more often than not) be cleaner and more pleasing than the
25556 original.
25557
25558 @item ephemeral groups
25559 @cindex ephemeral groups
25560 @cindex temporary groups
25561 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25562 groups are groups that will have no data stored---when you exit the
25563 group, it'll disappear into the aether.
25564
25565 @item solid groups
25566 @cindex solid groups
25567 This is the opposite of ephemeral groups.  All groups listed in the
25568 group buffer are solid groups.
25569
25570 @item sparse articles
25571 @cindex sparse articles
25572 These are article placeholders shown in the summary buffer when
25573 @code{gnus-build-sparse-threads} has been switched on.
25574
25575 @item threading
25576 @cindex threading
25577 To put responses to articles directly after the articles they respond
25578 to---in a hierarchical fashion.
25579
25580 @item root
25581 @cindex root
25582 @cindex thread root
25583 The first article in a thread is the root.  It is the ancestor of all
25584 articles in the thread.
25585
25586 @item parent
25587 @cindex parent
25588 An article that has responses.
25589
25590 @item child
25591 @cindex child
25592 An article that responds to a different article---its parent.
25593
25594 @item digest
25595 @cindex digest
25596 A collection of messages in one file.  The most common digest format is
25597 specified by RFC 1153.
25598
25599 @end table
25600
25601
25602 @page
25603 @node Customization
25604 @section Customization
25605 @cindex general customization
25606
25607 All variables are properly documented elsewhere in this manual.  This
25608 section is designed to give general pointers on how to customize Gnus
25609 for some quite common situations.
25610
25611 @menu
25612 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25613 * Slow Terminal Connection::    You run a remote Emacs.
25614 * Little Disk Space::           You feel that having large setup files is icky.
25615 * Slow Machine::                You feel like buying a faster machine.
25616 @end menu
25617
25618
25619 @node Slow/Expensive Connection
25620 @subsection Slow/Expensive NNTP Connection
25621
25622 If you run Emacs on a machine locally, and get your news from a machine
25623 over some very thin strings, you want to cut down on the amount of data
25624 Gnus has to get from the @acronym{NNTP} server.
25625
25626 @table @code
25627
25628 @item gnus-read-active-file
25629 Set this to @code{nil}, which will inhibit Gnus from requesting the
25630 entire active file from the server.  This file is often v.  large.  You
25631 also have to set @code{gnus-check-new-newsgroups} and
25632 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25633 doesn't suddenly decide to fetch the active file anyway.
25634
25635 @item gnus-nov-is-evil
25636 This one has to be @code{nil}.  If not, grabbing article headers from
25637 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25638 support @sc{xover}; Gnus will detect this by itself.
25639 @end table
25640
25641
25642 @node Slow Terminal Connection
25643 @subsection Slow Terminal Connection
25644
25645 Let's say you use your home computer for dialing up the system that runs
25646 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25647 possible) the amount of data sent over the wires.
25648
25649 @table @code
25650
25651 @item gnus-auto-center-summary
25652 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25653 buffer all the time.  If it is @code{vertical}, do only vertical
25654 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25655 horizontal and vertical recentering.
25656
25657 @item gnus-visible-headers
25658 Cut down on the headers included in the articles to the
25659 minimum.  You can, in fact, make do without them altogether---most of the
25660 useful data is in the summary buffer, anyway.  Set this variable to
25661 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25662
25663 Set this hook to all the available hiding commands:
25664 @lisp
25665 (setq gnus-treat-hide-headers 'head
25666       gnus-treat-hide-signature t
25667       gnus-treat-hide-citation t)
25668 @end lisp
25669
25670 @item gnus-use-full-window
25671 By setting this to @code{nil}, you can make all the windows smaller.
25672 While this doesn't really cut down much generally, it means that you
25673 have to see smaller portions of articles before deciding that you didn't
25674 want to read them anyway.
25675
25676 @item gnus-thread-hide-subtree
25677 If this is non-@code{nil}, all threads in the summary buffer will be
25678 hidden initially.
25679
25680
25681 @item gnus-updated-mode-lines
25682 If this is @code{nil}, Gnus will not put information in the buffer mode
25683 lines, which might save some time.
25684 @end table
25685
25686
25687 @node Little Disk Space
25688 @subsection Little Disk Space
25689 @cindex disk space
25690
25691 The startup files can get rather large, so you may want to cut their
25692 sizes a bit if you are running out of space.
25693
25694 @table @code
25695
25696 @item gnus-save-newsrc-file
25697 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25698 only save @file{.newsrc.eld}.  This means that you will not be able to
25699 use any other newsreaders than Gnus.  This variable is @code{t} by
25700 default.
25701
25702 @item gnus-read-newsrc-file
25703 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25704 only read @file{.newsrc.eld}.  This means that you will not be able to
25705 use any other newsreaders than Gnus.  This variable is @code{t} by
25706 default.
25707
25708 @item gnus-save-killed-list
25709 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25710 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25711 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25712 variable to @code{nil}.  This variable is @code{t} by default.
25713
25714 @end table
25715
25716
25717 @node Slow Machine
25718 @subsection Slow Machine
25719 @cindex slow machine
25720
25721 If you have a slow machine, or are just really impatient, there are a
25722 few things you can do to make Gnus run faster.
25723
25724 Set @code{gnus-check-new-newsgroups} and
25725 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25726
25727 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25728 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25729 summary buffer faster.
25730
25731
25732 @page
25733 @node Troubleshooting
25734 @section Troubleshooting
25735 @cindex troubleshooting
25736
25737 Gnus works @emph{so} well straight out of the box---I can't imagine any
25738 problems, really.
25739
25740 Ahem.
25741
25742 @enumerate
25743
25744 @item
25745 Make sure your computer is switched on.
25746
25747 @item
25748 Make sure that you really load the current Gnus version.  If you have
25749 been running @sc{gnus}, you need to exit Emacs and start it up again before
25750 Gnus will work.
25751
25752 @item
25753 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25754 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
25755 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
25756 flee}, you have some old @file{.el} files lying around.  Delete these.
25757
25758 @item
25759 Read the help group (@kbd{G h} in the group buffer) for a
25760 @acronym{FAQ} and a how-to.
25761
25762 @item
25763 @vindex max-lisp-eval-depth
25764 Gnus works on many recursive structures, and in some extreme (and very
25765 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25766 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25767 something like that.
25768 @end enumerate
25769
25770 If all else fails, report the problem as a bug.
25771
25772 @cindex bugs
25773 @cindex reporting bugs
25774
25775 @kindex M-x gnus-bug
25776 @findex gnus-bug
25777 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25778 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25779 me the backtrace.  I will fix bugs, but I can only fix them if you send
25780 me a precise description as to how to reproduce the bug.
25781
25782 You really can never be too detailed in a bug report.  Always use the
25783 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25784 a 10Kb mail each time you use it, and even if you have sent me your
25785 environment 500 times before.  I don't care.  I want the full info each
25786 time.
25787
25788 It is also important to remember that I have no memory whatsoever.  If
25789 you send a bug report, and I send you a reply, and then you just send
25790 back ``No, it's not! Moron!'', I will have no idea what you are
25791 insulting me about.  Always over-explain everything.  It's much easier
25792 for all of us---if I don't have all the information I need, I will just
25793 mail you and ask for more info, and everything takes more time.
25794
25795 If the problem you're seeing is very visual, and you can't quite explain
25796 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25797 it somewhere it can be reached, and include the URL of the picture in
25798 the bug report.
25799
25800 @cindex patches
25801 If you would like to contribute a patch to fix bugs or make
25802 improvements, please produce the patch using @samp{diff -u}.
25803
25804 @cindex edebug
25805 If you want to debug your problem further before reporting, possibly
25806 in order to solve the problem yourself and send a patch, you can use
25807 edebug.  Debugging Lisp code is documented in the Elisp manual
25808 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
25809 Lisp Reference Manual}).  To get you started with edebug, consider if
25810 you discover some weird behaviour when pressing @kbd{c}, the first
25811 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
25812 the documentation buffer that leads you to the function definition,
25813 then press @kbd{M-x edebug-defun RET} with point inside that function,
25814 return to Gnus and press @kbd{c} to invoke the code.  You will be
25815 placed in the lisp buffer and can single step using @kbd{SPC} and
25816 evaluate expressions using @kbd{M-:} or inspect variables using
25817 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
25818 @kbd{c} or @kbd{g}.
25819
25820 @cindex elp
25821 @cindex profile
25822 @cindex slow
25823 Sometimes, a problem do not directly generate an elisp error but
25824 manifests itself by causing Gnus to be very slow.  In these cases, you
25825 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
25826 slow, and then try to analyze the backtrace (repeating the procedure
25827 helps isolating the real problem areas).  
25828
25829 A fancier approach is to use the elisp profiler, ELP.  The profiler is
25830 (or should be) fully documented elsewhere, but to get you started
25831 there are a few steps that need to be followed.  First, instrument the
25832 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
25833 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
25834 RET message}.  Then perform the operation that is slow and press
25835 @kbd{M-x elp-results}.  You will then see which operations that takes
25836 time, and can debug them further.  If the entire operation takes much
25837 longer than the time spent in the slowest function in the profiler
25838 output, you probably profiled the wrong part of Gnus.  To reset
25839 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
25840 elp-restore-all} is supposed to remove profiling, but given the
25841 complexities and dynamic code generation in Gnus, it might not always
25842 work perfectly.
25843
25844 @cindex gnu.emacs.gnus
25845 @cindex ding mailing list
25846 If you just need help, you are better off asking on
25847 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
25848 @email{ding@@gnus.org, the ding mailing list}.  Write to
25849 @email{ding-request@@gnus.org} to subscribe.
25850
25851
25852 @page
25853 @node Gnus Reference Guide
25854 @section Gnus Reference Guide
25855
25856 It is my hope that other people will figure out smart stuff that Gnus
25857 can do, and that other people will write those smart things as well.  To
25858 facilitate that I thought it would be a good idea to describe the inner
25859 workings of Gnus.  And some of the not-so-inner workings, while I'm at
25860 it.
25861
25862 You can never expect the internals of a program not to change, but I
25863 will be defining (in some details) the interface between Gnus and its
25864 back ends (this is written in stone), the format of the score files
25865 (ditto), data structures (some are less likely to change than others)
25866 and general methods of operation.
25867
25868 @menu
25869 * Gnus Utility Functions::      Common functions and variable to use.
25870 * Back End Interface::          How Gnus communicates with the servers.
25871 * Score File Syntax::           A BNF definition of the score file standard.
25872 * Headers::                     How Gnus stores headers internally.
25873 * Ranges::                      A handy format for storing mucho numbers.
25874 * Group Info::                  The group info format.
25875 * Extended Interactive::        Symbolic prefixes and stuff.
25876 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
25877 * Various File Formats::        Formats of files that Gnus use.
25878 @end menu
25879
25880
25881 @node Gnus Utility Functions
25882 @subsection Gnus Utility Functions
25883 @cindex Gnus utility functions
25884 @cindex utility functions
25885 @cindex functions
25886 @cindex internal variables
25887
25888 When writing small functions to be run from hooks (and stuff), it's
25889 vital to have access to the Gnus internal functions and variables.
25890 Below is a list of the most common ones.
25891
25892 @table @code
25893
25894 @item gnus-newsgroup-name
25895 @vindex gnus-newsgroup-name
25896 This variable holds the name of the current newsgroup.
25897
25898 @item gnus-find-method-for-group
25899 @findex gnus-find-method-for-group
25900 A function that returns the select method for @var{group}.
25901
25902 @item gnus-group-real-name
25903 @findex gnus-group-real-name
25904 Takes a full (prefixed) Gnus group name, and returns the unprefixed
25905 name.
25906
25907 @item gnus-group-prefixed-name
25908 @findex gnus-group-prefixed-name
25909 Takes an unprefixed group name and a select method, and returns the full
25910 (prefixed) Gnus group name.
25911
25912 @item gnus-get-info
25913 @findex gnus-get-info
25914 Returns the group info list for @var{group}.
25915
25916 @item gnus-group-unread
25917 @findex gnus-group-unread
25918 The number of unread articles in @var{group}, or @code{t} if that is
25919 unknown.
25920
25921 @item gnus-active
25922 @findex gnus-active
25923 The active entry for @var{group}.
25924
25925 @item gnus-set-active
25926 @findex gnus-set-active
25927 Set the active entry for @var{group}.
25928
25929 @item gnus-add-current-to-buffer-list
25930 @findex gnus-add-current-to-buffer-list
25931 Adds the current buffer to the list of buffers to be killed on Gnus
25932 exit.
25933
25934 @item gnus-continuum-version
25935 @findex gnus-continuum-version
25936 Takes a Gnus version string as a parameter and returns a floating point
25937 number.  Earlier versions will always get a lower number than later
25938 versions.
25939
25940 @item gnus-group-read-only-p
25941 @findex gnus-group-read-only-p
25942 Says whether @var{group} is read-only or not.
25943
25944 @item gnus-news-group-p
25945 @findex gnus-news-group-p
25946 Says whether @var{group} came from a news back end.
25947
25948 @item gnus-ephemeral-group-p
25949 @findex gnus-ephemeral-group-p
25950 Says whether @var{group} is ephemeral or not.
25951
25952 @item gnus-server-to-method
25953 @findex gnus-server-to-method
25954 Returns the select method corresponding to @var{server}.
25955
25956 @item gnus-server-equal
25957 @findex gnus-server-equal
25958 Says whether two virtual servers are equal.
25959
25960 @item gnus-group-native-p
25961 @findex gnus-group-native-p
25962 Says whether @var{group} is native or not.
25963
25964 @item gnus-group-secondary-p
25965 @findex gnus-group-secondary-p
25966 Says whether @var{group} is secondary or not.
25967
25968 @item gnus-group-foreign-p
25969 @findex gnus-group-foreign-p
25970 Says whether @var{group} is foreign or not.
25971
25972 @item gnus-group-find-parameter
25973 @findex gnus-group-find-parameter
25974 Returns the parameter list of @var{group}.  If given a second parameter,
25975 returns the value of that parameter for @var{group}.
25976
25977 @item gnus-group-set-parameter
25978 @findex gnus-group-set-parameter
25979 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
25980
25981 @item gnus-narrow-to-body
25982 @findex gnus-narrow-to-body
25983 Narrows the current buffer to the body of the article.
25984
25985 @item gnus-check-backend-function
25986 @findex gnus-check-backend-function
25987 Takes two parameters, @var{function} and @var{group}.  If the back end
25988 @var{group} comes from supports @var{function}, return non-@code{nil}.
25989
25990 @lisp
25991 (gnus-check-backend-function "request-scan" "nnml:misc")
25992 @result{} t
25993 @end lisp
25994
25995 @item gnus-read-method
25996 @findex gnus-read-method
25997 Prompts the user for a select method.
25998
25999 @end table
26000
26001
26002 @node Back End Interface
26003 @subsection Back End Interface
26004
26005 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26006 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26007 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26008 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26009 examples of the latter we have @code{nntp-port-number} and
26010 @code{nnmbox-directory}.
26011
26012 When Gnus asks for information from a back end---say @code{nntp}---on
26013 something, it will normally include a virtual server name in the
26014 function parameters.  (If not, the back end should use the ``current''
26015 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26016 server as its only (optional) parameter.  If this virtual server hasn't
26017 been opened, the function should fail.
26018
26019 Note that a virtual server name has no relation to some physical server
26020 name.  Take this example:
26021
26022 @lisp
26023 (nntp "odd-one"
26024       (nntp-address "ifi.uio.no")
26025       (nntp-port-number 4324))
26026 @end lisp
26027
26028 Here the virtual server name is @samp{odd-one} while the name of
26029 the physical server is @samp{ifi.uio.no}.
26030
26031 The back ends should be able to switch between several virtual servers.
26032 The standard back ends implement this by keeping an alist of virtual
26033 server environments that they pull down/push up when needed.
26034
26035 There are two groups of interface functions: @dfn{required functions},
26036 which must be present, and @dfn{optional functions}, which Gnus will
26037 always check for presence before attempting to call 'em.
26038
26039 All these functions are expected to return data in the buffer
26040 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26041 unfortunately named, but we'll have to live with it.  When I talk about
26042 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26043 talk about @dfn{return value}, I talk about the function value returned by
26044 the function call.  Functions that fail should return @code{nil} as the
26045 return value.
26046
26047 Some back ends could be said to be @dfn{server-forming} back ends, and
26048 some might be said not to be.  The latter are back ends that generally
26049 only operate on one group at a time, and have no concept of ``server''
26050 ---they have a group, and they deliver info on that group and nothing
26051 more.
26052
26053 Gnus identifies each message by way of group name and article number.  A
26054 few remarks about these article numbers might be useful.  First of all,
26055 the numbers are positive integers.  Secondly, it is normally not
26056 possible for later articles to `re-use' older article numbers without
26057 confusing Gnus.  That is, if a group has ever contained a message
26058 numbered 42, then no other message may get that number, or Gnus will get
26059 mightily confused.@footnote{See the function
26060 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26061 Third, article numbers must be assigned in order of arrival in the
26062 group; this is not necessarily the same as the date of the message.
26063
26064 The previous paragraph already mentions all the `hard' restrictions that
26065 article numbers must fulfill.  But it seems that it might be useful to
26066 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26067 if there are holes in the article numbering sequence.  However, due to
26068 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
26069 also useful for the article numbers to start at 1 to avoid running out
26070 of numbers as long as possible.
26071
26072 Note that by convention, backends are named @code{nnsomething}, but
26073 Gnus also comes with some @code{nnnotbackends}, such as
26074 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26075
26076 In the examples and definitions I will refer to the imaginary back end
26077 @code{nnchoke}.
26078
26079 @cindex @code{nnchoke}
26080
26081 @menu
26082 * Required Back End Functions::  Functions that must be implemented.
26083 * Optional Back End Functions::  Functions that need not be implemented.
26084 * Error Messaging::             How to get messages and report errors.
26085 * Writing New Back Ends::       Extending old back ends.
26086 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26087 * Mail-like Back Ends::         Some tips on mail back ends.
26088 @end menu
26089
26090
26091 @node Required Back End Functions
26092 @subsubsection Required Back End Functions
26093
26094 @table @code
26095
26096 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26097
26098 @var{articles} is either a range of article numbers or a list of
26099 @code{Message-ID}s.  Current back ends do not fully support either---only
26100 sequences (lists) of article numbers, and most back ends do not support
26101 retrieval of @code{Message-ID}s.  But they should try for both.
26102
26103 The result data should either be HEADs or @acronym{NOV} lines, and the result
26104 value should either be @code{headers} or @code{nov} to reflect this.
26105 This might later be expanded to @code{various}, which will be a mixture
26106 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26107
26108 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26109 headers'', in some meaning of the word.  This is generally done by
26110 fetching (at most) @var{fetch-old} extra headers less than the smallest
26111 article number in @code{articles}, and filling the gaps as well.  The
26112 presence of this parameter can be ignored if the back end finds it
26113 cumbersome to follow the request.  If this is non-@code{nil} and not a
26114 number, do maximum fetches.
26115
26116 Here's an example HEAD:
26117
26118 @example
26119 221 1056 Article retrieved.
26120 Path: ifi.uio.no!sturles
26121 From: sturles@@ifi.uio.no (Sturle Sunde)
26122 Newsgroups: ifi.discussion
26123 Subject: Re: Something very droll
26124 Date: 27 Oct 1994 14:02:57 +0100
26125 Organization: Dept. of Informatics, University of Oslo, Norway
26126 Lines: 26
26127 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26128 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26129 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26130 .
26131 @end example
26132
26133 So a @code{headers} return value would imply that there's a number of
26134 these in the data buffer.
26135
26136 Here's a BNF definition of such a buffer:
26137
26138 @example
26139 headers        = *head
26140 head           = error / valid-head
26141 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26142 valid-head     = valid-message *header "." eol
26143 valid-message  = "221 " <number> " Article retrieved." eol
26144 header         = <text> eol
26145 @end example
26146
26147 @cindex BNF
26148 (The version of BNF used here is the one used in RFC822.)
26149
26150 If the return value is @code{nov}, the data buffer should contain
26151 @dfn{network overview database} lines.  These are basically fields
26152 separated by tabs.
26153
26154 @example
26155 nov-buffer = *nov-line
26156 nov-line   = field 7*8[ <TAB> field ] eol
26157 field      = <text except TAB>
26158 @end example
26159
26160 For a closer look at what should be in those fields,
26161 @pxref{Headers}.
26162
26163
26164 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26165
26166 @var{server} is here the virtual server name.  @var{definitions} is a
26167 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26168
26169 If the server can't be opened, no error should be signaled.  The back end
26170 may then choose to refuse further attempts at connecting to this
26171 server.  In fact, it should do so.
26172
26173 If the server is opened already, this function should return a
26174 non-@code{nil} value.  There should be no data returned.
26175
26176
26177 @item (nnchoke-close-server &optional SERVER)
26178
26179 Close connection to @var{server} and free all resources connected
26180 to it.  Return @code{nil} if the server couldn't be closed for some
26181 reason.
26182
26183 There should be no data returned.
26184
26185
26186 @item (nnchoke-request-close)
26187
26188 Close connection to all servers and free all resources that the back end
26189 have reserved.  All buffers that have been created by that back end
26190 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26191 function is generally only called when Gnus is shutting down.
26192
26193 There should be no data returned.
26194
26195
26196 @item (nnchoke-server-opened &optional SERVER)
26197
26198 If @var{server} is the current virtual server, and the connection to the
26199 physical server is alive, then this function should return a
26200 non-@code{nil} vlue.  This function should under no circumstances
26201 attempt to reconnect to a server we have lost connection to.
26202
26203 There should be no data returned.
26204
26205
26206 @item (nnchoke-status-message &optional SERVER)
26207
26208 This function should return the last error message from @var{server}.
26209
26210 There should be no data returned.
26211
26212
26213 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26214
26215 The result data from this function should be the article specified by
26216 @var{article}.  This might either be a @code{Message-ID} or a number.
26217 It is optional whether to implement retrieval by @code{Message-ID}, but
26218 it would be nice if that were possible.
26219
26220 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26221 in this buffer instead of the normal data buffer.  This is to make it
26222 possible to avoid copying large amounts of data from one buffer to
26223 another, while Gnus mainly requests articles to be inserted directly
26224 into its article buffer.
26225
26226 If it is at all possible, this function should return a cons cell where
26227 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26228 the article number.  This will enable Gnus to find out what the real
26229 group and article numbers are when fetching articles by
26230 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26231 on successful article retrieval.
26232
26233
26234 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26235
26236 Get data on @var{group}.  This function also has the side effect of
26237 making @var{group} the current group.
26238
26239 If @var{fast}, don't bother to return useful data, just make @var{group}
26240 the current group.
26241
26242 Here's an example of some result data and a definition of the same:
26243
26244 @example
26245 211 56 1000 1059 ifi.discussion
26246 @end example
26247
26248 The first number is the status, which should be 211.  Next is the
26249 total number of articles in the group, the lowest article number, the
26250 highest article number, and finally the group name.  Note that the total
26251 number of articles may be less than one might think while just
26252 considering the highest and lowest article numbers, but some articles
26253 may have been canceled.  Gnus just discards the total-number, so
26254 whether one should take the bother to generate it properly (if that is a
26255 problem) is left as an exercise to the reader.  If the group contains no
26256 articles, the lowest article number should be reported as 1 and the
26257 highest as 0.
26258
26259 @example
26260 group-status = [ error / info ] eol
26261 error        = [ "4" / "5" ] 2<number> " " <Error message>
26262 info         = "211 " 3* [ <number> " " ] <string>
26263 @end example
26264
26265
26266 @item (nnchoke-close-group GROUP &optional SERVER)
26267
26268 Close @var{group} and free any resources connected to it.  This will be
26269 a no-op on most back ends.
26270
26271 There should be no data returned.
26272
26273
26274 @item (nnchoke-request-list &optional SERVER)
26275
26276 Return a list of all groups available on @var{server}.  And that means
26277 @emph{all}.
26278
26279 Here's an example from a server that only carries two groups:
26280
26281 @example
26282 ifi.test 0000002200 0000002000 y
26283 ifi.discussion 3324 3300 n
26284 @end example
26285
26286 On each line we have a group name, then the highest article number in
26287 that group, the lowest article number, and finally a flag.  If the group
26288 contains no articles, the lowest article number should be reported as 1
26289 and the highest as 0.
26290
26291 @example
26292 active-file = *active-line
26293 active-line = name " " <number> " " <number> " " flags eol
26294 name        = <string>
26295 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26296 @end example
26297
26298 The flag says whether the group is read-only (@samp{n}), is moderated
26299 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26300 (@samp{=other-group}) or none of the above (@samp{y}).
26301
26302
26303 @item (nnchoke-request-post &optional SERVER)
26304
26305 This function should post the current buffer.  It might return whether
26306 the posting was successful or not, but that's not required.  If, for
26307 instance, the posting is done asynchronously, it has generally not been
26308 completed by the time this function concludes.  In that case, this
26309 function should set up some kind of sentinel to beep the user loud and
26310 clear if the posting could not be completed.
26311
26312 There should be no result data from this function.
26313
26314 @end table
26315
26316
26317 @node Optional Back End Functions
26318 @subsubsection Optional Back End Functions
26319
26320 @table @code
26321
26322 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26323
26324 @var{groups} is a list of groups, and this function should request data
26325 on all those groups.  How it does it is of no concern to Gnus, but it
26326 should attempt to do this in a speedy fashion.
26327
26328 The return value of this function can be either @code{active} or
26329 @code{group}, which says what the format of the result data is.  The
26330 former is in the same format as the data from
26331 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26332 in the same format as @code{nnchoke-request-group} gives.
26333
26334 @example
26335 group-buffer = *active-line / *group-status
26336 @end example
26337
26338
26339 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26340
26341 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26342 alterations.  This comes in handy if the back end really carries all
26343 the information (as is the case with virtual and imap groups).  This
26344 function should destructively alter the info to suit its needs, and
26345 should return a non-@code{nil} value.
26346
26347 There should be no result data from this function.
26348
26349
26350 @item (nnchoke-request-type GROUP &optional ARTICLE)
26351
26352 When the user issues commands for ``sending news'' (@kbd{F} in the
26353 summary buffer, for instance), Gnus has to know whether the article the
26354 user is following up on is news or mail.  This function should return
26355 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26356 is mail and @code{unknown} if the type can't be decided.  (The
26357 @var{article} parameter is necessary in @code{nnvirtual} groups which
26358 might very well combine mail groups and news groups.)  Both @var{group}
26359 and @var{article} may be @code{nil}.
26360
26361 There should be no result data from this function.
26362
26363
26364 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26365
26366 Set/remove/add marks on articles.  Normally Gnus handles the article
26367 marks (such as read, ticked, expired etc) internally, and store them in
26368 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26369 all information about the articles on the server, so Gnus need to
26370 propagate the mark information to the server.
26371
26372 @var{action} is a list of mark setting requests, having this format:
26373
26374 @example
26375 (RANGE ACTION MARK)
26376 @end example
26377
26378 @var{range} is a range of articles you wish to update marks on.
26379 @var{action} is @code{add} or @code{del}, used to add marks or remove
26380 marks (preserving all marks not mentioned).  @var{mark} is a list of
26381 marks; where each mark is a symbol.  Currently used marks are
26382 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26383 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26384 @code{forward} and @code{recent}, but your back end should, if
26385 possible, not limit itself to these.
26386
26387 Given contradictory actions, the last action in the list should be the
26388 effective one.  That is, if your action contains a request to add the
26389 @code{tick} mark on article 1 and, later in the list, a request to
26390 remove the mark on the same article, the mark should in fact be removed.
26391
26392 An example action list:
26393
26394 @example
26395 (((5 12 30) 'del '(tick))
26396  ((10 . 90) 'add '(read expire))
26397  ((92 94) 'del '(read)))
26398 @end example
26399
26400 The function should return a range of articles it wasn't able to set the
26401 mark on (currently not used for anything).
26402
26403 There should be no result data from this function.
26404
26405 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26406
26407 If the user tries to set a mark that the back end doesn't like, this
26408 function may change the mark.  Gnus will use whatever this function
26409 returns as the mark for @var{article} instead of the original
26410 @var{mark}.  If the back end doesn't care, it must return the original
26411 @var{mark}, and not @code{nil} or any other type of garbage.
26412
26413 The only use for this I can see is what @code{nnvirtual} does with
26414 it---if a component group is auto-expirable, marking an article as read
26415 in the virtual group should result in the article being marked as
26416 expirable.
26417
26418 There should be no result data from this function.
26419
26420
26421 @item (nnchoke-request-scan &optional GROUP SERVER)
26422
26423 This function may be called at any time (by Gnus or anything else) to
26424 request that the back end check for incoming articles, in one way or
26425 another.  A mail back end will typically read the spool file or query
26426 the @acronym{POP} server when this function is invoked.  The
26427 @var{group} doesn't have to be heeded---if the back end decides that
26428 it is too much work just scanning for a single group, it may do a
26429 total scan of all groups.  It would be nice, however, to keep things
26430 local if that's practical.
26431
26432 There should be no result data from this function.
26433
26434
26435 @item (nnchoke-request-group-description GROUP &optional SERVER)
26436
26437 The result data from this function should be a description of
26438 @var{group}.
26439
26440 @example
26441 description-line = name <TAB> description eol
26442 name             = <string>
26443 description      = <text>
26444 @end example
26445
26446 @item (nnchoke-request-list-newsgroups &optional SERVER)
26447
26448 The result data from this function should be the description of all
26449 groups available on the server.
26450
26451 @example
26452 description-buffer = *description-line
26453 @end example
26454
26455
26456 @item (nnchoke-request-newgroups DATE &optional SERVER)
26457
26458 The result data from this function should be all groups that were
26459 created after @samp{date}, which is in normal human-readable date format
26460 (i.e., the date format used in mail and news headers, and returned by
26461 the function @code{message-make-date} by default).  The data should be
26462 in the active buffer format.
26463
26464 It is okay for this function to return `too many' groups; some back ends
26465 might find it cheaper to return the full list of groups, rather than
26466 just the new groups.  But don't do this for back ends with many groups.
26467 Normally, if the user creates the groups herself, there won't be too
26468 many groups, so @code{nnml} and the like are probably safe.  But for
26469 back ends like @code{nntp}, where the groups have been created by the
26470 server, it is quite likely that there can be many groups.
26471
26472
26473 @item (nnchoke-request-create-group GROUP &optional SERVER)
26474
26475 This function should create an empty group with name @var{group}.
26476
26477 There should be no return data.
26478
26479
26480 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26481
26482 This function should run the expiry process on all articles in the
26483 @var{articles} range (which is currently a simple list of article
26484 numbers.)  It is left up to the back end to decide how old articles
26485 should be before they are removed by this function.  If @var{force} is
26486 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26487 they are.
26488
26489 This function should return a list of articles that it did not/was not
26490 able to delete.
26491
26492 There should be no result data returned.
26493
26494
26495 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26496
26497 This function should move @var{article} (which is a number) from
26498 @var{group} by calling @var{accept-form}.
26499
26500 This function should ready the article in question for moving by
26501 removing any header lines it has added to the article, and generally
26502 should ``tidy up'' the article.  Then it should @code{eval}
26503 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26504 will do the actual copying.  If this @code{eval} returns a
26505 non-@code{nil} value, the article should be removed.
26506
26507 If @var{last} is @code{nil}, that means that there is a high likelihood
26508 that there will be more requests issued shortly, so that allows some
26509 optimizations.
26510
26511 The function should return a cons where the @code{car} is the group name and
26512 the @code{cdr} is the article number that the article was entered as.
26513
26514 There should be no data returned.
26515
26516
26517 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26518
26519 This function takes the current buffer and inserts it into @var{group}.
26520 If @var{last} in @code{nil}, that means that there will be more calls to
26521 this function in short order.
26522
26523 The function should return a cons where the @code{car} is the group name and
26524 the @code{cdr} is the article number that the article was entered as.
26525
26526 The group should exist before the backend is asked to accept the
26527 article for that group.
26528
26529 There should be no data returned.
26530
26531
26532 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26533
26534 This function should remove @var{article} (which is a number) from
26535 @var{group} and insert @var{buffer} there instead.
26536
26537 There should be no data returned.
26538
26539
26540 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26541
26542 This function should delete @var{group}.  If @var{force}, it should
26543 really delete all the articles in the group, and then delete the group
26544 itself.  (If there is such a thing as ``the group itself''.)
26545
26546 There should be no data returned.
26547
26548
26549 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26550
26551 This function should rename @var{group} into @var{new-name}.  All
26552 articles in @var{group} should move to @var{new-name}.
26553
26554 There should be no data returned.
26555
26556 @end table
26557
26558
26559 @node Error Messaging
26560 @subsubsection Error Messaging
26561
26562 @findex nnheader-report
26563 @findex nnheader-get-report
26564 The back ends should use the function @code{nnheader-report} to report
26565 error conditions---they should not raise errors when they aren't able to
26566 perform a request.  The first argument to this function is the back end
26567 symbol, and the rest are interpreted as arguments to @code{format} if
26568 there are multiple of them, or just a string if there is one of them.
26569 This function must always returns @code{nil}.
26570
26571 @lisp
26572 (nnheader-report 'nnchoke "You did something totally bogus")
26573
26574 (nnheader-report 'nnchoke "Could not request group %s" group)
26575 @end lisp
26576
26577 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26578 @code{nil} back from a server, and this function returns the most
26579 recently reported message for the back end in question.  This function
26580 takes one argument---the server symbol.
26581
26582 Internally, these functions access @var{back-end}@code{-status-string},
26583 so the @code{nnchoke} back end will have its error message stored in
26584 @code{nnchoke-status-string}.
26585
26586
26587 @node Writing New Back Ends
26588 @subsubsection Writing New Back Ends
26589
26590 Many back ends are quite similar.  @code{nnml} is just like
26591 @code{nnspool}, but it allows you to edit the articles on the server.
26592 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26593 and it doesn't maintain overview databases.  @code{nndir} is just like
26594 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26595 editing articles.
26596
26597 It would make sense if it were possible to ``inherit'' functions from
26598 back ends when writing new back ends.  And, indeed, you can do that if you
26599 want to.  (You don't have to if you don't want to, of course.)
26600
26601 All the back ends declare their public variables and functions by using a
26602 package called @code{nnoo}.
26603
26604 To inherit functions from other back ends (and allow other back ends to
26605 inherit functions from the current back end), you should use the
26606 following macros:
26607
26608 @table @code
26609
26610 @item nnoo-declare
26611 This macro declares the first parameter to be a child of the subsequent
26612 parameters.  For instance:
26613
26614 @lisp
26615 (nnoo-declare nndir
26616   nnml nnmh)
26617 @end lisp
26618
26619 @code{nndir} has declared here that it intends to inherit functions from
26620 both @code{nnml} and @code{nnmh}.
26621
26622 @item defvoo
26623 This macro is equivalent to @code{defvar}, but registers the variable as
26624 a public server variable.  Most state-oriented variables should be
26625 declared with @code{defvoo} instead of @code{defvar}.
26626
26627 In addition to the normal @code{defvar} parameters, it takes a list of
26628 variables in the parent back ends to map the variable to when executing
26629 a function in those back ends.
26630
26631 @lisp
26632 (defvoo nndir-directory nil
26633   "Where nndir will look for groups."
26634   nnml-current-directory nnmh-current-directory)
26635 @end lisp
26636
26637 This means that @code{nnml-current-directory} will be set to
26638 @code{nndir-directory} when an @code{nnml} function is called on behalf
26639 of @code{nndir}.  (The same with @code{nnmh}.)
26640
26641 @item nnoo-define-basics
26642 This macro defines some common functions that almost all back ends should
26643 have.
26644
26645 @lisp
26646 (nnoo-define-basics nndir)
26647 @end lisp
26648
26649 @item deffoo
26650 This macro is just like @code{defun} and takes the same parameters.  In
26651 addition to doing the normal @code{defun} things, it registers the
26652 function as being public so that other back ends can inherit it.
26653
26654 @item nnoo-map-functions
26655 This macro allows mapping of functions from the current back end to
26656 functions from the parent back ends.
26657
26658 @lisp
26659 (nnoo-map-functions nndir
26660   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26661   (nnmh-request-article 0 nndir-current-group 0 0))
26662 @end lisp
26663
26664 This means that when @code{nndir-retrieve-headers} is called, the first,
26665 third, and fourth parameters will be passed on to
26666 @code{nnml-retrieve-headers}, while the second parameter is set to the
26667 value of @code{nndir-current-group}.
26668
26669 @item nnoo-import
26670 This macro allows importing functions from back ends.  It should be the
26671 last thing in the source file, since it will only define functions that
26672 haven't already been defined.
26673
26674 @lisp
26675 (nnoo-import nndir
26676   (nnmh
26677    nnmh-request-list
26678    nnmh-request-newgroups)
26679   (nnml))
26680 @end lisp
26681
26682 This means that calls to @code{nndir-request-list} should just be passed
26683 on to @code{nnmh-request-list}, while all public functions from
26684 @code{nnml} that haven't been defined in @code{nndir} yet should be
26685 defined now.
26686
26687 @end table
26688
26689 Below is a slightly shortened version of the @code{nndir} back end.
26690
26691 @lisp
26692 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26693 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26694
26695 ;;; @r{Code:}
26696
26697 (require 'nnheader)
26698 (require 'nnmh)
26699 (require 'nnml)
26700 (require 'nnoo)
26701 (eval-when-compile (require 'cl))
26702
26703 (nnoo-declare nndir
26704   nnml nnmh)
26705
26706 (defvoo nndir-directory nil
26707   "Where nndir will look for groups."
26708   nnml-current-directory nnmh-current-directory)
26709
26710 (defvoo nndir-nov-is-evil nil
26711   "*Non-nil means that nndir will never retrieve NOV headers."
26712   nnml-nov-is-evil)
26713
26714 (defvoo nndir-current-group ""
26715   nil
26716   nnml-current-group nnmh-current-group)
26717 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26718 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26719
26720 (defvoo nndir-status-string "" nil nnmh-status-string)
26721 (defconst nndir-version "nndir 1.0")
26722
26723 ;;; @r{Interface functions.}
26724
26725 (nnoo-define-basics nndir)
26726
26727 (deffoo nndir-open-server (server &optional defs)
26728   (setq nndir-directory
26729         (or (cadr (assq 'nndir-directory defs))
26730             server))
26731   (unless (assq 'nndir-directory defs)
26732     (push `(nndir-directory ,server) defs))
26733   (push `(nndir-current-group
26734           ,(file-name-nondirectory
26735             (directory-file-name nndir-directory)))
26736         defs)
26737   (push `(nndir-top-directory
26738           ,(file-name-directory (directory-file-name nndir-directory)))
26739         defs)
26740   (nnoo-change-server 'nndir server defs))
26741
26742 (nnoo-map-functions nndir
26743   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26744   (nnmh-request-article 0 nndir-current-group 0 0)
26745   (nnmh-request-group nndir-current-group 0 0)
26746   (nnmh-close-group nndir-current-group 0))
26747
26748 (nnoo-import nndir
26749   (nnmh
26750    nnmh-status-message
26751    nnmh-request-list
26752    nnmh-request-newgroups))
26753
26754 (provide 'nndir)
26755 @end lisp
26756
26757
26758 @node Hooking New Back Ends Into Gnus
26759 @subsubsection Hooking New Back Ends Into Gnus
26760
26761 @vindex gnus-valid-select-methods
26762 @findex gnus-declare-backend
26763 Having Gnus start using your new back end is rather easy---you just
26764 declare it with the @code{gnus-declare-backend} functions.  This will
26765 enter the back end into the @code{gnus-valid-select-methods} variable.
26766
26767 @code{gnus-declare-backend} takes two parameters---the back end name and
26768 an arbitrary number of @dfn{abilities}.
26769
26770 Here's an example:
26771
26772 @lisp
26773 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26774 @end lisp
26775
26776 The above line would then go in the @file{nnchoke.el} file.
26777
26778 The abilities can be:
26779
26780 @table @code
26781 @item mail
26782 This is a mailish back end---followups should (probably) go via mail.
26783 @item post
26784 This is a newsish back end---followups should (probably) go via news.
26785 @item post-mail
26786 This back end supports both mail and news.
26787 @item none
26788 This is neither a post nor mail back end---it's something completely
26789 different.
26790 @item respool
26791 It supports respooling---or rather, it is able to modify its source
26792 articles and groups.
26793 @item address
26794 The name of the server should be in the virtual server name.  This is
26795 true for almost all back ends.
26796 @item prompt-address
26797 The user should be prompted for an address when doing commands like
26798 @kbd{B} in the group buffer.  This is true for back ends like
26799 @code{nntp}, but not @code{nnmbox}, for instance.
26800 @end table
26801
26802
26803 @node Mail-like Back Ends
26804 @subsubsection Mail-like Back Ends
26805
26806 One of the things that separate the mail back ends from the rest of the
26807 back ends is the heavy dependence by most of the mail back ends on
26808 common functions in @file{nnmail.el}.  For instance, here's the
26809 definition of @code{nnml-request-scan}:
26810
26811 @lisp
26812 (deffoo nnml-request-scan (&optional group server)
26813   (setq nnml-article-file-alist nil)
26814   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
26815 @end lisp
26816
26817 It simply calls @code{nnmail-get-new-mail} with a few parameters,
26818 and @code{nnmail} takes care of all the moving and splitting of the
26819 mail.
26820
26821 This function takes four parameters.
26822
26823 @table @var
26824 @item method
26825 This should be a symbol to designate which back end is responsible for
26826 the call.
26827
26828 @item exit-function
26829 This function should be called after the splitting has been performed.
26830
26831 @item temp-directory
26832 Where the temporary files should be stored.
26833
26834 @item group
26835 This optional argument should be a group name if the splitting is to be
26836 performed for one group only.
26837 @end table
26838
26839 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
26840 save each article.  @var{back-end}@code{-active-number} will be called to
26841 find the article number assigned to this article.
26842
26843 The function also uses the following variables:
26844 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
26845 this back end); and @var{back-end}@code{-group-alist} and
26846 @var{back-end}@code{-active-file} to generate the new active file.
26847 @var{back-end}@code{-group-alist} should be a group-active alist, like
26848 this:
26849
26850 @example
26851 (("a-group" (1 . 10))
26852  ("some-group" (34 . 39)))
26853 @end example
26854
26855
26856 @node Score File Syntax
26857 @subsection Score File Syntax
26858
26859 Score files are meant to be easily parseable, but yet extremely
26860 mallable.   It was decided that something that had the same read syntax
26861 as an Emacs Lisp list would fit that spec.
26862
26863 Here's a typical score file:
26864
26865 @lisp
26866 (("summary"
26867   ("win95" -10000 nil s)
26868   ("Gnus"))
26869  ("from"
26870   ("Lars" -1000))
26871  (mark -100))
26872 @end lisp
26873
26874 BNF definition of a score file:
26875
26876 @example
26877 score-file      = "" / "(" *element ")"
26878 element         = rule / atom
26879 rule            = string-rule / number-rule / date-rule
26880 string-rule     = "(" quote string-header quote space *string-match ")"
26881 number-rule     = "(" quote number-header quote space *number-match ")"
26882 date-rule       = "(" quote date-header quote space *date-match ")"
26883 quote           = <ascii 34>
26884 string-header   = "subject" / "from" / "references" / "message-id" /
26885                   "xref" / "body" / "head" / "all" / "followup"
26886 number-header   = "lines" / "chars"
26887 date-header     = "date"
26888 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
26889                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
26890 score           = "nil" / <integer>
26891 date            = "nil" / <natural number>
26892 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
26893                   "r" / "regex" / "R" / "Regex" /
26894                   "e" / "exact" / "E" / "Exact" /
26895                   "f" / "fuzzy" / "F" / "Fuzzy"
26896 number-match    = "(" <integer> [ "" / [ space score [ "" /
26897                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
26898 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
26899 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
26900                   space date [ "" / [ space date-match-t ] ] ] ] ")"
26901 date-match-t    = "nil" / "at" / "before" / "after"
26902 atom            = "(" [ required-atom / optional-atom ] ")"
26903 required-atom   = mark / expunge / mark-and-expunge / files /
26904                   exclude-files / read-only / touched
26905 optional-atom   = adapt / local / eval
26906 mark            = "mark" space nil-or-number
26907 nil-or-number   = "nil" / <integer>
26908 expunge         = "expunge" space nil-or-number
26909 mark-and-expunge = "mark-and-expunge" space nil-or-number
26910 files           = "files" *[ space <string> ]
26911 exclude-files   = "exclude-files" *[ space <string> ]
26912 read-only       = "read-only" [ space "nil" / space "t" ]
26913 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
26914 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
26915 local           = "local" *[ space "(" <string> space <form> ")" ]
26916 eval            = "eval" space <form>
26917 space           = *[ " " / <TAB> / <NEWLINE> ]
26918 @end example
26919
26920 Any unrecognized elements in a score file should be ignored, but not
26921 discarded.
26922
26923 As you can see, white space is needed, but the type and amount of white
26924 space is irrelevant.  This means that formatting of the score file is
26925 left up to the programmer---if it's simpler to just spew it all out on
26926 one looong line, then that's ok.
26927
26928 The meaning of the various atoms are explained elsewhere in this
26929 manual (@pxref{Score File Format}).
26930
26931
26932 @node Headers
26933 @subsection Headers
26934
26935 Internally Gnus uses a format for storing article headers that
26936 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
26937 almost suspect that the author looked at the @acronym{NOV} specification and
26938 just shamelessly @emph{stole} the entire thing, and one would be right.
26939
26940 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
26941 RFC 1036 to talk about lines in the head of an article (e.g.,
26942 @code{From}).  It is used by many people as a synonym for
26943 ``head''---``the header and the body''.  (That should be avoided, in my
26944 opinion.)  And Gnus uses a format internally that it calls ``header'',
26945 which is what I'm talking about here.  This is a 9-element vector,
26946 basically, with each header (ouch) having one slot.
26947
26948 These slots are, in order: @code{number}, @code{subject}, @code{from},
26949 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
26950 @code{xref}, and @code{extra}.  There are macros for accessing and
26951 setting these slots---they all have predictable names beginning with
26952 @code{mail-header-} and @code{mail-header-set-}, respectively.
26953
26954 All these slots contain strings, except the @code{extra} slot, which
26955 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
26956
26957
26958 @node Ranges
26959 @subsection Ranges
26960
26961 @sc{gnus} introduced a concept that I found so useful that I've started
26962 using it a lot and have elaborated on it greatly.
26963
26964 The question is simple: If you have a large amount of objects that are
26965 identified by numbers (say, articles, to take a @emph{wild} example)
26966 that you want to qualify as being ``included'', a normal sequence isn't
26967 very useful.  (A 200,000 length sequence is a bit long-winded.)
26968
26969 The solution is as simple as the question: You just collapse the
26970 sequence.
26971
26972 @example
26973 (1 2 3 4 5 6 10 11 12)
26974 @end example
26975
26976 is transformed into
26977
26978 @example
26979 ((1 . 6) (10 . 12))
26980 @end example
26981
26982 To avoid having those nasty @samp{(13 . 13)} elements to denote a
26983 lonesome object, a @samp{13} is a valid element:
26984
26985 @example
26986 ((1 . 6) 7 (10 . 12))
26987 @end example
26988
26989 This means that comparing two ranges to find out whether they are equal
26990 is slightly tricky:
26991
26992 @example
26993 ((1 . 5) 7 8 (10 . 12))
26994 @end example
26995
26996 and
26997
26998 @example
26999 ((1 . 5) (7 . 8) (10 . 12))
27000 @end example
27001
27002 are equal.  In fact, any non-descending list is a range:
27003
27004 @example
27005 (1 2 3 4 5)
27006 @end example
27007
27008 is a perfectly valid range, although a pretty long-winded one.  This is
27009 also valid:
27010
27011 @example
27012 (1 . 5)
27013 @end example
27014
27015 and is equal to the previous range.
27016
27017 Here's a BNF definition of ranges.  Of course, one must remember the
27018 semantic requirement that the numbers are non-descending.  (Any number
27019 of repetition of the same number is allowed, but apt to disappear in
27020 range handling.)
27021
27022 @example
27023 range           = simple-range / normal-range
27024 simple-range    = "(" number " . " number ")"
27025 normal-range    = "(" start-contents ")"
27026 contents        = "" / simple-range *[ " " contents ] /
27027                   number *[ " " contents ]
27028 @end example
27029
27030 Gnus currently uses ranges to keep track of read articles and article
27031 marks.  I plan on implementing a number of range operators in C if The
27032 Powers That Be are willing to let me.  (I haven't asked yet, because I
27033 need to do some more thinking on what operators I need to make life
27034 totally range-based without ever having to convert back to normal
27035 sequences.)
27036
27037
27038 @node Group Info
27039 @subsection Group Info
27040
27041 Gnus stores all permanent info on groups in a @dfn{group info} list.
27042 This list is from three to six elements (or more) long and exhaustively
27043 describes the group.
27044
27045 Here are two example group infos; one is a very simple group while the
27046 second is a more complex one:
27047
27048 @example
27049 ("no.group" 5 ((1 . 54324)))
27050
27051 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27052                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27053                 (nnml "")
27054                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27055 @end example
27056
27057 The first element is the @dfn{group name}---as Gnus knows the group,
27058 anyway.  The second element is the @dfn{subscription level}, which
27059 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27060 cons cell where the @code{car} is the level and the @code{cdr} is the
27061 score.)  The third element is a list of ranges of read articles.  The
27062 fourth element is a list of lists of article marks of various kinds.
27063 The fifth element is the select method (or virtual server, if you like).
27064 The sixth element is a list of @dfn{group parameters}, which is what
27065 this section is about.
27066
27067 Any of the last three elements may be missing if they are not required.
27068 In fact, the vast majority of groups will normally only have the first
27069 three elements, which saves quite a lot of cons cells.
27070
27071 Here's a BNF definition of the group info format:
27072
27073 @example
27074 info          = "(" group space ralevel space read
27075                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27076                 space parameters ] ] ] ] ] ")"
27077 group         = quote <string> quote
27078 ralevel       = rank / level
27079 level         = <integer in the range of 1 to inf>
27080 rank          = "(" level "." score ")"
27081 score         = <integer in the range of 1 to inf>
27082 read          = range
27083 marks-lists   = nil / "(" *marks ")"
27084 marks         = "(" <string> range ")"
27085 method        = "(" <string> *elisp-forms ")"
27086 parameters    = "(" *elisp-forms ")"
27087 @end example
27088
27089 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27090 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27091 in pseudo-BNF.
27092
27093 If you have a Gnus info and want to access the elements, Gnus offers a
27094 series of macros for getting/setting these elements.
27095
27096 @table @code
27097 @item gnus-info-group
27098 @itemx gnus-info-set-group
27099 @findex gnus-info-group
27100 @findex gnus-info-set-group
27101 Get/set the group name.
27102
27103 @item gnus-info-rank
27104 @itemx gnus-info-set-rank
27105 @findex gnus-info-rank
27106 @findex gnus-info-set-rank
27107 Get/set the group rank (@pxref{Group Score}).
27108
27109 @item gnus-info-level
27110 @itemx gnus-info-set-level
27111 @findex gnus-info-level
27112 @findex gnus-info-set-level
27113 Get/set the group level.
27114
27115 @item gnus-info-score
27116 @itemx gnus-info-set-score
27117 @findex gnus-info-score
27118 @findex gnus-info-set-score
27119 Get/set the group score (@pxref{Group Score}).
27120
27121 @item gnus-info-read
27122 @itemx gnus-info-set-read
27123 @findex gnus-info-read
27124 @findex gnus-info-set-read
27125 Get/set the ranges of read articles.
27126
27127 @item gnus-info-marks
27128 @itemx gnus-info-set-marks
27129 @findex gnus-info-marks
27130 @findex gnus-info-set-marks
27131 Get/set the lists of ranges of marked articles.
27132
27133 @item gnus-info-method
27134 @itemx gnus-info-set-method
27135 @findex gnus-info-method
27136 @findex gnus-info-set-method
27137 Get/set the group select method.
27138
27139 @item gnus-info-params
27140 @itemx gnus-info-set-params
27141 @findex gnus-info-params
27142 @findex gnus-info-set-params
27143 Get/set the group parameters.
27144 @end table
27145
27146 All the getter functions take one parameter---the info list.  The setter
27147 functions take two parameters---the info list and the new value.
27148
27149 The last three elements in the group info aren't mandatory, so it may be
27150 necessary to extend the group info before setting the element.  If this
27151 is necessary, you can just pass on a non-@code{nil} third parameter to
27152 the three final setter functions to have this happen automatically.
27153
27154
27155 @node Extended Interactive
27156 @subsection Extended Interactive
27157 @cindex interactive
27158 @findex gnus-interactive
27159
27160 Gnus extends the standard Emacs @code{interactive} specification
27161 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27162 Prefixes}).  Here's an example of how this is used:
27163
27164 @lisp
27165 (defun gnus-summary-increase-score (&optional score symp)
27166   (interactive (gnus-interactive "P\ny"))
27167   ...
27168   )
27169 @end lisp
27170
27171 The best thing to do would have been to implement
27172 @code{gnus-interactive} as a macro which would have returned an
27173 @code{interactive} form, but this isn't possible since Emacs checks
27174 whether a function is interactive or not by simply doing an @code{assq}
27175 on the lambda form.  So, instead we have @code{gnus-interactive}
27176 function that takes a string and returns values that are usable to
27177 @code{interactive}.
27178
27179 This function accepts (almost) all normal @code{interactive} specs, but
27180 adds a few more.
27181
27182 @table @samp
27183 @item y
27184 @vindex gnus-current-prefix-symbol
27185 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27186 variable.
27187
27188 @item Y
27189 @vindex gnus-current-prefix-symbols
27190 A list of the current symbolic prefixes---the
27191 @code{gnus-current-prefix-symbol} variable.
27192
27193 @item A
27194 The current article number---the @code{gnus-summary-article-number}
27195 function.
27196
27197 @item H
27198 The current article header---the @code{gnus-summary-article-header}
27199 function.
27200
27201 @item g
27202 The current group name---the @code{gnus-group-group-name}
27203 function.
27204
27205 @end table
27206
27207
27208 @node Emacs/XEmacs Code
27209 @subsection Emacs/XEmacs Code
27210 @cindex XEmacs
27211 @cindex Emacsen
27212
27213 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27214 platforms must be the primary one.  I chose Emacs.  Not because I don't
27215 like XEmacs or Mule, but because it comes first alphabetically.
27216
27217 This means that Gnus will byte-compile under Emacs with nary a warning,
27218 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27219 As I use byte-compilation warnings to help me root out trivial errors in
27220 Gnus, that's very useful.
27221
27222 I've also consistently used Emacs function interfaces, but have used
27223 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27224 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27225 function.  I then define a function called @code{gnus-run-at-time} that
27226 takes the same parameters as the Emacs @code{run-at-time}.  When running
27227 Gnus under Emacs, the former function is just an alias for the latter.
27228 However, when running under XEmacs, the former is an alias for the
27229 following function:
27230
27231 @lisp
27232 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27233   (start-itimer
27234    "gnus-run-at-time"
27235    `(lambda ()
27236       (,function ,@@args))
27237    time repeat))
27238 @end lisp
27239
27240 This sort of thing has been done for bunches of functions.  Gnus does
27241 not redefine any native Emacs functions while running under XEmacs---it
27242 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27243 all over.
27244
27245 In the cases where the XEmacs function interface was obviously cleaner,
27246 I used it instead.  For example @code{gnus-region-active-p} is an alias
27247 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27248
27249 Of course, I could have chosen XEmacs as my native platform and done
27250 mapping functions the other way around.  But I didn't.  The performance
27251 hit these indirections impose on Gnus under XEmacs should be slight.
27252
27253
27254 @node Various File Formats
27255 @subsection Various File Formats
27256
27257 @menu
27258 * Active File Format::          Information on articles and groups available.
27259 * Newsgroups File Format::      Group descriptions.
27260 @end menu
27261
27262
27263 @node Active File Format
27264 @subsubsection Active File Format
27265
27266 The active file lists all groups available on the server in
27267 question.  It also lists the highest and lowest current article numbers
27268 in each group.
27269
27270 Here's an excerpt from a typical active file:
27271
27272 @example
27273 soc.motss 296030 293865 y
27274 alt.binaries.pictures.fractals 3922 3913 n
27275 comp.sources.unix 1605 1593 m
27276 comp.binaries.ibm.pc 5097 5089 y
27277 no.general 1000 900 y
27278 @end example
27279
27280 Here's a pseudo-BNF definition of this file:
27281
27282 @example
27283 active      = *group-line
27284 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27285 group       = <non-white-space string>
27286 spc         = " "
27287 high-number = <non-negative integer>
27288 low-number  = <positive integer>
27289 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27290 @end example
27291
27292 For a full description of this file, see the manual pages for
27293 @samp{innd}, in particular @samp{active(5)}.
27294
27295
27296 @node Newsgroups File Format
27297 @subsubsection Newsgroups File Format
27298
27299 The newsgroups file lists groups along with their descriptions.  Not all
27300 groups on the server have to be listed,  and not all groups in the file
27301 have to exist on the server.  The file is meant purely as information to
27302 the user.
27303
27304 The format is quite simple; a group name, a tab, and the description.
27305 Here's the definition:
27306
27307 @example
27308 newsgroups    = *line
27309 line          = group tab description <NEWLINE>
27310 group         = <non-white-space string>
27311 tab           = <TAB>
27312 description   = <string>
27313 @end example
27314
27315
27316 @page
27317 @node Emacs for Heathens
27318 @section Emacs for Heathens
27319
27320 Believe it or not, but some people who use Gnus haven't really used
27321 Emacs much before they embarked on their journey on the Gnus Love Boat.
27322 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27323 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27324 is a regexp that is used for matching on the group name'' are magical
27325 phrases with little or no meaning, then this appendix is for you.  If
27326 you are already familiar with Emacs, just ignore this and go fondle your
27327 cat instead.
27328
27329 @menu
27330 * Keystrokes::                  Entering text and executing commands.
27331 * Emacs Lisp::                  The built-in Emacs programming language.
27332 @end menu
27333
27334
27335 @node Keystrokes
27336 @subsection Keystrokes
27337
27338 @itemize @bullet
27339 @item
27340 Q: What is an experienced Emacs user?
27341
27342 @item
27343 A: A person who wishes that the terminal had pedals.
27344 @end itemize
27345
27346 Yes, when you use Emacs, you are apt to use the control key, the shift
27347 key and the meta key a lot.  This is very annoying to some people
27348 (notably @code{vi}le users), and the rest of us just love the hell out
27349 of it.  Just give up and submit.  Emacs really does stand for
27350 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27351 may have heard from other disreputable sources (like the Emacs author).
27352
27353 The shift keys are normally located near your pinky fingers, and are
27354 normally used to get capital letters and stuff.  You probably use it all
27355 the time.  The control key is normally marked ``CTRL'' or something like
27356 that.  The meta key is, funnily enough, never marked as such on any
27357 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27358 which is the meta key on this keyboard.  It's usually located somewhere
27359 to the left hand side of the keyboard, usually on the bottom row.
27360
27361 Now, us Emacs people don't say ``press the meta-control-m key'',
27362 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27363 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27364 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27365 down the control key, and hold it down while you press @kbd{k}''.
27366 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27367 the control key and then press @kbd{k}''.  Simple, ay?
27368
27369 This is somewhat complicated by the fact that not all keyboards have a
27370 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27371 means ``press escape, release escape, press @kbd{k}''.  That's much more
27372 work than if you have a meta key, so if that's the case, I respectfully
27373 suggest you get a real keyboard with a meta key.  You can't live without
27374 it.
27375
27376
27377
27378 @node Emacs Lisp
27379 @subsection Emacs Lisp
27380
27381 Emacs is the King of Editors because it's really a Lisp interpreter.
27382 Each and every key you tap runs some Emacs Lisp code snippet, and since
27383 Emacs Lisp is an interpreted language, that means that you can configure
27384 any key to run any arbitrary code.  You just, like, do it.
27385
27386 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27387 functions.  (These are byte-compiled for speed, but it's still
27388 interpreted.)  If you decide that you don't like the way Gnus does
27389 certain things, it's trivial to have it do something a different way.
27390 (Well, at least if you know how to write Lisp code.)  However, that's
27391 beyond the scope of this manual, so we are simply going to talk about
27392 some common constructs that you normally use in your @file{.emacs} file
27393 to customize Gnus.
27394
27395 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27396 write the following:
27397
27398 @lisp
27399 (setq gnus-florgbnize 4)
27400 @end lisp
27401
27402 This function (really ``special form'') @code{setq} is the one that can
27403 set a variable to some value.  This is really all you need to know.  Now
27404 you can go and fill your @file{.emacs} file with lots of these to change
27405 how Gnus works.
27406
27407 If you have put that thing in your @file{.emacs} file, it will be read
27408 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27409 start Emacs.  If you want to change the variable right away, simply say
27410 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27411 previous ``form'', which is a simple @code{setq} statement here.
27412
27413 Go ahead---just try it, if you're located at your Emacs.  After you
27414 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27415 is the return value of the form you @code{eval}ed.
27416
27417 Some pitfalls:
27418
27419 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27420 that means:
27421
27422 @lisp
27423 (setq gnus-read-active-file 'some)
27424 @end lisp
27425
27426 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27427 @samp{nntp.ifi.uio.no}'', that means:
27428
27429 @lisp
27430 (setq gnus-nntp-server "nntp.ifi.uio.no")
27431 @end lisp
27432
27433 So be careful not to mix up strings (the latter) with symbols (the
27434 former).  The manual is unambiguous, but it can be confusing.
27435
27436 @page
27437 @include gnus-faq.texi
27438
27439 @node Index
27440 @chapter Index
27441 @printindex cp
27442
27443 @node Key Index
27444 @chapter Key Index
27445 @printindex ky
27446
27447 @summarycontents
27448 @contents
27449 @bye
27450
27451 @iftex
27452 @iflatex
27453 \end{document}
27454 @end iflatex
27455 @end iftex
27456
27457 @c Local Variables:
27458 @c mode: texinfo
27459 @c coding: iso-8859-1
27460 @c End: