0ff2217b59b0b24735b3c6c97025ffd5ef5b2c8c
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex pg cp
8 @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}{Oort Gnus v0.23}
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 Oort Gnus v0.23.
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 as Cache::              The Agent is a big cache too.
761 * Agent Expiry::                How to make old articles go away.
762 * Agent Regeneration::          How to recover from lost connections and other accidents.
763 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
764 * Outgoing Messages::           What happens when you post/mail something?
765 * Agent Variables::             Customizing is fun.
766 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
767 * Batching Agents::             How to fetch news from a @code{cron} job.
768 * Agent Caveats::               What you think it'll do and what it does.
769
770 Agent Categories
771
772 * Category Syntax::             What a category looks like.
773 * Category Buffer::             A buffer for maintaining categories.
774 * Category Variables::          Customize'r'Us.
775
776 Agent Commands
777
778 * Group Agent Commands::        Configure groups and fetch their contents.
779 * Summary Agent Commands::      Manually select then fetch specific articles.
780 * Server Agent Commands::       Select the servers that are supported by the agent.
781
782 Scoring
783
784 * Summary Score Commands::      Adding score entries for the current group.
785 * Group Score Commands::        General score commands.
786 * Score Variables::             Customize your scoring.  (My, what terminology).
787 * Score File Format::           What a score file may contain.
788 * Score File Editing::          You can edit score files by hand as well.
789 * Adaptive Scoring::            Big Sister Gnus knows what you read.
790 * Home Score File::             How to say where new score entries are to go.
791 * Followups To Yourself::       Having Gnus notice when people answer you.
792 * Scoring On Other Headers::    Scoring on non-standard headers.
793 * Scoring Tips::                How to score effectively.
794 * Reverse Scoring::             That problem child of old is not problem.
795 * Global Score Files::          Earth-spanning, ear-splitting score files.
796 * Kill Files::                  They are still here, but they can be ignored.
797 * Converting Kill Files::       Translating kill files to score files.
798 * GroupLens::                   Getting predictions on what you like to read.
799 * Advanced Scoring::            Using logical expressions to build score rules.
800 * Score Decays::                It can be useful to let scores wither away.
801
802 GroupLens
803
804 * Using GroupLens::             How to make Gnus use GroupLens.
805 * Rating Articles::             Letting GroupLens know how you rate articles.
806 * Displaying Predictions::      Displaying predictions given by GroupLens.
807 * GroupLens Variables::         Customizing GroupLens.
808
809 Advanced Scoring
810
811 * Advanced Scoring Syntax::     A definition.
812 * Advanced Scoring Examples::   What they look like.
813 * Advanced Scoring Tips::       Getting the most out of it.
814
815 Various
816
817 * Process/Prefix::              A convention used by many treatment commands.
818 * Interactive::                 Making Gnus ask you many questions.
819 * Symbolic Prefixes::           How to supply some Gnus functions with options.
820 * Formatting Variables::        You can specify what buffers should look like.
821 * Window Layout::               Configuring the Gnus buffer windows.
822 * Faces and Fonts::             How to change how faces look.
823 * Compilation::                 How to speed Gnus up.
824 * Mode Lines::                  Displaying information in the mode lines.
825 * Highlighting and Menus::      Making buffers look all nice and cozy.
826 * Buttons::                     Get tendinitis in ten easy steps!
827 * Daemons::                     Gnus can do things behind your back.
828 * NoCeM::                       How to avoid spam and other fatty foods.
829 * Undo::                        Some actions can be undone.
830 * Predicate Specifiers::        Specifying predicates.
831 * Moderation::                  What to do if you're a moderator.
832 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
833 * Fuzzy Matching::              What's the big fuzz?
834 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
835 * Various Various::             Things that are really various.
836
837 Formatting Variables
838
839 * Formatting Basics::           A formatting variable is basically a format string.
840 * Mode Line Formatting::        Some rules about mode line formatting variables.
841 * Advanced Formatting::         Modifying output in various ways.
842 * User-Defined Specs::          Having Gnus call your own functions.
843 * Formatting Fonts::            Making the formatting look colorful and nice.
844 * Positioning Point::           Moving point to a position after an operation.
845 * Tabulation::                  Tabulating your output.
846 * Wide Characters::             Dealing with wide characters.
847
848 Image Enhancements
849
850 * Picons::                      How to display pictures of what you're reading.
851 * Smileys::                     Show all those happy faces the way they were meant to be shown.
852 * X-Face::                      Display a funky, teensy black-and-white image.
853 * XVarious::                    Other XEmacsy Gnusey variables.
854
855 Thwarting Email Spam
856
857 * The problem of spam::         Some background, and some solutions
858 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
859 * SpamAssassin::                How to use external anti-spam tools.
860 * Hashcash::                    Reduce spam by burning CPU time.
861 * Filtering Spam Using The Spam ELisp Package::  
862 * Filtering Spam Using Statistics with spam-stat::  
863
864 Appendices
865
866 * XEmacs::                      Requirements for installing under XEmacs.
867 * History::                     How Gnus got where it is today.
868 * On Writing Manuals::          Why this is not a beginner's guide.
869 * Terminology::                 We use really difficult, like, words here.
870 * Customization::               Tailoring Gnus to your needs.
871 * Troubleshooting::             What you might try if things do not work.
872 * Gnus Reference Guide::        Rilly, rilly technical stuff.
873 * Emacs for Heathens::          A short introduction to Emacsian terms.
874 * Frequently Asked Questions::  The Gnus FAQ.
875
876 History
877
878 * Gnus Versions::               What Gnus versions have been released.
879 * Other Gnus Versions::         Other Gnus versions that also have been released.
880 * Why?::                        What's the point of Gnus?
881 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
882 * Conformity::                  Gnus tries to conform to all standards.
883 * Emacsen::                     Gnus can be run on a few modern Emacsen.
884 * Gnus Development::            How Gnus is developed.
885 * Contributors::                Oodles of people.
886 * New Features::                Pointers to some of the new stuff in Gnus.
887
888 New Features
889
890 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
891 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
892 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
893 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
894 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
895 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
896
897 Customization
898
899 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
900 * Slow Terminal Connection::    You run a remote Emacs.
901 * Little Disk Space::           You feel that having large setup files is icky.
902 * Slow Machine::                You feel like buying a faster machine.
903
904 Gnus Reference Guide
905
906 * Gnus Utility Functions::      Common functions and variable to use.
907 * Back End Interface::          How Gnus communicates with the servers.
908 * Score File Syntax::           A BNF definition of the score file standard.
909 * Headers::                     How Gnus stores headers internally.
910 * Ranges::                      A handy format for storing mucho numbers.
911 * Group Info::                  The group info format.
912 * Extended Interactive::        Symbolic prefixes and stuff.
913 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
914 * Various File Formats::        Formats of files that Gnus use.
915
916 Back End Interface
917
918 * Required Back End Functions::  Functions that must be implemented.
919 * Optional Back End Functions::  Functions that need not be implemented.
920 * Error Messaging::             How to get messages and report errors.
921 * Writing New Back Ends::       Extending old back ends.
922 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
923 * Mail-like Back Ends::         Some tips on mail back ends.
924
925 Various File Formats
926
927 * Active File Format::          Information on articles and groups available.
928 * Newsgroups File Format::      Group descriptions.
929
930 Emacs for Heathens
931
932 * Keystrokes::                  Entering text and executing commands.
933 * Emacs Lisp::                  The built-in Emacs programming language.
934
935 @end detailmenu
936 @end menu
937
938 @node Starting Up
939 @chapter Starting Gnus
940 @cindex starting up
941
942 @kindex M-x gnus
943 @findex gnus
944 If your system administrator has set things up properly, starting Gnus
945 and reading news is extremely easy---you just type @kbd{M-x gnus} in
946 your Emacs.
947
948 @findex gnus-other-frame
949 @kindex M-x gnus-other-frame
950 If you want to start Gnus in a different frame, you can use the command
951 @kbd{M-x gnus-other-frame} instead.
952
953 If things do not go smoothly at startup, you have to twiddle some
954 variables in your @file{~/.gnus.el} file.  This file is similar to
955 @file{~/.emacs}, but is read when gnus starts.
956
957 If you puzzle at any terms used in this manual, please refer to the
958 terminology section (@pxref{Terminology}).
959
960 @menu
961 * Finding the News::            Choosing a method for getting news.
962 * The First Time::              What does Gnus do the first time you start it?
963 * The Server is Down::          How can I read my mail then?
964 * Slave Gnusae::                You can have more than one Gnus active at a time.
965 * Fetching a Group::            Starting Gnus just to read a group.
966 * New Groups::                  What is Gnus supposed to do with new groups?
967 * Changing Servers::            You may want to move from one server to another.
968 * Startup Files::               Those pesky startup files---@file{.newsrc}.
969 * Auto Save::                   Recovering from a crash.
970 * The Active File::             Reading the active file over a slow line Takes Time.
971 * Startup Variables::           Other variables you might change.
972 @end menu
973
974
975 @node Finding the News
976 @section Finding the News
977 @cindex finding news
978
979 @vindex gnus-select-method
980 @c @head
981 The @code{gnus-select-method} variable says where Gnus should look for
982 news.  This variable should be a list where the first element says
983 @dfn{how} and the second element says @dfn{where}.  This method is your
984 native method.  All groups not fetched with this method are
985 foreign groups.
986
987 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
988 you want to get your daily dosage of news from, you'd say:
989
990 @lisp
991 (setq gnus-select-method '(nntp "news.somewhere.edu"))
992 @end lisp
993
994 If you want to read directly from the local spool, say:
995
996 @lisp
997 (setq gnus-select-method '(nnspool ""))
998 @end lisp
999
1000 If you can use a local spool, you probably should, as it will almost
1001 certainly be much faster.  But do not use the local spool if your
1002 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1003
1004 @vindex gnus-nntpserver-file
1005 @cindex NNTPSERVER
1006 @cindex @acronym{NNTP} server
1007 If this variable is not set, Gnus will take a look at the
1008 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1009 Gnus will see whether @code{gnus-nntpserver-file}
1010 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1011 If that fails as well, Gnus will try to use the machine running Emacs
1012 as an @acronym{NNTP} server.  That's a long shot, though.
1013
1014 @vindex gnus-nntp-server
1015 If @code{gnus-nntp-server} is set, this variable will override
1016 @code{gnus-select-method}.  You should therefore set
1017 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1018
1019 @vindex gnus-secondary-servers
1020 @vindex gnus-nntp-server
1021 You can also make Gnus prompt you interactively for the name of an
1022 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1023 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1024 in the @code{gnus-secondary-servers} list (if any).  You can also just
1025 type in the name of any server you feel like visiting.  (Note that this
1026 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1027 gnus} later in the same Emacs session, Gnus will contact the same
1028 server.)
1029
1030 @findex gnus-group-browse-foreign-server
1031 @kindex B (Group)
1032 However, if you use one @acronym{NNTP} server regularly and are just
1033 interested in a couple of groups from a different server, you would be
1034 better served by using the @kbd{B} command in the group buffer.  It will
1035 let you have a look at what groups are available, and you can subscribe
1036 to any of the groups you want to.  This also makes @file{.newsrc}
1037 maintenance much tidier.  @xref{Foreign Groups}.
1038
1039 @vindex gnus-secondary-select-methods
1040 @c @head
1041 A slightly different approach to foreign groups is to set the
1042 @code{gnus-secondary-select-methods} variable.  The select methods
1043 listed in this variable are in many ways just as native as the
1044 @code{gnus-select-method} server.  They will also be queried for active
1045 files during startup (if that's required), and new newsgroups that
1046 appear on these servers will be subscribed (or not) just as native
1047 groups are.
1048
1049 For instance, if you use the @code{nnmbox} back end to read your mail,
1050 you would typically set this variable to
1051
1052 @lisp
1053 (setq gnus-secondary-select-methods '((nnmbox "")))
1054 @end lisp
1055
1056
1057 @node The First Time
1058 @section The First Time
1059 @cindex first time usage
1060
1061 If no startup files exist, Gnus will try to determine what groups should
1062 be subscribed by default.
1063
1064 @vindex gnus-default-subscribed-newsgroups
1065 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1066 will subscribe you to just those groups in that list, leaving the rest
1067 killed.  Your system administrator should have set this variable to
1068 something useful.
1069
1070 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1071 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1072 here as @dfn{whatever Lars thinks you should read}.)
1073
1074 You'll also be subscribed to the Gnus documentation group, which should
1075 help you with most common problems.
1076
1077 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1078 use the normal functions for handling new groups, and not do anything
1079 special.
1080
1081
1082 @node The Server is Down
1083 @section The Server is Down
1084 @cindex server errors
1085
1086 If the default server is down, Gnus will understandably have some
1087 problems starting.  However, if you have some mail groups in addition to
1088 the news groups, you may want to start Gnus anyway.
1089
1090 Gnus, being the trusting sort of program, will ask whether to proceed
1091 without a native select method if that server can't be contacted.  This
1092 will happen whether the server doesn't actually exist (i.e., you have
1093 given the wrong address) or the server has just momentarily taken ill
1094 for some reason or other.  If you decide to continue and have no foreign
1095 groups, you'll find it difficult to actually do anything in the group
1096 buffer.  But, hey, that's your problem.  Blllrph!
1097
1098 @findex gnus-no-server
1099 @kindex M-x gnus-no-server
1100 @c @head
1101 If you know that the server is definitely down, or you just want to read
1102 your mail without bothering with the server at all, you can use the
1103 @code{gnus-no-server} command to start Gnus.  That might come in handy
1104 if you're in a hurry as well.  This command will not attempt to contact
1105 your primary server---instead, it will just activate all groups on level
1106 1 and 2.  (You should preferably keep no native groups on those two
1107 levels.) Also @pxref{Group Levels}.
1108
1109
1110 @node Slave Gnusae
1111 @section Slave Gnusae
1112 @cindex slave
1113
1114 You might want to run more than one Emacs with more than one Gnus at the
1115 same time.  If you are using different @file{.newsrc} files (e.g., if you
1116 are using the two different Gnusae to read from two different servers),
1117 that is no problem whatsoever.  You just do it.
1118
1119 The problem appears when you want to run two Gnusae that use the same
1120 @file{.newsrc} file.
1121
1122 To work around that problem some, we here at the Think-Tank at the Gnus
1123 Towers have come up with a new concept: @dfn{Masters} and
1124 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1125 taken out a copyright on those words.  If you wish to use those words in
1126 conjunction with each other, you have to send $1 per usage instance to
1127 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1128 Applications}) will be much more expensive, of course.)
1129
1130 @findex gnus-slave
1131 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1132 however you do it).  Each subsequent slave Gnusae should be started with
1133 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1134 files, but instead save @dfn{slave files} that contain information only
1135 on what groups have been read in the slave session.  When a master Gnus
1136 starts, it will read (and delete) these slave files, incorporating all
1137 information from them.  (The slave files will be read in the sequence
1138 they were created, so the latest changes will have precedence.)
1139
1140 Information from the slave files has, of course, precedence over the
1141 information in the normal (i.e., master) @file{.newsrc} file.
1142
1143 If the @file{.newsrc*} files have not been saved in the master when the
1144 slave starts, you may be prompted as to whether to read an auto-save
1145 file.  If you answer ``yes'', the unsaved changes to the master will be
1146 incorporated into the slave.  If you answer ``no'', the slave may see some
1147 messages as unread that have been read in the master.
1148
1149 @node Fetching a Group
1150 @section Fetching a Group
1151 @cindex fetching a group
1152
1153 @findex gnus-fetch-group
1154 It is sometimes convenient to be able to just say ``I want to read this
1155 group and I don't care whether Gnus has been started or not''.  This is
1156 perhaps more useful for people who write code than for users, but the
1157 command @code{gnus-fetch-group} provides this functionality in any case.
1158 It takes the group name as a parameter.
1159
1160
1161 @node New Groups
1162 @section New Groups
1163 @cindex new groups
1164 @cindex subscription
1165
1166 @vindex gnus-check-new-newsgroups
1167 If you are satisfied that you really never want to see any new groups,
1168 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1169 also save you some time at startup.  Even if this variable is
1170 @code{nil}, you can always subscribe to the new groups just by pressing
1171 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1172 is @code{ask-server} by default.  If you set this variable to
1173 @code{always}, then Gnus will query the back ends for new groups even
1174 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1175
1176 @menu
1177 * Checking New Groups::         Determining what groups are new.
1178 * Subscription Methods::        What Gnus should do with new groups.
1179 * Filtering New Groups::        Making Gnus ignore certain new groups.
1180 @end menu
1181
1182
1183 @node Checking New Groups
1184 @subsection Checking New Groups
1185
1186 Gnus normally determines whether a group is new or not by comparing the
1187 list of groups from the active file(s) with the lists of subscribed and
1188 dead groups.  This isn't a particularly fast method.  If
1189 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1190 server for new groups since the last time.  This is both faster and
1191 cheaper.  This also means that you can get rid of the list of killed
1192 groups altogether, so you may set @code{gnus-save-killed-list} to
1193 @code{nil}, which will save time both at startup, at exit, and all over.
1194 Saves disk space, too.  Why isn't this the default, then?
1195 Unfortunately, not all servers support this command.
1196
1197 I bet I know what you're thinking now: How do I find out whether my
1198 server supports @code{ask-server}?  No?  Good, because I don't have a
1199 fail-safe answer.  I would suggest just setting this variable to
1200 @code{ask-server} and see whether any new groups appear within the next
1201 few days.  If any do, then it works.  If none do, then it doesn't
1202 work.  I could write a function to make Gnus guess whether the server
1203 supports @code{ask-server}, but it would just be a guess.  So I won't.
1204 You could @code{telnet} to the server and say @code{HELP} and see
1205 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1206 it does, then it might work.  (But there are servers that lists
1207 @samp{NEWGROUPS} without supporting the function properly.)
1208
1209 This variable can also be a list of select methods.  If so, Gnus will
1210 issue an @code{ask-server} command to each of the select methods, and
1211 subscribe them (or not) using the normal methods.  This might be handy
1212 if you are monitoring a few servers for new groups.  A side effect is
1213 that startup will take much longer, so you can meditate while waiting.
1214 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1215
1216
1217 @node Subscription Methods
1218 @subsection Subscription Methods
1219
1220 @vindex gnus-subscribe-newsgroup-method
1221 What Gnus does when it encounters a new group is determined by the
1222 @code{gnus-subscribe-newsgroup-method} variable.
1223
1224 This variable should contain a function.  This function will be called
1225 with the name of the new group as the only parameter.
1226
1227 Some handy pre-fab functions are:
1228
1229 @table @code
1230
1231 @item gnus-subscribe-zombies
1232 @vindex gnus-subscribe-zombies
1233 Make all new groups zombies.  This is the default.  You can browse the
1234 zombies later (with @kbd{A z}) and either kill them all off properly
1235 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1236
1237 @item gnus-subscribe-randomly
1238 @vindex gnus-subscribe-randomly
1239 Subscribe all new groups in arbitrary order.  This really means that all
1240 new groups will be added at ``the top'' of the group buffer.
1241
1242 @item gnus-subscribe-alphabetically
1243 @vindex gnus-subscribe-alphabetically
1244 Subscribe all new groups in alphabetical order.
1245
1246 @item gnus-subscribe-hierarchically
1247 @vindex gnus-subscribe-hierarchically
1248 Subscribe all new groups hierarchically.  The difference between this
1249 function and @code{gnus-subscribe-alphabetically} is slight.
1250 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1251 alphabetical fashion, while this function will enter groups into its
1252 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1253 @samp{comp} hierarchy, this function will not mess that configuration
1254 up.  Or something like that.
1255
1256 @item gnus-subscribe-interactively
1257 @vindex gnus-subscribe-interactively
1258 Subscribe new groups interactively.  This means that Gnus will ask
1259 you about @strong{all} new groups.  The groups you choose to subscribe
1260 to will be subscribed hierarchically.
1261
1262 @item gnus-subscribe-killed
1263 @vindex gnus-subscribe-killed
1264 Kill all new groups.
1265
1266 @item gnus-subscribe-topics
1267 @vindex gnus-subscribe-topics
1268 Put the groups into the topic that has a matching @code{subscribe} topic
1269 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1270 topic parameter that looks like
1271
1272 @example
1273 "nnslashdot"
1274 @end example
1275
1276 will mean that all groups that match that regex will be subscribed under
1277 that topic.
1278
1279 If no topics match the groups, the groups will be subscribed in the
1280 top-level topic.
1281
1282 @end table
1283
1284 @vindex gnus-subscribe-hierarchical-interactive
1285 A closely related variable is
1286 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1287 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1288 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1289 will ask you for each sub-hierarchy whether you want to descend the
1290 hierarchy or not.
1291
1292 One common mistake is to set the variable a few paragraphs above
1293 (@code{gnus-subscribe-newsgroup-method}) to
1294 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1295 will not work.  This is ga-ga.  So don't do it.
1296
1297
1298 @node Filtering New Groups
1299 @subsection Filtering New Groups
1300
1301 A nice and portable way to control which new newsgroups should be
1302 subscribed (or ignored) is to put an @dfn{options} line at the start of
1303 the @file{.newsrc} file.  Here's an example:
1304
1305 @example
1306 options -n !alt.all !rec.all sci.all
1307 @end example
1308
1309 @vindex gnus-subscribe-options-newsgroup-method
1310 This line obviously belongs to a serious-minded intellectual scientific
1311 person (or she may just be plain old boring), because it says that all
1312 groups that have names beginning with @samp{alt} and @samp{rec} should
1313 be ignored, and all groups with names beginning with @samp{sci} should
1314 be subscribed.  Gnus will not use the normal subscription method for
1315 subscribing these groups.
1316 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1317 variable defaults to @code{gnus-subscribe-alphabetically}.
1318
1319 @vindex gnus-options-not-subscribe
1320 @vindex gnus-options-subscribe
1321 If you don't want to mess with your @file{.newsrc} file, you can just
1322 set the two variables @code{gnus-options-subscribe} and
1323 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1324 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1325 and if the new group matches the former, it will be unconditionally
1326 subscribed, and if it matches the latter, it will be ignored.
1327
1328 @vindex gnus-auto-subscribed-groups
1329 Yet another variable that meddles here is
1330 @code{gnus-auto-subscribed-groups}.  It works exactly like
1331 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1332 thought it would be nice to have two of these.  This variable is more
1333 meant for setting some ground rules, while the other variable is used
1334 more for user fiddling.  By default this variable makes all new groups
1335 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1336 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1337 subscribed.  If you don't like that, just set this variable to
1338 @code{nil}.
1339
1340 New groups that match this regexp are subscribed using
1341 @code{gnus-subscribe-options-newsgroup-method}.
1342
1343
1344 @node Changing Servers
1345 @section Changing Servers
1346 @cindex changing servers
1347
1348 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1349 This happens very rarely, but perhaps you change jobs, or one server is
1350 very flaky and you want to use another.
1351
1352 Changing the server is pretty easy, right?  You just change
1353 @code{gnus-select-method} to point to the new server?
1354
1355 @emph{Wrong!}
1356
1357 Article numbers are not (in any way) kept synchronized between different
1358 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1359 you have read is by keeping track of article numbers.  So when you
1360 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1361 worthless.
1362
1363 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1364 file from one server to another.  They all have one thing in
1365 common---they take a looong time to run.  You don't want to use these
1366 functions more than absolutely necessary.
1367
1368 @kindex M-x gnus-change-server
1369 @findex gnus-change-server
1370 If you have access to both servers, Gnus can request the headers for all
1371 the articles you have read and compare @code{Message-ID}s and map the
1372 article numbers of the read articles and article marks.  The @kbd{M-x
1373 gnus-change-server} command will do this for all your native groups.  It
1374 will prompt for the method you want to move to.
1375
1376 @kindex M-x gnus-group-move-group-to-server
1377 @findex gnus-group-move-group-to-server
1378 You can also move individual groups with the @kbd{M-x
1379 gnus-group-move-group-to-server} command.  This is useful if you want to
1380 move a (foreign) group from one server to another.
1381
1382 @kindex M-x gnus-group-clear-data-on-native-groups
1383 @findex gnus-group-clear-data-on-native-groups
1384 If you don't have access to both the old and new server, all your marks
1385 and read ranges have become worthless.  You can use the @kbd{M-x
1386 gnus-group-clear-data-on-native-groups} command to clear out all data
1387 that you have on your native groups.  Use with caution.
1388
1389 @kindex M-x gnus-group-clear-data
1390 @findex gnus-group-clear-data
1391 Clear the data from the current group only---nix out marks and the
1392 list of read articles (@code{gnus-group-clear-data}).
1393
1394 After changing servers, you @strong{must} move the cache hierarchy away,
1395 since the cached articles will have wrong article numbers, which will
1396 affect which articles Gnus thinks are read.
1397 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1398 to have it done automatically; for @code{gnus-group-clear-data}, you
1399 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1400 cache for all groups).
1401
1402
1403 @node Startup Files
1404 @section Startup Files
1405 @cindex startup files
1406 @cindex .newsrc
1407 @cindex .newsrc.el
1408 @cindex .newsrc.eld
1409
1410 Now, you all know about the @file{.newsrc} file.  All subscription
1411 information is traditionally stored in this file.
1412
1413 Things got a bit more complicated with @sc{gnus}.  In addition to
1414 keeping the @file{.newsrc} file updated, it also used a file called
1415 @file{.newsrc.el} for storing all the information that didn't fit into
1416 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1417 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1418 files was the most recently saved, which enabled people to swap between
1419 @sc{gnus} and other newsreaders.
1420
1421 That was kinda silly, so Gnus went one better: In addition to the
1422 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1423 @file{.newsrc.eld}.  It will read whichever of these files that are most
1424 recent, but it will never write a @file{.newsrc.el} file.  You should
1425 never delete the @file{.newsrc.eld} file---it contains much information
1426 not stored in the @file{.newsrc} file.
1427
1428 @vindex gnus-save-newsrc-file
1429 @vindex gnus-read-newsrc-file
1430 You can turn off writing the @file{.newsrc} file by setting
1431 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1432 the file and save some space, as well as exiting from Gnus faster.
1433 However, this will make it impossible to use other newsreaders than
1434 Gnus.  But hey, who would want to, right?  Similarly, setting
1435 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1436 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1437 convenient if you have a tendency to use Netscape once in a while.
1438
1439 @vindex gnus-save-killed-list
1440 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1441 will not save the list of killed groups to the startup file.  This will
1442 save both time (when starting and quitting) and space (on disk).  It
1443 will also mean that Gnus has no record of what groups are new or old,
1444 so the automatic new groups subscription methods become meaningless.
1445 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1446 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1447 Groups}).  This variable can also be a regular expression.  If that's
1448 the case, remove all groups that do not match this regexp before
1449 saving.  This can be useful in certain obscure situations that involve
1450 several servers where not all servers support @code{ask-server}.
1451
1452 @vindex gnus-startup-file
1453 @vindex gnus-backup-startup-file
1454 @vindex version-control
1455 The @code{gnus-startup-file} variable says where the startup files are.
1456 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1457 file being whatever that one is, with a @samp{.eld} appended.
1458 If you want version control for this file, set
1459 @code{gnus-backup-startup-file}.  It respects the same values as the
1460 @code{version-control} variable.
1461
1462 @vindex gnus-save-newsrc-hook
1463 @vindex gnus-save-quick-newsrc-hook
1464 @vindex gnus-save-standard-newsrc-hook
1465 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1466 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1467 saving the @file{.newsrc.eld} file, and
1468 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1469 @file{.newsrc} file.  The latter two are commonly used to turn version
1470 control on or off.  Version control is on by default when saving the
1471 startup files.  If you want to turn backup creation off, say something like:
1472
1473 @lisp
1474 (defun turn-off-backup ()
1475   (set (make-local-variable 'backup-inhibited) t))
1476
1477 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1478 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1479 @end lisp
1480
1481 @vindex gnus-init-file
1482 @vindex gnus-site-init-file
1483 When Gnus starts, it will read the @code{gnus-site-init-file}
1484 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1485 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1486 and can be used to avoid cluttering your @file{~/.emacs} and
1487 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1488 with the same names as these, but with @file{.elc} and @file{.el}
1489 suffixes.  In other words, if you have set @code{gnus-init-file} to
1490 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1491 and finally @file{~/.gnus} (in this order).
1492
1493
1494
1495 @node Auto Save
1496 @section Auto Save
1497 @cindex dribble file
1498 @cindex auto-save
1499
1500 Whenever you do something that changes the Gnus data (reading articles,
1501 catching up, killing/subscribing groups), the change is added to a
1502 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1503 Emacs way.  If your Emacs should crash before you have saved the
1504 @file{.newsrc} files, all changes you have made can be recovered from
1505 this file.
1506
1507 If Gnus detects this file at startup, it will ask the user whether to
1508 read it.  The auto save file is deleted whenever the real startup file is
1509 saved.
1510
1511 @vindex gnus-use-dribble-file
1512 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1513 maintain a dribble buffer.  The default is @code{t}.
1514
1515 @vindex gnus-dribble-directory
1516 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1517 this variable is @code{nil}, which it is by default, Gnus will dribble
1518 into the directory where the @file{.newsrc} file is located.  (This is
1519 normally the user's home directory.)  The dribble file will get the same
1520 file permissions as the @file{.newsrc} file.
1521
1522 @vindex gnus-always-read-dribble-file
1523 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1524 read the dribble file on startup without querying the user.
1525
1526
1527 @node The Active File
1528 @section The Active File
1529 @cindex active file
1530 @cindex ignored groups
1531
1532 When Gnus starts, or indeed whenever it tries to determine whether new
1533 articles have arrived, it reads the active file.  This is a very large
1534 file that lists all the active groups and articles on the server.
1535
1536 @vindex gnus-ignored-newsgroups
1537 Before examining the active file, Gnus deletes all lines that match the
1538 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1539 any groups with bogus names, but you can use this variable to make Gnus
1540 ignore hierarchies you aren't ever interested in.  However, this is not
1541 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1542 Groups} for an overview of other variables that can be used instead.
1543
1544 @c This variable is
1545 @c @code{nil} by default, and will slow down active file handling somewhat
1546 @c if you set it to anything else.
1547
1548 @vindex gnus-read-active-file
1549 @c @head
1550 The active file can be rather Huge, so if you have a slow network, you
1551 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1552 reading the active file.  This variable is @code{some} by default.
1553
1554 Gnus will try to make do by getting information just on the groups that
1555 you actually subscribe to.
1556
1557 Note that if you subscribe to lots and lots of groups, setting this
1558 variable to @code{nil} will probably make Gnus slower, not faster.  At
1559 present, having this variable @code{nil} will slow Gnus down
1560 considerably, unless you read news over a 2400 baud modem.
1561
1562 This variable can also have the value @code{some}.  Gnus will then
1563 attempt to read active info only on the subscribed groups.  On some
1564 servers this is quite fast (on sparkling, brand new INN servers that
1565 support the @code{LIST ACTIVE group} command), on others this isn't fast
1566 at all.  In any case, @code{some} should be faster than @code{nil}, and
1567 is certainly faster than @code{t} over slow lines.
1568
1569 Some news servers (old versions of Leafnode and old versions of INN, for
1570 instance) do not support the @code{LIST ACTIVE group}.  For these
1571 servers, @code{nil} is probably the most efficient value for this
1572 variable.
1573
1574 If this variable is @code{nil}, Gnus will ask for group info in total
1575 lock-step, which isn't very fast.  If it is @code{some} and you use an
1576 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1577 read all the replies in one swoop.  This will normally result in better
1578 performance, but if the server does not support the aforementioned
1579 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1580
1581 If you think that starting up Gnus takes too long, try all the three
1582 different values for this variable and see what works best for you.
1583
1584 In any case, if you use @code{some} or @code{nil}, you should definitely
1585 kill all groups that you aren't interested in to speed things up.
1586
1587 Note that this variable also affects active file retrieval from
1588 secondary select methods.
1589
1590
1591 @node Startup Variables
1592 @section Startup Variables
1593
1594 @table @code
1595
1596 @item gnus-load-hook
1597 @vindex gnus-load-hook
1598 A hook run while Gnus is being loaded.  Note that this hook will
1599 normally be run just once in each Emacs session, no matter how many
1600 times you start Gnus.
1601
1602 @item gnus-before-startup-hook
1603 @vindex gnus-before-startup-hook
1604 A hook run after starting up Gnus successfully.
1605
1606 @item gnus-startup-hook
1607 @vindex gnus-startup-hook
1608 A hook run as the very last thing after starting up Gnus
1609
1610 @item gnus-started-hook
1611 @vindex gnus-started-hook
1612 A hook that is run as the very last thing after starting up Gnus
1613 successfully.
1614
1615 @item gnus-setup-news-hook
1616 @vindex gnus-setup-news-hook
1617 A hook that is run after reading the @file{.newsrc} file(s), but before
1618 generating the group buffer.
1619
1620 @item gnus-check-bogus-newsgroups
1621 @vindex gnus-check-bogus-newsgroups
1622 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1623 startup.  A @dfn{bogus group} is a group that you have in your
1624 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1625 bogus groups can take quite a while, so to save time and resources it's
1626 best to leave this option off, and do the checking for bogus groups once
1627 in a while from the group buffer instead (@pxref{Group Maintenance}).
1628
1629 @item gnus-inhibit-startup-message
1630 @vindex gnus-inhibit-startup-message
1631 If non-@code{nil}, the startup message won't be displayed.  That way,
1632 your boss might not notice as easily that you are reading news instead
1633 of doing your job.  Note that this variable is used before
1634 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1635
1636 @item gnus-no-groups-message
1637 @vindex gnus-no-groups-message
1638 Message displayed by Gnus when no groups are available.
1639
1640 @item gnus-play-startup-jingle
1641 @vindex gnus-play-startup-jingle
1642 If non-@code{nil}, play the Gnus jingle at startup.
1643
1644 @item gnus-startup-jingle
1645 @vindex gnus-startup-jingle
1646 Jingle to be played if the above variable is non-@code{nil}.  The
1647 default is @samp{Tuxedomoon.Jingle4.au}.
1648
1649 @end table
1650
1651
1652 @node Group Buffer
1653 @chapter Group Buffer
1654 @cindex group buffer
1655
1656 @c Alex Schroeder suggests to rearrange this as follows:
1657 @c
1658 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1659 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1660 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1661 @c   7. Group Score, 8. Group Buffer Format
1662 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1663 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1664 @c <kensanata> First, "Gnus considers groups... (default 9)."
1665 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1666 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1667 @c <kensanata> Then expand the next paragraph or add some more to it.
1668 @c    This short one sentence explains levels 1 and 2, therefore I understand
1669 @c    that I should keep important news at 3 and boring news at 4.
1670 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1671 @c    Maybe keep those that you don't want to read temporarily at 6,
1672 @c    those that you never want to read at 8, those that offend your
1673 @c    human rights at 9...
1674
1675
1676 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1677 is the first buffer shown when Gnus starts, and will never be killed as
1678 long as Gnus is active.
1679
1680 @iftex
1681 @iflatex
1682 \gnusfigure{The Group Buffer}{320}{
1683 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1684 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1685 \put(120,38){\vector(1,2){10}}
1686 \put(40,60){\makebox(0,0)[r]{Mode line}}
1687 \put(40,58){\vector(1,0){30}}
1688 \put(200,28){\makebox(0,0)[t]{Native select method}}
1689 \put(200,26){\vector(-1,2){15}}
1690 }
1691 @end iflatex
1692 @end iftex
1693
1694 @menu
1695 * Group Buffer Format::         Information listed and how you can change it.
1696 * Group Maneuvering::           Commands for moving in the group buffer.
1697 * Selecting a Group::           Actually reading news.
1698 * Subscription Commands::       Unsubscribing, killing, subscribing.
1699 * Group Data::                  Changing the info for a group.
1700 * Group Levels::                Levels? What are those, then?
1701 * Group Score::                 A mechanism for finding out what groups you like.
1702 * Marking Groups::              You can mark groups for later processing.
1703 * Foreign Groups::              Creating and editing groups.
1704 * Group Parameters::            Each group may have different parameters set.
1705 * Listing Groups::              Gnus can list various subsets of the groups.
1706 * Sorting Groups::              Re-arrange the group order.
1707 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1708 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1709 * Exiting Gnus::                Stop reading news and get some work done.
1710 * Group Topics::                A folding group mode divided into topics.
1711 * Misc Group Stuff::            Other stuff that you can to do.
1712 @end menu
1713
1714
1715 @node Group Buffer Format
1716 @section Group Buffer Format
1717
1718 @menu
1719 * Group Line Specification::    Deciding how the group buffer is to look.
1720 * Group Mode Line Specification::  The group buffer mode line.
1721 * Group Highlighting::          Having nice colors in the group buffer.
1722 @end menu
1723
1724
1725 @node Group Line Specification
1726 @subsection Group Line Specification
1727 @cindex group buffer format
1728
1729 The default format of the group buffer is nice and dull, but you can
1730 make it as exciting and ugly as you feel like.
1731
1732 Here's a couple of example group lines:
1733
1734 @example
1735      25: news.announce.newusers
1736  *    0: alt.fan.andrea-dworkin
1737 @end example
1738
1739 Quite simple, huh?
1740
1741 You can see that there are 25 unread articles in
1742 @samp{news.announce.newusers}.  There are no unread articles, but some
1743 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1744 asterisk at the beginning of the line?).
1745
1746 @vindex gnus-group-line-format
1747 You can change that format to whatever you want by fiddling with the
1748 @code{gnus-group-line-format} variable.  This variable works along the
1749 lines of a @code{format} specification, which is pretty much the same as
1750 a @code{printf} specifications, for those of you who use (feh!) C.
1751 @xref{Formatting Variables}.
1752
1753 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1754
1755 There should always be a colon on the line; the cursor always moves to
1756 the colon after performing an operation.  @xref{Positioning
1757 Point}. Nothing else is required---not even the group name.  All
1758 displayed text is just window dressing, and is never examined by Gnus.
1759 Gnus stores all real information it needs using text properties.
1760
1761 (Note that if you make a really strange, wonderful, spreadsheet-like
1762 layout, everybody will believe you are hard at work with the accounting
1763 instead of wasting time reading news.)
1764
1765 Here's a list of all available format characters:
1766
1767 @table @samp
1768
1769 @item M
1770 An asterisk if the group only has marked articles.
1771
1772 @item S
1773 Whether the group is subscribed.
1774
1775 @item L
1776 Level of subscribedness.
1777
1778 @item N
1779 Number of unread articles.
1780
1781 @item I
1782 Number of dormant articles.
1783
1784 @item T
1785 Number of ticked articles.
1786
1787 @item R
1788 Number of read articles.
1789
1790 @item U
1791 Number of unseen articles.
1792
1793 @item t
1794 Estimated total number of articles.  (This is really @var{max-number}
1795 minus @var{min-number} plus 1.)
1796
1797 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1798 efficient access to @var{max-number} and @var{min-number} but getting
1799 the true unread message count is not possible efficiently.  For
1800 hysterical raisins, even the mail back ends, where the true number of
1801 unread messages might be available efficiently, use the same limited
1802 interface.  To remove this restriction from Gnus means that the back
1803 end interface has to be changed, which is not an easy job.  If you
1804 want to work on this, please contact the Gnus mailing list.
1805
1806 @item y
1807 Number of unread, unticked, non-dormant articles.
1808
1809 @item i
1810 Number of ticked and dormant articles.
1811
1812 @item g
1813 Full group name.
1814
1815 @item G
1816 Group name.
1817
1818 @item C
1819 Group comment (@pxref{Group Parameters}) or group name if there is no
1820 comment element in the group parameters.
1821
1822 @item D
1823 Newsgroup description.  You need to read the group descriptions
1824 before these will appear, and to do that, you either have to set
1825 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1826 command. 
1827
1828 @item o
1829 @samp{m} if moderated.
1830
1831 @item O
1832 @samp{(m)} if moderated.
1833
1834 @item s
1835 Select method.
1836
1837 @item B
1838 If the summary buffer for the group is open or not.
1839
1840 @item n
1841 Select from where.
1842
1843 @item z
1844 A string that looks like @samp{<%s:%n>} if a foreign select method is
1845 used.
1846
1847 @item P
1848 Indentation based on the level of the topic (@pxref{Group Topics}).
1849
1850 @item c
1851 @vindex gnus-group-uncollapsed-levels
1852 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1853 variable says how many levels to leave at the end of the group name.
1854 The default is 1---this will mean that group names like
1855 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1856
1857 @item m
1858 @vindex gnus-new-mail-mark
1859 @cindex %
1860 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1861 the group lately.
1862
1863 @item p
1864 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1865
1866 @item d
1867 A string that says when you last read the group (@pxref{Group
1868 Timestamp}).
1869
1870 @item u
1871 User defined specifier.  The next character in the format string should
1872 be a letter.  Gnus will call the function
1873 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1874 following @samp{%u}.  The function will be passed a single dummy
1875 parameter as argument.  The function should return a string, which will
1876 be inserted into the buffer just like information from any other
1877 specifier.
1878 @end table
1879
1880 @cindex *
1881 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1882 if no info is available---for instance, if it is a non-activated foreign
1883 group, or a bogus native group.
1884
1885
1886 @node Group Mode Line Specification
1887 @subsection Group Mode Line Specification
1888 @cindex group mode line
1889
1890 @vindex gnus-group-mode-line-format
1891 The mode line can be changed by setting
1892 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1893 doesn't understand that many format specifiers:
1894
1895 @table @samp
1896 @item S
1897 The native news server.
1898 @item M
1899 The native select method.
1900 @end table
1901
1902
1903 @node Group Highlighting
1904 @subsection Group Highlighting
1905 @cindex highlighting
1906 @cindex group highlighting
1907
1908 @vindex gnus-group-highlight
1909 Highlighting in the group buffer is controlled by the
1910 @code{gnus-group-highlight} variable.  This is an alist with elements
1911 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1912 something non-@code{nil}, the @var{face} will be used on the line.
1913
1914 Here's an example value for this variable that might look nice if the
1915 background is dark:
1916
1917 @lisp
1918 (cond (window-system
1919        (setq custom-background-mode 'light)
1920        (defface my-group-face-1
1921          '((t (:foreground "Red" :bold t))) "First group face")
1922        (defface my-group-face-2
1923          '((t (:foreground "DarkSeaGreen4" :bold t))) 
1924          "Second group face")
1925        (defface my-group-face-3
1926          '((t (:foreground "Green4" :bold t))) "Third group face")
1927        (defface my-group-face-4
1928          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1929        (defface my-group-face-5
1930          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1931
1932 (setq gnus-group-highlight
1933       '(((> unread 200) . my-group-face-1)
1934         ((and (< level 3) (zerop unread)) . my-group-face-2)
1935         ((< level 3) . my-group-face-3)
1936         ((zerop unread) . my-group-face-4)
1937         (t . my-group-face-5)))
1938 @end lisp
1939
1940 Also @pxref{Faces and Fonts}.
1941
1942 Variables that are dynamically bound when the forms are evaluated
1943 include:
1944
1945 @table @code
1946 @item group
1947 The group name.
1948 @item unread
1949 The number of unread articles in the group.
1950 @item method
1951 The select method.
1952 @item mailp
1953 Whether the group is a mail group.
1954 @item level
1955 The level of the group.
1956 @item score
1957 The score of the group.
1958 @item ticked
1959 The number of ticked articles in the group.
1960 @item total
1961 The total number of articles in the group.  Or rather,
1962 @var{max-number} minus @var{min-number} plus one.
1963 @item topic
1964 When using the topic minor mode, this variable is bound to the current
1965 topic being inserted.
1966 @end table
1967
1968 When the forms are @code{eval}ed, point is at the beginning of the line
1969 of the group in question, so you can use many of the normal Gnus
1970 functions for snarfing info on the group.
1971
1972 @vindex gnus-group-update-hook
1973 @findex gnus-group-highlight-line
1974 @code{gnus-group-update-hook} is called when a group line is changed.
1975 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1976 calls @code{gnus-group-highlight-line} by default.
1977
1978
1979 @node Group Maneuvering
1980 @section Group Maneuvering
1981 @cindex group movement
1982
1983 All movement commands understand the numeric prefix and will behave as
1984 expected, hopefully.
1985
1986 @table @kbd
1987
1988 @item n
1989 @kindex n (Group)
1990 @findex gnus-group-next-unread-group
1991 Go to the next group that has unread articles
1992 (@code{gnus-group-next-unread-group}).
1993
1994 @item p
1995 @itemx DEL
1996 @kindex DEL (Group)
1997 @kindex p (Group)
1998 @findex gnus-group-prev-unread-group
1999 Go to the previous group that has unread articles
2000 (@code{gnus-group-prev-unread-group}).
2001
2002 @item N
2003 @kindex N (Group)
2004 @findex gnus-group-next-group
2005 Go to the next group (@code{gnus-group-next-group}).
2006
2007 @item P
2008 @kindex P (Group)
2009 @findex gnus-group-prev-group
2010 Go to the previous group (@code{gnus-group-prev-group}).
2011
2012 @item M-n
2013 @kindex M-n (Group)
2014 @findex gnus-group-next-unread-group-same-level
2015 Go to the next unread group on the same (or lower) level
2016 (@code{gnus-group-next-unread-group-same-level}).
2017
2018 @item M-p
2019 @kindex M-p (Group)
2020 @findex gnus-group-prev-unread-group-same-level
2021 Go to the previous unread group on the same (or lower) level
2022 (@code{gnus-group-prev-unread-group-same-level}).
2023 @end table
2024
2025 Three commands for jumping to groups:
2026
2027 @table @kbd
2028
2029 @item j
2030 @kindex j (Group)
2031 @findex gnus-group-jump-to-group
2032 Jump to a group (and make it visible if it isn't already)
2033 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2034 like living groups.
2035
2036 @item ,
2037 @kindex , (Group)
2038 @findex gnus-group-best-unread-group
2039 Jump to the unread group with the lowest level
2040 (@code{gnus-group-best-unread-group}).
2041
2042 @item .
2043 @kindex . (Group)
2044 @findex gnus-group-first-unread-group
2045 Jump to the first group with unread articles
2046 (@code{gnus-group-first-unread-group}).
2047 @end table
2048
2049 @vindex gnus-group-goto-unread
2050 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2051 commands will move to the next group, not the next unread group.  Even
2052 the commands that say they move to the next unread group.  The default
2053 is @code{t}.
2054
2055
2056 @node Selecting a Group
2057 @section Selecting a Group
2058 @cindex group selection
2059
2060 @table @kbd
2061
2062 @item SPACE
2063 @kindex SPACE (Group)
2064 @findex gnus-group-read-group
2065 Select the current group, switch to the summary buffer and display the
2066 first unread article (@code{gnus-group-read-group}).  If there are no
2067 unread articles in the group, or if you give a non-numerical prefix to
2068 this command, Gnus will offer to fetch all the old articles in this
2069 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2070 determines the number of articles Gnus will fetch.  If @var{n} is
2071 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2072 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2073
2074 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2075 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2076 - 4 2 SPC} fetches the 42 oldest ones.
2077
2078 When you are in the group (in the Summary buffer), you can type
2079 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2080 ones.
2081
2082 @item RET
2083 @kindex RET (Group)
2084 @findex gnus-group-select-group
2085 Select the current group and switch to the summary buffer
2086 (@code{gnus-group-select-group}).  Takes the same arguments as
2087 @code{gnus-group-read-group}---the only difference is that this command
2088 does not display the first unread article automatically upon group
2089 entry.
2090
2091 @item M-RET
2092 @kindex M-RET (Group)
2093 @findex gnus-group-quick-select-group
2094 This does the same as the command above, but tries to do it with the
2095 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2096 scoring/killing will be performed, there will be no highlights and no
2097 expunging.  This might be useful if you're in a real hurry and have to
2098 enter some humongous group.  If you give a 0 prefix to this command
2099 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2100 which is useful if you want to toggle threading before generating the
2101 summary buffer (@pxref{Summary Generation Commands}).
2102
2103 @item M-SPACE
2104 @kindex M-SPACE (Group)
2105 @findex gnus-group-visible-select-group
2106 This is yet one more command that does the same as the @kbd{RET}
2107 command, but this one does it without expunging and hiding dormants
2108 (@code{gnus-group-visible-select-group}).
2109
2110 @item C-M-RET
2111 @kindex C-M-RET (Group)
2112 @findex gnus-group-select-group-ephemerally
2113 Finally, this command selects the current group ephemerally without
2114 doing any processing of its contents
2115 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2116 turned off.  Everything you do in the group after selecting it in this
2117 manner will have no permanent effects.
2118
2119 @end table
2120
2121 @vindex gnus-large-newsgroup
2122 The @code{gnus-large-newsgroup} variable says what Gnus should consider
2123 to be a big group.  This is 200 by default.  If the group has more
2124 (unread and/or ticked) articles than this, Gnus will query the user
2125 before entering the group.  The user can then specify how many articles
2126 should be fetched from the server.  If the user specifies a negative
2127 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2128 is positive, the @code{n} articles that have arrived most recently will
2129 be fetched.
2130
2131 @vindex gnus-large-ephemeral-newsgroup
2132 Same as @code{gnus-large-newsgroup}, but only used for ephemeral
2133 newsgroups.
2134
2135 @vindex gnus-select-group-hook
2136 @vindex gnus-auto-select-first
2137 @vindex gnus-auto-select-subject
2138 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2139 automatically when entering a group with the @kbd{SPACE} command.
2140 Which article this is is controlled by the
2141 @code{gnus-auto-select-subject} variable.  Valid values for this
2142 variable is:
2143
2144 @table @code
2145
2146 @item unread
2147 Place point on the subject line of the first unread article.
2148
2149 @item first
2150 Place point on the subject line of the first article.
2151
2152 @item unseen
2153 Place point on the subject line of the first unseen article.
2154
2155 @item unseen-or-unread
2156 Place point on the subject line of the first unseen article, and if
2157 there is no such article, place point on the subject line of the first
2158 unread article.
2159
2160 @item best
2161 Place point on the subject line of the highest-scored unread article.
2162
2163 @end table
2164
2165 This variable can also be a function.  In that case, that function
2166 will be called to place point on a subject line.
2167
2168 If you want to prevent automatic selection in some group (say, in a
2169 binary group with Huge articles) you can set the
2170 @code{gnus-auto-select-first} variable to @code{nil} in
2171 @code{gnus-select-group-hook}, which is called when a group is
2172 selected.
2173
2174
2175 @node Subscription Commands
2176 @section Subscription Commands
2177 @cindex subscription
2178
2179 @table @kbd
2180
2181 @item S t
2182 @itemx u
2183 @kindex S t (Group)
2184 @kindex u (Group)
2185 @findex gnus-group-unsubscribe-current-group
2186 @c @icon{gnus-group-unsubscribe}
2187 Toggle subscription to the current group
2188 (@code{gnus-group-unsubscribe-current-group}).
2189
2190 @item S s
2191 @itemx U
2192 @kindex S s (Group)
2193 @kindex U (Group)
2194 @findex gnus-group-unsubscribe-group
2195 Prompt for a group to subscribe, and then subscribe it.  If it was
2196 subscribed already, unsubscribe it instead
2197 (@code{gnus-group-unsubscribe-group}).
2198
2199 @item S k
2200 @itemx C-k
2201 @kindex S k (Group)
2202 @kindex C-k (Group)
2203 @findex gnus-group-kill-group
2204 @c @icon{gnus-group-kill-group}
2205 Kill the current group (@code{gnus-group-kill-group}).
2206
2207 @item S y
2208 @itemx C-y
2209 @kindex S y (Group)
2210 @kindex C-y (Group)
2211 @findex gnus-group-yank-group
2212 Yank the last killed group (@code{gnus-group-yank-group}).
2213
2214 @item C-x C-t
2215 @kindex C-x C-t (Group)
2216 @findex gnus-group-transpose-groups
2217 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2218 really a subscription command, but you can use it instead of a
2219 kill-and-yank sequence sometimes.
2220
2221 @item S w
2222 @itemx C-w
2223 @kindex S w (Group)
2224 @kindex C-w (Group)
2225 @findex gnus-group-kill-region
2226 Kill all groups in the region (@code{gnus-group-kill-region}).
2227
2228 @item S z
2229 @kindex S z (Group)
2230 @findex gnus-group-kill-all-zombies
2231 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2232
2233 @item S C-k
2234 @kindex S C-k (Group)
2235 @findex gnus-group-kill-level
2236 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2237 These groups can't be yanked back after killing, so this command should
2238 be used with some caution.  The only time where this command comes in
2239 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2240 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2241 kill off all unsubscribed groups that do not have message numbers in the
2242 @file{.newsrc} file.
2243
2244 @end table
2245
2246 Also @pxref{Group Levels}.
2247
2248
2249 @node Group Data
2250 @section Group Data
2251
2252 @table @kbd
2253
2254 @item c
2255 @kindex c (Group)
2256 @findex gnus-group-catchup-current
2257 @vindex gnus-group-catchup-group-hook
2258 @c @icon{gnus-group-catchup-current}
2259 Mark all unticked articles in this group as read
2260 (@code{gnus-group-catchup-current}).
2261 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2262 the group buffer.
2263
2264 @item C
2265 @kindex C (Group)
2266 @findex gnus-group-catchup-current-all
2267 Mark all articles in this group, even the ticked ones, as read
2268 (@code{gnus-group-catchup-current-all}).
2269
2270 @item M-c
2271 @kindex M-c (Group)
2272 @findex gnus-group-clear-data
2273 Clear the data from the current group---nix out marks and the list of
2274 read articles (@code{gnus-group-clear-data}).
2275
2276 @item M-x gnus-group-clear-data-on-native-groups
2277 @kindex M-x gnus-group-clear-data-on-native-groups
2278 @findex gnus-group-clear-data-on-native-groups
2279 If you have switched from one @acronym{NNTP} server to another, all your marks
2280 and read ranges have become worthless.  You can use this command to
2281 clear out all data that you have on your native groups.  Use with
2282 caution.
2283
2284 @end table
2285
2286
2287 @node Group Levels
2288 @section Group Levels
2289 @cindex group level
2290 @cindex level
2291
2292 All groups have a level of @dfn{subscribedness}.  For instance, if a
2293 group is on level 2, it is more subscribed than a group on level 5.  You
2294 can ask Gnus to just list groups on a given level or lower
2295 (@pxref{Listing Groups}), or to just check for new articles in groups on
2296 a given level or lower (@pxref{Scanning New Messages}).
2297
2298 Remember:  The higher the level of the group, the less important it is.
2299
2300 @table @kbd
2301
2302 @item S l
2303 @kindex S l (Group)
2304 @findex gnus-group-set-current-level
2305 Set the level of the current group.  If a numeric prefix is given, the
2306 next @var{n} groups will have their levels set.  The user will be
2307 prompted for a level.
2308 @end table
2309
2310 @vindex gnus-level-killed
2311 @vindex gnus-level-zombie
2312 @vindex gnus-level-unsubscribed
2313 @vindex gnus-level-subscribed
2314 Gnus considers groups from levels 1 to
2315 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2316 @code{gnus-level-subscribed} (exclusive) and
2317 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2318 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2319 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2320 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2321 same, but zombie and killed groups have no information on what articles
2322 you have read, etc, stored.  This distinction between dead and living
2323 groups isn't done because it is nice or clever, it is done purely for
2324 reasons of efficiency.
2325
2326 It is recommended that you keep all your mail groups (if any) on quite
2327 low levels (e.g. 1 or 2).
2328
2329 Maybe the following description of the default behavior of Gnus helps to
2330 understand what these levels are all about.  By default, Gnus shows you
2331 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2332 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2333 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2334 groups are hidden, in a way.
2335
2336 Zombie and killed groups are similar to unsubscribed groups in that they
2337 are hidden by default.  But they are different from subscribed and
2338 unsubscribed groups in that Gnus doesn't ask the news server for
2339 information (number of messages, number of unread messages) on zombie
2340 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2341 aren't interested in.  If most groups are killed, Gnus is faster.
2342
2343 Why does Gnus distinguish between zombie and killed groups?  Well, when
2344 a new group arrives on the server, Gnus by default makes it a zombie
2345 group.  This means that you are normally not bothered with new groups,
2346 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2347 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2348 list of killed groups.)
2349
2350 If you want to play with the level variables, you should show some care.
2351 Set them once, and don't touch them ever again.  Better yet, don't touch
2352 them at all unless you know exactly what you're doing.
2353
2354 @vindex gnus-level-default-unsubscribed
2355 @vindex gnus-level-default-subscribed
2356 Two closely related variables are @code{gnus-level-default-subscribed}
2357 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2358 which are the levels that new groups will be put on if they are
2359 (un)subscribed.  These two variables should, of course, be inside the
2360 relevant valid ranges.
2361
2362 @vindex gnus-keep-same-level
2363 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2364 will only move to groups of the same level (or lower).  In
2365 particular, going from the last article in one group to the next group
2366 will go to the next group of the same level (or lower).  This might be
2367 handy if you want to read the most important groups before you read the
2368 rest.
2369
2370 If this variable is @code{best}, Gnus will make the next newsgroup the
2371 one with the best level.
2372
2373 @vindex gnus-group-default-list-level
2374 All groups with a level less than or equal to
2375 @code{gnus-group-default-list-level} will be listed in the group buffer
2376 by default.
2377
2378 @vindex gnus-group-list-inactive-groups
2379 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2380 groups will be listed along with the unread groups.  This variable is
2381 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2382 listed.
2383
2384 @vindex gnus-group-use-permanent-levels
2385 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2386 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2387 use this level as the ``work'' level.
2388
2389 @vindex gnus-activate-level
2390 Gnus will normally just activate (i. e., query the server about) groups
2391 on level @code{gnus-activate-level} or less.  If you don't want to
2392 activate unsubscribed groups, for instance, you might set this variable
2393 to 5.  The default is 6.
2394
2395
2396 @node Group Score
2397 @section Group Score
2398 @cindex group score
2399 @cindex group rank
2400 @cindex rank
2401
2402 You would normally keep important groups on high levels, but that scheme
2403 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2404 group buffer according to how often you read groups, perhaps?  Within
2405 reason?
2406
2407 This is what @dfn{group score} is for.  You can have Gnus assign a score
2408 to each group through the mechanism described below.  You can then sort
2409 the group buffer based on this score.  Alternatively, you can sort on
2410 score and then level.  (Taken together, the level and the score is
2411 called the @dfn{rank} of the group.  A group that is on level 4 and has
2412 a score of 1 has a higher rank than a group on level 5 that has a score
2413 of 300.  (The level is the most significant part and the score is the
2414 least significant part.))
2415
2416 @findex gnus-summary-bubble-group
2417 If you want groups you read often to get higher scores than groups you
2418 read seldom you can add the @code{gnus-summary-bubble-group} function to
2419 the @code{gnus-summary-exit-hook} hook.  This will result (after
2420 sorting) in a bubbling sort of action.  If you want to see that in
2421 action after each summary exit, you can add
2422 @code{gnus-group-sort-groups-by-rank} or
2423 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2424 slow things down somewhat.
2425
2426
2427 @node Marking Groups
2428 @section Marking Groups
2429 @cindex marking groups
2430
2431 If you want to perform some command on several groups, and they appear
2432 subsequently in the group buffer, you would normally just give a
2433 numerical prefix to the command.  Most group commands will then do your
2434 bidding on those groups.
2435
2436 However, if the groups are not in sequential order, you can still
2437 perform a command on several groups.  You simply mark the groups first
2438 with the process mark and then execute the command.
2439
2440 @table @kbd
2441
2442 @item #
2443 @kindex # (Group)
2444 @itemx M m
2445 @kindex M m (Group)
2446 @findex gnus-group-mark-group
2447 Set the mark on the current group (@code{gnus-group-mark-group}).
2448
2449 @item M-#
2450 @kindex M-# (Group)
2451 @itemx M u
2452 @kindex M u (Group)
2453 @findex gnus-group-unmark-group
2454 Remove the mark from the current group
2455 (@code{gnus-group-unmark-group}).
2456
2457 @item M U
2458 @kindex M U (Group)
2459 @findex gnus-group-unmark-all-groups
2460 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2461
2462 @item M w
2463 @kindex M w (Group)
2464 @findex gnus-group-mark-region
2465 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2466
2467 @item M b
2468 @kindex M b (Group)
2469 @findex gnus-group-mark-buffer
2470 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2471
2472 @item M r
2473 @kindex M r (Group)
2474 @findex gnus-group-mark-regexp
2475 Mark all groups that match some regular expression
2476 (@code{gnus-group-mark-regexp}).
2477 @end table
2478
2479 Also @pxref{Process/Prefix}.
2480
2481 @findex gnus-group-universal-argument
2482 If you want to execute some command on all groups that have been marked
2483 with the process mark, you can use the @kbd{M-&}
2484 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2485 the command to be executed.
2486
2487
2488 @node Foreign Groups
2489 @section Foreign Groups
2490 @cindex foreign groups
2491
2492 Below are some group mode commands for making and editing general foreign
2493 groups, as well as commands to ease the creation of a few
2494 special-purpose groups.  All these commands insert the newly created
2495 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2496 consulted.
2497
2498 @table @kbd
2499
2500 @item G m
2501 @kindex G m (Group)
2502 @findex gnus-group-make-group
2503 @cindex making groups
2504 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2505 for a name, a method and possibly an @dfn{address}.  For an easier way
2506 to subscribe to @acronym{NNTP} groups, @pxref{Browse Foreign Server}.
2507
2508 @item G r
2509 @kindex G r (Group)
2510 @findex gnus-group-rename-group
2511 @cindex renaming groups
2512 Rename the current group to something else
2513 (@code{gnus-group-rename-group}).  This is valid only on some
2514 groups---mail groups mostly.  This command might very well be quite slow
2515 on some back ends.
2516
2517 @item G c
2518 @kindex G c (Group)
2519 @cindex customizing
2520 @findex gnus-group-customize
2521 Customize the group parameters (@code{gnus-group-customize}).
2522
2523 @item G e
2524 @kindex G e (Group)
2525 @findex gnus-group-edit-group-method
2526 @cindex renaming groups
2527 Enter a buffer where you can edit the select method of the current
2528 group (@code{gnus-group-edit-group-method}).
2529
2530 @item G p
2531 @kindex G p (Group)
2532 @findex gnus-group-edit-group-parameters
2533 Enter a buffer where you can edit the group parameters
2534 (@code{gnus-group-edit-group-parameters}).
2535
2536 @item G E
2537 @kindex G E (Group)
2538 @findex gnus-group-edit-group
2539 Enter a buffer where you can edit the group info
2540 (@code{gnus-group-edit-group}).
2541
2542 @item G d
2543 @kindex G d (Group)
2544 @findex gnus-group-make-directory-group
2545 @cindex nndir
2546 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2547 for a directory name (@code{gnus-group-make-directory-group}).
2548
2549 @item G h
2550 @kindex G h (Group)
2551 @cindex help group
2552 @findex gnus-group-make-help-group
2553 Make the Gnus help group (@code{gnus-group-make-help-group}).
2554
2555 @item G a
2556 @kindex G a (Group)
2557 @cindex (ding) archive
2558 @cindex archive group
2559 @findex gnus-group-make-archive-group
2560 @vindex gnus-group-archive-directory
2561 @vindex gnus-group-recent-archive-directory
2562 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2563 default a group pointing to the most recent articles will be created
2564 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2565 group will be created from @code{gnus-group-archive-directory}.
2566
2567 @item G k
2568 @kindex G k (Group)
2569 @findex gnus-group-make-kiboze-group
2570 @cindex nnkiboze
2571 Make a kiboze group.  You will be prompted for a name, for a regexp to
2572 match groups to be ``included'' in the kiboze group, and a series of
2573 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2574 @xref{Kibozed Groups}.
2575
2576 @item G D
2577 @kindex G D (Group)
2578 @findex gnus-group-enter-directory
2579 @cindex nneething
2580 Read an arbitrary directory as if it were a newsgroup with the
2581 @code{nneething} back end (@code{gnus-group-enter-directory}).
2582 @xref{Anything Groups}.
2583
2584 @item G f
2585 @kindex G f (Group)
2586 @findex gnus-group-make-doc-group
2587 @cindex ClariNet Briefs
2588 @cindex nndoc
2589 Make a group based on some file or other
2590 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2591 command, you will be prompted for a file name and a file type.
2592 Currently supported types are @code{mbox}, @code{babyl},
2593 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2594 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2595 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2596 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2597 you run this command without a prefix, Gnus will guess at the file
2598 type.  @xref{Document Groups}.
2599
2600 @item G u
2601 @kindex G u (Group)
2602 @vindex gnus-useful-groups
2603 @findex gnus-group-make-useful-group
2604 Create one of the groups mentioned in @code{gnus-useful-groups}
2605 (@code{gnus-group-make-useful-group}).
2606
2607 @item G w
2608 @kindex G w (Group)
2609 @findex gnus-group-make-web-group
2610 @cindex Google
2611 @cindex nnweb
2612 @cindex gmane
2613 Make an ephemeral group based on a web search
2614 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2615 command, make a solid group instead.  You will be prompted for the
2616 search engine type and the search string.  Valid search engine types
2617 include @code{google}, @code{dejanews}, and @code{gmane}.
2618 @xref{Web Searches}.
2619
2620 If you use the @code{google} search engine, you can limit the search
2621 to a particular group by using a match string like
2622 @samp{shaving group:alt.sysadmin.recovery}.
2623
2624 @item G DEL
2625 @kindex G DEL (Group)
2626 @findex gnus-group-delete-group
2627 This function will delete the current group
2628 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2629 actually delete all the articles in the group, and forcibly remove the
2630 group itself from the face of the Earth.  Use a prefix only if you are
2631 absolutely sure of what you are doing.  This command can't be used on
2632 read-only groups (like @code{nntp} group), though.
2633
2634 @item G V
2635 @kindex G V (Group)
2636 @findex gnus-group-make-empty-virtual
2637 Make a new, fresh, empty @code{nnvirtual} group
2638 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2639
2640 @item G v
2641 @kindex G v (Group)
2642 @findex gnus-group-add-to-virtual
2643 Add the current group to an @code{nnvirtual} group
2644 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2645 @end table
2646
2647 @xref{Select Methods}, for more information on the various select
2648 methods.
2649
2650 @vindex gnus-activate-foreign-newsgroups
2651 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2652 Gnus will check all foreign groups with this level or lower at startup.
2653 This might take quite a while, especially if you subscribe to lots of
2654 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2655 @code{gnus-activate-level} also affects activation of foreign
2656 newsgroups.
2657
2658
2659 @node Group Parameters
2660 @section Group Parameters
2661 @cindex group parameters
2662
2663 The group parameters store information local to a particular group.
2664 Here's an example group parameter list:
2665
2666 @example
2667 ((to-address . "ding@@gnus.org")
2668  (auto-expire . t))
2669 @end example
2670
2671 We see that each element consists of a ``dotted pair''---the thing before
2672 the dot is the key, while the thing after the dot is the value.  All the
2673 parameters have this form @emph{except} local variable specs, which are
2674 not dotted pairs, but proper lists.
2675
2676 Some parameters have correspondent customizable variables, each of which
2677 is an alist of regexps and values.
2678
2679 The following group parameters can be used:
2680
2681 @table @code
2682 @item to-address
2683 @cindex to-address
2684 Address used by when doing followups and new posts.
2685
2686 @example
2687 (to-address . "some@@where.com")
2688 @end example
2689
2690 This is primarily useful in mail groups that represent closed mailing
2691 lists---mailing lists where it's expected that everybody that writes to
2692 the mailing list is subscribed to it.  Since using this parameter
2693 ensures that the mail only goes to the mailing list itself, it means
2694 that members won't receive two copies of your followups.
2695
2696 Using @code{to-address} will actually work whether the group is foreign
2697 or not.  Let's say there's a group on the server that is called
2698 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2699 the articles from a mail-to-news gateway.  Posting directly to this
2700 group is therefore impossible---you have to send mail to the mailing
2701 list address instead.
2702
2703 See also @code{gnus-parameter-to-address-alist}.
2704
2705 @item to-list
2706 @cindex to-list
2707 Address used when doing @kbd{a} in that group.
2708
2709 @example
2710 (to-list . "some@@where.com")
2711 @end example
2712
2713 It is totally ignored
2714 when doing a followup---except that if it is present in a news group,
2715 you'll get mail group semantics when doing @kbd{f}.
2716
2717 If you do an @kbd{a} command in a mail group and you have neither a
2718 @code{to-list} group parameter nor a @code{to-address} group parameter,
2719 then a @code{to-list} group parameter will be added automatically upon
2720 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2721 @vindex gnus-add-to-list
2722
2723 If you do an @kbd{a} command in a mail group and you don't have a
2724 @code{to-list} group parameter, one will be added automatically upon
2725 sending the message.
2726
2727 @findex gnus-mailing-list-mode
2728 @cindex mail list groups
2729 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2730 entering summary buffer.
2731
2732 See also @code{gnus-parameter-to-list-alist}.
2733
2734 @anchor{subscribed}
2735 @item subscribed
2736 @cindex subscribed
2737 If this parameter is set to @code{t}, Gnus will consider the
2738 to-address and to-list parameters for this group as addresses of
2739 mailing lists you are subscribed to.  Giving Gnus this information is
2740 (only) a first step in getting it to generate correct Mail-Followup-To
2741 headers for your posts to these lists.  Look here @pxref{Mailing
2742 Lists, , Mailing Lists, message, The Message Manual} for a complete
2743 treatment of available MFT support.
2744
2745 See also @code{gnus-find-subscribed-addresses}, the function that
2746 directly uses this group parameter.
2747
2748 @item visible
2749 @cindex visible
2750 If the group parameter list has the element @code{(visible . t)},
2751 that group will always be visible in the Group buffer, regardless
2752 of whether it has any unread articles.
2753
2754 @item broken-reply-to
2755 @cindex broken-reply-to
2756 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2757 headers in this group are to be ignored, and for the header to be hidden
2758 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2759 can be useful if you're reading a mailing list group where the listserv
2760 has inserted @code{Reply-To} headers that point back to the listserv
2761 itself.  That is broken behavior.  So there!
2762
2763 @item to-group
2764 @cindex to-group
2765 Elements like @code{(to-group . "some.group.name")} means that all
2766 posts in that group will be sent to @code{some.group.name}.
2767
2768 @item newsgroup
2769 @cindex newsgroup
2770 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2771 will treat all responses as if they were responses to news articles.
2772 This can be useful if you have a mail group that's really a mirror of a
2773 news group.
2774
2775 @item gcc-self
2776 @cindex gcc-self
2777 If @code{(gcc-self . t)} is present in the group parameter list, newly
2778 composed messages will be @code{Gcc}'d to the current group.  If
2779 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2780 generated, if @code{(gcc-self . "string")} is present, this string will
2781 be inserted literally as a @code{gcc} header.  This parameter takes
2782 precedence over any default @code{Gcc} rules as described later
2783 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2784 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2785 a @code{nntp} server doesn't accept articles.
2786
2787 @item auto-expire
2788 @cindex auto-expire
2789 If the group parameter has an element that looks like @code{(auto-expire
2790 . t)}, all articles read will be marked as expirable.  For an
2791 alternative approach, @pxref{Expiring Mail}.
2792
2793 See also @code{gnus-auto-expirable-newsgroups}.
2794
2795 @item total-expire
2796 @cindex total-expire
2797 If the group parameter has an element that looks like
2798 @code{(total-expire . t)}, all read articles will be put through the
2799 expiry process, even if they are not marked as expirable.  Use with
2800 caution.  Unread, ticked and dormant articles are not eligible for
2801 expiry.
2802
2803 See also @code{gnus-total-expirable-newsgroups}.
2804
2805 @item expiry-wait
2806 @cindex expiry-wait
2807 @vindex nnmail-expiry-wait-function
2808 If the group parameter has an element that looks like
2809 @code{(expiry-wait . 10)}, this value will override any
2810 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2811 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2812 can either be a number of days (not necessarily an integer) or the
2813 symbols @code{never} or @code{immediate}.
2814
2815 @item score-file
2816 @cindex score file group parameter
2817 Elements that look like @code{(score-file . "file")} will make
2818 @file{file} into the current score file for the group in question.  All
2819 interactive score entries will be put into this file.
2820
2821 @item adapt-file
2822 @cindex adapt file group parameter
2823 Elements that look like @code{(adapt-file . "file")} will make
2824 @file{file} into the current adaptive file for the group in question.
2825 All adaptive score entries will be put into this file.
2826
2827 @item admin-address
2828 @cindex admin-address
2829 When unsubscribing from a mailing list you should never send the
2830 unsubscription notice to the mailing list itself.  Instead, you'd send
2831 messages to the administrative address.  This parameter allows you to
2832 put the admin address somewhere convenient.
2833
2834 @item display
2835 @cindex display
2836 Elements that look like @code{(display . MODE)} say which articles to
2837 display on entering the group.  Valid values are:
2838
2839 @table @code
2840 @item all
2841 Display all articles, both read and unread.
2842
2843 @item an integer
2844 Display the last @var{integer} articles in the group.  This is the same as
2845 entering the group with @kbd{C-u @var{integer}}.
2846
2847 @item default
2848 Display the default visible articles, which normally includes unread and
2849 ticked articles.
2850
2851 @item an array
2852 Display articles that satisfy a predicate.
2853
2854 Here are some examples:
2855
2856 @table @code
2857 @item [unread]
2858 Display only unread articles.
2859
2860 @item [not expire]
2861 Display everything except expirable articles.
2862
2863 @item [and (not reply) (not expire)]
2864 Display everything except expirable and articles you've already
2865 responded to.
2866 @end table
2867
2868 The available operators are @code{not}, @code{and} and @code{or}.
2869 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2870 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2871 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2872 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2873
2874 @end table
2875
2876 The @code{display} parameter works by limiting the summary buffer to
2877 the subset specified.  You can pop the limit by using the @kbd{/ w}
2878 command (@pxref{Limiting}).
2879
2880 @item comment
2881 @cindex comment
2882 Elements that look like @code{(comment . "This is a comment")} are
2883 arbitrary comments on the group.  You can display comments in the
2884 group line (@pxref{Group Line Specification}).
2885
2886 @item charset
2887 @cindex charset
2888 Elements that look like @code{(charset . iso-8859-1)} will make
2889 @code{iso-8859-1} the default charset; that is, the charset that will be
2890 used for all articles that do not specify a charset.
2891
2892 See also @code{gnus-group-charset-alist}.
2893
2894 @item ignored-charsets
2895 @cindex ignored-charset
2896 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2897 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2898 default charset will be used for decoding articles.
2899
2900 See also @code{gnus-group-ignored-charsets-alist}.
2901
2902 @item posting-style
2903 @cindex posting-style
2904 You can store additional posting style information for this group
2905 here (@pxref{Posting Styles}).  The format is that of an entry in the
2906 @code{gnus-posting-styles} alist, except that there's no regexp matching
2907 the group name (of course).  Style elements in this group parameter will
2908 take precedence over the ones found in @code{gnus-posting-styles}.
2909
2910 For instance, if you want a funky name and signature in this group only,
2911 instead of hacking @code{gnus-posting-styles}, you could put something
2912 like this in the group parameters:
2913
2914 @example
2915 (posting-style
2916   (name "Funky Name")
2917   ("X-My-Header" "Funky Value")
2918   (signature "Funky Signature"))
2919 @end example
2920
2921 @item post-method
2922 @cindex post-method
2923 If it is set, the value is used as the method for posting message
2924 instead of @code{gnus-post-method}.
2925
2926 @item banner
2927 @cindex banner
2928 An item like @code{(banner . @var{regexp})} causes any part of an article
2929 that matches the regular expression @var{regexp} to be stripped. Instead of
2930 @var{regexp}, you can also use the symbol @code{signature} which strips the
2931 last signature or any of the elements of the alist
2932 @code{gnus-article-banner-alist}.
2933
2934 @item sieve
2935 @cindex sieve
2936 This parameter contains a Sieve test that should match incoming mail
2937 that should be placed in this group.  From this group parameter, a
2938 Sieve @samp{IF} control structure is generated, having the test as the
2939 condition and @samp{fileinto "group.name";} as the body.
2940
2941 For example, if the INBOX.list.sieve group has the @code{(sieve
2942 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2943 translating the group parameter into a Sieve script (@pxref{Sieve
2944 Commands}) the following Sieve code is generated:
2945
2946 @example
2947 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2948         fileinto \"INBOX.list.sieve\";
2949 @}
2950 @end example
2951
2952 The Sieve language is described in RFC 3028. @xref{Top, , Top, sieve,
2953 Emacs Sieve}.
2954
2955 @item (@var{variable} @var{form})
2956 You can use the group parameters to set variables local to the group you
2957 are entering.  If you want to turn threading off in @samp{news.answers},
2958 you could put @code{(gnus-show-threads nil)} in the group parameters of
2959 that group.  @code{gnus-show-threads} will be made into a local variable
2960 in the summary buffer you enter, and the form @code{nil} will be
2961 @code{eval}ed there.
2962
2963 Note that this feature sets the variable locally to the summary buffer.
2964 But some variables are evaluated in the article buffer, or in the
2965 message buffer (of a reply or followup or otherwise newly created
2966 message).  As a workaround, it might help to add the variable in
2967 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2968 Stuff}.  So if you want to set @code{message-from-style} via the group
2969 parameters, then you may need the following statement elsewhere in your
2970 @file{~/.gnus} file:
2971 @lisp
2972 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2973 @end lisp
2974
2975 @vindex gnus-list-identifiers
2976 A use for this feature is to remove a mailing list identifier tag in
2977 the subject fields of articles.   E.g. if the news group
2978 @example
2979 nntp+news.gnus.org:gmane.text.docbook.apps
2980 @end example
2981 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2982 tag can be removed from the article subjects in the summary buffer for
2983 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2984 into the group parameters for the group.
2985
2986 This can also be used as a group-specific hook function, if you'd like.
2987 If you want to hear a beep when you enter a group, you could put
2988 something like @code{(dummy-variable (ding))} in the parameters of that
2989 group.  @code{dummy-variable} will be set to the result of the
2990 @code{(ding)} form, but who cares?
2991
2992 @end table
2993
2994 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2995 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2996 presents you with a Customize-like interface.  The latter helps avoid
2997 silly Lisp errors.)  You might also be interested in reading about topic
2998 parameters (@pxref{Topic Parameters}).
2999
3000 @vindex gnus-parameters
3001 Group parameters can be set via the @code{gnus-parameters} variable too.
3002 But some variables, such as @code{visible}, have no effect.  For
3003 example:
3004
3005 @lisp
3006 (setq gnus-parameters
3007       '(("mail\\..*"
3008          (gnus-show-threads nil)
3009          (gnus-use-scoring nil)
3010          (gnus-summary-line-format
3011           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3012          (gcc-self . t)
3013          (display . all))
3014
3015         ("^nnimap:\\(foo.bar\\)$"
3016          (to-group . "\\1"))
3017
3018         ("mail\\.me"
3019          (gnus-use-scoring  t))
3020
3021         ("list\\..*"
3022          (total-expire . t)
3023          (broken-reply-to . t))))
3024 @end lisp
3025
3026 String value of parameters will be subjected to regexp substitution, as
3027 the @code{to-group} example shows.
3028
3029
3030 @node Listing Groups
3031 @section Listing Groups
3032 @cindex group listing
3033
3034 These commands all list various slices of the groups available.
3035
3036 @table @kbd
3037
3038 @item l
3039 @itemx A s
3040 @kindex A s (Group)
3041 @kindex l (Group)
3042 @findex gnus-group-list-groups
3043 List all groups that have unread articles
3044 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3045 command will list only groups of level ARG and lower.  By default, it
3046 only lists groups of level five (i.e.,
3047 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3048 groups).
3049
3050 @item L
3051 @itemx A u
3052 @kindex A u (Group)
3053 @kindex L (Group)
3054 @findex gnus-group-list-all-groups
3055 List all groups, whether they have unread articles or not
3056 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3057 this command will list only groups of level ARG and lower.  By default,
3058 it lists groups of level seven or lower (i.e., just subscribed and
3059 unsubscribed groups).
3060
3061 @item A l
3062 @kindex A l (Group)
3063 @findex gnus-group-list-level
3064 List all unread groups on a specific level
3065 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3066 with no unread articles.
3067
3068 @item A k
3069 @kindex A k (Group)
3070 @findex gnus-group-list-killed
3071 List all killed groups (@code{gnus-group-list-killed}).  If given a
3072 prefix argument, really list all groups that are available, but aren't
3073 currently (un)subscribed.  This could entail reading the active file
3074 from the server.
3075
3076 @item A z
3077 @kindex A z (Group)
3078 @findex gnus-group-list-zombies
3079 List all zombie groups (@code{gnus-group-list-zombies}).
3080
3081 @item A m
3082 @kindex A m (Group)
3083 @findex gnus-group-list-matching
3084 List all unread, subscribed groups with names that match a regexp
3085 (@code{gnus-group-list-matching}).
3086
3087 @item A M
3088 @kindex A M (Group)
3089 @findex gnus-group-list-all-matching
3090 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3091
3092 @item A A
3093 @kindex A A (Group)
3094 @findex gnus-group-list-active
3095 List absolutely all groups in the active file(s) of the
3096 server(s) you are connected to (@code{gnus-group-list-active}).  This
3097 might very well take quite a while.  It might actually be a better idea
3098 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3099 thing to match on.  Also note that this command may list groups that
3100 don't exist (yet)---these will be listed as if they were killed groups.
3101 Take the output with some grains of salt.
3102
3103 @item A a
3104 @kindex A a (Group)
3105 @findex gnus-group-apropos
3106 List all groups that have names that match a regexp
3107 (@code{gnus-group-apropos}).
3108
3109 @item A d
3110 @kindex A d (Group)
3111 @findex gnus-group-description-apropos
3112 List all groups that have names or descriptions that match a regexp
3113 (@code{gnus-group-description-apropos}).
3114
3115 @item A c
3116 @kindex A c (Group)
3117 @findex gnus-group-list-cached
3118 List all groups with cached articles (@code{gnus-group-list-cached}).
3119
3120 @item A ?
3121 @kindex A ? (Group)
3122 @findex gnus-group-list-dormant
3123 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3124
3125 @item A /
3126 @kindex A / (Group)
3127 @findex gnus-group-list-limit
3128 List groups limited within the current selection
3129 (@code{gnus-group-list-limit}).
3130
3131 @item A f
3132 @kindex A f (Group)
3133 @findex gnus-group-list-flush
3134 Flush groups from the current selection (@code{gnus-group-list-flush}).
3135
3136 @item A p
3137 @kindex A p (Group)
3138 @findex gnus-group-list-plus
3139 List groups plus the current selection (@code{gnus-group-list-plus}).
3140
3141 @end table
3142
3143 @vindex gnus-permanently-visible-groups
3144 @cindex visible group parameter
3145 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3146 always be shown, whether they have unread articles or not.  You can also
3147 add the @code{visible} element to the group parameters in question to
3148 get the same effect.
3149
3150 @vindex gnus-list-groups-with-ticked-articles
3151 Groups that have just ticked articles in it are normally listed in the
3152 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3153 @code{nil}, these groups will be treated just like totally empty
3154 groups.  It is @code{t} by default.
3155
3156
3157 @node Sorting Groups
3158 @section Sorting Groups
3159 @cindex sorting groups
3160
3161 @kindex C-c C-s (Group)
3162 @findex gnus-group-sort-groups
3163 @vindex gnus-group-sort-function
3164 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3165 group buffer according to the function(s) given by the
3166 @code{gnus-group-sort-function} variable.  Available sorting functions
3167 include:
3168
3169 @table @code
3170
3171 @item gnus-group-sort-by-alphabet
3172 @findex gnus-group-sort-by-alphabet
3173 Sort the group names alphabetically.  This is the default.
3174
3175 @item gnus-group-sort-by-real-name
3176 @findex gnus-group-sort-by-real-name
3177 Sort the group alphabetically on the real (unprefixed) group names.
3178
3179 @item gnus-group-sort-by-level
3180 @findex gnus-group-sort-by-level
3181 Sort by group level.
3182
3183 @item gnus-group-sort-by-score
3184 @findex gnus-group-sort-by-score
3185 Sort by group score.  @xref{Group Score}.
3186
3187 @item gnus-group-sort-by-rank
3188 @findex gnus-group-sort-by-rank
3189 Sort by group score and then the group level.  The level and the score
3190 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3191
3192 @item gnus-group-sort-by-unread
3193 @findex gnus-group-sort-by-unread
3194 Sort by number of unread articles.
3195
3196 @item gnus-group-sort-by-method
3197 @findex gnus-group-sort-by-method
3198 Sort alphabetically on the select method.
3199
3200 @item gnus-group-sort-by-server
3201 @findex gnus-group-sort-by-server
3202 Sort alphabetically on the Gnus server name.
3203
3204
3205 @end table
3206
3207 @code{gnus-group-sort-function} can also be a list of sorting
3208 functions.  In that case, the most significant sort key function must be
3209 the last one.
3210
3211
3212 There are also a number of commands for sorting directly according to
3213 some sorting criteria:
3214
3215 @table @kbd
3216 @item G S a
3217 @kindex G S a (Group)
3218 @findex gnus-group-sort-groups-by-alphabet
3219 Sort the group buffer alphabetically by group name
3220 (@code{gnus-group-sort-groups-by-alphabet}).
3221
3222 @item G S u
3223 @kindex G S u (Group)
3224 @findex gnus-group-sort-groups-by-unread
3225 Sort the group buffer by the number of unread articles
3226 (@code{gnus-group-sort-groups-by-unread}).
3227
3228 @item G S l
3229 @kindex G S l (Group)
3230 @findex gnus-group-sort-groups-by-level
3231 Sort the group buffer by group level
3232 (@code{gnus-group-sort-groups-by-level}).
3233
3234 @item G S v
3235 @kindex G S v (Group)
3236 @findex gnus-group-sort-groups-by-score
3237 Sort the group buffer by group score
3238 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3239
3240 @item G S r
3241 @kindex G S r (Group)
3242 @findex gnus-group-sort-groups-by-rank
3243 Sort the group buffer by group rank
3244 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3245
3246 @item G S m
3247 @kindex G S m (Group)
3248 @findex gnus-group-sort-groups-by-method
3249 Sort the group buffer alphabetically by back end name@*
3250 (@code{gnus-group-sort-groups-by-method}).
3251
3252 @item G S n
3253 @kindex G S n (Group)
3254 @findex gnus-group-sort-groups-by-real-name
3255 Sort the group buffer alphabetically by real (unprefixed) group name
3256 (@code{gnus-group-sort-groups-by-real-name}).
3257
3258 @end table
3259
3260 All the commands below obey the process/prefix convention
3261 (@pxref{Process/Prefix}).
3262
3263 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3264 commands will sort in reverse order.
3265
3266 You can also sort a subset of the groups:
3267
3268 @table @kbd
3269 @item G P a
3270 @kindex G P a (Group)
3271 @findex gnus-group-sort-selected-groups-by-alphabet
3272 Sort the groups alphabetically by group name
3273 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3274
3275 @item G P u
3276 @kindex G P u (Group)
3277 @findex gnus-group-sort-selected-groups-by-unread
3278 Sort the groups by the number of unread articles
3279 (@code{gnus-group-sort-selected-groups-by-unread}).
3280
3281 @item G P l
3282 @kindex G P l (Group)
3283 @findex gnus-group-sort-selected-groups-by-level
3284 Sort the groups by group level
3285 (@code{gnus-group-sort-selected-groups-by-level}).
3286
3287 @item G P v
3288 @kindex G P v (Group)
3289 @findex gnus-group-sort-selected-groups-by-score
3290 Sort the groups by group score
3291 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3292
3293 @item G P r
3294 @kindex G P r (Group)
3295 @findex gnus-group-sort-selected-groups-by-rank
3296 Sort the groups by group rank
3297 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3298
3299 @item G P m
3300 @kindex G P m (Group)
3301 @findex gnus-group-sort-selected-groups-by-method
3302 Sort the groups alphabetically by back end name@*
3303 (@code{gnus-group-sort-selected-groups-by-method}).
3304
3305 @item G P n
3306 @kindex G P n (Group)
3307 @findex gnus-group-sort-selected-groups-by-real-name
3308 Sort the groups alphabetically by real (unprefixed) group name
3309 (@code{gnus-group-sort-selected-groups-by-real-name}).
3310
3311 @item G P s
3312 @kindex G P s (Group)
3313 @findex gnus-group-sort-selected-groups
3314 Sort the groups according to @code{gnus-group-sort-function}.
3315
3316 @end table
3317
3318 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3319 move groups around.
3320
3321
3322 @node Group Maintenance
3323 @section Group Maintenance
3324 @cindex bogus groups
3325
3326 @table @kbd
3327 @item b
3328 @kindex b (Group)
3329 @findex gnus-group-check-bogus-groups
3330 Find bogus groups and delete them
3331 (@code{gnus-group-check-bogus-groups}).
3332
3333 @item F
3334 @kindex F (Group)
3335 @findex gnus-group-find-new-groups
3336 Find new groups and process them (@code{gnus-group-find-new-groups}).
3337 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3338 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3339 to query the server for new groups, and subscribe the new groups as
3340 zombies.
3341
3342 @item C-c C-x
3343 @kindex C-c C-x (Group)
3344 @findex gnus-group-expire-articles
3345 Run all expirable articles in the current group through the expiry
3346 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3347 all expirable articles in the group that have been around for a while.
3348 (@pxref{Expiring Mail}).
3349
3350 @item C-c C-M-x
3351 @kindex C-c C-M-x (Group)
3352 @findex gnus-group-expire-all-groups
3353 Run all expirable articles in all groups through the expiry process
3354 (@code{gnus-group-expire-all-groups}).
3355
3356 @end table
3357
3358
3359 @node Browse Foreign Server
3360 @section Browse Foreign Server
3361 @cindex foreign servers
3362 @cindex browsing servers
3363
3364 @table @kbd
3365 @item B
3366 @kindex B (Group)
3367 @findex gnus-group-browse-foreign-server
3368 You will be queried for a select method and a server name.  Gnus will
3369 then attempt to contact this server and let you browse the groups there
3370 (@code{gnus-group-browse-foreign-server}).
3371 @end table
3372
3373 @findex gnus-browse-mode
3374 A new buffer with a list of available groups will appear.  This buffer
3375 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3376 a lot) like a normal group buffer.
3377
3378 Here's a list of keystrokes available in the browse mode:
3379
3380 @table @kbd
3381 @item n
3382 @kindex n (Browse)
3383 @findex gnus-group-next-group
3384 Go to the next group (@code{gnus-group-next-group}).
3385
3386 @item p
3387 @kindex p (Browse)
3388 @findex gnus-group-prev-group
3389 Go to the previous group (@code{gnus-group-prev-group}).
3390
3391 @item SPACE
3392 @kindex SPACE (Browse)
3393 @findex gnus-browse-read-group
3394 Enter the current group and display the first article
3395 (@code{gnus-browse-read-group}).
3396
3397 @item RET
3398 @kindex RET (Browse)
3399 @findex gnus-browse-select-group
3400 Enter the current group (@code{gnus-browse-select-group}).
3401
3402 @item u
3403 @kindex u (Browse)
3404 @findex gnus-browse-unsubscribe-current-group
3405 Unsubscribe to the current group, or, as will be the case here,
3406 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3407
3408 @item l
3409 @itemx q
3410 @kindex q (Browse)
3411 @kindex l (Browse)
3412 @findex gnus-browse-exit
3413 Exit browse mode (@code{gnus-browse-exit}).
3414
3415 @item d
3416 @kindex d (Browse)
3417 @findex gnus-browse-describe-group
3418 Describe the current group (@code{gnus-browse-describe-group}).
3419
3420 @item ?
3421 @kindex ? (Browse)
3422 @findex gnus-browse-describe-briefly
3423 Describe browse mode briefly (well, there's not much to describe, is
3424 there) (@code{gnus-browse-describe-briefly}).
3425 @end table
3426
3427
3428 @node Exiting Gnus
3429 @section Exiting Gnus
3430 @cindex exiting Gnus
3431
3432 Yes, Gnus is ex(c)iting.
3433
3434 @table @kbd
3435 @item z
3436 @kindex z (Group)
3437 @findex gnus-group-suspend
3438 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3439 but it kills all buffers except the Group buffer.  I'm not sure why this
3440 is a gain, but then who am I to judge?
3441
3442 @item q
3443 @kindex q (Group)
3444 @findex gnus-group-exit
3445 @c @icon{gnus-group-exit}
3446 Quit Gnus (@code{gnus-group-exit}).
3447
3448 @item Q
3449 @kindex Q (Group)
3450 @findex gnus-group-quit
3451 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3452 The dribble file will be saved, though (@pxref{Auto Save}).
3453 @end table
3454
3455 @vindex gnus-exit-gnus-hook
3456 @vindex gnus-suspend-gnus-hook
3457 @vindex gnus-after-exiting-gnus-hook
3458 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3459 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3460 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3461 exiting Gnus.
3462
3463 Note:
3464
3465 @quotation
3466 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3467 numbly heavy and herself fall into a hazy trance as the boy sitting
3468 behind her drew repeated lines with his pencil across the back of her
3469 plastic chair.
3470 @end quotation
3471
3472
3473 @node Group Topics
3474 @section Group Topics
3475 @cindex topics
3476
3477 If you read lots and lots of groups, it might be convenient to group
3478 them hierarchically according to topics.  You put your Emacs groups over
3479 here, your sex groups over there, and the rest (what, two groups or so?)
3480 you put in some misc section that you never bother with anyway.  You can
3481 even group the Emacs sex groups as a sub-topic to either the Emacs
3482 groups or the sex groups---or both!  Go wild!
3483
3484 @iftex
3485 @iflatex
3486 \gnusfigure{Group Topics}{400}{
3487 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3488 }
3489 @end iflatex
3490 @end iftex
3491
3492 Here's an example:
3493
3494 @example
3495 Gnus
3496   Emacs -- I wuw it!
3497      3: comp.emacs
3498      2: alt.religion.emacs
3499     Naughty Emacs
3500      452: alt.sex.emacs
3501        0: comp.talk.emacs.recovery
3502   Misc
3503      8: comp.binaries.fractals
3504     13: comp.sources.unix
3505 @end example
3506
3507 @findex gnus-topic-mode
3508 @kindex t (Group)
3509 To get this @emph{fab} functionality you simply turn on (ooh!) the
3510 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3511 is a toggling command.)
3512
3513 Go ahead, just try it.  I'll still be here when you get back.  La de
3514 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3515 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3516 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3517 Hot and bothered?
3518
3519 If you want this permanently enabled, you should add that minor mode to
3520 the hook for the group mode.  Put the following line in your
3521 @file{~/.gnus.el} file:
3522
3523 @lisp
3524 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3525 @end lisp
3526
3527 @menu
3528 * Topic Commands::              Interactive E-Z commands.
3529 * Topic Variables::             How to customize the topics the Lisp Way.
3530 * Topic Sorting::               Sorting each topic individually.
3531 * Topic Topology::              A map of the world.
3532 * Topic Parameters::            Parameters that apply to all groups in a topic.
3533 @end menu
3534
3535
3536 @node Topic Commands
3537 @subsection Topic Commands
3538 @cindex topic commands
3539
3540 When the topic minor mode is turned on, a new @kbd{T} submap will be
3541 available.  In addition, a few of the standard keys change their
3542 definitions slightly.
3543
3544 In general, the following kinds of operations are possible on topics.
3545 First of all, you want to create topics.  Secondly, you want to put
3546 groups in topics and to move them around until you have an order you
3547 like.  The third kind of operation is to show/hide parts of the whole
3548 shebang.  You might want to hide a topic including its subtopics and
3549 groups, to get a better overview of the other groups.
3550
3551 Here is a list of the basic keys that you might need to set up topics
3552 the way you like.
3553
3554 @table @kbd
3555
3556 @item T n
3557 @kindex T n (Topic)
3558 @findex gnus-topic-create-topic
3559 Prompt for a new topic name and create it
3560 (@code{gnus-topic-create-topic}).
3561
3562 @item T TAB
3563 @itemx TAB
3564 @kindex T TAB (Topic)
3565 @kindex TAB (Topic)
3566 @findex gnus-topic-indent
3567 ``Indent'' the current topic so that it becomes a sub-topic of the
3568 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3569 ``un-indent'' the topic instead.
3570
3571 @item M-TAB
3572 @kindex M-TAB (Topic)
3573 @findex gnus-topic-unindent
3574 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3575 parent of its current parent (@code{gnus-topic-unindent}).
3576
3577 @end table
3578
3579 The following two keys can be used to move groups and topics around.
3580 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3581 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3582 kill and yank rather than cut and paste.
3583
3584 @table @kbd
3585
3586 @item C-k
3587 @kindex C-k (Topic)
3588 @findex gnus-topic-kill-group
3589 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3590 topic will be removed along with the topic.
3591
3592 @item C-y
3593 @kindex C-y (Topic)
3594 @findex gnus-topic-yank-group
3595 Yank the previously killed group or topic
3596 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3597 before all groups.
3598
3599 So, to move a topic to the beginning of the list of topics, just hit
3600 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3601 move the cursor to the beginning of the buffer (just below the `Gnus'
3602 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3603 paste.  Like I said -- E-Z.
3604
3605 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3606 you can move topics around as well as groups.
3607
3608 @end table
3609
3610 After setting up the topics the way you like them, you might wish to
3611 hide a topic, or to show it again.  That's why we have the following
3612 key.
3613
3614 @table @kbd
3615
3616 @item RET
3617 @kindex RET (Topic)
3618 @findex gnus-topic-select-group
3619 @itemx SPACE
3620 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3621 When you perform this command on a group, you'll enter the group, as
3622 usual.  When done on a topic line, the topic will be folded (if it was
3623 visible) or unfolded (if it was folded already).  So it's basically a
3624 toggling command on topics.  In addition, if you give a numerical
3625 prefix, group on that level (and lower) will be displayed.
3626
3627 @end table
3628
3629 Now for a list of other commands, in no particular order.
3630
3631 @table @kbd
3632
3633 @item T m
3634 @kindex T m (Topic)
3635 @findex gnus-topic-move-group
3636 Move the current group to some other topic
3637 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3638 convention (@pxref{Process/Prefix}).
3639
3640 @item T j
3641 @kindex T j (Topic)
3642 @findex gnus-topic-jump-to-topic
3643 Go to a topic (@code{gnus-topic-jump-to-topic}).
3644
3645 @item T c
3646 @kindex T c (Topic)
3647 @findex gnus-topic-copy-group
3648 Copy the current group to some other topic
3649 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3650 convention (@pxref{Process/Prefix}).
3651
3652 @item T h
3653 @kindex T h (Topic)
3654 @findex gnus-topic-hide-topic
3655 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3656 a prefix, hide the topic permanently.
3657
3658 @item T s
3659 @kindex T s (Topic)
3660 @findex gnus-topic-show-topic
3661 Show the current topic (@code{gnus-topic-show-topic}).  If given
3662 a prefix, show the topic permanently.
3663
3664 @item T D
3665 @kindex T D (Topic)
3666 @findex gnus-topic-remove-group
3667 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3668 This command is mainly useful if you have the same group in several
3669 topics and wish to remove it from one of the topics.  You may also
3670 remove a group from all topics, but in that case, Gnus will add it to
3671 the root topic the next time you start Gnus.  In fact, all new groups
3672 (which, naturally, don't belong to any topic) will show up in the root
3673 topic.
3674
3675 This command uses the process/prefix convention
3676 (@pxref{Process/Prefix}).
3677
3678 @item T M
3679 @kindex T M (Topic)
3680 @findex gnus-topic-move-matching
3681 Move all groups that match some regular expression to a topic
3682 (@code{gnus-topic-move-matching}).
3683
3684 @item T C
3685 @kindex T C (Topic)
3686 @findex gnus-topic-copy-matching
3687 Copy all groups that match some regular expression to a topic
3688 (@code{gnus-topic-copy-matching}).
3689
3690 @item T H
3691 @kindex T H (Topic)
3692 @findex gnus-topic-toggle-display-empty-topics
3693 Toggle hiding empty topics
3694 (@code{gnus-topic-toggle-display-empty-topics}).
3695
3696 @item T #
3697 @kindex T # (Topic)
3698 @findex gnus-topic-mark-topic
3699 Mark all groups in the current topic with the process mark
3700 (@code{gnus-topic-mark-topic}).  This command works recursively on
3701 sub-topics unless given a prefix.
3702
3703 @item T M-#
3704 @kindex T M-# (Topic)
3705 @findex gnus-topic-unmark-topic
3706 Remove the process mark from all groups in the current topic
3707 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3708 sub-topics unless given a prefix.
3709
3710 @item C-c C-x
3711 @kindex C-c C-x (Topic)
3712 @findex gnus-topic-expire-articles
3713 Run all expirable articles in the current group or topic through the
3714 expiry process (if any)
3715 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3716
3717 @item T r
3718 @kindex T r (Topic)
3719 @findex gnus-topic-rename
3720 Rename a topic (@code{gnus-topic-rename}).
3721
3722 @item T DEL
3723 @kindex T DEL (Topic)
3724 @findex gnus-topic-delete
3725 Delete an empty topic (@code{gnus-topic-delete}).
3726
3727 @item A T
3728 @kindex A T (Topic)
3729 @findex gnus-topic-list-active
3730 List all groups that Gnus knows about in a topics-ified way
3731 (@code{gnus-topic-list-active}).
3732
3733 @item T M-n
3734 @kindex T M-n (Topic)
3735 @findex gnus-topic-goto-next-topic
3736 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3737
3738 @item T M-p
3739 @kindex T M-p (Topic)
3740 @findex gnus-topic-goto-previous-topic
3741 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3742
3743 @item G p
3744 @kindex G p (Topic)
3745 @findex gnus-topic-edit-parameters
3746 @cindex group parameters
3747 @cindex topic parameters
3748 @cindex parameters
3749 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3750 @xref{Topic Parameters}.
3751
3752 @end table
3753
3754
3755 @node Topic Variables
3756 @subsection Topic Variables
3757 @cindex topic variables
3758
3759 The previous section told you how to tell Gnus which topics to display.
3760 This section explains how to tell Gnus what to display about each topic.
3761
3762 @vindex gnus-topic-line-format
3763 The topic lines themselves are created according to the
3764 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3765 Valid elements are:
3766
3767 @table @samp
3768 @item i
3769 Indentation.
3770 @item n
3771 Topic name.
3772 @item v
3773 Visibility.
3774 @item l
3775 Level.
3776 @item g
3777 Number of groups in the topic.
3778 @item a
3779 Number of unread articles in the topic.
3780 @item A
3781 Number of unread articles in the topic and all its subtopics.
3782 @end table
3783
3784 @vindex gnus-topic-indent-level
3785 Each sub-topic (and the groups in the sub-topics) will be indented with
3786 @code{gnus-topic-indent-level} times the topic level number of spaces.
3787 The default is 2.
3788
3789 @vindex gnus-topic-mode-hook
3790 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3791
3792 @vindex gnus-topic-display-empty-topics
3793 The @code{gnus-topic-display-empty-topics} says whether to display even
3794 topics that have no unread articles in them.  The default is @code{t}.
3795
3796
3797 @node Topic Sorting
3798 @subsection Topic Sorting
3799 @cindex topic sorting
3800
3801 You can sort the groups in each topic individually with the following
3802 commands:
3803
3804
3805 @table @kbd
3806 @item T S a
3807 @kindex T S a (Topic)
3808 @findex gnus-topic-sort-groups-by-alphabet
3809 Sort the current topic alphabetically by group name
3810 (@code{gnus-topic-sort-groups-by-alphabet}).
3811
3812 @item T S u
3813 @kindex T S u (Topic)
3814 @findex gnus-topic-sort-groups-by-unread
3815 Sort the current topic by the number of unread articles
3816 (@code{gnus-topic-sort-groups-by-unread}).
3817
3818 @item T S l
3819 @kindex T S l (Topic)
3820 @findex gnus-topic-sort-groups-by-level
3821 Sort the current topic by group level
3822 (@code{gnus-topic-sort-groups-by-level}).
3823
3824 @item T S v
3825 @kindex T S v (Topic)
3826 @findex gnus-topic-sort-groups-by-score
3827 Sort the current topic by group score
3828 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3829
3830 @item T S r
3831 @kindex T S r (Topic)
3832 @findex gnus-topic-sort-groups-by-rank
3833 Sort the current topic by group rank
3834 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3835
3836 @item T S m
3837 @kindex T S m (Topic)
3838 @findex gnus-topic-sort-groups-by-method
3839 Sort the current topic alphabetically by back end name
3840 (@code{gnus-topic-sort-groups-by-method}).
3841
3842 @item T S e
3843 @kindex T S e (Topic)
3844 @findex gnus-topic-sort-groups-by-server
3845 Sort the current topic alphabetically by server name
3846 (@code{gnus-topic-sort-groups-by-server}).
3847
3848 @item T S s
3849 @kindex T S s
3850 @findex gnus-topic-sort-groups
3851 Sort the current topic according to the function(s) given by the
3852 @code{gnus-group-sort-function} variable
3853 (@code{gnus-topic-sort-groups}).
3854
3855 @end table
3856
3857 When given a prefix argument, all these commands will sort in reverse
3858 order.  @xref{Sorting Groups}, for more information about group
3859 sorting.
3860
3861
3862 @node Topic Topology
3863 @subsection Topic Topology
3864 @cindex topic topology
3865 @cindex topology
3866
3867 So, let's have a look at an example group buffer:
3868
3869 @example
3870 @group
3871 Gnus
3872   Emacs -- I wuw it!
3873      3: comp.emacs
3874      2: alt.religion.emacs
3875     Naughty Emacs
3876      452: alt.sex.emacs
3877        0: comp.talk.emacs.recovery
3878   Misc
3879      8: comp.binaries.fractals
3880     13: comp.sources.unix
3881 @end group
3882 @end example
3883
3884 So, here we have one top-level topic (@samp{Gnus}), two topics under
3885 that, and one sub-topic under one of the sub-topics.  (There is always
3886 just one (1) top-level topic).  This topology can be expressed as
3887 follows:
3888
3889 @lisp
3890 (("Gnus" visible)
3891  (("Emacs -- I wuw it!" visible)
3892   (("Naughty Emacs" visible)))
3893  (("Misc" visible)))
3894 @end lisp
3895
3896 @vindex gnus-topic-topology
3897 This is in fact how the variable @code{gnus-topic-topology} would look
3898 for the display above.  That variable is saved in the @file{.newsrc.eld}
3899 file, and shouldn't be messed with manually---unless you really want
3900 to.  Since this variable is read from the @file{.newsrc.eld} file,
3901 setting it in any other startup files will have no effect.
3902
3903 This topology shows what topics are sub-topics of what topics (right),
3904 and which topics are visible.  Two settings are currently
3905 allowed---@code{visible} and @code{invisible}.
3906
3907
3908 @node Topic Parameters
3909 @subsection Topic Parameters
3910 @cindex topic parameters
3911
3912 All groups in a topic will inherit group parameters from the parent (and
3913 ancestor) topic parameters.  All valid group parameters are valid topic
3914 parameters (@pxref{Group Parameters}).
3915
3916 In addition, the following parameters are only valid as topic
3917 parameters:
3918
3919 @table @code
3920 @item subscribe
3921 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3922 @code{subscribe} topic parameter says what groups go in what topic.  Its
3923 value should be a regexp to match the groups that should go in that
3924 topic.
3925
3926 @item subscribe-level
3927 When subscribing new groups by topic (see the @code{subscribe} parameter),
3928 the group will be subscribed with the level specified in the
3929 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3930
3931 @end table
3932
3933 Group parameters (of course) override topic parameters, and topic
3934 parameters in sub-topics override topic parameters in super-topics.  You
3935 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3936 verb, although you may feel free to disagree with me here.)
3937
3938 @example
3939 Gnus
3940   Emacs
3941      3: comp.emacs
3942      2: alt.religion.emacs
3943    452: alt.sex.emacs
3944     Relief
3945      452: alt.sex.emacs
3946        0: comp.talk.emacs.recovery
3947   Misc
3948      8: comp.binaries.fractals
3949     13: comp.sources.unix
3950    452: alt.sex.emacs
3951 @end example
3952
3953 The @samp{Emacs} topic has the topic parameter @code{(score-file
3954 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3955 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3956 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3957 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3958 . "religion.SCORE")}.
3959
3960 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3961 will get the @file{relief.SCORE} home score file.  If you enter the same
3962 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3963 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3964 get the @file{religion.SCORE} home score file.
3965
3966 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3967 there are some problems, especially with the @code{total-expiry}
3968 parameter.  Say you have a mail group in two topics; one with
3969 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3970 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3971 of these topics you mean to expire articles from, so anything may
3972 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3973 happens.  You just have to be careful if you do stuff like that.
3974
3975
3976 @node Misc Group Stuff
3977 @section Misc Group Stuff
3978
3979 @menu
3980 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3981 * Group Information::           Information and help on groups and Gnus.
3982 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3983 * File Commands::               Reading and writing the Gnus files.
3984 * Sieve Commands::              Managing Sieve scripts.
3985 @end menu
3986
3987 @table @kbd
3988
3989 @item ^
3990 @kindex ^ (Group)
3991 @findex gnus-group-enter-server-mode
3992 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3993 @xref{Server Buffer}.
3994
3995 @item a
3996 @kindex a (Group)
3997 @findex gnus-group-post-news
3998 Start composing a message (a news by default)
3999 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4000 under the point.  If the prefix is 1, prompt for a group to post to.
4001 Contrary to what the name of this function suggests, the prepared
4002 article might be a mail instead of a news, if a mail group is specified
4003 with the prefix argument.  @xref{Composing Messages}.
4004
4005 @item m
4006 @kindex m (Group)
4007 @findex gnus-group-mail
4008 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4009 use the posting style of the group under the point.  If the prefix is 1,
4010 prompt for a group name to find the posting style.
4011 @xref{Composing Messages}.
4012
4013 @item i
4014 @kindex i (Group)
4015 @findex gnus-group-news
4016 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4017 post to the group under the point.  If the prefix is 1, prompt
4018 for group to post to.  @xref{Composing Messages}.
4019
4020 This function actually prepares a news even when using mail groups.
4021 This is useful for ``posting'' messages to mail groups without actually
4022 sending them over the network: they're just saved directly to the group
4023 in question.  The corresponding back end must have a request-post method
4024 for this to work though.
4025
4026 @end table
4027
4028 Variables for the group buffer:
4029
4030 @table @code
4031
4032 @item gnus-group-mode-hook
4033 @vindex gnus-group-mode-hook
4034 is called after the group buffer has been
4035 created.
4036
4037 @item gnus-group-prepare-hook
4038 @vindex gnus-group-prepare-hook
4039 is called after the group buffer is
4040 generated.  It may be used to modify the buffer in some strange,
4041 unnatural way.
4042
4043 @item gnus-group-prepared-hook
4044 @vindex gnus-group-prepare-hook
4045 is called as the very last thing after the group buffer has been
4046 generated.  It may be used to move point around, for instance.
4047
4048 @item gnus-permanently-visible-groups
4049 @vindex gnus-permanently-visible-groups
4050 Groups matching this regexp will always be listed in the group buffer,
4051 whether they are empty or not.
4052
4053 @item gnus-group-name-charset-method-alist
4054 @vindex gnus-group-name-charset-method-alist
4055 An alist of method and the charset for group names. It is used to show
4056 non-@acronym{ASCII} group names.
4057
4058 For example:
4059 @lisp
4060 (setq gnus-group-name-charset-method-alist
4061     '(((nntp "news.com.cn") . cn-gb-2312)))
4062 @end lisp
4063
4064 @item gnus-group-name-charset-group-alist
4065 @cindex UTF-8 group names
4066 @vindex gnus-group-name-charset-group-alist
4067 An alist of regexp of group name and the charset for group names.  It
4068 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4069 utf-8))} is the default value if UTF-8 is supported, otherwise the
4070 default is @code{nil}.
4071
4072 For example:
4073 @lisp
4074 (setq gnus-group-name-charset-group-alist
4075     '(("\\.com\\.cn:" . cn-gb-2312)))
4076 @end lisp
4077
4078 @end table
4079
4080 @node Scanning New Messages
4081 @subsection Scanning New Messages
4082 @cindex new messages
4083 @cindex scanning new news
4084
4085 @table @kbd
4086
4087 @item g
4088 @kindex g (Group)
4089 @findex gnus-group-get-new-news
4090 @c @icon{gnus-group-get-new-news}
4091 Check the server(s) for new articles.  If the numerical prefix is used,
4092 this command will check only groups of level @var{arg} and lower
4093 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4094 command will force a total re-reading of the active file(s) from the
4095 back end(s).
4096
4097 @item M-g
4098 @kindex M-g (Group)
4099 @findex gnus-group-get-new-news-this-group
4100 @vindex gnus-goto-next-group-when-activating
4101 @c @icon{gnus-group-get-new-news-this-group}
4102 Check whether new articles have arrived in the current group
4103 (@code{gnus-group-get-new-news-this-group}).
4104 @code{gnus-goto-next-group-when-activating} says whether this command is
4105 to move point to the next group or not.  It is @code{t} by default.
4106
4107 @findex gnus-activate-all-groups
4108 @cindex activating groups
4109 @item C-c M-g
4110 @kindex C-c M-g (Group)
4111 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4112
4113 @item R
4114 @kindex R (Group)
4115 @cindex restarting
4116 @findex gnus-group-restart
4117 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4118 file(s), closes the connection to all servers, clears up all run-time
4119 Gnus variables, and then starts Gnus all over again.
4120
4121 @end table
4122
4123 @vindex gnus-get-new-news-hook
4124 @code{gnus-get-new-news-hook} is run just before checking for new news.
4125
4126 @vindex gnus-after-getting-new-news-hook
4127 @code{gnus-after-getting-new-news-hook} is run after checking for new
4128 news.
4129
4130
4131 @node Group Information
4132 @subsection Group Information
4133 @cindex group information
4134 @cindex information on groups
4135
4136 @table @kbd
4137
4138
4139 @item H f
4140 @kindex H f (Group)
4141 @findex gnus-group-fetch-faq
4142 @vindex gnus-group-faq-directory
4143 @cindex FAQ
4144 @cindex ange-ftp
4145 Try to fetch the @acronym{FAQ} for the current group
4146 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4147 from @code{gnus-group-faq-directory}, which is usually a directory on
4148 a remote machine.  This variable can also be a list of directories.
4149 In that case, giving a prefix to this command will allow you to choose
4150 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4151 used for fetching the file.
4152
4153 If fetching from the first site is unsuccessful, Gnus will attempt to go
4154 through @code{gnus-group-faq-directory} and try to open them one by one.
4155
4156 @item H c
4157 @kindex H c (Group)
4158 @findex gnus-group-fetch-charter
4159 @vindex gnus-group-charter-alist
4160 @cindex charter
4161 Try to open the charter for the current group in a web browser
4162 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4163 prefix argument.
4164
4165 Gnus will use @code{gnus-group-charter-alist} to find the location of
4166 the charter.  If no location is known, Gnus will fetch the control
4167 messages for the group, which in some cases includes the charter.
4168
4169 @item H C
4170 @kindex H C (Group)
4171 @findex gnus-group-fetch-control
4172 @vindex gnus-group-fetch-control-use-browse-url
4173 @cindex control message
4174 Fetch the control messages for the group from the archive at
4175 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4176 group if given a prefix argument.
4177
4178 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4179 Gnus will open the control messages in a browser using
4180 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4181 and displayed in an ephemeral group.
4182
4183 Note that the control messages are compressed.  To use this command
4184 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4185 Files, ,Compressed Files, emacs, The Emacs Manual}).
4186
4187 @item H d
4188 @itemx C-c C-d
4189 @c @icon{gnus-group-describe-group}
4190 @kindex H d (Group)
4191 @kindex C-c C-d (Group)
4192 @cindex describing groups
4193 @cindex group description
4194 @findex gnus-group-describe-group
4195 Describe the current group (@code{gnus-group-describe-group}).  If given
4196 a prefix, force Gnus to re-read the description from the server.
4197
4198 @item M-d
4199 @kindex M-d (Group)
4200 @findex gnus-group-describe-all-groups
4201 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4202 prefix, force Gnus to re-read the description file from the server.
4203
4204 @item H v
4205 @itemx V
4206 @kindex V (Group)
4207 @kindex H v (Group)
4208 @cindex version
4209 @findex gnus-version
4210 Display current Gnus version numbers (@code{gnus-version}).
4211
4212 @item ?
4213 @kindex ? (Group)
4214 @findex gnus-group-describe-briefly
4215 Give a very short help message (@code{gnus-group-describe-briefly}).
4216
4217 @item C-c C-i
4218 @kindex C-c C-i (Group)
4219 @cindex info
4220 @cindex manual
4221 @findex gnus-info-find-node
4222 Go to the Gnus info node (@code{gnus-info-find-node}).
4223 @end table
4224
4225
4226 @node Group Timestamp
4227 @subsection Group Timestamp
4228 @cindex timestamps
4229 @cindex group timestamps
4230
4231 It can be convenient to let Gnus keep track of when you last read a
4232 group.  To set the ball rolling, you should add
4233 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4234
4235 @lisp
4236 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4237 @end lisp
4238
4239 After doing this, each time you enter a group, it'll be recorded.
4240
4241 This information can be displayed in various ways---the easiest is to
4242 use the @samp{%d} spec in the group line format:
4243
4244 @lisp
4245 (setq gnus-group-line-format
4246       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4247 @end lisp
4248
4249 This will result in lines looking like:
4250
4251 @example
4252 *        0: mail.ding                                19961002T012943
4253          0: custom                                   19961002T012713
4254 @end example
4255
4256 As you can see, the date is displayed in compact ISO 8601 format.  This
4257 may be a bit too much, so to just display the date, you could say
4258 something like:
4259
4260 @lisp
4261 (setq gnus-group-line-format
4262       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4263 @end lisp
4264
4265 If you would like greater control of the time format, you can use a
4266 user-defined format spec.  Something like the following should do the
4267 trick:
4268
4269 @lisp
4270 (setq gnus-group-line-format
4271       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4272 (defun gnus-user-format-function-d (headers)
4273   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4274     (if time
4275         (format-time-string "%b %d  %H:%M" time)
4276       "")))
4277 @end lisp
4278
4279
4280 @node File Commands
4281 @subsection File Commands
4282 @cindex file commands
4283
4284 @table @kbd
4285
4286 @item r
4287 @kindex r (Group)
4288 @findex gnus-group-read-init-file
4289 @vindex gnus-init-file
4290 @cindex reading init file
4291 Re-read the init file (@code{gnus-init-file}, which defaults to
4292 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4293
4294 @item s
4295 @kindex s (Group)
4296 @findex gnus-group-save-newsrc
4297 @cindex saving .newsrc
4298 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4299 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4300 file(s) whether Gnus thinks it is necessary or not.
4301
4302 @c @item Z
4303 @c @kindex Z (Group)
4304 @c @findex gnus-group-clear-dribble
4305 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4306
4307 @end table
4308
4309
4310 @node Sieve Commands
4311 @subsection Sieve Commands
4312 @cindex group sieve commands
4313
4314 Sieve is a server-side mail filtering language.  In Gnus you can use
4315 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4316 sieve rules that should apply to each group.  Gnus provides two
4317 commands to translate all these group parameters into a proper Sieve
4318 script that can be transfered to the server somehow.
4319
4320 @vindex gnus-sieve-file
4321 @vindex gnus-sieve-region-start
4322 @vindex gnus-sieve-region-end
4323 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4324 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4325 between two delimiters, @code{gnus-sieve-region-start} and
4326 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4327 outside these delimiters that will not be removed the next time you
4328 regenerate the Sieve script.
4329
4330 @vindex gnus-sieve-crosspost
4331 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4332 is generated.  If it is non-@code{nil} (the default) articles is
4333 placed in all groups that have matching rules, otherwise the article
4334 is only placed in the group with the first matching rule.  For
4335 example, the group parameter @samp{(sieve address "sender"
4336 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4337 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4338 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4339 except that the line containing the call to @code{stop} is removed.)
4340
4341 @example
4342 if address "sender" "owner-ding@@hpc.uh.edu" @{
4343         fileinto "INBOX.ding";
4344         stop;
4345 @}
4346 @end example
4347
4348 @xref{Top, ,Top, sieve, Emacs Sieve}.
4349
4350 @table @kbd
4351
4352 @item D g
4353 @kindex D g (Group)
4354 @findex gnus-sieve-generate
4355 @vindex gnus-sieve-file
4356 @cindex generating sieve script
4357 Regenerate a Sieve script from the @code{sieve} group parameters and
4358 put you into the @code{gnus-sieve-file} without saving it.
4359
4360 @item D u
4361 @kindex D u (Group)
4362 @findex gnus-sieve-update
4363 @vindex gnus-sieve-file
4364 @cindex updating sieve script
4365 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4366 @code{sieve} group parameters, save the file and upload it to the
4367 server using the @code{sieveshell} program.
4368
4369 @end table
4370
4371
4372 @node Summary Buffer
4373 @chapter Summary Buffer
4374 @cindex summary buffer
4375
4376 A line for each article is displayed in the summary buffer.  You can
4377 move around, read articles, post articles and reply to articles.
4378
4379 The most common way to a summary buffer is to select a group from the
4380 group buffer (@pxref{Selecting a Group}).
4381
4382 You can have as many summary buffers open as you wish.
4383
4384 @menu
4385 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4386 * Summary Maneuvering::         Moving around the summary buffer.
4387 * Choosing Articles::           Reading articles.
4388 * Paging the Article::          Scrolling the current article.
4389 * Reply Followup and Post::     Posting articles.
4390 * Delayed Articles::            Send articles at a later time.
4391 * Marking Articles::            Marking articles as read, expirable, etc.
4392 * Limiting::                    You can limit the summary buffer.
4393 * Threading::                   How threads are made.
4394 * Sorting the Summary Buffer::  How articles and threads are sorted.
4395 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4396 * Article Caching::             You may store articles in a cache.
4397 * Persistent Articles::         Making articles expiry-resistant.
4398 * Article Backlog::             Having already read articles hang around.
4399 * Saving Articles::             Ways of customizing article saving.
4400 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4401 * Article Treatment::           The article buffer can be mangled at will.
4402 * MIME Commands::               Doing MIMEy things with the articles.
4403 * Charsets::                    Character set issues.
4404 * Article Commands::            Doing various things with the article buffer.
4405 * Summary Sorting::             Sorting the summary buffer in various ways.
4406 * Finding the Parent::          No child support? Get the parent.
4407 * Alternative Approaches::      Reading using non-default summaries.
4408 * Tree Display::                A more visual display of threads.
4409 * Mail Group Commands::         Some commands can only be used in mail groups.
4410 * Various Summary Stuff::       What didn't fit anywhere else.
4411 * Exiting the Summary Buffer::  Returning to the Group buffer,
4412                                 or reselecting the current group.
4413 * Crosspost Handling::          How crossposted articles are dealt with.
4414 * Duplicate Suppression::       An alternative when crosspost handling fails.
4415 * Security::                    Decrypt and Verify.
4416 * Mailing List::                Mailing list minor mode.
4417 @end menu
4418
4419
4420 @node Summary Buffer Format
4421 @section Summary Buffer Format
4422 @cindex summary buffer format
4423
4424 @iftex
4425 @iflatex
4426 \gnusfigure{The Summary Buffer}{180}{
4427 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4428 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4429 }
4430 @end iflatex
4431 @end iftex
4432
4433 @menu
4434 * Summary Buffer Lines::        You can specify how summary lines should look.
4435 * To From Newsgroups::          How to not display your own name.
4436 * Summary Buffer Mode Line::    You can say how the mode line should look.
4437 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4438 @end menu
4439
4440 @findex mail-extract-address-components
4441 @findex gnus-extract-address-components
4442 @vindex gnus-extract-address-components
4443 Gnus will use the value of the @code{gnus-extract-address-components}
4444 variable as a function for getting the name and address parts of a
4445 @code{From} header.  Two pre-defined functions exist:
4446 @code{gnus-extract-address-components}, which is the default, quite
4447 fast, and too simplistic solution; and
4448 @code{mail-extract-address-components}, which works very nicely, but is
4449 slower.  The default function will return the wrong answer in 5% of the
4450 cases.  If this is unacceptable to you, use the other function instead:
4451
4452 @lisp
4453 (setq gnus-extract-address-components
4454       'mail-extract-address-components)
4455 @end lisp
4456
4457 @vindex gnus-summary-same-subject
4458 @code{gnus-summary-same-subject} is a string indicating that the current
4459 article has the same subject as the previous.  This string will be used
4460 with those specs that require it.  The default is @code{""}.
4461
4462
4463 @node Summary Buffer Lines
4464 @subsection Summary Buffer Lines
4465
4466 @vindex gnus-summary-line-format
4467 You can change the format of the lines in the summary buffer by changing
4468 the @code{gnus-summary-line-format} variable.  It works along the same
4469 lines as a normal @code{format} string, with some extensions
4470 (@pxref{Formatting Variables}).
4471
4472 There should always be a colon or a point position marker on the line;
4473 the cursor always moves to the point position marker or the colon after
4474 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4475 possible to change this.  Just write a new function
4476 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4477 @xref{Positioning Point}.
4478
4479 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4480
4481 The following format specification characters and extended format
4482 specification(s) are understood:
4483
4484 @table @samp
4485 @item N
4486 Article number.
4487 @item S
4488 Subject string.  List identifiers stripped,
4489 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4490 @item s
4491 Subject if the article is the root of the thread or the previous article
4492 had a different subject, @code{gnus-summary-same-subject} otherwise.
4493 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4494 @item F
4495 Full @code{From} header.
4496 @item n
4497 The name (from the @code{From} header).
4498 @item f
4499 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4500 From Newsgroups}).
4501 @item a
4502 The name (from the @code{From} header).  This differs from the @code{n}
4503 spec in that it uses the function designated by the
4504 @code{gnus-extract-address-components} variable, which is slower, but
4505 may be more thorough.
4506 @item A
4507 The address (from the @code{From} header).  This works the same way as
4508 the @code{a} spec.
4509 @item L
4510 Number of lines in the article.
4511 @item c
4512 Number of characters in the article. This specifier is not supported
4513 in some methods (like nnfolder).
4514 @item k
4515 Pretty-printed version of the number of characters in the article;
4516 for example, @samp{1.2k} or @samp{0.4M}.
4517 @item I
4518 Indentation based on thread level (@pxref{Customizing Threading}).
4519 @item B
4520 A complex trn-style thread tree, showing response-connecting trace
4521 lines.  A thread could be drawn like this:
4522
4523 @example
4524 >
4525 +->
4526 | +->
4527 | | \->
4528 | |   \->
4529 | \->
4530 +->
4531 \->
4532 @end example
4533
4534 You can customize the appearance with the following options.  Note
4535 that it is possible to make the thread display look really neat by
4536 replacing the default @acronym{ASCII} characters with graphic
4537 line-drawing glyphs.
4538 @table @code
4539 @item gnus-sum-thread-tree-root
4540 @vindex gnus-sum-thread-tree-root
4541 Used for the root of a thread.  If @code{nil}, use subject
4542 instead.  The default is @samp{> }.
4543
4544 @item gnus-sum-thread-tree-false-root
4545 @vindex gnus-sum-thread-tree-false-root
4546 Used for the false root of a thread (@pxref{Loose Threads}).  If
4547 @code{nil}, use subject instead.  The default is @samp{> }.
4548
4549 @item gnus-sum-thread-tree-single-indent
4550 @vindex gnus-sum-thread-tree-single-indent
4551 Used for a thread with just one message.  If @code{nil}, use subject
4552 instead.  The default is @samp{}.
4553
4554 @item gnus-sum-thread-tree-vertical
4555 @vindex gnus-sum-thread-tree-vertical
4556 Used for drawing a vertical line.  The default is @samp{| }.
4557
4558 @item gnus-sum-thread-tree-indent
4559 @vindex gnus-sum-thread-tree-indent
4560 Used for indenting.  The default is @samp{  }. 
4561
4562 @item gnus-sum-thread-tree-leaf-with-other
4563 @vindex gnus-sum-thread-tree-leaf-with-other
4564 Used for a leaf with brothers.  The default is @samp{+-> }.
4565
4566 @item gnus-sum-thread-tree-single-leaf
4567 @vindex gnus-sum-thread-tree-single-leaf
4568 Used for a leaf without brothers.  The default is @samp{\-> }
4569
4570 @end table
4571
4572 @item T
4573 Nothing if the article is a root and lots of spaces if it isn't (it
4574 pushes everything after it off the screen).
4575 @item [
4576 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4577 for adopted articles (@pxref{Customizing Threading}).
4578 @item ]
4579 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4580 for adopted articles.
4581 @item >
4582 One space for each thread level.
4583 @item <
4584 Twenty minus thread level spaces.
4585 @item U
4586 Unread. @xref{Read Articles}.
4587
4588 @item R
4589 This misleadingly named specifier is the @dfn{secondary mark}.  This
4590 mark will say whether the article has been replied to, has been cached,
4591 or has been saved.  @xref{Other Marks}.
4592
4593 @item i
4594 Score as a number (@pxref{Scoring}).
4595 @item z
4596 @vindex gnus-summary-zcore-fuzz
4597 Zcore, @samp{+} if above the default level and @samp{-} if below the
4598 default level.  If the difference between
4599 @code{gnus-summary-default-score} and the score is less than
4600 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4601 @item V
4602 Total thread score.
4603 @item x
4604 @code{Xref}.
4605 @item D
4606 @code{Date}.
4607 @item d
4608 The @code{Date} in @code{DD-MMM} format.
4609 @item o
4610 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4611 @item M
4612 @code{Message-ID}.
4613 @item r
4614 @code{References}.
4615 @item t
4616 Number of articles in the current sub-thread.  Using this spec will slow
4617 down summary buffer generation somewhat.
4618 @item e
4619 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4620 article has any children.
4621 @item P
4622 The line number.
4623 @item O
4624 Download mark.
4625 @item &user-date;
4626 Age sensitive date format.  Various date format is defined in
4627 @code{gnus-user-date-format-alist}.
4628 @item u
4629 User defined specifier.  The next character in the format string should
4630 be a letter.  Gnus will call the function
4631 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4632 following @samp{%u}.  The function will be passed the current header as
4633 argument.  The function should return a string, which will be inserted
4634 into the summary just like information from any other summary specifier.
4635 @end table
4636
4637 Text between @samp{%(} and @samp{%)} will be highlighted with
4638 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4639 There can only be one such area.
4640
4641 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4642 have to be handled with care.  For reasons of efficiency, Gnus will
4643 compute what column these characters will end up in, and ``hard-code''
4644 that.  This means that it is invalid to have these specs after a
4645 variable-length spec.  Well, you might not be arrested, but your summary
4646 buffer will look strange, which is bad enough.
4647
4648 The smart choice is to have these specs as far to the left as possible.
4649 (Isn't that the case with everything, though?  But I digress.)
4650
4651 This restriction may disappear in later versions of Gnus.
4652
4653
4654 @node To From Newsgroups
4655 @subsection To From Newsgroups
4656 @cindex To
4657 @cindex Newsgroups
4658
4659 In some groups (particularly in archive groups), the @code{From} header
4660 isn't very interesting, since all the articles there are written by
4661 you.  To display the information in the @code{To} or @code{Newsgroups}
4662 headers instead, you need to decide three things: What information to
4663 gather; where to display it; and when to display it.
4664
4665 @enumerate
4666 @item
4667 @vindex gnus-extra-headers
4668 The reading of extra header information is controlled by the
4669 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4670 instance:
4671
4672 @lisp
4673 (setq gnus-extra-headers
4674       '(To Newsgroups X-Newsreader))
4675 @end lisp
4676
4677 This will result in Gnus trying to obtain these three headers, and
4678 storing it in header structures for later easy retrieval.
4679
4680 @item
4681 @findex gnus-extra-header
4682 The value of these extra headers can be accessed via the
4683 @code{gnus-extra-header} function.  Here's a format line spec that will
4684 access the @code{X-Newsreader} header:
4685
4686 @example
4687 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4688 @end example
4689
4690 @item
4691 @vindex gnus-ignored-from-addresses
4692 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4693 summary line spec returns the @code{To}, @code{Newsreader} or
4694 @code{From} header.  If this regexp matches the contents of the
4695 @code{From} header, the value of the @code{To} or @code{Newsreader}
4696 headers are used instead.
4697
4698 @end enumerate
4699
4700 @vindex nnmail-extra-headers
4701 A related variable is @code{nnmail-extra-headers}, which controls when
4702 to include extra headers when generating overview (@acronym{NOV}) files.
4703 If you have old overview files, you should regenerate them after
4704 changing this variable, by entering the server buffer using @kbd{^},
4705 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4706 regeneration.
4707
4708 @vindex gnus-summary-line-format
4709 You also have to instruct Gnus to display the data by changing the
4710 @code{%n} spec to the @code{%f} spec in the
4711 @code{gnus-summary-line-format} variable.
4712
4713 In summary, you'd typically put something like the following in
4714 @file{~/.gnus.el}:
4715
4716 @lisp
4717 (setq gnus-extra-headers
4718       '(To Newsgroups))
4719 (setq nnmail-extra-headers gnus-extra-headers)
4720 (setq gnus-summary-line-format
4721       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4722 (setq gnus-ignored-from-addresses
4723       "Your Name Here")
4724 @end lisp
4725
4726 (The values listed above are the default values in Gnus.  Alter them
4727 to fit your needs.)
4728
4729 A note for news server administrators, or for users who wish to try to
4730 convince their news server administrator to provide some additional
4731 support:
4732
4733 The above is mostly useful for mail groups, where you have control over
4734 the @acronym{NOV} files that are created.  However, if you can persuade your
4735 nntp admin to add (in the usual implementation, notably INN):
4736
4737 @example
4738 Newsgroups:full
4739 @end example
4740
4741 to the end of her @file{overview.fmt} file, then you can use that just
4742 as you would the extra headers from the mail groups.
4743
4744
4745 @node Summary Buffer Mode Line
4746 @subsection Summary Buffer Mode Line
4747
4748 @vindex gnus-summary-mode-line-format
4749 You can also change the format of the summary mode bar (@pxref{Mode Line
4750 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4751 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4752
4753 Here are the elements you can play with:
4754
4755 @table @samp
4756 @item G
4757 Group name.
4758 @item p
4759 Unprefixed group name.
4760 @item A
4761 Current article number.
4762 @item z
4763 Current article score.
4764 @item V
4765 Gnus version.
4766 @item U
4767 Number of unread articles in this group.
4768 @item e
4769 Number of unread articles in this group that aren't displayed in the
4770 summary buffer.
4771 @item Z
4772 A string with the number of unread and unselected articles represented
4773 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4774 articles, and just as @samp{<%U more>} if there are just unread articles
4775 and no unselected ones.
4776 @item g
4777 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4778 shortened to @samp{r.a.anime}.
4779 @item S
4780 Subject of the current article.
4781 @item u
4782 User-defined spec (@pxref{User-Defined Specs}).
4783 @item s
4784 Name of the current score file (@pxref{Scoring}).
4785 @item d
4786 Number of dormant articles (@pxref{Unread Articles}).
4787 @item t
4788 Number of ticked articles (@pxref{Unread Articles}).
4789 @item r
4790 Number of articles that have been marked as read in this session.
4791 @item E
4792 Number of articles expunged by the score files.
4793 @end table
4794
4795
4796 @node Summary Highlighting
4797 @subsection Summary Highlighting
4798
4799 @table @code
4800
4801 @item gnus-visual-mark-article-hook
4802 @vindex gnus-visual-mark-article-hook
4803 This hook is run after selecting an article.  It is meant to be used for
4804 highlighting the article in some way.  It is not run if
4805 @code{gnus-visual} is @code{nil}.
4806
4807 @item gnus-summary-update-hook
4808 @vindex gnus-summary-update-hook
4809 This hook is called when a summary line is changed.  It is not run if
4810 @code{gnus-visual} is @code{nil}.
4811
4812 @item gnus-summary-selected-face
4813 @vindex gnus-summary-selected-face
4814 This is the face (or @dfn{font} as some people call it) used to
4815 highlight the current article in the summary buffer.
4816
4817 @item gnus-summary-highlight
4818 @vindex gnus-summary-highlight
4819 Summary lines are highlighted according to this variable, which is a
4820 list where the elements are of the format @code{(@var{form}
4821 . @var{face})}.  If you would, for instance, like ticked articles to be
4822 italic and high-scored articles to be bold, you could set this variable
4823 to something like
4824 @lisp
4825 (((eq mark gnus-ticked-mark) . italic)
4826  ((> score default) . bold))
4827 @end lisp
4828 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4829 @var{face} will be applied to the line.
4830 @end table
4831
4832
4833 @node Summary Maneuvering
4834 @section Summary Maneuvering
4835 @cindex summary movement
4836
4837 All the straight movement commands understand the numeric prefix and
4838 behave pretty much as you'd expect.
4839
4840 None of these commands select articles.
4841
4842 @table @kbd
4843 @item G M-n
4844 @itemx M-n
4845 @kindex M-n (Summary)
4846 @kindex G M-n (Summary)
4847 @findex gnus-summary-next-unread-subject
4848 Go to the next summary line of an unread article
4849 (@code{gnus-summary-next-unread-subject}).
4850
4851 @item G M-p
4852 @itemx M-p
4853 @kindex M-p (Summary)
4854 @kindex G M-p (Summary)
4855 @findex gnus-summary-prev-unread-subject
4856 Go to the previous summary line of an unread article
4857 (@code{gnus-summary-prev-unread-subject}).
4858
4859 @item G g
4860 @kindex G g (Summary)
4861 @findex gnus-summary-goto-subject
4862 Ask for an article number and then go to the summary line of that article
4863 without displaying the article (@code{gnus-summary-goto-subject}).
4864 @end table
4865
4866 If Gnus asks you to press a key to confirm going to the next group, you
4867 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4868 buffer, searching for the next group to read without actually returning
4869 to the group buffer.
4870
4871 Variables related to summary movement:
4872
4873 @table @code
4874
4875 @vindex gnus-auto-select-next
4876 @item gnus-auto-select-next
4877 If you issue one of the movement commands (like @kbd{n}) and there are
4878 no more unread articles after the current one, Gnus will offer to go to
4879 the next group.  If this variable is @code{t} and the next group is
4880 empty, Gnus will exit summary mode and return to the group buffer.  If
4881 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4882 next group with unread articles.  As a special case, if this variable
4883 is @code{quietly}, Gnus will select the next group without asking for
4884 confirmation.  If this variable is @code{almost-quietly}, the same
4885 will happen only if you are located on the last article in the group.
4886 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4887 command will go to the next group without confirmation.  Also
4888 @pxref{Group Levels}.
4889
4890 @item gnus-auto-select-same
4891 @vindex gnus-auto-select-same
4892 If non-@code{nil}, all the movement commands will try to go to the next
4893 article with the same subject as the current.  (@dfn{Same} here might
4894 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4895 for details (@pxref{Customizing Threading}).)  If there are no more
4896 articles with the same subject, go to the first unread article.
4897
4898 This variable is not particularly useful if you use a threaded display.
4899
4900 @item gnus-summary-check-current
4901 @vindex gnus-summary-check-current
4902 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4903 to the next (or previous) article if the current article is unread.
4904 Instead, they will choose the current article.
4905
4906 @item gnus-auto-center-summary
4907 @vindex gnus-auto-center-summary
4908 If non-@code{nil}, Gnus will keep the point in the summary buffer
4909 centered at all times.  This makes things quite tidy, but if you have a
4910 slow network connection, or simply do not like this un-Emacsism, you can
4911 set this variable to @code{nil} to get the normal Emacs scrolling
4912 action.  This will also inhibit horizontal re-centering of the summary
4913 buffer, which might make it more inconvenient to read extremely long
4914 threads.
4915
4916 This variable can also be a number.  In that case, center the window at
4917 the given number of lines from the top.
4918
4919 @end table
4920
4921
4922 @node Choosing Articles
4923 @section Choosing Articles
4924 @cindex selecting articles
4925
4926 @menu
4927 * Choosing Commands::           Commands for choosing articles.
4928 * Choosing Variables::          Variables that influence these commands.
4929 @end menu
4930
4931
4932 @node Choosing Commands
4933 @subsection Choosing Commands
4934
4935 None of the following movement commands understand the numeric prefix,
4936 and they all select and display an article.
4937
4938 If you want to fetch new articles or redisplay the group, see
4939 @ref{Exiting the Summary Buffer}.
4940
4941 @table @kbd
4942 @item SPACE
4943 @kindex SPACE (Summary)
4944 @findex gnus-summary-next-page
4945 Select the current article, or, if that one's read already, the next
4946 unread article (@code{gnus-summary-next-page}).
4947
4948 If you have an article window open already and you press @kbd{SPACE}
4949 again, the article will be scrolled.  This lets you conveniently
4950 @kbd{SPACE} through an entire newsgroup.  @pxref{Paging the Article}.
4951
4952 @item G n
4953 @itemx n
4954 @kindex n (Summary)
4955 @kindex G n (Summary)
4956 @findex gnus-summary-next-unread-article
4957 @c @icon{gnus-summary-next-unread}
4958 Go to next unread article (@code{gnus-summary-next-unread-article}).
4959
4960 @item G p
4961 @itemx p
4962 @kindex p (Summary)
4963 @findex gnus-summary-prev-unread-article
4964 @c @icon{gnus-summary-prev-unread}
4965 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4966
4967 @item G N
4968 @itemx N
4969 @kindex N (Summary)
4970 @kindex G N (Summary)
4971 @findex gnus-summary-next-article
4972 Go to the next article (@code{gnus-summary-next-article}).
4973
4974 @item G P
4975 @itemx P
4976 @kindex P (Summary)
4977 @kindex G P (Summary)
4978 @findex gnus-summary-prev-article
4979 Go to the previous article (@code{gnus-summary-prev-article}).
4980
4981 @item G C-n
4982 @kindex G C-n (Summary)
4983 @findex gnus-summary-next-same-subject
4984 Go to the next article with the same subject
4985 (@code{gnus-summary-next-same-subject}).
4986
4987 @item G C-p
4988 @kindex G C-p (Summary)
4989 @findex gnus-summary-prev-same-subject
4990 Go to the previous article with the same subject
4991 (@code{gnus-summary-prev-same-subject}).
4992
4993 @item G f
4994 @itemx .
4995 @kindex G f  (Summary)
4996 @kindex .  (Summary)
4997 @findex gnus-summary-first-unread-article
4998 Go to the first unread article
4999 (@code{gnus-summary-first-unread-article}).
5000
5001 @item G b
5002 @itemx ,
5003 @kindex G b (Summary)
5004 @kindex , (Summary)
5005 @findex gnus-summary-best-unread-article
5006 Go to the unread article with the highest score
5007 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5008 go to the first unread article that has a score over the default score.
5009
5010 @item G l
5011 @itemx l
5012 @kindex l (Summary)
5013 @kindex G l (Summary)
5014 @findex gnus-summary-goto-last-article
5015 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5016
5017 @item G o
5018 @kindex G o (Summary)
5019 @findex gnus-summary-pop-article
5020 @cindex history
5021 @cindex article history
5022 Pop an article off the summary history and go to this article
5023 (@code{gnus-summary-pop-article}).  This command differs from the
5024 command above in that you can pop as many previous articles off the
5025 history as you like, while @kbd{l} toggles the two last read articles.
5026 For a somewhat related issue (if you use these commands a lot),
5027 @pxref{Article Backlog}.
5028
5029 @item G j
5030 @itemx j
5031 @kindex j (Summary)
5032 @kindex G j (Summary)
5033 @findex gnus-summary-goto-article
5034 Ask for an article number or @code{Message-ID}, and then go to that
5035 article (@code{gnus-summary-goto-article}).
5036
5037 @end table
5038
5039
5040 @node Choosing Variables
5041 @subsection Choosing Variables
5042
5043 Some variables relevant for moving and selecting articles:
5044
5045 @table @code
5046 @item gnus-auto-extend-newsgroup
5047 @vindex gnus-auto-extend-newsgroup
5048 All the movement commands will try to go to the previous (or next)
5049 article, even if that article isn't displayed in the Summary buffer if
5050 this variable is non-@code{nil}.  Gnus will then fetch the article from
5051 the server and display it in the article buffer.
5052
5053 @item gnus-select-article-hook
5054 @vindex gnus-select-article-hook
5055 This hook is called whenever an article is selected.  By default it
5056 exposes any threads hidden under the selected article.  If you would 
5057 like each article to be saved in the Agent as you read it, putting
5058 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5059
5060 @item gnus-mark-article-hook
5061 @vindex gnus-mark-article-hook
5062 @findex gnus-summary-mark-unread-as-read
5063 @findex gnus-summary-mark-read-and-unread-as-read
5064 @findex gnus-unread-mark
5065 This hook is called whenever an article is selected.  It is intended to
5066 be used for marking articles as read.  The default value is
5067 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5068 mark of almost any article you read to @code{gnus-unread-mark}.  The
5069 only articles not affected by this function are ticked, dormant, and
5070 expirable articles.  If you'd instead like to just have unread articles
5071 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5072 instead.  It will leave marks like @code{gnus-low-score-mark},
5073 @code{gnus-del-mark} (and so on) alone.
5074
5075 @end table
5076
5077
5078 @node Paging the Article
5079 @section Scrolling the Article
5080 @cindex article scrolling
5081
5082 @table @kbd
5083
5084 @item SPACE
5085 @kindex SPACE (Summary)
5086 @findex gnus-summary-next-page
5087 Pressing @kbd{SPACE} will scroll the current article forward one page,
5088 or, if you have come to the end of the current article, will choose the
5089 next article (@code{gnus-summary-next-page}).
5090
5091 @vindex gnus-article-boring-faces
5092 @vindex gnus-article-skip-boring
5093 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5094 the article consists only of citations and signature, then it will be
5095 skipped; the next article will be shown instead.  You can customize
5096 what is considered uninteresting with
5097 @code{gnus-article-boring-faces}.  You can manually view the article's
5098 pages, no matter how boring, using @kbd{C-M-v}.
5099
5100 @item DEL
5101 @kindex DEL (Summary)
5102 @findex gnus-summary-prev-page
5103 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5104
5105 @item RET
5106 @kindex RET (Summary)
5107 @findex gnus-summary-scroll-up
5108 Scroll the current article one line forward
5109 (@code{gnus-summary-scroll-up}).
5110
5111 @item M-RET
5112 @kindex M-RET (Summary)
5113 @findex gnus-summary-scroll-down
5114 Scroll the current article one line backward
5115 (@code{gnus-summary-scroll-down}).
5116
5117 @item A g
5118 @itemx g
5119 @kindex A g (Summary)
5120 @kindex g (Summary)
5121 @findex gnus-summary-show-article
5122 @vindex gnus-summary-show-article-charset-alist
5123 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5124 given a prefix, fetch the current article, but don't run any of the
5125 article treatment functions.  This will give you a ``raw'' article, just
5126 the way it came from the server.
5127
5128 If given a numerical prefix, you can do semi-manual charset stuff.
5129 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5130 encoded in the @code{cn-gb-2312} charset.  If you have
5131
5132 @lisp
5133 (setq gnus-summary-show-article-charset-alist
5134       '((1 . cn-gb-2312)
5135         (2 . big5)))
5136 @end lisp
5137
5138 then you can say @kbd{C-u 1 g} to get the same effect.
5139
5140 @item A <
5141 @itemx <
5142 @kindex < (Summary)
5143 @kindex A < (Summary)
5144 @findex gnus-summary-beginning-of-article
5145 Scroll to the beginning of the article
5146 (@code{gnus-summary-beginning-of-article}).
5147
5148 @item A >
5149 @itemx >
5150 @kindex > (Summary)
5151 @kindex A > (Summary)
5152 @findex gnus-summary-end-of-article
5153 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5154
5155 @item A s
5156 @itemx s
5157 @kindex A s (Summary)
5158 @kindex s (Summary)
5159 @findex gnus-summary-isearch-article
5160 Perform an isearch in the article buffer
5161 (@code{gnus-summary-isearch-article}).
5162
5163 @item h
5164 @kindex h (Summary)
5165 @findex gnus-summary-select-article-buffer
5166 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5167
5168 @end table
5169
5170
5171 @node Reply Followup and Post
5172 @section Reply, Followup and Post
5173
5174 @menu
5175 * Summary Mail Commands::       Sending mail.
5176 * Summary Post Commands::       Sending news.
5177 * Summary Message Commands::    Other Message-related commands.
5178 * Canceling and Superseding::   
5179 @end menu
5180
5181
5182 @node Summary Mail Commands
5183 @subsection Summary Mail Commands
5184 @cindex mail
5185 @cindex composing mail
5186
5187 Commands for composing a mail message:
5188
5189 @table @kbd
5190
5191 @item S r
5192 @itemx r
5193 @kindex S r (Summary)
5194 @kindex r (Summary)
5195 @findex gnus-summary-reply
5196 @c @icon{gnus-summary-mail-reply}
5197 @c @icon{gnus-summary-reply}
5198 Mail a reply to the author of the current article
5199 (@code{gnus-summary-reply}).
5200
5201 @item S R
5202 @itemx R
5203 @kindex R (Summary)
5204 @kindex S R (Summary)
5205 @findex gnus-summary-reply-with-original
5206 @c @icon{gnus-summary-reply-with-original}
5207 Mail a reply to the author of the current article and include the
5208 original message (@code{gnus-summary-reply-with-original}).  This
5209 command uses the process/prefix convention.
5210
5211 @item S w
5212 @kindex S w (Summary)
5213 @findex gnus-summary-wide-reply
5214 Mail a wide reply to the author of the current article
5215 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5216 goes out to all people listed in the @code{To}, @code{From} (or
5217 @code{Reply-to}) and @code{Cc} headers.
5218
5219 @item S W
5220 @kindex S W (Summary)
5221 @findex gnus-summary-wide-reply-with-original
5222 Mail a wide reply to the current article and include the original
5223 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5224 the process/prefix convention.
5225
5226 @item S v
5227 @kindex S v (Summary)
5228 @findex gnus-summary-very-wide-reply
5229 Mail a very wide reply to the author of the current article
5230 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5231 that goes out to all people listed in the @code{To}, @code{From} (or
5232 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5233 articles.  This command uses the process/prefix convention.
5234
5235 @item S V
5236 @kindex S V (Summary)
5237 @findex gnus-summary-very-wide-reply-with-original
5238 Mail a very wide reply to the author of the current article and include the
5239 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5240 command uses the process/prefix convention.
5241
5242 @item S B r
5243 @kindex S B r (Summary)
5244 @findex gnus-summary-reply-broken-reply-to
5245 Mail a reply to the author of the current article but ignore the
5246 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5247 If you need this because a mailing list incorrectly sets a
5248 @code{Reply-To} header pointing to the list, you probably want to set
5249 the @code{broken-reply-to} group parameter instead, so things will work
5250 correctly.  @xref{Group Parameters}.
5251
5252 @item S B R
5253 @kindex S B R (Summary)
5254 @findex gnus-summary-reply-broken-reply-to-with-original
5255 Mail a reply to the author of the current article and include the
5256 original message but ignore the @code{Reply-To} field
5257 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5258
5259 @item S o m
5260 @itemx C-c C-f
5261 @kindex S o m (Summary)
5262 @kindex C-c C-f (Summary)
5263 @findex gnus-summary-mail-forward
5264 @c @icon{gnus-summary-mail-forward}
5265 Forward the current article to some other person
5266 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5267 is forwarded according to the value of (@code{message-forward-as-mime})
5268 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5269 message and forward directly inline; if the prefix is 2, forward message
5270 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5271 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5272 directly inline; otherwise, the message is forwarded as no prefix given
5273 but use the flipped value of (@code{message-forward-as-mime}).  By
5274 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5275 section.
5276
5277 @item S m
5278 @itemx m
5279 @kindex m (Summary)
5280 @kindex S m (Summary)
5281 @findex gnus-summary-mail-other-window
5282 @c @icon{gnus-summary-mail-originate}
5283 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5284 the posting style of the current group.  If given a prefix, disable that.
5285 If the prefix is 1, prompt for a group name to find the posting style.
5286
5287 @item S i
5288 @itemx i
5289 @kindex i (Summary)
5290 @kindex S i (Summary)
5291 @findex gnus-summary-news-other-window
5292 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5293 post to the current group.  If given a prefix, disable that.  If the
5294 prefix is 1, prompt for a group to post to.
5295
5296 This function actually prepares a news even when using mail groups.
5297 This is useful for ``posting'' messages to mail groups without actually
5298 sending them over the network: they're just saved directly to the group
5299 in question.  The corresponding back end must have a request-post method
5300 for this to work though.
5301
5302 @item S D b
5303 @kindex S D b (Summary)
5304 @findex gnus-summary-resend-bounced-mail
5305 @cindex bouncing mail
5306 If you have sent a mail, but the mail was bounced back to you for some
5307 reason (wrong address, transient failure), you can use this command to
5308 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5309 will be popped into a mail buffer where you can edit the headers before
5310 sending the mail off again.  If you give a prefix to this command, and
5311 the bounced mail is a reply to some other mail, Gnus will try to fetch
5312 that mail and display it for easy perusal of its headers.  This might
5313 very well fail, though.
5314
5315 @item S D r
5316 @kindex S D r (Summary)
5317 @findex gnus-summary-resend-message
5318 Not to be confused with the previous command,
5319 @code{gnus-summary-resend-message} will prompt you for an address to
5320 send the current message off to, and then send it to that place.  The
5321 headers of the message won't be altered---but lots of headers that say
5322 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5323 means that you actually send a mail to someone that has a @code{To}
5324 header that (probably) points to yourself.  This will confuse people.
5325 So, natcherly you'll only do that if you're really eVIl.
5326
5327 This command is mainly used if you have several accounts and want to
5328 ship a mail to a different account of yours.  (If you're both
5329 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5330 to the @code{root} account, you may want to resend it to
5331 @code{postmaster}.  Ordnung muss sein!
5332
5333 This command understands the process/prefix convention
5334 (@pxref{Process/Prefix}).
5335
5336 @item S O m
5337 @kindex S O m (Summary)
5338 @findex gnus-uu-digest-mail-forward
5339 Digest the current series (@pxref{Decoding Articles}) and forward the
5340 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5341 uses the process/prefix convention (@pxref{Process/Prefix}).
5342
5343 @item S M-c
5344 @kindex S M-c (Summary)
5345 @findex gnus-summary-mail-crosspost-complaint
5346 @cindex crossposting
5347 @cindex excessive crossposting
5348 Send a complaint about excessive crossposting to the author of the
5349 current article (@code{gnus-summary-mail-crosspost-complaint}).
5350
5351 @findex gnus-crosspost-complaint
5352 This command is provided as a way to fight back against the current
5353 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5354 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5355 command understands the process/prefix convention
5356 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5357
5358 @end table
5359
5360 Also @xref{Header Commands, ,Header Commands, message, The Message
5361 Manual}, for more information.
5362
5363
5364 @node Summary Post Commands
5365 @subsection Summary Post Commands
5366 @cindex post
5367 @cindex composing news
5368
5369 Commands for posting a news article:
5370
5371 @table @kbd
5372 @item S p
5373 @itemx a
5374 @kindex a (Summary)
5375 @kindex S p (Summary)
5376 @findex gnus-summary-post-news
5377 @c @icon{gnus-summary-post-news}
5378 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5379 default, post to the current group.  If given a prefix, disable that.
5380 If the prefix is 1, prompt for another group instead.
5381
5382 @item S f
5383 @itemx f
5384 @kindex f (Summary)
5385 @kindex S f (Summary)
5386 @findex gnus-summary-followup
5387 @c @icon{gnus-summary-followup}
5388 Post a followup to the current article (@code{gnus-summary-followup}).
5389
5390 @item S F
5391 @itemx F
5392 @kindex S F (Summary)
5393 @kindex F (Summary)
5394 @c @icon{gnus-summary-followup-with-original}
5395 @findex gnus-summary-followup-with-original
5396 Post a followup to the current article and include the original message
5397 (@code{gnus-summary-followup-with-original}).   This command uses the
5398 process/prefix convention.
5399
5400 @item S n
5401 @kindex S n (Summary)
5402 @findex gnus-summary-followup-to-mail
5403 Post a followup to the current article via news, even if you got the
5404 message through mail (@code{gnus-summary-followup-to-mail}).
5405
5406 @item S N
5407 @kindex S N (Summary)
5408 @findex gnus-summary-followup-to-mail-with-original
5409 Post a followup to the current article via news, even if you got the
5410 message through mail and include the original message
5411 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5412 the process/prefix convention.
5413
5414 @item S o p
5415 @kindex S o p (Summary)
5416 @findex gnus-summary-post-forward
5417 Forward the current article to a newsgroup
5418 (@code{gnus-summary-post-forward}).
5419  If no prefix is given, the message is forwarded according to the value
5420 of (@code{message-forward-as-mime}) and
5421 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5422 message and forward directly inline; if the prefix is 2, forward message
5423 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5424 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5425 directly inline; otherwise, the message is forwarded as no prefix given
5426 but use the flipped value of (@code{message-forward-as-mime}).  By
5427 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5428
5429 @item S O p
5430 @kindex S O p (Summary)
5431 @findex gnus-uu-digest-post-forward
5432 @cindex digests
5433 @cindex making digests
5434 Digest the current series and forward the result to a newsgroup
5435 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5436 process/prefix convention.
5437
5438 @item S u
5439 @kindex S u (Summary)
5440 @findex gnus-uu-post-news
5441 @c @icon{gnus-uu-post-news}
5442 Uuencode a file, split it into parts, and post it as a series
5443 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5444 @end table
5445
5446 Also @xref{Header Commands, ,Header Commands, message, The Message
5447 Manual}, for more information.
5448
5449
5450 @node Summary Message Commands
5451 @subsection Summary Message Commands
5452
5453 @table @kbd
5454 @item S y
5455 @kindex S y (Summary)
5456 @findex gnus-summary-yank-message
5457 Yank the current article into an already existing Message composition
5458 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5459 what message buffer you want to yank into, and understands the
5460 process/prefix convention (@pxref{Process/Prefix}).
5461
5462 @end table
5463
5464
5465 @node Canceling and Superseding
5466 @subsection Canceling Articles
5467 @cindex canceling articles
5468 @cindex superseding articles
5469
5470 Have you ever written something, and then decided that you really,
5471 really, really wish you hadn't posted that?
5472
5473 Well, you can't cancel mail, but you can cancel posts.
5474
5475 @findex gnus-summary-cancel-article
5476 @kindex C (Summary)
5477 @c @icon{gnus-summary-cancel-article}
5478 Find the article you wish to cancel (you can only cancel your own
5479 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5480 c} (@code{gnus-summary-cancel-article}).  Your article will be
5481 canceled---machines all over the world will be deleting your article.
5482 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5483
5484 Be aware, however, that not all sites honor cancels, so your article may
5485 live on here and there, while most sites will delete the article in
5486 question.
5487
5488 Gnus will use the ``current'' select method when canceling.  If you
5489 want to use the standard posting method, use the @samp{a} symbolic
5490 prefix (@pxref{Symbolic Prefixes}).
5491
5492 If you discover that you have made some mistakes and want to do some
5493 corrections, you can post a @dfn{superseding} article that will replace
5494 your original article.
5495
5496 @findex gnus-summary-supersede-article
5497 @kindex S (Summary)
5498 Go to the original article and press @kbd{S s}
5499 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5500 where you can edit the article all you want before sending it off the
5501 usual way.
5502
5503 The same goes for superseding as for canceling, only more so: Some
5504 sites do not honor superseding.  On those sites, it will appear that you
5505 have posted almost the same article twice.
5506
5507 If you have just posted the article, and change your mind right away,
5508 there is a trick you can use to cancel/supersede the article without
5509 waiting for the article to appear on your site first.  You simply return
5510 to the post buffer (which is called @code{*sent ...*}).  There you will
5511 find the article you just posted, with all the headers intact.  Change
5512 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5513 header by substituting one of those words for the word
5514 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5515 you would do normally.  The previous article will be
5516 canceled/superseded.
5517
5518 Just remember, kids: There is no 'c' in 'supersede'.
5519
5520 @node Delayed Articles
5521 @section Delayed Articles
5522 @cindex delayed sending
5523 @cindex send delayed
5524
5525 Sometimes, you might wish to delay the sending of a message.  For
5526 example, you might wish to arrange for a message to turn up just in time
5527 to remind your about the birthday of your Significant Other.  For this,
5528 there is the @code{gnus-delay} package.  Setup is simple:
5529
5530 @lisp
5531 (gnus-delay-initialize)
5532 @end lisp
5533
5534 @findex gnus-delay-article
5535 Normally, to send a message you use the @kbd{C-c C-c} command from
5536 Message mode.  To delay a message, use @kbd{C-c C-j}
5537 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5538 message should be delayed.  Possible answers are:
5539
5540 @itemize @bullet
5541 @item
5542 A time span.  Consists of an integer and a letter.  For example,
5543 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5544 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5545 (months) and @code{Y} (years).
5546
5547 @item
5548 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5549 delayed until that day, at a specific time (eight o'clock by default).
5550 See also @code{gnus-delay-default-hour}.
5551
5552 @item
5553 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5554 stuff.  The deadline will be at that time today, except if that time has
5555 already passed, then it's at the given time tomorrow.  So if it's ten
5556 o'clock in the morning and you specify @code{11:15}, then the deadline
5557 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5558 that means a time tomorrow.
5559 @end itemize
5560
5561 The action of the @code{gnus-delay-article} command is influenced by a
5562 couple of variables:
5563
5564 @table @code
5565 @item gnus-delay-default-hour
5566 @vindex gnus-delay-default-hour
5567 When you specify a specific date, the message will be due on that hour
5568 on the given date.  Possible values are integers 0 through 23.
5569
5570 @item gnus-delay-default-delay
5571 @vindex gnus-delay-default-delay
5572 This is a string and gives the default delay.  It can be of any of the
5573 formats described above.
5574
5575 @item gnus-delay-group
5576 @vindex gnus-delay-group
5577 Delayed articles will be kept in this group on the drafts server until
5578 they are due.  You probably don't need to change this.  The default
5579 value is @code{"delayed"}.
5580
5581 @item gnus-delay-header
5582 @vindex gnus-delay-header
5583 The deadline for each article will be stored in a header.  This variable
5584 is a string and gives the header name.  You probably don't need to
5585 change this.  The default value is @code{"X-Gnus-Delayed"}.
5586 @end table
5587
5588 The way delaying works is like this: when you use the
5589 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5590 calculates the deadline of the message and stores it in the
5591 @code{X-Gnus-Delayed} header and puts the message in the
5592 @code{nndraft:delayed} group.
5593
5594 @findex gnus-delay-send-queue
5595 And whenever you get new news, Gnus looks through the group for articles
5596 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5597 function for this.  By default, this function is added to the hook
5598 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5599 Maybe you want to use the demon to send drafts?  Just tell the demon to
5600 execute the @code{gnus-delay-send-queue} function.
5601
5602 @table @code
5603 @item gnus-delay-initialize
5604 @findex gnus-delay-initialize
5605 By default, this function installs @code{gnus-delay-send-queue} in
5606 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5607 argument @code{no-check}.  If it is non-@code{nil},
5608 @code{gnus-get-new-news-hook} is not changed.  The optional first
5609 argument is ignored.
5610
5611 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5612 Presumably, you want to use the demon for sending due delayed articles.
5613 Just don't forget to set that up :-)
5614 @end table
5615
5616
5617 @node Marking Articles
5618 @section Marking Articles
5619 @cindex article marking
5620 @cindex article ticking
5621 @cindex marks
5622
5623 There are several marks you can set on an article.
5624
5625 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5626 neologism ohoy!) of the article.  Alphabetic marks generally mean
5627 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5628
5629 In addition, you also have marks that do not affect readedness.
5630
5631 @menu
5632 * Unread Articles::             Marks for unread articles.
5633 * Read Articles::               Marks for read articles.
5634 * Other Marks::                 Marks that do not affect readedness.
5635 @end menu
5636
5637 @ifinfo
5638 There's a plethora of commands for manipulating these marks:
5639 @end ifinfo
5640
5641 @menu
5642 * Setting Marks::             How to set and remove marks.
5643 * Generic Marking Commands::  How to customize the marking.
5644 * Setting Process Marks::     How to mark articles for later processing.
5645 @end menu
5646
5647
5648 @node Unread Articles
5649 @subsection Unread Articles
5650
5651 The following marks mark articles as (kinda) unread, in one form or
5652 other.
5653
5654 @table @samp
5655 @item !
5656 @vindex gnus-ticked-mark
5657 Marked as ticked (@code{gnus-ticked-mark}).
5658
5659 @dfn{Ticked articles} are articles that will remain visible always.  If
5660 you see an article that you find interesting, or you want to put off
5661 reading it, or replying to it, until sometime later, you'd typically
5662 tick it.  However, articles can be expired (from news servers by the
5663 news server software, Gnus itself never expires ticked messages), so if
5664 you want to keep an article forever, you'll have to make it persistent
5665 (@pxref{Persistent Articles}).
5666
5667 @item ?
5668 @vindex gnus-dormant-mark
5669 Marked as dormant (@code{gnus-dormant-mark}).
5670
5671 @dfn{Dormant articles} will only appear in the summary buffer if there
5672 are followups to it.  If you want to see them even if they don't have
5673 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5674 Otherwise (except for the visibility issue), they are just like ticked
5675 messages.
5676
5677 @item SPACE
5678 @vindex gnus-unread-mark
5679 Marked as unread (@code{gnus-unread-mark}).
5680
5681 @dfn{Unread articles} are articles that haven't been read at all yet.
5682 @end table
5683
5684
5685 @node Read Articles
5686 @subsection Read Articles
5687 @cindex expirable mark
5688
5689 All the following marks mark articles as read.
5690
5691 @table @samp
5692
5693 @item r
5694 @vindex gnus-del-mark
5695 These are articles that the user has marked as read with the @kbd{d}
5696 command manually, more or less (@code{gnus-del-mark}).
5697
5698 @item R
5699 @vindex gnus-read-mark
5700 Articles that have actually been read (@code{gnus-read-mark}).
5701
5702 @item O
5703 @vindex gnus-ancient-mark
5704 Articles that were marked as read in previous sessions and are now
5705 @dfn{old} (@code{gnus-ancient-mark}).
5706
5707 @item K
5708 @vindex gnus-killed-mark
5709 Marked as killed (@code{gnus-killed-mark}).
5710
5711 @item X
5712 @vindex gnus-kill-file-mark
5713 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5714
5715 @item Y
5716 @vindex gnus-low-score-mark
5717 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5718
5719 @item C
5720 @vindex gnus-catchup-mark
5721 Marked as read by a catchup (@code{gnus-catchup-mark}).
5722
5723 @item G
5724 @vindex gnus-canceled-mark
5725 Canceled article (@code{gnus-canceled-mark})
5726
5727 @item F
5728 @vindex gnus-souped-mark
5729 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5730
5731 @item Q
5732 @vindex gnus-sparse-mark
5733 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5734 Threading}.
5735
5736 @item M
5737 @vindex gnus-duplicate-mark
5738 Article marked as read by duplicate suppression
5739 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5740
5741 @end table
5742
5743 All these marks just mean that the article is marked as read, really.
5744 They are interpreted differently when doing adaptive scoring, though.
5745
5746 One more special mark, though:
5747
5748 @table @samp
5749 @item E
5750 @vindex gnus-expirable-mark
5751 Marked as expirable (@code{gnus-expirable-mark}).
5752
5753 Marking articles as @dfn{expirable} (or have them marked as such
5754 automatically) doesn't make much sense in normal groups---a user doesn't
5755 control expiring of news articles, but in mail groups, for instance,
5756 articles marked as @dfn{expirable} can be deleted by Gnus at
5757 any time.
5758 @end table
5759
5760
5761 @node Other Marks
5762 @subsection Other Marks
5763 @cindex process mark
5764 @cindex bookmarks
5765
5766 There are some marks that have nothing to do with whether the article is
5767 read or not.
5768
5769 @itemize @bullet
5770
5771 @item
5772 You can set a bookmark in the current article.  Say you are reading a
5773 long thesis on cats' urinary tracts, and have to go home for dinner
5774 before you've finished reading the thesis.  You can then set a bookmark
5775 in the article, and Gnus will jump to this bookmark the next time it
5776 encounters the article.  @xref{Setting Marks}.
5777
5778 @item
5779 @vindex gnus-replied-mark
5780 All articles that you have replied to or made a followup to (i.e., have
5781 answered) will be marked with an @samp{A} in the second column
5782 (@code{gnus-replied-mark}).
5783
5784 @item
5785 @vindex gnus-forwarded-mark
5786 All articles that you have forwarded will be marked with an @samp{F} in
5787 the second column (@code{gnus-forwarded-mark}).
5788
5789 @item
5790 @vindex gnus-cached-mark
5791 Articles stored in the article cache will be marked with an @samp{*} in
5792 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5793
5794 @item
5795 @vindex gnus-saved-mark
5796 Articles ``saved'' (in some manner or other; not necessarily
5797 religiously) are marked with an @samp{S} in the second column
5798 (@code{gnus-saved-mark}).
5799
5800 @item
5801 @vindex gnus-recent-mark
5802 Articles that according to the server haven't been shown to the user
5803 before are marked with a @samp{N} in the second column
5804 (@code{gnus-recent-mark}).  Note that not all servers support this
5805 mark, in which case it simply never appears. Compare with
5806 @code{gnus-unseen-mark}.
5807
5808 @item
5809 @vindex gnus-unseen-mark
5810 Articles that haven't been seen before in Gnus by the user are marked
5811 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5812 Compare with @code{gnus-recent-mark}.
5813
5814 @item
5815 @vindex gnus-downloaded-mark
5816 When using the Gnus agent @pxref{Agent Basics}, articles may be
5817 downloaded for unplugged (offline) viewing.  If you are using the
5818 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5819 (The variable @code{gnus-downloaded-mark} controls which character to
5820 use.)
5821
5822 @item
5823 @vindex gnus-undownloaded-mark
5824 When using the Gnus agent @pxref{Agent Basics}, some articles might
5825 not have been downloaded.  Such articles cannot be viewed while you
5826 are unplugged (offline).  If you are using the @samp{%O} spec, these
5827 articles get the @samp{-} mark in that spec.  (The variable
5828 @code{gnus-undownloaded-mark} controls which character to use.)
5829
5830 @item
5831 @vindex gnus-downloadable-mark
5832 The Gnus agent @pxref{Agent Basics} downloads some articles
5833 automatically, but it is also possible to explicitly mark articles for
5834 download, even if they would not be downloaded automatically.  Such
5835 explicitly-marked articles get the @samp{%} mark in the first column.
5836 (The variable @code{gnus-downloadable-mark} controls which character to
5837 use.)
5838
5839 @item
5840 @vindex gnus-not-empty-thread-mark
5841 @vindex gnus-empty-thread-mark
5842 If the @samp{%e} spec is used, the presence of threads or not will be
5843 marked with @code{gnus-not-empty-thread-mark} and
5844 @code{gnus-empty-thread-mark} in the third column, respectively.
5845
5846 @item
5847 @vindex gnus-process-mark
5848 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5849 variety of commands react to the presence of the process mark.  For
5850 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5851 all articles that have been marked with the process mark.  Articles
5852 marked with the process mark have a @samp{#} in the second column.
5853
5854 @end itemize
5855
5856 You might have noticed that most of these ``non-readedness'' marks
5857 appear in the second column by default.  So if you have a cached, saved,
5858 replied article that you have process-marked, what will that look like?
5859
5860 Nothing much.  The precedence rules go as follows: process -> cache ->
5861 replied -> saved.  So if the article is in the cache and is replied,
5862 you'll only see the cache mark and not the replied mark.
5863
5864
5865 @node Setting Marks
5866 @subsection Setting Marks
5867 @cindex setting marks
5868
5869 All the marking commands understand the numeric prefix.
5870
5871 @table @kbd
5872 @item M c
5873 @itemx M-u
5874 @kindex M c (Summary)
5875 @kindex M-u (Summary)
5876 @findex gnus-summary-clear-mark-forward
5877 @cindex mark as unread
5878 Clear all readedness-marks from the current article
5879 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5880 article as unread.
5881
5882 @item M t
5883 @itemx !
5884 @kindex ! (Summary)
5885 @kindex M t (Summary)
5886 @findex gnus-summary-tick-article-forward
5887 Tick the current article (@code{gnus-summary-tick-article-forward}).
5888 @xref{Article Caching}.
5889
5890 @item M ?
5891 @itemx ?
5892 @kindex ? (Summary)
5893 @kindex M ? (Summary)
5894 @findex gnus-summary-mark-as-dormant
5895 Mark the current article as dormant
5896 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5897
5898 @item M d
5899 @itemx d
5900 @kindex M d (Summary)
5901 @kindex d (Summary)
5902 @findex gnus-summary-mark-as-read-forward
5903 Mark the current article as read
5904 (@code{gnus-summary-mark-as-read-forward}).
5905
5906 @item D
5907 @kindex D (Summary)
5908 @findex gnus-summary-mark-as-read-backward
5909 Mark the current article as read and move point to the previous line
5910 (@code{gnus-summary-mark-as-read-backward}).
5911
5912 @item M k
5913 @itemx k
5914 @kindex k (Summary)
5915 @kindex M k (Summary)
5916 @findex gnus-summary-kill-same-subject-and-select
5917 Mark all articles that have the same subject as the current one as read,
5918 and then select the next unread article
5919 (@code{gnus-summary-kill-same-subject-and-select}).
5920
5921 @item M K
5922 @itemx C-k
5923 @kindex M K (Summary)
5924 @kindex C-k (Summary)
5925 @findex gnus-summary-kill-same-subject
5926 Mark all articles that have the same subject as the current one as read
5927 (@code{gnus-summary-kill-same-subject}).
5928
5929 @item M C
5930 @kindex M C (Summary)
5931 @findex gnus-summary-catchup
5932 @c @icon{gnus-summary-catchup}
5933 Mark all unread articles as read (@code{gnus-summary-catchup}).
5934
5935 @item M C-c
5936 @kindex M C-c (Summary)
5937 @findex gnus-summary-catchup-all
5938 Mark all articles in the group as read---even the ticked and dormant
5939 articles (@code{gnus-summary-catchup-all}).
5940
5941 @item M H
5942 @kindex M H (Summary)
5943 @findex gnus-summary-catchup-to-here
5944 Catchup the current group to point (before the point)
5945 (@code{gnus-summary-catchup-to-here}).
5946
5947 @item M h
5948 @kindex M h (Summary)
5949 @findex gnus-summary-catchup-from-here
5950 Catchup the current group from point (after the point)
5951 (@code{gnus-summary-catchup-from-here}).
5952
5953 @item C-w
5954 @kindex C-w (Summary)
5955 @findex gnus-summary-mark-region-as-read
5956 Mark all articles between point and mark as read
5957 (@code{gnus-summary-mark-region-as-read}).
5958
5959 @item M V k
5960 @kindex M V k (Summary)
5961 @findex gnus-summary-kill-below
5962 Kill all articles with scores below the default score (or below the
5963 numeric prefix) (@code{gnus-summary-kill-below}).
5964
5965 @item M e
5966 @itemx E
5967 @kindex M e (Summary)
5968 @kindex E (Summary)
5969 @findex gnus-summary-mark-as-expirable
5970 Mark the current article as expirable
5971 (@code{gnus-summary-mark-as-expirable}).
5972
5973 @item M b
5974 @kindex M b (Summary)
5975 @findex gnus-summary-set-bookmark
5976 Set a bookmark in the current article
5977 (@code{gnus-summary-set-bookmark}).
5978
5979 @item M B
5980 @kindex M B (Summary)
5981 @findex gnus-summary-remove-bookmark
5982 Remove the bookmark from the current article
5983 (@code{gnus-summary-remove-bookmark}).
5984
5985 @item M V c
5986 @kindex M V c (Summary)
5987 @findex gnus-summary-clear-above
5988 Clear all marks from articles with scores over the default score (or
5989 over the numeric prefix) (@code{gnus-summary-clear-above}).
5990
5991 @item M V u
5992 @kindex M V u (Summary)
5993 @findex gnus-summary-tick-above
5994 Tick all articles with scores over the default score (or over the
5995 numeric prefix) (@code{gnus-summary-tick-above}).
5996
5997 @item M V m
5998 @kindex M V m (Summary)
5999 @findex gnus-summary-mark-above
6000 Prompt for a mark, and mark all articles with scores over the default
6001 score (or over the numeric prefix) with this mark
6002 (@code{gnus-summary-clear-above}).
6003 @end table
6004
6005 @vindex gnus-summary-goto-unread
6006 The @code{gnus-summary-goto-unread} variable controls what action should
6007 be taken after setting a mark.  If non-@code{nil}, point will move to
6008 the next/previous unread article.  If @code{nil}, point will just move
6009 one line up or down.  As a special case, if this variable is
6010 @code{never}, all the marking commands as well as other commands (like
6011 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6012 The default is @code{t}.
6013
6014
6015 @node Generic Marking Commands
6016 @subsection Generic Marking Commands
6017
6018 Some people would like the command that ticks an article (@kbd{!}) go to
6019 the next article.  Others would like it to go to the next unread
6020 article.  Yet others would like it to stay on the current article.  And
6021 even though I haven't heard of anybody wanting it to go to the
6022 previous (unread) article, I'm sure there are people that want that as
6023 well.
6024
6025 Multiply these five behaviors with five different marking commands, and
6026 you get a potentially complex set of variable to control what each
6027 command should do.
6028
6029 To sidestep that mess, Gnus provides commands that do all these
6030 different things.  They can be found on the @kbd{M M} map in the summary
6031 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6032 to list in this manual.
6033
6034 While you can use these commands directly, most users would prefer
6035 altering the summary mode keymap.  For instance, if you would like the
6036 @kbd{!} command to go to the next article instead of the next unread
6037 article, you could say something like:
6038
6039 @lisp
6040 @group
6041 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6042 (defun my-alter-summary-map ()
6043   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6044 @end group
6045 @end lisp
6046
6047 @noindent
6048 or
6049
6050 @lisp
6051 (defun my-alter-summary-map ()
6052   (local-set-key "!" "MM!n"))
6053 @end lisp
6054
6055
6056 @node Setting Process Marks
6057 @subsection Setting Process Marks
6058 @cindex setting process marks
6059
6060 Process marks are displayed as @code{#} in the summary buffer, and are
6061 used for marking articles in such a way that other commands will
6062 process these articles.  For instance, if you process mark four
6063 articles and then use the @kbd{*} command, Gnus will enter these four
6064 commands into the cache.  For more information,
6065 @pxref{Process/Prefix}.
6066
6067 @table @kbd
6068
6069 @item M P p
6070 @itemx #
6071 @kindex # (Summary)
6072 @kindex M P p (Summary)
6073 @findex gnus-summary-mark-as-processable
6074 Mark the current article with the process mark
6075 (@code{gnus-summary-mark-as-processable}).
6076 @findex gnus-summary-unmark-as-processable
6077
6078 @item M P u
6079 @itemx M-#
6080 @kindex M P u (Summary)
6081 @kindex M-# (Summary)
6082 Remove the process mark, if any, from the current article
6083 (@code{gnus-summary-unmark-as-processable}).
6084
6085 @item M P U
6086 @kindex M P U (Summary)
6087 @findex gnus-summary-unmark-all-processable
6088 Remove the process mark from all articles
6089 (@code{gnus-summary-unmark-all-processable}).
6090
6091 @item M P i
6092 @kindex M P i (Summary)
6093 @findex gnus-uu-invert-processable
6094 Invert the list of process marked articles
6095 (@code{gnus-uu-invert-processable}).
6096
6097 @item M P R
6098 @kindex M P R (Summary)
6099 @findex gnus-uu-mark-by-regexp
6100 Mark articles that have a @code{Subject} header that matches a regular
6101 expression (@code{gnus-uu-mark-by-regexp}).
6102
6103 @item M P G
6104 @kindex M P G (Summary)
6105 @findex gnus-uu-unmark-by-regexp
6106 Unmark articles that have a @code{Subject} header that matches a regular
6107 expression (@code{gnus-uu-unmark-by-regexp}).
6108
6109 @item M P r
6110 @kindex M P r (Summary)
6111 @findex gnus-uu-mark-region
6112 Mark articles in region (@code{gnus-uu-mark-region}).
6113
6114 @item M P g
6115 @kindex M P g
6116 @findex gnus-uu-unmark-region
6117 Unmark articles in region (@code{gnus-uu-unmark-region}).
6118
6119 @item M P t
6120 @kindex M P t (Summary)
6121 @findex gnus-uu-mark-thread
6122 Mark all articles in the current (sub)thread
6123 (@code{gnus-uu-mark-thread}).
6124
6125 @item M P T
6126 @kindex M P T (Summary)
6127 @findex gnus-uu-unmark-thread
6128 Unmark all articles in the current (sub)thread
6129 (@code{gnus-uu-unmark-thread}).
6130
6131 @item M P v
6132 @kindex M P v (Summary)
6133 @findex gnus-uu-mark-over
6134 Mark all articles that have a score above the prefix argument
6135 (@code{gnus-uu-mark-over}).
6136
6137 @item M P s
6138 @kindex M P s (Summary)
6139 @findex gnus-uu-mark-series
6140 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6141
6142 @item M P S
6143 @kindex M P S (Summary)
6144 @findex gnus-uu-mark-sparse
6145 Mark all series that have already had some articles marked
6146 (@code{gnus-uu-mark-sparse}).
6147
6148 @item M P a
6149 @kindex M P a (Summary)
6150 @findex gnus-uu-mark-all
6151 Mark all articles in series order (@code{gnus-uu-mark-series}).
6152
6153 @item M P b
6154 @kindex M P b (Summary)
6155 @findex gnus-uu-mark-buffer
6156 Mark all articles in the buffer in the order they appear
6157 (@code{gnus-uu-mark-buffer}).
6158
6159 @item M P k
6160 @kindex M P k (Summary)
6161 @findex gnus-summary-kill-process-mark
6162 Push the current process mark set onto the stack and unmark all articles
6163 (@code{gnus-summary-kill-process-mark}).
6164
6165 @item M P y
6166 @kindex M P y (Summary)
6167 @findex gnus-summary-yank-process-mark
6168 Pop the previous process mark set from the stack and restore it
6169 (@code{gnus-summary-yank-process-mark}).
6170
6171 @item M P w
6172 @kindex M P w (Summary)
6173 @findex gnus-summary-save-process-mark
6174 Push the current process mark set onto the stack
6175 (@code{gnus-summary-save-process-mark}).
6176
6177 @end table
6178
6179 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6180 set process marks based on article body contents.
6181
6182
6183 @node Limiting
6184 @section Limiting
6185 @cindex limiting
6186
6187 It can be convenient to limit the summary buffer to just show some
6188 subset of the articles currently in the group.  The effect most limit
6189 commands have is to remove a few (or many) articles from the summary
6190 buffer.
6191
6192 All limiting commands work on subsets of the articles already fetched
6193 from the servers.  None of these commands query the server for
6194 additional articles.
6195
6196 @table @kbd
6197
6198 @item / /
6199 @itemx / s
6200 @kindex / / (Summary)
6201 @findex gnus-summary-limit-to-subject
6202 Limit the summary buffer to articles that match some subject
6203 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6204 matching articles.
6205
6206 @item / a
6207 @kindex / a (Summary)
6208 @findex gnus-summary-limit-to-author
6209 Limit the summary buffer to articles that match some author
6210 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6211 matching articles.
6212
6213 @item / x
6214 @kindex / x (Summary)
6215 @findex gnus-summary-limit-to-extra
6216 Limit the summary buffer to articles that match one of the ``extra''
6217 headers (@pxref{To From Newsgroups})
6218 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6219 matching articles.
6220
6221 @item / u
6222 @itemx x
6223 @kindex / u (Summary)
6224 @kindex x (Summary)
6225 @findex gnus-summary-limit-to-unread
6226 Limit the summary buffer to articles not marked as read
6227 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6228 buffer to articles strictly unread.  This means that ticked and
6229 dormant articles will also be excluded.
6230
6231 @item / m
6232 @kindex / m (Summary)
6233 @findex gnus-summary-limit-to-marks
6234 Ask for a mark and then limit to all articles that have been marked
6235 with that mark (@code{gnus-summary-limit-to-marks}).
6236
6237 @item / t
6238 @kindex / t (Summary)
6239 @findex gnus-summary-limit-to-age
6240 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6241 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6242 articles younger than that number of days.
6243
6244 @item / n
6245 @kindex / n (Summary)
6246 @findex gnus-summary-limit-to-articles
6247 Limit the summary buffer to the current article
6248 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6249 convention (@pxref{Process/Prefix}).
6250
6251 @item / w
6252 @kindex / w (Summary)
6253 @findex gnus-summary-pop-limit
6254 Pop the previous limit off the stack and restore it
6255 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6256 the stack.
6257
6258 @item / .
6259 @kindex / . (Summary)
6260 @findex gnus-summary-limit-to-unseen
6261 Limit the summary buffer to the unseen articles
6262 (@code{gnus-summary-limit-to-unseen}).
6263
6264 @item / v
6265 @kindex / v (Summary)
6266 @findex gnus-summary-limit-to-score
6267 Limit the summary buffer to articles that have a score at or above some
6268 score (@code{gnus-summary-limit-to-score}).
6269
6270 @item / p
6271 @kindex / p (Summary)
6272 @findex gnus-summary-limit-to-display-predicate
6273 Limit the summary buffer to articles that satisfy the @code{display}
6274 group parameter predicate
6275 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6276 Parameters} for more on this predicate.
6277
6278 @item / E
6279 @itemx M S
6280 @kindex M S (Summary)
6281 @kindex / E (Summary)
6282 @findex gnus-summary-limit-include-expunged
6283 Include all expunged articles in the limit
6284 (@code{gnus-summary-limit-include-expunged}).
6285
6286 @item / D
6287 @kindex / D (Summary)
6288 @findex gnus-summary-limit-include-dormant
6289 Include all dormant articles in the limit
6290 (@code{gnus-summary-limit-include-dormant}).
6291
6292 @item / *
6293 @kindex / * (Summary)
6294 @findex gnus-summary-limit-include-cached
6295 Include all cached articles in the limit
6296 (@code{gnus-summary-limit-include-cached}).
6297
6298 @item / d
6299 @kindex / d (Summary)
6300 @findex gnus-summary-limit-exclude-dormant
6301 Exclude all dormant articles from the limit
6302 (@code{gnus-summary-limit-exclude-dormant}).
6303
6304 @item / M
6305 @kindex / M (Summary)
6306 @findex gnus-summary-limit-exclude-marks
6307 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6308
6309 @item / T
6310 @kindex / T (Summary)
6311 @findex gnus-summary-limit-include-thread
6312 Include all the articles in the current thread in the limit.
6313
6314 @item / c
6315 @kindex / c (Summary)
6316 @findex gnus-summary-limit-exclude-childless-dormant
6317 Exclude all dormant articles that have no children from the limit@*
6318 (@code{gnus-summary-limit-exclude-childless-dormant}).
6319
6320 @item / C
6321 @kindex / C (Summary)
6322 @findex gnus-summary-limit-mark-excluded-as-read
6323 Mark all excluded unread articles as read
6324 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6325 also mark excluded ticked and dormant articles as read.
6326
6327 @item / N
6328 @kindex / N (Summary)
6329 @findex gnus-summary-insert-new-articles
6330 Insert all new articles in the summary buffer. It scans for new emails
6331 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6332
6333 @item / o
6334 @kindex / o (Summary)
6335 @findex gnus-summary-insert-old-articles
6336 Insert all old articles in the summary buffer. If given a numbered
6337 prefix, fetch this number of articles.
6338
6339 @end table
6340
6341
6342 @node Threading
6343 @section Threading
6344 @cindex threading
6345 @cindex article threading
6346
6347 Gnus threads articles by default.  @dfn{To thread} is to put responses
6348 to articles directly after the articles they respond to---in a
6349 hierarchical fashion.
6350
6351 Threading is done by looking at the @code{References} headers of the
6352 articles.  In a perfect world, this would be enough to build pretty
6353 trees, but unfortunately, the @code{References} header is often broken
6354 or simply missing.  Weird news propagation exacerbates the problem,
6355 so one has to employ other heuristics to get pleasing results.  A
6356 plethora of approaches exists, as detailed in horrible detail in
6357 @pxref{Customizing Threading}.
6358
6359 First, a quick overview of the concepts:
6360
6361 @table @dfn
6362 @item root
6363 The top-most article in a thread; the first article in the thread.
6364
6365 @item thread
6366 A tree-like article structure.
6367
6368 @item sub-thread
6369 A small(er) section of this tree-like structure.
6370
6371 @item loose threads
6372 Threads often lose their roots due to article expiry, or due to the root
6373 already having been read in a previous session, and not displayed in the
6374 summary buffer.  We then typically have many sub-threads that really
6375 belong to one thread, but are without connecting roots.  These are
6376 called loose threads.
6377
6378 @item thread gathering
6379 An attempt to gather loose threads into bigger threads.
6380
6381 @item sparse threads
6382 A thread where the missing articles have been ``guessed'' at, and are
6383 displayed as empty lines in the summary buffer.
6384
6385 @end table
6386
6387
6388 @menu
6389 * Customizing Threading::       Variables you can change to affect the threading.
6390 * Thread Commands::             Thread based commands in the summary buffer.
6391 @end menu
6392
6393
6394 @node Customizing Threading
6395 @subsection Customizing Threading
6396 @cindex customizing threading
6397
6398 @menu
6399 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6400 * Filling In Threads::          Making the threads displayed look fuller.
6401 * More Threading::              Even more variables for fiddling with threads.
6402 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6403 @end menu
6404
6405
6406 @node Loose Threads
6407 @subsubsection Loose Threads
6408 @cindex <
6409 @cindex >
6410 @cindex loose threads
6411
6412 @table @code
6413 @item gnus-summary-make-false-root
6414 @vindex gnus-summary-make-false-root
6415 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6416 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6417 Yup.)  Loose subtrees occur when the real root has expired, or you've
6418 read or killed the root in a previous session.
6419
6420 When there is no real root of a thread, Gnus will have to fudge
6421 something.  This variable says what fudging method Gnus should use.
6422 There are four possible values:
6423
6424 @iftex
6425 @iflatex
6426 \gnusfigure{The Summary Buffer}{390}{
6427 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6428 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6429 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6430 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6431 }
6432 @end iflatex
6433 @end iftex
6434
6435 @cindex adopting articles
6436
6437 @table @code
6438
6439 @item adopt
6440 Gnus will make the first of the orphaned articles the parent.  This
6441 parent will adopt all the other articles.  The adopted articles will be
6442 marked as such by pointy brackets (@samp{<>}) instead of the standard
6443 square brackets (@samp{[]}).  This is the default method.
6444
6445 @item dummy
6446 @vindex gnus-summary-dummy-line-format
6447 @vindex gnus-summary-make-false-root-always
6448 Gnus will create a dummy summary line that will pretend to be the
6449 parent.  This dummy line does not correspond to any real article, so
6450 selecting it will just select the first real article after the dummy
6451 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6452 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6453 which is the subject of the article.  @xref{Formatting Variables}.
6454 If you want all threads to have a dummy root, even the non-gathered
6455 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6456
6457 @item empty
6458 Gnus won't actually make any article the parent, but simply leave the
6459 subject field of all orphans except the first empty.  (Actually, it will
6460 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6461 Buffer Format}).)
6462
6463 @item none
6464 Don't make any article parent at all.  Just gather the threads and
6465 display them after one another.
6466
6467 @item nil
6468 Don't gather loose threads.
6469 @end table
6470
6471 @item gnus-summary-gather-subject-limit
6472 @vindex gnus-summary-gather-subject-limit
6473 Loose threads are gathered by comparing subjects of articles.  If this
6474 variable is @code{nil}, Gnus requires an exact match between the
6475 subjects of the loose threads before gathering them into one big
6476 super-thread.  This might be too strict a requirement, what with the
6477 presence of stupid newsreaders that chop off long subject lines.  If
6478 you think so, set this variable to, say, 20 to require that only the
6479 first 20 characters of the subjects have to match.  If you set this
6480 variable to a really low number, you'll find that Gnus will gather
6481 everything in sight into one thread, which isn't very helpful.
6482
6483 @cindex fuzzy article gathering
6484 If you set this variable to the special value @code{fuzzy}, Gnus will
6485 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6486 Matching}).
6487
6488 @item gnus-simplify-subject-fuzzy-regexp
6489 @vindex gnus-simplify-subject-fuzzy-regexp
6490 This can either be a regular expression or list of regular expressions
6491 that match strings that will be removed from subjects if fuzzy subject
6492 simplification is used.
6493
6494 @item gnus-simplify-ignored-prefixes
6495 @vindex gnus-simplify-ignored-prefixes
6496 If you set @code{gnus-summary-gather-subject-limit} to something as low
6497 as 10, you might consider setting this variable to something sensible:
6498
6499 @c Written by Michael Ernst <mernst@cs.rice.edu>
6500 @lisp
6501 (setq gnus-simplify-ignored-prefixes
6502       (concat
6503        "\\`\\[?\\("
6504        (mapconcat
6505         'identity
6506         '("looking"
6507           "wanted" "followup" "summary\\( of\\)?"
6508           "help" "query" "problem" "question"
6509           "answer" "reference" "announce"
6510           "How can I" "How to" "Comparison of"
6511           ;; ...
6512           )
6513         "\\|")
6514        "\\)\\s *\\("
6515        (mapconcat 'identity
6516                   '("for" "for reference" "with" "about")
6517                   "\\|")
6518        "\\)?\\]?:?[ \t]*"))
6519 @end lisp
6520
6521 All words that match this regexp will be removed before comparing two
6522 subjects.
6523
6524 @item gnus-simplify-subject-functions
6525 @vindex gnus-simplify-subject-functions
6526 If non-@code{nil}, this variable overrides
6527 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6528 list of functions to apply to the @code{Subject} string iteratively to
6529 arrive at the simplified version of the string.
6530
6531 Useful functions to put in this list include:
6532
6533 @table @code
6534 @item gnus-simplify-subject-re
6535 @findex gnus-simplify-subject-re
6536 Strip the leading @samp{Re:}.
6537
6538 @item gnus-simplify-subject-fuzzy
6539 @findex gnus-simplify-subject-fuzzy
6540 Simplify fuzzily.
6541
6542 @item gnus-simplify-whitespace
6543 @findex gnus-simplify-whitespace
6544 Remove excessive whitespace.
6545
6546 @item gnus-simplify-all-whitespace
6547 @findex gnus-simplify-all-whitespace
6548 Remove all whitespace.
6549 @end table
6550
6551 You may also write your own functions, of course.
6552
6553
6554 @item gnus-summary-gather-exclude-subject
6555 @vindex gnus-summary-gather-exclude-subject
6556 Since loose thread gathering is done on subjects only, that might lead
6557 to many false hits, especially with certain common subjects like
6558 @samp{} and @samp{(none)}.  To make the situation slightly better,
6559 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6560 what subjects should be excluded from the gathering process.@*
6561 The default is @samp{^ *$\\|^(none)$}.
6562
6563 @item gnus-summary-thread-gathering-function
6564 @vindex gnus-summary-thread-gathering-function
6565 Gnus gathers threads by looking at @code{Subject} headers.  This means
6566 that totally unrelated articles may end up in the same ``thread'', which
6567 is confusing.  An alternate approach is to look at all the
6568 @code{Message-ID}s in all the @code{References} headers to find matches.
6569 This will ensure that no gathered threads ever include unrelated
6570 articles, but it also means that people who have posted with broken
6571 newsreaders won't be gathered properly.  The choice is yours---plague or
6572 cholera:
6573
6574 @table @code
6575 @item gnus-gather-threads-by-subject
6576 @findex gnus-gather-threads-by-subject
6577 This function is the default gathering function and looks at
6578 @code{Subject}s exclusively.
6579
6580 @item gnus-gather-threads-by-references
6581 @findex gnus-gather-threads-by-references
6582 This function looks at @code{References} headers exclusively.
6583 @end table
6584
6585 If you want to test gathering by @code{References}, you could say
6586 something like:
6587
6588 @lisp
6589 (setq gnus-summary-thread-gathering-function
6590       'gnus-gather-threads-by-references)
6591 @end lisp
6592
6593 @end table
6594
6595
6596 @node Filling In Threads
6597 @subsubsection Filling In Threads
6598
6599 @table @code
6600 @item gnus-fetch-old-headers
6601 @vindex gnus-fetch-old-headers
6602 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6603 more old headers---headers to articles marked as read.  If you
6604 would like to display as few summary lines as possible, but still
6605 connect as many loose threads as possible, you should set this variable
6606 to @code{some} or a number.  If you set it to a number, no more than
6607 that number of extra old headers will be fetched.  In either case,
6608 fetching old headers only works if the back end you are using carries
6609 overview files---this would normally be @code{nntp}, @code{nnspool},
6610 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6611 the thread has been expired by the server, there's not much Gnus can do
6612 about that.
6613
6614 This variable can also be set to @code{invisible}.  This won't have any
6615 visible effects, but is useful if you use the @kbd{A T} command a lot
6616 (@pxref{Finding the Parent}).
6617
6618 @item gnus-fetch-old-ephemeral-headers
6619 @vindex gnus-fetch-old-ephemeral-headers
6620 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6621 newsgroups.
6622
6623 @item gnus-build-sparse-threads
6624 @vindex gnus-build-sparse-threads
6625 Fetching old headers can be slow.  A low-rent similar effect can be
6626 gotten by setting this variable to @code{some}.  Gnus will then look at
6627 the complete @code{References} headers of all articles and try to string
6628 together articles that belong in the same thread.  This will leave
6629 @dfn{gaps} in the threading display where Gnus guesses that an article
6630 is missing from the thread.  (These gaps appear like normal summary
6631 lines.  If you select a gap, Gnus will try to fetch the article in
6632 question.)  If this variable is @code{t}, Gnus will display all these
6633 ``gaps'' without regard for whether they are useful for completing the
6634 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6635 off sparse leaf nodes that don't lead anywhere.  This variable is
6636 @code{nil} by default.
6637
6638 @item gnus-read-all-available-headers
6639 @vindex gnus-read-all-available-headers
6640 This is a rather obscure variable that few will find useful.  It's
6641 intended for those non-news newsgroups where the back end has to fetch
6642 quite a lot to present the summary buffer, and where it's impossible to
6643 go back to parents of articles.  This is mostly the case in the
6644 web-based groups, like the @code{nnultimate} groups.
6645
6646 If you don't use those, then it's safe to leave this as the default
6647 @code{nil}.  If you want to use this variable, it should be a regexp
6648 that matches the group name, or @code{t} for all groups.
6649
6650 @end table
6651
6652
6653 @node More Threading
6654 @subsubsection More Threading
6655
6656 @table @code
6657 @item gnus-show-threads
6658 @vindex gnus-show-threads
6659 If this variable is @code{nil}, no threading will be done, and all of
6660 the rest of the variables here will have no effect.  Turning threading
6661 off will speed group selection up a bit, but it is sure to make reading
6662 slower and more awkward.
6663
6664 @item gnus-thread-hide-subtree
6665 @vindex gnus-thread-hide-subtree
6666 If non-@code{nil}, all threads will be hidden when the summary buffer is
6667 generated.
6668
6669 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6670 Available predicates are @code{gnus-article-unread-p} and
6671 @code{gnus-article-unseen-p}.
6672
6673 Here's an example:
6674
6675 @lisp
6676 (setq gnus-thread-hide-subtree
6677       '(or gnus-article-unread-p
6678            gnus-article-unseen-p))
6679 @end lisp
6680
6681 (It's a pretty nonsensical example, since all unseen articles are also
6682 unread, but you get my drift.)
6683
6684
6685 @item gnus-thread-expunge-below
6686 @vindex gnus-thread-expunge-below
6687 All threads that have a total score (as defined by
6688 @code{gnus-thread-score-function}) less than this number will be
6689 expunged.  This variable is @code{nil} by default, which means that no
6690 threads are expunged.
6691
6692 @item gnus-thread-hide-killed
6693 @vindex gnus-thread-hide-killed
6694 if you kill a thread and this variable is non-@code{nil}, the subtree
6695 will be hidden.
6696
6697 @item gnus-thread-ignore-subject
6698 @vindex gnus-thread-ignore-subject
6699 Sometimes somebody changes the subject in the middle of a thread.  If
6700 this variable is non-@code{nil}, which is the default, the subject
6701 change is ignored.  If it is @code{nil}, a change in the subject will
6702 result in a new thread.
6703
6704 @item gnus-thread-indent-level
6705 @vindex gnus-thread-indent-level
6706 This is a number that says how much each sub-thread should be indented.
6707 The default is 4.
6708
6709 @item gnus-sort-gathered-threads-function
6710 @vindex gnus-sort-gathered-threads-function
6711 Sometimes, particularly with mailing lists, the order in which mails
6712 arrive locally is not necessarily the same as the order in which they
6713 arrived on the mailing list.  Consequently, when sorting sub-threads
6714 using the default @code{gnus-thread-sort-by-number}, responses can end
6715 up appearing before the article to which they are responding to.
6716 Setting this variable to an alternate value
6717 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6718 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6719 more logical sub-thread ordering in such instances.
6720
6721 @end table
6722
6723
6724 @node Low-Level Threading
6725 @subsubsection Low-Level Threading
6726
6727 @table @code
6728
6729 @item gnus-parse-headers-hook
6730 @vindex gnus-parse-headers-hook
6731 Hook run before parsing any headers.
6732
6733 @item gnus-alter-header-function
6734 @vindex gnus-alter-header-function
6735 If non-@code{nil}, this function will be called to allow alteration of
6736 article header structures.  The function is called with one parameter,
6737 the article header vector, which it may alter in any way.  For instance,
6738 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6739 in systematic ways (by adding prefixes and such), you can use this
6740 variable to un-scramble the @code{Message-ID}s so that they are more
6741 meaningful.  Here's one example:
6742
6743 @lisp
6744 (setq gnus-alter-header-function 'my-alter-message-id)
6745
6746 (defun my-alter-message-id (header)
6747   (let ((id (mail-header-id header)))
6748     (when (string-match
6749            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6750       (mail-header-set-id
6751        (concat (match-string 1 id) "@@" (match-string 2 id))
6752        header))))
6753 @end lisp
6754
6755 @end table
6756
6757
6758 @node Thread Commands
6759 @subsection Thread Commands
6760 @cindex thread commands
6761
6762 @table @kbd
6763
6764 @item T k
6765 @itemx C-M-k
6766 @kindex T k (Summary)
6767 @kindex C-M-k (Summary)
6768 @findex gnus-summary-kill-thread
6769 Mark all articles in the current (sub-)thread as read
6770 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6771 remove all marks instead.  If the prefix argument is negative, tick
6772 articles instead.
6773
6774 @item T l
6775 @itemx C-M-l
6776 @kindex T l (Summary)
6777 @kindex C-M-l (Summary)
6778 @findex gnus-summary-lower-thread
6779 Lower the score of the current (sub-)thread
6780 (@code{gnus-summary-lower-thread}).
6781
6782 @item T i
6783 @kindex T i (Summary)
6784 @findex gnus-summary-raise-thread
6785 Increase the score of the current (sub-)thread
6786 (@code{gnus-summary-raise-thread}).
6787
6788 @item T #
6789 @kindex T # (Summary)
6790 @findex gnus-uu-mark-thread
6791 Set the process mark on the current (sub-)thread
6792 (@code{gnus-uu-mark-thread}).
6793
6794 @item T M-#
6795 @kindex T M-# (Summary)
6796 @findex gnus-uu-unmark-thread
6797 Remove the process mark from the current (sub-)thread
6798 (@code{gnus-uu-unmark-thread}).
6799
6800 @item T T
6801 @kindex T T (Summary)
6802 @findex gnus-summary-toggle-threads
6803 Toggle threading (@code{gnus-summary-toggle-threads}).
6804
6805 @item T s
6806 @kindex T s (Summary)
6807 @findex gnus-summary-show-thread
6808 Expose the (sub-)thread hidden under the current article, if any@*
6809 (@code{gnus-summary-show-thread}).
6810
6811 @item T h
6812 @kindex T h (Summary)
6813 @findex gnus-summary-hide-thread
6814 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6815
6816 @item T S
6817 @kindex T S (Summary)
6818 @findex gnus-summary-show-all-threads
6819 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6820
6821 @item T H
6822 @kindex T H (Summary)
6823 @findex gnus-summary-hide-all-threads
6824 Hide all threads (@code{gnus-summary-hide-all-threads}).
6825
6826 @item T t
6827 @kindex T t (Summary)
6828 @findex gnus-summary-rethread-current
6829 Re-thread the current article's thread
6830 (@code{gnus-summary-rethread-current}).  This works even when the
6831 summary buffer is otherwise unthreaded.
6832
6833 @item T ^
6834 @kindex T ^ (Summary)
6835 @findex gnus-summary-reparent-thread
6836 Make the current article the child of the marked (or previous) article
6837 (@code{gnus-summary-reparent-thread}).
6838
6839 @end table
6840
6841 The following commands are thread movement commands.  They all
6842 understand the numeric prefix.
6843
6844 @table @kbd
6845
6846 @item T n
6847 @kindex T n (Summary)
6848 @itemx C-M-f
6849 @kindex C-M-n (Summary)
6850 @itemx M-down
6851 @kindex M-down (Summary)
6852 @findex gnus-summary-next-thread
6853 Go to the next thread (@code{gnus-summary-next-thread}).
6854
6855 @item T p
6856 @kindex T p (Summary)
6857 @itemx C-M-b
6858 @kindex C-M-p (Summary)
6859 @itemx M-up
6860 @kindex M-up (Summary)
6861 @findex gnus-summary-prev-thread
6862 Go to the previous thread (@code{gnus-summary-prev-thread}).
6863
6864 @item T d
6865 @kindex T d (Summary)
6866 @findex gnus-summary-down-thread
6867 Descend the thread (@code{gnus-summary-down-thread}).
6868
6869 @item T u
6870 @kindex T u (Summary)
6871 @findex gnus-summary-up-thread
6872 Ascend the thread (@code{gnus-summary-up-thread}).
6873
6874 @item T o
6875 @kindex T o (Summary)
6876 @findex gnus-summary-top-thread
6877 Go to the top of the thread (@code{gnus-summary-top-thread}).
6878 @end table
6879
6880 @vindex gnus-thread-operation-ignore-subject
6881 If you ignore subject while threading, you'll naturally end up with
6882 threads that have several different subjects in them.  If you then issue
6883 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6884 wish to kill the entire thread, but just those parts of the thread that
6885 have the same subject as the current article.  If you like this idea,
6886 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6887 is non-@code{nil} (which it is by default), subjects will be ignored
6888 when doing thread commands.  If this variable is @code{nil}, articles in
6889 the same thread with different subjects will not be included in the
6890 operation in question.  If this variable is @code{fuzzy}, only articles
6891 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6892 Matching}).
6893
6894
6895 @node Sorting the Summary Buffer
6896 @section Sorting the Summary Buffer
6897
6898 @findex gnus-thread-sort-by-total-score
6899 @findex gnus-thread-sort-by-date
6900 @findex gnus-thread-sort-by-score
6901 @findex gnus-thread-sort-by-subject
6902 @findex gnus-thread-sort-by-author
6903 @findex gnus-thread-sort-by-number
6904 @findex gnus-thread-sort-by-random
6905 @vindex gnus-thread-sort-functions
6906 @findex gnus-thread-sort-by-most-recent-thread
6907 If you are using a threaded summary display, you can sort the threads by
6908 setting @code{gnus-thread-sort-functions}, which can be either a single
6909 function, a list of functions, or a list containing functions and
6910 @code{(not some-function)} elements.
6911
6912 By default, sorting is done on article numbers.  Ready-made sorting
6913 predicate functions include @code{gnus-thread-sort-by-number},
6914 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6915 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6916 @code{gnus-thread-sort-by-most-recent-number},
6917 @code{gnus-thread-sort-by-most-recent-date},
6918 @code{gnus-thread-sort-by-random} and
6919 @code{gnus-thread-sort-by-total-score}.
6920
6921 Each function takes two threads and returns non-@code{nil} if the first
6922 thread should be sorted before the other.  Note that sorting really is
6923 normally done by looking only at the roots of each thread.
6924
6925 If you use more than one function, the primary sort key should be the
6926 last function in the list.  You should probably always include
6927 @code{gnus-thread-sort-by-number} in the list of sorting
6928 functions---preferably first.  This will ensure that threads that are
6929 equal with respect to the other sort criteria will be displayed in
6930 ascending article order.
6931
6932 If you would like to sort by reverse score, then by subject, and finally
6933 by number, you could do something like:
6934
6935 @lisp
6936 (setq gnus-thread-sort-functions
6937       '(gnus-thread-sort-by-number
6938         gnus-thread-sort-by-subject
6939         (not gnus-thread-sort-by-total-score)))
6940 @end lisp
6941
6942 The threads that have highest score will be displayed first in the
6943 summary buffer.  When threads have the same score, they will be sorted
6944 alphabetically.  The threads that have the same score and the same
6945 subject will be sorted by number, which is (normally) the sequence in
6946 which the articles arrived.
6947
6948 If you want to sort by score and then reverse arrival order, you could
6949 say something like:
6950
6951 @lisp
6952 (setq gnus-thread-sort-functions
6953       '((lambda (t1 t2)
6954           (not (gnus-thread-sort-by-number t1 t2)))
6955         gnus-thread-sort-by-score))
6956 @end lisp
6957
6958 @vindex gnus-thread-score-function
6959 The function in the @code{gnus-thread-score-function} variable (default
6960 @code{+}) is used for calculating the total score of a thread.  Useful
6961 functions might be @code{max}, @code{min}, or squared means, or whatever
6962 tickles your fancy.
6963
6964 @findex gnus-article-sort-functions
6965 @findex gnus-article-sort-by-date
6966 @findex gnus-article-sort-by-score
6967 @findex gnus-article-sort-by-subject
6968 @findex gnus-article-sort-by-author
6969 @findex gnus-article-sort-by-random
6970 @findex gnus-article-sort-by-number
6971 If you are using an unthreaded display for some strange reason or
6972 other, you have to fiddle with the @code{gnus-article-sort-functions}
6973 variable.  It is very similar to the
6974 @code{gnus-thread-sort-functions}, except that it uses slightly
6975 different functions for article comparison.  Available sorting
6976 predicate functions are @code{gnus-article-sort-by-number},
6977 @code{gnus-article-sort-by-author},
6978 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6979 @code{gnus-article-sort-by-random}, and
6980 @code{gnus-article-sort-by-score}.
6981
6982 If you want to sort an unthreaded summary display by subject, you could
6983 say something like:
6984
6985 @lisp
6986 (setq gnus-article-sort-functions
6987       '(gnus-article-sort-by-number
6988         gnus-article-sort-by-subject))
6989 @end lisp
6990
6991
6992
6993 @node Asynchronous Fetching
6994 @section Asynchronous Article Fetching
6995 @cindex asynchronous article fetching
6996 @cindex article pre-fetch
6997 @cindex pre-fetch
6998
6999 If you read your news from an @acronym{NNTP} server that's far away, the
7000 network latencies may make reading articles a chore.  You have to wait
7001 for a while after pressing @kbd{n} to go to the next article before the
7002 article appears.  Why can't Gnus just go ahead and fetch the article
7003 while you are reading the previous one?  Why not, indeed.
7004
7005 First, some caveats.  There are some pitfalls to using asynchronous
7006 article fetching, especially the way Gnus does it.
7007
7008 Let's say you are reading article 1, which is short, and article 2 is
7009 quite long, and you are not interested in reading that.  Gnus does not
7010 know this, so it goes ahead and fetches article 2.  You decide to read
7011 article 3, but since Gnus is in the process of fetching article 2, the
7012 connection is blocked.
7013
7014 To avoid these situations, Gnus will open two (count 'em two)
7015 connections to the server.  Some people may think this isn't a very nice
7016 thing to do, but I don't see any real alternatives.  Setting up that
7017 extra connection takes some time, so Gnus startup will be slower.
7018
7019 Gnus will fetch more articles than you will read.  This will mean that
7020 the link between your machine and the @acronym{NNTP} server will become more
7021 loaded than if you didn't use article pre-fetch.  The server itself will
7022 also become more loaded---both with the extra article requests, and the
7023 extra connection.
7024
7025 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7026 you really want to.
7027
7028 @vindex gnus-asynchronous
7029 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7030 happen automatically.
7031
7032 @vindex gnus-use-article-prefetch
7033 You can control how many articles are to be pre-fetched by setting
7034 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7035 that when you read an article in the group, the back end will pre-fetch
7036 the next 30 articles.  If this variable is @code{t}, the back end will
7037 pre-fetch all the articles it can without bound.  If it is
7038 @code{nil}, no pre-fetching will be done.
7039
7040 @vindex gnus-async-prefetch-article-p
7041 @findex gnus-async-read-p
7042 There are probably some articles that you don't want to pre-fetch---read
7043 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7044 variable controls whether an article is to be pre-fetched.  This
7045 function should return non-@code{nil} when the article in question is
7046 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7047 returns @code{nil} on read articles.  The function is called with an
7048 article data structure as the only parameter.
7049
7050 If, for instance, you wish to pre-fetch only unread articles shorter
7051 than 100 lines, you could say something like:
7052
7053 @lisp
7054 (defun my-async-short-unread-p (data)
7055   "Return non-nil for short, unread articles."
7056   (and (gnus-data-unread-p data)
7057        (< (mail-header-lines (gnus-data-header data))
7058           100)))
7059
7060 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7061 @end lisp
7062
7063 These functions will be called many, many times, so they should
7064 preferably be short and sweet to avoid slowing down Gnus too much.
7065 It's probably a good idea to byte-compile things like this.
7066
7067 @vindex gnus-prefetched-article-deletion-strategy
7068 Articles have to be removed from the asynch buffer sooner or later.  The
7069 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7070 articles.  This is a list that may contain the following elements:
7071
7072 @table @code
7073 @item read
7074 Remove articles when they are read.
7075
7076 @item exit
7077 Remove articles when exiting the group.
7078 @end table
7079
7080 The default value is @code{(read exit)}.
7081
7082 @c @vindex gnus-use-header-prefetch
7083 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7084 @c from the next group.
7085
7086
7087 @node Article Caching
7088 @section Article Caching
7089 @cindex article caching
7090 @cindex caching
7091
7092 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7093 consider turning article caching on.  Each article will then be stored
7094 locally under your home directory.  As you may surmise, this could
7095 potentially use @emph{huge} amounts of disk space, as well as eat up all
7096 your inodes so fast it will make your head swim.  In vodka.
7097
7098 Used carefully, though, it could be just an easier way to save articles.
7099
7100 @vindex gnus-use-long-file-name
7101 @vindex gnus-cache-directory
7102 @vindex gnus-use-cache
7103 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7104 all articles ticked or marked as dormant will then be copied
7105 over to your local cache (@code{gnus-cache-directory}).  Whether this
7106 cache is flat or hierarchical is controlled by the
7107 @code{gnus-use-long-file-name} variable, as usual.
7108
7109 When re-selecting a ticked or dormant article, it will be fetched from the
7110 cache instead of from the server.  As articles in your cache will never
7111 expire, this might serve as a method of saving articles while still
7112 keeping them where they belong.  Just mark all articles you want to save
7113 as dormant, and don't worry.
7114
7115 When an article is marked as read, is it removed from the cache.
7116
7117 @vindex gnus-cache-remove-articles
7118 @vindex gnus-cache-enter-articles
7119 The entering/removal of articles from the cache is controlled by the
7120 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7121 variables.  Both are lists of symbols.  The first is @code{(ticked
7122 dormant)} by default, meaning that ticked and dormant articles will be
7123 put in the cache.  The latter is @code{(read)} by default, meaning that
7124 articles marked as read are removed from the cache.  Possibly
7125 symbols in these two lists are @code{ticked}, @code{dormant},
7126 @code{unread} and @code{read}.
7127
7128 @findex gnus-jog-cache
7129 So where does the massive article-fetching and storing come into the
7130 picture?  The @code{gnus-jog-cache} command will go through all
7131 subscribed newsgroups, request all unread articles, score them, and
7132 store them in the cache.  You should only ever, ever ever ever, use this
7133 command if 1) your connection to the @acronym{NNTP} server is really, really,
7134 really slow and 2) you have a really, really, really huge disk.
7135 Seriously.  One way to cut down on the number of articles downloaded is
7136 to score unwanted articles down and have them marked as read.  They will
7137 not then be downloaded by this command.
7138
7139 @vindex gnus-uncacheable-groups
7140 @vindex gnus-cacheable-groups
7141 It is likely that you do not want caching on all groups.  For instance,
7142 if your @code{nnml} mail is located under your home directory, it makes no
7143 sense to cache it somewhere else under your home directory.  Unless you
7144 feel that it's neat to use twice as much space.
7145
7146 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7147 regexp of groups to cache, @samp{^nntp} for instance, or set the
7148 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7149 Both variables are @code{nil} by default.  If a group matches both
7150 variables, the group is not cached.
7151
7152 @findex gnus-cache-generate-nov-databases
7153 @findex gnus-cache-generate-active
7154 @vindex gnus-cache-active-file
7155 The cache stores information on what articles it contains in its active
7156 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7157 of the cache) becomes all messed up for some reason or other, Gnus
7158 offers two functions that will try to set things right.  @kbd{M-x
7159 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7160 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7161 file.
7162
7163 @findex gnus-cache-move-cache
7164 @code{gnus-cache-move-cache} will move your whole
7165 @code{gnus-cache-directory} to some other location. You get asked to
7166 where, isn't that cool?
7167
7168 @node Persistent Articles
7169 @section Persistent Articles
7170 @cindex persistent articles
7171
7172 Closely related to article caching, we have @dfn{persistent articles}.
7173 In fact, it's just a different way of looking at caching, and much more
7174 useful in my opinion.
7175
7176 Say you're reading a newsgroup, and you happen on to some valuable gem
7177 that you want to keep and treasure forever.  You'd normally just save it
7178 (using one of the many saving commands) in some file.  The problem with
7179 that is that it's just, well, yucky.  Ideally you'd prefer just having
7180 the article remain in the group where you found it forever; untouched by
7181 the expiry going on at the news server.
7182
7183 This is what a @dfn{persistent article} is---an article that just won't
7184 be deleted.  It's implemented using the normal cache functions, but
7185 you use two explicit commands for managing persistent articles:
7186
7187 @table @kbd
7188
7189 @item *
7190 @kindex * (Summary)
7191 @findex gnus-cache-enter-article
7192 Make the current article persistent (@code{gnus-cache-enter-article}).
7193
7194 @item M-*
7195 @kindex M-* (Summary)
7196 @findex gnus-cache-remove-article
7197 Remove the current article from the persistent articles
7198 (@code{gnus-cache-remove-article}).  This will normally delete the
7199 article.
7200 @end table
7201
7202 Both these commands understand the process/prefix convention.
7203
7204 To avoid having all ticked articles (and stuff) entered into the cache,
7205 you should set @code{gnus-use-cache} to @code{passive} if you're just
7206 interested in persistent articles:
7207
7208 @lisp
7209 (setq gnus-use-cache 'passive)
7210 @end lisp
7211
7212
7213 @node Article Backlog
7214 @section Article Backlog
7215 @cindex backlog
7216 @cindex article backlog
7217
7218 If you have a slow connection, but the idea of using caching seems
7219 unappealing to you (and it is, really), you can help the situation some
7220 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7221 already read articles so that it doesn't have to re-fetch articles
7222 you've already read.  This only helps if you are in the habit of
7223 re-selecting articles you've recently read, of course.  If you never do
7224 that, turning the backlog on will slow Gnus down a little bit, and
7225 increase memory usage some.
7226
7227 @vindex gnus-keep-backlog
7228 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7229 at most @var{n} old articles in a buffer for later re-fetching.  If this
7230 variable is non-@code{nil} and is not a number, Gnus will store
7231 @emph{all} read articles, which means that your Emacs will grow without
7232 bound before exploding and taking your machine down with you.  I put
7233 that in there just to keep y'all on your toes.
7234
7235 The default value is 20.
7236
7237
7238 @node Saving Articles
7239 @section Saving Articles
7240 @cindex saving articles
7241
7242 Gnus can save articles in a number of ways.  Below is the documentation
7243 for saving articles in a fairly straight-forward fashion (i.e., little
7244 processing of the article is done before it is saved).  For a different
7245 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7246 (@pxref{Decoding Articles}).
7247
7248 For the commands listed here, the target is a file.  If you want to
7249 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7250 command (@pxref{Mail Group Commands}).
7251
7252 @vindex gnus-save-all-headers
7253 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7254 unwanted headers before saving the article.
7255
7256 @vindex gnus-saved-headers
7257 If the preceding variable is @code{nil}, all headers that match the
7258 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7259 deleted before saving.
7260
7261 @table @kbd
7262
7263 @item O o
7264 @itemx o
7265 @kindex O o (Summary)
7266 @kindex o (Summary)
7267 @findex gnus-summary-save-article
7268 @c @icon{gnus-summary-save-article}
7269 Save the current article using the default article saver
7270 (@code{gnus-summary-save-article}).
7271
7272 @item O m
7273 @kindex O m (Summary)
7274 @findex gnus-summary-save-article-mail
7275 Save the current article in mail format
7276 (@code{gnus-summary-save-article-mail}).
7277
7278 @item O r
7279 @kindex O r (Summary)
7280 @findex gnus-summary-save-article-rmail
7281 Save the current article in Rmail format
7282 (@code{gnus-summary-save-article-rmail}).
7283
7284 @item O f
7285 @kindex O f (Summary)
7286 @findex gnus-summary-save-article-file
7287 @c @icon{gnus-summary-save-article-file}
7288 Save the current article in plain file format
7289 (@code{gnus-summary-save-article-file}).
7290
7291 @item O F
7292 @kindex O F (Summary)
7293 @findex gnus-summary-write-article-file
7294 Write the current article in plain file format, overwriting any previous
7295 file contents (@code{gnus-summary-write-article-file}).
7296
7297 @item O b
7298 @kindex O b (Summary)
7299 @findex gnus-summary-save-article-body-file
7300 Save the current article body in plain file format
7301 (@code{gnus-summary-save-article-body-file}).
7302
7303 @item O h
7304 @kindex O h (Summary)
7305 @findex gnus-summary-save-article-folder
7306 Save the current article in mh folder format
7307 (@code{gnus-summary-save-article-folder}).
7308
7309 @item O v
7310 @kindex O v (Summary)
7311 @findex gnus-summary-save-article-vm
7312 Save the current article in a VM folder
7313 (@code{gnus-summary-save-article-vm}).
7314
7315 @item O p
7316 @itemx |
7317 @kindex O p (Summary)
7318 @kindex | (Summary)
7319 @findex gnus-summary-pipe-output
7320 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7321 the current article to a process (@code{gnus-summary-pipe-output}).
7322 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7323 complete headers in the piped output.
7324
7325 @item O P
7326 @kindex O P (Summary)
7327 @findex gnus-summary-muttprint
7328 @vindex gnus-summary-muttprint-program
7329 Save the current article into muttprint. That is, print it using the
7330 external program @uref{http://muttprint.sourceforge.net/,
7331 Muttprint}. The program name and options to use is controlled by the
7332 variable @code{gnus-summary-muttprint-program}.
7333 (@code{gnus-summary-muttprint}).
7334
7335 @end table
7336
7337 @vindex gnus-prompt-before-saving
7338 All these commands use the process/prefix convention
7339 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7340 functions, you might get tired of being prompted for files to save each
7341 and every article in.  The prompting action is controlled by
7342 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7343 default, giving you that excessive prompting action you know and
7344 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7345 just once for each series of articles you save.  If you like to really
7346 have Gnus do all your thinking for you, you can even set this variable
7347 to @code{nil}, which means that you will never be prompted for files to
7348 save articles in.  Gnus will simply save all the articles in the default
7349 files.
7350
7351
7352 @vindex gnus-default-article-saver
7353 You can customize the @code{gnus-default-article-saver} variable to make
7354 Gnus do what you want it to.  You can use any of the six ready-made
7355 functions below, or you can create your own.
7356
7357 @table @code
7358
7359 @item gnus-summary-save-in-rmail
7360 @findex gnus-summary-save-in-rmail
7361 @vindex gnus-rmail-save-name
7362 @findex gnus-plain-save-name
7363 This is the default format, @dfn{Babyl}.  Uses the function in the
7364 @code{gnus-rmail-save-name} variable to get a file name to save the
7365 article in.  The default is @code{gnus-plain-save-name}.
7366
7367 @item gnus-summary-save-in-mail
7368 @findex gnus-summary-save-in-mail
7369 @vindex gnus-mail-save-name
7370 Save in a Unix mail (mbox) file.  Uses the function in the
7371 @code{gnus-mail-save-name} variable to get a file name to save the
7372 article in.  The default is @code{gnus-plain-save-name}.
7373
7374 @item gnus-summary-save-in-file
7375 @findex gnus-summary-save-in-file
7376 @vindex gnus-file-save-name
7377 @findex gnus-numeric-save-name
7378 Append the article straight to an ordinary file.  Uses the function in
7379 the @code{gnus-file-save-name} variable to get a file name to save the
7380 article in.  The default is @code{gnus-numeric-save-name}.
7381
7382 @item gnus-summary-write-to-file
7383 @findex gnus-summary-write-to-file
7384 Write the article straight to an ordinary file.  The file is
7385 overwritten if it exists.  Uses the function in the
7386 @code{gnus-file-save-name} variable to get a file name to save the
7387 article in.  The default is @code{gnus-numeric-save-name}.
7388
7389 @item gnus-summary-save-body-in-file
7390 @findex gnus-summary-save-body-in-file
7391 Append the article body to an ordinary file.  Uses the function in the
7392 @code{gnus-file-save-name} variable to get a file name to save the
7393 article in.  The default is @code{gnus-numeric-save-name}.
7394
7395 @item gnus-summary-save-in-folder
7396 @findex gnus-summary-save-in-folder
7397 @findex gnus-folder-save-name
7398 @findex gnus-Folder-save-name
7399 @vindex gnus-folder-save-name
7400 @cindex rcvstore
7401 @cindex MH folders
7402 Save the article to an MH folder using @code{rcvstore} from the MH
7403 library.  Uses the function in the @code{gnus-folder-save-name} variable
7404 to get a file name to save the article in.  The default is
7405 @code{gnus-folder-save-name}, but you can also use
7406 @code{gnus-Folder-save-name}, which creates capitalized names.
7407
7408 @item gnus-summary-save-in-vm
7409 @findex gnus-summary-save-in-vm
7410 Save the article in a VM folder.  You have to have the VM mail
7411 reader to use this setting.
7412 @end table
7413
7414 @vindex gnus-article-save-directory
7415 All of these functions, except for the last one, will save the article
7416 in the @code{gnus-article-save-directory}, which is initialized from the
7417 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7418 default.
7419
7420 As you can see above, the functions use different functions to find a
7421 suitable name of a file to save the article in.  Below is a list of
7422 available functions that generate names:
7423
7424 @table @code
7425
7426 @item gnus-Numeric-save-name
7427 @findex gnus-Numeric-save-name
7428 File names like @file{~/News/Alt.andrea-dworkin/45}.
7429
7430 @item gnus-numeric-save-name
7431 @findex gnus-numeric-save-name
7432 File names like @file{~/News/alt.andrea-dworkin/45}.
7433
7434 @item gnus-Plain-save-name
7435 @findex gnus-Plain-save-name
7436 File names like @file{~/News/Alt.andrea-dworkin}.
7437
7438 @item gnus-plain-save-name
7439 @findex gnus-plain-save-name
7440 File names like @file{~/News/alt.andrea-dworkin}.
7441
7442 @item gnus-sender-save-name
7443 @findex gnus-sender-save-name
7444 File names like @file{~/News/larsi}.
7445 @end table
7446
7447 @vindex gnus-split-methods
7448 You can have Gnus suggest where to save articles by plonking a regexp into
7449 the @code{gnus-split-methods} alist.  For instance, if you would like to
7450 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7451 related to VM in @file{vm-stuff}, you could set this variable to something
7452 like:
7453
7454 @lisp
7455 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7456  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7457  (my-choosing-function "../other-dir/my-stuff")
7458  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7459 @end lisp
7460
7461 We see that this is a list where each element is a list that has two
7462 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7463 a string (in which case it is used as a regexp to match on the article
7464 head); it can be a symbol (which will be called as a function with the
7465 group name as a parameter); or it can be a list (which will be
7466 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7467 the @dfn{file} will be used as a default prompt.  In addition, the
7468 result of the operation itself will be used if the function or form
7469 called returns a string or a list of strings.
7470
7471 You basically end up with a list of file names that might be used when
7472 saving the current article.  (All ``matches'' will be used.)  You will
7473 then be prompted for what you really want to use as a name, with file
7474 name completion over the results from applying this variable.
7475
7476 This variable is @code{((gnus-article-archive-name))} by default, which
7477 means that Gnus will look at the articles it saves for an
7478 @code{Archive-name} line and use that as a suggestion for the file
7479 name.
7480
7481 Here's an example function to clean up file names somewhat.  If you have
7482 lots of mail groups called things like
7483 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7484 these group names before creating the file name to save to.  The
7485 following will do just that:
7486
7487 @lisp
7488 (defun my-save-name (group)
7489   (when (string-match "^nnml:mail." group)
7490     (substring group (match-end 0))))
7491
7492 (setq gnus-split-methods
7493       '((gnus-article-archive-name)
7494         (my-save-name)))
7495 @end lisp
7496
7497
7498 @vindex gnus-use-long-file-name
7499 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7500 @code{nil}, all the preceding functions will replace all periods
7501 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7502 the functions will generate hierarchies of directories instead of having
7503 all the files in the top level directory
7504 (@file{~/News/alt/andrea-dworkin} instead of
7505 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7506 on most systems.  However, for historical reasons, this is @code{nil} on
7507 Xenix and usg-unix-v machines by default.
7508
7509 This function also affects kill and score file names.  If this variable
7510 is a list, and the list contains the element @code{not-score}, long file
7511 names will not be used for score files, if it contains the element
7512 @code{not-save}, long file names will not be used for saving, and if it
7513 contains the element @code{not-kill}, long file names will not be used
7514 for kill files.
7515
7516 If you'd like to save articles in a hierarchy that looks something like
7517 a spool, you could
7518
7519 @lisp
7520 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7521 (setq gnus-default-article-saver
7522       'gnus-summary-save-in-file)          ; @r{no encoding}
7523 @end lisp
7524
7525 Then just save with @kbd{o}.  You'd then read this hierarchy with
7526 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7527 the top level directory as the argument (@file{~/News/}).  Then just walk
7528 around to the groups/directories with @code{nneething}.
7529
7530
7531 @node Decoding Articles
7532 @section Decoding Articles
7533 @cindex decoding articles
7534
7535 Sometime users post articles (or series of articles) that have been
7536 encoded in some way or other.  Gnus can decode them for you.
7537
7538 @menu
7539 * Uuencoded Articles::          Uudecode articles.
7540 * Shell Archives::              Unshar articles.
7541 * PostScript Files::            Split PostScript.
7542 * Other Files::                 Plain save and binhex.
7543 * Decoding Variables::          Variables for a happy decoding.
7544 * Viewing Files::               You want to look at the result of the decoding?
7545 @end menu
7546
7547 @cindex series
7548 @cindex article series
7549 All these functions use the process/prefix convention
7550 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7551 the extension that a ``single article'' means ``a single series''.  Gnus
7552 can find out by itself what articles belong to a series, decode all the
7553 articles and unpack/view/save the resulting file(s).
7554
7555 Gnus guesses what articles are in the series according to the following
7556 simplish rule: The subjects must be (nearly) identical, except for the
7557 last two numbers of the line.  (Spaces are largely ignored, however.)
7558
7559 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7560 will find all the articles that match the regexp @samp{^cat.gif
7561 ([0-9]+/[0-9]+).*$}.
7562
7563 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7564 series}, will not be properly recognized by any of the automatic viewing
7565 commands, and you have to mark the articles manually with @kbd{#}.
7566
7567
7568 @node Uuencoded Articles
7569 @subsection Uuencoded Articles
7570 @cindex uudecode
7571 @cindex uuencoded articles
7572
7573 @table @kbd
7574
7575 @item X u
7576 @kindex X u (Summary)
7577 @findex gnus-uu-decode-uu
7578 @c @icon{gnus-uu-decode-uu}
7579 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7580
7581 @item X U
7582 @kindex X U (Summary)
7583 @findex gnus-uu-decode-uu-and-save
7584 Uudecodes and saves the current series
7585 (@code{gnus-uu-decode-uu-and-save}).
7586
7587 @item X v u
7588 @kindex X v u (Summary)
7589 @findex gnus-uu-decode-uu-view
7590 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7591
7592 @item X v U
7593 @kindex X v U (Summary)
7594 @findex gnus-uu-decode-uu-and-save-view
7595 Uudecodes, views and saves the current series
7596 (@code{gnus-uu-decode-uu-and-save-view}).
7597
7598 @end table
7599
7600 Remember that these all react to the presence of articles marked with
7601 the process mark.  If, for instance, you'd like to decode and save an
7602 entire newsgroup, you'd typically do @kbd{M P a}
7603 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7604 (@code{gnus-uu-decode-uu-and-save}).
7605
7606 All this is very much different from how @code{gnus-uu} worked with
7607 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7608 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7609 articles in some way (@pxref{Setting Process Marks}) and then press
7610 @kbd{X u}.
7611
7612 @vindex gnus-uu-notify-files
7613 Note: When trying to decode articles that have names matching
7614 @code{gnus-uu-notify-files}, which is hard-coded to
7615 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7616 automatically post an article on @samp{comp.unix.wizards} saying that
7617 you have just viewed the file in question.  This feature can't be turned
7618 off.
7619
7620
7621 @node Shell Archives
7622 @subsection Shell Archives
7623 @cindex unshar
7624 @cindex shell archives
7625 @cindex shared articles
7626
7627 Shell archives (``shar files'') used to be a popular way to distribute
7628 sources, but it isn't used all that much today.  In any case, we have
7629 some commands to deal with these:
7630
7631 @table @kbd
7632
7633 @item X s
7634 @kindex X s (Summary)
7635 @findex gnus-uu-decode-unshar
7636 Unshars the current series (@code{gnus-uu-decode-unshar}).
7637
7638 @item X S
7639 @kindex X S (Summary)
7640 @findex gnus-uu-decode-unshar-and-save
7641 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7642
7643 @item X v s
7644 @kindex X v s (Summary)
7645 @findex gnus-uu-decode-unshar-view
7646 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7647
7648 @item X v S
7649 @kindex X v S (Summary)
7650 @findex gnus-uu-decode-unshar-and-save-view
7651 Unshars, views and saves the current series
7652 (@code{gnus-uu-decode-unshar-and-save-view}).
7653 @end table
7654
7655
7656 @node PostScript Files
7657 @subsection PostScript Files
7658 @cindex PostScript
7659
7660 @table @kbd
7661
7662 @item X p
7663 @kindex X p (Summary)
7664 @findex gnus-uu-decode-postscript
7665 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7666
7667 @item X P
7668 @kindex X P (Summary)
7669 @findex gnus-uu-decode-postscript-and-save
7670 Unpack and save the current PostScript series
7671 (@code{gnus-uu-decode-postscript-and-save}).
7672
7673 @item X v p
7674 @kindex X v p (Summary)
7675 @findex gnus-uu-decode-postscript-view
7676 View the current PostScript series
7677 (@code{gnus-uu-decode-postscript-view}).
7678
7679 @item X v P
7680 @kindex X v P (Summary)
7681 @findex gnus-uu-decode-postscript-and-save-view
7682 View and save the current PostScript series
7683 (@code{gnus-uu-decode-postscript-and-save-view}).
7684 @end table
7685
7686
7687 @node Other Files
7688 @subsection Other Files
7689
7690 @table @kbd
7691 @item X o
7692 @kindex X o (Summary)
7693 @findex gnus-uu-decode-save
7694 Save the current series
7695 (@code{gnus-uu-decode-save}).
7696
7697 @item X b
7698 @kindex X b (Summary)
7699 @findex gnus-uu-decode-binhex
7700 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7701 doesn't really work yet.
7702 @end table
7703
7704
7705 @node Decoding Variables
7706 @subsection Decoding Variables
7707
7708 Adjective, not verb.
7709
7710 @menu
7711 * Rule Variables::              Variables that say how a file is to be viewed.
7712 * Other Decode Variables::      Other decode variables.
7713 * Uuencoding and Posting::      Variables for customizing uuencoding.
7714 @end menu
7715
7716
7717 @node Rule Variables
7718 @subsubsection Rule Variables
7719 @cindex rule variables
7720
7721 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7722 variables are of the form
7723
7724 @lisp
7725       (list '(regexp1 command2)
7726             '(regexp2 command2)
7727             ...)
7728 @end lisp
7729
7730 @table @code
7731
7732 @item gnus-uu-user-view-rules
7733 @vindex gnus-uu-user-view-rules
7734 @cindex sox
7735 This variable is consulted first when viewing files.  If you wish to use,
7736 for instance, @code{sox} to convert an @file{.au} sound file, you could
7737 say something like:
7738 @lisp
7739 (setq gnus-uu-user-view-rules
7740       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7741 @end lisp
7742
7743 @item gnus-uu-user-view-rules-end
7744 @vindex gnus-uu-user-view-rules-end
7745 This variable is consulted if Gnus couldn't make any matches from the
7746 user and default view rules.
7747
7748 @item gnus-uu-user-archive-rules
7749 @vindex gnus-uu-user-archive-rules
7750 This variable can be used to say what commands should be used to unpack
7751 archives.
7752 @end table
7753
7754
7755 @node Other Decode Variables
7756 @subsubsection Other Decode Variables
7757
7758 @table @code
7759 @vindex gnus-uu-grabbed-file-functions
7760
7761 @item gnus-uu-grabbed-file-functions
7762 All functions in this list will be called right after each file has been
7763 successfully decoded---so that you can move or view files right away,
7764 and don't have to wait for all files to be decoded before you can do
7765 anything.  Ready-made functions you can put in this list are:
7766
7767 @table @code
7768
7769 @item gnus-uu-grab-view
7770 @findex gnus-uu-grab-view
7771 View the file.
7772
7773 @item gnus-uu-grab-move
7774 @findex gnus-uu-grab-move
7775 Move the file (if you're using a saving function.)
7776 @end table
7777
7778 @item gnus-uu-be-dangerous
7779 @vindex gnus-uu-be-dangerous
7780 Specifies what to do if unusual situations arise during decoding.  If
7781 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7782 that didn't work, and overwrite existing files.  Otherwise, ask each
7783 time.
7784
7785 @item gnus-uu-ignore-files-by-name
7786 @vindex gnus-uu-ignore-files-by-name
7787 Files with name matching this regular expression won't be viewed.
7788
7789 @item gnus-uu-ignore-files-by-type
7790 @vindex gnus-uu-ignore-files-by-type
7791 Files with a @acronym{MIME} type matching this variable won't be viewed.
7792 Note that Gnus tries to guess what type the file is based on the name.
7793 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7794 kludgey.
7795
7796 @item gnus-uu-tmp-dir
7797 @vindex gnus-uu-tmp-dir
7798 Where @code{gnus-uu} does its work.
7799
7800 @item gnus-uu-do-not-unpack-archives
7801 @vindex gnus-uu-do-not-unpack-archives
7802 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7803 looking for files to display.
7804
7805 @item gnus-uu-view-and-save
7806 @vindex gnus-uu-view-and-save
7807 Non-@code{nil} means that the user will always be asked to save a file
7808 after viewing it.
7809
7810 @item gnus-uu-ignore-default-view-rules
7811 @vindex gnus-uu-ignore-default-view-rules
7812 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7813 rules.
7814
7815 @item gnus-uu-ignore-default-archive-rules
7816 @vindex gnus-uu-ignore-default-archive-rules
7817 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7818 unpacking commands.
7819
7820 @item gnus-uu-kill-carriage-return
7821 @vindex gnus-uu-kill-carriage-return
7822 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7823 from articles.
7824
7825 @item gnus-uu-unmark-articles-not-decoded
7826 @vindex gnus-uu-unmark-articles-not-decoded
7827 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7828 decoded articles as unread.
7829
7830 @item gnus-uu-correct-stripped-uucode
7831 @vindex gnus-uu-correct-stripped-uucode
7832 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7833 uuencoded files that have had trailing spaces deleted.
7834
7835 @item gnus-uu-pre-uudecode-hook
7836 @vindex gnus-uu-pre-uudecode-hook
7837 Hook run before sending a message to @code{uudecode}.
7838
7839 @item gnus-uu-view-with-metamail
7840 @vindex gnus-uu-view-with-metamail
7841 @cindex metamail
7842 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7843 commands defined by the rule variables and just fudge a @acronym{MIME}
7844 content type based on the file name.  The result will be fed to
7845 @code{metamail} for viewing.
7846
7847 @item gnus-uu-save-in-digest
7848 @vindex gnus-uu-save-in-digest
7849 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7850 decoding, will save in digests.  If this variable is @code{nil},
7851 @code{gnus-uu} will just save everything in a file without any
7852 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7853 to specify any meaningful volume and issue numbers were found, so I
7854 simply dropped them.
7855
7856 @end table
7857
7858
7859 @node Uuencoding and Posting
7860 @subsubsection Uuencoding and Posting
7861
7862 @table @code
7863
7864 @item gnus-uu-post-include-before-composing
7865 @vindex gnus-uu-post-include-before-composing
7866 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7867 before you compose the article.  If this variable is @code{t}, you can
7868 either include an encoded file with @kbd{C-c C-i} or have one included
7869 for you when you post the article.
7870
7871 @item gnus-uu-post-length
7872 @vindex gnus-uu-post-length
7873 Maximum length of an article.  The encoded file will be split into how
7874 many articles it takes to post the entire file.
7875
7876 @item gnus-uu-post-threaded
7877 @vindex gnus-uu-post-threaded
7878 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7879 thread.  This may not be smart, as no other decoder I have seen is able
7880 to follow threads when collecting uuencoded articles.  (Well, I have
7881 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7882 think that counts@dots{}) Default is @code{nil}.
7883
7884 @item gnus-uu-post-separate-description
7885 @vindex gnus-uu-post-separate-description
7886 Non-@code{nil} means that the description will be posted in a separate
7887 article.  The first article will typically be numbered (0/x).  If this
7888 variable is @code{nil}, the description the user enters will be included
7889 at the beginning of the first article, which will be numbered (1/x).
7890 Default is @code{t}.
7891
7892 @end table
7893
7894
7895 @node Viewing Files
7896 @subsection Viewing Files
7897 @cindex viewing files
7898 @cindex pseudo-articles
7899
7900 After decoding, if the file is some sort of archive, Gnus will attempt
7901 to unpack the archive and see if any of the files in the archive can be
7902 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7903 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7904 uncompress and de-tar the main file, and then view the two pictures.
7905 This unpacking process is recursive, so if the archive contains archives
7906 of archives, it'll all be unpacked.
7907
7908 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7909 extracted file into the summary buffer.  If you go to these
7910 ``articles'', you will be prompted for a command to run (usually Gnus
7911 will make a suggestion), and then the command will be run.
7912
7913 @vindex gnus-view-pseudo-asynchronously
7914 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7915 until the viewing is done before proceeding.
7916
7917 @vindex gnus-view-pseudos
7918 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7919 the pseudo-articles into the summary buffer, but view them
7920 immediately.  If this variable is @code{not-confirm}, the user won't even
7921 be asked for a confirmation before viewing is done.
7922
7923 @vindex gnus-view-pseudos-separately
7924 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7925 pseudo-article will be created for each file to be viewed.  If
7926 @code{nil}, all files that use the same viewing command will be given as
7927 a list of parameters to that command.
7928
7929 @vindex gnus-insert-pseudo-articles
7930 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7931 pseudo-articles when decoding.  It is @code{t} by default.
7932
7933 So; there you are, reading your @emph{pseudo-articles} in your
7934 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7935 Why isn't anything real anymore? How did we get here?
7936
7937
7938 @node Article Treatment
7939 @section Article Treatment
7940
7941 Reading through this huge manual, you may have quite forgotten that the
7942 object of newsreaders is to actually, like, read what people have
7943 written.  Reading articles.  Unfortunately, people are quite bad at
7944 writing, so there are tons of functions and variables to make reading
7945 these articles easier.
7946
7947 @menu
7948 * Article Highlighting::        You want to make the article look like fruit salad.
7949 * Article Fontisizing::         Making emphasized text look nice.
7950 * Article Hiding::              You also want to make certain info go away.
7951 * Article Washing::             Lots of way-neat functions to make life better.
7952 * Article Header::              Doing various header transformations.
7953 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7954 * Article Button Levels::       Controlling appearance of buttons.
7955 * Article Date::                Grumble, UT!
7956 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7957 * Article Signature::           What is a signature?
7958 * Article Miscellanea::         Various other stuff.
7959 @end menu
7960
7961
7962 @node Article Highlighting
7963 @subsection Article Highlighting
7964 @cindex highlighting
7965
7966 Not only do you want your article buffer to look like fruit salad, but
7967 you want it to look like technicolor fruit salad.
7968
7969 @table @kbd
7970
7971 @item W H a
7972 @kindex W H a (Summary)
7973 @findex gnus-article-highlight
7974 @findex gnus-article-maybe-highlight
7975 Do much highlighting of the current article
7976 (@code{gnus-article-highlight}).  This function highlights header, cited
7977 text, the signature, and adds buttons to the body and the head.
7978
7979 @item W H h
7980 @kindex W H h (Summary)
7981 @findex gnus-article-highlight-headers
7982 @vindex gnus-header-face-alist
7983 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7984 highlighting will be done according to the @code{gnus-header-face-alist}
7985 variable, which is a list where each element has the form
7986 @code{(@var{regexp} @var{name} @var{content})}.
7987 @var{regexp} is a regular expression for matching the
7988 header, @var{name} is the face used for highlighting the header name
7989 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7990 the header value.  The first match made will be used.  Note that
7991 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7992
7993 @item W H c
7994 @kindex W H c (Summary)
7995 @findex gnus-article-highlight-citation
7996 Highlight cited text (@code{gnus-article-highlight-citation}).
7997
7998 Some variables to customize the citation highlights:
7999
8000 @table @code
8001 @vindex gnus-cite-parse-max-size
8002
8003 @item gnus-cite-parse-max-size
8004 If the article size if bigger than this variable (which is 25000 by
8005 default), no citation highlighting will be performed.
8006
8007 @item gnus-cite-max-prefix
8008 @vindex gnus-cite-max-prefix
8009 Maximum possible length for a citation prefix (default 20).
8010
8011 @item gnus-cite-face-list
8012 @vindex gnus-cite-face-list
8013 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8014 When there are citations from multiple articles in the same message,
8015 Gnus will try to give each citation from each article its own face.
8016 This should make it easier to see who wrote what.
8017
8018 @item gnus-supercite-regexp
8019 @vindex gnus-supercite-regexp
8020 Regexp matching normal Supercite attribution lines.
8021
8022 @item gnus-supercite-secondary-regexp
8023 @vindex gnus-supercite-secondary-regexp
8024 Regexp matching mangled Supercite attribution lines.
8025
8026 @item gnus-cite-minimum-match-count
8027 @vindex gnus-cite-minimum-match-count
8028 Minimum number of identical prefixes we have to see before we believe
8029 that it's a citation.
8030
8031 @item gnus-cite-attribution-prefix
8032 @vindex gnus-cite-attribution-prefix
8033 Regexp matching the beginning of an attribution line.
8034
8035 @item gnus-cite-attribution-suffix
8036 @vindex gnus-cite-attribution-suffix
8037 Regexp matching the end of an attribution line.
8038
8039 @item gnus-cite-attribution-face
8040 @vindex gnus-cite-attribution-face
8041 Face used for attribution lines.  It is merged with the face for the
8042 cited text belonging to the attribution.
8043
8044 @end table
8045
8046
8047 @item W H s
8048 @kindex W H s (Summary)
8049 @vindex gnus-signature-separator
8050 @vindex gnus-signature-face
8051 @findex gnus-article-highlight-signature
8052 Highlight the signature (@code{gnus-article-highlight-signature}).
8053 Everything after @code{gnus-signature-separator} (@pxref{Article
8054 Signature}) in an article will be considered a signature and will be
8055 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8056 default.
8057
8058 @end table
8059
8060 @xref{Customizing Articles}, for how to highlight articles automatically.
8061
8062
8063 @node Article Fontisizing
8064 @subsection Article Fontisizing
8065 @cindex emphasis
8066 @cindex article emphasis
8067
8068 @findex gnus-article-emphasize
8069 @kindex W e (Summary)
8070 People commonly add emphasis to words in news articles by writing things
8071 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8072 this look nicer by running the article through the @kbd{W e}
8073 (@code{gnus-article-emphasize}) command.
8074
8075 @vindex gnus-emphasis-alist
8076 How the emphasis is computed is controlled by the
8077 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8078 element is a regular expression to be matched.  The second is a number
8079 that says what regular expression grouping is used to find the entire
8080 emphasized word.  The third is a number that says what regexp grouping
8081 should be displayed and highlighted.  (The text between these two
8082 groupings will be hidden.)  The fourth is the face used for
8083 highlighting.
8084
8085 @lisp
8086 (setq gnus-emphasis-alist
8087       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8088         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8089 @end lisp
8090
8091 @cindex slash
8092 @cindex asterisk
8093 @cindex underline
8094 @cindex /
8095 @cindex *
8096
8097 @vindex gnus-emphasis-underline
8098 @vindex gnus-emphasis-bold
8099 @vindex gnus-emphasis-italic
8100 @vindex gnus-emphasis-underline-bold
8101 @vindex gnus-emphasis-underline-italic
8102 @vindex gnus-emphasis-bold-italic
8103 @vindex gnus-emphasis-underline-bold-italic
8104 By default, there are seven rules, and they use the following faces:
8105 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8106 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8107 @code{gnus-emphasis-underline-italic},
8108 @code{gnus-emphasis-underline-bold}, and
8109 @code{gnus-emphasis-underline-bold-italic}.
8110
8111 If you want to change these faces, you can either use @kbd{M-x
8112 customize}, or you can use @code{copy-face}.  For instance, if you want
8113 to make @code{gnus-emphasis-italic} use a red face instead, you could
8114 say something like:
8115
8116 @lisp
8117 (copy-face 'red 'gnus-emphasis-italic)
8118 @end lisp
8119
8120 @vindex gnus-group-highlight-words-alist
8121
8122 If you want to highlight arbitrary words, you can use the
8123 @code{gnus-group-highlight-words-alist} variable, which uses the same
8124 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8125 parameter (@pxref{Group Parameters}) can also be used.
8126
8127 @xref{Customizing Articles}, for how to fontize articles automatically.
8128
8129
8130 @node Article Hiding
8131 @subsection Article Hiding
8132 @cindex article hiding
8133
8134 Or rather, hiding certain things in each article.  There usually is much
8135 too much cruft in most articles.
8136
8137 @table @kbd
8138
8139 @item W W a
8140 @kindex W W a (Summary)
8141 @findex gnus-article-hide
8142 Do quite a lot of hiding on the article buffer
8143 (@kbd{gnus-article-hide}).  In particular, this function will hide
8144 headers, @acronym{PGP}, cited text and the signature.
8145
8146 @item W W h
8147 @kindex W W h (Summary)
8148 @findex gnus-article-hide-headers
8149 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8150 Headers}.
8151
8152 @item W W b
8153 @kindex W W b (Summary)
8154 @findex gnus-article-hide-boring-headers
8155 Hide headers that aren't particularly interesting
8156 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8157
8158 @item W W s
8159 @kindex W W s (Summary)
8160 @findex gnus-article-hide-signature
8161 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8162 Signature}.
8163
8164 @item W W l
8165 @kindex W W l (Summary)
8166 @findex gnus-article-hide-list-identifiers
8167 @vindex gnus-list-identifiers
8168 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8169 are strings some mailing list servers add to the beginning of all
8170 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8171 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8172 may not contain @code{\\(..\\)}.
8173
8174 @table @code
8175
8176 @item gnus-list-identifiers
8177 @vindex gnus-list-identifiers
8178 A regular expression that matches list identifiers to be removed from
8179 subject.  This can also be a list of regular expressions.
8180
8181 @end table
8182
8183 @item W W P
8184 @kindex W W P (Summary)
8185 @findex gnus-article-hide-pem
8186 Hide @acronym{PEM} (privacy enhanced messages) cruft
8187 (@code{gnus-article-hide-pem}).
8188
8189 @item W W B
8190 @kindex W W B (Summary)
8191 @findex gnus-article-strip-banner
8192 @vindex gnus-article-banner-alist
8193 @vindex gnus-article-address-banner-alist
8194 @cindex banner
8195 @cindex OneList
8196 @cindex stripping advertisements
8197 @cindex advertisements
8198 Strip the banner specified by the @code{banner} group parameter
8199 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8200 annoying banners and/or signatures that some mailing lists and moderated
8201 groups adds to all the messages.  The way to use this function is to add
8202 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8203 group you want banners stripped from.  The parameter either be a string,
8204 which will be interpreted as a regular expression matching text to be
8205 removed, or the symbol @code{signature}, meaning that the (last)
8206 signature should be removed, or other symbol, meaning that the
8207 corresponding regular expression in @code{gnus-article-banner-alist} is
8208 used.
8209
8210 Regardless of a group, you can hide things like advertisements only when
8211 the sender of an article has a certain mail address specified in
8212 @code{gnus-article-address-banner-alist}.
8213
8214 @table @code
8215
8216 @item gnus-article-address-banner-alist
8217 @vindex gnus-article-address-banner-alist
8218 Alist of mail addresses and banners.  Each element has the form
8219 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8220 matching a mail address in the From header, @var{banner} is one of a
8221 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8222 a regexp and @code{nil}.  If @var{address} matches author's mail
8223 address, it will remove things like advertisements.  For example, if a
8224 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8225 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8226 sends, you can use the following element to remove them:
8227
8228 @lisp
8229 ("@@yoo-hoo\\.co\\.jp\\'" . 
8230  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8231 @end lisp
8232
8233 @end table
8234
8235 @item W W c
8236 @kindex W W c (Summary)
8237 @findex gnus-article-hide-citation
8238 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8239 customizing the hiding:
8240
8241 @table @code
8242
8243 @item gnus-cited-opened-text-button-line-format
8244 @itemx gnus-cited-closed-text-button-line-format
8245 @vindex gnus-cited-closed-text-button-line-format
8246 @vindex gnus-cited-opened-text-button-line-format
8247 Gnus adds buttons to show where the cited text has been hidden, and to
8248 allow toggle hiding the text.  The format of the variable is specified
8249 by these format-like variable (@pxref{Formatting Variables}).  These
8250 specs are valid:
8251
8252 @table @samp
8253 @item b
8254 Starting point of the hidden text.
8255 @item e
8256 Ending point of the hidden text.
8257 @item l
8258 Number of characters in the hidden region.
8259 @item n
8260 Number of lines of hidden text.
8261 @end table
8262
8263 @item gnus-cited-lines-visible
8264 @vindex gnus-cited-lines-visible
8265 The number of lines at the beginning of the cited text to leave
8266 shown. This can also be a cons cell with the number of lines at the top
8267 and bottom of the text, respectively, to remain visible.
8268
8269 @end table
8270
8271 @item W W C-c
8272 @kindex W W C-c (Summary)
8273 @findex gnus-article-hide-citation-maybe
8274
8275 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8276 following two variables:
8277
8278 @table @code
8279 @item gnus-cite-hide-percentage
8280 @vindex gnus-cite-hide-percentage
8281 If the cited text is of a bigger percentage than this variable (default
8282 50), hide the cited text.
8283
8284 @item gnus-cite-hide-absolute
8285 @vindex gnus-cite-hide-absolute
8286 The cited text must have at least this length (default 10) before it
8287 is hidden.
8288 @end table
8289
8290 @item W W C
8291 @kindex W W C (Summary)
8292 @findex gnus-article-hide-citation-in-followups
8293 Hide cited text in articles that aren't roots
8294 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8295 useful as an interactive command, but might be a handy function to stick
8296 have happen automatically (@pxref{Customizing Articles}).
8297
8298 @end table
8299
8300 All these ``hiding'' commands are toggles, but if you give a negative
8301 prefix to these commands, they will show what they have previously
8302 hidden.  If you give a positive prefix, they will always hide.
8303
8304 Also @pxref{Article Highlighting} for further variables for
8305 citation customization.
8306
8307 @xref{Customizing Articles}, for how to hide article elements
8308 automatically.
8309
8310
8311 @node Article Washing
8312 @subsection Article Washing
8313 @cindex washing
8314 @cindex article washing
8315
8316 We call this ``article washing'' for a really good reason.  Namely, the
8317 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8318
8319 @dfn{Washing} is defined by us as ``changing something from something to
8320 something else'', but normally results in something looking better.
8321 Cleaner, perhaps.
8322
8323 @xref{Customizing Articles}, if you want to change how Gnus displays
8324 articles by default.
8325
8326 @table @kbd
8327
8328 @item C-u g
8329 This is not really washing, it's sort of the opposite of washing.  If
8330 you type this, you see the article exactly as it exists on disk or on
8331 the server.
8332
8333 @item g
8334 Force redisplaying of the current article
8335 (@code{gnus-summary-show-article}).  This is also not really washing.
8336 If you type this, you see the article without any previously applied
8337 interactive Washing functions but with all default treatments
8338 (@pxref{Customizing Articles}).
8339
8340 @item W l
8341 @kindex W l (Summary)
8342 @findex gnus-summary-stop-page-breaking
8343 Remove page breaks from the current article
8344 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8345 delimiters.
8346
8347 @item W r
8348 @kindex W r (Summary)
8349 @findex gnus-summary-caesar-message
8350 @c @icon{gnus-summary-caesar-message}
8351 Do a Caesar rotate (rot13) on the article buffer
8352 (@code{gnus-summary-caesar-message}).
8353 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8354 (Typically offensive jokes and such.)
8355
8356 It's commonly called ``rot13'' because each letter is rotated 13
8357 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8358 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8359 is rumored to have employed this form of, uh, somewhat weak encryption.
8360
8361 @item W m
8362 @kindex W m (Summary)
8363 @findex gnus-summary-morse-message
8364 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8365
8366 @item W t
8367 @item t
8368 @kindex W t (Summary)
8369 @kindex t (Summary)
8370 @findex gnus-summary-toggle-header
8371 Toggle whether to display all headers in the article buffer
8372 (@code{gnus-summary-toggle-header}).
8373
8374 @item W v
8375 @kindex W v (Summary)
8376 @findex gnus-summary-verbose-headers
8377 Toggle whether to display all headers in the article buffer permanently
8378 (@code{gnus-summary-verbose-headers}).
8379
8380 @item W o
8381 @kindex W o (Summary)
8382 @findex gnus-article-treat-overstrike
8383 Treat overstrike (@code{gnus-article-treat-overstrike}).
8384
8385 @item W d
8386 @kindex W d (Summary)
8387 @findex gnus-article-treat-dumbquotes
8388 @vindex gnus-article-dumbquotes-map
8389 @cindex Smartquotes
8390 @cindex M****s*** sm*rtq**t*s
8391 @cindex Latin 1
8392 Treat M****s*** sm*rtq**t*s according to
8393 @code{gnus-article-dumbquotes-map}
8394 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8395 whether a character is a sm*rtq**t* or not, so it should only be used
8396 interactively.
8397
8398 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8399 an attempt to provide more quoting characters.  If you see something
8400 like @code{\222} or @code{\264} where you're expecting some kind of
8401 apostrophe or quotation mark, then try this wash.
8402
8403 @item W Y f
8404 @kindex W Y f (Summary)
8405 @findex gnus-article-outlook-deuglify-article
8406 @cindex Outlook Express
8407 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8408 unwrap lines, repair attribution and rearrange citation.
8409 (@code{gnus-article-outlook-deuglify-article}).
8410
8411 @item W Y u
8412 @kindex W Y u (Summary)
8413 @findex gnus-article-outlook-unwrap-lines
8414 @vindex gnus-outlook-deuglify-unwrap-min
8415 @vindex gnus-outlook-deuglify-unwrap-max
8416 Unwrap lines that appear to be wrapped citation lines.  You can control
8417 what lines will be unwrapped by frobbing
8418 @code{gnus-outlook-deuglify-unwrap-min} and
8419 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8420 maximum length of an unwrapped citation line.
8421 (@code{gnus-article-outlook-unwrap-lines}).
8422
8423 @item W Y a
8424 @kindex W Y a (Summary)
8425 @findex gnus-article-outlook-repair-attribution
8426 Repair a broken attribution line.@*
8427 (@code{gnus-article-outlook-repair-attribution}).
8428
8429 @item W Y c
8430 @kindex W Y c (Summary)
8431 @findex gnus-article-outlook-rearrange-citation
8432 Repair broken citations by rearranging the text.
8433 (@code{gnus-article-outlook-rearrange-citation}).
8434
8435 @item W w
8436 @kindex W w (Summary)
8437 @findex gnus-article-fill-cited-article
8438 Do word wrap (@code{gnus-article-fill-cited-article}).
8439
8440 You can give the command a numerical prefix to specify the width to use
8441 when filling.
8442
8443 @item W Q
8444 @kindex W Q (Summary)
8445 @findex gnus-article-fill-long-lines
8446 Fill long lines (@code{gnus-article-fill-long-lines}).
8447
8448 @item W C
8449 @kindex W C (Summary)
8450 @findex gnus-article-capitalize-sentences
8451 Capitalize the first word in each sentence
8452 (@code{gnus-article-capitalize-sentences}).
8453
8454 @item W c
8455 @kindex W c (Summary)
8456 @findex gnus-article-remove-cr
8457 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8458 (this takes care of DOS line endings), and then translate any remaining
8459 CRs into LF (this takes care of Mac line endings)
8460 (@code{gnus-article-remove-cr}).
8461
8462 @item W q
8463 @kindex W q (Summary)
8464 @findex gnus-article-de-quoted-unreadable
8465 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8466 Quoted-Printable is one common @acronym{MIME} encoding employed when
8467 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8468 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8469 doesn't look very readable to me.  Note that this is usually done
8470 automatically by Gnus if the message in question has a
8471 @code{Content-Transfer-Encoding} header that says that this encoding
8472 has been done.  If a prefix is given, a charset will be asked for.
8473
8474 @item W 6
8475 @kindex W 6 (Summary)
8476 @findex gnus-article-de-base64-unreadable
8477 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8478 one common @acronym{MIME} encoding employed when sending
8479 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8480 usually done automatically by Gnus if the message in question has a
8481 @code{Content-Transfer-Encoding} header that says that this encoding
8482 has been done.  If a prefix is given, a charset will be asked for.
8483
8484 @item W Z
8485 @kindex W Z (Summary)
8486 @findex gnus-article-decode-HZ
8487 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8488 common encoding employed when sending Chinese articles.  It typically
8489 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8490
8491 @item W u
8492 @kindex W u (Summary)
8493 @findex gnus-article-unsplit-urls
8494 Remove newlines from within URLs.  Some mailers insert newlines into
8495 outgoing email messages to keep lines short.  This reformatting can
8496 split long URLs onto multiple lines.  Repair those URLs by removing
8497 the newlines (@code{gnus-article-unsplit-urls}).
8498
8499 @item W h
8500 @kindex W h (Summary)
8501 @findex gnus-article-wash-html
8502 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8503 usually done automatically by Gnus if the message in question has a
8504 @code{Content-Type} header that says that the message is @acronym{HTML}.
8505
8506 If a prefix is given, a charset will be asked for.
8507
8508 @vindex gnus-article-wash-function
8509 The default is to use the function specified by
8510 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8511 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8512 @acronym{HTML}, but this is controlled by the
8513 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8514 can use include:
8515
8516 @table @code
8517 @item w3
8518 Use Emacs/w3.
8519
8520 @item w3m
8521 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8522
8523 @item links
8524 Use @uref{http://links.sf.net/, Links}.
8525
8526 @item lynx
8527 Use @uref{http://lynx.isc.org/, Lynx}.
8528
8529 @item html2text
8530 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8531
8532 @end table
8533
8534 @item W b
8535 @kindex W b (Summary)
8536 @findex gnus-article-add-buttons
8537 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8538 @xref{Article Buttons}.
8539
8540 @item W B
8541 @kindex W B (Summary)
8542 @findex gnus-article-add-buttons-to-head
8543 Add clickable buttons to the article headers
8544 (@code{gnus-article-add-buttons-to-head}).
8545
8546 @item W p
8547 @kindex W p (Summary)
8548 @findex gnus-article-verify-x-pgp-sig
8549 Verify a signed control message
8550 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8551 @code{newgroup} and @code{checkgroups} are usually signed by the
8552 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8553 the maintainer to your keyring to verify the
8554 message.@footnote{@acronym{PGP} keys for many hierarchies are
8555 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8556
8557 @item W s
8558 @kindex W s (Summary)
8559 @findex gnus-summary-force-verify-and-decrypt
8560 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8561 @acronym{S/MIME}) message
8562 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8563
8564 @item W a
8565 @kindex W a (Summary)
8566 @findex gnus-article-strip-headers-in-body
8567 Strip headers like the @code{X-No-Archive} header from the beginning of
8568 article bodies (@code{gnus-article-strip-headers-in-body}).
8569
8570 @item W E l
8571 @kindex W E l (Summary)
8572 @findex gnus-article-strip-leading-blank-lines
8573 Remove all blank lines from the beginning of the article
8574 (@code{gnus-article-strip-leading-blank-lines}).
8575
8576 @item W E m
8577 @kindex W E m (Summary)
8578 @findex gnus-article-strip-multiple-blank-lines
8579 Replace all blank lines with empty lines and then all multiple empty
8580 lines with a single empty line.
8581 (@code{gnus-article-strip-multiple-blank-lines}).
8582
8583 @item W E t
8584 @kindex W E t (Summary)
8585 @findex gnus-article-remove-trailing-blank-lines
8586 Remove all blank lines at the end of the article
8587 (@code{gnus-article-remove-trailing-blank-lines}).
8588
8589 @item W E a
8590 @kindex W E a (Summary)
8591 @findex gnus-article-strip-blank-lines
8592 Do all the three commands above
8593 (@code{gnus-article-strip-blank-lines}).
8594
8595 @item W E A
8596 @kindex W E A (Summary)
8597 @findex gnus-article-strip-all-blank-lines
8598 Remove all blank lines
8599 (@code{gnus-article-strip-all-blank-lines}).
8600
8601 @item W E s
8602 @kindex W E s (Summary)
8603 @findex gnus-article-strip-leading-space
8604 Remove all white space from the beginning of all lines of the article
8605 body (@code{gnus-article-strip-leading-space}).
8606
8607 @item W E e
8608 @kindex W E e (Summary)
8609 @findex gnus-article-strip-trailing-space
8610 Remove all white space from the end of all lines of the article
8611 body (@code{gnus-article-strip-trailing-space}).
8612
8613 @end table
8614
8615 @xref{Customizing Articles}, for how to wash articles automatically.
8616
8617
8618 @node Article Header
8619 @subsection Article Header
8620
8621 These commands perform various transformations of article header.
8622
8623 @table @kbd
8624
8625 @item W G u
8626 @kindex W G u (Summary)
8627 @findex gnus-article-treat-unfold-headers
8628 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8629
8630 @item W G n
8631 @kindex W G n (Summary)
8632 @findex gnus-article-treat-fold-newsgroups
8633 Fold the @code{Newsgroups} and @code{Followup-To} headers
8634 (@code{gnus-article-treat-fold-newsgroups}).
8635
8636 @item W G f
8637 @kindex W G f (Summary)
8638 @findex gnus-article-treat-fold-headers
8639 Fold all the message headers
8640 (@code{gnus-article-treat-fold-headers}).
8641
8642 @item W E w
8643 @kindex W E w
8644 @findex gnus-article-remove-leading-whitespace
8645 Remove excessive whitespace from all headers
8646 (@code{gnus-article-remove-leading-whitespace}).
8647
8648 @end table
8649
8650
8651 @node Article Buttons
8652 @subsection Article Buttons
8653 @cindex buttons
8654
8655 People often include references to other stuff in articles, and it would
8656 be nice if Gnus could just fetch whatever it is that people talk about
8657 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8658 button on these references.
8659
8660 @vindex gnus-button-man-handler
8661 Gnus adds @dfn{buttons} to certain standard references by default:
8662 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8663 Emacs or Gnus related references.  This is controlled by two variables,
8664 one that handles article bodies and one that handles article heads:
8665
8666 @table @code
8667
8668 @item gnus-button-alist
8669 @vindex gnus-button-alist
8670 This is an alist where each entry has this form:
8671
8672 @lisp
8673 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8674 @end lisp
8675
8676 @table @var
8677
8678 @item regexp
8679 All text that match this regular expression (case insensitive) will be
8680 considered an external reference.  Here's a typical regexp that matches
8681 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8682 variable containing a regexp, useful variables to use include
8683 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8684
8685 @item button-par
8686 Gnus has to know which parts of the matches is to be highlighted.  This
8687 is a number that says what sub-expression of the regexp is to be
8688 highlighted.  If you want it all highlighted, you use 0 here.
8689
8690 @item use-p
8691 This form will be @code{eval}ed, and if the result is non-@code{nil},
8692 this is considered a match.  This is useful if you want extra sifting to
8693 avoid false matches.  Often variables named
8694 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8695 Levels}, but any other form may be used too.
8696
8697 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8698
8699 @item function
8700 This function will be called when you click on this button.
8701
8702 @item data-par
8703 As with @var{button-par}, this is a sub-expression number, but this one
8704 says which part of the match is to be sent as data to @var{function}.
8705
8706 @end table
8707
8708 So the full entry for buttonizing URLs is then
8709
8710 @lisp
8711 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8712 @end lisp
8713
8714 @item gnus-header-button-alist
8715 @vindex gnus-header-button-alist
8716 This is just like the other alist, except that it is applied to the
8717 article head only, and that each entry has an additional element that is
8718 used to say what headers to apply the buttonize coding to:
8719
8720 @lisp
8721 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8722 @end lisp
8723
8724 @var{header} is a regular expression.
8725 @end table
8726
8727 @subsubsection Related variables and functions
8728
8729 @table @code
8730 @item gnus-button-@var{*}-level
8731 @xref{Article Button Levels}.
8732
8733 @c Stuff related to gnus-button-browse-level
8734
8735 @item gnus-button-url-regexp
8736 @vindex gnus-button-url-regexp
8737 A regular expression that matches embedded URLs.  It is used in the
8738 default values of the variables above.
8739
8740 @c Stuff related to gnus-button-man-level
8741
8742 @item gnus-button-man-handler
8743 @vindex gnus-button-man-handler
8744 The function to use for displaying man pages.  It must take at least one
8745 argument with a string naming the man page.
8746
8747 @c Stuff related to gnus-button-message-level
8748
8749 @item gnus-button-mid-or-mail-regexp
8750 @vindex gnus-button-mid-or-mail-regexp
8751 Regular expression that matches a message ID or a mail address.
8752
8753 @item gnus-button-prefer-mid-or-mail
8754 @vindex gnus-button-prefer-mid-or-mail
8755 This variable determines what to do when the button on a string as
8756 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8757 message ID or a mail address.  If it is one of the symbols @code{mid} or
8758 @code{mail}, Gnus will always assume that the string is a message ID or
8759 a mail address, respectively.  If this variable is set to the symbol
8760 @code{ask}, always query the user what do do.  If it is a function, this
8761 function will be called with the string as it's only argument.  The
8762 function must return @code{mid}, @code{mail}, @code{invalid} or
8763 @code{ask}.  The default value is the function
8764 @code{gnus-button-mid-or-mail-heuristic}.
8765
8766 @item gnus-button-mid-or-mail-heuristic
8767 @findex gnus-button-mid-or-mail-heuristic
8768 Function that guesses whether it's argument is a message ID or a mail
8769 address.  Returns @code{mid} it's a message IDs, @code{mail} if it's a
8770 mail address, @code{ask} if unsure and @code{invalid} if the string is
8771 invalid.
8772
8773 @item gnus-button-mid-or-mail-heuristic-alist
8774 @vindex gnus-button-mid-or-mail-heuristic-alist
8775 An alist of @code{(RATE . REGEXP)} pairs used by the function
8776 @code{gnus-button-mid-or-mail-heuristic}.
8777
8778 @c Stuff related to gnus-button-tex-level
8779
8780 @item gnus-button-ctan-handler
8781 @findex gnus-button-ctan-handler
8782 The function to use for displaying CTAN links.  It must take one
8783 argument, the string naming the URL.
8784
8785 @item gnus-ctan-url
8786 @vindex gnus-ctan-url
8787 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8788 by @code{gnus-button-ctan-handler}.
8789
8790 @c Misc stuff
8791
8792 @item gnus-article-button-face
8793 @vindex gnus-article-button-face
8794 Face used on buttons.
8795
8796 @item gnus-article-mouse-face
8797 @vindex gnus-article-mouse-face
8798 Face used when the mouse cursor is over a button.
8799
8800 @end table
8801
8802 @xref{Customizing Articles}, for how to buttonize articles automatically.
8803
8804
8805 @node Article Button Levels
8806 @subsection Article button levels
8807 @cindex button levels
8808 The higher the value of the variables @code{gnus-button-@var{*}-level},
8809 the more buttons will appear.  If the level is zero, no corresponding
8810 buttons are displayed.  With the default value (which is 5) you should
8811 already see quite a lot of buttons.  With higher levels, you will see
8812 more buttons, but you may also get more false positives.  To avoid them,
8813 you can set the variables @code{gnus-button-@var{*}-level} local to
8814 specific groups (@pxref{Group Parameters}).  Here's an example for the
8815 variable @code{gnus-parameters}:
8816
8817 @lisp
8818 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8819 (setq gnus-parameters
8820       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8821         ("\\<unix\\>"               (gnus-button-man-level 10))
8822         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8823 @end lisp
8824
8825 @table @code
8826
8827 @item gnus-button-browse-level
8828 @vindex gnus-button-browse-level
8829 Controls the display of references to message IDs, mail addresses and
8830 news URLs.  Related variables and functions include
8831 @code{gnus-button-url-regexp}, @code{browse-url}, and
8832 @code{browse-url-browser-function}.
8833
8834 @item gnus-button-emacs-level
8835 @vindex gnus-button-emacs-level
8836 Controls the display of Emacs or Gnus references.  Related functions are
8837 @code{gnus-button-handle-custom},
8838 @code{gnus-button-handle-describe-function},
8839 @code{gnus-button-handle-describe-variable},
8840 @code{gnus-button-handle-symbol},
8841 @code{gnus-button-handle-describe-key},
8842 @code{gnus-button-handle-apropos},
8843 @code{gnus-button-handle-apropos-command},
8844 @code{gnus-button-handle-apropos-variable},
8845 @code{gnus-button-handle-apropos-documentation}, and
8846 @code{gnus-button-handle-library}.
8847
8848 @item gnus-button-man-level
8849 @vindex gnus-button-man-level
8850 Controls the display of references to (Unix) man pages.
8851 See @code{gnus-button-man-handler}.
8852
8853 @item gnus-button-message-level
8854 @vindex gnus-button-message-level
8855 Controls the display of message IDs, mail addresses and news URLs.
8856 Related variables and functions include
8857 @code{gnus-button-mid-or-mail-regexp},
8858 @code{gnus-button-prefer-mid-or-mail},
8859 @code{gnus-button-mid-or-mail-heuristic}, and
8860 @code{gnus-button-mid-or-mail-heuristic-alist}.
8861
8862 @item gnus-button-tex-level
8863 @vindex gnus-button-tex-level
8864 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8865 URLs.  See the variables @code{gnus-ctan-url},
8866 @code{gnus-button-ctan-handler},
8867 @code{gnus-button-ctan-directory-regexp}, and
8868 @code{gnus-button-handle-ctan-bogus-regexp}.
8869
8870 @end table
8871
8872
8873 @node Article Date
8874 @subsection Article Date
8875
8876 The date is most likely generated in some obscure timezone you've never
8877 heard of, so it's quite nice to be able to find out what the time was
8878 when the article was sent.
8879
8880 @table @kbd
8881
8882 @item W T u
8883 @kindex W T u (Summary)
8884 @findex gnus-article-date-ut
8885 Display the date in UT (aka. GMT, aka ZULU)
8886 (@code{gnus-article-date-ut}).
8887
8888 @item W T i
8889 @kindex W T i (Summary)
8890 @findex gnus-article-date-iso8601
8891 @cindex ISO 8601
8892 Display the date in international format, aka. ISO 8601
8893 (@code{gnus-article-date-iso8601}).
8894
8895 @item W T l
8896 @kindex W T l (Summary)
8897 @findex gnus-article-date-local
8898 Display the date in the local timezone (@code{gnus-article-date-local}).
8899
8900 @item W T p
8901 @kindex W T p (Summary)
8902 @findex gnus-article-date-english
8903 Display the date in a format that's easily pronounceable in English
8904 (@code{gnus-article-date-english}).
8905
8906 @item W T s
8907 @kindex W T s (Summary)
8908 @vindex gnus-article-time-format
8909 @findex gnus-article-date-user
8910 @findex format-time-string
8911 Display the date using a user-defined format
8912 (@code{gnus-article-date-user}).  The format is specified by the
8913 @code{gnus-article-time-format} variable, and is a string that's passed
8914 to @code{format-time-string}.  See the documentation of that variable
8915 for a list of possible format specs.
8916
8917 @item W T e
8918 @kindex W T e (Summary)
8919 @findex gnus-article-date-lapsed
8920 @findex gnus-start-date-timer
8921 @findex gnus-stop-date-timer
8922 Say how much time has elapsed between the article was posted and now
8923 (@code{gnus-article-date-lapsed}).  It looks something like:
8924
8925 @example
8926 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8927 @end example
8928
8929 @vindex gnus-article-date-lapsed-new-header
8930 The value of @code{gnus-article-date-lapsed-new-header} determines
8931 whether this header will just be added below the old Date one, or will
8932 replace it.
8933
8934 An advantage of using Gnus to read mail is that it converts simple bugs
8935 into wonderful absurdities.
8936
8937 If you want to have this line updated continually, you can put
8938
8939 @lisp
8940 (gnus-start-date-timer)
8941 @end lisp
8942
8943 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8944 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8945 command.
8946
8947 @item W T o
8948 @kindex W T o (Summary)
8949 @findex gnus-article-date-original
8950 Display the original date (@code{gnus-article-date-original}).  This can
8951 be useful if you normally use some other conversion function and are
8952 worried that it might be doing something totally wrong.  Say, claiming
8953 that the article was posted in 1854.  Although something like that is
8954 @emph{totally} impossible.  Don't you trust me? *titter*
8955
8956 @end table
8957
8958 @xref{Customizing Articles}, for how to display the date in your
8959 preferred format automatically.
8960
8961
8962 @node Article Display
8963 @subsection Article Display
8964 @cindex picons
8965 @cindex x-face
8966 @cindex smileys
8967
8968 These commands add various frivolous display gimmicks to the article
8969 buffer in Emacs versions that support them.
8970
8971 @code{X-Face} headers are small black-and-white images supplied by the
8972 message headers (@pxref{X-Face}).
8973
8974 Picons, on the other hand, reside on your own system, and Gnus will
8975 try to match the headers to what you have (@pxref{Picons}).
8976
8977 Smileys are those little @samp{:-)} symbols that people like to litter
8978 their messages with (@pxref{Smileys}).
8979
8980 All these functions are toggles---if the elements already exist,
8981 they'll be removed.
8982
8983 @table @kbd
8984 @item W D x
8985 @kindex W D x (Summary)
8986 @findex gnus-article-display-x-face
8987 Display an @code{X-Face} in the @code{From} header.
8988 (@code{gnus-article-display-x-face}).
8989
8990 @item W D d
8991 @kindex W D d (Summary)
8992 @findex gnus-article-display-face
8993 Display a @code{Face} in the @code{From} header.
8994 (@code{gnus-article-display-face}).
8995
8996 @item W D s
8997 @kindex W D s (Summary)
8998 @findex gnus-treat-smiley
8999 Display smileys (@code{gnus-treat-smiley}).
9000
9001 @item W D f
9002 @kindex W D f (Summary)
9003 @findex gnus-treat-from-picon
9004 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9005
9006 @item W D m
9007 @kindex W D m (Summary)
9008 @findex gnus-treat-mail-picon
9009 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9010 (@code{gnus-treat-mail-picon}).
9011
9012 @item W D n
9013 @kindex W D n (Summary)
9014 @findex gnus-treat-newsgroups-picon
9015 Piconify all news headers (i. e., @code{Newsgroups} and
9016 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9017
9018 @item W D D
9019 @kindex W D D (Summary)
9020 @findex gnus-article-remove-images
9021 Remove all images from the article buffer
9022 (@code{gnus-article-remove-images}).
9023
9024 @end table
9025
9026
9027
9028 @node Article Signature
9029 @subsection Article Signature
9030 @cindex signatures
9031 @cindex article signature
9032
9033 @vindex gnus-signature-separator
9034 Each article is divided into two parts---the head and the body.  The
9035 body can be divided into a signature part and a text part.  The variable
9036 that says what is to be considered a signature is
9037 @code{gnus-signature-separator}.  This is normally the standard
9038 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9039 non-standard signature separators, so this variable can also be a list
9040 of regular expressions to be tested, one by one.  (Searches are done
9041 from the end of the body towards the beginning.)  One likely value is:
9042
9043 @lisp
9044 (setq gnus-signature-separator
9045       '("^-- $"         ; @r{The standard}
9046         "^-- *$"        ; @r{A common mangling}
9047         "^-------*$"    ; @r{Many people just use a looong}
9048                         ; @r{line of dashes.  Shame!}
9049         "^ *--------*$" ; @r{Double-shame!}
9050         "^________*$"   ; @r{Underscores are also popular}
9051         "^========*$")) ; @r{Pervert!}
9052 @end lisp
9053
9054 The more permissive you are, the more likely it is that you'll get false
9055 positives.
9056
9057 @vindex gnus-signature-limit
9058 @code{gnus-signature-limit} provides a limit to what is considered a
9059 signature when displaying articles.
9060
9061 @enumerate
9062 @item
9063 If it is an integer, no signature may be longer (in characters) than
9064 that integer.
9065 @item
9066 If it is a floating point number, no signature may be longer (in lines)
9067 than that number.
9068 @item
9069 If it is a function, the function will be called without any parameters,
9070 and if it returns @code{nil}, there is no signature in the buffer.
9071 @item
9072 If it is a string, it will be used as a regexp.  If it matches, the text
9073 in question is not a signature.
9074 @end enumerate
9075
9076 This variable can also be a list where the elements may be of the types
9077 listed above.  Here's an example:
9078
9079 @lisp
9080 (setq gnus-signature-limit
9081       '(200.0 "^---*Forwarded article"))
9082 @end lisp
9083
9084 This means that if there are more than 200 lines after the signature
9085 separator, or the text after the signature separator is matched by
9086 the regular expression @samp{^---*Forwarded article}, then it isn't a
9087 signature after all.
9088
9089
9090 @node Article Miscellanea
9091 @subsection Article Miscellanea
9092
9093 @table @kbd
9094 @item A t
9095 @kindex A t (Summary)
9096 @findex gnus-article-babel
9097 Translate the article from one language to another
9098 (@code{gnus-article-babel}).
9099
9100 @end table
9101
9102
9103 @node MIME Commands
9104 @section MIME Commands
9105 @cindex MIME decoding
9106 @cindex attachments
9107 @cindex viewing attachments
9108
9109 The following commands all understand the numerical prefix.  For
9110 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9111
9112 @table @kbd
9113 @item b
9114 @itemx K v
9115 @kindex b (Summary)
9116 @kindex K v (Summary)
9117 View the @acronym{MIME} part.
9118
9119 @item K o
9120 @kindex K o (Summary)
9121 Save the @acronym{MIME} part.
9122
9123 @item K c
9124 @kindex K c (Summary)
9125 Copy the @acronym{MIME} part.
9126
9127 @item K e
9128 @kindex K e (Summary)
9129 View the @acronym{MIME} part externally.
9130
9131 @item K i
9132 @kindex K i (Summary)
9133 View the @acronym{MIME} part internally.
9134
9135 @item K |
9136 @kindex K | (Summary)
9137 Pipe the @acronym{MIME} part to an external command.
9138 @end table
9139
9140 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9141 the same manner:
9142
9143 @table @kbd
9144 @item K b
9145 @kindex K b (Summary)
9146 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9147 mostly useful if you wish to save (or perform other actions) on inlined
9148 parts.
9149
9150 @item K m
9151 @kindex K m (Summary)
9152 @findex gnus-summary-repair-multipart
9153 Some multipart messages are transmitted with missing or faulty headers.
9154 This command will attempt to ``repair'' these messages so that they can
9155 be viewed in a more pleasant manner
9156 (@code{gnus-summary-repair-multipart}).
9157
9158 @item X m
9159 @kindex X m (Summary)
9160 @findex gnus-summary-save-parts
9161 Save all parts matching a @acronym{MIME} type to a directory
9162 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9163 convention (@pxref{Process/Prefix}).
9164
9165 @item M-t
9166 @kindex M-t (Summary)
9167 @findex gnus-summary-toggle-display-buttonized
9168 Toggle the buttonized display of the article buffer
9169 (@code{gnus-summary-toggle-display-buttonized}).
9170
9171 @item W M w
9172 @kindex W M w (Summary)
9173 @findex gnus-article-decode-mime-words
9174 Decode RFC 2047-encoded words in the article headers
9175 (@code{gnus-article-decode-mime-words}).
9176
9177 @item W M c
9178 @kindex W M c (Summary)
9179 @findex gnus-article-decode-charset
9180 Decode encoded article bodies as well as charsets
9181 (@code{gnus-article-decode-charset}).
9182
9183 This command looks in the @code{Content-Type} header to determine the
9184 charset.  If there is no such header in the article, you can give it a
9185 prefix, which will prompt for the charset to decode as.  In regional
9186 groups where people post using some common encoding (but do not
9187 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9188 parameter to the required charset (@pxref{Group Parameters}).
9189
9190 @item W M v
9191 @kindex W M v (Summary)
9192 @findex gnus-mime-view-all-parts
9193 View all the @acronym{MIME} parts in the current article
9194 (@code{gnus-mime-view-all-parts}).
9195
9196 @end table
9197
9198 Relevant variables:
9199
9200 @table @code
9201 @item gnus-ignored-mime-types
9202 @vindex gnus-ignored-mime-types
9203 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9204 this list will be completely ignored by Gnus.  The default value is
9205 @code{nil}.
9206
9207 To have all Vcards be ignored, you'd say something like this:
9208
9209 @lisp
9210 (setq gnus-ignored-mime-types
9211       '("text/x-vcard"))
9212 @end lisp
9213
9214 @item gnus-article-loose-mime
9215 @vindex gnus-article-loose-mime
9216 If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
9217 before interpreting the message as a @acronym{MIME} message.  This helps
9218 when reading messages from certain broken mail user agents.  The
9219 default is @code{nil}.
9220
9221 @item gnus-article-emulate-mime
9222 @vindex gnus-article-emulate-mime
9223 There are other, non-@acronym{MIME} encoding methods used.  The most common
9224 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9225 this variable is non-@code{nil}, Gnus will look in message bodies to
9226 see if it finds these encodings, and if so, it'll run them through the
9227 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9228
9229 @item gnus-unbuttonized-mime-types
9230 @vindex gnus-unbuttonized-mime-types
9231 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9232 this list won't have @acronym{MIME} buttons inserted unless they aren't
9233 displayed or this variable is overridden by
9234 @code{gnus-buttonized-mime-types}.  The default value is
9235 @code{(".*/.*")}.  This variable is only used when
9236 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9237
9238 @item gnus-buttonized-mime-types
9239 @vindex gnus-buttonized-mime-types
9240 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9241 this list will have @acronym{MIME} buttons inserted unless they aren't
9242 displayed.  This variable overrides
9243 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9244 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9245 is @code{nil}.
9246
9247 To see e.g. security buttons but no other buttons, you could set this
9248 variable to @code{("multipart/signed")} and leave
9249 @code{gnus-unbuttonized-mime-types} at the default value.
9250
9251 @item gnus-inhibit-mime-unbuttonizing
9252 @vindex gnus-inhibit-mime-unbuttonizing
9253 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9254 default value is @code{nil}.
9255
9256 @item gnus-article-mime-part-function
9257 @vindex gnus-article-mime-part-function
9258 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9259 handle as the parameter.  The function is meant to be used to allow
9260 users to gather information from the article (e. g., add Vcard info to
9261 the bbdb database) or to do actions based on parts (e. g., automatically
9262 save all jpegs into some directory).
9263
9264 Here's an example function the does the latter:
9265
9266 @lisp
9267 (defun my-save-all-jpeg-parts (handle)
9268   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9269     (with-temp-buffer
9270       (insert (mm-get-part handle))
9271       (write-region (point-min) (point-max)
9272                     (read-file-name "Save jpeg to: ")))))
9273 (setq gnus-article-mime-part-function
9274       'my-save-all-jpeg-parts)
9275 @end lisp
9276
9277 @vindex gnus-mime-multipart-functions
9278 @item gnus-mime-multipart-functions
9279 Alist of @acronym{MIME} multipart types and functions to handle them.
9280
9281 @vindex mm-file-name-rewrite-functions
9282 @item mm-file-name-rewrite-functions
9283 List of functions used for rewriting file names of @acronym{MIME} parts.
9284 Each function takes a file name as input and returns a file name.
9285
9286 Ready-made functions include@*
9287 @code{mm-file-name-delete-whitespace},
9288 @code{mm-file-name-trim-whitespace},
9289 @code{mm-file-name-collapse-whitespace}, and
9290 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9291 the variable @code{mm-file-name-replace-whitespace} to replace each
9292 whitespace character in a file name with that string; default value
9293 is @code{"_"} (a single underscore).
9294 @findex mm-file-name-delete-whitespace
9295 @findex mm-file-name-trim-whitespace
9296 @findex mm-file-name-collapse-whitespace
9297 @findex mm-file-name-replace-whitespace
9298 @vindex mm-file-name-replace-whitespace
9299
9300 The standard functions @code{capitalize}, @code{downcase},
9301 @code{upcase}, and @code{upcase-initials} may be useful, too.
9302
9303 Everybody knows that whitespace characters in file names are evil,
9304 except those who don't know.  If you receive lots of attachments from
9305 such unenlightened users, you can make live easier by adding
9306
9307 @lisp
9308 (setq mm-file-name-rewrite-functions
9309       '(mm-file-name-trim-whitespace
9310         mm-file-name-collapse-whitespace
9311         mm-file-name-replace-whitespace))
9312 @end lisp
9313
9314 @noindent
9315 to your @file{~/.gnus.el} file.
9316
9317 @end table
9318
9319
9320 @node Charsets
9321 @section Charsets
9322 @cindex charsets
9323
9324 People use different charsets, and we have @acronym{MIME} to let us know what
9325 charsets they use.  Or rather, we wish we had.  Many people use
9326 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9327 just send out messages without saying what character sets they use.  To
9328 help a bit with this, some local news hierarchies have policies that say
9329 what character set is the default.  For instance, the @samp{fj}
9330 hierarchy uses @code{iso-2022-jp-2}.
9331
9332 @vindex gnus-group-charset-alist
9333 This knowledge is encoded in the @code{gnus-group-charset-alist}
9334 variable, which is an alist of regexps (use the first item to match full
9335 group names) and default charsets to be used when reading these groups.
9336
9337 @vindex gnus-newsgroup-ignored-charsets
9338 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9339 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9340 even if they really are in @code{koi-8}.  To help here, the
9341 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9342 charsets that are listed here will be ignored.  The variable can be
9343 set on a group-by-group basis using the group parameters (@pxref{Group
9344 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9345 which includes values some agents insist on having in there.
9346
9347 @vindex gnus-group-posting-charset-alist
9348 When posting, @code{gnus-group-posting-charset-alist} is used to
9349 determine which charsets should not be encoded using the @acronym{MIME}
9350 encodings.  For instance, some hierarchies discourage using
9351 quoted-printable header encoding.
9352
9353 This variable is an alist of regexps and permitted unencoded charsets
9354 for posting.  Each element of the alist has the form @code{(}@var{test
9355 header body-list}@code{)}, where:
9356
9357 @table @var
9358 @item test
9359 is either a regular expression matching the newsgroup header or a
9360 variable to query,
9361 @item header
9362 is the charset which may be left unencoded in the header (@code{nil}
9363 means encode all charsets),
9364 @item body-list
9365 is a list of charsets which may be encoded using 8bit content-transfer
9366 encoding in the body, or one of the special values @code{nil} (always
9367 encode using quoted-printable) or @code{t} (always use 8bit).
9368 @end table
9369
9370 @cindex Russian
9371 @cindex koi8-r
9372 @cindex koi8-u
9373 @cindex iso-8859-5
9374 @cindex coding system aliases
9375 @cindex preferred charset
9376
9377 Other charset tricks that may be useful, although not Gnus-specific:
9378
9379 If there are several @acronym{MIME} charsets that encode the same Emacs
9380 charset, you can choose what charset to use by saying the following:
9381
9382 @lisp
9383 (put-charset-property 'cyrillic-iso8859-5
9384                       'preferred-coding-system 'koi8-r)
9385 @end lisp
9386
9387 This means that Russian will be encoded using @code{koi8-r} instead of
9388 the default @code{iso-8859-5} @acronym{MIME} charset.
9389
9390 If you want to read messages in @code{koi8-u}, you can cheat and say
9391
9392 @lisp
9393 (define-coding-system-alias 'koi8-u 'koi8-r)
9394 @end lisp
9395
9396 This will almost do the right thing.
9397
9398 And finally, to read charsets like @code{windows-1251}, you can say
9399 something like
9400
9401 @lisp
9402 (codepage-setup 1251)
9403 (define-coding-system-alias 'windows-1251 'cp1251)
9404 @end lisp
9405
9406
9407 @node Article Commands
9408 @section Article Commands
9409
9410 @table @kbd
9411
9412 @item A P
9413 @cindex PostScript
9414 @cindex printing
9415 @kindex A P (Summary)
9416 @vindex gnus-ps-print-hook
9417 @findex gnus-summary-print-article
9418 Generate and print a PostScript image of the article buffer
9419 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9420 be run just before printing the buffer.  An alternative way to print
9421 article is to use Muttprint (@pxref{Saving Articles}).
9422
9423 @end table
9424
9425
9426 @node Summary Sorting
9427 @section Summary Sorting
9428 @cindex summary sorting
9429
9430 You can have the summary buffer sorted in various ways, even though I
9431 can't really see why you'd want that.
9432
9433 @table @kbd
9434
9435 @item C-c C-s C-n
9436 @kindex C-c C-s C-n (Summary)
9437 @findex gnus-summary-sort-by-number
9438 Sort by article number (@code{gnus-summary-sort-by-number}).
9439
9440 @item C-c C-s C-a
9441 @kindex C-c C-s C-a (Summary)
9442 @findex gnus-summary-sort-by-author
9443 Sort by author (@code{gnus-summary-sort-by-author}).
9444
9445 @item C-c C-s C-s
9446 @kindex C-c C-s C-s (Summary)
9447 @findex gnus-summary-sort-by-subject
9448 Sort by subject (@code{gnus-summary-sort-by-subject}).
9449
9450 @item C-c C-s C-d
9451 @kindex C-c C-s C-d (Summary)
9452 @findex gnus-summary-sort-by-date
9453 Sort by date (@code{gnus-summary-sort-by-date}).
9454
9455 @item C-c C-s C-l
9456 @kindex C-c C-s C-l (Summary)
9457 @findex gnus-summary-sort-by-lines
9458 Sort by lines (@code{gnus-summary-sort-by-lines}).
9459
9460 @item C-c C-s C-c
9461 @kindex C-c C-s C-c (Summary)
9462 @findex gnus-summary-sort-by-chars
9463 Sort by article length (@code{gnus-summary-sort-by-chars}).
9464
9465 @item C-c C-s C-i
9466 @kindex C-c C-s C-i (Summary)
9467 @findex gnus-summary-sort-by-score
9468 Sort by score (@code{gnus-summary-sort-by-score}).
9469
9470 @item C-c C-s C-r
9471 @kindex C-c C-s C-r (Summary)
9472 @findex gnus-summary-sort-by-random
9473 Randomize (@code{gnus-summary-sort-by-random}).
9474
9475 @item C-c C-s C-o
9476 @kindex C-c C-s C-o (Summary)
9477 @findex gnus-summary-sort-by-original
9478 Sort using the default sorting method
9479 (@code{gnus-summary-sort-by-original}).
9480 @end table
9481
9482 These functions will work both when you use threading and when you don't
9483 use threading.  In the latter case, all summary lines will be sorted,
9484 line by line.  In the former case, sorting will be done on a
9485 root-by-root basis, which might not be what you were looking for.  To
9486 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9487 Commands}).
9488
9489
9490 @node Finding the Parent
9491 @section Finding the Parent
9492 @cindex parent articles
9493 @cindex referring articles
9494
9495 @table @kbd
9496 @item ^
9497 @kindex ^ (Summary)
9498 @findex gnus-summary-refer-parent-article
9499 If you'd like to read the parent of the current article, and it is not
9500 displayed in the summary buffer, you might still be able to.  That is,
9501 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9502 and the @code{References} in the current article are not mangled, you
9503 can just press @kbd{^} or @kbd{A r}
9504 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9505 you'll get the parent.  If the parent is already displayed in the
9506 summary buffer, point will just move to this article.
9507
9508 If given a positive numerical prefix, fetch that many articles back into
9509 the ancestry.  If given a negative numerical prefix, fetch just that
9510 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9511 grandparent and the grandgrandparent of the current article.  If you say
9512 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9513 article.
9514
9515 @item A R (Summary)
9516 @findex gnus-summary-refer-references
9517 @kindex A R (Summary)
9518 Fetch all articles mentioned in the @code{References} header of the
9519 article (@code{gnus-summary-refer-references}).
9520
9521 @item A T (Summary)
9522 @findex gnus-summary-refer-thread
9523 @kindex A T (Summary)
9524 Display the full thread where the current article appears
9525 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9526 headers in the current group to work, so it usually takes a while.  If
9527 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9528 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9529 visible effects normally, but it'll make this command work a whole lot
9530 faster.  Of course, it'll make group entry somewhat slow.
9531
9532 @vindex gnus-refer-thread-limit
9533 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9534 articles before the first displayed in the current group) headers to
9535 fetch when doing this command.  The default is 200.  If @code{t}, all
9536 the available headers will be fetched.  This variable can be overridden
9537 by giving the @kbd{A T} command a numerical prefix.
9538
9539 @item M-^ (Summary)
9540 @findex gnus-summary-refer-article
9541 @kindex M-^ (Summary)
9542 @cindex Message-ID
9543 @cindex fetching by Message-ID
9544 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9545 matter what group it belongs to.  @kbd{M-^}
9546 (@code{gnus-summary-refer-article}) will ask you for a
9547 @code{Message-ID}, which is one of those long, hard-to-read thingies
9548 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9549 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9550 @end table
9551
9552 The current select method will be used when fetching by
9553 @code{Message-ID} from non-news select method, but you can override this
9554 by giving this command a prefix.
9555
9556 @vindex gnus-refer-article-method
9557 If the group you are reading is located on a back end that does not
9558 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9559 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9560 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9561 updating the spool you are reading from, but that's not really
9562 necessary.
9563
9564 It can also be a list of select methods, as well as the special symbol
9565 @code{current}, which means to use the current select method.  If it
9566 is a list, Gnus will try all the methods in the list until it finds a
9567 match.
9568
9569 Here's an example setting that will first try the current method, and
9570 then ask Google if that fails:
9571
9572 @lisp
9573 (setq gnus-refer-article-method
9574       '(current
9575         (nnweb "google" (nnweb-type google))))
9576 @end lisp
9577
9578 Most of the mail back ends support fetching by @code{Message-ID}, but
9579 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9580 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9581 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9582 only able to locate articles that have been posted to the current group.
9583 (Anything else would be too time consuming.)  @code{nnmh} does not
9584 support this at all.
9585
9586
9587 @node Alternative Approaches
9588 @section Alternative Approaches
9589
9590 Different people like to read news using different methods.  This being
9591 Gnus, we offer a small selection of minor modes for the summary buffers.
9592
9593 @menu
9594 * Pick and Read::               First mark articles and then read them.
9595 * Binary Groups::               Auto-decode all articles.
9596 @end menu
9597
9598
9599 @node Pick and Read
9600 @subsection Pick and Read
9601 @cindex pick and read
9602
9603 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9604 a two-phased reading interface.  The user first marks in a summary
9605 buffer the articles she wants to read.  Then she starts reading the
9606 articles with just an article buffer displayed.
9607
9608 @findex gnus-pick-mode
9609 @kindex M-x gnus-pick-mode
9610 Gnus provides a summary buffer minor mode that allows
9611 this---@code{gnus-pick-mode}.  This basically means that a few process
9612 mark commands become one-keystroke commands to allow easy marking, and
9613 it provides one additional command for switching to the summary buffer.
9614
9615 Here are the available keystrokes when using pick mode:
9616
9617 @table @kbd
9618 @item .
9619 @kindex . (Pick)
9620 @findex gnus-pick-article-or-thread
9621 Pick the article or thread on the current line
9622 (@code{gnus-pick-article-or-thread}).  If the variable
9623 @code{gnus-thread-hide-subtree} is true, then this key selects the
9624 entire thread when used at the first article of the thread.  Otherwise,
9625 it selects just the article.  If given a numerical prefix, go to that
9626 thread or article and pick it.  (The line number is normally displayed
9627 at the beginning of the summary pick lines.)
9628
9629 @item SPACE
9630 @kindex SPACE (Pick)
9631 @findex gnus-pick-next-page
9632 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9633 at the end of the buffer, start reading the picked articles.
9634
9635 @item u
9636 @kindex u (Pick)
9637 @findex gnus-pick-unmark-article-or-thread.
9638 Unpick the thread or article
9639 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9640 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9641 thread if used at the first article of the thread.  Otherwise it unpicks
9642 just the article.  You can give this key a numerical prefix to unpick
9643 the thread or article at that line.
9644
9645 @item RET
9646 @kindex RET (Pick)
9647 @findex gnus-pick-start-reading
9648 @vindex gnus-pick-display-summary
9649 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9650 given a prefix, mark all unpicked articles as read first.  If
9651 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9652 will still be visible when you are reading.
9653
9654 @end table
9655
9656 All the normal summary mode commands are still available in the
9657 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9658 which is mapped to the same function
9659 @code{gnus-summary-tick-article-forward}.
9660
9661 If this sounds like a good idea to you, you could say:
9662
9663 @lisp
9664 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9665 @end lisp
9666
9667 @vindex gnus-pick-mode-hook
9668 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9669
9670 @vindex gnus-mark-unpicked-articles-as-read
9671 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9672 all unpicked articles as read.  The default is @code{nil}.
9673
9674 @vindex gnus-summary-pick-line-format
9675 The summary line format in pick mode is slightly different from the
9676 standard format.  At the beginning of each line the line number is
9677 displayed.  The pick mode line format is controlled by the
9678 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9679 Variables}).  It accepts the same format specs that
9680 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9681
9682
9683 @node Binary Groups
9684 @subsection Binary Groups
9685 @cindex binary groups
9686
9687 @findex gnus-binary-mode
9688 @kindex M-x gnus-binary-mode
9689 If you spend much time in binary groups, you may grow tired of hitting
9690 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9691 is a minor mode for summary buffers that makes all ordinary Gnus article
9692 selection functions uudecode series of articles and display the result
9693 instead of just displaying the articles the normal way.
9694
9695 @kindex g (Binary)
9696 @findex gnus-binary-show-article
9697 The only way, in fact, to see the actual articles is the @kbd{g}
9698 command, when you have turned on this mode
9699 (@code{gnus-binary-show-article}).
9700
9701 @vindex gnus-binary-mode-hook
9702 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9703
9704
9705 @node Tree Display
9706 @section Tree Display
9707 @cindex trees
9708
9709 @vindex gnus-use-trees
9710 If you don't like the normal Gnus summary display, you might try setting
9711 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9712 additional @dfn{tree buffer}.  You can execute all summary mode commands
9713 in the tree buffer.
9714
9715 There are a few variables to customize the tree display, of course:
9716
9717 @table @code
9718 @item gnus-tree-mode-hook
9719 @vindex gnus-tree-mode-hook
9720 A hook called in all tree mode buffers.
9721
9722 @item gnus-tree-mode-line-format
9723 @vindex gnus-tree-mode-line-format
9724 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9725 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9726 of valid specs, @pxref{Summary Buffer Mode Line}.
9727
9728 @item gnus-selected-tree-face
9729 @vindex gnus-selected-tree-face
9730 Face used for highlighting the selected article in the tree buffer.  The
9731 default is @code{modeline}.
9732
9733 @item gnus-tree-line-format
9734 @vindex gnus-tree-line-format
9735 A format string for the tree nodes.  The name is a bit of a misnomer,
9736 though---it doesn't define a line, but just the node.  The default value
9737 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9738 the name of the poster.  It is vital that all nodes are of the same
9739 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9740
9741 Valid specs are:
9742
9743 @table @samp
9744 @item n
9745 The name of the poster.
9746 @item f
9747 The @code{From} header.
9748 @item N
9749 The number of the article.
9750 @item [
9751 The opening bracket.
9752 @item ]
9753 The closing bracket.
9754 @item s
9755 The subject.
9756 @end table
9757
9758 @xref{Formatting Variables}.
9759
9760 Variables related to the display are:
9761
9762 @table @code
9763 @item gnus-tree-brackets
9764 @vindex gnus-tree-brackets
9765 This is used for differentiating between ``real'' articles and
9766 ``sparse'' articles.  The format is 
9767 @example
9768 ((@var{real-open} . @var{real-close}) 
9769  (@var{sparse-open} . @var{sparse-close}) 
9770  (@var{dummy-open} . @var{dummy-close}))
9771 @end example
9772 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9773
9774 @item gnus-tree-parent-child-edges
9775 @vindex gnus-tree-parent-child-edges
9776 This is a list that contains the characters used for connecting parent
9777 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9778
9779 @end table
9780
9781 @item gnus-tree-minimize-window
9782 @vindex gnus-tree-minimize-window
9783 If this variable is non-@code{nil}, Gnus will try to keep the tree
9784 buffer as small as possible to allow more room for the other Gnus
9785 windows.  If this variable is a number, the tree buffer will never be
9786 higher than that number.  The default is @code{t}.  Note that if you
9787 have several windows displayed side-by-side in a frame and the tree
9788 buffer is one of these, minimizing the tree window will also resize all
9789 other windows displayed next to it.
9790
9791 You may also wish to add the following hook to keep the window minimized
9792 at all times:
9793
9794 @lisp
9795 (add-hook 'gnus-configure-windows-hook
9796           'gnus-tree-perhaps-minimize)
9797 @end lisp
9798
9799 @item gnus-generate-tree-function
9800 @vindex gnus-generate-tree-function
9801 @findex gnus-generate-horizontal-tree
9802 @findex gnus-generate-vertical-tree
9803 The function that actually generates the thread tree.  Two predefined
9804 functions are available: @code{gnus-generate-horizontal-tree} and
9805 @code{gnus-generate-vertical-tree} (which is the default).
9806
9807 @end table
9808
9809 Here's an example from a horizontal tree buffer:
9810
9811 @example
9812 @{***@}-(***)-[odd]-[Gun]
9813      |      \[Jan]
9814      |      \[odd]-[Eri]
9815      |      \(***)-[Eri]
9816      |            \[odd]-[Paa]
9817      \[Bjo]
9818      \[Gun]
9819      \[Gun]-[Jor]
9820 @end example
9821
9822 Here's the same thread displayed in a vertical tree buffer:
9823
9824 @example
9825 @group
9826 @{***@}
9827   |--------------------------\-----\-----\
9828 (***)                         [Bjo] [Gun] [Gun]
9829   |--\-----\-----\                          |
9830 [odd] [Jan] [odd] (***)                   [Jor]
9831   |           |     |--\
9832 [Gun]       [Eri] [Eri] [odd]
9833                           |
9834                         [Paa]
9835 @end group
9836 @end example
9837
9838 If you're using horizontal trees, it might be nice to display the trees
9839 side-by-side with the summary buffer.  You could add something like the
9840 following to your @file{~/.gnus.el} file:
9841
9842 @lisp
9843 (setq gnus-use-trees t
9844       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9845       gnus-tree-minimize-window nil)
9846 (gnus-add-configuration
9847  '(article
9848    (vertical 1.0
9849              (horizontal 0.25
9850                          (summary 0.75 point)
9851                          (tree 1.0))
9852              (article 1.0))))
9853 @end lisp
9854
9855 @xref{Window Layout}.
9856
9857
9858 @node Mail Group Commands
9859 @section Mail Group Commands
9860 @cindex mail group commands
9861
9862 Some commands only make sense in mail groups.  If these commands are
9863 invalid in the current group, they will raise a hell and let you know.
9864
9865 All these commands (except the expiry and edit commands) use the
9866 process/prefix convention (@pxref{Process/Prefix}).
9867
9868 @table @kbd
9869
9870 @item B e
9871 @kindex B e (Summary)
9872 @findex gnus-summary-expire-articles
9873 Run all expirable articles in the current group through the expiry
9874 process (@code{gnus-summary-expire-articles}).  That is, delete all
9875 expirable articles in the group that have been around for a while.
9876 (@pxref{Expiring Mail}).
9877
9878 @item B C-M-e
9879 @kindex B C-M-e (Summary)
9880 @findex gnus-summary-expire-articles-now
9881 Delete all the expirable articles in the group
9882 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9883 articles eligible for expiry in the current group will
9884 disappear forever into that big @file{/dev/null} in the sky.
9885
9886 @item B DEL
9887 @kindex B DEL (Summary)
9888 @findex gnus-summary-delete-article
9889 @c @icon{gnus-summary-mail-delete}
9890 Delete the mail article.  This is ``delete'' as in ``delete it from your
9891 disk forever and ever, never to return again.'' Use with caution.
9892 (@code{gnus-summary-delete-article}).
9893
9894 @item B m
9895 @kindex B m (Summary)
9896 @cindex move mail
9897 @findex gnus-summary-move-article
9898 @vindex gnus-preserve-marks
9899 Move the article from one mail group to another
9900 (@code{gnus-summary-move-article}).  Marks will be preserved if
9901 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9902
9903 @item B c
9904 @kindex B c (Summary)
9905 @cindex copy mail
9906 @findex gnus-summary-copy-article
9907 @c @icon{gnus-summary-mail-copy}
9908 Copy the article from one group (mail group or not) to a mail group
9909 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9910 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9911
9912 @item B B
9913 @kindex B B (Summary)
9914 @cindex crosspost mail
9915 @findex gnus-summary-crosspost-article
9916 Crosspost the current article to some other group
9917 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9918 the article in the other group, and the Xref headers of the article will
9919 be properly updated.
9920
9921 @item B i
9922 @kindex B i (Summary)
9923 @findex gnus-summary-import-article
9924 Import an arbitrary file into the current mail newsgroup
9925 (@code{gnus-summary-import-article}).  You will be prompted for a file
9926 name, a @code{From} header and a @code{Subject} header.
9927
9928 @item B I
9929 @kindex B I (Summary)
9930 @findex gnus-summary-create-article
9931 Create an empty article in the current mail newsgroups
9932 (@code{gnus-summary-create-article}).  You will be prompted for a
9933 @code{From} header and a @code{Subject} header.
9934
9935 @item B r
9936 @kindex B r (Summary)
9937 @findex gnus-summary-respool-article
9938 @vindex gnus-summary-respool-default-method
9939 Respool the mail article (@code{gnus-summary-respool-article}).
9940 @code{gnus-summary-respool-default-method} will be used as the default
9941 select method when respooling.  This variable is @code{nil} by default,
9942 which means that the current group select method will be used instead.
9943 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9944 (which is the default).
9945
9946 @item B w
9947 @itemx e
9948 @kindex B w (Summary)
9949 @kindex e (Summary)
9950 @findex gnus-summary-edit-article
9951 @kindex C-c C-c (Article)
9952 @findex gnus-summary-edit-article-done
9953 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9954 editing and make the changes permanent, type @kbd{C-c C-c}
9955 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9956 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9957
9958 @item B q
9959 @kindex B q (Summary)
9960 @findex gnus-summary-respool-query
9961 If you want to re-spool an article, you might be curious as to what group
9962 the article will end up in before you do the re-spooling.  This command
9963 will tell you (@code{gnus-summary-respool-query}).
9964
9965 @item B t
9966 @kindex B t (Summary)
9967 @findex gnus-summary-respool-trace
9968 Similarly, this command will display all fancy splitting patterns used
9969 when respooling, if any (@code{gnus-summary-respool-trace}).
9970
9971 @item B p
9972 @kindex B p (Summary)
9973 @findex gnus-summary-article-posted-p
9974 Some people have a tendency to send you ``courtesy'' copies when they
9975 follow up to articles you have posted.  These usually have a
9976 @code{Newsgroups} header in them, but not always.  This command
9977 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9978 article from your news server (or rather, from
9979 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9980 report back whether it found the article or not.  Even if it says that
9981 it didn't find the article, it may have been posted anyway---mail
9982 propagation is much faster than news propagation, and the news copy may
9983 just not have arrived yet.
9984
9985 @item K E
9986 @kindex K E (Summary)
9987 @findex gnus-article-encrypt-body
9988 @vindex gnus-article-encrypt-protocol
9989 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9990 The body is encrypted with the encryption protocol specified by the
9991 variable @code{gnus-article-encrypt-protocol}.
9992
9993 @end table
9994
9995 @vindex gnus-move-split-methods
9996 @cindex moving articles
9997 If you move (or copy) articles regularly, you might wish to have Gnus
9998 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9999 variable that uses the same syntax as @code{gnus-split-methods}
10000 (@pxref{Saving Articles}).  You may customize that variable to create
10001 suggestions you find reasonable.  (Note that
10002 @code{gnus-move-split-methods} uses group names where
10003 @code{gnus-split-methods} uses file names.)
10004
10005 @lisp
10006 (setq gnus-move-split-methods
10007       '(("^From:.*Lars Magne" "nnml:junk")
10008         ("^Subject:.*gnus" "nnfolder:important")
10009         (".*" "nnml:misc")))
10010 @end lisp
10011
10012
10013 @node Various Summary Stuff
10014 @section Various Summary Stuff
10015
10016 @menu
10017 * Summary Group Information::   Information oriented commands.
10018 * Searching for Articles::      Multiple article commands.
10019 * Summary Generation Commands::  
10020 * Really Various Summary Commands::  Those pesky non-conformant commands.
10021 @end menu
10022
10023 @table @code
10024 @vindex gnus-summary-display-while-building
10025 @item gnus-summary-display-while-building
10026 If non-@code{nil}, show and update the summary buffer as it's being
10027 built.  If @code{t}, update the buffer after every line is inserted.
10028 If the value is an integer, @var{n}, update the display every @var{n}
10029 lines.  The default is @code{nil}.
10030
10031 @vindex gnus-summary-display-arrow
10032 @item gnus-summary-display-arrow
10033 If non-@code{nil}, display an arrow in the fringe to indicate the
10034 current article.
10035
10036 @vindex gnus-summary-mode-hook
10037 @item gnus-summary-mode-hook
10038 This hook is called when creating a summary mode buffer.
10039
10040 @vindex gnus-summary-generate-hook
10041 @item gnus-summary-generate-hook
10042 This is called as the last thing before doing the threading and the
10043 generation of the summary buffer.  It's quite convenient for customizing
10044 the threading variables based on what data the newsgroup has.  This hook
10045 is called from the summary buffer after most summary buffer variables
10046 have been set.
10047
10048 @vindex gnus-summary-prepare-hook
10049 @item gnus-summary-prepare-hook
10050 It is called after the summary buffer has been generated.  You might use
10051 it to, for instance, highlight lines or modify the look of the buffer in
10052 some other ungodly manner.  I don't care.
10053
10054 @vindex gnus-summary-prepared-hook
10055 @item gnus-summary-prepared-hook
10056 A hook called as the very last thing after the summary buffer has been
10057 generated.
10058
10059 @vindex gnus-summary-ignore-duplicates
10060 @item gnus-summary-ignore-duplicates
10061 When Gnus discovers two articles that have the same @code{Message-ID},
10062 it has to do something drastic.  No articles are allowed to have the
10063 same @code{Message-ID}, but this may happen when reading mail from some
10064 sources.  Gnus allows you to customize what happens with this variable.
10065 If it is @code{nil} (which is the default), Gnus will rename the
10066 @code{Message-ID} (for display purposes only) and display the article as
10067 any other article.  If this variable is @code{t}, it won't display the
10068 article---it'll be as if it never existed.
10069
10070 @vindex gnus-alter-articles-to-read-function
10071 @item gnus-alter-articles-to-read-function
10072 This function, which takes two parameters (the group name and the list
10073 of articles to be selected), is called to allow the user to alter the
10074 list of articles to be selected.
10075
10076 For instance, the following function adds the list of cached articles to
10077 the list in one particular group:
10078
10079 @lisp
10080 (defun my-add-cached-articles (group articles)
10081   (if (string= group "some.group")
10082       (append gnus-newsgroup-cached articles)
10083     articles))
10084 @end lisp
10085
10086 @vindex gnus-newsgroup-variables
10087 @item gnus-newsgroup-variables
10088 A list of newsgroup (summary buffer) local variables, or cons of
10089 variables and their default values (when the default values are not
10090 @code{nil}), that should be made global while the summary buffer is
10091 active.  These variables can be used to set variables in the group
10092 parameters while still allowing them to affect operations done in
10093 other buffers. For example:
10094
10095 @lisp
10096 (setq gnus-newsgroup-variables
10097       '(message-use-followup-to
10098         (gnus-visible-headers .
10099  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10100 @end lisp
10101
10102 @end table
10103
10104
10105 @node Summary Group Information
10106 @subsection Summary Group Information
10107
10108 @table @kbd
10109
10110 @item H f
10111 @kindex H f (Summary)
10112 @findex gnus-summary-fetch-faq
10113 @vindex gnus-group-faq-directory
10114 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10115 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10116 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10117 is usually a directory on a remote machine.  This variable can also be
10118 a list of directories.  In that case, giving a prefix to this command
10119 will allow you to choose between the various sites.  @code{ange-ftp}
10120 or @code{efs} will probably be used for fetching the file.
10121
10122 @item H d
10123 @kindex H d (Summary)
10124 @findex gnus-summary-describe-group
10125 Give a brief description of the current group
10126 (@code{gnus-summary-describe-group}).  If given a prefix, force
10127 rereading the description from the server.
10128
10129 @item H h
10130 @kindex H h (Summary)
10131 @findex gnus-summary-describe-briefly
10132 Give an extremely brief description of the most important summary
10133 keystrokes (@code{gnus-summary-describe-briefly}).
10134
10135 @item H i
10136 @kindex H i (Summary)
10137 @findex gnus-info-find-node
10138 Go to the Gnus info node (@code{gnus-info-find-node}).
10139 @end table
10140
10141
10142 @node Searching for Articles
10143 @subsection Searching for Articles
10144
10145 @table @kbd
10146
10147 @item M-s
10148 @kindex M-s (Summary)
10149 @findex gnus-summary-search-article-forward
10150 Search through all subsequent (raw) articles for a regexp
10151 (@code{gnus-summary-search-article-forward}).
10152
10153 @item M-r
10154 @kindex M-r (Summary)
10155 @findex gnus-summary-search-article-backward
10156 Search through all previous (raw) articles for a regexp
10157 (@code{gnus-summary-search-article-backward}).
10158
10159 @item &
10160 @kindex & (Summary)
10161 @findex gnus-summary-execute-command
10162 This command will prompt you for a header, a regular expression to match
10163 on this field, and a command to be executed if the match is made
10164 (@code{gnus-summary-execute-command}).  If the header is an empty
10165 string, the match is done on the entire article.  If given a prefix,
10166 search backward instead.
10167
10168 For instance, @kbd{& RET some.*string #} will put the process mark on
10169 all articles that have heads or bodies that match @samp{some.*string}.
10170
10171 @item M-&
10172 @kindex M-& (Summary)
10173 @findex gnus-summary-universal-argument
10174 Perform any operation on all articles that have been marked with
10175 the process mark (@code{gnus-summary-universal-argument}).
10176 @end table
10177
10178 @node Summary Generation Commands
10179 @subsection Summary Generation Commands
10180
10181 @table @kbd
10182
10183 @item Y g
10184 @kindex Y g (Summary)
10185 @findex gnus-summary-prepare
10186 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10187
10188 @item Y c
10189 @kindex Y c (Summary)
10190 @findex gnus-summary-insert-cached-articles
10191 Pull all cached articles (for the current group) into the summary buffer
10192 (@code{gnus-summary-insert-cached-articles}).
10193
10194 @item Y d
10195 @kindex Y d (Summary)
10196 @findex gnus-summary-insert-dormant-articles
10197 Pull all dormant articles (for the current group) into the summary buffer
10198 (@code{gnus-summary-insert-dormant-articles}).
10199
10200 @end table
10201
10202
10203 @node Really Various Summary Commands
10204 @subsection Really Various Summary Commands
10205
10206 @table @kbd
10207
10208 @item A D
10209 @itemx C-d
10210 @kindex C-d (Summary)
10211 @kindex A D (Summary)
10212 @findex gnus-summary-enter-digest-group
10213 If the current article is a collection of other articles (for instance,
10214 a digest), you might use this command to enter a group based on the that
10215 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10216 guess what article type is currently displayed unless you give a prefix
10217 to this command, which forces a ``digest'' interpretation.  Basically,
10218 whenever you see a message that is a collection of other messages of
10219 some format, you @kbd{C-d} and read these messages in a more convenient
10220 fashion.
10221
10222 @item C-M-d
10223 @kindex C-M-d (Summary)
10224 @findex gnus-summary-read-document
10225 This command is very similar to the one above, but lets you gather
10226 several documents into one biiig group
10227 (@code{gnus-summary-read-document}).  It does this by opening several
10228 @code{nndoc} groups for each document, and then opening an
10229 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10230 command understands the process/prefix convention
10231 (@pxref{Process/Prefix}).
10232
10233 @item C-t
10234 @kindex C-t (Summary)
10235 @findex gnus-summary-toggle-truncation
10236 Toggle truncation of summary lines
10237 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10238 line centering function in the summary buffer, so it's not a good idea
10239 to have truncation switched off while reading articles.
10240
10241 @item =
10242 @kindex = (Summary)
10243 @findex gnus-summary-expand-window
10244 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10245 If given a prefix, force an @code{article} window configuration.
10246
10247 @item C-M-e
10248 @kindex C-M-e (Summary)
10249 @findex gnus-summary-edit-parameters
10250 Edit the group parameters (@pxref{Group Parameters}) of the current
10251 group (@code{gnus-summary-edit-parameters}).
10252
10253 @item C-M-a
10254 @kindex C-M-a (Summary)
10255 @findex gnus-summary-customize-parameters
10256 Customize the group parameters (@pxref{Group Parameters}) of the current
10257 group (@code{gnus-summary-customize-parameters}).
10258
10259 @end table
10260
10261
10262 @node Exiting the Summary Buffer
10263 @section Exiting the Summary Buffer
10264 @cindex summary exit
10265 @cindex exiting groups
10266
10267 Exiting from the summary buffer will normally update all info on the
10268 group and return you to the group buffer.
10269
10270 @table @kbd
10271
10272 @item Z Z
10273 @itemx q
10274 @kindex Z Z (Summary)
10275 @kindex q (Summary)
10276 @findex gnus-summary-exit
10277 @vindex gnus-summary-exit-hook
10278 @vindex gnus-summary-prepare-exit-hook
10279 @vindex gnus-group-no-more-groups-hook
10280 @c @icon{gnus-summary-exit}
10281 Exit the current group and update all information on the group
10282 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10283 called before doing much of the exiting, which calls
10284 @code{gnus-summary-expire-articles} by default.
10285 @code{gnus-summary-exit-hook} is called after finishing the exit
10286 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10287 group mode having no more (unread) groups.
10288
10289 @item Z E
10290 @itemx Q
10291 @kindex Z E (Summary)
10292 @kindex Q (Summary)
10293 @findex gnus-summary-exit-no-update
10294 Exit the current group without updating any information on the group
10295 (@code{gnus-summary-exit-no-update}).
10296
10297 @item Z c
10298 @itemx c
10299 @kindex Z c (Summary)
10300 @kindex c (Summary)
10301 @findex gnus-summary-catchup-and-exit
10302 @c @icon{gnus-summary-catchup-and-exit}
10303 Mark all unticked articles in the group as read and then exit
10304 (@code{gnus-summary-catchup-and-exit}).
10305
10306 @item Z C
10307 @kindex Z C (Summary)
10308 @findex gnus-summary-catchup-all-and-exit
10309 Mark all articles, even the ticked ones, as read and then exit
10310 (@code{gnus-summary-catchup-all-and-exit}).
10311
10312 @item Z n
10313 @kindex Z n (Summary)
10314 @findex gnus-summary-catchup-and-goto-next-group
10315 Mark all articles as read and go to the next group
10316 (@code{gnus-summary-catchup-and-goto-next-group}).
10317
10318 @item Z R
10319 @kindex Z R (Summary)
10320 @findex gnus-summary-reselect-current-group
10321 Exit this group, and then enter it again
10322 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10323 all articles, both read and unread.
10324
10325 @item Z G
10326 @itemx M-g
10327 @kindex Z G (Summary)
10328 @kindex M-g (Summary)
10329 @findex gnus-summary-rescan-group
10330 @c @icon{gnus-summary-mail-get}
10331 Exit the group, check for new articles in the group, and select the
10332 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10333 articles, both read and unread.
10334
10335 @item Z N
10336 @kindex Z N (Summary)
10337 @findex gnus-summary-next-group
10338 Exit the group and go to the next group
10339 (@code{gnus-summary-next-group}).
10340
10341 @item Z P
10342 @kindex Z P (Summary)
10343 @findex gnus-summary-prev-group
10344 Exit the group and go to the previous group
10345 (@code{gnus-summary-prev-group}).
10346
10347 @item Z s
10348 @kindex Z s (Summary)
10349 @findex gnus-summary-save-newsrc
10350 Save the current number of read/marked articles in the dribble buffer
10351 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10352 given a prefix, also save the @file{.newsrc} file(s).  Using this
10353 command will make exit without updating (the @kbd{Q} command) worthless.
10354 @end table
10355
10356 @vindex gnus-exit-group-hook
10357 @code{gnus-exit-group-hook} is called when you exit the current group
10358 with an ``updating'' exit.  For instance @kbd{Q}
10359 (@code{gnus-summary-exit-no-update}) does not call this hook.
10360
10361 @findex gnus-summary-wake-up-the-dead
10362 @findex gnus-dead-summary-mode
10363 @vindex gnus-kill-summary-on-exit
10364 If you're in the habit of exiting groups, and then changing your mind
10365 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10366 If you do that, Gnus won't kill the summary buffer when you exit it.
10367 (Quelle surprise!)  Instead it will change the name of the buffer to
10368 something like @samp{*Dead Summary ... *} and install a minor mode
10369 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10370 buffer, you'll find that all keys are mapped to a function called
10371 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10372 summary buffer will result in a live, normal summary buffer.
10373
10374 There will never be more than one dead summary buffer at any one time.
10375
10376 @vindex gnus-use-cross-reference
10377 The data on the current group will be updated (which articles you have
10378 read, which articles you have replied to, etc.) when you exit the
10379 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10380 @code{t} (which is the default), articles that are cross-referenced to
10381 this group and are marked as read, will also be marked as read in the
10382 other subscribed groups they were cross-posted to.  If this variable is
10383 neither @code{nil} nor @code{t}, the article will be marked as read in
10384 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10385
10386
10387 @node Crosspost Handling
10388 @section Crosspost Handling
10389
10390 @cindex velveeta
10391 @cindex spamming
10392 Marking cross-posted articles as read ensures that you'll never have to
10393 read the same article more than once.  Unless, of course, somebody has
10394 posted it to several groups separately.  Posting the same article to
10395 several groups (not cross-posting) is called @dfn{spamming}, and you are
10396 by law required to send nasty-grams to anyone who perpetrates such a
10397 heinous crime.  You may want to try NoCeM handling to filter out spam
10398 (@pxref{NoCeM}).
10399
10400 Remember: Cross-posting is kinda ok, but posting the same article
10401 separately to several groups is not.  Massive cross-posting (aka.
10402 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10403 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10404 excessive crossposting (@pxref{Summary Mail Commands}).
10405
10406 @cindex cross-posting
10407 @cindex Xref
10408 @cindex @acronym{NOV}
10409 One thing that may cause Gnus to not do the cross-posting thing
10410 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10411 (which is very nice, because it speeds things up considerably) which
10412 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10413 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10414 even with @sc{xover} by registering the @code{Xref} lines of all
10415 articles you actually read, but if you kill the articles, or just mark
10416 them as read without reading them, Gnus will not get a chance to snoop
10417 the @code{Xref} lines out of these articles, and will be unable to use
10418 the cross reference mechanism.
10419
10420 @cindex LIST overview.fmt
10421 @cindex overview.fmt
10422 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10423 in its overview files, try @samp{telnet your.nntp.server nntp},
10424 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10425 overview.fmt}.  This may not work, but if it does, and the last line you
10426 get does not read @samp{Xref:full}, then you should shout and whine at
10427 your news admin until she includes the @code{Xref} header in the
10428 overview files.
10429
10430 @vindex gnus-nov-is-evil
10431 If you want Gnus to get the @code{Xref}s right all the time, you have to
10432 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10433 considerably.
10434
10435 C'est la vie.
10436
10437 For an alternative approach, @pxref{Duplicate Suppression}.
10438
10439
10440 @node Duplicate Suppression
10441 @section Duplicate Suppression
10442
10443 By default, Gnus tries to make sure that you don't have to read the same
10444 article more than once by utilizing the crossposting mechanism
10445 (@pxref{Crosspost Handling}).  However, that simple and efficient
10446 approach may not work satisfactory for some users for various
10447 reasons.
10448
10449 @enumerate
10450 @item
10451 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10452 is evil and not very common.
10453
10454 @item
10455 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10456 @file{.overview} data bases.  This is evil and all too common, alas.
10457
10458 @item
10459 You may be reading the same group (or several related groups) from
10460 different @acronym{NNTP} servers.
10461
10462 @item
10463 You may be getting mail that duplicates articles posted to groups.
10464 @end enumerate
10465
10466 I'm sure there are other situations where @code{Xref} handling fails as
10467 well, but these four are the most common situations.
10468
10469 If, and only if, @code{Xref} handling fails for you, then you may
10470 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10471 will remember the @code{Message-ID}s of all articles you have read or
10472 otherwise marked as read, and then, as if by magic, mark them as read
10473 all subsequent times you see them---in @emph{all} groups.  Using this
10474 mechanism is quite likely to be somewhat inefficient, but not overly
10475 so.  It's certainly preferable to reading the same articles more than
10476 once.
10477
10478 Duplicate suppression is not a very subtle instrument.  It's more like a
10479 sledge hammer than anything else.  It works in a very simple
10480 fashion---if you have marked an article as read, it adds this Message-ID
10481 to a cache.  The next time it sees this Message-ID, it will mark the
10482 article as read with the @samp{M} mark.  It doesn't care what group it
10483 saw the article in.
10484
10485 @table @code
10486 @item gnus-suppress-duplicates
10487 @vindex gnus-suppress-duplicates
10488 If non-@code{nil}, suppress duplicates.
10489
10490 @item gnus-save-duplicate-list
10491 @vindex gnus-save-duplicate-list
10492 If non-@code{nil}, save the list of duplicates to a file.  This will
10493 make startup and shutdown take longer, so the default is @code{nil}.
10494 However, this means that only duplicate articles read in a single Gnus
10495 session are suppressed.
10496
10497 @item gnus-duplicate-list-length
10498 @vindex gnus-duplicate-list-length
10499 This variable says how many @code{Message-ID}s to keep in the duplicate
10500 suppression list.  The default is 10000.
10501
10502 @item gnus-duplicate-file
10503 @vindex gnus-duplicate-file
10504 The name of the file to store the duplicate suppression list in.  The
10505 default is @file{~/News/suppression}.
10506 @end table
10507
10508 If you have a tendency to stop and start Gnus often, setting
10509 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10510 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10511 the other hand, saving the list makes startup and shutdown much slower,
10512 so that means that if you stop and start Gnus often, you should set
10513 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10514 to you to figure out, I think.
10515
10516 @node Security
10517 @section Security
10518
10519 Gnus is able to verify signed messages or decrypt encrypted messages.
10520 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10521 and @acronym{S/MIME}, however you need some external programs to get
10522 things to work:
10523
10524 @enumerate
10525 @item
10526 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10527 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10528 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10529 Manual}), but Mailcrypt and gpg.el are also supported.
10530
10531 @item
10532 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10533 or newer is recommended.
10534
10535 @end enumerate
10536
10537 More information on how to set things up can be found in the message
10538 manual (@pxref{Security, ,Security, message, Message Manual}).
10539
10540 @table @code
10541 @item mm-verify-option
10542 @vindex mm-verify-option
10543 Option of verifying signed parts.  @code{never}, not verify;
10544 @code{always}, always verify; @code{known}, only verify known
10545 protocols. Otherwise, ask user.
10546
10547 @item mm-decrypt-option
10548 @vindex mm-decrypt-option
10549 Option of decrypting encrypted parts.  @code{never}, no decryption;
10550 @code{always}, always decrypt; @code{known}, only decrypt known
10551 protocols. Otherwise, ask user.
10552
10553 @item mml1991-use
10554 @vindex mml1991-use
10555 Symbol indicating elisp interface to OpenPGP implementation for
10556 @acronym{PGP} messages.  The default is @code{pgg}, but
10557 @code{mailcrypt} and @code{gpg} are also supported although
10558 deprecated.
10559
10560 @item mml2015-use
10561 @vindex mml2015-use
10562 Symbol indicating elisp interface to OpenPGP implementation for
10563 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10564 @code{mailcrypt} and @code{gpg} are also supported although
10565 deprecated.
10566
10567 @end table
10568
10569 @cindex snarfing keys
10570 @cindex importing PGP keys
10571 @cindex PGP key ring import
10572 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10573 key ring) is not supported explicitly through a menu item or command,
10574 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10575 allowing you to specify whatever action you think is appropriate
10576 through the usual @acronym{MIME} infrastructure.  You can use a
10577 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10578 Emacs MIME Manual}) such as the following to import keys using GNU
10579 Privacy Guard when you click on the @acronym{MIME} button
10580 (@pxref{Using MIME}).
10581
10582 @example
10583 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10584 @end example
10585 @noindent
10586 This happens to also be the default action defined in
10587 @code{mailcap-mime-data}.
10588
10589 @node Mailing List
10590 @section Mailing List
10591 @cindex mailing list
10592 @cindex RFC 2396
10593
10594 @kindex A M (summary)
10595 @findex gnus-mailing-list-insinuate
10596 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10597 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10598 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10599 summary buffer.
10600
10601 That enables the following commands to the summary buffer:
10602
10603 @table @kbd
10604
10605 @item C-c C-n h
10606 @kindex C-c C-n h (Summary)
10607 @findex gnus-mailing-list-help
10608 Send a message to fetch mailing list help, if List-Help field exists.
10609
10610 @item C-c C-n s
10611 @kindex C-c C-n s (Summary)
10612 @findex gnus-mailing-list-subscribe
10613 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10614
10615 @item C-c C-n u
10616 @kindex C-c C-n u (Summary)
10617 @findex gnus-mailing-list-unsubscribe
10618 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10619 field exists.
10620
10621 @item C-c C-n p
10622 @kindex C-c C-n p (Summary)
10623 @findex gnus-mailing-list-post
10624 Post to the mailing list, if List-Post field exists.
10625
10626 @item C-c C-n o
10627 @kindex C-c C-n o (Summary)
10628 @findex gnus-mailing-list-owner
10629 Send a message to the mailing list owner, if List-Owner field exists.
10630
10631 @item C-c C-n a
10632 @kindex C-c C-n a (Summary)
10633 @findex gnus-mailing-list-owner
10634 Browse the mailing list archive, if List-Archive field exists.
10635
10636 @end table
10637
10638
10639 @node Article Buffer
10640 @chapter Article Buffer
10641 @cindex article buffer
10642
10643 The articles are displayed in the article buffer, of which there is only
10644 one.  All the summary buffers share the same article buffer unless you
10645 tell Gnus otherwise.
10646
10647 @menu
10648 * Hiding Headers::              Deciding what headers should be displayed.
10649 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10650 * Customizing Articles::        Tailoring the look of the articles.
10651 * Article Keymap::              Keystrokes available in the article buffer.
10652 * Misc Article::                Other stuff.
10653 @end menu
10654
10655
10656 @node Hiding Headers
10657 @section Hiding Headers
10658 @cindex hiding headers
10659 @cindex deleting headers
10660
10661 The top section of each article is the @dfn{head}.  (The rest is the
10662 @dfn{body}, but you may have guessed that already.)
10663
10664 @vindex gnus-show-all-headers
10665 There is a lot of useful information in the head: the name of the person
10666 who wrote the article, the date it was written and the subject of the
10667 article.  That's well and nice, but there's also lots of information
10668 most people do not want to see---what systems the article has passed
10669 through before reaching you, the @code{Message-ID}, the
10670 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10671 of some of those lines.  If you want to keep all those lines in the
10672 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10673
10674 Gnus provides you with two variables for sifting headers:
10675
10676 @table @code
10677
10678 @item gnus-visible-headers
10679 @vindex gnus-visible-headers
10680 If this variable is non-@code{nil}, it should be a regular expression
10681 that says what headers you wish to keep in the article buffer.  All
10682 headers that do not match this variable will be hidden.
10683
10684 For instance, if you only want to see the name of the person who wrote
10685 the article and the subject, you'd say:
10686
10687 @lisp
10688 (setq gnus-visible-headers "^From:\\|^Subject:")
10689 @end lisp
10690
10691 This variable can also be a list of regexps to match headers to
10692 remain visible.
10693
10694 @item gnus-ignored-headers
10695 @vindex gnus-ignored-headers
10696 This variable is the reverse of @code{gnus-visible-headers}.  If this
10697 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10698 should be a regular expression that matches all lines that you want to
10699 hide.  All lines that do not match this variable will remain visible.
10700
10701 For instance, if you just want to get rid of the @code{References} line
10702 and the @code{Xref} line, you might say:
10703
10704 @lisp
10705 (setq gnus-ignored-headers "^References:\\|^Xref:")
10706 @end lisp
10707
10708 This variable can also be a list of regexps to match headers to
10709 be removed.
10710
10711 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10712 variable will have no effect.
10713
10714 @end table
10715
10716 @vindex gnus-sorted-header-list
10717 Gnus can also sort the headers for you.  (It does this by default.)  You
10718 can control the sorting by setting the @code{gnus-sorted-header-list}
10719 variable.  It is a list of regular expressions that says in what order
10720 the headers are to be displayed.
10721
10722 For instance, if you want the name of the author of the article first,
10723 and then the subject, you might say something like:
10724
10725 @lisp
10726 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10727 @end lisp
10728
10729 Any headers that are to remain visible, but are not listed in this
10730 variable, will be displayed in random order after all the headers listed in this variable.
10731
10732 @findex gnus-article-hide-boring-headers
10733 @vindex gnus-boring-article-headers
10734 You can hide further boring headers by setting
10735 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10736 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10737 list, but this list doesn't actually contain header names.  Instead is
10738 lists various @dfn{boring conditions} that Gnus can check and remove
10739 from sight.
10740
10741 These conditions are:
10742 @table @code
10743 @item empty
10744 Remove all empty headers.
10745 @item followup-to
10746 Remove the @code{Followup-To} header if it is identical to the
10747 @code{Newsgroups} header.
10748 @item reply-to
10749 Remove the @code{Reply-To} header if it lists the same address as the
10750 @code{From} header, or if the @code{broken-reply-to} group parameter is
10751 set.
10752 @item newsgroups
10753 Remove the @code{Newsgroups} header if it only contains the current group
10754 name.
10755 @item to-address
10756 Remove the @code{To} header if it only contains the address identical to
10757 the current groups's @code{to-address} parameter.
10758 @item to-list
10759 Remove the @code{To} header if it only contains the address identical to
10760 the current groups's @code{to-list} parameter.
10761 @item cc-list
10762 Remove the @code{CC} header if it only contains the address identical to
10763 the current groups's @code{to-list} parameter.
10764 @item date
10765 Remove the @code{Date} header if the article is less than three days
10766 old.
10767 @item long-to
10768 Remove the @code{To} header if it is very long.
10769 @item many-to
10770 Remove all @code{To} headers if there are more than one.
10771 @end table
10772
10773 To include these three elements, you could say something like:
10774
10775 @lisp
10776 (setq gnus-boring-article-headers
10777       '(empty followup-to reply-to))
10778 @end lisp
10779
10780 This is also the default value for this variable.
10781
10782
10783 @node Using MIME
10784 @section Using MIME
10785 @cindex @acronym{MIME}
10786
10787 Mime is a standard for waving your hands through the air, aimlessly,
10788 while people stand around yawning.
10789
10790 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10791 while all newsreaders die of fear.
10792
10793 @acronym{MIME} may specify what character set the article uses, the encoding
10794 of the characters, and it also makes it possible to embed pictures and
10795 other naughty stuff in innocent-looking articles.
10796
10797 @vindex gnus-display-mime-function
10798 @findex gnus-display-mime
10799 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10800 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10801 default, which creates a bundle of clickable buttons that can be used to
10802 display, save and manipulate the @acronym{MIME} objects.
10803
10804 The following commands are available when you have placed point over a
10805 @acronym{MIME} button:
10806
10807 @table @kbd
10808 @findex gnus-article-press-button
10809 @item RET (Article)
10810 @kindex RET (Article)
10811 @itemx BUTTON-2 (Article)
10812 Toggle displaying of the @acronym{MIME} object
10813 (@code{gnus-article-press-button}). If built-in viewers can not display
10814 the object, Gnus resorts to external viewers in the @file{mailcap}
10815 files.  If a viewer has the @samp{copiousoutput} specification, the
10816 object is displayed inline.
10817
10818 @findex gnus-mime-view-part
10819 @item M-RET (Article)
10820 @kindex M-RET (Article)
10821 @itemx v (Article)
10822 Prompt for a method, and then view the @acronym{MIME} object using this
10823 method (@code{gnus-mime-view-part}).
10824
10825 @findex gnus-mime-view-part-as-type
10826 @item t (Article)
10827 @kindex t (Article)
10828 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10829 (@code{gnus-mime-view-part-as-type}).
10830
10831 @findex gnus-mime-view-part-as-charset
10832 @item C (Article)
10833 @kindex C (Article)
10834 Prompt for a charset, and then view the @acronym{MIME} object using this
10835 charset (@code{gnus-mime-view-part-as-charset}).
10836
10837 @findex gnus-mime-save-part
10838 @item o (Article)
10839 @kindex o (Article)
10840 Prompt for a file name, and then save the @acronym{MIME} object
10841 (@code{gnus-mime-save-part}).
10842
10843 @findex gnus-mime-save-part-and-strip
10844 @item C-o (Article)
10845 @kindex C-o (Article)
10846 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10847 the article.  Then proceed to article editing, where a reasonable
10848 suggestion is being made on how the altered article should look
10849 like.  The stripped @acronym{MIME} object will be referred via the
10850 message/external-body @acronym{MIME} type.
10851 (@code{gnus-mime-save-part-and-strip}).
10852
10853 @findex gnus-mime-delete-part
10854 @item d (Article)
10855 @kindex d (Article)
10856 Delete the @acronym{MIME} object from the article and replace it with some
10857 information about the removed @acronym{MIME} object
10858 (@code{gnus-mime-delete-part}).
10859
10860 @findex gnus-mime-copy-part
10861 @item c (Article)
10862 @kindex c (Article)
10863 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10864 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10865 @file{.bz2} are automatically decompressed if
10866 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10867 Accessing Compressed Files, emacs, The Emacs Editor}).
10868
10869 @findex gnus-mime-print-part
10870 @item p (Article)
10871 @kindex p (Article)
10872 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10873 command respects the @samp{print=} specifications in the
10874 @file{.mailcap} file.
10875
10876 @findex gnus-mime-inline-part
10877 @item i (Article)
10878 @kindex i (Article)
10879 Insert the contents of the @acronym{MIME} object into the buffer
10880 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10881 the raw contents without decoding.  If given a numerical prefix, you can
10882 do semi-manual charset stuff (see
10883 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10884 Article}).
10885
10886 @findex gnus-mime-view-part-internally
10887 @item E (Article)
10888 @kindex E (Article)
10889 View the @acronym{MIME} object with an internal viewer.  If no internal
10890 viewer is available, use an external viewer
10891 (@code{gnus-mime-view-part-internally}).
10892
10893 @findex gnus-mime-view-part-externally
10894 @item e (Article)
10895 @kindex e (Article)
10896 View the @acronym{MIME} object with an external viewer.
10897 (@code{gnus-mime-view-part-externally}).
10898
10899 @findex gnus-mime-pipe-part
10900 @item | (Article)
10901 @kindex | (Article)
10902 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10903
10904 @findex gnus-mime-action-on-part
10905 @item . (Article)
10906 @kindex . (Article)
10907 Interactively run an action on the @acronym{MIME} object
10908 (@code{gnus-mime-action-on-part}).
10909
10910 @end table
10911
10912 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10913 determines which parts to do this with is described in the Emacs
10914 @acronym{MIME} manual.
10915
10916 It might be best to just use the toggling functions from the article
10917 buffer to avoid getting nasty surprises.  (For instance, you enter the
10918 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10919 decoded the sound file in the article and some horrible sing-a-long song
10920 comes screaming out your speakers, and you can't find the volume button,
10921 because there isn't one, and people are starting to look at you, and you
10922 try to stop the program, but you can't, and you can't find the program
10923 to control the volume, and everybody else in the room suddenly decides
10924 to look at you disdainfully, and you'll feel rather stupid.)
10925
10926 Any similarity to real events and people is purely coincidental.  Ahem.
10927
10928 Also see @pxref{MIME Commands}.
10929
10930
10931 @node Customizing Articles
10932 @section Customizing Articles
10933 @cindex article customization
10934
10935 A slew of functions for customizing how the articles are to look like
10936 exist.  You can call these functions interactively
10937 (@pxref{Article Washing}), or you can have them
10938 called automatically when you select the articles.
10939
10940 To have them called automatically, you should set the corresponding
10941 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10942 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10943 be set, but first we discuss the values these variables can have.
10944
10945 Note: Some values, while valid, make little sense.  Check the list below
10946 for sensible values.
10947
10948 @enumerate
10949 @item
10950 @code{nil}: Don't do this treatment.
10951
10952 @item
10953 @code{t}: Do this treatment on all body parts.
10954
10955 @item
10956 @code{head}: Do the treatment on the headers.
10957
10958 @item
10959 @code{last}: Do this treatment on the last part.
10960
10961 @item
10962 An integer: Do this treatment on all body parts that have a length less
10963 than this number.
10964
10965 @item
10966 A list of strings: Do this treatment on all body parts that are in
10967 articles that are read in groups that have names that match one of the
10968 regexps in the list.
10969
10970 @item
10971 A list where the first element is not a string:
10972
10973 The list is evaluated recursively.  The first element of the list is a
10974 predicate.  The following predicates are recognized: @code{or},
10975 @code{and}, @code{not} and @code{typep}.  Here's an example:
10976
10977 @lisp
10978 (or last
10979     (typep "text/x-vcard"))
10980 @end lisp
10981
10982 @end enumerate
10983
10984 You may have noticed that the word @dfn{part} is used here.  This refers
10985 to the fact that some messages are @acronym{MIME} multipart articles that may
10986 be divided into several parts.  Articles that are not multiparts are
10987 considered to contain just a single part.
10988
10989 @vindex gnus-article-treat-types
10990 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10991 want to, but by default, only @samp{text/plain} parts are given the
10992 treatment.  This is controlled by the @code{gnus-article-treat-types}
10993 variable, which is a list of regular expressions that are matched to the
10994 type of the part.  This variable is ignored if the value of the
10995 controlling variable is a predicate list, as described above.
10996
10997 The following treatment options are available.  The easiest way to
10998 customize this is to examine the @code{gnus-article-treat} customization
10999 group.  Values in parenthesis are suggested sensible values.  Others are
11000 possible but those listed are probably sufficient for most people.
11001
11002 @table @code
11003 @item gnus-treat-buttonize (t, integer)
11004 @item gnus-treat-buttonize-head (head)
11005
11006 @xref{Article Buttons}.
11007
11008 @item gnus-treat-capitalize-sentences (t, integer)
11009 @item gnus-treat-overstrike (t, integer)
11010 @item gnus-treat-strip-cr (t, integer)
11011 @item gnus-treat-strip-headers-in-body (t, integer)
11012 @item gnus-treat-strip-leading-blank-lines (t, integer)
11013 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11014 @item gnus-treat-strip-pem (t, last, integer)
11015 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11016 @item gnus-treat-unsplit-urls (t, integer)
11017 @item gnus-treat-wash-html (t, integer)
11018
11019 @xref{Article Washing}.
11020
11021 @item gnus-treat-date-english (head)
11022 @item gnus-treat-date-iso8601 (head)
11023 @item gnus-treat-date-lapsed (head)
11024 @item gnus-treat-date-local (head)
11025 @item gnus-treat-date-original (head)
11026 @item gnus-treat-date-user-defined (head)
11027 @item gnus-treat-date-ut (head)
11028
11029 @xref{Article Date}.
11030
11031 @item gnus-treat-from-picon (head)
11032 @item gnus-treat-mail-picon (head)
11033 @item gnus-treat-newsgroups-picon (head)
11034
11035 @xref{Picons}.
11036
11037 @item gnus-treat-display-smileys (t, integer)
11038
11039 @item gnus-treat-body-boundary (head)
11040
11041 @vindex gnus-body-boundary-delimiter
11042 Adds a delimiter between header and body, the string used as delimiter
11043 is controlled by @code{gnus-body-boundary-delimiter}.
11044
11045 @xref{Smileys}.
11046
11047 @item gnus-treat-display-xface (head)
11048
11049 @xref{X-Face}.
11050
11051 @item gnus-treat-emphasize (t, head, integer)
11052 @item gnus-treat-fill-article (t, integer)
11053 @item gnus-treat-fill-long-lines (t, integer)
11054 @item gnus-treat-hide-boring-headers (head)
11055 @item gnus-treat-hide-citation (t, integer)
11056 @item gnus-treat-hide-citation-maybe (t, integer)
11057 @item gnus-treat-hide-headers (head)
11058 @item gnus-treat-hide-signature (t, last)
11059 @item gnus-treat-strip-banner (t, last)
11060 @item gnus-treat-strip-list-identifiers (head)
11061
11062 @xref{Article Hiding}.
11063
11064 @item gnus-treat-highlight-citation (t, integer)
11065 @item gnus-treat-highlight-headers (head)
11066 @item gnus-treat-highlight-signature (t, last, integer)
11067
11068 @xref{Article Highlighting}.
11069
11070 @item gnus-treat-play-sounds
11071 @item gnus-treat-translate
11072 @item gnus-treat-x-pgp-sig (head)
11073
11074 @item gnus-treat-unfold-headers (head)
11075 @item gnus-treat-fold-headers (head)
11076 @item gnus-treat-fold-newsgroups (head)
11077 @item gnus-treat-leading-whitespace (head)
11078
11079 @xref{Article Header}.
11080
11081
11082 @end table
11083
11084 @vindex gnus-part-display-hook
11085 You can, of course, write your own functions to be called from
11086 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11087 part, and you can do anything you like, pretty much.  There is no
11088 information that you have to keep in the buffer---you can change
11089 everything.
11090
11091
11092 @node Article Keymap
11093 @section Article Keymap
11094
11095 Most of the keystrokes in the summary buffer can also be used in the
11096 article buffer.  They should behave as if you typed them in the summary
11097 buffer, which means that you don't actually have to have a summary
11098 buffer displayed while reading.  You can do it all from the article
11099 buffer.
11100
11101 A few additional keystrokes are available:
11102
11103 @table @kbd
11104
11105 @item SPACE
11106 @kindex SPACE (Article)
11107 @findex gnus-article-next-page
11108 Scroll forwards one page (@code{gnus-article-next-page}).
11109 This is exactly the same as @kbd{h SPACE h}.
11110
11111 @item DEL
11112 @kindex DEL (Article)
11113 @findex gnus-article-prev-page
11114 Scroll backwards one page (@code{gnus-article-prev-page}).
11115 This is exactly the same as @kbd{h DEL h}.
11116
11117 @item C-c ^
11118 @kindex C-c ^ (Article)
11119 @findex gnus-article-refer-article
11120 If point is in the neighborhood of a @code{Message-ID} and you press
11121 @kbd{C-c ^}, Gnus will try to get that article from the server
11122 (@code{gnus-article-refer-article}).
11123
11124 @item C-c C-m
11125 @kindex C-c C-m (Article)
11126 @findex gnus-article-mail
11127 Send a reply to the address near point (@code{gnus-article-mail}).  If
11128 given a prefix, include the mail.
11129
11130 @item s
11131 @kindex s (Article)
11132 @findex gnus-article-show-summary
11133 Reconfigure the buffers so that the summary buffer becomes visible
11134 (@code{gnus-article-show-summary}).
11135
11136 @item ?
11137 @kindex ? (Article)
11138 @findex gnus-article-describe-briefly
11139 Give a very brief description of the available keystrokes
11140 (@code{gnus-article-describe-briefly}).
11141
11142 @item TAB
11143 @kindex TAB (Article)
11144 @findex gnus-article-next-button
11145 Go to the next button, if any (@code{gnus-article-next-button}).  This
11146 only makes sense if you have buttonizing turned on.
11147
11148 @item M-TAB
11149 @kindex M-TAB (Article)
11150 @findex gnus-article-prev-button
11151 Go to the previous button, if any (@code{gnus-article-prev-button}).
11152
11153 @item R
11154 @kindex R (Article)
11155 @findex gnus-article-reply-with-original
11156 Send a reply to the current article and yank the current article
11157 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11158 wide reply.  If the region is active, only yank the text in the
11159 region.
11160
11161 @item F
11162 @kindex F (Article)
11163 @findex gnus-article-followup-with-original
11164 Send a followup to the current article and yank the current article
11165 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11166 a wide reply.  If the region is active, only yank the text in the
11167 region.
11168
11169
11170 @end table
11171
11172
11173 @node Misc Article
11174 @section Misc Article
11175
11176 @table @code
11177
11178 @item gnus-single-article-buffer
11179 @vindex gnus-single-article-buffer
11180 If non-@code{nil}, use the same article buffer for all the groups.
11181 (This is the default.)  If @code{nil}, each group will have its own
11182 article buffer.
11183
11184 @vindex gnus-article-decode-hook
11185 @item gnus-article-decode-hook
11186 @cindex @acronym{MIME}
11187 Hook used to decode @acronym{MIME} articles.  The default value is
11188 @code{(article-decode-charset article-decode-encoded-words)}
11189
11190 @vindex gnus-article-prepare-hook
11191 @item gnus-article-prepare-hook
11192 This hook is called right after the article has been inserted into the
11193 article buffer.  It is mainly intended for functions that do something
11194 depending on the contents; it should probably not be used for changing
11195 the contents of the article buffer.
11196
11197 @item gnus-article-mode-hook
11198 @vindex gnus-article-mode-hook
11199 Hook called in article mode buffers.
11200
11201 @item gnus-article-mode-syntax-table
11202 @vindex gnus-article-mode-syntax-table
11203 Syntax table used in article buffers.  It is initialized from
11204 @code{text-mode-syntax-table}.
11205
11206 @vindex gnus-article-over-scroll
11207 @item gnus-article-over-scroll
11208 If non-@code{nil}, allow scrolling the article buffer even when there
11209 no more new text to scroll in.  The default is @code{nil}.
11210
11211 @vindex gnus-article-mode-line-format
11212 @item gnus-article-mode-line-format
11213 This variable is a format string along the same lines as
11214 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11215 accepts the same format specifications as that variable, with two
11216 extensions:
11217
11218 @table @samp
11219
11220 @item w
11221 The @dfn{wash status} of the article.  This is a short string with one
11222 character for each possible article wash operation that may have been
11223 performed.  The characters and their meaning:
11224
11225 @table @samp
11226
11227 @item c
11228 Displayed when cited text may be hidden in the article buffer.
11229
11230 @item h
11231 Displayed when headers are hidden in the article buffer.
11232
11233 @item p
11234 Displayed when article is digitally signed or encrypted, and Gnus has
11235 hidden the security headers.  (N.B. does not tell anything about
11236 security status, i.e. good or bad signature.)
11237
11238 @item s
11239 Displayed when the signature has been hidden in the Article buffer.
11240
11241 @item o
11242 Displayed when Gnus has treated overstrike characters in the article buffer.
11243
11244 @item e
11245 Displayed when Gnus has treated emphasised strings in the article buffer.
11246
11247 @end table
11248
11249 @item m
11250 The number of @acronym{MIME} parts in the article.
11251
11252 @end table
11253
11254 @vindex gnus-break-pages
11255
11256 @item gnus-break-pages
11257 Controls whether @dfn{page breaking} is to take place.  If this variable
11258 is non-@code{nil}, the articles will be divided into pages whenever a
11259 page delimiter appears in the article.  If this variable is @code{nil},
11260 paging will not be done.
11261
11262 @item gnus-page-delimiter
11263 @vindex gnus-page-delimiter
11264 This is the delimiter mentioned above.  By default, it is @samp{^L}
11265 (formfeed).
11266
11267 @cindex IDNA
11268 @cindex internationalized domain names
11269 @vindex gnus-use-idna
11270 @item gnus-use-idna
11271 This variable controls whether Gnus performs IDNA decoding of
11272 internationalized domain names inside @samp{From}, @samp{To} and
11273 @samp{Cc} headers.  This requires
11274 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11275 variable is only enabled if you have installed it.
11276
11277 @end table
11278
11279
11280 @node Composing Messages
11281 @chapter Composing Messages
11282 @cindex composing messages
11283 @cindex messages
11284 @cindex mail
11285 @cindex sending mail
11286 @cindex reply
11287 @cindex followup
11288 @cindex post
11289 @cindex using gpg
11290 @cindex using s/mime
11291 @cindex using smime
11292
11293 @kindex C-c C-c (Post)
11294 All commands for posting and mailing will put you in a message buffer
11295 where you can edit the article all you like, before you send the
11296 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11297 Message Manual}.  Where the message will be posted/mailed to depends
11298 on your setup (@pxref{Posting Server}).
11299
11300 @menu
11301 * Mail::                        Mailing and replying.
11302 * Posting Server::              What server should you post and mail via?
11303 * Mail and Post::               Mailing and posting at the same time.
11304 * Archived Messages::           Where Gnus stores the messages you've sent.
11305 * Posting Styles::              An easier way to specify who you are.
11306 * Drafts::                      Postponing messages and rejected messages.
11307 * Rejected Articles::           What happens if the server doesn't like your article?
11308 * Signing and encrypting::      How to compose secure messages.
11309 @end menu
11310
11311 Also see @pxref{Canceling and Superseding} for information on how to
11312 remove articles you shouldn't have posted.
11313
11314
11315 @node Mail
11316 @section Mail
11317
11318 Variables for customizing outgoing mail:
11319
11320 @table @code
11321 @item gnus-uu-digest-headers
11322 @vindex gnus-uu-digest-headers
11323 List of regexps to match headers included in digested messages.  The
11324 headers will be included in the sequence they are matched.  If
11325 @code{nil} include all headers.
11326
11327 @item gnus-add-to-list
11328 @vindex gnus-add-to-list
11329 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11330 that have none when you do a @kbd{a}.
11331
11332 @item gnus-confirm-mail-reply-to-news
11333 @vindex gnus-confirm-mail-reply-to-news
11334 This can also be a function receiving the group name as the only
11335 parameter which should return non-@code{nil} if a confirmation is
11336 needed, or a regular expression matching group names, where
11337 confirmation is should be asked for.
11338
11339 If you find yourself never wanting to reply to mail, but occasionally
11340 press R anyway, this variable might be for you.
11341
11342 @item gnus-confirm-treat-mail-like-news
11343 @vindex gnus-confirm-treat-mail-like-news
11344 If non-@code{nil}, Gnus also requests confirmation according to
11345 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11346 useful for treating mailing lists like newsgroups.
11347  
11348 @end table
11349
11350
11351 @node Posting Server
11352 @section Posting Server
11353
11354 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11355 (extremely intelligent, of course) article, where does it go?
11356
11357 Thank you for asking.  I hate you.
11358
11359 It can be quite complicated.
11360
11361 @vindex gnus-post-method
11362 When posting news, Message usually invokes @code{message-send-news}
11363 (@pxref{News Variables, , News Variables, message, Message Manual}).
11364 Normally, Gnus will post using the same select method as you're
11365 reading from (which might be convenient if you're reading lots of
11366 groups from different private servers).  However.  If the server
11367 you're reading from doesn't allow posting, just reading, you probably
11368 want to use some other server to post your (extremely intelligent and
11369 fabulously interesting) articles.  You can then set the
11370 @code{gnus-post-method} to some other method:
11371
11372 @lisp
11373 (setq gnus-post-method '(nnspool ""))
11374 @end lisp
11375
11376 Now, if you've done this, and then this server rejects your article, or
11377 this server is down, what do you do then?  To override this variable you
11378 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11379 the ``current'' server, to get back the default behavior, for posting.
11380
11381 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11382 Gnus will prompt you for what method to use for posting.
11383
11384 You can also set @code{gnus-post-method} to a list of select methods.
11385 If that's the case, Gnus will always prompt you for what method to use
11386 for posting.
11387
11388 Finally, if you want to always post using the native select method,
11389 you can set this variable to @code{native}.
11390
11391 When sending mail, Message invokes @code{message-send-mail-function}.
11392 The default function, @code{message-send-mail-with-sendmail}, pipes
11393 your article to the @code{sendmail} binary for further queuing and
11394 sending.  When your local system is not configured for sending mail
11395 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11396 server, you can set @code{message-send-mail-function} to
11397 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11398 package correctly.  An example:
11399
11400 @lisp
11401 (setq message-send-mail-function 'smtpmail-send-it
11402       smtpmail-default-smtp-server "YOUR SMTP HOST")
11403 @end lisp
11404
11405 To the thing similar to this, there is
11406 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11407 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11408 documentation for the function @code{mail-source-touch-pop}.
11409
11410 Other possible choices for @code{message-send-mail-function} includes
11411 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11412 and @code{feedmail-send-it}.
11413
11414 @node Mail and Post
11415 @section Mail and Post
11416
11417 Here's a list of variables relevant to both mailing and
11418 posting:
11419
11420 @table @code
11421 @item gnus-mailing-list-groups
11422 @findex gnus-mailing-list-groups
11423 @cindex mailing lists
11424
11425 If your news server offers groups that are really mailing lists
11426 gatewayed to the @acronym{NNTP} server, you can read those groups without
11427 problems, but you can't post/followup to them without some difficulty.
11428 One solution is to add a @code{to-address} to the group parameters
11429 (@pxref{Group Parameters}).  An easier thing to do is set the
11430 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11431 really are mailing lists.  Then, at least, followups to the mailing
11432 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11433 still a pain, though.
11434
11435 @item gnus-user-agent
11436 @vindex gnus-user-agent
11437 @cindex User-Agent
11438
11439 This variable controls which information should be exposed in the
11440 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11441 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11442 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11443 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11444 system type) or a custom string.  If you set it to a string, be sure to
11445 use a valid format, see RFC 2616.
11446
11447 @end table
11448
11449 You may want to do spell-checking on messages that you send out.  Or, if
11450 you don't want to spell-check by hand, you could add automatic
11451 spell-checking via the @code{ispell} package:
11452
11453 @cindex ispell
11454 @findex ispell-message
11455 @lisp
11456 (add-hook 'message-send-hook 'ispell-message)
11457 @end lisp
11458
11459 If you want to change the @code{ispell} dictionary based on what group
11460 you're in, you could say something like the following:
11461
11462 @lisp
11463 (add-hook 'gnus-select-group-hook
11464           (lambda ()
11465             (cond
11466              ((string-match
11467                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11468               (ispell-change-dictionary "deutsch"))
11469              (t
11470               (ispell-change-dictionary "english")))))
11471 @end lisp
11472
11473 Modify to suit your needs.
11474
11475
11476 @node Archived Messages
11477 @section Archived Messages
11478 @cindex archived messages
11479 @cindex sent messages
11480
11481 Gnus provides a few different methods for storing the mail and news you
11482 send.  The default method is to use the @dfn{archive virtual server} to
11483 store the messages.  If you want to disable this completely, the
11484 @code{gnus-message-archive-group} variable should be @code{nil}, which
11485 is the default.
11486
11487 For archiving interesting messages in a group you read, see the
11488 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11489 Group Commands}).
11490
11491 @vindex gnus-message-archive-method
11492 @code{gnus-message-archive-method} says what virtual server Gnus is to
11493 use to store sent messages.  The default is:
11494
11495 @lisp
11496 (nnfolder "archive"
11497           (nnfolder-directory   "~/Mail/archive")
11498           (nnfolder-active-file "~/Mail/archive/active")
11499           (nnfolder-get-new-mail nil)
11500           (nnfolder-inhibit-expiry t))
11501 @end lisp
11502
11503 You can, however, use any mail select method (@code{nnml},
11504 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11505 for doing this sort of thing, though.  If you don't like the default
11506 directory chosen, you could say something like:
11507
11508 @lisp
11509 (setq gnus-message-archive-method
11510       '(nnfolder "archive"
11511                  (nnfolder-inhibit-expiry t)
11512                  (nnfolder-active-file "~/News/sent-mail/active")
11513                  (nnfolder-directory "~/News/sent-mail/")))
11514 @end lisp
11515
11516 @vindex gnus-message-archive-group
11517 @cindex Gcc
11518 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11519 to one or more group(s) on that server.  Which group to use is
11520 determined by the @code{gnus-message-archive-group} variable.
11521
11522 This variable can be used to do the following:
11523
11524 @itemize @bullet
11525 @item
11526 a string
11527 Messages will be saved in that group.
11528
11529 Note that you can include a select method in the group name, then the
11530 message will not be stored in the select method given by
11531 @code{gnus-message-archive-method}, but in the select method specified
11532 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11533 has the default value shown above.  Then setting
11534 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11535 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11536 value @code{"nnml:foo"}, then outgoing messages will be stored in
11537 @samp{nnml:foo}.
11538 @item
11539 a list of strings
11540 Messages will be saved in all those groups.
11541 @item
11542 an alist of regexps, functions and forms
11543 When a key ``matches'', the result is used.
11544 @item
11545 @code{nil}
11546 No message archiving will take place.  This is the default.
11547 @end itemize
11548
11549 Let's illustrate:
11550
11551 Just saving to a single group called @samp{MisK}:
11552 @lisp
11553 (setq gnus-message-archive-group "MisK")
11554 @end lisp
11555
11556 Saving to two groups, @samp{MisK} and @samp{safe}:
11557 @lisp
11558 (setq gnus-message-archive-group '("MisK" "safe"))
11559 @end lisp
11560
11561 Save to different groups based on what group you are in:
11562 @lisp
11563 (setq gnus-message-archive-group
11564       '(("^alt" "sent-to-alt")
11565         ("mail" "sent-to-mail")
11566         (".*" "sent-to-misc")))
11567 @end lisp
11568
11569 More complex stuff:
11570 @lisp
11571 (setq gnus-message-archive-group
11572       '((if (message-news-p)
11573             "misc-news"
11574           "misc-mail")))
11575 @end lisp
11576
11577 How about storing all news messages in one file, but storing all mail
11578 messages in one file per month:
11579
11580 @lisp
11581 (setq gnus-message-archive-group
11582       '((if (message-news-p)
11583             "misc-news"
11584           (concat "mail." (format-time-string "%Y-%m")))))
11585 @end lisp
11586
11587 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11588 @c use a different value for @code{gnus-message-archive-group} there.)
11589
11590 Now, when you send a message off, it will be stored in the appropriate
11591 group.  (If you want to disable storing for just one particular message,
11592 you can just remove the @code{Gcc} header that has been inserted.)  The
11593 archive group will appear in the group buffer the next time you start
11594 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11595 enter it and read the articles in it just like you'd read any other
11596 group.  If the group gets really big and annoying, you can simply rename
11597 if (using @kbd{G r} in the group buffer) to something
11598 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11599 continue to be stored in the old (now empty) group.
11600
11601 That's the default method of archiving sent messages.  Gnus offers a
11602 different way for the people who don't like the default method.  In that
11603 case you should set @code{gnus-message-archive-group} to @code{nil};
11604 this will disable archiving.
11605
11606 @table @code
11607 @item gnus-outgoing-message-group
11608 @vindex gnus-outgoing-message-group
11609 All outgoing messages will be put in this group.  If you want to store
11610 all your outgoing mail and articles in the group @samp{nnml:archive},
11611 you set this variable to that value.  This variable can also be a list of
11612 group names.
11613
11614 If you want to have greater control over what group to put each
11615 message in, you can set this variable to a function that checks the
11616 current newsgroup name and then returns a suitable group name (or list
11617 of names).
11618
11619 This variable can be used instead of @code{gnus-message-archive-group},
11620 but the latter is the preferred method.
11621
11622 @item gnus-gcc-mark-as-read
11623 @vindex gnus-gcc-mark-as-read
11624 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11625
11626 @item gnus-gcc-externalize-attachments
11627 @vindex gnus-gcc-externalize-attachments
11628 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11629 and matches the Gcc group name, attach files as external parts; if it is
11630 @code{all}, attach local files as external parts; if it is other
11631 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11632 changed in the future.
11633
11634 @end table
11635
11636
11637 @node Posting Styles
11638 @section Posting Styles
11639 @cindex posting styles
11640 @cindex styles
11641
11642 All them variables, they make my head swim.
11643
11644 So what if you want a different @code{Organization} and signature based
11645 on what groups you post to?  And you post both from your home machine
11646 and your work machine, and you want different @code{From} lines, and so
11647 on?
11648
11649 @vindex gnus-posting-styles
11650 One way to do stuff like that is to write clever hooks that change the
11651 variables you need to have changed.  That's a bit boring, so somebody
11652 came up with the bright idea of letting the user specify these things in
11653 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11654 variable:
11655
11656 @lisp
11657 ((".*"
11658   (signature "Peace and happiness")
11659   (organization "What me?"))
11660  ("^comp"
11661   (signature "Death to everybody"))
11662  ("comp.emacs.i-love-it"
11663   (organization "Emacs is it")))
11664 @end lisp
11665
11666 As you might surmise from this example, this alist consists of several
11667 @dfn{styles}.  Each style will be applicable if the first element
11668 ``matches'', in some form or other.  The entire alist will be iterated
11669 over, from the beginning towards the end, and each match will be
11670 applied, which means that attributes in later styles that match override
11671 the same attributes in earlier matching styles.  So
11672 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11673 signature and the @samp{What me?} @code{Organization} header.
11674
11675 The first element in each style is called the @code{match}.  If it's a
11676 string, then Gnus will try to regexp match it against the group name.
11677 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11678 will look in the original article for a header whose name is
11679 @var{match} and compare that @var{regexp}.  @var{match} and
11680 @var{regexp} are strings.  (There original article is the one you are
11681 replying or following up to.  If you are not composing a reply or a
11682 followup, then there is nothing to match against.)  If the
11683 @code{match} is a function symbol, that function will be called with
11684 no arguments.  If it's a variable symbol, then the variable will be
11685 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11686 any case, if this returns a non-@code{nil} value, then the style is
11687 said to @dfn{match}.
11688
11689 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11690 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11691 attribute name can be one of @code{signature}, @code{signature-file},
11692 @code{x-face-file}, @code{address} (overriding
11693 @code{user-mail-address}), @code{name} (overriding
11694 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11695 be a string or a symbol.  In that case, this will be used as a header
11696 name, and the value will be inserted in the headers of the article; if
11697 the value is @code{nil}, the header name will be removed.  If the
11698 attribute name is @code{eval}, the form is evaluated, and the result
11699 is thrown away.
11700
11701 The attribute value can be a string (used verbatim), a function with
11702 zero arguments (the return value will be used), a variable (its value
11703 will be used) or a list (it will be @code{eval}ed and the return value
11704 will be used).  The functions and sexps are called/@code{eval}ed in the
11705 message buffer that is being set up.  The headers of the current article
11706 are available through the @code{message-reply-headers} variable, which
11707 is a vector of the following headers: number subject from date id
11708 references chars lines xref extra.
11709
11710 @vindex message-reply-headers
11711
11712 If you wish to check whether the message you are about to compose is
11713 meant to be a news article or a mail message, you can check the values
11714 of the @code{message-news-p} and @code{message-mail-p} functions.
11715
11716 @findex message-mail-p
11717 @findex message-news-p
11718
11719 So here's a new example:
11720
11721 @lisp
11722 (setq gnus-posting-styles
11723       '((".*"
11724          (signature-file "~/.signature")
11725          (name "User Name")
11726          ("X-Home-Page" (getenv "WWW_HOME"))
11727          (organization "People's Front Against MWM"))
11728         ("^rec.humor"
11729          (signature my-funny-signature-randomizer))
11730         ((equal (system-name) "gnarly")  ;; @r{A form}
11731          (signature my-quote-randomizer))
11732         (message-news-p        ;; @r{A function symbol}
11733          (signature my-news-signature))
11734         (window-system         ;; @r{A value symbol}
11735          ("X-Window-System" (format "%s" window-system)))
11736         ;; @r{If I'm replying to Larsi, set the Organization header.}
11737         ((header "from" "larsi.*org")
11738          (Organization "Somewhere, Inc."))
11739         ((posting-from-work-p) ;; @r{A user defined function}
11740          (signature-file "~/.work-signature")
11741          (address "user@@bar.foo")
11742          (body "You are fired.\n\nSincerely, your boss.")
11743          (organization "Important Work, Inc"))
11744         ("nnml:.*"
11745          (From (save-excursion
11746                  (set-buffer gnus-article-buffer)
11747                  (message-fetch-field "to"))))
11748         ("^nn.+:"
11749          (signature-file "~/.mail-signature"))))
11750 @end lisp
11751
11752 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11753 @code{From} address in all your outgoing replies, which might be handy
11754 if you fill many roles.
11755
11756
11757 @node Drafts
11758 @section Drafts
11759 @cindex drafts
11760
11761 If you are writing a message (mail or news) and suddenly remember that
11762 you have a steak in the oven (or some pesto in the food processor, you
11763 craaazy vegetarians), you'll probably wish there was a method to save
11764 the message you are writing so that you can continue editing it some
11765 other day, and send it when you feel its finished.
11766
11767 Well, don't worry about it.  Whenever you start composing a message of
11768 some sort using the Gnus mail and post commands, the buffer you get will
11769 automatically associate to an article in a special @dfn{draft} group.
11770 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11771 article will be saved there.  (Auto-save files also go to the draft
11772 group.)
11773
11774 @cindex nndraft
11775 @vindex nndraft-directory
11776 The draft group is a special group (which is implemented as an
11777 @code{nndraft} group, if you absolutely have to know) called
11778 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11779 @code{nndraft} is to store its files.  What makes this group special is
11780 that you can't tick any articles in it or mark any articles as
11781 read---all articles in the group are permanently unread.
11782
11783 If the group doesn't exist, it will be created and you'll be subscribed
11784 to it.  The only way to make it disappear from the Group buffer is to
11785 unsubscribe it.  The special properties of the draft group comes from
11786 a group property (@pxref{Group Parameters}), and if lost the group
11787 behaves like any other group.  This means the commands below will not
11788 be available.  To restore the special properties of the group, the
11789 simplest way is to kill the group, using @kbd{C-k}, and restart
11790 Gnus.  The group is automatically created again with the
11791 correct parameters.  The content of the group is not lost.
11792
11793 @c @findex gnus-dissociate-buffer-from-draft
11794 @c @kindex C-c M-d (Mail)
11795 @c @kindex C-c M-d (Post)
11796 @c @findex gnus-associate-buffer-with-draft
11797 @c @kindex C-c C-d (Mail)
11798 @c @kindex C-c C-d (Post)
11799 @c If you're writing some super-secret message that you later want to
11800 @c encode with PGP before sending, you may wish to turn the auto-saving
11801 @c (and association with the draft group) off.  You never know who might be
11802 @c interested in reading all your extremely valuable and terribly horrible
11803 @c and interesting secrets.  The @kbd{C-c M-d}
11804 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11805 @c If you change your mind and want to turn the auto-saving back on again,
11806 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11807 @c
11808 @c @vindex gnus-use-draft
11809 @c To leave association with the draft group off by default, set
11810 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11811
11812 @findex gnus-draft-edit-message
11813 @kindex D e (Draft)
11814 When you want to continue editing the article, you simply enter the
11815 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11816 that.  You will be placed in a buffer where you left off.
11817
11818 Rejected articles will also be put in this draft group (@pxref{Rejected
11819 Articles}).
11820
11821 @findex gnus-draft-send-all-messages
11822 @kindex D s (Draft)
11823 @findex gnus-draft-send-message
11824 @kindex D S (Draft)
11825 If you have lots of rejected messages you want to post (or mail) without
11826 doing further editing, you can use the @kbd{D s} command
11827 (@code{gnus-draft-send-message}).  This command understands the
11828 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11829 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11830 in the buffer.
11831
11832 @findex gnus-draft-toggle-sending
11833 @kindex D t (Draft)
11834 If you have some messages that you wish not to send, you can use the
11835 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11836 as unsendable.  This is a toggling command.
11837
11838
11839 @node Rejected Articles
11840 @section Rejected Articles
11841 @cindex rejected articles
11842
11843 Sometimes a news server will reject an article.  Perhaps the server
11844 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11845 @emph{there be demons}.  Perhaps you have included too much cited text.
11846 Perhaps the disk is full.  Perhaps the server is down.
11847
11848 These situations are, of course, totally beyond the control of Gnus.
11849 (Gnus, of course, loves the way you look, always feels great, has angels
11850 fluttering around inside of it, doesn't care about how much cited text
11851 you include, never runs full and never goes down.)  So Gnus saves these
11852 articles until some later time when the server feels better.
11853
11854 The rejected articles will automatically be put in a special draft group
11855 (@pxref{Drafts}).  When the server comes back up again, you'd then
11856 typically enter that group and send all the articles off.
11857
11858 @node Signing and encrypting
11859 @section Signing and encrypting
11860 @cindex using gpg
11861 @cindex using s/mime
11862 @cindex using smime
11863
11864 Gnus can digitally sign and encrypt your messages, using vanilla
11865 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11866 decoding such messages, see the @code{mm-verify-option} and
11867 @code{mm-decrypt-option} options (@pxref{Security}).
11868
11869 @vindex gnus-message-replysign
11870 @vindex gnus-message-replyencrypt
11871 @vindex gnus-message-replysignencrypted
11872 Often, you would like to sign replies to people who send you signed
11873 messages.  Even more often, you might want to encrypt messages which
11874 are in reply to encrypted messages.  Gnus offers
11875 @code{gnus-message-replysign} to enable the former, and
11876 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11877 @code{gnus-message-replysignencrypted} (on by default) will sign
11878 automatically encrypted messages.
11879
11880 Instructing MML to perform security operations on a @acronym{MIME} part is
11881 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11882 C-m c} key map for encryption, as follows.
11883
11884 @table @kbd
11885
11886 @item C-c C-m s s
11887 @kindex C-c C-m s s
11888 @findex mml-secure-message-sign-smime
11889
11890 Digitally sign current message using @acronym{S/MIME}.
11891
11892 @item C-c C-m s o
11893 @kindex C-c C-m s o
11894 @findex mml-secure-message-sign-pgp
11895
11896 Digitally sign current message using @acronym{PGP}.
11897
11898 @item C-c C-m s p
11899 @kindex C-c C-m s p
11900 @findex mml-secure-message-sign-pgp
11901
11902 Digitally sign current message using @acronym{PGP/MIME}.
11903
11904 @item C-c C-m c s
11905 @kindex C-c C-m c s
11906 @findex mml-secure-message-encrypt-smime
11907
11908 Digitally encrypt current message using @acronym{S/MIME}.
11909
11910 @item C-c C-m c o
11911 @kindex C-c C-m c o
11912 @findex mml-secure-message-encrypt-pgp
11913
11914 Digitally encrypt current message using @acronym{PGP}.
11915
11916 @item C-c C-m c p
11917 @kindex C-c C-m c p
11918 @findex mml-secure-message-encrypt-pgpmime
11919
11920 Digitally encrypt current message using @acronym{PGP/MIME}.
11921
11922 @item C-c C-m C-n
11923 @kindex C-c C-m C-n
11924 @findex mml-unsecure-message
11925 Remove security related MML tags from message.
11926
11927 @end table
11928
11929 @xref{Security, ,Security, message, Message Manual}, for more information.
11930
11931 @node Select Methods
11932 @chapter Select Methods
11933 @cindex foreign groups
11934 @cindex select methods
11935
11936 A @dfn{foreign group} is a group not read by the usual (or
11937 default) means.  It could be, for instance, a group from a different
11938 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11939 personal mail group.
11940
11941 A foreign group (or any group, really) is specified by a @dfn{name} and
11942 a @dfn{select method}.  To take the latter first, a select method is a
11943 list where the first element says what back end to use (e.g. @code{nntp},
11944 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11945 name}.  There may be additional elements in the select method, where the
11946 value may have special meaning for the back end in question.
11947
11948 One could say that a select method defines a @dfn{virtual server}---so
11949 we do just that (@pxref{Server Buffer}).
11950
11951 The @dfn{name} of the group is the name the back end will recognize the
11952 group as.
11953
11954 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11955 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11956 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11957 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11958 back end just knows this group as @samp{soc.motss}.
11959
11960 The different methods all have their peculiarities, of course.
11961
11962 @menu
11963 * Server Buffer::               Making and editing virtual servers.
11964 * Getting News::                Reading USENET news with Gnus.
11965 * Getting Mail::                Reading your personal mail with Gnus.
11966 * Browsing the Web::            Getting messages from a plethora of Web sources.
11967 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11968 * Other Sources::               Reading directories, files, SOUP packets.
11969 * Combined Groups::             Combining groups into one group.
11970 * Gnus Unplugged::              Reading news and mail offline.
11971 @end menu
11972
11973
11974 @node Server Buffer
11975 @section Server Buffer
11976
11977 Traditionally, a @dfn{server} is a machine or a piece of software that
11978 one connects to, and then requests information from.  Gnus does not
11979 connect directly to any real servers, but does all transactions through
11980 one back end or other.  But that's just putting one layer more between
11981 the actual media and Gnus, so we might just as well say that each
11982 back end represents a virtual server.
11983
11984 For instance, the @code{nntp} back end may be used to connect to several
11985 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11986 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11987 use, and what parameters to set by specifying a @dfn{select method}.
11988
11989 These select method specifications can sometimes become quite
11990 complicated---say, for instance, that you want to read from the
11991 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11992 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11993 Anyway, if you had to specify that for each group that used this
11994 server, that would be too much work, so Gnus offers a way of naming
11995 select methods, which is what you do in the server buffer.
11996
11997 To enter the server buffer, use the @kbd{^}
11998 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11999
12000 @menu
12001 * Server Buffer Format::        You can customize the look of this buffer.
12002 * Server Commands::             Commands to manipulate servers.
12003 * Example Methods::             Examples server specifications.
12004 * Creating a Virtual Server::   An example session.
12005 * Server Variables::            Which variables to set.
12006 * Servers and Methods::         You can use server names as select methods.
12007 * Unavailable Servers::         Some servers you try to contact may be down.
12008 @end menu
12009
12010 @vindex gnus-server-mode-hook
12011 @code{gnus-server-mode-hook} is run when creating the server buffer.
12012
12013
12014 @node Server Buffer Format
12015 @subsection Server Buffer Format
12016 @cindex server buffer format
12017
12018 @vindex gnus-server-line-format
12019 You can change the look of the server buffer lines by changing the
12020 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12021 variable, with some simple extensions:
12022
12023 @table @samp
12024
12025 @item h
12026 How the news is fetched---the back end name.
12027
12028 @item n
12029 The name of this server.
12030
12031 @item w
12032 Where the news is to be fetched from---the address.
12033
12034 @item s
12035 The opened/closed/denied status of the server.
12036 @end table
12037
12038 @vindex gnus-server-mode-line-format
12039 The mode line can also be customized by using the
12040 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12041 Formatting}).  The following specs are understood:
12042
12043 @table @samp
12044 @item S
12045 Server name.
12046
12047 @item M
12048 Server method.
12049 @end table
12050
12051 Also @pxref{Formatting Variables}.
12052
12053
12054 @node Server Commands
12055 @subsection Server Commands
12056 @cindex server commands
12057
12058 @table @kbd
12059
12060 @item a
12061 @kindex a (Server)
12062 @findex gnus-server-add-server
12063 Add a new server (@code{gnus-server-add-server}).
12064
12065 @item e
12066 @kindex e (Server)
12067 @findex gnus-server-edit-server
12068 Edit a server (@code{gnus-server-edit-server}).
12069
12070 @item SPACE
12071 @kindex SPACE (Server)
12072 @findex gnus-server-read-server
12073 Browse the current server (@code{gnus-server-read-server}).
12074
12075 @item q
12076 @kindex q (Server)
12077 @findex gnus-server-exit
12078 Return to the group buffer (@code{gnus-server-exit}).
12079
12080 @item k
12081 @kindex k (Server)
12082 @findex gnus-server-kill-server
12083 Kill the current server (@code{gnus-server-kill-server}).
12084
12085 @item y
12086 @kindex y (Server)
12087 @findex gnus-server-yank-server
12088 Yank the previously killed server (@code{gnus-server-yank-server}).
12089
12090 @item c
12091 @kindex c (Server)
12092 @findex gnus-server-copy-server
12093 Copy the current server (@code{gnus-server-copy-server}).
12094
12095 @item l
12096 @kindex l (Server)
12097 @findex gnus-server-list-servers
12098 List all servers (@code{gnus-server-list-servers}).
12099
12100 @item s
12101 @kindex s (Server)
12102 @findex gnus-server-scan-server
12103 Request that the server scan its sources for new articles
12104 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12105 servers.
12106
12107 @item g
12108 @kindex g (Server)
12109 @findex gnus-server-regenerate-server
12110 Request that the server regenerate all its data structures
12111 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12112 a mail back end that has gotten out of sync.
12113
12114 @end table
12115
12116
12117 @node Example Methods
12118 @subsection Example Methods
12119
12120 Most select methods are pretty simple and self-explanatory:
12121
12122 @lisp
12123 (nntp "news.funet.fi")
12124 @end lisp
12125
12126 Reading directly from the spool is even simpler:
12127
12128 @lisp
12129 (nnspool "")
12130 @end lisp
12131
12132 As you can see, the first element in a select method is the name of the
12133 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12134 will.
12135
12136 After these two elements, there may be an arbitrary number of
12137 @code{(@var{variable} @var{form})} pairs.
12138
12139 To go back to the first example---imagine that you want to read from
12140 port 15 on that machine.  This is what the select method should
12141 look like then:
12142
12143 @lisp
12144 (nntp "news.funet.fi" (nntp-port-number 15))
12145 @end lisp
12146
12147 You should read the documentation to each back end to find out what
12148 variables are relevant, but here's an @code{nnmh} example:
12149
12150 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12151 you have two structures that you wish to access: One is your private
12152 mail spool, and the other is a public one.  Here's the possible spec for
12153 your private mail:
12154
12155 @lisp
12156 (nnmh "private" (nnmh-directory "~/private/mail/"))
12157 @end lisp
12158
12159 (This server is then called @samp{private}, but you may have guessed
12160 that.)
12161
12162 Here's the method for a public spool:
12163
12164 @lisp
12165 (nnmh "public"
12166       (nnmh-directory "/usr/information/spool/")
12167       (nnmh-get-new-mail nil))
12168 @end lisp
12169
12170 @cindex proxy
12171 @cindex firewall
12172
12173 If you are behind a firewall and only have access to the @acronym{NNTP}
12174 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12175 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12176 Doing this can be rather fiddly, but your virtual server definition
12177 should probably look something like this:
12178
12179 @lisp
12180 (nntp "firewall"
12181       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12182       (nntp-via-address "the.firewall.machine")
12183       (nntp-address "the.real.nntp.host")
12184       (nntp-end-of-line "\n"))
12185 @end lisp
12186
12187 If you want to use the wonderful @code{ssh} program to provide a
12188 compressed connection over the modem line, you could add the following
12189 configuration to the example above:
12190
12191 @lisp
12192       (nntp-via-rlogin-command "ssh")
12193 @end lisp
12194
12195 See also @code{nntp-via-rlogin-command-switches}.
12196
12197 If you're behind a firewall, but have direct access to the outside world
12198 through a wrapper command like "runsocks", you could open a socksified
12199 telnet connection to the news server as follows:
12200
12201 @lisp
12202 (nntp "outside"
12203       (nntp-pre-command "runsocks")
12204       (nntp-open-connection-function nntp-open-via-telnet)
12205       (nntp-address "the.news.server")
12206       (nntp-end-of-line "\n"))
12207 @end lisp
12208
12209 This means that you have to have set up @code{ssh-agent} correctly to
12210 provide automatic authorization, of course.  And to get a compressed
12211 connection, you have to have the @samp{Compression} option in the
12212 @code{ssh} @file{config} file.
12213
12214
12215 @node Creating a Virtual Server
12216 @subsection Creating a Virtual Server
12217
12218 If you're saving lots of articles in the cache by using persistent
12219 articles, you may want to create a virtual server to read the cache.
12220
12221 First you need to add a new server.  The @kbd{a} command does that.  It
12222 would probably be best to use @code{nnspool} to read the cache.  You
12223 could also use @code{nnml} or @code{nnmh}, though.
12224
12225 Type @kbd{a nnspool RET cache RET}.
12226
12227 You should now have a brand new @code{nnspool} virtual server called
12228 @samp{cache}.  You now need to edit it to have the right definitions.
12229 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12230 will contain the following:
12231
12232 @lisp
12233 (nnspool "cache")
12234 @end lisp
12235
12236 Change that to:
12237
12238 @lisp
12239 (nnspool "cache"
12240          (nnspool-spool-directory "~/News/cache/")
12241          (nnspool-nov-directory "~/News/cache/")
12242          (nnspool-active-file "~/News/cache/active"))
12243 @end lisp
12244
12245 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12246 @kbd{RET} over this virtual server, you should be entered into a browse
12247 buffer, and you should be able to enter any of the groups displayed.
12248
12249
12250 @node Server Variables
12251 @subsection Server Variables
12252 @cindex server variables
12253 @cindex server parameters
12254
12255 One sticky point when defining variables (both on back ends and in Emacs
12256 in general) is that some variables are typically initialized from other
12257 variables when the definition of the variables is being loaded.  If you
12258 change the ``base'' variable after the variables have been loaded, you
12259 won't change the ``derived'' variables.
12260
12261 This typically affects directory and file variables.  For instance,
12262 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12263 directory variables are initialized from that variable, so
12264 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12265 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12266 @code{nnml-directory}---you have to explicitly set all the file
12267 variables to be what you want them to be.  For a complete list of
12268 variables for each back end, see each back end's section later in this
12269 manual, but here's an example @code{nnml} definition:
12270
12271 @lisp
12272 (nnml "public"
12273       (nnml-directory "~/my-mail/")
12274       (nnml-active-file "~/my-mail/active")
12275       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12276 @end lisp
12277
12278 Server variables are often called @dfn{server parameters}.
12279
12280 @node Servers and Methods
12281 @subsection Servers and Methods
12282
12283 Wherever you would normally use a select method
12284 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12285 when browsing a foreign server) you can use a virtual server name
12286 instead.  This could potentially save lots of typing.  And it's nice all
12287 over.
12288
12289
12290 @node Unavailable Servers
12291 @subsection Unavailable Servers
12292
12293 If a server seems to be unreachable, Gnus will mark that server as
12294 @code{denied}.  That means that any subsequent attempt to make contact
12295 with that server will just be ignored.  ``It can't be opened,'' Gnus
12296 will tell you, without making the least effort to see whether that is
12297 actually the case or not.
12298
12299 That might seem quite naughty, but it does make sense most of the time.
12300 Let's say you have 10 groups subscribed to on server
12301 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12302 away from you and the machine is quite slow, so it takes 1 minute just
12303 to find out that it refuses connection to you today.  If Gnus were to
12304 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12305 attempt to do that.  Once it has gotten a single ``connection refused'',
12306 it will regard that server as ``down''.
12307
12308 So, what happens if the machine was only feeling unwell temporarily?
12309 How do you test to see whether the machine has come up again?
12310
12311 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12312 with the following commands:
12313
12314 @table @kbd
12315
12316 @item O
12317 @kindex O (Server)
12318 @findex gnus-server-open-server
12319 Try to establish connection to the server on the current line
12320 (@code{gnus-server-open-server}).
12321
12322 @item C
12323 @kindex C (Server)
12324 @findex gnus-server-close-server
12325 Close the connection (if any) to the server
12326 (@code{gnus-server-close-server}).
12327
12328 @item D
12329 @kindex D (Server)
12330 @findex gnus-server-deny-server
12331 Mark the current server as unreachable
12332 (@code{gnus-server-deny-server}).
12333
12334 @item M-o
12335 @kindex M-o (Server)
12336 @findex gnus-server-open-all-servers
12337 Open the connections to all servers in the buffer
12338 (@code{gnus-server-open-all-servers}).
12339
12340 @item M-c
12341 @kindex M-c (Server)
12342 @findex gnus-server-close-all-servers
12343 Close the connections to all servers in the buffer
12344 (@code{gnus-server-close-all-servers}).
12345
12346 @item R
12347 @kindex R (Server)
12348 @findex gnus-server-remove-denials
12349 Remove all marks to whether Gnus was denied connection from any servers
12350 (@code{gnus-server-remove-denials}).
12351
12352 @item L
12353 @kindex L (Server)
12354 @findex gnus-server-offline-server
12355 Set server status to offline (@code{gnus-server-offline-server}).
12356
12357 @end table
12358
12359
12360 @node Getting News
12361 @section Getting News
12362 @cindex reading news
12363 @cindex news back ends
12364
12365 A newsreader is normally used for reading news.  Gnus currently provides
12366 only two methods of getting news---it can read from an @acronym{NNTP} server,
12367 or it can read from a local spool.
12368
12369 @menu
12370 * NNTP::                        Reading news from an @acronym{NNTP} server.
12371 * News Spool::                  Reading news from the local spool.
12372 @end menu
12373
12374
12375 @node NNTP
12376 @subsection NNTP
12377 @cindex nntp
12378
12379 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12380 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12381 server as the, uhm, address.
12382
12383 If the @acronym{NNTP} server is located at a non-standard port, setting the
12384 third element of the select method to this port number should allow you
12385 to connect to the right port.  You'll have to edit the group info for
12386 that (@pxref{Foreign Groups}).
12387
12388 The name of the foreign group can be the same as a native group.  In
12389 fact, you can subscribe to the same group from as many different servers
12390 you feel like.  There will be no name collisions.
12391
12392 The following variables can be used to create a virtual @code{nntp}
12393 server:
12394
12395 @table @code
12396
12397 @item nntp-server-opened-hook
12398 @vindex nntp-server-opened-hook
12399 @cindex @sc{mode reader}
12400 @cindex authinfo
12401 @cindex authentification
12402 @cindex nntp authentification
12403 @findex nntp-send-authinfo
12404 @findex nntp-send-mode-reader
12405 is run after a connection has been made.  It can be used to send
12406 commands to the @acronym{NNTP} server after it has been contacted.  By
12407 default it sends the command @code{MODE READER} to the server with the
12408 @code{nntp-send-mode-reader} function.  This function should always be
12409 present in this hook.
12410
12411 @item nntp-authinfo-function
12412 @vindex nntp-authinfo-function
12413 @findex nntp-send-authinfo
12414 @vindex nntp-authinfo-file
12415 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12416 server.  The default function is @code{nntp-send-authinfo}, which looks
12417 through your @file{~/.authinfo} (or whatever you've set the
12418 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12419 are found, it will prompt you for a login name and a password.  The
12420 format of the @file{~/.authinfo} file is (almost) the same as the
12421 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12422 manual page, but here are the salient facts:
12423
12424 @enumerate
12425 @item
12426 The file contains one or more line, each of which define one server.
12427
12428 @item
12429 Each line may contain an arbitrary number of token/value pairs.
12430
12431 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12432 @samp{default}.  In addition Gnus introduces two new tokens, not present
12433 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12434 @samp{force}.  (This is the only way the @file{.authinfo} file format
12435 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12436 indicate what port on the server the credentials apply to and
12437 @samp{force} is explained below.
12438
12439 @end enumerate
12440
12441 Here's an example file:
12442
12443 @example
12444 machine news.uio.no login larsi password geheimnis
12445 machine nntp.ifi.uio.no login larsi force yes
12446 @end example
12447
12448 The token/value pairs may appear in any order; @samp{machine} doesn't
12449 have to be first, for instance.
12450
12451 In this example, both login name and password have been supplied for the
12452 former server, while the latter has only the login name listed, and the
12453 user will be prompted for the password.  The latter also has the
12454 @samp{force} tag, which means that the authinfo will be sent to the
12455 @var{nntp} server upon connection; the default (i.e., when there is not
12456 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12457 until the @var{nntp} server asks for it.
12458
12459 You can also add @samp{default} lines that will apply to all servers
12460 that don't have matching @samp{machine} lines.
12461
12462 @example
12463 default force yes
12464 @end example
12465
12466 This will force sending @samp{AUTHINFO} commands to all servers not
12467 previously mentioned.
12468
12469 Remember to not leave the @file{~/.authinfo} file world-readable.
12470
12471 @item nntp-server-action-alist
12472 @vindex nntp-server-action-alist
12473 This is a list of regexps to match on server types and actions to be
12474 taken when matches are made.  For instance, if you want Gnus to beep
12475 every time you connect to innd, you could say something like:
12476
12477 @lisp
12478 (setq nntp-server-action-alist
12479       '(("innd" (ding))))
12480 @end lisp
12481
12482 You probably don't want to do that, though.
12483
12484 The default value is
12485
12486 @lisp
12487 '(("nntpd 1\\.5\\.11t"
12488    (remove-hook 'nntp-server-opened-hook
12489                 'nntp-send-mode-reader)))
12490 @end lisp
12491
12492 This ensures that Gnus doesn't send the @code{MODE READER} command to
12493 nntpd 1.5.11t, since that command chokes that server, I've been told.
12494
12495 @item nntp-maximum-request
12496 @vindex nntp-maximum-request
12497 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12498 will collect headers by sending a series of @code{head} commands.  To
12499 speed things up, the back end sends lots of these commands without
12500 waiting for reply, and then reads all the replies.  This is controlled
12501 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12502 your network is buggy, you should set this to 1.
12503
12504 @item nntp-connection-timeout
12505 @vindex nntp-connection-timeout
12506 If you have lots of foreign @code{nntp} groups that you connect to
12507 regularly, you're sure to have problems with @acronym{NNTP} servers not
12508 responding properly, or being too loaded to reply within reasonable
12509 time.  This is can lead to awkward problems, which can be helped
12510 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12511 that says how many seconds the @code{nntp} back end should wait for a
12512 connection before giving up.  If it is @code{nil}, which is the default,
12513 no timeouts are done.
12514
12515 @c @item nntp-command-timeout
12516 @c @vindex nntp-command-timeout
12517 @c @cindex PPP connections
12518 @c @cindex dynamic IP addresses
12519 @c If you're running Gnus on a machine that has a dynamically assigned
12520 @c address, Gnus may become confused.  If the address of your machine
12521 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12522 @c waiting forever for replies from the server.  To help with this
12523 @c unfortunate problem, you can set this command to a number.  Gnus will
12524 @c then, if it sits waiting for a reply from the server longer than that
12525 @c number of seconds, shut down the connection, start a new one, and resend
12526 @c the command.  This should hopefully be transparent to the user.  A
12527 @c likely number is 30 seconds.
12528 @c
12529 @c @item nntp-retry-on-break
12530 @c @vindex nntp-retry-on-break
12531 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12532 @c hangs.  This will have much the same effect as the command timeout
12533 @c described above.
12534
12535 @item nntp-server-hook
12536 @vindex nntp-server-hook
12537 This hook is run as the last step when connecting to an @acronym{NNTP}
12538 server.
12539
12540 @item nntp-buggy-select
12541 @vindex nntp-buggy-select
12542 Set this to non-@code{nil} if your select routine is buggy.
12543
12544 @item nntp-nov-is-evil
12545 @vindex nntp-nov-is-evil
12546 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12547 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12548 can be used.
12549
12550 @item nntp-xover-commands
12551 @vindex nntp-xover-commands
12552 @cindex @acronym{NOV}
12553 @cindex XOVER
12554 List of strings used as commands to fetch @acronym{NOV} lines from a
12555 server.  The default value of this variable is @code{("XOVER"
12556 "XOVERVIEW")}.
12557
12558 @item nntp-nov-gap
12559 @vindex nntp-nov-gap
12560 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12561 the server.  The server responds with one huge list of lines.  However,
12562 if you have read articles 2-5000 in the group, and only want to read
12563 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12564 lines that you will not need.  This variable says how
12565 big a gap between two consecutive articles is allowed to be before the
12566 @code{XOVER} request is split into several request.  Note that if your
12567 network is fast, setting this variable to a really small number means
12568 that fetching will probably be slower.  If this variable is @code{nil},
12569 @code{nntp} will never split requests.  The default is 5.
12570
12571 @item nntp-prepare-server-hook
12572 @vindex nntp-prepare-server-hook
12573 A hook run before attempting to connect to an @acronym{NNTP} server.
12574
12575 @item nntp-warn-about-losing-connection
12576 @vindex nntp-warn-about-losing-connection
12577 If this variable is non-@code{nil}, some noise will be made when a
12578 server closes connection.
12579
12580 @item nntp-record-commands
12581 @vindex nntp-record-commands
12582 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12583 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12584 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12585 that doesn't seem to work.
12586
12587 @item nntp-open-connection-function
12588 @vindex nntp-open-connection-function
12589 It is possible to customize how the connection to the nntp server will
12590 be opened.  If you specify an @code{nntp-open-connection-function}
12591 parameter, Gnus will use that function to establish the connection.
12592 Five pre-made functions are supplied.  These functions can be grouped in
12593 two categories: direct connection functions (three pre-made), and
12594 indirect ones (two pre-made).
12595
12596 @item nntp-prepare-post-hook
12597 @vindex nntp-prepare-post-hook
12598 A hook run just before posting an article.  If there is no
12599 @code{Message-ID} header in the article and the news server provides the
12600 recommended ID, it will be added to the article before running this
12601 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12602 inhibit Gnus to add a @code{Message-ID} header, you could say:
12603
12604 @lisp
12605 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12606 @end lisp
12607
12608 Note that not all servers support the recommended ID.  This works for
12609 INN versions 2.3.0 and later, for instance.
12610
12611 @item nntp-read-timeout
12612 @vindex nntp-read-timeout
12613 How long nntp should wait between checking for the end of output.
12614 Shorter values mean quicker response, but is more CPU intensive.  The
12615 default is 0.1 seconds.  If you have a slow line to the server (and
12616 don't like to see Emacs eat your available CPU power), you might set
12617 this to, say, 1.
12618
12619 @end table
12620
12621 @menu
12622 * Direct Functions::            Connecting directly to the server.
12623 * Indirect Functions::          Connecting indirectly to the server.
12624 * Common Variables::            Understood by several connection functions.
12625 @end menu
12626
12627
12628 @node Direct Functions
12629 @subsubsection Direct Functions
12630 @cindex direct connection functions
12631
12632 These functions are called direct because they open a direct connection
12633 between your machine and the @acronym{NNTP} server.  The behavior of these
12634 functions is also affected by commonly understood variables
12635 (@pxref{Common Variables}).
12636
12637 @table @code
12638 @findex nntp-open-network-stream
12639 @item nntp-open-network-stream
12640 This is the default, and simply connects to some port or other on the
12641 remote system.
12642
12643 @findex nntp-open-tls-stream
12644 @item nntp-open-tls-stream
12645 Opens a connection to a server over a @dfn{secure} channel.  To use
12646 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12647 installed.  You then define a server as follows:
12648
12649 @lisp
12650 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12651 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12652 ;;
12653 (nntp "snews.bar.com"
12654       (nntp-open-connection-function nntp-open-tls-stream)
12655       (nntp-port-number )
12656       (nntp-address "snews.bar.com"))
12657 @end lisp
12658
12659 @findex nntp-open-ssl-stream
12660 @item nntp-open-ssl-stream
12661 Opens a connection to a server over a @dfn{secure} channel.  To use
12662 this you must have @uref{http://www.openssl.org, OpenSSL} or
12663 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12664 then define a server as follows:
12665
12666 @lisp
12667 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12668 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12669 ;;
12670 (nntp "snews.bar.com"
12671       (nntp-open-connection-function nntp-open-ssl-stream)
12672       (nntp-port-number 563)
12673       (nntp-address "snews.bar.com"))
12674 @end lisp
12675
12676 @findex nntp-open-telnet-stream
12677 @item nntp-open-telnet-stream
12678 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12679 it.  You might wonder why this function exists, since we have the
12680 default @code{nntp-open-network-stream} which would do the job.  (One
12681 of) the reason(s) is that if you are behind a firewall but have direct
12682 connections to the outside world thanks to a command wrapper like
12683 @code{runsocks}, you can use it like this:
12684
12685 @lisp
12686 (nntp "socksified"
12687       (nntp-pre-command "runsocks")
12688       (nntp-open-connection-function nntp-open-telnet-stream)
12689       (nntp-address "the.news.server"))
12690 @end lisp
12691
12692 With the default method, you would need to wrap your whole Emacs
12693 session, which is not a good idea.
12694 @end table
12695
12696
12697 @node Indirect Functions
12698 @subsubsection Indirect Functions
12699 @cindex indirect connection functions
12700
12701 These functions are called indirect because they connect to an
12702 intermediate host before actually connecting to the @acronym{NNTP} server.
12703 All of these functions and related variables are also said to belong to
12704 the ``via'' family of connection: they're all prefixed with ``via'' to make
12705 things cleaner.  The behavior of these functions is also affected by
12706 commonly understood variables (@pxref{Common Variables}).
12707
12708 @table @code
12709 @item nntp-open-via-rlogin-and-telnet
12710 @findex nntp-open-via-rlogin-and-telnet
12711 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12712 to the real @acronym{NNTP} server from there.  This is useful for instance if
12713 you need to connect to a firewall machine first.
12714
12715 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12716
12717 @table @code
12718 @item nntp-via-rlogin-command
12719 @vindex nntp-via-rlogin-command
12720 Command used to log in on the intermediate host.  The default is
12721 @samp{rsh}, but @samp{ssh} is a popular alternative.
12722
12723 @item nntp-via-rlogin-command-switches
12724 @vindex nntp-via-rlogin-command-switches
12725 List of strings to be used as the switches to
12726 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12727 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12728 @samp{("-C")} in order to compress all data connections, otherwise set
12729 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12730 the telnet command requires a pseudo-tty allocation on an intermediate
12731 host.
12732 @end table
12733
12734 @item nntp-open-via-telnet-and-telnet
12735 @findex nntp-open-via-telnet-and-telnet
12736 Does essentially the same, but uses @samp{telnet} instead of
12737 @samp{rlogin} to connect to the intermediate host.
12738
12739 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12740
12741 @table @code
12742 @item nntp-via-telnet-command
12743 @vindex nntp-via-telnet-command
12744 Command used to @code{telnet} the intermediate host.  The default is
12745 @samp{telnet}.
12746
12747 @item nntp-via-telnet-switches
12748 @vindex nntp-via-telnet-switches
12749 List of strings to be used as the switches to the
12750 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12751
12752 @item nntp-via-user-password
12753 @vindex nntp-via-user-password
12754 Password to use when logging in on the intermediate host.
12755
12756 @item nntp-via-envuser
12757 @vindex nntp-via-envuser
12758 If non-@code{nil}, the intermediate @code{telnet} session (client and
12759 server both) will support the @code{ENVIRON} option and not prompt for
12760 login name. This works for Solaris @code{telnet}, for instance.
12761
12762 @item nntp-via-shell-prompt
12763 @vindex nntp-via-shell-prompt
12764 Regexp matching the shell prompt on the intermediate host.  The default
12765 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12766
12767 @end table
12768
12769 @end table
12770
12771
12772 Here are some additional variables that are understood by all the above
12773 functions:
12774
12775 @table @code
12776
12777 @item nntp-via-user-name
12778 @vindex nntp-via-user-name
12779 User name to use when connecting to the intermediate host.
12780
12781 @item nntp-via-address
12782 @vindex nntp-via-address
12783 Address of the intermediate host to connect to.
12784
12785 @end table
12786
12787
12788 @node Common Variables
12789 @subsubsection Common Variables
12790
12791 The following variables affect the behavior of all, or several of the
12792 pre-made connection functions. When not specified, all functions are
12793 affected.
12794
12795 @table @code
12796
12797 @item nntp-pre-command
12798 @vindex nntp-pre-command
12799 A command wrapper to use when connecting through a non native
12800 connection function (all except @code{nntp-open-network-stream},
12801 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12802 where you would put a @samp{SOCKS} wrapper for instance.
12803
12804 @item nntp-address
12805 @vindex nntp-address
12806 The address of the @acronym{NNTP} server.
12807
12808 @item nntp-port-number
12809 @vindex nntp-port-number
12810 Port number to connect to the @acronym{NNTP} server.  The default is
12811 @samp{nntp}.  If you use @acronym{NNTP} over
12812 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12813 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12814 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12815 not work with named ports.
12816
12817 @item nntp-end-of-line
12818 @vindex nntp-end-of-line
12819 String to use as end-of-line marker when talking to the @acronym{NNTP}
12820 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12821 using a non native connection function.
12822
12823 @item nntp-telnet-command
12824 @vindex nntp-telnet-command
12825 Command to use when connecting to the @acronym{NNTP} server through
12826 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12827 just for the real @acronym{NNTP} server.  The default is
12828 @samp{telnet}.
12829
12830 @item nntp-telnet-switches
12831 @vindex nntp-telnet-switches
12832 A list of switches to pass to @code{nntp-telnet-command}.  The default
12833 is @samp{("-8")}.
12834
12835 @end table
12836
12837
12838 @node News Spool
12839 @subsection News Spool
12840 @cindex nnspool
12841 @cindex news spool
12842
12843 Subscribing to a foreign group from the local spool is extremely easy,
12844 and might be useful, for instance, to speed up reading groups that
12845 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12846 instance.
12847
12848 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12849 anything else) as the address.
12850
12851 If you have access to a local spool, you should probably use that as the
12852 native select method (@pxref{Finding the News}).  It is normally faster
12853 than using an @code{nntp} select method, but might not be.  It depends.
12854 You just have to try to find out what's best at your site.
12855
12856 @table @code
12857
12858 @item nnspool-inews-program
12859 @vindex nnspool-inews-program
12860 Program used to post an article.
12861
12862 @item nnspool-inews-switches
12863 @vindex nnspool-inews-switches
12864 Parameters given to the inews program when posting an article.
12865
12866 @item nnspool-spool-directory
12867 @vindex nnspool-spool-directory
12868 Where @code{nnspool} looks for the articles.  This is normally
12869 @file{/usr/spool/news/}.
12870
12871 @item nnspool-nov-directory
12872 @vindex nnspool-nov-directory
12873 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12874 @file{/usr/spool/news/over.view/}.
12875
12876 @item nnspool-lib-dir
12877 @vindex nnspool-lib-dir
12878 Where the news lib dir is (@file{/usr/lib/news/} by default).
12879
12880 @item nnspool-active-file
12881 @vindex nnspool-active-file
12882 The name of the active file.
12883
12884 @item nnspool-newsgroups-file
12885 @vindex nnspool-newsgroups-file
12886 The name of the group descriptions file.
12887
12888 @item nnspool-history-file
12889 @vindex nnspool-history-file
12890 The name of the news history file.
12891
12892 @item nnspool-active-times-file
12893 @vindex nnspool-active-times-file
12894 The name of the active date file.
12895
12896 @item nnspool-nov-is-evil
12897 @vindex nnspool-nov-is-evil
12898 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12899 that it finds.
12900
12901 @item nnspool-sift-nov-with-sed
12902 @vindex nnspool-sift-nov-with-sed
12903 @cindex sed
12904 If non-@code{nil}, which is the default, use @code{sed} to get the
12905 relevant portion from the overview file.  If @code{nil},
12906 @code{nnspool} will load the entire file into a buffer and process it
12907 there.
12908
12909 @end table
12910
12911
12912 @node Getting Mail
12913 @section Getting Mail
12914 @cindex reading mail
12915 @cindex mail
12916
12917 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12918 course.
12919
12920 @menu
12921 * Mail in a Newsreader::        Important introductory notes.
12922 * Getting Started Reading Mail::  A simple cookbook example.
12923 * Splitting Mail::              How to create mail groups.
12924 * Mail Sources::                How to tell Gnus where to get mail from.
12925 * Mail Back End Variables::     Variables for customizing mail handling.
12926 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12927 * Group Mail Splitting::        Use group customize to drive mail splitting.
12928 * Incorporating Old Mail::      What about the old mail you have?
12929 * Expiring Mail::               Getting rid of unwanted mail.
12930 * Washing Mail::                Removing gruft from the mail you get.
12931 * Duplicates::                  Dealing with duplicated mail.
12932 * Not Reading Mail::            Using mail back ends for reading other files.
12933 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12934 @end menu
12935
12936
12937 @node Mail in a Newsreader
12938 @subsection Mail in a Newsreader
12939
12940 If you are used to traditional mail readers, but have decided to switch
12941 to reading mail with Gnus, you may find yourself experiencing something
12942 of a culture shock.
12943
12944 Gnus does not behave like traditional mail readers.  If you want to make
12945 it behave that way, you can, but it's an uphill battle.
12946
12947 Gnus, by default, handles all its groups using the same approach.  This
12948 approach is very newsreaderly---you enter a group, see the new/unread
12949 messages, and when you read the messages, they get marked as read, and
12950 you don't see them any more.  (Unless you explicitly ask for them.)
12951
12952 In particular, you do not do anything explicitly to delete messages.
12953
12954 Does this mean that all the messages that have been marked as read are
12955 deleted?  How awful!
12956
12957 But, no, it means that old messages are @dfn{expired} according to some
12958 scheme or other.  For news messages, the expire process is controlled by
12959 the news administrator; for mail, the expire process is controlled by
12960 you.  The expire process for mail is covered in depth in @pxref{Expiring
12961 Mail}.
12962
12963 What many Gnus users find, after using it a while for both news and
12964 mail, is that the transport mechanism has very little to do with how
12965 they want to treat a message.
12966
12967 Many people subscribe to several mailing lists.  These are transported
12968 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12969 answering, or even reading these messages very carefully.  We may not
12970 need to save them because if we should need to read one again, they are
12971 archived somewhere else.
12972
12973 Some people have local news groups which have only a handful of readers.
12974 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12975 to read and answer a large fraction of the messages very carefully in
12976 order to do our work.  And there may not be an archive, so we may need
12977 to save the interesting messages the same way we would personal mail.
12978
12979 The important distinction turns out to be not the transport mechanism,
12980 but other factors such as how interested we are in the subject matter,
12981 or how easy it is to retrieve the message if we need to read it again.
12982
12983 Gnus provides many options for sorting mail into ``groups'' which behave
12984 like newsgroups, and for treating each group (whether mail or news)
12985 differently.
12986
12987 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12988 that Gnus should grow up and be a male, er, mail reader.  It is possible
12989 to whip Gnus into a more mailreaderly being, but, as said before, it's
12990 not easy.  People who prefer proper mail readers should try @sc{vm}
12991 instead, which is an excellent, and proper, mail reader.
12992
12993 I don't mean to scare anybody off, but I want to make it clear that you
12994 may be required to learn a new way of thinking about messages.  After
12995 you've been subjected to The Gnus Way, you will come to love it.  I can
12996 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12997 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12998 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12999 You Do.)
13000
13001
13002 @node Getting Started Reading Mail
13003 @subsection Getting Started Reading Mail
13004
13005 It's quite easy to use Gnus to read your new mail.  You just plonk the
13006 mail back end of your choice into @code{gnus-secondary-select-methods},
13007 and things will happen automatically.
13008
13009 For instance, if you want to use @code{nnml} (which is a ``one file per
13010 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13011
13012 @lisp
13013 (setq gnus-secondary-select-methods '((nnml "")))
13014 @end lisp
13015
13016 Now, the next time you start Gnus, this back end will be queried for new
13017 articles, and it will move all the messages in your spool file to its
13018 directory, which is @file{~/Mail/} by default.  The new group that will
13019 be created (@samp{mail.misc}) will be subscribed, and you can read it
13020 like any other group.
13021
13022 You will probably want to split the mail into several groups, though:
13023
13024 @lisp
13025 (setq nnmail-split-methods
13026       '(("junk" "^From:.*Lars Ingebrigtsen")
13027         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13028         ("other" "")))
13029 @end lisp
13030
13031 This will result in three new @code{nnml} mail groups being created:
13032 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13033 mail that doesn't fit into the first two groups will be placed in the
13034 last group.
13035
13036 This should be sufficient for reading mail with Gnus.  You might want to
13037 give the other sections in this part of the manual a perusal, though.
13038 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13039
13040
13041 @node Splitting Mail
13042 @subsection Splitting Mail
13043 @cindex splitting mail
13044 @cindex mail splitting
13045
13046 @vindex nnmail-split-methods
13047 The @code{nnmail-split-methods} variable says how the incoming mail is
13048 to be split into groups.
13049
13050 @lisp
13051 (setq nnmail-split-methods
13052   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13053     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13054     ("mail.other" "")))
13055 @end lisp
13056
13057 This variable is a list of lists, where the first element of each of
13058 these lists is the name of the mail group (they do not have to be called
13059 something beginning with @samp{mail}, by the way), and the second
13060 element is a regular expression used on the header of each mail to
13061 determine if it belongs in this mail group.  The first string may
13062 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13063 insert sub-expressions from the matched text.  For instance:
13064
13065 @lisp
13066 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13067 @end lisp
13068
13069 The second element can also be a function.  In that case, it will be
13070 called narrowed to the headers with the first element of the rule as the
13071 argument.  It should return a non-@code{nil} value if it thinks that the
13072 mail belongs in that group.
13073
13074 The last of these groups should always be a general one, and the regular
13075 expression should @emph{always} be @samp{*} so that it matches any mails
13076 that haven't been matched by any of the other regexps.  (These rules are
13077 processed from the beginning of the alist toward the end.  The first
13078 rule to make a match will ``win'', unless you have crossposting enabled.
13079 In that case, all matching rules will ``win''.)
13080
13081 If you like to tinker with this yourself, you can set this variable to a
13082 function of your choice.  This function will be called without any
13083 arguments in a buffer narrowed to the headers of an incoming mail
13084 message.  The function should return a list of group names that it
13085 thinks should carry this mail message.
13086
13087 Note that the mail back ends are free to maul the poor, innocent,
13088 incoming headers all they want to.  They all add @code{Lines} headers;
13089 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13090 @code{From<SPACE>} line to something else.
13091
13092 @vindex nnmail-crosspost
13093 The mail back ends all support cross-posting.  If several regexps match,
13094 the mail will be ``cross-posted'' to all those groups.
13095 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13096 that no articles are crossposted to the general (@samp{*}) group.
13097
13098 @vindex nnmail-crosspost-link-function
13099 @cindex crosspost
13100 @cindex links
13101 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13102 the crossposted articles.  However, not all file systems support hard
13103 links.  If that's the case for you, set
13104 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13105 variable is @code{add-name-to-file} by default.)
13106
13107 @kindex M-x nnmail-split-history
13108 @findex nnmail-split-history
13109 If you wish to see where the previous mail split put the messages, you
13110 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13111 where re-spooling messages would put the messages, you can use
13112 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13113 Group Commands}).
13114
13115 @vindex nnmail-split-header-length-limit
13116 Header lines longer than the value of
13117 @code{nnmail-split-header-length-limit} are excluded from the split
13118 function.
13119
13120 @vindex nnmail-mail-splitting-charset
13121 @vindex nnmail-mail-splitting-decodes
13122 By default the splitting codes @acronym{MIME} decodes headers so you
13123 can match on non-@acronym{ASCII} strings.  The
13124 @code{nnmail-mail-splitting-charset} variable specifies the default
13125 charset for decoding.  The behaviour can be turned off completely by
13126 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13127 useful if you want to match articles based on the raw header data.
13128
13129 @vindex nnmail-resplit-incoming
13130 By default, splitting is performed on all incoming messages.  If you
13131 specify a @code{directory} entry for the variable @code{mail-sources}
13132 @pxref{Mail Source Specifiers}, however, then splitting does
13133 @emph{not} happen by default.  You can set the variable
13134 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13135 splitting happen even in this case.  (This variable has no effect on
13136 other kinds of entries.)
13137
13138 Gnus gives you all the opportunity you could possibly want for shooting
13139 yourself in the foot.  Let's say you create a group that will contain
13140 all the mail you get from your boss.  And then you accidentally
13141 unsubscribe from the group.  Gnus will still put all the mail from your
13142 boss in the unsubscribed group, and so, when your boss mails you ``Have
13143 that report ready by Monday or you're fired!'', you'll never see it and,
13144 come Tuesday, you'll still believe that you're gainfully employed while
13145 you really should be out collecting empty bottles to save up for next
13146 month's rent money.
13147
13148
13149 @node Mail Sources
13150 @subsection Mail Sources
13151
13152 Mail can be gotten from many different sources---the mail spool, from
13153 a @acronym{POP} mail server, from a procmail directory, or from a
13154 maildir, for instance.
13155
13156 @menu
13157 * Mail Source Specifiers::      How to specify what a mail source is.
13158 * Mail Source Customization::   Some variables that influence things.
13159 * Fetching Mail::               Using the mail source specifiers.
13160 @end menu
13161
13162
13163 @node Mail Source Specifiers
13164 @subsubsection Mail Source Specifiers
13165 @cindex POP
13166 @cindex mail server
13167 @cindex procmail
13168 @cindex mail spool
13169 @cindex mail source
13170
13171 You tell Gnus how to fetch mail by setting @code{mail-sources}
13172 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13173
13174 Here's an example:
13175
13176 @lisp
13177 (pop :server "pop3.mailserver.com" :user "myname")
13178 @end lisp
13179
13180 As can be observed, a mail source specifier is a list where the first
13181 element is a @dfn{mail source type}, followed by an arbitrary number of
13182 @dfn{keywords}.  Keywords that are not explicitly specified are given
13183 default values.
13184
13185 The following mail source types are available:
13186
13187 @table @code
13188 @item file
13189 Get mail from a single file; typically from the mail spool.
13190
13191 Keywords:
13192
13193 @table @code
13194 @item :path
13195 The file name.  Defaults to the value of the @env{MAIL}
13196 environment variable or the value of @code{rmail-spool-directory}
13197 (usually something like @file{/usr/mail/spool/user-name}).
13198
13199 @item :prescript
13200 @itemx :postscript
13201 Script run before/after fetching mail.
13202 @end table
13203
13204 An example file mail source:
13205
13206 @lisp
13207 (file :path "/usr/spool/mail/user-name")
13208 @end lisp
13209
13210 Or using the default file name:
13211
13212 @lisp
13213 (file)
13214 @end lisp
13215
13216 If the mail spool file is not located on the local machine, it's best
13217 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13218 You can not use ange-ftp file names here---it has no way to lock the
13219 mail spool while moving the mail.
13220
13221 If it's impossible to set up a proper server, you can use ssh instead.
13222
13223 @lisp
13224 (setq mail-sources
13225       '((file :prescript "ssh host bin/getmail >%t")))
13226 @end lisp
13227
13228 The @samp{getmail} script would look something like the following:
13229
13230 @example
13231 #!/bin/sh
13232 #  getmail - move mail from spool to stdout
13233 #  flu@@iki.fi
13234
13235 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13236 TMP=$HOME/Mail/tmp
13237 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13238 @end example
13239
13240 Alter this script to fit find the @samp{movemail} you want to use.
13241
13242
13243 @item directory
13244 @vindex nnmail-scan-directory-mail-source-once
13245 Get mail from several files in a directory.  This is typically used
13246 when you have procmail split the incoming mail into several files.
13247 That is, there is a one-to-one correspondence between files in that
13248 directory and groups, so that mail from the file @file{foo.bar.spool}
13249 will be put in the group @code{foo.bar}.  (You can change the suffix
13250 to be used instead of @code{.spool}.)  Setting
13251 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13252 Gnus to scan the mail source only once.  This is particularly useful
13253 if you want to scan mail groups at a specified level.
13254
13255 @vindex nnmail-resplit-incoming
13256 There is also the variable @code{nnmail-resplit-incoming}, if you set
13257 that to a non-@code{nil} value, then the normal splitting process is
13258 applied to all the files from the directory, @ref{Splitting Mail}.
13259
13260 Keywords:
13261
13262 @table @code
13263 @item :path
13264 The name of the directory where the files are.  There is no default
13265 value.
13266
13267 @item :suffix
13268 Only files ending with this suffix are used.  The default is
13269 @samp{.spool}.
13270
13271 @item :predicate
13272 Only files that have this predicate return non-@code{nil} are returned.
13273 The default is @code{identity}.  This is used as an additional
13274 filter---only files that have the right suffix @emph{and} satisfy this
13275 predicate are considered.
13276
13277 @item :prescript
13278 @itemx :postscript
13279 Script run before/after fetching mail.
13280
13281 @end table
13282
13283 An example directory mail source:
13284
13285 @lisp
13286 (directory :path "/home/user-name/procmail-dir/"
13287            :suffix ".prcml")
13288 @end lisp
13289
13290 @item pop
13291 Get mail from a @acronym{POP} server.
13292
13293 Keywords:
13294
13295 @table @code
13296 @item :server
13297 The name of the @acronym{POP} server.  The default is taken from the
13298 @env{MAILHOST} environment variable.
13299
13300 @item :port
13301 The port number of the @acronym{POP} server.  This can be a number (eg,
13302 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13303 string, it should be a service name as listed in @file{/etc/services} on
13304 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13305 need to specify it as @samp{"pop-3"} instead.
13306
13307 @item :user
13308 The user name to give to the @acronym{POP} server.  The default is the login
13309 name.
13310
13311 @item :password
13312 The password to give to the @acronym{POP} server.  If not specified,
13313 the user is prompted.
13314
13315 @item :program
13316 The program to use to fetch mail from the @acronym{POP} server.  This
13317 should be a @code{format}-like string.  Here's an example:
13318
13319 @example
13320 fetchmail %u@@%s -P %p %t
13321 @end example
13322
13323 The valid format specifier characters are:
13324
13325 @table @samp
13326 @item t
13327 The name of the file the mail is to be moved to.  This must always be
13328 included in this string.
13329
13330 @item s
13331 The name of the server.
13332
13333 @item P
13334 The port number of the server.
13335
13336 @item u
13337 The user name to use.
13338
13339 @item p
13340 The password to use.
13341 @end table
13342
13343 The values used for these specs are taken from the values you give the
13344 corresponding keywords.
13345
13346 @item :prescript
13347 A script to be run before fetching the mail.  The syntax is the same as
13348 the @code{:program} keyword.  This can also be a function to be run.
13349
13350 @item :postscript
13351 A script to be run after fetching the mail.  The syntax is the same as
13352 the @code{:program} keyword.  This can also be a function to be run.
13353
13354 @item :function
13355 The function to use to fetch mail from the @acronym{POP} server.  The
13356 function is called with one parameter---the name of the file where the
13357 mail should be moved to.
13358
13359 @item :authentication
13360 This can be either the symbol @code{password} or the symbol @code{apop}
13361 and says what authentication scheme to use.  The default is
13362 @code{password}.
13363
13364 @end table
13365
13366 If the @code{:program} and @code{:function} keywords aren't specified,
13367 @code{pop3-movemail} will be used.
13368
13369 Here are some examples.  Fetch from the default @acronym{POP} server,
13370 using the default user name, and default fetcher:
13371
13372 @lisp
13373 (pop)
13374 @end lisp
13375
13376 Fetch from a named server with a named user and password:
13377
13378 @lisp
13379 (pop :server "my.pop.server"
13380      :user "user-name" :password "secret")
13381 @end lisp
13382
13383 Use @samp{movemail} to move the mail:
13384
13385 @lisp
13386 (pop :program "movemail po:%u %t %p")
13387 @end lisp
13388
13389 @item maildir
13390 Get mail from a maildir.  This is a type of mailbox that is supported by
13391 at least qmail and postfix, where each file in a special directory
13392 contains exactly one mail.
13393
13394 Keywords:
13395
13396 @table @code
13397 @item :path
13398 The name of the directory where the mails are stored.  The default is
13399 taken from the @env{MAILDIR} environment variable or
13400 @file{~/Maildir/}.
13401 @item :subdirs
13402 The subdirectories of the Maildir.  The default is
13403 @samp{("new" "cur")}.
13404
13405 @c If you sometimes look at your mail through a pop3 daemon before fetching
13406 @c them with Gnus, you may also have to fetch your mails from the
13407 @c @code{cur} directory inside the maildir, like in the first example
13408 @c below.
13409
13410 You can also get mails from remote hosts (because maildirs don't suffer
13411 from locking problems).
13412
13413 @end table
13414
13415 Two example maildir mail sources:
13416
13417 @lisp
13418 (maildir :path "/home/user-name/Maildir/"
13419          :subdirs ("cur" "new"))
13420 @end lisp
13421
13422 @lisp
13423 (maildir :path "/user@@remotehost.org:~/Maildir/"
13424          :subdirs ("new"))
13425 @end lisp
13426
13427 @item imap
13428 Get mail from a @acronym{IMAP} server.  If you don't want to use
13429 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13430 with nnimap), for some reason or other, Gnus let you treat it similar
13431 to a @acronym{POP} server and fetches articles from a given
13432 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13433
13434 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13435 may need external programs and libraries, @xref{IMAP}.
13436
13437 Keywords:
13438
13439 @table @code
13440 @item :server
13441 The name of the @acronym{IMAP} server.  The default is taken from the
13442 @env{MAILHOST} environment variable.
13443
13444 @item :port
13445 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13446 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13447
13448 @item :user
13449 The user name to give to the @acronym{IMAP} server.  The default is the login
13450 name.
13451
13452 @item :password
13453 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13454 prompted.
13455
13456 @item :stream
13457 What stream to use for connecting to the server, this is one of the
13458 symbols in @code{imap-stream-alist}.  Right now, this means
13459 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13460 @samp{ssl}, @samp{shell} or the default @samp{network}.
13461
13462 @item :authentication
13463 Which authenticator to use for authenticating to the server, this is
13464 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13465 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13466 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13467
13468 @item :program
13469 When using the `shell' :stream, the contents of this variable is
13470 mapped into the @code{imap-shell-program} variable.  This should be a
13471 @code{format}-like string (or list of strings).  Here's an example:
13472
13473 @example
13474 ssh %s imapd
13475 @end example
13476
13477 The valid format specifier characters are:
13478
13479 @table @samp
13480 @item s
13481 The name of the server.
13482
13483 @item l
13484 User name from @code{imap-default-user}.
13485
13486 @item p
13487 The port number of the server.
13488 @end table
13489
13490 The values used for these specs are taken from the values you give the
13491 corresponding keywords.
13492
13493 @item :mailbox
13494 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13495 which normally is the mailbox which receive incoming mail.
13496
13497 @item :predicate
13498 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13499 UNDELETED}, is probably the best choice for most people, but if you
13500 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13501 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13502 Then all articles in the mailbox is fetched, no matter what.  For a
13503 complete list of predicates, see RFC 2060 section 6.4.4.
13504
13505 @item :fetchflag
13506 How to flag fetched articles on the server, the default @samp{\Deleted}
13507 will mark them as deleted, an alternative would be @samp{\Seen} which
13508 would simply mark them as read.  These are the two most likely choices,
13509 but more flags are defined in RFC 2060 section 2.3.2.
13510
13511 @item :dontexpunge
13512 If non-@code{nil}, don't remove all articles marked as deleted in the
13513 mailbox after finishing the fetch.
13514
13515 @end table
13516
13517 An example @acronym{IMAP} mail source:
13518
13519 @lisp
13520 (imap :server "mail.mycorp.com"
13521       :stream kerberos4
13522       :fetchflag "\\Seen")
13523 @end lisp
13524
13525 @item webmail
13526 Get mail from a webmail server, such as @uref{www.hotmail.com},
13527 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13528 @uref{mail.yahoo.com}.
13529
13530 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13531 required for url "4.0pre.46".
13532
13533 WARNING: Mails may be lost.  NO WARRANTY.
13534
13535 Keywords:
13536
13537 @table @code
13538 @item :subtype
13539 The type of the webmail server.  The default is @code{hotmail}.  The
13540 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13541
13542 @item :user
13543 The user name to give to the webmail server.  The default is the login
13544 name.
13545
13546 @item :password
13547 The password to give to the webmail server.  If not specified, the user is
13548 prompted.
13549
13550 @item :dontexpunge
13551 If non-@code{nil}, only fetch unread articles and don't move them to
13552 trash folder after finishing the fetch.
13553
13554 @end table
13555
13556 An example webmail source:
13557
13558 @lisp
13559 (webmail :subtype 'hotmail
13560          :user "user-name"
13561          :password "secret")
13562 @end lisp
13563 @end table
13564
13565 @table @dfn
13566 @item Common Keywords
13567 Common keywords can be used in any type of mail source.
13568
13569 Keywords:
13570
13571 @table @code
13572 @item :plugged
13573 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13574 use directory source to get mail, you can specify it as in this
13575 example:
13576
13577 @lisp
13578 (setq mail-sources
13579       '((directory :path "/home/pavel/.Spool/"
13580                    :suffix ""
13581                    :plugged t)))
13582 @end lisp
13583
13584 Gnus will then fetch your mail even when you are unplugged.  This is
13585 useful when you use local mail and news.
13586
13587 @end table
13588 @end table
13589
13590 @subsubsection Function Interface
13591
13592 Some of the above keywords specify a Lisp function to be executed.
13593 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13594 the value of the keyword while the function is executing.  For example,
13595 consider the following mail-source setting:
13596
13597 @lisp
13598 (setq mail-sources '((pop :user "jrl"
13599                           :server "pophost" :function fetchfunc)))
13600 @end lisp
13601
13602 While the function @code{fetchfunc} is executing, the symbol @code{user}
13603 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13604 @code{"pophost"}.  The symbols @code{port}, @code{password},
13605 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13606 and @code{authentication} are also bound (to their default values).
13607
13608 See above for a list of keywords for each type of mail source.
13609
13610
13611 @node Mail Source Customization
13612 @subsubsection Mail Source Customization
13613
13614 The following is a list of variables that influence how the mail is
13615 fetched.  You would normally not need to set or change any of these
13616 variables.
13617
13618 @table @code
13619 @item mail-source-crash-box
13620 @vindex mail-source-crash-box
13621 File where mail will be stored while processing it.  The default is@*
13622 @file{~/.emacs-mail-crash-box}.
13623
13624 @item mail-source-delete-incoming
13625 @vindex mail-source-delete-incoming
13626 If non-@code{nil}, delete incoming files after handling them.  If
13627 @code{t}, delete the files immediately, if @code{nil}, never delete any
13628 files.  If a positive number, delete files older than number of days
13629 (This will only happen, when receiving new mail).  You may also set
13630 @code{mail-source-delete-incoming} to @code{nil} and call
13631 @code{mail-source-delete-old-incoming} from a hook or interactively.
13632
13633 @item mail-source-delete-old-incoming-confirm
13634 @vindex mail-source-delete-old-incoming-confirm
13635 If non-@code{nil}, ask for for confirmation before deleting old incoming
13636 files.  This variable only applies when
13637 @code{mail-source-delete-incoming} is a positive number.
13638
13639 @item mail-source-ignore-errors
13640 @vindex mail-source-ignore-errors
13641 If non-@code{nil}, ignore errors when reading mail from a mail source.
13642
13643 @item mail-source-directory
13644 @vindex mail-source-directory
13645 Directory where files (if any) will be stored.  The default is
13646 @file{~/Mail/}.  At present, the only thing this is used for is to say
13647 where the incoming files will be stored if the previous variable is
13648 @code{nil}.
13649
13650 @item mail-source-incoming-file-prefix
13651 @vindex mail-source-incoming-file-prefix
13652 Prefix for file name for storing incoming mail.  The default is
13653 @file{Incoming}, in which case files will end up with names like
13654 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13655 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13656
13657 @item mail-source-default-file-modes
13658 @vindex mail-source-default-file-modes
13659 All new mail files will get this file mode.  The default is 384.
13660
13661 @item mail-source-movemail-program
13662 @vindex mail-source-movemail-program
13663 If non-@code{nil}, name of program for fetching new mail.  If
13664 @code{nil}, @code{movemail} in @var{exec-directory}.
13665
13666 @end table
13667
13668
13669 @node Fetching Mail
13670 @subsubsection Fetching Mail
13671
13672 @vindex mail-sources
13673 @vindex nnmail-spool-file
13674 The way to actually tell Gnus where to get new mail from is to set
13675 @code{mail-sources} to a list of mail source specifiers
13676 (@pxref{Mail Source Specifiers}).
13677
13678 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13679 @code{nil}, the mail back ends will never attempt to fetch mail by
13680 themselves.
13681
13682 If you want to fetch mail both from your local spool as well as a
13683 @acronym{POP} mail server, you'd say something like:
13684
13685 @lisp
13686 (setq mail-sources
13687       '((file)
13688         (pop :server "pop3.mail.server"
13689              :password "secret")))
13690 @end lisp
13691
13692 Or, if you don't want to use any of the keyword defaults:
13693
13694 @lisp
13695 (setq mail-sources
13696       '((file :path "/var/spool/mail/user-name")
13697         (pop :server "pop3.mail.server"
13698              :user "user-name"
13699              :port "pop3"
13700              :password "secret")))
13701 @end lisp
13702
13703
13704 When you use a mail back end, Gnus will slurp all your mail from your
13705 inbox and plonk it down in your home directory.  Gnus doesn't move any
13706 mail if you're not using a mail back end---you have to do a lot of magic
13707 invocations first.  At the time when you have finished drawing the
13708 pentagram, lightened the candles, and sacrificed the goat, you really
13709 shouldn't be too surprised when Gnus moves your mail.
13710
13711
13712
13713 @node Mail Back End Variables
13714 @subsection Mail Back End Variables
13715
13716 These variables are (for the most part) pertinent to all the various
13717 mail back ends.
13718
13719 @table @code
13720 @vindex nnmail-read-incoming-hook
13721 @item nnmail-read-incoming-hook
13722 The mail back ends all call this hook after reading new mail.  You can
13723 use this hook to notify any mail watch programs, if you want to.
13724
13725 @vindex nnmail-split-hook
13726 @item nnmail-split-hook
13727 @findex gnus-article-decode-encoded-words
13728 @cindex RFC 1522 decoding
13729 @cindex RFC 2047 decoding
13730 Hook run in the buffer where the mail headers of each message is kept
13731 just before the splitting based on these headers is done.  The hook is
13732 free to modify the buffer contents in any way it sees fit---the buffer
13733 is discarded after the splitting has been done, and no changes performed
13734 in the buffer will show up in any files.
13735 @code{gnus-article-decode-encoded-words} is one likely function to add
13736 to this hook.
13737
13738 @vindex nnmail-pre-get-new-mail-hook
13739 @vindex nnmail-post-get-new-mail-hook
13740 @item nnmail-pre-get-new-mail-hook
13741 @itemx nnmail-post-get-new-mail-hook
13742 These are two useful hooks executed when treating new incoming
13743 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13744 starting to handle the new mail) and
13745 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13746 is done).  Here's and example of using these two hooks to change the
13747 default file modes the new mail files get:
13748
13749 @lisp
13750 (add-hook 'nnmail-pre-get-new-mail-hook
13751           (lambda () (set-default-file-modes 511)))
13752
13753 (add-hook 'nnmail-post-get-new-mail-hook
13754           (lambda () (set-default-file-modes 551)))
13755 @end lisp
13756
13757 @item nnmail-use-long-file-names
13758 @vindex nnmail-use-long-file-names
13759 If non-@code{nil}, the mail back ends will use long file and directory
13760 names.  Groups like @samp{mail.misc} will end up in directories
13761 (assuming use of @code{nnml} back end) or files (assuming use of
13762 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13763 the same group will end up in @file{mail/misc}.
13764
13765 @item nnmail-delete-file-function
13766 @vindex nnmail-delete-file-function
13767 @findex delete-file
13768 Function called to delete files.  It is @code{delete-file} by default.
13769
13770 @item nnmail-cache-accepted-message-ids
13771 @vindex nnmail-cache-accepted-message-ids
13772 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13773 the back end (via @code{Gcc}, for instance) into the mail duplication
13774 discovery cache.  The default is @code{nil}.
13775
13776 @item nnmail-cache-ignore-groups
13777 @vindex nnmail-cache-ignore-groups
13778 This can be a regular expression or a list of regular expressions.
13779 Group names that match any of the regular expressions will never be
13780 recorded in the @code{Message-ID} cache.
13781
13782 This can be useful, for example, when using Fancy Splitting
13783 (@pxref{Fancy Mail Splitting}) together with the function
13784 @code{nnmail-split-fancy-with-parent}.
13785
13786 @end table
13787
13788
13789 @node Fancy Mail Splitting
13790 @subsection Fancy Mail Splitting
13791 @cindex mail splitting
13792 @cindex fancy mail splitting
13793
13794 @vindex nnmail-split-fancy
13795 @findex nnmail-split-fancy
13796 If the rather simple, standard method for specifying how to split mail
13797 doesn't allow you to do what you want, you can set
13798 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13799 play with the @code{nnmail-split-fancy} variable.
13800
13801 Let's look at an example value of this variable first:
13802
13803 @lisp
13804 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13805 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13806 ;; @r{from real errors.}
13807 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13808                    "mail.misc"))
13809    ;; @r{Non-error messages are crossposted to all relevant}
13810    ;; @r{groups, but we don't crosspost between the group for the}
13811    ;; @r{(ding) list and the group for other (ding) related mail.}
13812    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13813          ("subject" "ding" "ding.misc"))
13814       ;; @r{Other mailing lists@dots{}}
13815       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13816       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13817       ;; @r{Both lists below have the same suffix, so prevent}
13818       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13819       ;; @r{the bugs- list, but allow cross-posting when the}
13820       ;; @r{message was really cross-posted.}
13821       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13822       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13823       ;; @r{People@dots{}}
13824       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13825    ;; @r{Unmatched mail goes to the catch all group.}
13826    "misc.misc")
13827 @end lisp
13828
13829 This variable has the format of a @dfn{split}.  A split is a (possibly)
13830 recursive structure where each split may contain other splits.  Here are
13831 the five possible split syntaxes:
13832
13833 @enumerate
13834
13835 @item
13836 @samp{group}: If the split is a string, that will be taken as a group
13837 name.  Normal regexp match expansion will be done.  See below for
13838 examples.
13839
13840 @item
13841 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13842 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13843 first element of which is a string, then store the message as
13844 specified by @var{split}, if header @var{field} (a regexp) contains
13845 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13846 matches some string after @var{field} and before the end of the
13847 matched @var{value}, the @var{split} is ignored.  If none of the
13848 @var{restrict} clauses match, @var{split} is processed.
13849
13850 @item
13851 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13852 element is @code{|} (vertical bar), then process each @var{split} until
13853 one of them matches.  A @var{split} is said to match if it will cause
13854 the mail message to be stored in one or more groups.
13855
13856 @item
13857 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13858 element is @code{&}, then process all @var{split}s in the list.
13859
13860 @item
13861 @code{junk}: If the split is the symbol @code{junk}, then don't save
13862 (i.e., delete) this message.  Use with extreme caution.
13863
13864 @item
13865 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13866 a list, and the first element is @code{:}, then the second element will
13867 be called as a function with @var{args} given as arguments.  The
13868 function should return a @var{split}.
13869
13870 @cindex body split
13871 For instance, the following function could be used to split based on the
13872 body of the messages:
13873
13874 @lisp
13875 (defun split-on-body ()
13876   (save-excursion
13877     (set-buffer " *nnmail incoming*")
13878     (goto-char (point-min))
13879     (when (re-search-forward "Some.*string" nil t)
13880       "string.group")))
13881 @end lisp
13882
13883 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13884 when the @code{:} function is run.
13885
13886 @item
13887 @code{(! @var{func} @var{split})}: If the split is a list, and the
13888 first element is @code{!}, then @var{split} will be processed, and
13889 @var{func} will be called as a function with the result of @var{split}
13890 as argument.  @var{func} should return a split.
13891
13892 @item
13893 @code{nil}: If the split is @code{nil}, it is ignored.
13894
13895 @end enumerate
13896
13897 In these splits, @var{field} must match a complete field name.
13898 @var{value} must match a complete word according to the fundamental mode
13899 syntax table.  You can use @code{.*} in the regexps to match partial
13900 field names or words.  In other words, all @var{value}'s are wrapped in
13901 @samp{\<} and @samp{\>} pairs.
13902
13903 @vindex nnmail-split-abbrev-alist
13904 @var{field} and @var{value} can also be Lisp symbols, in that case they
13905 are expanded as specified by the variable
13906 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13907 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13908 value.
13909
13910 @vindex nnmail-split-fancy-syntax-table
13911 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13912 when all this splitting is performed.
13913
13914 If you want to have Gnus create groups dynamically based on some
13915 information in the headers (i.e., do @code{replace-match}-like
13916 substitutions in the group names), you can say things like:
13917
13918 @example
13919 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13920 @end example
13921
13922 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13923 will be filed in @samp{mail.debian.foo}.
13924
13925 If the string contains the element @samp{\&}, then the previously
13926 matched string will be substituted.  Similarly, the elements @samp{\\1}
13927 up to @samp{\\9} will be substituted with the text matched by the
13928 groupings 1 through 9.
13929
13930 @findex nnmail-split-fancy-with-parent
13931 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13932 split followups into the same groups their parents are in.  Sometimes
13933 you can't make splitting rules for all your mail.  For example, your
13934 boss might send you personal mail regarding different projects you are
13935 working on, and as you can't tell your boss to put a distinguishing
13936 string into the subject line, you have to resort to manually moving the
13937 messages into the right group.  With this function, you only have to do
13938 it once per thread.
13939
13940 To use this feature, you have to set @code{nnmail-treat-duplicates}
13941 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13942 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13943 using the colon feature, like so:
13944 @lisp
13945 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13946       nnmail-cache-accepted-message-ids t
13947       nnmail-split-fancy
13948       '(| (: nnmail-split-fancy-with-parent)
13949           ;; @r{other splits go here}
13950         ))
13951 @end lisp
13952
13953 This feature works as follows: when @code{nnmail-treat-duplicates} is
13954 non-@code{nil}, Gnus records the message id of every message it sees
13955 in the file specified by the variable
13956 @code{nnmail-message-id-cache-file}, together with the group it is in
13957 (the group is omitted for non-mail messages).  When mail splitting is
13958 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13959 at the References (and In-Reply-To) header of each message to split
13960 and searches the file specified by @code{nnmail-message-id-cache-file}
13961 for the message ids.  When it has found a parent, it returns the
13962 corresponding group name unless the group name matches the regexp
13963 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13964 recommended that you set @code{nnmail-message-id-cache-length} to a
13965 somewhat higher number than the default so that the message ids are
13966 still in the cache.  (A value of 5000 appears to create a file some
13967 300 kBytes in size.)
13968 @vindex nnmail-cache-accepted-message-ids
13969 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13970 also records the message ids of moved articles, so that the followup
13971 messages goes into the new group.
13972
13973 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13974 want certain groups to be recorded in the cache.  For example, if all
13975 outgoing messages are written to an `outgoing' group, you could set
13976 @code{nnmail-cache-ignore-groups} to match that group name.
13977 Otherwise, answers to all your messages would end up in the
13978 `outgoing' group.
13979
13980
13981 @node Group Mail Splitting
13982 @subsection Group Mail Splitting
13983 @cindex mail splitting
13984 @cindex group mail splitting
13985
13986 @findex gnus-group-split
13987 If you subscribe to dozens of mailing lists but you don't want to
13988 maintain mail splitting rules manually, group mail splitting is for you.
13989 You just have to set @var{to-list} and/or @var{to-address} in group
13990 parameters or group customization and set @code{nnmail-split-methods} to
13991 @code{gnus-group-split}.  This splitting function will scan all groups
13992 for those parameters and split mail accordingly, i.e., messages posted
13993 from or to the addresses specified in the parameters @var{to-list} or
13994 @var{to-address} of a mail group will be stored in that group.
13995
13996 Sometimes, mailing lists have multiple addresses, and you may want mail
13997 splitting to recognize them all: just set the @var{extra-aliases} group
13998 parameter to the list of additional addresses and it's done.  If you'd
13999 rather use a regular expression, set @var{split-regexp}.
14000
14001 All these parameters in a group will be used to create an
14002 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14003 the @var{value} is a single regular expression that matches
14004 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14005 matches of @var{split-regexp}, and the @var{split} is the name of the
14006 group.  @var{restrict}s are also supported: just set the
14007 @var{split-exclude} parameter to a list of regular expressions.
14008
14009 If you can't get the right split to be generated using all these
14010 parameters, or you just need something fancier, you can set the
14011 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14012 this case, all other aforementioned parameters will be ignored by
14013 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14014 @code{nil}, in which case the group will be ignored by
14015 @code{gnus-group-split}.
14016
14017 @vindex gnus-group-split-default-catch-all-group
14018 @code{gnus-group-split} will do cross-posting on all groups that match,
14019 by defining a single @code{&} fancy split containing one split for each
14020 group.  If a message doesn't match any split, it will be stored in the
14021 group named in @code{gnus-group-split-default-catch-all-group}, unless
14022 some group has @var{split-spec} set to @code{catch-all}, in which case
14023 that group is used as the catch-all group.  Even though this variable is
14024 often used just to name a group, it may also be set to an arbitrarily
14025 complex fancy split (after all, a group name is a fancy split), and this
14026 may be useful to split mail that doesn't go to any mailing list to
14027 personal mail folders.  Note that this fancy split is added as the last
14028 element of a @code{|} split list that also contains a @code{&} split
14029 with the rules extracted from group parameters.
14030
14031 It's time for an example.  Assume the following group parameters have
14032 been defined:
14033
14034 @example
14035 nnml:mail.bar:
14036 ((to-address . "bar@@femail.com")
14037  (split-regexp . ".*@@femail\\.com"))
14038 nnml:mail.foo:
14039 ((to-list . "foo@@nowhere.gov")
14040  (extra-aliases "foo@@localhost" "foo-redist@@home")
14041  (split-exclude "bugs-foo" "rambling-foo")
14042  (admin-address . "foo-request@@nowhere.gov"))
14043 nnml:mail.others:
14044 ((split-spec . catch-all))
14045 @end example
14046
14047 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14048 behave as if @code{nnmail-split-fancy} had been selected and variable
14049 @code{nnmail-split-fancy} had been set as follows:
14050
14051 @lisp
14052 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14053       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14054            - "bugs-foo" - "rambling-foo" "mail.foo"))
14055    "mail.others")
14056 @end lisp
14057
14058 @findex gnus-group-split-fancy
14059 If you'd rather not use group splitting for all your mail groups, you
14060 may use it for only some of them, by using @code{nnmail-split-fancy}
14061 splits like this:
14062
14063 @lisp
14064 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14065 @end lisp
14066
14067 @var{groups} may be a regular expression or a list of group names whose
14068 parameters will be scanned to generate the output split.
14069 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14070 single @code{|} split will be output.  @var{catch-all} is the fall back
14071 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14072 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14073 empty string in any selected group, no catch-all split will be issued.
14074 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14075 this group will override the value of the @var{catch-all} argument.
14076
14077 @findex gnus-group-split-setup
14078 Unfortunately, scanning all groups and their parameters can be quite
14079 slow, especially considering that it has to be done for every message.
14080 But don't despair!  The function @code{gnus-group-split-setup} can be
14081 used to enable @code{gnus-group-split} in a much more efficient way.  It
14082 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14083 @code{nnmail-split-fancy} to the split produced by
14084 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14085 scanned once, no matter how many messages are split.
14086
14087 @findex gnus-group-split-update
14088 However, if you change group parameters, you'd have to update
14089 @code{nnmail-split-fancy} manually.  You can do it by running
14090 @code{gnus-group-split-update}.  If you'd rather have it updated
14091 automatically, just tell @code{gnus-group-split-setup} to do it for
14092 you.  For example, add to your @file{~/.gnus.el}:
14093
14094 @lisp
14095 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14096 @end lisp
14097
14098 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14099 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14100 have to worry about updating @code{nnmail-split-fancy} again.  If you
14101 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14102 @code{gnus-group-split-default-catch-all-group} will be set to its
14103 value.
14104
14105 @vindex gnus-group-split-updated-hook
14106 Because you may want to change @code{nnmail-split-fancy} after it is set
14107 by @code{gnus-group-split-update}, this function will run
14108 @code{gnus-group-split-updated-hook} just before finishing.
14109
14110 @node Incorporating Old Mail
14111 @subsection Incorporating Old Mail
14112 @cindex incorporating old mail
14113 @cindex import old mail
14114
14115 Most people have lots of old mail stored in various file formats.  If
14116 you have set up Gnus to read mail using one of the spiffy Gnus mail
14117 back ends, you'll probably wish to have that old mail incorporated into
14118 your mail groups.
14119
14120 Doing so can be quite easy.
14121
14122 To take an example: You're reading mail using @code{nnml}
14123 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14124 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14125 file filled with important, but old, mail.  You want to move it into
14126 your @code{nnml} groups.
14127
14128 Here's how:
14129
14130 @enumerate
14131 @item
14132 Go to the group buffer.
14133
14134 @item
14135 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14136 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14137
14138 @item
14139 Type @kbd{SPACE} to enter the newly created group.
14140
14141 @item
14142 Type @kbd{M P b} to process-mark all articles in this group's buffer
14143 (@pxref{Setting Process Marks}).
14144
14145 @item
14146 Type @kbd{B r} to respool all the process-marked articles, and answer
14147 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14148 @end enumerate
14149
14150 All the mail messages in the mbox file will now also be spread out over
14151 all your @code{nnml} groups.  Try entering them and check whether things
14152 have gone without a glitch.  If things look ok, you may consider
14153 deleting the mbox file, but I wouldn't do that unless I was absolutely
14154 sure that all the mail has ended up where it should be.
14155
14156 Respooling is also a handy thing to do if you're switching from one mail
14157 back end to another.  Just respool all the mail in the old mail groups
14158 using the new mail back end.
14159
14160
14161 @node Expiring Mail
14162 @subsection Expiring Mail
14163 @cindex article expiry
14164
14165 Traditional mail readers have a tendency to remove mail articles when
14166 you mark them as read, in some way.  Gnus takes a fundamentally
14167 different approach to mail reading.
14168
14169 Gnus basically considers mail just to be news that has been received in
14170 a rather peculiar manner.  It does not think that it has the power to
14171 actually change the mail, or delete any mail messages.  If you enter a
14172 mail group, and mark articles as ``read'', or kill them in some other
14173 fashion, the mail articles will still exist on the system.  I repeat:
14174 Gnus will not delete your old, read mail.  Unless you ask it to, of
14175 course.
14176
14177 To make Gnus get rid of your unwanted mail, you have to mark the
14178 articles as @dfn{expirable}.  (With the default key bindings, this means
14179 that you have to type @kbd{E}.)  This does not mean that the articles
14180 will disappear right away, however.  In general, a mail article will be
14181 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14182 more than one week old.  If you do not mark an article as expirable, it
14183 will remain on your system until hell freezes over.  This bears
14184 repeating one more time, with some spurious capitalizations: IF you do
14185 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14186
14187 You do not have to mark articles as expirable by hand.  Gnus provides
14188 two features, called `auto-expire' and `total-expire', that can help you
14189 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
14190 for you when you select an article.  And `total-expire' means that Gnus
14191 considers all articles as expirable that are read.  So, in addition to
14192 the articles marked @samp{E}, also the articles marked @samp{r},
14193 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14194 expirable.
14195
14196 When should either auto-expire or total-expire be used?  Most people
14197 who are subscribed to mailing lists split each list into its own group
14198 and then turn on auto-expire or total-expire for those groups.
14199 (@xref{Splitting Mail}, for more information on splitting each list
14200 into its own group.)
14201
14202 Which one is better, auto-expire or total-expire?  It's not easy to
14203 answer.  Generally speaking, auto-expire is probably faster.  Another
14204 advantage of auto-expire is that you get more marks to work with: for
14205 the articles that are supposed to stick around, you can still choose
14206 between tick and dormant and read marks.  But with total-expire, you
14207 only have dormant and ticked to choose from.  The advantage of
14208 total-expire is that it works well with adaptive scoring @pxref{Adaptive
14209 Scoring}.  Auto-expire works with normal scoring but not with adaptive
14210 scoring.
14211
14212 @vindex gnus-auto-expirable-newsgroups
14213 Groups that match the regular expression
14214 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14215 read marked as expirable automatically.  All articles marked as
14216 expirable have an @samp{E} in the first column in the summary buffer.
14217
14218 By default, if you have auto expiry switched on, Gnus will mark all the
14219 articles you read as expirable, no matter if they were read or unread
14220 before.  To avoid having articles marked as read marked as expirable
14221 automatically, you can put something like the following in your
14222 @file{~/.gnus.el} file:
14223
14224 @vindex gnus-mark-article-hook
14225 @lisp
14226 (remove-hook 'gnus-mark-article-hook
14227              'gnus-summary-mark-read-and-unread-as-read)
14228 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14229 @end lisp
14230
14231 Note that making a group auto-expirable doesn't mean that all read
14232 articles are expired---only the articles marked as expirable
14233 will be expired.  Also note that using the @kbd{d} command won't make
14234 articles expirable---only semi-automatic marking of articles as read will
14235 mark the articles as expirable in auto-expirable groups.
14236
14237 Let's say you subscribe to a couple of mailing lists, and you want the
14238 articles you have read to disappear after a while:
14239
14240 @lisp
14241 (setq gnus-auto-expirable-newsgroups
14242       "mail.nonsense-list\\|mail.nice-list")
14243 @end lisp
14244
14245 Another way to have auto-expiry happen is to have the element
14246 @code{auto-expire} in the group parameters of the group.
14247
14248 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14249 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14250 don't really mix very well.
14251
14252 @vindex nnmail-expiry-wait
14253 The @code{nnmail-expiry-wait} variable supplies the default time an
14254 expirable article has to live.  Gnus starts counting days from when the
14255 message @emph{arrived}, not from when it was sent.  The default is seven
14256 days.
14257
14258 Gnus also supplies a function that lets you fine-tune how long articles
14259 are to live, based on what group they are in.  Let's say you want to
14260 have one month expiry period in the @samp{mail.private} group, a one day
14261 expiry period in the @samp{mail.junk} group, and a six day expiry period
14262 everywhere else:
14263
14264 @vindex nnmail-expiry-wait-function
14265 @lisp
14266 (setq nnmail-expiry-wait-function
14267       (lambda (group)
14268        (cond ((string= group "mail.private")
14269                31)
14270              ((string= group "mail.junk")
14271                1)
14272              ((string= group "important")
14273                'never)
14274              (t
14275                6))))
14276 @end lisp
14277
14278 The group names this function is fed are ``unadorned'' group
14279 names---no @samp{nnml:} prefixes and the like.
14280
14281 The @code{nnmail-expiry-wait} variable and
14282 @code{nnmail-expiry-wait-function} function can either be a number (not
14283 necessarily an integer) or one of the symbols @code{immediate} or
14284 @code{never}.
14285
14286 You can also use the @code{expiry-wait} group parameter to selectively
14287 change the expiry period (@pxref{Group Parameters}).
14288
14289 @vindex nnmail-expiry-target
14290 The normal action taken when expiring articles is to delete them.
14291 However, in some circumstances it might make more sense to move them
14292 to other groups instead of deleting them.  The variable
14293 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14294 parameter) controls this.  The variable supplies a default value for
14295 all groups, which can be overridden for specific groups by the group
14296 parameter.  default value is @code{delete}, but this can also be a
14297 string (which should be the name of the group the message should be
14298 moved to), or a function (which will be called in a buffer narrowed to
14299 the message in question, and with the name of the group being moved
14300 from as its parameter) which should return a target---either a group
14301 name or @code{delete}.
14302
14303 Here's an example for specifying a group name:
14304 @lisp
14305 (setq nnmail-expiry-target "nnml:expired")
14306 @end lisp
14307
14308 @findex nnmail-fancy-expiry-target
14309 @vindex nnmail-fancy-expiry-targets
14310 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14311 expire mail to groups according to the variable
14312 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14313
14314 @lisp
14315  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14316        nnmail-fancy-expiry-targets
14317        '((to-from "boss" "nnfolder:Work")
14318          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14319          ("from" ".*" "nnfolder:Archive-%Y")))
14320 @end lisp
14321
14322 With this setup, any mail that has @code{IMPORTANT} in its Subject
14323 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14324 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
14325 From or To header contains the string @code{boss}, it will get expired
14326 to @code{nnfolder:Work}. All other mail will get expired to
14327 @code{nnfolder:Archive-YYYY}.
14328
14329 @vindex nnmail-keep-last-article
14330 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14331 expire the final article in a mail newsgroup.  This is to make life
14332 easier for procmail users.
14333
14334 @vindex gnus-total-expirable-newsgroups
14335 By the way: That line up there, about Gnus never expiring non-expirable
14336 articles, is a lie.  If you put @code{total-expire} in the group
14337 parameters, articles will not be marked as expirable, but all read
14338 articles will be put through the expiry process.  Use with extreme
14339 caution.  Even more dangerous is the
14340 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14341 this regexp will have all read articles put through the expiry process,
14342 which means that @emph{all} old mail articles in the groups in question
14343 will be deleted after a while.  Use with extreme caution, and don't come
14344 crying to me when you discover that the regexp you used matched the
14345 wrong group and all your important mail has disappeared.  Be a
14346 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14347 with!  So there!
14348
14349 Most people make most of their mail groups total-expirable, though.
14350
14351 @vindex gnus-inhibit-user-auto-expire
14352 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14353 commands will not mark an article as expirable, even if the group has
14354 auto-expire turned on.
14355
14356
14357 @node Washing Mail
14358 @subsection Washing Mail
14359 @cindex mail washing
14360 @cindex list server brain damage
14361 @cindex incoming mail treatment
14362
14363 Mailers and list servers are notorious for doing all sorts of really,
14364 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14365 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14366 end of all lines passing through our server, so let's do that!!!!1!''
14367 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14368 considered to be self-evident were not discussed.  So.  Here we are.
14369
14370 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14371 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14372 be shocked and dismayed by this, but I haven't got the energy.  It is to
14373 laugh.
14374
14375 Gnus provides a plethora of functions for washing articles while
14376 displaying them, but it might be nicer to do the filtering before
14377 storing the mail to disk.  For that purpose, we have three hooks and
14378 various functions that can be put in these hooks.
14379
14380 @table @code
14381 @item nnmail-prepare-incoming-hook
14382 @vindex nnmail-prepare-incoming-hook
14383 This hook is called before doing anything with the mail and is meant for
14384 grand, sweeping gestures.  It is called in a buffer that contains all
14385 the new, incoming mail.  Functions to be used include:
14386
14387 @table @code
14388 @item nnheader-ms-strip-cr
14389 @findex nnheader-ms-strip-cr
14390 Remove trailing carriage returns from each line.  This is default on
14391 Emacs running on MS machines.
14392
14393 @end table
14394
14395 @item nnmail-prepare-incoming-header-hook
14396 @vindex nnmail-prepare-incoming-header-hook
14397 This hook is called narrowed to each header.  It can be used when
14398 cleaning up the headers.  Functions that can be used include:
14399
14400 @table @code
14401 @item nnmail-remove-leading-whitespace
14402 @findex nnmail-remove-leading-whitespace
14403 Clear leading white space that ``helpful'' listservs have added to the
14404 headers to make them look nice.  Aaah.
14405
14406 (Note that this function works on both the header on the body of all
14407 messages, so it is a potentially dangerous function to use (if a body
14408 of a message contains something that looks like a header line).  So
14409 rather than fix the bug, it is of course the right solution to make it
14410 into a feature by documenting it.)
14411
14412 @item nnmail-remove-list-identifiers
14413 @findex nnmail-remove-list-identifiers
14414 Some list servers add an identifier---for example, @samp{(idm)}---to the
14415 beginning of all @code{Subject} headers.  I'm sure that's nice for
14416 people who use stone age mail readers.  This function will remove
14417 strings that match the @code{nnmail-list-identifiers} regexp, which can
14418 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14419 @code{\\(..\\)}.
14420
14421 For instance, if you want to remove the @samp{(idm)} and the
14422 @samp{nagnagnag} identifiers:
14423
14424 @lisp
14425 (setq nnmail-list-identifiers
14426       '("(idm)" "nagnagnag"))
14427 @end lisp
14428
14429 This can also be done non-destructively with
14430 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14431
14432 @item nnmail-remove-tabs
14433 @findex nnmail-remove-tabs
14434 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14435
14436 @item nnmail-fix-eudora-headers
14437 @findex nnmail-fix-eudora-headers
14438 @cindex Eudora
14439 Eudora produces broken @code{References} headers, but OK
14440 @code{In-Reply-To} headers.  This function will get rid of the
14441 @code{References} headers.
14442
14443 @end table
14444
14445 @item nnmail-prepare-incoming-message-hook
14446 @vindex nnmail-prepare-incoming-message-hook
14447 This hook is called narrowed to each message.  Functions to be used
14448 include:
14449
14450 @table @code
14451 @item article-de-quoted-unreadable
14452 @findex article-de-quoted-unreadable
14453 Decode Quoted Readable encoding.
14454
14455 @end table
14456 @end table
14457
14458
14459 @node Duplicates
14460 @subsection Duplicates
14461
14462 @vindex nnmail-treat-duplicates
14463 @vindex nnmail-message-id-cache-length
14464 @vindex nnmail-message-id-cache-file
14465 @cindex duplicate mails
14466 If you are a member of a couple of mailing lists, you will sometimes
14467 receive two copies of the same mail.  This can be quite annoying, so
14468 @code{nnmail} checks for and treats any duplicates it might find.  To do
14469 this, it keeps a cache of old @code{Message-ID}s---
14470 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14471 default.  The approximate maximum number of @code{Message-ID}s stored
14472 there is controlled by the @code{nnmail-message-id-cache-length}
14473 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14474 stored.) If all this sounds scary to you, you can set
14475 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14476 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14477 will insert a warning into the head of the mail saying that it thinks
14478 that this is a duplicate of a different message.
14479
14480 This variable can also be a function.  If that's the case, the function
14481 will be called from a buffer narrowed to the message in question with
14482 the @code{Message-ID} as a parameter.  The function must return either
14483 @code{nil}, @code{warn}, or @code{delete}.
14484
14485 You can turn this feature off completely by setting the variable to
14486 @code{nil}.
14487
14488 If you want all the duplicate mails to be put into a special
14489 @dfn{duplicates} group, you could do that using the normal mail split
14490 methods:
14491
14492 @lisp
14493 (setq nnmail-split-fancy
14494       '(| ;; @r{Messages duplicates go to a separate group.}
14495         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14496         ;; @r{Message from daemons, postmaster, and the like to another.}
14497         (any mail "mail.misc")
14498         ;; @r{Other rules.}
14499         [...] ))
14500 @end lisp
14501 @noindent
14502 Or something like:
14503 @lisp
14504 (setq nnmail-split-methods
14505       '(("duplicates" "^Gnus-Warning:.*duplicate")
14506         ;; @r{Other rules.}
14507         [...]))
14508 @end lisp
14509
14510 Here's a neat feature: If you know that the recipient reads her mail
14511 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14512 @code{delete}, you can send her as many insults as you like, just by
14513 using a @code{Message-ID} of a mail that you know that she's already
14514 received.  Think of all the fun!  She'll never see any of it!  Whee!
14515
14516
14517 @node Not Reading Mail
14518 @subsection Not Reading Mail
14519
14520 If you start using any of the mail back ends, they have the annoying
14521 habit of assuming that you want to read mail with them.  This might not
14522 be unreasonable, but it might not be what you want.
14523
14524 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14525 @code{nil}, none of the back ends will ever attempt to read incoming
14526 mail, which should help.
14527
14528 @vindex nnbabyl-get-new-mail
14529 @vindex nnmbox-get-new-mail
14530 @vindex nnml-get-new-mail
14531 @vindex nnmh-get-new-mail
14532 @vindex nnfolder-get-new-mail
14533 This might be too much, if, for instance, you are reading mail quite
14534 happily with @code{nnml} and just want to peek at some old Rmail
14535 file you have stashed away with @code{nnbabyl}.  All back ends have
14536 variables called back-end-@code{get-new-mail}.  If you want to disable
14537 the @code{nnbabyl} mail reading, you edit the virtual server for the
14538 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14539
14540 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14541 narrowed to the article to be saved before saving it when reading
14542 incoming mail.
14543
14544
14545 @node Choosing a Mail Back End
14546 @subsection Choosing a Mail Back End
14547
14548 Gnus will read the mail spool when you activate a mail group.  The mail
14549 file is first copied to your home directory.  What happens after that
14550 depends on what format you want to store your mail in.
14551
14552 There are six different mail back ends in the standard Gnus, and more
14553 back ends are available separately.  The mail back end most people use
14554 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14555 Spool}).
14556
14557 @menu
14558 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14559 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14560 * Mail Spool::                  Store your mail in a private spool?
14561 * MH Spool::                    An mhspool-like back end.
14562 * Maildir::                     Another one-file-per-message format.
14563 * Mail Folders::                Having one file for each group.
14564 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14565 @end menu
14566
14567
14568 @node Unix Mail Box
14569 @subsubsection Unix Mail Box
14570 @cindex nnmbox
14571 @cindex unix mail box
14572
14573 @vindex nnmbox-active-file
14574 @vindex nnmbox-mbox-file
14575 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14576 mail.  @code{nnmbox} will add extra headers to each mail article to say
14577 which group it belongs in.
14578
14579 Virtual server settings:
14580
14581 @table @code
14582 @item nnmbox-mbox-file
14583 @vindex nnmbox-mbox-file
14584 The name of the mail box in the user's home directory.  Default is
14585 @file{~/mbox}.
14586
14587 @item nnmbox-active-file
14588 @vindex nnmbox-active-file
14589 The name of the active file for the mail box.  Default is
14590 @file{~/.mbox-active}.
14591
14592 @item nnmbox-get-new-mail
14593 @vindex nnmbox-get-new-mail
14594 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14595 into groups.  Default is @code{t}.
14596 @end table
14597
14598
14599 @node Rmail Babyl
14600 @subsubsection Rmail Babyl
14601 @cindex nnbabyl
14602 @cindex Rmail mbox
14603
14604 @vindex nnbabyl-active-file
14605 @vindex nnbabyl-mbox-file
14606 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14607 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14608 mail article to say which group it belongs in.
14609
14610 Virtual server settings:
14611
14612 @table @code
14613 @item nnbabyl-mbox-file
14614 @vindex nnbabyl-mbox-file
14615 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14616
14617 @item nnbabyl-active-file
14618 @vindex nnbabyl-active-file
14619 The name of the active file for the rmail box.  The default is
14620 @file{~/.rmail-active}
14621
14622 @item nnbabyl-get-new-mail
14623 @vindex nnbabyl-get-new-mail
14624 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14625 @code{t}
14626 @end table
14627
14628
14629 @node Mail Spool
14630 @subsubsection Mail Spool
14631 @cindex nnml
14632 @cindex mail @acronym{NOV} spool
14633
14634 The @dfn{nnml} spool mail format isn't compatible with any other known
14635 format.  It should be used with some caution.
14636
14637 @vindex nnml-directory
14638 If you use this back end, Gnus will split all incoming mail into files,
14639 one file for each mail, and put the articles into the corresponding
14640 directories under the directory specified by the @code{nnml-directory}
14641 variable.  The default value is @file{~/Mail/}.
14642
14643 You do not have to create any directories beforehand; Gnus will take
14644 care of all that.
14645
14646 If you have a strict limit as to how many files you are allowed to store
14647 in your account, you should not use this back end.  As each mail gets its
14648 own file, you might very well occupy thousands of inodes within a few
14649 weeks.  If this is no problem for you, and it isn't a problem for you
14650 having your friendly systems administrator walking around, madly,
14651 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14652 know that this is probably the fastest format to use.  You do not have
14653 to trudge through a big mbox file just to read your new mail.
14654
14655 @code{nnml} is probably the slowest back end when it comes to article
14656 splitting.  It has to create lots of files, and it also generates
14657 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14658 fastest back end when it comes to reading mail.
14659
14660 @cindex self contained nnml servers
14661 @cindex marks
14662 When the marks file is used (which it is by default), @code{nnml}
14663 servers have the property that you may backup them using @code{tar} or
14664 similar, and later be able to restore them into Gnus (by adding the
14665 proper @code{nnml} server) and have all your marks be preserved.  Marks
14666 for a group is usually stored in the @code{.marks} file (but see
14667 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14668 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14669 to restore the group (after restoring the backup into the nnml
14670 directory).
14671
14672 If for some reason you believe your @file{.marks} files are screwed
14673 up, you can just delete them all.  Gnus will then correctly regenerate
14674 them next time it starts.
14675
14676 Virtual server settings:
14677
14678 @table @code
14679 @item nnml-directory
14680 @vindex nnml-directory
14681 All @code{nnml} directories will be placed under this directory.  The
14682 default is the value of @code{message-directory} (whose default value
14683 is @file{~/Mail}).
14684
14685 @item nnml-active-file
14686 @vindex nnml-active-file
14687 The active file for the @code{nnml} server.  The default is
14688 @file{~/Mail/active}.
14689
14690 @item nnml-newsgroups-file
14691 @vindex nnml-newsgroups-file
14692 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14693 Format}.  The default is @file{~/Mail/newsgroups}.
14694
14695 @item nnml-get-new-mail
14696 @vindex nnml-get-new-mail
14697 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14698 @code{t}.
14699
14700 @item nnml-nov-is-evil
14701 @vindex nnml-nov-is-evil
14702 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14703 default is @code{nil}.
14704
14705 @item nnml-nov-file-name
14706 @vindex nnml-nov-file-name
14707 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14708
14709 @item nnml-prepare-save-mail-hook
14710 @vindex nnml-prepare-save-mail-hook
14711 Hook run narrowed to an article before saving.
14712
14713 @item nnml-marks-is-evil
14714 @vindex nnml-marks-is-evil
14715 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14716 default is @code{nil}.
14717
14718 @item nnml-marks-file-name
14719 @vindex nnml-marks-file-name
14720 The name of the @dfn{marks} files.  The default is @file{.marks}.
14721
14722 @item nnml-use-compressed-files
14723 @vindex nnml-use-compressed-files
14724 If non-@code{nil}, @code{nnml} will allow using compressed message
14725 files.
14726
14727 @end table
14728
14729 @findex nnml-generate-nov-databases
14730 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14731 you can do a complete update by typing @kbd{M-x
14732 nnml-generate-nov-databases}.  This command will trawl through the
14733 entire @code{nnml} hierarchy, looking at each and every article, so it
14734 might take a while to complete.  A better interface to this
14735 functionality can be found in the server buffer (@pxref{Server
14736 Commands}).
14737
14738
14739 @node MH Spool
14740 @subsubsection MH Spool
14741 @cindex nnmh
14742 @cindex mh-e mail spool
14743
14744 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14745 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14746 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14747 but it also makes it easier to write procmail scripts for.
14748
14749 Virtual server settings:
14750
14751 @table @code
14752 @item nnmh-directory
14753 @vindex nnmh-directory
14754 All @code{nnmh} directories will be located under this directory.  The
14755 default is the value of @code{message-directory} (whose default is
14756 @file{~/Mail})
14757
14758 @item nnmh-get-new-mail
14759 @vindex nnmh-get-new-mail
14760 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14761 @code{t}.
14762
14763 @item nnmh-be-safe
14764 @vindex nnmh-be-safe
14765 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14766 sure that the articles in the folder are actually what Gnus thinks they
14767 are.  It will check date stamps and stat everything in sight, so
14768 setting this to @code{t} will mean a serious slow-down.  If you never
14769 use anything but Gnus to read the @code{nnmh} articles, you do not have
14770 to set this variable to @code{t}.  The default is @code{nil}.
14771 @end table
14772
14773
14774 @node Maildir
14775 @subsubsection Maildir
14776 @cindex nnmaildir
14777 @cindex maildir
14778
14779 @code{nnmaildir} stores mail in the maildir format, with each maildir
14780 corresponding to a group in Gnus.  This format is documented here:
14781 @uref{http://cr.yp.to/proto/maildir.html} and here:
14782 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14783 stores extra information in the @file{.nnmaildir/} directory within a
14784 maildir.
14785
14786 Maildir format was designed to allow concurrent deliveries and
14787 reading, without needing locks.  With other back ends, you would have
14788 your mail delivered to a spool of some kind, and then you would
14789 configure Gnus to split mail from that spool into your groups.  You
14790 can still do that with nnmaildir, but the more common configuration is
14791 to have your mail delivered directly to the maildirs that appear as
14792 group in Gnus.
14793
14794 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14795 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14796 data in the filesystem.
14797
14798 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14799 can copy a whole maildir from one Gnus setup to another, and you will
14800 keep your marks.
14801
14802 Virtual server settings:
14803
14804 @table @code
14805 @item directory
14806 For each of your nnmaildir servers (it's very unlikely that you'd need
14807 more than one), you need to create a directory and populate it with
14808 maildirs or symlinks to maildirs (and nothing else; do not choose a
14809 directory already used for other purposes).  Each maildir will be
14810 represented in Gnus as a newsgroup on that server; the filename of the
14811 symlink will be the name of the group.  Any filenames in the directory
14812 starting with `.' are ignored.  The directory is scanned when you
14813 first start Gnus, and each time you type @kbd{g} in the group buffer;
14814 if any maildirs have been removed or added, nnmaildir notices at these
14815 times.
14816
14817 The value of the @code{directory} parameter should be a Lisp form
14818 which is processed by @code{eval} and @code{expand-file-name} to get
14819 the path of the directory for this server.  The form is @code{eval}ed
14820 only when the server is opened; the resulting string is used until the
14821 server is closed.  (If you don't know about forms and @code{eval},
14822 don't worry---a simple string will work.)  This parameter is not
14823 optional; you must specify it.  I don't recommend using
14824 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14825 use that directory by default for various things, and may get confused
14826 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14827
14828 @item target-prefix
14829 This should be a Lisp form which is processed by @code{eval} and
14830 @code{expand-file-name}.  The form is @code{eval}ed only when the
14831 server is opened; the resulting string is used until the server is
14832 closed.
14833
14834 When you create a group on an nnmaildir server, the maildir is created
14835 with @code{target-prefix} prepended to its name, and a symlink
14836 pointing to that maildir is created, named with the plain group name.
14837 So if @code{directory} is @code{"~/.nnmaildir"} and
14838 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14839 the group @code{foo}, nnmaildir will create
14840 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14841 @file{~/.nnmaildir/foo} as a symlink pointing to
14842 @file{../maildirs/foo}.
14843
14844 You can set @code{target-prefix} to a string without any slashes to
14845 create both maildirs and symlinks in the same @code{directory}; in
14846 this case, any maildirs found in @code{directory} whose names start
14847 with @code{target-prefix} will not be listed as groups (but the
14848 symlinks pointing to them will be).
14849
14850 As a special case, if @code{target-prefix} is @code{""} (the default),
14851 then when you create a group, the maildir will be created in
14852 @code{directory} without a corresponding symlink.  Beware that you
14853 cannot use @code{gnus-group-delete-group} on such groups without the
14854 @code{force} argument.
14855
14856 @item directory-files
14857 This should be a function with the same interface as
14858 @code{directory-files} (such as @code{directory-files} itself).  It is
14859 used to scan the server's @code{directory} for maildirs.  This
14860 parameter is optional; the default is
14861 @code{nnheader-directory-files-safe} if
14862 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14863 @code{directory-files} otherwise.
14864 (@code{nnheader-directory-files-is-safe} is checked only once when the
14865 server is opened; if you want to check it each time the directory is
14866 scanned, you'll have to provide your own function that does that.)
14867
14868 @item get-new-mail
14869 If non-@code{nil}, then after scanning for new mail in the group
14870 maildirs themselves as usual, this server will also incorporate mail
14871 the conventional Gnus way, from @code{mail-sources} according to
14872 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14873 value is @code{nil}.
14874
14875 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14876 an nnmaildir group.  The results might happen to be useful, but that
14877 would be by chance, not by design, and the results might be different
14878 in the future.  If your split rules create new groups, remember to
14879 supply a @code{create-directory} server parameter.
14880 @end table
14881
14882 @subsubsection Group parameters
14883
14884 nnmaildir uses several group parameters.  It's safe to ignore all
14885 this; the default behavior for nnmaildir is the same as the default
14886 behavior for other mail back ends: articles are deleted after one week,
14887 etc.  Except for the expiry parameters, all this functionality is
14888 unique to nnmaildir, so you can ignore it if you're just trying to
14889 duplicate the behavior you already have with another back end.
14890
14891 If the value of any of these parameters is a vector, the first element
14892 is evaluated as a Lisp form and the result is used, rather than the
14893 original value.  If the value is not a vector, the value itself is
14894 evaluated as a Lisp form.  (This is why these parameters use names
14895 different from those of other, similar parameters supported by other
14896 back ends: they have different, though similar, meanings.)  (For
14897 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14898 @code{eval} business again; for other values, remember to use an extra
14899 quote and wrap the value in a vector when appropriate.)
14900
14901 @table @code
14902 @item expire-age
14903 An integer specifying the minimum age, in seconds, of an article before
14904 it will be expired, or the symbol @code{never} to specify that
14905 articles should never be expired.  If this parameter is not set,
14906 nnmaildir falls back to the usual
14907 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14908 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14909 wanted a value of 3 days, you could use something like @code{[(* 3 24
14910 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14911 article's age is measured starting from the article file's
14912 modification time.  Normally, this is the same as the article's
14913 delivery time, but editing an article makes it younger.  Moving an
14914 article (other than via expiry) may also make an article younger.
14915
14916 @item expire-group
14917 If this is set to a string such as a full Gnus group name, like
14918 @example
14919 "backend+server.address.string:group.name"
14920 @end example
14921 and if it is not the name of the same group that the parameter belongs
14922 to, then articles will be moved to the specified group during expiry
14923 before being deleted.  @emph{If this is set to an nnmaildir group, the
14924 article will be just as old in the destination group as it was in the
14925 source group.}  So be careful with @code{expire-age} in the
14926 destination group.  If this is set to the name of the same group that
14927 the parameter belongs to, then the article is not expired at all.  If
14928 you use the vector form, the first element is evaluated once for each
14929 article.  So that form can refer to
14930 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14931 article.  @emph{If this parameter is not set, nnmaildir does not fall
14932 back to the @code{expiry-target} group parameter or the
14933 @code{nnmail-expiry-target} variable.}
14934
14935 @item read-only
14936 If this is set to @code{t}, nnmaildir will treat the articles in this
14937 maildir as read-only.  This means: articles are not renamed from
14938 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14939 not @file{cur/}; articles are never deleted; articles cannot be
14940 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14941 directory of another maildir---e.g., a system-wide mailbox containing
14942 a mailing list of common interest.  Everything in the maildir outside
14943 @file{new/} is @emph{not} treated as read-only, so for a shared
14944 mailbox, you do still need to set up your own maildir (or have write
14945 permission to the shared mailbox); your maildir just won't contain
14946 extra copies of the articles.
14947
14948 @item directory-files
14949 A function with the same interface as @code{directory-files}.  It is
14950 used to scan the directories in the maildir corresponding to this
14951 group to find articles.  The default is the function specified by the
14952 server's @code{directory-files} parameter.
14953
14954 @item distrust-Lines:
14955 If non-@code{nil}, nnmaildir will always count the lines of an
14956 article, rather than use the @code{Lines:} header field.  If
14957 @code{nil}, the header field will be used if present.
14958
14959 @item always-marks
14960 A list of mark symbols, such as
14961 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14962 article marks, nnmaildir will say that all articles have these
14963 marks, regardless of whether the marks stored in the filesystem
14964 say so.  This is a proof-of-concept feature that will probably be
14965 removed eventually; it ought to be done in Gnus proper, or
14966 abandoned if it's not worthwhile.
14967
14968 @item never-marks
14969 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14970 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14971 articles have these marks, regardless of whether the marks stored in
14972 the filesystem say so.  @code{never-marks} overrides
14973 @code{always-marks}.  This is a proof-of-concept feature that will
14974 probably be removed eventually; it ought to be done in Gnus proper, or
14975 abandoned if it's not worthwhile.
14976
14977 @item nov-cache-size
14978 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
14979 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
14980 articles in each group.  (This is probably not worthwhile, and will
14981 probably be removed in the future.)  This parameter's value is noticed
14982 only the first time a group is seen after the server is opened---i.e.,
14983 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
14984 until the server is closed and reopened.  The default is an estimate
14985 of the number of articles that would be displayed in the summary
14986 buffer: a count of articles that are either marked with @code{tick} or
14987 not marked with @code{read}, plus a little extra.
14988 @end table
14989
14990 @subsubsection Article identification
14991 Articles are stored in the @file{cur/} subdirectory of each maildir.
14992 Each article file is named like @code{uniq:info}, where @code{uniq}
14993 contains no colons.  nnmaildir ignores, but preserves, the
14994 @code{:info} part.  (Other maildir readers typically use this part of
14995 the filename to store marks.)  The @code{uniq} part uniquely
14996 identifies the article, and is used in various places in the
14997 @file{.nnmaildir/} subdirectory of the maildir to store information
14998 about the corresponding article.  The full pathname of an article is
14999 available in the variable @code{nnmaildir-article-file-name} after you
15000 request the article in the summary buffer.
15001
15002 @subsubsection NOV data
15003 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15004 generate lines in the summary buffer) stored in
15005 @code{.nnmaildir/nov/uniq}.  There is no
15006 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15007 need for it---an article's @acronym{NOV} data is updated automatically when the
15008 article or @code{nnmail-extra-headers} has changed.)  You can force
15009 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15010 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15011 cause nnmaildir to assign a new article number for this article, which
15012 may cause trouble with @code{seen} marks, the Agent, and the cache.
15013
15014 @subsubsection Article marks
15015 An article identified by @code{uniq} is considered to have the mark
15016 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15017 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15018 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15019 to store a new set of marks, nnmaildir creates and deletes the
15020 corresponding files as needed.  (Actually, rather than create a new
15021 file for each mark, it just creates hard links to
15022 @file{.nnmaildir/markfile}, to save inodes.)
15023
15024 You can invent new marks by creating a new directory in
15025 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15026 your server, untar it later, and keep your marks.  You can add and
15027 remove marks yourself by creating and deleting mark files.  If you do
15028 this while Gnus is running and your nnmaildir server is open, it's
15029 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15030 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15031 group buffer afterwards.  Otherwise, Gnus might not pick up the
15032 changes, and might undo them.
15033
15034
15035 @node Mail Folders
15036 @subsubsection Mail Folders
15037 @cindex nnfolder
15038 @cindex mbox folders
15039 @cindex mail folders
15040
15041 @code{nnfolder} is a back end for storing each mail group in a separate
15042 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15043 will add extra headers to keep track of article numbers and arrival
15044 dates.
15045
15046 @cindex self contained nnfolder servers
15047 @cindex marks
15048 When the marks file is used (which it is by default), @code{nnfolder}
15049 servers have the property that you may backup them using @code{tar} or
15050 similar, and later be able to restore them into Gnus (by adding the
15051 proper @code{nnfolder} server) and have all your marks be preserved.
15052 Marks for a group is usually stored in a file named as the mbox file
15053 with @code{.mrk} concatenated to it (but see
15054 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15055 Individual @code{nnfolder} groups are also possible to backup, use
15056 @kbd{G m} to restore the group (after restoring the backup into the
15057 @code{nnfolder} directory).
15058
15059 Virtual server settings:
15060
15061 @table @code
15062 @item nnfolder-directory
15063 @vindex nnfolder-directory
15064 All the @code{nnfolder} mail boxes will be stored under this directory.
15065 The default is the value of @code{message-directory} (whose default is
15066 @file{~/Mail})
15067
15068 @item nnfolder-active-file
15069 @vindex nnfolder-active-file
15070 The name of the active file.  The default is @file{~/Mail/active}.
15071
15072 @item nnfolder-newsgroups-file
15073 @vindex nnfolder-newsgroups-file
15074 The name of the group descriptions file.  @xref{Newsgroups File
15075 Format}.  The default is @file{~/Mail/newsgroups}
15076
15077 @item nnfolder-get-new-mail
15078 @vindex nnfolder-get-new-mail
15079 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15080 is @code{t}
15081
15082 @item nnfolder-save-buffer-hook
15083 @vindex nnfolder-save-buffer-hook
15084 @cindex backup files
15085 Hook run before saving the folders.  Note that Emacs does the normal
15086 backup renaming of files even with the @code{nnfolder} buffers.  If you
15087 wish to switch this off, you could say something like the following in
15088 your @file{.emacs} file:
15089
15090 @lisp
15091 (defun turn-off-backup ()
15092   (set (make-local-variable 'backup-inhibited) t))
15093
15094 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15095 @end lisp
15096
15097 @item nnfolder-delete-mail-hook
15098 @vindex nnfolder-delete-mail-hook
15099 Hook run in a buffer narrowed to the message that is to be deleted.
15100 This function can be used to copy the message to somewhere else, or to
15101 extract some information from it before removing it.
15102
15103 @item nnfolder-nov-is-evil
15104 @vindex nnfolder-nov-is-evil
15105 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15106 default is @code{nil}.
15107
15108 @item nnfolder-nov-file-suffix
15109 @vindex nnfolder-nov-file-suffix
15110 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15111
15112 @item nnfolder-nov-directory
15113 @vindex nnfolder-nov-directory
15114 The directory where the @acronym{NOV} files should be stored.  If
15115 @code{nil}, @code{nnfolder-directory} is used.
15116
15117 @item nnfolder-marks-is-evil
15118 @vindex nnfolder-marks-is-evil
15119 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15120 default is @code{nil}.
15121
15122 @item nnfolder-marks-file-suffix
15123 @vindex nnfolder-marks-file-suffix
15124 The extension for @sc{marks} files.  The default is @file{.mrk}.
15125
15126 @item nnfolder-marks-directory
15127 @vindex nnfolder-marks-directory
15128 The directory where the @sc{marks} files should be stored.  If
15129 @code{nil}, @code{nnfolder-directory} is used.
15130
15131 @end table
15132
15133
15134 @findex nnfolder-generate-active-file
15135 @kindex M-x nnfolder-generate-active-file
15136 If you have lots of @code{nnfolder}-like files you'd like to read with
15137 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15138 command to make @code{nnfolder} aware of all likely files in
15139 @code{nnfolder-directory}.  This only works if you use long file names,
15140 though.
15141
15142 @node Comparing Mail Back Ends
15143 @subsubsection Comparing Mail Back Ends
15144
15145 First, just for terminology, the @dfn{back end} is the common word for a
15146 low-level access method---a transport, if you will, by which something
15147 is acquired.  The sense is that one's mail has to come from somewhere,
15148 and so selection of a suitable back end is required in order to get that
15149 mail within spitting distance of Gnus.
15150
15151 The same concept exists for Usenet itself: Though access to articles is
15152 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15153 in the world got at Usenet by running a reader on the machine where the
15154 articles lay (the machine which today we call an @acronym{NNTP} server), and
15155 access was by the reader stepping into the articles' directory spool
15156 area directly.  One can still select between either the @code{nntp} or
15157 @code{nnspool} back ends, to select between these methods, if one happens
15158 actually to live on the server (or can see its spool directly, anyway,
15159 via NFS).
15160
15161 The goal in selecting a mail back end is to pick one which
15162 simultaneously represents a suitable way of dealing with the original
15163 format plus leaving mail in a form that is convenient to use in the
15164 future.  Here are some high and low points on each:
15165
15166 @table @code
15167 @item nnmbox
15168
15169 UNIX systems have historically had a single, very common, and well-
15170 defined format.  All messages arrive in a single @dfn{spool file}, and
15171 they are delineated by a line whose regular expression matches
15172 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15173 to make it clear in this instance that this is not the RFC-specified
15174 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15175 historically from the Unix environment, it is simplest if one does not
15176 mess a great deal with the original mailbox format, so if one chooses
15177 this back end, Gnus' primary activity in getting mail from the real spool
15178 area to Gnus' preferred directory is simply to copy it, with no
15179 (appreciable) format change in the process.  It is the ``dumbest'' way
15180 to move mail into availability in the Gnus environment.  This makes it
15181 fast to move into place, but slow to parse, when Gnus has to look at
15182 what's where.
15183
15184 @item nnbabyl
15185
15186 Once upon a time, there was the DEC-10 and DEC-20, running operating
15187 systems called TOPS and related things, and the usual (only?) mail
15188 reading environment was a thing called Babyl.  I don't know what format
15189 was used for mail landing on the system, but Babyl had its own internal
15190 format to which mail was converted, primarily involving creating a
15191 spool-file-like entity with a scheme for inserting Babyl-specific
15192 headers and status bits above the top of each message in the file.
15193 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15194 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15195 to understand the mail files folks already had in existence.  Gnus (and
15196 VM, for that matter) continue to support this format because it's
15197 perceived as having some good qualities in those mailer-specific
15198 headers/status bits stuff.  Rmail itself still exists as well, of
15199 course, and is still maintained by Stallman.
15200
15201 Both of the above forms leave your mail in a single file on your
15202 file system, and they must parse that entire file each time you take a
15203 look at your mail.
15204
15205 @item nnml
15206
15207 @code{nnml} is the back end which smells the most as though you were
15208 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15209 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15210 lo these years ago.)  One's mail is taken from the original spool file,
15211 and is then cut up into individual message files, 1:1.  It maintains a
15212 Usenet-style active file (analogous to what one finds in an INN- or
15213 CNews-based news system in (for instance) @file{/var/lib/news/active},
15214 or what is returned via the @samp{NNTP LIST} verb) and also creates
15215 @dfn{overview} files for efficient group entry, as has been defined for
15216 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15217 due to the creation of lots of files, updates to the @code{nnml} active
15218 file, and additions to overview files on a per-message basis, but it is
15219 extremely fast on access because of what amounts to the indexing support
15220 provided by the active file and overviews.
15221
15222 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15223 resource which defines available places in the file system to put new
15224 files.  Sysadmins take a dim view of heavy inode occupation within
15225 tight, shared file systems.  But if you live on a personal machine where
15226 the file system is your own and space is not at a premium, @code{nnml}
15227 wins big.
15228
15229 It is also problematic using this back end if you are living in a
15230 FAT16-based Windows world, since much space will be wasted on all these
15231 tiny files.
15232
15233 @item nnmh
15234
15235 The Rand MH mail-reading system has been around UNIX systems for a very
15236 long time; it operates by splitting one's spool file of messages into
15237 individual files, but with little or no indexing support---@code{nnmh}
15238 is considered to be semantically equivalent to ``@code{nnml} without
15239 active file or overviews''.  This is arguably the worst choice, because
15240 one gets the slowness of individual file creation married to the
15241 slowness of access parsing when learning what's new in one's groups.
15242
15243 @item nnfolder
15244
15245 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15246 method described above) on a per-group basis.  That is, @code{nnmbox}
15247 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15248 little bit of optimization to this so that each of one's mail groups has
15249 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15250 can be parsed separately, and still provides the simple Unix mail box
15251 format requiring minimal effort in moving the mail around.  In addition,
15252 it maintains an ``active'' file making it much faster for Gnus to figure
15253 out how many messages there are in each separate group.
15254
15255 If you have groups that are expected to have a massive amount of
15256 messages, @code{nnfolder} is not the best choice, but if you receive
15257 only a moderate amount of mail, @code{nnfolder} is probably the most
15258 friendly mail back end all over.
15259
15260 @item nnmaildir
15261
15262 For configuring expiry and other things, @code{nnmaildir} uses
15263 incompatible group parameters, slightly different from those of other
15264 mail back ends.
15265
15266 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15267 differences.  Each message is stored in a separate file, but the
15268 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15269 also stores the equivalent of @code{nnml}'s overview files in one file
15270 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15271 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15272 you down or takes up very much space, consider switching to 
15273 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15274 file system.
15275
15276 Since maildirs don't require locking for delivery, the maildirs you use
15277 as groups can also be the maildirs your mail is directly delivered to.
15278 This means you can skip Gnus's mail splitting if your mail is already
15279 organized into different mailboxes during delivery.  A @code{directory}
15280 entry in @code{mail-sources} would have a similar effect, but would
15281 require one set of mailboxes for spooling deliveries (in mbox format,
15282 thus damaging message bodies), and another set to be used as groups (in
15283 whatever format you like).  A maildir has a built-in spool, in the
15284 @code{new/} subdirectory.  Beware that currently, mail moved from
15285 @code{new/} to @code{cur/} instead of via mail splitting will not
15286 undergo treatment such as duplicate checking.
15287
15288 @code{nnmaildir} stores article marks for a given group in the
15289 corresponding maildir, in a way designed so that it's easy to manipulate
15290 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15291 else, and still have your marks.  @code{nnml} also stores marks, but
15292 it's not as easy to work with them from outside Gnus as with
15293 @code{nnmaildir}.
15294
15295 @code{nnmaildir} uses a significant amount of memory to speed things up.
15296 (It keeps in memory some of the things that @code{nnml} stores in files
15297 and that @code{nnmh} repeatedly parses out of message files.)  If this
15298 is a problem for you, you can set the @code{nov-cache-size} group
15299 parameter to something small (0 would probably not work, but 1 probably
15300 would) to make it use less memory.  This caching will probably be
15301 removed in the future.
15302
15303 Startup is likely to be slower with @code{nnmaildir} than with other
15304 back ends.  Everything else is likely to be faster, depending in part
15305 on your file system.
15306
15307 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15308 to write an @code{nnmaildir}-derived back end.
15309
15310 @end table
15311
15312
15313 @node Browsing the Web
15314 @section Browsing the Web
15315 @cindex web
15316 @cindex browsing the web
15317 @cindex www
15318 @cindex http
15319
15320 Web-based discussion forums are getting more and more popular.  On many
15321 subjects, the web-based forums have become the most important forums,
15322 eclipsing the importance of mailing lists and news groups.  The reason
15323 is easy to understand---they are friendly to new users; you just point
15324 and click, and there's the discussion.  With mailing lists, you have to
15325 go through a cumbersome subscription procedure, and most people don't
15326 even know what a news group is.
15327
15328 The problem with this scenario is that web browsers are not very good at
15329 being newsreaders.  They do not keep track of what articles you've read;
15330 they do not allow you to score on subjects you're interested in; they do
15331 not allow off-line browsing; they require you to click around and drive
15332 you mad in the end.
15333
15334 So---if web browsers suck at reading discussion forums, why not use Gnus
15335 to do it instead?
15336
15337 Gnus has been getting a bit of a collection of back ends for providing
15338 interfaces to these sources.
15339
15340 @menu
15341 * Archiving Mail::              
15342 * Web Searches::                Creating groups from articles that match a string.
15343 * Slashdot::                    Reading the Slashdot comments.
15344 * Ultimate::                    The Ultimate Bulletin Board systems.
15345 * Web Archive::                 Reading mailing list archived on web.
15346 * RSS::                         Reading RDF site summary.
15347 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15348 @end menu
15349
15350 All the web sources require Emacs/w3 and the url library to work.
15351
15352 The main caveat with all these web sources is that they probably won't
15353 work for a very long time.  Gleaning information from the @acronym{HTML} data
15354 is guesswork at best, and when the layout is altered, the Gnus back end
15355 will fail.  If you have reasonably new versions of these back ends,
15356 though, you should be ok.
15357
15358 One thing all these Web methods have in common is that the Web sources
15359 are often down, unavailable or just plain too slow to be fun.  In those
15360 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15361 Unplugged}) handle downloading articles, and then you can read them at
15362 leisure from your local disk.  No more World Wide Wait for you.
15363
15364 @node Archiving Mail
15365 @subsection Archiving Mail
15366 @cindex archiving mail
15367 @cindex backup of mail
15368
15369 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15370 @code{nnmaildir}, now actually store the article marks with each group.
15371 For these servers, archiving and restoring a group while preserving
15372 marks is fairly simple.
15373
15374 (Preserving the group level and group parameters as well still
15375 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15376 though.)
15377
15378 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15379 server, take a recursive copy of the server directory.  There is no need
15380 to shut down Gnus, so archiving may be invoked by @code{cron} or
15381 similar.  You restore the data by restoring the directory tree, and
15382 adding a server definition pointing to that directory in Gnus. The
15383 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15384 might interfere with overwriting data, so you may want to shut down Gnus
15385 before you restore the data.
15386
15387 It is also possible to archive individual @code{nnml},
15388 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15389 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15390 directory.  For @code{nnfolder} you need to copy both the base folder
15391 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15392 this example). Restoring the group is done with @kbd{G m} from the Group
15393 buffer.  The last step makes Gnus notice the new directory.
15394 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15395 is unnecessary in that case.
15396
15397 @node Web Searches
15398 @subsection Web Searches
15399 @cindex nnweb
15400 @cindex Google
15401 @cindex dejanews
15402 @cindex gmane
15403 @cindex Usenet searches
15404 @cindex searching the Usenet
15405
15406 It's, like, too neat to search the Usenet for articles that match a
15407 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15408 those, like, Web browsers, and you, like, have to, rilly, like, look at
15409 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15410 searches without having to use a browser.
15411
15412 The @code{nnweb} back end allows an easy interface to the mighty search
15413 engine.  You create an @code{nnweb} group, enter a search pattern, and
15414 then enter the group and read the articles like you would any normal
15415 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15416 Groups}) will do this in an easy-to-use fashion.
15417
15418 @code{nnweb} groups don't really lend themselves to being solid
15419 groups---they have a very fleeting idea of article numbers.  In fact,
15420 each time you enter an @code{nnweb} group (not even changing the search
15421 pattern), you are likely to get the articles ordered in a different
15422 manner.  Not even using duplicate suppression (@pxref{Duplicate
15423 Suppression}) will help, since @code{nnweb} doesn't even know the
15424 @code{Message-ID} of the articles before reading them using some search
15425 engines (Google, for instance).  The only possible way to keep track
15426 of which articles you've read is by scoring on the @code{Date}
15427 header---mark all articles posted before the last date you read the
15428 group as read.
15429
15430 If the search engine changes its output substantially, @code{nnweb}
15431 won't be able to parse it and will fail.  One could hardly fault the Web
15432 providers if they were to do this---their @emph{raison d'être} is to
15433 make money off of advertisements, not to provide services to the
15434 community.  Since @code{nnweb} washes the ads off all the articles, one
15435 might think that the providers might be somewhat miffed.  We'll see.
15436
15437 You must have the @code{url} and @code{w3} package installed to be able
15438 to use @code{nnweb}.
15439
15440 Virtual server variables:
15441
15442 @table @code
15443 @item nnweb-type
15444 @vindex nnweb-type
15445 What search engine type is being used.  The currently supported types
15446 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
15447 @code{dejanews} is an alias to @code{google}.
15448
15449 @item nnweb-search
15450 @vindex nnweb-search
15451 The search string to feed to the search engine.
15452
15453 @item nnweb-max-hits
15454 @vindex nnweb-max-hits
15455 Advisory maximum number of hits per search to display.  The default is
15456 999.
15457
15458 @item nnweb-type-definition
15459 @vindex nnweb-type-definition
15460 Type-to-definition alist.  This alist says what @code{nnweb} should do
15461 with the various search engine types.  The following elements must be
15462 present:
15463
15464 @table @code
15465 @item article
15466 Function to decode the article and provide something that Gnus
15467 understands.
15468
15469 @item map
15470 Function to create an article number to message header and URL alist.
15471
15472 @item search
15473 Function to send the search string to the search engine.
15474
15475 @item address
15476 The address the aforementioned function should send the search string
15477 to.
15478
15479 @item id
15480 Format string URL to fetch an article by @code{Message-ID}.
15481 @end table
15482
15483 @end table
15484
15485
15486 @node Slashdot
15487 @subsection Slashdot
15488 @cindex Slashdot
15489 @cindex nnslashdot
15490
15491 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15492 lively discussion following the news articles.  @code{nnslashdot} will
15493 let you read this forum in a convenient manner.
15494
15495 The easiest way to read this source is to put something like the
15496 following in your @file{~/.gnus.el} file:
15497
15498 @lisp
15499 (setq gnus-secondary-select-methods
15500       '((nnslashdot "")))
15501 @end lisp
15502
15503 This will make Gnus query the @code{nnslashdot} back end for new comments
15504 and groups.  The @kbd{F} command will subscribe each new news article as
15505 a new Gnus group, and you can read the comments by entering these
15506 groups.  (Note that the default subscription method is to subscribe new
15507 groups as zombies.  Other methods are available (@pxref{Subscription
15508 Methods}).
15509
15510 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15511 command is the most handy tool (@pxref{Foreign Groups}).
15512
15513 When following up to @code{nnslashdot} comments (or posting new
15514 comments), some light @acronym{HTML}izations will be performed.  In
15515 particular, text quoted with @samp{> } will be quoted with
15516 @code{blockquote} instead, and signatures will have @code{br} added to
15517 the end of each line.  Other than that, you can just write @acronym{HTML}
15518 directly into the message buffer.  Note that Slashdot filters out some
15519 @acronym{HTML} forms.
15520
15521 The following variables can be altered to change its behavior:
15522
15523 @table @code
15524 @item nnslashdot-threaded
15525 Whether @code{nnslashdot} should display threaded groups or not.  The
15526 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15527 has to retrieve absolutely all comments in a group upon entry.  If a
15528 threaded display is not required, @code{nnslashdot} will only retrieve
15529 the comments that are actually wanted by the user.  Threading is nicer,
15530 but much, much slower than unthreaded.
15531
15532 @item nnslashdot-login-name
15533 @vindex nnslashdot-login-name
15534 The login name to use when posting.
15535
15536 @item nnslashdot-password
15537 @vindex nnslashdot-password
15538 The password to use when posting.
15539
15540 @item nnslashdot-directory
15541 @vindex nnslashdot-directory
15542 Where @code{nnslashdot} will store its files.  The default is
15543 @file{~/News/slashdot/}.
15544
15545 @item nnslashdot-active-url
15546 @vindex nnslashdot-active-url
15547 The @sc{url} format string that will be used to fetch the information on
15548 news articles and comments.  The default is@*
15549 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15550
15551 @item nnslashdot-comments-url
15552 @vindex nnslashdot-comments-url
15553 The @sc{url} format string that will be used to fetch comments.  The
15554 default is
15555 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15556
15557 @item nnslashdot-article-url
15558 @vindex nnslashdot-article-url
15559 The @sc{url} format string that will be used to fetch the news article.  The
15560 default is
15561 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15562
15563 @item nnslashdot-threshold
15564 @vindex nnslashdot-threshold
15565 The score threshold.  The default is -1.
15566
15567 @item nnslashdot-group-number
15568 @vindex nnslashdot-group-number
15569 The number of old groups, in addition to the ten latest, to keep
15570 updated.  The default is 0.
15571
15572 @end table
15573
15574
15575
15576 @node Ultimate
15577 @subsection Ultimate
15578 @cindex nnultimate
15579 @cindex Ultimate Bulletin Board
15580
15581 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15582 probably the most popular Web bulletin board system used.  It has a
15583 quite regular and nice interface, and it's possible to get the
15584 information Gnus needs to keep groups updated.
15585
15586 The easiest way to get started with @code{nnultimate} is to say
15587 something like the following in the group buffer:  @kbd{B nnultimate RET
15588 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15589 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15590 you're interested in; there's quite a list of them on the Ultimate web
15591 site.)  Then subscribe to the groups you're interested in from the
15592 server buffer, and read them from the group buffer.
15593
15594 The following @code{nnultimate} variables can be altered:
15595
15596 @table @code
15597 @item nnultimate-directory
15598 @vindex nnultimate-directory
15599 The directory where @code{nnultimate} stores its files.  The default is@*
15600 @file{~/News/ultimate/}.
15601 @end table
15602
15603
15604 @node Web Archive
15605 @subsection Web Archive
15606 @cindex nnwarchive
15607 @cindex Web Archive
15608
15609 Some mailing lists only have archives on Web servers, such as
15610 @uref{http://www.egroups.com/} and
15611 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15612 interface, and it's possible to get the information Gnus needs to keep
15613 groups updated.
15614
15615 @findex gnus-group-make-warchive-group
15616 The easiest way to get started with @code{nnwarchive} is to say
15617 something like the following in the group buffer: @kbd{M-x
15618 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15619 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15620 @var{an_egroup} with the mailing list you subscribed, the
15621 @var{your@@email.address} with your email address.), or to browse the
15622 back end by @kbd{B nnwarchive RET mail-archive RET}.
15623
15624 The following @code{nnwarchive} variables can be altered:
15625
15626 @table @code
15627 @item nnwarchive-directory
15628 @vindex nnwarchive-directory
15629 The directory where @code{nnwarchive} stores its files.  The default is@*
15630 @file{~/News/warchive/}.
15631
15632 @item nnwarchive-login
15633 @vindex nnwarchive-login
15634 The account name on the web server.
15635
15636 @item nnwarchive-passwd
15637 @vindex nnwarchive-passwd
15638 The password for your account on the web server.
15639 @end table
15640
15641 @node RSS
15642 @subsection RSS
15643 @cindex nnrss
15644 @cindex RSS
15645
15646 Some sites have RDF site summary (RSS)
15647 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15648 interface, and it's possible to get the information Gnus needs to keep
15649 groups updated.
15650
15651 The easiest way to get started with @code{nnrss} is to say something
15652 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15653 subscribe groups.
15654
15655 The following @code{nnrss} variables can be altered:
15656
15657 @table @code
15658 @item nnrss-directory
15659 @vindex nnrss-directory
15660 The directory where @code{nnrss} stores its files.  The default is
15661 @file{~/News/rss/}.
15662
15663 @end table
15664
15665 The following code may be helpful, if you want to show the description in
15666 the summary buffer.
15667
15668 @lisp
15669 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15670 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15671
15672 (defun gnus-user-format-function-X (header)
15673   (let ((descr
15674          (assq nnrss-description-field (mail-header-extra header))))
15675     (if descr (concat "\n\t" (cdr descr)) "")))
15676 @end lisp
15677
15678 The following code may be useful to open an nnrss url directly from the
15679 summary buffer.
15680 @lisp
15681 (require 'browse-url)
15682
15683 (defun browse-nnrss-url( arg )
15684   (interactive "p")
15685   (let ((url (assq nnrss-url-field
15686                    (mail-header-extra
15687                     (gnus-data-header
15688                      (assq (gnus-summary-article-number)
15689                            gnus-newsgroup-data))))))
15690     (if url
15691         (progn
15692           (browse-url (cdr url))
15693           (gnus-summary-mark-as-read-forward 1))
15694       (gnus-summary-scroll-up arg))))
15695
15696 (eval-after-load "gnus"
15697   #'(define-key gnus-summary-mode-map
15698       (kbd "<RET>") 'browse-nnrss-url))
15699 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15700 @end lisp
15701
15702 @node Customizing w3
15703 @subsection Customizing w3
15704 @cindex w3
15705 @cindex html
15706 @cindex url
15707 @cindex Netscape
15708
15709 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15710 pages.  Emacs/w3 is documented in its own manual, but there are some
15711 things that may be more relevant for Gnus users.
15712
15713 For instance, a common question is how to make Emacs/w3 follow links
15714 using the @code{browse-url} functions (which will call some external web
15715 browser like Netscape).  Here's one way:
15716
15717 @lisp
15718 (eval-after-load "w3"
15719   '(progn
15720     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15721     (defun w3-fetch (&optional url target)
15722       (interactive (list (w3-read-url-with-default)))
15723       (if (eq major-mode 'gnus-article-mode)
15724           (browse-url url)
15725         (w3-fetch-orig url target)))))
15726 @end lisp
15727
15728 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15729 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15730 follow the link.
15731
15732
15733 @node IMAP
15734 @section IMAP
15735 @cindex nnimap
15736 @cindex @acronym{IMAP}
15737
15738 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15739 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15740 server is much similar to connecting to a news server, you just
15741 specify the network address of the server.
15742
15743 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15744 everything that @acronym{POP} can, it can hence be viewed as a
15745 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15746 similar to @acronym{NNTP} being a news storage protocol---however,
15747 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15748 is more or less read-only whereas mail is read-write.
15749
15750 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15751 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15752 the @acronym{IMAP} server and store them on the local disk.  This is
15753 not the usage described in this section---@xref{Mail Sources}.
15754
15755 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15756 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15757 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15758 usage explained in this section.
15759
15760 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} servers
15761 might look something like the following. (Note that for @acronym{TLS}/@acronym{SSL}, you
15762 need external programs and libraries, see below.)
15763
15764 @lisp
15765 (setq gnus-secondary-select-methods
15766       '((nnimap "simpleserver") ; @r{no special configuration}
15767         ; @r{perhaps a ssh port forwarded server:}
15768         (nnimap "dolk"
15769                 (nnimap-address "localhost")
15770                 (nnimap-server-port 1430))
15771         ; @r{a UW server running on localhost}
15772         (nnimap "barbar"
15773                 (nnimap-server-port 143)
15774                 (nnimap-address "localhost")
15775                 (nnimap-list-pattern ("INBOX" "mail/*")))
15776         ; @r{anonymous public cyrus server:}
15777         (nnimap "cyrus.andrew.cmu.edu"
15778                 (nnimap-authenticator anonymous)
15779                 (nnimap-list-pattern "archive.*")
15780                 (nnimap-stream network))
15781         ; @r{a ssl server on a non-standard port:}
15782         (nnimap "vic20"
15783                 (nnimap-address "vic20.somewhere.com")
15784                 (nnimap-server-port 9930)
15785                 (nnimap-stream ssl))))
15786 @end lisp
15787
15788 After defining the new server, you can subscribe to groups on the
15789 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15790 (@pxref{Subscription Commands}) or via the Server Buffer
15791 (@pxref{Server Buffer}).
15792
15793 The following variables can be used to create a virtual @code{nnimap}
15794 server:
15795
15796 @table @code
15797
15798 @item nnimap-address
15799 @vindex nnimap-address
15800
15801 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15802 server name if not specified.
15803
15804 @item nnimap-server-port
15805 @vindex nnimap-server-port
15806 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15807
15808 Note that this should be an integer, example server specification:
15809
15810 @lisp
15811 (nnimap "mail.server.com"
15812         (nnimap-server-port 4711))
15813 @end lisp
15814
15815 @item nnimap-list-pattern
15816 @vindex nnimap-list-pattern
15817 String or list of strings of mailboxes to limit available groups to.
15818 This is used when the server has very many mailboxes and you're only
15819 interested in a few---some servers export your home directory via
15820 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15821 @file{~/Mail/*} then.
15822
15823 The string can also be a cons of REFERENCE and the string as above, what
15824 REFERENCE is used for is server specific, but on the University of
15825 Washington server it's a directory that will be concatenated with the
15826 mailbox.
15827
15828 Example server specification:
15829
15830 @lisp
15831 (nnimap "mail.server.com"
15832         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15833                                ("~friend/Mail/" . "list/*"))))
15834 @end lisp
15835
15836 @item nnimap-stream
15837 @vindex nnimap-stream
15838 The type of stream used to connect to your server.  By default, nnimap
15839 will detect and automatically use all of the below, with the exception
15840 of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which
15841 can be automatically detected, but it's not widely deployed yet.)
15842
15843 Example server specification:
15844
15845 @lisp
15846 (nnimap "mail.server.com"
15847         (nnimap-stream ssl))
15848 @end lisp
15849
15850 Please note that the value of @code{nnimap-stream} is a symbol!
15851
15852 @itemize @bullet
15853 @item
15854 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15855 @samp{gsasl} or @samp{imtest} program.
15856 @item
15857 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15858 @item
15859 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15860 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15861 @samp{starttls}.
15862 @item
15863 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15864 @samp{gnutls-cli}).
15865 @item
15866 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15867 @samp{openssl}) or SSLeay (@samp{s_client}).
15868 @item
15869 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15870 @item
15871 @dfn{network:} Plain, TCP/IP network connection.
15872 @end itemize
15873
15874 @vindex imap-kerberos4-program
15875 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15876 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15877 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15878 to make @code{imap.el} use a pty instead of a pipe when communicating
15879 with @samp{imtest}.  You will then suffer from a line length
15880 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15881 indefinitely if you have many articles in a mailbox.  The variable
15882 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15883 program.
15884
15885 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15886 needed.  It is available from
15887 @uref{http://www.gnu.org/software/gnutls/}.
15888
15889 @vindex imap-gssapi-program
15890 This parameter specifies a list of command lines that invoke a GSSAPI
15891 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15892 sequentially until a connection is made, or the list has been
15893 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15894 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15895 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15896 tried.
15897
15898 @vindex imap-ssl-program
15899 For @acronym{SSL} connections, the OpenSSL program is available from
15900 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15901 and nnimap support it too---although the most recent versions of
15902 SSLeay, 0.9.x, are known to have serious bugs making it
15903 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15904 work. The variable @code{imap-ssl-program} contain parameters to pass
15905 to OpenSSL/SSLeay.
15906
15907 @vindex imap-shell-program
15908 @vindex imap-shell-host
15909 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15910 @code{imap-shell-program} specify what program to call.
15911
15912 @item nnimap-authenticator
15913 @vindex nnimap-authenticator
15914
15915 The authenticator used to connect to the server.  By default, nnimap
15916 will use the most secure authenticator your server is capable of.
15917
15918 Example server specification:
15919
15920 @lisp
15921 (nnimap "mail.server.com"
15922         (nnimap-authenticator anonymous))
15923 @end lisp
15924
15925 Please note that the value of @code{nnimap-authenticator} is a symbol!
15926
15927 @itemize @bullet
15928 @item
15929 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15930 external program @code{gsasl} or @code{imtest}.
15931 @item
15932 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15933 @code{imtest}.
15934 @item
15935 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15936 external library @code{digest-md5.el}.
15937 @item
15938 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15939 @item
15940 @dfn{login:} Plain-text username/password via LOGIN.
15941 @item
15942 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15943 @end itemize
15944
15945 @item nnimap-expunge-on-close
15946 @cindex expunging
15947 @vindex nnimap-expunge-on-close
15948 Unlike Parmenides the @acronym{IMAP} designers has decided that things that
15949 doesn't exist actually does exist.  More specifically, @acronym{IMAP} has
15950 this concept of marking articles @code{Deleted} which doesn't actually
15951 delete them, and this (marking them @code{Deleted}, that is) is what
15952 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15953 similar).
15954
15955 Since the articles aren't really removed when we mark them with the
15956 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15957 running in circles yet?
15958
15959 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15960 when closing a mailbox but this is now configurable by this server
15961 variable.
15962
15963 The possible options are:
15964
15965 @table @code
15966
15967 @item always
15968 The default behavior, delete all articles marked as ``Deleted'' when
15969 closing a mailbox.
15970 @item never
15971 Never actually delete articles.  Currently there is no way of showing
15972 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
15973 may allow you to do this.  If you ever want to run the EXPUNGE command
15974 manually, @xref{Expunging mailboxes}.
15975 @item ask
15976 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15977 articles or not.
15978
15979 @end table
15980
15981 @item nnimap-importantize-dormant
15982 @vindex nnimap-importantize-dormant
15983
15984 If non-@code{nil} (the default), marks dormant articles as ticked (as
15985 well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will
15986 naturally still (only) be marked as dormant.  This is to make dormant
15987 articles stand out, just like ticked articles, in other @acronym{IMAP}
15988 clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
15989 has only one.)
15990
15991 Probably the only reason for frobing this would be if you're trying
15992 enable per-user persistent dormant flags, using something like:
15993
15994 @lisp
15995 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15996         (format "gnus-dormant-%s" (user-login-name)))
15997 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15998         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15999 @end lisp
16000
16001 In this case, you would not want the per-user dormant flag showing up
16002 as ticked for other users.
16003
16004 @item nnimap-expunge-search-string
16005 @cindex expunging
16006 @vindex nnimap-expunge-search-string
16007
16008 This variable contain the @acronym{IMAP} search command sent to server when
16009 searching for articles eligible for expiring.  The default is
16010 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16011 UID set and the second @code{%s} is replaced by a date.
16012
16013 Probably the only useful value to change this to is
16014 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16015 messages instead of the internal article date. See section 6.4.4 of
16016 RFC 2060 for more information on valid strings.
16017
16018 @item nnimap-authinfo-file
16019 @vindex nnimap-authinfo-file
16020
16021 A file containing credentials used to log in on servers.  The format is
16022 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16023 variable @code{nntp-authinfo-file} for exact syntax; also see
16024 @ref{NNTP}.
16025
16026 @item nnimap-need-unselect-to-notice-new-mail
16027 @vindex nnimap-need-unselect-to-notice-new-mail
16028
16029 Unselect mailboxes before looking for new mail in them.  Some servers
16030 seem to need this under some circumstances; it was reported that
16031 Courier 1.7.1 did.
16032
16033 @end table
16034
16035 @menu
16036 * Splitting in IMAP::           Splitting mail with nnimap.
16037 * Expiring in IMAP::            Expiring mail with nnimap.
16038 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16039 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16040 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16041 @end menu
16042
16043
16044
16045 @node Splitting in IMAP
16046 @subsection Splitting in IMAP
16047 @cindex splitting imap mail
16048
16049 Splitting is something Gnus users has loved and used for years, and now
16050 the rest of the world is catching up.  Yeah, dream on, not many
16051 @acronym{IMAP} server has server side splitting and those that have splitting
16052 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16053 support for Gnus has to do it's own splitting.
16054
16055 And it does.
16056
16057 Here are the variables of interest:
16058
16059 @table @code
16060
16061 @item nnimap-split-crosspost
16062 @cindex splitting, crosspost
16063 @cindex crosspost
16064 @vindex nnimap-split-crosspost
16065
16066 If non-@code{nil}, do crossposting if several split methods match the
16067 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16068 found will be used.
16069
16070 Nnmail equivalent: @code{nnmail-crosspost}.
16071
16072 @item nnimap-split-inbox
16073 @cindex splitting, inbox
16074 @cindex inbox
16075 @vindex nnimap-split-inbox
16076
16077 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16078 mailboxes to split from.  Defaults to @code{nil}, which means that
16079 splitting is disabled!
16080
16081 @lisp
16082 (setq nnimap-split-inbox
16083       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16084 @end lisp
16085
16086 No nnmail equivalent.
16087
16088 @item nnimap-split-rule
16089 @cindex splitting, rules
16090 @vindex nnimap-split-rule
16091
16092 New mail found in @code{nnimap-split-inbox} will be split according to
16093 this variable.
16094
16095 This variable contains a list of lists, where the first element in the
16096 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16097 matching the regexp in the second element in the sublist.  Got that?
16098 Neither did I, we need examples.
16099
16100 @lisp
16101 (setq nnimap-split-rule
16102       '(("INBOX.nnimap"
16103          "^Sender: owner-nnimap@@vic20.globalcom.se")
16104         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16105         ("INBOX.private" "")))
16106 @end lisp
16107
16108 This will put all articles from the nnimap mailing list into mailbox
16109 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16110 into INBOX.junk and everything else in INBOX.private.
16111
16112 The first string may contain `\\1' forms, like the ones used by
16113 replace-match to insert sub-expressions from the matched text.  For
16114 instance:
16115
16116 @lisp
16117 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16118 @end lisp
16119
16120 The first element can also be the symbol @code{junk} to indicate that
16121 matching messages should simply be deleted.  Use with care.
16122
16123 The second element can also be a function.  In that case, it will be
16124 called with the first element of the rule as the argument, in a buffer
16125 containing the headers of the article.  It should return a
16126 non-@code{nil} value if it thinks that the mail belongs in that group.
16127
16128 Nnmail users might recollect that the last regexp had to be empty to
16129 match all articles (like in the example above).  This is not required in
16130 nnimap.  Articles not matching any of the regexps will not be moved out
16131 of your inbox.  (This might affect performance if you keep lots of
16132 unread articles in your inbox, since the splitting code would go over
16133 them every time you fetch new mail.)
16134
16135 These rules are processed from the beginning of the alist toward the
16136 end.  The first rule to make a match will ``win'', unless you have
16137 crossposting enabled.  In that case, all matching rules will ``win''.
16138
16139 This variable can also have a function as its value, the function will
16140 be called with the headers narrowed and should return a group where it
16141 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16142
16143 The splitting code tries to create mailboxes if it needs to.
16144
16145 To allow for different split rules on different virtual servers, and
16146 even different split rules in different inboxes on the same server,
16147 the syntax of this variable have been extended along the lines of:
16148
16149 @lisp
16150 (setq nnimap-split-rule
16151       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16152                                ("junk"    "From:.*Simon"))))
16153         ("my2server"    ("INBOX" nnimap-split-fancy))
16154         ("my[34]server" (".*" (("private" "To:.*Simon")
16155                                ("junk"    my-junk-func))))))
16156 @end lisp
16157
16158 The virtual server name is in fact a regexp, so that the same rules
16159 may apply to several servers.  In the example, the servers
16160 @code{my3server} and @code{my4server} both use the same rules.
16161 Similarly, the inbox string is also a regexp.  The actual splitting
16162 rules are as before, either a function, or a list with group/regexp or
16163 group/function elements.
16164
16165 Nnmail equivalent: @code{nnmail-split-methods}.
16166
16167 @item nnimap-split-predicate
16168 @cindex splitting
16169 @vindex nnimap-split-predicate
16170
16171 Mail matching this predicate in @code{nnimap-split-inbox} will be
16172 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16173
16174 This might be useful if you use another @acronym{IMAP} client to read mail in
16175 your inbox but would like Gnus to split all articles in the inbox
16176 regardless of readedness. Then you might change this to
16177 @samp{UNDELETED}.
16178
16179 @item nnimap-split-fancy
16180 @cindex splitting, fancy
16181 @findex nnimap-split-fancy
16182 @vindex nnimap-split-fancy
16183
16184 It's possible to set @code{nnimap-split-rule} to
16185 @code{nnmail-split-fancy} if you want to use fancy
16186 splitting. @xref{Fancy Mail Splitting}.
16187
16188 However, to be able to have different fancy split rules for nnmail and
16189 nnimap back ends you can set @code{nnimap-split-rule} to
16190 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16191 rule in @code{nnimap-split-fancy}.
16192
16193 Example:
16194
16195 @lisp
16196 (setq nnimap-split-rule 'nnimap-split-fancy
16197       nnimap-split-fancy ...)
16198 @end lisp
16199
16200 Nnmail equivalent: @code{nnmail-split-fancy}.
16201
16202 @item nnimap-split-download-body
16203 @findex nnimap-split-download-body
16204 @vindex nnimap-split-download-body
16205
16206 Set to non-@code{nil} to download entire articles during splitting.
16207 This is generally not required, and will slow things down
16208 considerably.  You may need it if you want to use an advanced
16209 splitting function that analyses the body to split the article.
16210
16211 @end table
16212
16213 @node Expiring in IMAP
16214 @subsection Expiring in IMAP
16215 @cindex expiring imap mail
16216
16217 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16218 end, it supports most features in regular expiring (@pxref{Expiring
16219 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16220 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16221 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16222 follows below are the variables used by the @code{nnimap} expiry
16223 process.
16224
16225 A note on how the expire mark is stored on the @acronym{IMAP} server is
16226 appropriate here as well.  The expire mark is translated into a
16227 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16228 message.  This means that likely only Gnus will understand and treat
16229 the @code{gnus-expire} mark properly, although other clients may allow
16230 you to view client specific flags on the message.  It also means that
16231 your server must support permanent storage of client specific flags on
16232 messages.  Most do, fortunately.
16233
16234 @table @code
16235
16236 @item nnmail-expiry-wait
16237 @item nnmail-expiry-wait-function
16238
16239 These variables are fully supported.  The expire value can be a
16240 number, the symbol @code{immediate} or @code{never}.
16241
16242 @item nnmail-expiry-target
16243
16244 This variable is supported, and internally implemented by calling the
16245 @code{nnmail} functions that handle this.  It contains an optimization
16246 that if the destination is a @acronym{IMAP} group on the same server, the
16247 article is copied instead of appended (that is, uploaded again).
16248
16249 @end table
16250
16251 @node Editing IMAP ACLs
16252 @subsection Editing IMAP ACLs
16253 @cindex editing imap acls
16254 @cindex Access Control Lists
16255 @cindex Editing @acronym{IMAP} ACLs
16256 @kindex G l
16257 @findex gnus-group-nnimap-edit-acl
16258
16259 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16260 limiting (or enabling) other users access to your mail boxes.  Not all
16261 @acronym{IMAP} servers support this, this function will give an error if it
16262 doesn't.
16263
16264 To edit a ACL for a mailbox, type @kbd{G l}
16265 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
16266 editing window with detailed instructions.
16267
16268 Some possible uses:
16269
16270 @itemize @bullet
16271 @item
16272 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16273 on your mailing list mailboxes enables other users on the same server to
16274 follow the list without subscribing to it.
16275 @item
16276 At least with the Cyrus server, you are required to give the user
16277 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16278 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16279 INBOX.mailbox).
16280 @end itemize
16281
16282 @node Expunging mailboxes
16283 @subsection Expunging mailboxes
16284 @cindex expunging
16285
16286 @cindex expunge
16287 @cindex manual expunging
16288 @kindex G x
16289 @findex gnus-group-nnimap-expunge
16290
16291 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16292 you may want the option of expunging all deleted articles in a mailbox
16293 manually.  This is exactly what @kbd{G x} does.
16294
16295 Currently there is no way of showing deleted articles, you can just
16296 delete them.
16297
16298 @node A note on namespaces
16299 @subsection A note on namespaces
16300 @cindex IMAP namespace
16301 @cindex namespaces
16302
16303 The @acronym{IMAP} protocol has a concept called namespaces, described
16304 by the following text in the RFC:
16305
16306 @display
16307 5.1.2.  Mailbox Namespace Naming Convention
16308
16309    By convention, the first hierarchical element of any mailbox name
16310    which begins with "#" identifies the "namespace" of the remainder of
16311    the name.  This makes it possible to disambiguate between different
16312    types of mailbox stores, each of which have their own namespaces.
16313
16314       For example, implementations which offer access to USENET
16315       newsgroups MAY use the "#news" namespace to partition the USENET
16316       newsgroup namespace from that of other mailboxes.  Thus, the
16317       comp.mail.misc newsgroup would have an mailbox name of
16318       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16319       to a different object (e.g. a user's private mailbox).
16320 @end display
16321
16322 While there is nothing in this text that warrants concern for the
16323 @acronym{IMAP} implementation in Gnus, some servers use namespace
16324 prefixes in a way that does not work with how Gnus uses mailbox names.
16325
16326 Specifically, University of Washington's @acronym{IMAP} server uses
16327 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16328 in the @sc{create} and @sc{append} commands.  After the mailbox is
16329 created (or a messages is appended to a mailbox), it must be accessed
16330 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16331 not make it possible for the user to guarantee that user entered
16332 mailbox names will only be used with the CREATE and APPEND commands,
16333 you should simply not use the namespace prefixed mailbox names in
16334 Gnus.
16335
16336 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16337 for more information on how to use the prefixes.  They are a power
16338 tool and should be used only if you are sure what the effects are.
16339
16340 @node Other Sources
16341 @section Other Sources
16342
16343 Gnus can do more than just read news or mail.  The methods described
16344 below allow Gnus to view directories and files as if they were
16345 newsgroups.
16346
16347 @menu
16348 * Directory Groups::            You can read a directory as if it was a newsgroup.
16349 * Anything Groups::             Dired?  Who needs dired?
16350 * Document Groups::             Single files can be the basis of a group.
16351 * SOUP::                        Reading @sc{soup} packets ``offline''.
16352 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16353 @end menu
16354
16355
16356 @node Directory Groups
16357 @subsection Directory Groups
16358 @cindex nndir
16359 @cindex directory groups
16360
16361 If you have a directory that has lots of articles in separate files in
16362 it, you might treat it as a newsgroup.  The files have to have numerical
16363 names, of course.
16364
16365 This might be an opportune moment to mention @code{ange-ftp} (and its
16366 successor @code{efs}), that most wonderful of all wonderful Emacs
16367 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16368 back end to read directories.  Big deal.
16369
16370 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16371 enter the @code{ange-ftp} file name
16372 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16373 @code{ange-ftp} or @code{efs} will actually allow you to read this
16374 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16375
16376 @code{nndir} will use @acronym{NOV} files if they are present.
16377
16378 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16379 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16380 whatever you use @code{nndir} for, so you could switch to any of those
16381 methods if you feel the need to have a non-read-only @code{nndir}.
16382
16383
16384 @node Anything Groups
16385 @subsection Anything Groups
16386 @cindex nneething
16387
16388 From the @code{nndir} back end (which reads a single spool-like
16389 directory), it's just a hop and a skip to @code{nneething}, which
16390 pretends that any arbitrary directory is a newsgroup.  Strange, but
16391 true.
16392
16393 When @code{nneething} is presented with a directory, it will scan this
16394 directory and assign article numbers to each file.  When you enter such
16395 a group, @code{nneething} must create ``headers'' that Gnus can use.
16396 After all, Gnus is a newsreader, in case you're forgetting.
16397 @code{nneething} does this in a two-step process.  First, it snoops each
16398 file in question.  If the file looks like an article (i.e., the first
16399 few lines look like headers), it will use this as the head.  If this is
16400 just some arbitrary file without a head (e.g. a C source file),
16401 @code{nneething} will cobble up a header out of thin air.  It will use
16402 file ownership, name and date and do whatever it can with these
16403 elements.
16404
16405 All this should happen automatically for you, and you will be presented
16406 with something that looks very much like a newsgroup.  Totally like a
16407 newsgroup, to be precise.  If you select an article, it will be displayed
16408 in the article buffer, just as usual.
16409
16410 If you select a line that represents a directory, Gnus will pop you into
16411 a new summary buffer for this @code{nneething} group.  And so on.  You can
16412 traverse the entire disk this way, if you feel like, but remember that
16413 Gnus is not dired, really, and does not intend to be, either.
16414
16415 There are two overall modes to this action---ephemeral or solid.  When
16416 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16417 will not store information on what files you have read, and what files
16418 are new, and so on.  If you create a solid @code{nneething} group the
16419 normal way with @kbd{G m}, Gnus will store a mapping table between
16420 article numbers and file names, and you can treat this group like any
16421 other groups.  When you activate a solid @code{nneething} group, you will
16422 be told how many unread articles it contains, etc., etc.
16423
16424 Some variables:
16425
16426 @table @code
16427 @item nneething-map-file-directory
16428 @vindex nneething-map-file-directory
16429 All the mapping files for solid @code{nneething} groups will be stored
16430 in this directory, which defaults to @file{~/.nneething/}.
16431
16432 @item nneething-exclude-files
16433 @vindex nneething-exclude-files
16434 All files that match this regexp will be ignored.  Nice to use to exclude
16435 auto-save files and the like, which is what it does by default.
16436
16437 @item nneething-include-files
16438 @vindex nneething-include-files
16439 Regexp saying what files to include in the group.  If this variable is
16440 non-@code{nil}, only files matching this regexp will be included.
16441
16442 @item nneething-map-file
16443 @vindex nneething-map-file
16444 Name of the map files.
16445 @end table
16446
16447
16448 @node Document Groups
16449 @subsection Document Groups
16450 @cindex nndoc
16451 @cindex documentation group
16452 @cindex help group
16453
16454 @code{nndoc} is a cute little thing that will let you read a single file
16455 as a newsgroup.  Several files types are supported:
16456
16457 @table @code
16458 @cindex Babyl
16459 @cindex Rmail mbox
16460
16461 @item babyl
16462 The Babyl (Rmail) mail box.
16463 @cindex mbox
16464 @cindex Unix mbox
16465
16466 @item mbox
16467 The standard Unix mbox file.
16468
16469 @cindex MMDF mail box
16470 @item mmdf
16471 The MMDF mail box format.
16472
16473 @item news
16474 Several news articles appended into a file.
16475
16476 @item rnews
16477 @cindex rnews batch files
16478 The rnews batch transport format.
16479 @cindex forwarded messages
16480
16481 @item forward
16482 Forwarded articles.
16483
16484 @item nsmail
16485 Netscape mail boxes.
16486
16487 @item mime-parts
16488 @acronym{MIME} multipart messages.
16489
16490 @item standard-digest
16491 The standard (RFC 1153) digest format.
16492
16493 @item mime-digest
16494 A @acronym{MIME} digest of messages.
16495
16496 @item lanl-gov-announce
16497 Announcement messages from LANL Gov Announce.
16498
16499 @item rfc822-forward
16500 A message forwarded according to RFC822.
16501
16502 @item outlook
16503 The Outlook mail box.
16504
16505 @item oe-dbx
16506 The Outlook Express dbx mail box.
16507
16508 @item exim-bounce
16509 A bounce message from the Exim MTA.
16510
16511 @item forward
16512 A message forwarded according to informal rules.
16513
16514 @item rfc934
16515 An RFC934-forwarded message.
16516
16517 @item mailman
16518 A mailman digest.
16519
16520 @item clari-briefs
16521 A digest of Clarinet brief news items.
16522
16523 @item slack-digest
16524 Non-standard digest format---matches most things, but does it badly.
16525
16526 @item mail-in-mail
16527 The last resort.
16528 @end table
16529
16530 You can also use the special ``file type'' @code{guess}, which means
16531 that @code{nndoc} will try to guess what file type it is looking at.
16532 @code{digest} means that @code{nndoc} should guess what digest type the
16533 file is.
16534
16535 @code{nndoc} will not try to change the file or insert any extra headers into
16536 it---it will simply, like, let you use the file as the basis for a
16537 group.  And that's it.
16538
16539 If you have some old archived articles that you want to insert into your
16540 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16541 that.  Say you have an old @file{RMAIL} file with mail that you now want
16542 to split into your new @code{nnml} groups.  You look at that file using
16543 @code{nndoc} (using the @kbd{G f} command in the group buffer
16544 (@pxref{Foreign Groups})), set the process mark on all the articles in
16545 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16546 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16547 file is now also stored in lots of @code{nnml} directories, and you can
16548 delete that pesky @file{RMAIL} file.  If you have the guts!
16549
16550 Virtual server variables:
16551
16552 @table @code
16553 @item nndoc-article-type
16554 @vindex nndoc-article-type
16555 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16556 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16557 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16558 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16559 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16560
16561 @item nndoc-post-type
16562 @vindex nndoc-post-type
16563 This variable says whether Gnus is to consider the group a news group or
16564 a mail group.  There are two valid values:  @code{mail} (the default)
16565 and @code{news}.
16566 @end table
16567
16568 @menu
16569 * Document Server Internals::   How to add your own document types.
16570 @end menu
16571
16572
16573 @node Document Server Internals
16574 @subsubsection Document Server Internals
16575
16576 Adding new document types to be recognized by @code{nndoc} isn't
16577 difficult.  You just have to whip up a definition of what the document
16578 looks like, write a predicate function to recognize that document type,
16579 and then hook into @code{nndoc}.
16580
16581 First, here's an example document type definition:
16582
16583 @example
16584 (mmdf
16585  (article-begin .  "^\^A\^A\^A\^A\n")
16586  (body-end .  "^\^A\^A\^A\^A\n"))
16587 @end example
16588
16589 The definition is simply a unique @dfn{name} followed by a series of
16590 regexp pseudo-variable settings.  Below are the possible
16591 variables---don't be daunted by the number of variables; most document
16592 types can be defined with very few settings:
16593
16594 @table @code
16595 @item first-article
16596 If present, @code{nndoc} will skip past all text until it finds
16597 something that match this regexp.  All text before this will be
16598 totally ignored.
16599
16600 @item article-begin
16601 This setting has to be present in all document type definitions.  It
16602 says what the beginning of each article looks like.
16603
16604 @item head-begin-function
16605 If present, this should be a function that moves point to the head of
16606 the article.
16607
16608 @item nndoc-head-begin
16609 If present, this should be a regexp that matches the head of the
16610 article.
16611
16612 @item nndoc-head-end
16613 This should match the end of the head of the article.  It defaults to
16614 @samp{^$}---the empty line.
16615
16616 @item body-begin-function
16617 If present, this function should move point to the beginning of the body
16618 of the article.
16619
16620 @item body-begin
16621 This should match the beginning of the body of the article.  It defaults
16622 to @samp{^\n}.
16623
16624 @item body-end-function
16625 If present, this function should move point to the end of the body of
16626 the article.
16627
16628 @item body-end
16629 If present, this should match the end of the body of the article.
16630
16631 @item file-end
16632 If present, this should match the end of the file.  All text after this
16633 regexp will be totally ignored.
16634
16635 @end table
16636
16637 So, using these variables @code{nndoc} is able to dissect a document
16638 file into a series of articles, each with a head and a body.  However, a
16639 few more variables are needed since not all document types are all that
16640 news-like---variables needed to transform the head or the body into
16641 something that's palatable for Gnus:
16642
16643 @table @code
16644 @item prepare-body-function
16645 If present, this function will be called when requesting an article.  It
16646 will be called with point at the start of the body, and is useful if the
16647 document has encoded some parts of its contents.
16648
16649 @item article-transform-function
16650 If present, this function is called when requesting an article.  It's
16651 meant to be used for more wide-ranging transformation of both head and
16652 body of the article.
16653
16654 @item generate-head-function
16655 If present, this function is called to generate a head that Gnus can
16656 understand.  It is called with the article number as a parameter, and is
16657 expected to generate a nice head for the article in question.  It is
16658 called when requesting the headers of all articles.
16659
16660 @end table
16661
16662 Let's look at the most complicated example I can come up with---standard
16663 digests:
16664
16665 @example
16666 (standard-digest
16667  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16668  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16669  (prepare-body-function . nndoc-unquote-dashes)
16670  (body-end-function . nndoc-digest-body-end)
16671  (head-end . "^ ?$")
16672  (body-begin . "^ ?\n")
16673  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16674  (subtype digest guess))
16675 @end example
16676
16677 We see that all text before a 70-width line of dashes is ignored; all
16678 text after a line that starts with that @samp{^End of} is also ignored;
16679 each article begins with a 30-width line of dashes; the line separating
16680 the head from the body may contain a single space; and that the body is
16681 run through @code{nndoc-unquote-dashes} before being delivered.
16682
16683 To hook your own document definition into @code{nndoc}, use the
16684 @code{nndoc-add-type} function.  It takes two parameters---the first
16685 is the definition itself and the second (optional) parameter says
16686 where in the document type definition alist to put this definition.
16687 The alist is traversed sequentially, and
16688 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16689 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16690 @code{mmdf} type, and so on.  These type predicates should return
16691 @code{nil} if the document is not of the correct type; @code{t} if it
16692 is of the correct type; and a number if the document might be of the
16693 correct type.  A high number means high probability; a low number
16694 means low probability with @samp{0} being the lowest valid number.
16695
16696
16697 @node SOUP
16698 @subsection SOUP
16699 @cindex SOUP
16700 @cindex offline
16701
16702 In the PC world people often talk about ``offline'' newsreaders.  These
16703 are thingies that are combined reader/news transport monstrosities.
16704 With built-in modem programs.  Yecchh!
16705
16706 Of course, us Unix Weenie types of human beans use things like
16707 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16708 transport things like Ghod intended.  And then we just use normal
16709 newsreaders.
16710
16711 However, it can sometimes be convenient to do something that's a bit
16712 easier on the brain if you have a very slow modem, and you're not really
16713 that interested in doing things properly.
16714
16715 A file format called @sc{soup} has been developed for transporting news
16716 and mail from servers to home machines and back again.  It can be a bit
16717 fiddly.
16718
16719 First some terminology:
16720
16721 @table @dfn
16722
16723 @item server
16724 This is the machine that is connected to the outside world and where you
16725 get news and/or mail from.
16726
16727 @item home machine
16728 This is the machine that you want to do the actual reading and responding
16729 on.  It is typically not connected to the rest of the world in any way.
16730
16731 @item packet
16732 Something that contains messages and/or commands.  There are two kinds
16733 of packets:
16734
16735 @table @dfn
16736 @item message packets
16737 These are packets made at the server, and typically contain lots of
16738 messages for you to read.  These are called @file{SoupoutX.tgz} by
16739 default, where @var{x} is a number.
16740
16741 @item response packets
16742 These are packets made at the home machine, and typically contains
16743 replies that you've written.  These are called @file{SoupinX.tgz} by
16744 default, where @var{x} is a number.
16745
16746 @end table
16747
16748 @end table
16749
16750
16751 @enumerate
16752
16753 @item
16754 You log in on the server and create a @sc{soup} packet.  You can either
16755 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16756 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16757 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16758
16759 @item
16760 You transfer the packet home.  Rail, boat, car or modem will do fine.
16761
16762 @item
16763 You put the packet in your home directory.
16764
16765 @item
16766 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16767 the native or secondary server.
16768
16769 @item
16770 You read articles and mail and answer and followup to the things you
16771 want (@pxref{SOUP Replies}).
16772
16773 @item
16774 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16775 packet.
16776
16777 @item
16778 You transfer this packet to the server.
16779
16780 @item
16781 You use Gnus to mail this packet out with the @kbd{G s s} command.
16782
16783 @item
16784 You then repeat until you die.
16785
16786 @end enumerate
16787
16788 So you basically have a bipartite system---you use @code{nnsoup} for
16789 reading and Gnus for packing/sending these @sc{soup} packets.
16790
16791 @menu
16792 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16793 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16794 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16795 @end menu
16796
16797
16798 @node SOUP Commands
16799 @subsubsection SOUP Commands
16800
16801 These are commands for creating and manipulating @sc{soup} packets.
16802
16803 @table @kbd
16804 @item G s b
16805 @kindex G s b (Group)
16806 @findex gnus-group-brew-soup
16807 Pack all unread articles in the current group
16808 (@code{gnus-group-brew-soup}).  This command understands the
16809 process/prefix convention.
16810
16811 @item G s w
16812 @kindex G s w (Group)
16813 @findex gnus-soup-save-areas
16814 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16815
16816 @item G s s
16817 @kindex G s s (Group)
16818 @findex gnus-soup-send-replies
16819 Send all replies from the replies packet
16820 (@code{gnus-soup-send-replies}).
16821
16822 @item G s p
16823 @kindex G s p (Group)
16824 @findex gnus-soup-pack-packet
16825 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16826
16827 @item G s r
16828 @kindex G s r (Group)
16829 @findex nnsoup-pack-replies
16830 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16831
16832 @item O s
16833 @kindex O s (Summary)
16834 @findex gnus-soup-add-article
16835 This summary-mode command adds the current article to a @sc{soup} packet
16836 (@code{gnus-soup-add-article}).  It understands the process/prefix
16837 convention (@pxref{Process/Prefix}).
16838
16839 @end table
16840
16841
16842 There are a few variables to customize where Gnus will put all these
16843 thingies:
16844
16845 @table @code
16846
16847 @item gnus-soup-directory
16848 @vindex gnus-soup-directory
16849 Directory where Gnus will save intermediate files while composing
16850 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16851
16852 @item gnus-soup-replies-directory
16853 @vindex gnus-soup-replies-directory
16854 This is what Gnus will use as a temporary directory while sending our
16855 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16856
16857 @item gnus-soup-prefix-file
16858 @vindex gnus-soup-prefix-file
16859 Name of the file where Gnus stores the last used prefix.  The default is
16860 @samp{gnus-prefix}.
16861
16862 @item gnus-soup-packer
16863 @vindex gnus-soup-packer
16864 A format string command for packing a @sc{soup} packet.  The default is
16865 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16866
16867 @item gnus-soup-unpacker
16868 @vindex gnus-soup-unpacker
16869 Format string command for unpacking a @sc{soup} packet.  The default is
16870 @samp{gunzip -c %s | tar xvf -}.
16871
16872 @item gnus-soup-packet-directory
16873 @vindex gnus-soup-packet-directory
16874 Where Gnus will look for reply packets.  The default is @file{~/}.
16875
16876 @item gnus-soup-packet-regexp
16877 @vindex gnus-soup-packet-regexp
16878 Regular expression matching @sc{soup} reply packets in
16879 @code{gnus-soup-packet-directory}.
16880
16881 @end table
16882
16883
16884 @node SOUP Groups
16885 @subsubsection SOUP Groups
16886 @cindex nnsoup
16887
16888 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16889 read incoming packets, unpack them, and put them in a directory where
16890 you can read them at leisure.
16891
16892 These are the variables you can use to customize its behavior:
16893
16894 @table @code
16895
16896 @item nnsoup-tmp-directory
16897 @vindex nnsoup-tmp-directory
16898 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16899 directory.  (@file{/tmp/} by default.)
16900
16901 @item nnsoup-directory
16902 @vindex nnsoup-directory
16903 @code{nnsoup} then moves each message and index file to this directory.
16904 The default is @file{~/SOUP/}.
16905
16906 @item nnsoup-replies-directory
16907 @vindex nnsoup-replies-directory
16908 All replies will be stored in this directory before being packed into a
16909 reply packet.  The default is @file{~/SOUP/replies/}.
16910
16911 @item nnsoup-replies-format-type
16912 @vindex nnsoup-replies-format-type
16913 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16914 (rnews), and I don't think you should touch that variable.  I probably
16915 shouldn't even have documented it.  Drats!  Too late!
16916
16917 @item nnsoup-replies-index-type
16918 @vindex nnsoup-replies-index-type
16919 The index type of the replies packet.  The default is @samp{?n}, which
16920 means ``none''.  Don't fiddle with this one either!
16921
16922 @item nnsoup-active-file
16923 @vindex nnsoup-active-file
16924 Where @code{nnsoup} stores lots of information.  This is not an ``active
16925 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16926 this file or mess it up in any way, you're dead.  The default is
16927 @file{~/SOUP/active}.
16928
16929 @item nnsoup-packer
16930 @vindex nnsoup-packer
16931 Format string command for packing a reply @sc{soup} packet.  The default
16932 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16933
16934 @item nnsoup-unpacker
16935 @vindex nnsoup-unpacker
16936 Format string command for unpacking incoming @sc{soup} packets.  The
16937 default is @samp{gunzip -c %s | tar xvf -}.
16938
16939 @item nnsoup-packet-directory
16940 @vindex nnsoup-packet-directory
16941 Where @code{nnsoup} will look for incoming packets.  The default is
16942 @file{~/}.
16943
16944 @item nnsoup-packet-regexp
16945 @vindex nnsoup-packet-regexp
16946 Regular expression matching incoming @sc{soup} packets.  The default is
16947 @samp{Soupout}.
16948
16949 @item nnsoup-always-save
16950 @vindex nnsoup-always-save
16951 If non-@code{nil}, save the replies buffer after each posted message.
16952
16953 @end table
16954
16955
16956 @node SOUP Replies
16957 @subsubsection SOUP Replies
16958
16959 Just using @code{nnsoup} won't mean that your postings and mailings end
16960 up in @sc{soup} reply packets automagically.  You have to work a bit
16961 more for that to happen.
16962
16963 @findex nnsoup-set-variables
16964 The @code{nnsoup-set-variables} command will set the appropriate
16965 variables to ensure that all your followups and replies end up in the
16966 @sc{soup} system.
16967
16968 In specific, this is what it does:
16969
16970 @lisp
16971 (setq message-send-news-function 'nnsoup-request-post)
16972 (setq message-send-mail-function 'nnsoup-request-mail)
16973 @end lisp
16974
16975 And that's it, really.  If you only want news to go into the @sc{soup}
16976 system you just use the first line.  If you only want mail to be
16977 @sc{soup}ed you use the second.
16978
16979
16980 @node Mail-To-News Gateways
16981 @subsection Mail-To-News Gateways
16982 @cindex mail-to-news gateways
16983 @cindex gateways
16984
16985 If your local @code{nntp} server doesn't allow posting, for some reason
16986 or other, you can post using one of the numerous mail-to-news gateways.
16987 The @code{nngateway} back end provides the interface.
16988
16989 Note that you can't read anything from this back end---it can only be
16990 used to post with.
16991
16992 Server variables:
16993
16994 @table @code
16995 @item nngateway-address
16996 @vindex nngateway-address
16997 This is the address of the mail-to-news gateway.
16998
16999 @item nngateway-header-transformation
17000 @vindex nngateway-header-transformation
17001 News headers often have to be transformed in some odd way or other
17002 for the mail-to-news gateway to accept it.  This variable says what
17003 transformation should be called, and defaults to
17004 @code{nngateway-simple-header-transformation}.  The function is called
17005 narrowed to the headers to be transformed and with one parameter---the
17006 gateway address.
17007
17008 This default function just inserts a new @code{To} header based on the
17009 @code{Newsgroups} header and the gateway address.
17010 For instance, an article with this @code{Newsgroups} header:
17011
17012 @example
17013 Newsgroups: alt.religion.emacs
17014 @end example
17015
17016 will get this @code{To} header inserted:
17017
17018 @example
17019 To: alt-religion-emacs@@GATEWAY
17020 @end example
17021
17022 The following pre-defined functions exist:
17023
17024 @findex nngateway-simple-header-transformation
17025 @table @code
17026
17027 @item nngateway-simple-header-transformation
17028 Creates a @code{To} header that looks like
17029 @var{newsgroup}@@@code{nngateway-address}.
17030
17031 @findex nngateway-mail2news-header-transformation
17032
17033 @item nngateway-mail2news-header-transformation
17034 Creates a @code{To} header that looks like
17035 @code{nngateway-address}.
17036 @end table
17037
17038 @end table
17039
17040 Here's an example:
17041
17042 @lisp
17043 (setq gnus-post-method
17044       '(nngateway
17045         "mail2news@@replay.com"
17046         (nngateway-header-transformation
17047          nngateway-mail2news-header-transformation)))
17048 @end lisp
17049
17050 So, to use this, simply say something like:
17051
17052 @lisp
17053 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17054 @end lisp
17055
17056
17057
17058 @node Combined Groups
17059 @section Combined Groups
17060
17061 Gnus allows combining a mixture of all the other group types into bigger
17062 groups.
17063
17064 @menu
17065 * Virtual Groups::              Combining articles from many groups.
17066 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17067 @end menu
17068
17069
17070 @node Virtual Groups
17071 @subsection Virtual Groups
17072 @cindex nnvirtual
17073 @cindex virtual groups
17074 @cindex merging groups
17075
17076 An @dfn{nnvirtual group} is really nothing more than a collection of
17077 other groups.
17078
17079 For instance, if you are tired of reading many small groups, you can
17080 put them all in one big group, and then grow tired of reading one
17081 big, unwieldy group.  The joys of computing!
17082
17083 You specify @code{nnvirtual} as the method.  The address should be a
17084 regexp to match component groups.
17085
17086 All marks in the virtual group will stick to the articles in the
17087 component groups.  So if you tick an article in a virtual group, the
17088 article will also be ticked in the component group from whence it
17089 came.  (And vice versa---marks from the component groups will also be
17090 shown in the virtual group.). To create an empty virtual group, run
17091 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17092 and edit the method regexp with @kbd{M-e}
17093 (@code{gnus-group-edit-group-method})
17094
17095 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17096 newsgroups into one, big, happy newsgroup:
17097
17098 @lisp
17099 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17100 @end lisp
17101
17102 The component groups can be native or foreign; everything should work
17103 smoothly, but if your computer explodes, it was probably my fault.
17104
17105 Collecting the same group from several servers might actually be a good
17106 idea if users have set the Distribution header to limit distribution.
17107 If you would like to read @samp{soc.motss} both from a server in Japan
17108 and a server in Norway, you could use the following as the group regexp:
17109
17110 @example
17111 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17112 @end example
17113
17114 (Remember, though, that if you're creating the group with @kbd{G m}, you
17115 shouldn't double the backslashes, and you should leave off the quote
17116 characters at the beginning and the end of the string.)
17117
17118 This should work kinda smoothly---all articles from both groups should
17119 end up in this one, and there should be no duplicates.  Threading (and
17120 the rest) will still work as usual, but there might be problems with the
17121 sequence of articles.  Sorting on date might be an option here
17122 (@pxref{Selecting a Group}).
17123
17124 One limitation, however---all groups included in a virtual
17125 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17126 zombie groups can't be component groups for @code{nnvirtual} groups.
17127
17128 @vindex nnvirtual-always-rescan
17129 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17130 @code{nnvirtual} will always scan groups for unread articles when
17131 entering a virtual group.  If this variable is @code{nil} (which is the
17132 default) and you read articles in a component group after the virtual
17133 group has been activated, the read articles from the component group
17134 will show up when you enter the virtual group.  You'll also see this
17135 effect if you have two virtual groups that have a component group in
17136 common.  If that's the case, you should set this variable to @code{t}.
17137 Or you can just tap @code{M-g} on the virtual group every time before
17138 you enter it---it'll have much the same effect.
17139
17140 @code{nnvirtual} can have both mail and news groups as component groups.
17141 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17142 has to ask the back end of the component group the article comes from
17143 whether it is a news or mail back end.  However, when you do a @kbd{^},
17144 there is typically no sure way for the component back end to know this,
17145 and in that case @code{nnvirtual} tells Gnus that the article came from a
17146 not-news back end.  (Just to be on the safe side.)
17147
17148 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17149 line from the article you respond to in these cases.
17150
17151 @code{nnvirtual} groups do not inherit anything but articles and marks
17152 from component groups---group parameters, for instance, are not
17153 inherited.
17154
17155
17156 @node Kibozed Groups
17157 @subsection Kibozed Groups
17158 @cindex nnkiboze
17159 @cindex kibozing
17160
17161 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17162 the news feed''.  @code{nnkiboze} is a back end that will do this for
17163 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17164 with useless requests!  Oh happiness!
17165
17166 @kindex G k (Group)
17167 To create a kibozed group, use the @kbd{G k} command in the group
17168 buffer.
17169
17170 The address field of the @code{nnkiboze} method is, as with
17171 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17172 @code{nnkiboze} group.  That's where most similarities between
17173 @code{nnkiboze} and @code{nnvirtual} end.
17174
17175 In addition to this regexp detailing component groups, an
17176 @code{nnkiboze} group must have a score file to say what articles are
17177 to be included in the group (@pxref{Scoring}).
17178
17179 @kindex M-x nnkiboze-generate-groups
17180 @findex nnkiboze-generate-groups
17181 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17182 @code{nnkiboze} groups you want to have.  This command will take time.
17183 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17184 headers from all the articles in all the component groups and run them
17185 through the scoring process to determine if there are any articles in
17186 the groups that are to be part of the @code{nnkiboze} groups.
17187
17188 Please limit the number of component groups by using restrictive
17189 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17190 @acronym{NNTP} site may throw you off and never let you back in again.
17191 Stranger things have happened.
17192
17193 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17194 and they can be foreign.  No restrictions.
17195
17196 @vindex nnkiboze-directory
17197 The generation of an @code{nnkiboze} group means writing two files in
17198 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17199 contains the @acronym{NOV} header lines for all the articles in the group,
17200 and the other is an additional @file{.newsrc} file to store information
17201 on what groups have been searched through to find component articles.
17202
17203 Articles marked as read in the @code{nnkiboze} group will have
17204 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17205
17206
17207 @node Gnus Unplugged
17208 @section Gnus Unplugged
17209 @cindex offline
17210 @cindex unplugged
17211 @cindex agent
17212 @cindex Gnus agent
17213 @cindex Gnus unplugged
17214
17215 In olden times (ca. February '88), people used to run their newsreaders
17216 on big machines with permanent connections to the net.  News transport
17217 was dealt with by news servers, and all the newsreaders had to do was to
17218 read news.  Believe it or not.
17219
17220 Nowadays most people read news and mail at home, and use some sort of
17221 modem to connect to the net.  To avoid running up huge phone bills, it
17222 would be nice to have a way to slurp down all the news and mail, hang up
17223 the phone, read for several hours, and then upload any responses you
17224 have to make.  And then you repeat the procedure.
17225
17226 Of course, you can use news servers for doing this as well.  I've used
17227 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17228 for some years, but doing that's a bore.  Moving the news server
17229 functionality up to the newsreader makes sense if you're the only person
17230 reading news on a machine.
17231
17232 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17233 fact, you don't even have to configure anything.
17234
17235 Of course, to use it as such, you have to learn a few new commands.
17236
17237 @menu
17238 * Agent Basics::                How it all is supposed to work.
17239 * Agent Categories::            How to tell the Gnus Agent what to download.
17240 * Agent Commands::              New commands for all the buffers.
17241 * Agent as Cache::              The Agent is a big cache too.
17242 * Agent Expiry::                How to make old articles go away.
17243 * Agent Regeneration::          How to recover from lost connections and other accidents.
17244 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17245 * Outgoing Messages::           What happens when you post/mail something?
17246 * Agent Variables::             Customizing is fun.
17247 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17248 * Batching Agents::             How to fetch news from a @code{cron} job.
17249 * Agent Caveats::               What you think it'll do and what it does.
17250 @end menu
17251
17252
17253 @node Agent Basics
17254 @subsection Agent Basics
17255
17256 First, let's get some terminology out of the way.
17257
17258 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17259 connection to the net (and notified the Agent that this is the case).
17260 When the connection to the net is up again (and Gnus knows this), the
17261 Agent is @dfn{plugged}.
17262
17263 The @dfn{local} machine is the one you're running on, and which isn't
17264 connected to the net continuously.
17265
17266 @dfn{Downloading} means fetching things from the net to your local
17267 machine.  @dfn{Uploading} is doing the opposite.
17268
17269 Let's take a typical Gnus session using the Agent.
17270
17271 @itemize @bullet
17272
17273 @item
17274 @findex gnus-unplugged
17275 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17276 Agent in a disconnected state.  You can read all the news that you have
17277 already fetched while in this mode.
17278
17279 @item
17280 You then decide to see whether any new news has arrived.  You connect
17281 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17282 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17283 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
17284 Source Specifiers}).
17285
17286 @item
17287 You can then read the new news immediately, or you can download the news
17288 onto your local machine.  If you want to do the latter, you press @kbd{g}
17289 to check if there are any new news and then @kbd{J
17290 s} to fetch all the eligible articles in all the groups.  (To let Gnus
17291 know which articles you want to download, @pxref{Agent Categories}.)
17292
17293 @item
17294 After fetching the articles, you press @kbd{J j} to make Gnus become
17295 unplugged again, and you shut down the PPP thing (or whatever).  And
17296 then you read the news offline.
17297
17298 @item
17299 And then you go to step 2.
17300 @end itemize
17301
17302 Here are some things you should do the first time (or so) that you use
17303 the Agent.
17304
17305 @itemize @bullet
17306
17307 @item
17308 Decide which servers should be covered by the Agent.  If you have a mail
17309 back end, it would probably be nonsensical to have it covered by the
17310 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17311 @kbd{J a} on the server (or servers) that you wish to have covered by the
17312 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17313 added servers you do not wish to have covered by the Agent.  By default,
17314 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
17315 @code{gnus-secondary-select-methods} are agentized.
17316
17317 @item
17318 Decide on download policy.  It's fairly simple once you decide whether
17319 you are going to use agent categories, topic parameters, and/or group
17320 parameters to implement your policy.  If you're new to gnus, it
17321 is probably best to start with a category @xref{Agent Categories}.
17322
17323 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17324 (@pxref{Agent Categories}) provide for setting a policy that applies
17325 to multiple groups.  Which you use is entirely up to you.  Topic
17326 parameters do override categories so, if you mix the two, you'll have
17327 to take that into account.  If you have a few groups that deviate from
17328 your policy, you can use group parameters (@pxref{Group Parameters}) to
17329 configure them.
17330
17331 @item
17332 Uhm@dots{} that's it.
17333 @end itemize
17334
17335
17336 @node Agent Categories
17337 @subsection Agent Categories
17338
17339 One of the main reasons to integrate the news transport layer into the
17340 newsreader is to allow greater control over what articles to download.
17341 There's not much point in downloading huge amounts of articles, just to
17342 find out that you're not interested in reading any of them.  It's better
17343 to be somewhat more conservative in choosing what to download, and then
17344 mark the articles for downloading manually if it should turn out that
17345 you're interested in the articles anyway.
17346
17347 One of the more effective methods for controlling what is to be
17348 downloaded is to create a @dfn{category} and then assign some (or all)
17349 groups to this category.  Groups that do not belong in any other
17350 category belong to the @code{default} category.  Gnus has its own
17351 buffer for creating and managing categories.
17352
17353 If you prefer, you can also use group parameters (@pxref{Group
17354 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17355 alternative approach to controlling the agent.  The only real
17356 difference is that categories are specific to the agent (so there is
17357 less to learn) while group and topic parameters include the kitchen
17358 sink.
17359
17360 Since you can set agent parameters in several different places we have
17361 a rule to decide which source to believe.  This rule specifies that
17362 the parameter sources are checked in the following order: group
17363 parameters, topic parameters, agent category, and finally customizable
17364 variables. So you can mix all of these sources to produce a wide range
17365 of behavior, just don't blame me if you don't remember where you put
17366 your settings.
17367
17368 @menu
17369 * Category Syntax::             What a category looks like.
17370 * Category Buffer::             A buffer for maintaining categories.
17371 * Category Variables::          Customize'r'Us.
17372 @end menu
17373
17374
17375 @node Category Syntax
17376 @subsubsection Category Syntax
17377
17378 A category consists of a name, the list of groups belonging to the
17379 category, and a number of optional parameters that override the
17380 customizable variables.  The complete list of agent parameters are
17381 listed below.
17382
17383 @table @code
17384 @item gnus-agent-cat-name
17385 The name of the category.
17386
17387 @item gnus-agent-cat-groups
17388 The list of groups that are in this category.
17389
17390 @item gnus-agent-cat-predicate
17391 A predicate which (generally) gives a rough outline of which articles
17392 are eligible for downloading; and
17393
17394 @item gnus-agent-cat-score-file
17395 a score rule which (generally) gives you a finer granularity when
17396 deciding what articles to download.  (Note that this @dfn{download
17397 score} is not necessarily related to normal scores.)
17398
17399 @item gnus-agent-cat-enable-expiration
17400 a boolean indicating whether the agent should expire old articles in
17401 this group.  Most groups should be expired to conserve disk space.  In
17402 fact, its probably safe to say that the gnus.* hierarchy contains the
17403 only groups that should not be expired.
17404
17405 @item gnus-agent-cat-days-until-old
17406 an integer indicating the number of days that the agent should wait
17407 before deciding that a read article is safe to expire.
17408
17409 @item gnus-agent-cat-low-score
17410 an integer that overrides the value of @code{gnus-agent-low-score}.
17411
17412 @item gnus-agent-cat-high-score
17413 an integer that overrides the value of @code{gnus-agent-high-score}.
17414
17415 @item gnus-agent-cat-length-when-short
17416 an integer that overrides the value of
17417 @code{gnus-agent-short-article}.
17418
17419 @item gnus-agent-cat-length-when-long
17420 an integer that overrides the value of @code{gnus-agent-long-article}.
17421 @end table
17422
17423 The name of a category can not be changed once the category has been
17424 created.
17425
17426 Each category maintains a list of groups that are exclusive members of
17427 that category.  The exclusivity rule is automatically enforced, add a
17428 group to a new category and it is automatically removed from its old
17429 category.
17430
17431 A predicate in its simplest form can be a single predicate such as
17432 @code{true} or @code{false}.  These two will download every available
17433 article or nothing respectively.  In the case of these two special
17434 predicates an additional score rule is superfluous.
17435
17436 Predicates of @code{high} or @code{low} download articles in respect of
17437 their scores in relationship to @code{gnus-agent-high-score} and
17438 @code{gnus-agent-low-score} as described below.
17439
17440 To gain even finer control of what is to be regarded eligible for
17441 download a predicate can consist of a number of predicates with logical
17442 operators sprinkled in between.
17443
17444 Perhaps some examples are in order.
17445
17446 Here's a simple predicate.  (It's the default predicate, in fact, used
17447 for all groups that don't belong to any other category.)
17448
17449 @lisp
17450 short
17451 @end lisp
17452
17453 Quite simple, eh?  This predicate is true if and only if the article is
17454 short (for some value of ``short'').
17455
17456 Here's a more complex predicate:
17457
17458 @lisp
17459 (or high
17460     (and
17461      (not low)
17462      (not long)))
17463 @end lisp
17464
17465 This means that an article should be downloaded if it has a high score,
17466 or if the score is not low and the article is not long.  You get the
17467 drift.
17468
17469 The available logical operators are @code{or}, @code{and} and
17470 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17471 @samp{|}, @code{&} and @code{!} instead.)
17472
17473 The following predicates are pre-defined, but if none of these fit what
17474 you want to do, you can write your own.
17475
17476 When evaluating each of these predicates, the named constant will be
17477 bound to the value determined by calling
17478 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17479 example, gnus-agent-short-article will be bound to
17480 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17481 means that you can specify a predicate in your category then tune that
17482 predicate to individual groups.
17483
17484 @table @code
17485 @item short
17486 True iff the article is shorter than @code{gnus-agent-short-article}
17487 lines; default 100.
17488
17489 @item long
17490 True iff the article is longer than @code{gnus-agent-long-article}
17491 lines; default 200.
17492
17493 @item low
17494 True iff the article has a download score less than
17495 @code{gnus-agent-low-score}; default 0.
17496
17497 @item high
17498 True iff the article has a download score greater than
17499 @code{gnus-agent-high-score}; default 0.
17500
17501 @item spam
17502 True iff the Gnus Agent guesses that the article is spam.  The
17503 heuristics may change over time, but at present it just computes a
17504 checksum and sees whether articles match.
17505
17506 @item true
17507 Always true.
17508
17509 @item false
17510 Always false.
17511 @end table
17512
17513 If you want to create your own predicate function, here's what you have
17514 to know:  The functions are called with no parameters, but the
17515 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17516 useful values.
17517
17518 For example, you could decide that you don't want to download articles
17519 that were posted more than a certain number of days ago (e.g. posted
17520 more than @code{gnus-agent-expire-days} ago) you might write a function
17521 something along the lines of the following:
17522
17523 @lisp
17524 (defun my-article-old-p ()
17525   "Say whether an article is old."
17526   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17527      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17528 @end lisp
17529
17530 with the predicate then defined as:
17531
17532 @lisp
17533 (not my-article-old-p)
17534 @end lisp
17535
17536 or you could append your predicate to the predefined
17537 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17538 wherever.
17539
17540 @lisp
17541 (require 'gnus-agent)
17542 (setq  gnus-category-predicate-alist
17543   (append gnus-category-predicate-alist
17544          '((old . my-article-old-p))))
17545 @end lisp
17546
17547 and simply specify your predicate as:
17548
17549 @lisp
17550 (not old)
17551 @end lisp
17552
17553 If/when using something like the above, be aware that there are many
17554 misconfigured systems/mailers out there and so an article's date is not
17555 always a reliable indication of when it was posted.  Hell, some people
17556 just don't give a damn.
17557
17558 The above predicates apply to @emph{all} the groups which belong to the
17559 category.  However, if you wish to have a specific predicate for an
17560 individual group within a category, or you're just too lazy to set up a
17561 new category, you can enter a group's individual predicate in it's group
17562 parameters like so:
17563
17564 @lisp
17565 (agent-predicate . short)
17566 @end lisp
17567
17568 This is the group/topic parameter equivalent of the agent category default.
17569 Note that when specifying a single word predicate like this, the
17570 @code{agent-predicate} specification must be in dotted pair notation.
17571
17572 The equivalent of the longer example from above would be:
17573
17574 @lisp
17575 (agent-predicate or high (and (not low) (not long)))
17576 @end lisp
17577
17578 The outer parenthesis required in the category specification are not
17579 entered here as, not being in dotted pair notation, the value of the
17580 predicate is assumed to be a list.
17581
17582
17583 Now, the syntax of the download score is the same as the syntax of
17584 normal score files, except that all elements that require actually
17585 seeing the article itself are verboten.  This means that only the
17586 following headers can be scored on: @code{Subject}, @code{From},
17587 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17588 @code{Lines}, and @code{Xref}.
17589
17590 As with predicates, the specification of the @code{download score rule}
17591 to use in respect of a group can be in either the category definition if
17592 it's to be applicable to all groups in therein, or a group's parameters
17593 if it's to be specific to that group.
17594
17595 In both of these places the @code{download score rule} can take one of
17596 three forms:
17597
17598 @enumerate
17599 @item
17600 Score rule
17601
17602 This has the same syntax as a normal gnus score file except only a
17603 subset of scoring keywords are available as mentioned above.
17604
17605 example:
17606
17607 @itemize @bullet
17608 @item
17609 Category specification
17610
17611 @lisp
17612 (("from"
17613        ("Lars Ingebrigtsen" 1000000 nil s))
17614 ("lines"
17615        (500 -100 nil <)))
17616 @end lisp
17617
17618 @item
17619 Group/Topic Parameter specification
17620
17621 @lisp
17622 (agent-score ("from"
17623                    ("Lars Ingebrigtsen" 1000000 nil s))
17624              ("lines"
17625                    (500 -100 nil <)))
17626 @end lisp
17627
17628 Again, note the omission of the outermost parenthesis here.
17629 @end itemize
17630
17631 @item
17632 Agent score file
17633
17634 These score files must @emph{only} contain the permitted scoring
17635 keywords stated above.
17636
17637 example:
17638
17639 @itemize @bullet
17640 @item
17641 Category specification
17642
17643 @lisp
17644 ("~/News/agent.SCORE")
17645 @end lisp
17646
17647 or perhaps
17648
17649 @lisp
17650 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17651 @end lisp
17652
17653 @item
17654 Group Parameter specification
17655
17656 @lisp
17657 (agent-score "~/News/agent.SCORE")
17658 @end lisp
17659
17660 Additional score files can be specified as above.  Need I say anything
17661 about parenthesis?
17662 @end itemize
17663
17664 @item
17665 Use @code{normal} score files
17666
17667 If you don't want to maintain two sets of scoring rules for a group, and
17668 your desired @code{downloading} criteria for a group are the same as your
17669 @code{reading} criteria then you can tell the agent to refer to your
17670 @code{normal} score files when deciding what to download.
17671
17672 These directives in either the category definition or a group's
17673 parameters will cause the agent to read in all the applicable score
17674 files for a group, @emph{filtering out} those sections that do not
17675 relate to one of the permitted subset of scoring keywords.
17676
17677 @itemize @bullet
17678 @item
17679 Category Specification
17680
17681 @lisp
17682 file
17683 @end lisp
17684
17685 @item
17686 Group Parameter specification
17687
17688 @lisp
17689 (agent-score . file)
17690 @end lisp
17691 @end itemize
17692 @end enumerate
17693
17694 @node Category Buffer
17695 @subsubsection Category Buffer
17696
17697 You'd normally do all category maintenance from the category buffer.
17698 When you enter it for the first time (with the @kbd{J c} command from
17699 the group buffer), you'll only see the @code{default} category.
17700
17701 The following commands are available in this buffer:
17702
17703 @table @kbd
17704 @item q
17705 @kindex q (Category)
17706 @findex gnus-category-exit
17707 Return to the group buffer (@code{gnus-category-exit}).
17708
17709 @item e
17710 @kindex e (Category)
17711 @findex gnus-category-customize-category
17712 Use a customization buffer to set all of the selected category's
17713 parameters at one time (@code{gnus-category-customize-category}).
17714
17715 @item k
17716 @kindex k (Category)
17717 @findex gnus-category-kill
17718 Kill the current category (@code{gnus-category-kill}).
17719
17720 @item c
17721 @kindex c (Category)
17722 @findex gnus-category-copy
17723 Copy the current category (@code{gnus-category-copy}).
17724
17725 @item a
17726 @kindex a (Category)
17727 @findex gnus-category-add
17728 Add a new category (@code{gnus-category-add}).
17729
17730 @item p
17731 @kindex p (Category)
17732 @findex gnus-category-edit-predicate
17733 Edit the predicate of the current category
17734 (@code{gnus-category-edit-predicate}).
17735
17736 @item g
17737 @kindex g (Category)
17738 @findex gnus-category-edit-groups
17739 Edit the list of groups belonging to the current category
17740 (@code{gnus-category-edit-groups}).
17741
17742 @item s
17743 @kindex s (Category)
17744 @findex gnus-category-edit-score
17745 Edit the download score rule of the current category
17746 (@code{gnus-category-edit-score}).
17747
17748 @item l
17749 @kindex l (Category)
17750 @findex gnus-category-list
17751 List all the categories (@code{gnus-category-list}).
17752 @end table
17753
17754
17755 @node Category Variables
17756 @subsubsection Category Variables
17757
17758 @table @code
17759 @item gnus-category-mode-hook
17760 @vindex gnus-category-mode-hook
17761 Hook run in category buffers.
17762
17763 @item gnus-category-line-format
17764 @vindex gnus-category-line-format
17765 Format of the lines in the category buffer (@pxref{Formatting
17766 Variables}).  Valid elements are:
17767
17768 @table @samp
17769 @item c
17770 The name of the category.
17771
17772 @item g
17773 The number of groups in the category.
17774 @end table
17775
17776 @item gnus-category-mode-line-format
17777 @vindex gnus-category-mode-line-format
17778 Format of the category mode line (@pxref{Mode Line Formatting}).
17779
17780 @item gnus-agent-short-article
17781 @vindex gnus-agent-short-article
17782 Articles that have fewer lines than this are short.  Default 100.
17783
17784 @item gnus-agent-long-article
17785 @vindex gnus-agent-long-article
17786 Articles that have more lines than this are long.  Default 200.
17787
17788 @item gnus-agent-low-score
17789 @vindex gnus-agent-low-score
17790 Articles that have a score lower than this have a low score.  Default
17791 0.
17792
17793 @item gnus-agent-high-score
17794 @vindex gnus-agent-high-score
17795 Articles that have a score higher than this have a high score.  Default
17796 0.
17797
17798 @item gnus-agent-expire-days
17799 @vindex gnus-agent-expire-days
17800 The number of days that a @samp{read} article must stay in the agent's
17801 local disk before becoming eligible for expiration (While the name is
17802 the same, this doesn't mean expiring the article on the server.  It
17803 just means deleting the local copy of the article).  What is also
17804 important to understand is that the counter starts with the time the
17805 article was written to the local disk and not the time the article was
17806 read.
17807 Default 7.
17808
17809 @item gnus-agent-enable-expiration
17810 @vindex gnus-agent-enable-expiration
17811 Determines whether articles in a group are, by default, expired or
17812 retained indefinitely.  The default is @code{ENABLE} which means that
17813 you'll have to disable expiration when desired.  On the other hand,
17814 you could set this to @code{DISABLE}.  In that case, you would then
17815 have to enable expiration in selected groups.
17816
17817 @end table
17818
17819
17820 @node Agent Commands
17821 @subsection Agent Commands
17822 @findex gnus-agent-toggle-plugged
17823 @kindex J j (Agent)
17824
17825 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17826 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17827 toggles the plugged/unplugged state of the Gnus Agent.
17828
17829
17830 @menu
17831 * Group Agent Commands::        Configure groups and fetch their contents.
17832 * Summary Agent Commands::      Manually select then fetch specific articles.
17833 * Server Agent Commands::       Select the servers that are supported by the agent.
17834 @end menu
17835
17836
17837
17838
17839 @node Group Agent Commands
17840 @subsubsection Group Agent Commands
17841
17842 @table @kbd
17843 @item J u
17844 @kindex J u (Agent Group)
17845 @findex gnus-agent-fetch-groups
17846 Fetch all eligible articles in the current group
17847 (@code{gnus-agent-fetch-groups}).
17848
17849 @item J c
17850 @kindex J c (Agent Group)
17851 @findex gnus-enter-category-buffer
17852 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17853
17854 @item J s
17855 @kindex J s (Agent Group)
17856 @findex gnus-agent-fetch-session
17857 Fetch all eligible articles in all groups
17858 (@code{gnus-agent-fetch-session}).
17859
17860 @item J S
17861 @kindex J S (Agent Group)
17862 @findex gnus-group-send-queue
17863 Send all sendable messages in the queue group
17864 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17865
17866 @item J a
17867 @kindex J a (Agent Group)
17868 @findex gnus-agent-add-group
17869 Add the current group to an Agent category
17870 (@code{gnus-agent-add-group}).  This command understands the
17871 process/prefix convention (@pxref{Process/Prefix}).
17872
17873 @item J r
17874 @kindex J r (Agent Group)
17875 @findex gnus-agent-remove-group
17876 Remove the current group from its category, if any
17877 (@code{gnus-agent-remove-group}).  This command understands the
17878 process/prefix convention (@pxref{Process/Prefix}).
17879
17880 @item J Y
17881 @kindex J Y (Agent Group)
17882 @findex gnus-agent-synchronize-flags
17883 Synchronize flags changed while unplugged with remote server, if any.
17884
17885
17886 @end table
17887
17888
17889 @node Summary Agent Commands
17890 @subsubsection Summary Agent Commands
17891
17892 @table @kbd
17893 @item J #
17894 @kindex J # (Agent Summary)
17895 @findex gnus-agent-mark-article
17896 Mark the article for downloading (@code{gnus-agent-mark-article}).
17897
17898 @item J M-#
17899 @kindex J M-# (Agent Summary)
17900 @findex gnus-agent-unmark-article
17901 Remove the downloading mark from the article
17902 (@code{gnus-agent-unmark-article}).
17903
17904 @cindex %
17905 @item @@
17906 @kindex @@ (Agent Summary)
17907 @findex gnus-agent-toggle-mark
17908 Toggle whether to download the article
17909 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17910 default. 
17911
17912 @item J c
17913 @kindex J c (Agent Summary)
17914 @findex gnus-agent-catchup
17915 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17916
17917 @item J S
17918 @kindex J S (Agent Summary)
17919 @findex gnus-agent-fetch-group
17920 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17921 (@code{gnus-agent-fetch-group}).
17922
17923 @item J s
17924 @kindex J s (Agent Summary)
17925 @findex gnus-agent-fetch-series
17926 Download all processable articles in this group.
17927 (@code{gnus-agent-fetch-series}).
17928
17929 @item J u
17930 @kindex J u (Agent Summary)
17931 @findex gnus-agent-summary-fetch-group
17932 Download all downloadable articles in the current group
17933 (@code{gnus-agent-summary-fetch-group}).
17934
17935 @end table
17936
17937
17938 @node Server Agent Commands
17939 @subsubsection Server Agent Commands
17940
17941 @table @kbd
17942 @item J a
17943 @kindex J a (Agent Server)
17944 @findex gnus-agent-add-server
17945 Add the current server to the list of servers covered by the Gnus Agent
17946 (@code{gnus-agent-add-server}).
17947
17948 @item J r
17949 @kindex J r (Agent Server)
17950 @findex gnus-agent-remove-server
17951 Remove the current server from the list of servers covered by the Gnus
17952 Agent (@code{gnus-agent-remove-server}).
17953
17954 @end table
17955
17956
17957 @node Agent as Cache
17958 @subsection Agent as Cache
17959
17960 When Gnus is plugged, it is not efficient to download headers or
17961 articles from the server again, if they are already stored in the
17962 Agent.  So, Gnus normally only downloads headers once, and stores them
17963 in the Agent.  These headers are later used when generating the summary
17964 buffer, regardless of whether you are plugged or unplugged.  Articles
17965 are not cached in the Agent by default though (that would potentially
17966 consume lots of disk space), but if you have already downloaded an
17967 article into the Agent, Gnus will not download the article from the
17968 server again but use the locally stored copy instead.
17969
17970 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
17971 @pxref{Agent Variables}) to always download headers and articles while
17972 plugged.  Gnus will almost certainly be slower, but it will be kept
17973 synchronized with the server.  That last point probably won't make any
17974 sense if you are using a nntp or nnimap back end.
17975
17976 @node Agent Expiry
17977 @subsection Agent Expiry
17978
17979 @vindex gnus-agent-expire-days
17980 @findex gnus-agent-expire
17981 @kindex M-x gnus-agent-expire
17982 @kindex M-x gnus-agent-expire-group
17983 @findex gnus-agent-expire-group
17984 @cindex agent expiry
17985 @cindex Gnus agent expiry
17986 @cindex expiry
17987
17988 The Agent back end, @code{nnagent}, doesn't handle expiry. Well, at
17989 least it doesn't handle it like other back ends.  Instead, there are
17990 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
17991 commands that will expire all read articles that are older than
17992 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
17993 that you're running out of space.  Neither are particularly fast or
17994 efficient, and it's not a particularly good idea to interrupt them (with
17995 @kbd{C-g} or anything else) once you've started one of them.
17996
17997 Note that other functions, e.g. @code{gnus-request-expire-articles},
17998 might run @code{gnus-agent-expire} for you to keep the agent 
17999 synchronized with the group.
18000
18001 The agent parameter @code{agent-enable-expiration} may be used to
18002 prevent expiration in selected groups.
18003
18004 @vindex gnus-agent-expire-all
18005 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18006 expiration commands will expire all articles---unread, read, ticked
18007 and dormant.  If @code{nil} (which is the default), only read articles
18008 are eligible for expiry, and unread, ticked and dormant articles will
18009 be kept indefinitely.
18010
18011 If you find that some articles eligible for expiry are never expired,
18012 perhaps some Gnus Agent files are corrupted.  There's are special
18013 commands, @code{gnus-agent-regenerate} and
18014 @code{gnus-agent-regenerate-group}, to fix possible problems.
18015
18016 @node Agent Regeneration
18017 @subsection Agent Regeneration
18018
18019 @cindex agent regeneration
18020 @cindex Gnus agent regeneration
18021 @cindex regeneration
18022
18023 The local data structures used by @code{nnagent} may become corrupted
18024 due to certain exceptional conditions.  When this happens,
18025 @code{nnagent} functionality may degrade or even fail.  The solution
18026 to this problem is to repair the local data structures by removing all
18027 internal inconsistencies.
18028
18029 For example, if your connection to your server is lost while
18030 downloaded articles into the agent, the local data structures will not
18031 know about articles successfully downloaded prior to the connection
18032 failure.  Running @code{gnus-agent-regenerate} or
18033 @code{gnus-agent-regenerate-group} will update the data structures
18034 such that you don't need to download these articles a second time.
18035
18036 @findex gnus-agent-regenerate
18037 @kindex M-x gnus-agent-regenerate
18038 The command @code{gnus-agent-regenerate} will perform
18039 @code{gnus-agent-regenerate-group} on every agentized group.  While
18040 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18041 recommended that you first close all summary buffers.
18042
18043 @findex gnus-agent-regenerate-group
18044 @kindex M-x gnus-agent-regenerate-group
18045 The command @code{gnus-agent-regenerate-group} uses the local copies
18046 of individual articles to repair the local @acronym{NOV}(header) database.  It
18047 then updates the internal data structures that document which articles
18048 are stored locally.  An optional argument will mark articles in the
18049 agent as unread.
18050
18051 @node Agent and IMAP
18052 @subsection Agent and IMAP
18053
18054 The Agent works with any Gnus back end, including nnimap.  However,
18055 since there are some conceptual differences between @acronym{NNTP} and
18056 @acronym{IMAP}, this section (should) provide you with some information to
18057 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18058
18059 The first thing to keep in mind is that all flags (read, ticked, etc)
18060 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18061 case for nntp.  Thus Gnus need to remember flag changes when
18062 disconnected, and synchronize these flags when you plug back in.
18063
18064 Gnus keeps track of flag changes when reading nnimap groups under the
18065 Agent.  When you plug back in, Gnus will check if you have any changed
18066 any flags and ask if you wish to synchronize these with the server.
18067 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18068
18069 @vindex gnus-agent-synchronize-flags
18070 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18071 never automatically synchronize flags.  If it is @code{ask}, which is
18072 the default, the Agent will check if you made any changes and if so
18073 ask if you wish to synchronize these when you re-connect.  If it has
18074 any other value, all flags will be synchronized automatically.
18075
18076 If you do not wish to synchronize flags automatically when you
18077 re-connect, you can do it manually with the
18078 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18079 in the group buffer.
18080
18081 Some things are currently not implemented in the Agent that you'd might
18082 expect from a disconnected @acronym{IMAP} client, including:
18083
18084 @itemize @bullet
18085
18086 @item
18087 Copying/moving articles into nnimap groups when unplugged.
18088
18089 @item
18090 Creating/deleting nnimap groups when unplugged.
18091
18092 @end itemize
18093
18094 Technical note: the synchronization algorithm does not work by ``pushing''
18095 all local flags to the server, but rather incrementally update the
18096 server view of flags by changing only those flags that were changed by
18097 the user.  Thus, if you set one flag on a article, quit the group and
18098 re-select the group and remove the flag; the flag will be set and
18099 removed from the server when you ``synchronize''.  The queued flag
18100 operations can be found in the per-server @code{flags} file in the Agent
18101 directory.  It's emptied when you synchronize flags.
18102
18103
18104 @node Outgoing Messages
18105 @subsection Outgoing Messages
18106
18107 When Gnus is unplugged, all outgoing messages (both mail and news) are
18108 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18109 them there after posting, and edit them at will.
18110
18111 When Gnus is plugged again, you can send the messages either from the
18112 draft group with the special commands available there, or you can use
18113 the @kbd{J S} command in the group buffer to send all the sendable
18114 messages in the draft group.
18115
18116
18117
18118 @node Agent Variables
18119 @subsection Agent Variables
18120
18121 @table @code
18122 @item gnus-agent-directory
18123 @vindex gnus-agent-directory
18124 Where the Gnus Agent will store its files.  The default is
18125 @file{~/News/agent/}.
18126
18127 @item gnus-agent-handle-level
18128 @vindex gnus-agent-handle-level
18129 Groups on levels (@pxref{Group Levels}) higher than this variable will
18130 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18131 which means that only subscribed group will be considered by the Agent
18132 by default.
18133
18134 @item gnus-agent-plugged-hook
18135 @vindex gnus-agent-plugged-hook
18136 Hook run when connecting to the network.
18137
18138 @item gnus-agent-unplugged-hook
18139 @vindex gnus-agent-unplugged-hook
18140 Hook run when disconnecting from the network.
18141
18142 @item gnus-agent-fetched-hook
18143 @vindex gnus-agent-fetched-hook
18144 Hook run when finished fetching articles.
18145
18146 @item gnus-agent-cache
18147 @vindex gnus-agent-cache
18148 Variable to control whether use the locally stored @acronym{NOV} and
18149 articles when plugged, e.g. essentially using the Agent as a cache.
18150 The default is non-@code{nil}, which means to use the Agent as a cache.
18151
18152 @item gnus-agent-go-online
18153 @vindex gnus-agent-go-online
18154 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18155 automatically switch offline servers into online status.  If it is
18156 @code{ask}, the default, the Agent will ask if you wish to switch
18157 offline servers into online status when you re-connect.  If it has any
18158 other value, all offline servers will be automatically switched into
18159 online status.
18160
18161 @item gnus-agent-mark-unread-after-downloaded
18162 @vindex gnus-agent-mark-unread-after-downloaded
18163 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18164 mark articles as unread after downloading.  This is usually a safe
18165 thing to do as the newly downloaded article has obviously not been
18166 read.  The default is t.
18167
18168 @item gnus-agent-consider-all-articles
18169 @vindex gnus-agent-consider-all-articles
18170 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18171 agent will fetch all missing headers.  When @code{nil}, the agent will
18172 fetch only new headers. The default is @code{nil}.
18173
18174 @item gnus-agent-max-fetch-size
18175 @vindex gnus-agent-max-fetch-size
18176 The agent fetches articles into a temporary buffer prior to parsing
18177 them into individual files.  To avoid exceeding the max. buffer size,
18178 the agent alternates between fetching and parsing until all articles
18179 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18180 limit to control how often the cycling occurs.  A large value improves
18181 performance.  A small value minimizes the time lost should the
18182 connection be lost while fetching (You may need to run
18183 @code{gnus-agent-regenerate-group} to update the group's state.
18184 However, all articles parsed prior to loosing the connection will be
18185 available while unplugged).  The default is 10M so it is unusual to
18186 see any cycling.
18187
18188 @item gnus-server-unopen-status
18189 @vindex gnus-server-unopen-status
18190 Perhaps not a Agent variable, but closely related to the Agent, this
18191 variable says what will happen if Gnus cannot open a server.  If the
18192 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18193 whether to deny the server or whether to unplug the agent.  If the
18194 Agent is disabled, Gnus always simply deny the server.  Other choices
18195 for this variable include @code{denied} and @code{offline} the latter
18196 is only valid if the Agent is used.
18197
18198 @item gnus-auto-goto-ignores
18199 @vindex gnus-auto-goto-ignores
18200 Another variable that isn't a Agent variable, yet so closely related
18201 that most will look for it here, this variable tells the summary
18202 buffer how to maneuver around undownloaded (only headers stored in the
18203 agent) and unfetched (neither article nor headers stored) articles.
18204
18205 The legal values are @code{nil} (maneuver to any article),
18206 @code{undownloaded} (maneuvering while unplugged ignores articles that
18207 have not been fetched), @code{always-undownloaded} (maneuvering always
18208 ignores articles that have not been fetched), @code{unfetched}
18209 (maneuvering ignores articles whose headers have not been fetched).
18210
18211 @end table
18212
18213
18214 @node Example Setup
18215 @subsection Example Setup
18216
18217 If you don't want to read this manual, and you have a fairly standard
18218 setup, you may be able to use something like the following as your
18219 @file{~/.gnus.el} file to get started.
18220
18221 @lisp
18222 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18223 ;;; @r{from your ISP's server.}
18224 (setq gnus-select-method '(nntp "news.your-isp.com"))
18225
18226 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18227 ;;; @r{your ISP's @acronym{POP} server.}
18228 (setq mail-sources '((pop :server "pop.your-isp.com")))
18229
18230 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18231 (setq gnus-secondary-select-methods '((nnml "")))
18232
18233 ;;; @r{Make Gnus into an offline newsreader.}
18234 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18235 ;;; (setq gnus-agent t) ; @r{Now the default.}
18236 @end lisp
18237
18238 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18239 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18240 gnus}.
18241
18242 If this is the first time you've run Gnus, you will be subscribed
18243 automatically to a few default newsgroups.  You'll probably want to
18244 subscribe to more groups, and to do that, you have to query the
18245 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18246 command.  This usually takes quite a while, but you only have to do it
18247 once.
18248
18249 After reading and parsing a while, you'll be presented with a list of
18250 groups.  Subscribe to the ones you want to read with the @kbd{u}
18251 command.  @kbd{l} to make all the killed groups disappear after you've
18252 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18253 back all the killed groups.)
18254
18255 You can now read the groups at once, or you can download the articles
18256 with the @kbd{J s} command.  And then read the rest of this manual to
18257 find out which of the other gazillion things you want to customize.
18258
18259
18260 @node Batching Agents
18261 @subsection Batching Agents
18262 @findex gnus-agent-batch
18263
18264 Having the Gnus Agent fetch articles (and post whatever messages you've
18265 written) is quite easy once you've gotten things set up properly.  The
18266 following shell script will do everything that is necessary:
18267
18268 You can run a complete batch command from the command line with the
18269 following incantation:
18270
18271 @example
18272 #!/bin/sh
18273 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18274 @end example
18275
18276
18277 @node Agent Caveats
18278 @subsection Agent Caveats
18279
18280 The Gnus Agent doesn't seem to work like most other offline
18281 newsreaders.  Here are some common questions that some imaginary people
18282 may ask:
18283
18284 @table @dfn
18285 @item If I read an article while plugged, do they get entered into the Agent?
18286
18287 @strong{No}.  If you want this behaviour, add
18288 @code{gnus-agent-fetch-selected-article} to
18289 @code{gnus-select-article-hook}.
18290
18291 @item If I read an article while plugged, and the article already exists in 
18292 the Agent, will it get downloaded once more?
18293
18294 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18295
18296 @end table
18297
18298 In short, when Gnus is unplugged, it only looks into the locally stored
18299 articles; when it's plugged, it talks to your ISP and may also use the
18300 locally stored articles.
18301
18302
18303 @node Scoring
18304 @chapter Scoring
18305 @cindex scoring
18306
18307 Other people use @dfn{kill files}, but we here at Gnus Towers like
18308 scoring better than killing, so we'd rather switch than fight.  They do
18309 something completely different as well, so sit up straight and pay
18310 attention!
18311
18312 @vindex gnus-summary-mark-below
18313 All articles have a default score (@code{gnus-summary-default-score}),
18314 which is 0 by default.  This score may be raised or lowered either
18315 interactively or by score files.  Articles that have a score lower than
18316 @code{gnus-summary-mark-below} are marked as read.
18317
18318 Gnus will read any @dfn{score files} that apply to the current group
18319 before generating the summary buffer.
18320
18321 There are several commands in the summary buffer that insert score
18322 entries based on the current article.  You can, for instance, ask Gnus to
18323 lower or increase the score of all articles with a certain subject.
18324
18325 There are two sorts of scoring entries: Permanent and temporary.
18326 Temporary score entries are self-expiring entries.  Any entries that are
18327 temporary and have not been used for, say, a week, will be removed
18328 silently to help keep the sizes of the score files down.
18329
18330 @menu
18331 * Summary Score Commands::      Adding score entries for the current group.
18332 * Group Score Commands::        General score commands.
18333 * Score Variables::             Customize your scoring.  (My, what terminology).
18334 * Score File Format::           What a score file may contain.
18335 * Score File Editing::          You can edit score files by hand as well.
18336 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18337 * Home Score File::             How to say where new score entries are to go.
18338 * Followups To Yourself::       Having Gnus notice when people answer you.
18339 * Scoring On Other Headers::    Scoring on non-standard headers.
18340 * Scoring Tips::                How to score effectively.
18341 * Reverse Scoring::             That problem child of old is not problem.
18342 * Global Score Files::          Earth-spanning, ear-splitting score files.
18343 * Kill Files::                  They are still here, but they can be ignored.
18344 * Converting Kill Files::       Translating kill files to score files.
18345 * GroupLens::                   Getting predictions on what you like to read.
18346 * Advanced Scoring::            Using logical expressions to build score rules.
18347 * Score Decays::                It can be useful to let scores wither away.
18348 @end menu
18349
18350
18351 @node Summary Score Commands
18352 @section Summary Score Commands
18353 @cindex score commands
18354
18355 The score commands that alter score entries do not actually modify real
18356 score files.  That would be too inefficient.  Gnus maintains a cache of
18357 previously loaded score files, one of which is considered the
18358 @dfn{current score file alist}.  The score commands simply insert
18359 entries into this list, and upon group exit, this list is saved.
18360
18361 The current score file is by default the group's local score file, even
18362 if no such score file actually exists.  To insert score commands into
18363 some other score file (e.g. @file{all.SCORE}), you must first make this
18364 score file the current one.
18365
18366 General score commands that don't actually change the score file:
18367
18368 @table @kbd
18369
18370 @item V s
18371 @kindex V s (Summary)
18372 @findex gnus-summary-set-score
18373 Set the score of the current article (@code{gnus-summary-set-score}).
18374
18375 @item V S
18376 @kindex V S (Summary)
18377 @findex gnus-summary-current-score
18378 Display the score of the current article
18379 (@code{gnus-summary-current-score}).
18380
18381 @item V t
18382 @kindex V t (Summary)
18383 @findex gnus-score-find-trace
18384 Display all score rules that have been used on the current article
18385 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18386 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18387 When point is on a string within the match element, @kbd{e} will try to
18388 bring you to this string in the score file.
18389
18390 @item V w
18391 @kindex V w (Summary)
18392 @findex gnus-score-find-favourite-words
18393 List words used in scoring (@code{gnus-score-find-favourite-words}).
18394
18395 @item V R
18396 @kindex V R (Summary)
18397 @findex gnus-summary-rescore
18398 Run the current summary through the scoring process
18399 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18400 around with your score files behind Gnus' back and want to see the
18401 effect you're having.
18402
18403 @item V c
18404 @kindex V c (Summary)
18405 @findex gnus-score-change-score-file
18406 Make a different score file the current
18407 (@code{gnus-score-change-score-file}).
18408
18409 @item V e
18410 @kindex V e (Summary)
18411 @findex gnus-score-edit-current-scores
18412 Edit the current score file (@code{gnus-score-edit-current-scores}).
18413 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18414 File Editing}).
18415
18416 @item V f
18417 @kindex V f (Summary)
18418 @findex gnus-score-edit-file
18419 Edit a score file and make this score file the current one
18420 (@code{gnus-score-edit-file}).
18421
18422 @item V F
18423 @kindex V F (Summary)
18424 @findex gnus-score-flush-cache
18425 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18426 after editing score files.
18427
18428 @item V C
18429 @kindex V C (Summary)
18430 @findex gnus-score-customize
18431 Customize a score file in a visually pleasing manner
18432 (@code{gnus-score-customize}).
18433
18434 @end table
18435
18436 The rest of these commands modify the local score file.
18437
18438 @table @kbd
18439
18440 @item V m
18441 @kindex V m (Summary)
18442 @findex gnus-score-set-mark-below
18443 Prompt for a score, and mark all articles with a score below this as
18444 read (@code{gnus-score-set-mark-below}).
18445
18446 @item V x
18447 @kindex V x (Summary)
18448 @findex gnus-score-set-expunge-below
18449 Prompt for a score, and add a score rule to the current score file to
18450 expunge all articles below this score
18451 (@code{gnus-score-set-expunge-below}).
18452 @end table
18453
18454 The keystrokes for actually making score entries follow a very regular
18455 pattern, so there's no need to list all the commands.  (Hundreds of
18456 them.)
18457
18458 @findex gnus-summary-increase-score
18459 @findex gnus-summary-lower-score
18460
18461 @enumerate
18462 @item
18463 The first key is either @kbd{I} (upper case i) for increasing the score
18464 or @kbd{L} for lowering the score.
18465 @item
18466 The second key says what header you want to score on.  The following
18467 keys are available:
18468 @table @kbd
18469
18470 @item a
18471 Score on the author name.
18472
18473 @item s
18474 Score on the subject line.
18475
18476 @item x
18477 Score on the @code{Xref} line---i.e., the cross-posting line.
18478
18479 @item r
18480 Score on the @code{References} line.
18481
18482 @item d
18483 Score on the date.
18484
18485 @item l
18486 Score on the number of lines.
18487
18488 @item i
18489 Score on the @code{Message-ID} header.
18490
18491 @item e
18492 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18493 if your @acronym{NNTP} server tracks additional header data in overviews.
18494
18495 @item f
18496 Score on followups---this matches the author name, and adds scores to
18497 the followups to this author.  (Using this key leads to the creation of
18498 @file{ADAPT} files.)
18499
18500 @item b
18501 Score on the body.
18502
18503 @item h
18504 Score on the head.
18505
18506 @item t
18507 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18508 files.)
18509
18510 @end table
18511
18512 @item
18513 The third key is the match type.  Which match types are valid depends on
18514 what headers you are scoring on.
18515
18516 @table @code
18517
18518 @item strings
18519
18520 @table @kbd
18521
18522 @item e
18523 Exact matching.
18524
18525 @item s
18526 Substring matching.
18527
18528 @item f
18529 Fuzzy matching (@pxref{Fuzzy Matching}).
18530
18531 @item r
18532 Regexp matching
18533 @end table
18534
18535 @item date
18536 @table @kbd
18537
18538 @item b
18539 Before date.
18540
18541 @item a
18542 After date.
18543
18544 @item n
18545 This date.
18546 @end table
18547
18548 @item number
18549 @table @kbd
18550
18551 @item <
18552 Less than number.
18553
18554 @item =
18555 Equal to number.
18556
18557 @item >
18558 Greater than number.
18559 @end table
18560 @end table
18561
18562 @item
18563 The fourth and usually final key says whether this is a temporary (i.e.,
18564 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18565 or whether it is to be done immediately, without adding to the score
18566 file.
18567 @table @kbd
18568
18569 @item t
18570 Temporary score entry.
18571
18572 @item p
18573 Permanent score entry.
18574
18575 @item i
18576 Immediately scoring.
18577 @end table
18578
18579 @item
18580 If you are scoring on `e' (extra) headers, you will then be prompted for
18581 the header name on which you wish to score.  This must be a header named
18582 in gnus-extra-headers, and @samp{TAB} completion is available.
18583
18584 @end enumerate
18585
18586 So, let's say you want to increase the score on the current author with
18587 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18588 score based on the subject line, using substring matching, and make a
18589 temporary score entry: @kbd{L s s t}.  Pretty easy.
18590
18591 To make things a bit more complicated, there are shortcuts.  If you use
18592 a capital letter on either the second or third keys, Gnus will use
18593 defaults for the remaining one or two keystrokes.  The defaults are
18594 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18595 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18596
18597 These functions take both the numerical prefix and the symbolic prefix
18598 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18599 (or increase) the score of the article.  A symbolic prefix of @code{a}
18600 says to use the @file{all.SCORE} file for the command instead of the
18601 current score file.
18602
18603 @vindex gnus-score-mimic-keymap
18604 The @code{gnus-score-mimic-keymap} says whether these commands will
18605 pretend they are keymaps or not.
18606
18607
18608 @node Group Score Commands
18609 @section Group Score Commands
18610 @cindex group score commands
18611
18612 There aren't many of these as yet, I'm afraid.
18613
18614 @table @kbd
18615
18616 @item W f
18617 @kindex W f (Group)
18618 @findex gnus-score-flush-cache
18619 Gnus maintains a cache of score alists to avoid having to reload them
18620 all the time.  This command will flush the cache
18621 (@code{gnus-score-flush-cache}).
18622
18623 @end table
18624
18625 You can do scoring from the command line by saying something like:
18626
18627 @findex gnus-batch-score
18628 @cindex batch scoring
18629 @example
18630 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18631 @end example
18632
18633
18634 @node Score Variables
18635 @section Score Variables
18636 @cindex score variables
18637
18638 @table @code
18639
18640 @item gnus-use-scoring
18641 @vindex gnus-use-scoring
18642 If @code{nil}, Gnus will not check for score files, and will not, in
18643 general, do any score-related work.  This is @code{t} by default.
18644
18645 @item gnus-kill-killed
18646 @vindex gnus-kill-killed
18647 If this variable is @code{nil}, Gnus will never apply score files to
18648 articles that have already been through the kill process.  While this
18649 may save you lots of time, it also means that if you apply a kill file
18650 to a group, and then change the kill file and want to run it over you
18651 group again to kill more articles, it won't work.  You have to set this
18652 variable to @code{t} to do that.  (It is @code{t} by default.)
18653
18654 @item gnus-kill-files-directory
18655 @vindex gnus-kill-files-directory
18656 All kill and score files will be stored in this directory, which is
18657 initialized from the @env{SAVEDIR} environment variable by default.
18658 This is @file{~/News/} by default.
18659
18660 @item gnus-score-file-suffix
18661 @vindex gnus-score-file-suffix
18662 Suffix to add to the group name to arrive at the score file name
18663 (@file{SCORE} by default.)
18664
18665 @item gnus-score-uncacheable-files
18666 @vindex gnus-score-uncacheable-files
18667 @cindex score cache
18668 All score files are normally cached to avoid excessive re-loading of
18669 score files.  However, if this might make your Emacs grow big and
18670 bloated, so this regexp can be used to weed out score files unlikely
18671 to be needed again.  It would be a bad idea to deny caching of
18672 @file{all.SCORE}, while it might be a good idea to not cache
18673 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18674 variable is @samp{ADAPT$} by default, so no adaptive score files will
18675 be cached.
18676
18677 @item gnus-save-score
18678 @vindex gnus-save-score
18679 If you have really complicated score files, and do lots of batch
18680 scoring, then you might set this variable to @code{t}.  This will make
18681 Gnus save the scores into the @file{.newsrc.eld} file.
18682
18683 If you do not set this to @code{t}, then manual scores (like those set
18684 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18685 across group visits.
18686
18687 @item gnus-score-interactive-default-score
18688 @vindex gnus-score-interactive-default-score
18689 Score used by all the interactive raise/lower commands to raise/lower
18690 score with.  Default is 1000, which may seem excessive, but this is to
18691 ensure that the adaptive scoring scheme gets enough room to play with.
18692 We don't want the small changes from the adaptive scoring to overwrite
18693 manually entered data.
18694
18695 @item gnus-summary-default-score
18696 @vindex gnus-summary-default-score
18697 Default score of an article, which is 0 by default.
18698
18699 @item gnus-summary-expunge-below
18700 @vindex gnus-summary-expunge-below
18701 Don't display the summary lines of articles that have scores lower than
18702 this variable.  This is @code{nil} by default, which means that no
18703 articles will be hidden.  This variable is local to the summary buffers,
18704 and has to be set from @code{gnus-summary-mode-hook}.
18705
18706 @item gnus-score-over-mark
18707 @vindex gnus-score-over-mark
18708 Mark (in the third column) used for articles with a score over the
18709 default.  Default is @samp{+}.
18710
18711 @item gnus-score-below-mark
18712 @vindex gnus-score-below-mark
18713 Mark (in the third column) used for articles with a score below the
18714 default.  Default is @samp{-}.
18715
18716 @item gnus-score-find-score-files-function
18717 @vindex gnus-score-find-score-files-function
18718 Function used to find score files for the current group.  This function
18719 is called with the name of the group as the argument.
18720
18721 Predefined functions available are:
18722 @table @code
18723
18724 @item gnus-score-find-single
18725 @findex gnus-score-find-single
18726 Only apply the group's own score file.
18727
18728 @item gnus-score-find-bnews
18729 @findex gnus-score-find-bnews
18730 Apply all score files that match, using bnews syntax.  This is the
18731 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18732 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18733 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18734 @samp{all} in the score file names are translated into @samp{.*}, and
18735 then a regexp match is done.
18736
18737 This means that if you have some score entries that you want to apply to
18738 all groups, then you put those entries in the @file{all.SCORE} file.
18739
18740 The score files are applied in a semi-random order, although Gnus will
18741 try to apply the more general score files before the more specific score
18742 files.  It does this by looking at the number of elements in the score
18743 file names---discarding the @samp{all} elements.
18744
18745 @item gnus-score-find-hierarchical
18746 @findex gnus-score-find-hierarchical
18747 Apply all score files from all the parent groups.  This means that you
18748 can't have score files like @file{all.SCORE}, but you can have
18749 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18750 server.
18751
18752 @end table
18753 This variable can also be a list of functions.  In that case, all
18754 these functions will be called with the group name as argument, and
18755 all the returned lists of score files will be applied.  These
18756 functions can also return lists of lists of score alists directly.  In
18757 that case, the functions that return these non-file score alists
18758 should probably be placed before the ``real'' score file functions, to
18759 ensure that the last score file returned is the local score file.
18760 Phu.
18761
18762 For example, to do hierarchical scoring but use a non-server-specific
18763 overall score file, you could use the value
18764 @example
18765 (list (lambda (group) ("all.SCORE"))
18766       'gnus-score-find-hierarchical)
18767 @end example
18768
18769 @item gnus-score-expiry-days
18770 @vindex gnus-score-expiry-days
18771 This variable says how many days should pass before an unused score file
18772 entry is expired.  If this variable is @code{nil}, no score file entries
18773 are expired.  It's 7 by default.
18774
18775 @item gnus-update-score-entry-dates
18776 @vindex gnus-update-score-entry-dates
18777 If this variable is non-@code{nil}, temporary score entries that have
18778 been triggered (matched) will have their dates updated.  (This is how Gnus
18779 controls expiry---all non-matched-entries will become too old while
18780 matched entries will stay fresh and young.)  However, if you set this
18781 variable to @code{nil}, even matched entries will grow old and will
18782 have to face that oh-so grim reaper.
18783
18784 @item gnus-score-after-write-file-function
18785 @vindex gnus-score-after-write-file-function
18786 Function called with the name of the score file just written.
18787
18788 @item gnus-score-thread-simplify
18789 @vindex gnus-score-thread-simplify
18790 If this variable is non-@code{nil}, article subjects will be
18791 simplified for subject scoring purposes in the same manner as with
18792 threading---according to the current value of
18793 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18794 @code{substring} or @code{exact} matching, the match will also be
18795 simplified in this manner.
18796
18797 @end table
18798
18799
18800 @node Score File Format
18801 @section Score File Format
18802 @cindex score file format
18803
18804 A score file is an @code{emacs-lisp} file that normally contains just a
18805 single form.  Casual users are not expected to edit these files;
18806 everything can be changed from the summary buffer.
18807
18808 Anyway, if you'd like to dig into it yourself, here's an example:
18809
18810 @lisp
18811 (("from"
18812   ("Lars Ingebrigtsen" -10000)
18813   ("Per Abrahamsen")
18814   ("larsi\\|lmi" -50000 nil R))
18815  ("subject"
18816   ("Ding is Badd" nil 728373))
18817  ("xref"
18818   ("alt.politics" -1000 728372 s))
18819  ("lines"
18820   (2 -100 nil <))
18821  (mark 0)
18822  (expunge -1000)
18823  (mark-and-expunge -10)
18824  (read-only nil)
18825  (orphan -10)
18826  (adapt t)
18827  (files "/hom/larsi/News/gnu.SCORE")
18828  (exclude-files "all.SCORE")
18829  (local (gnus-newsgroup-auto-expire t)
18830         (gnus-summary-make-false-root empty))
18831  (eval (ding)))
18832 @end lisp
18833
18834 This example demonstrates most score file elements.  For a different
18835 approach, see @pxref{Advanced Scoring}.
18836
18837 Even though this looks much like Lisp code, nothing here is actually
18838 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18839 has to be valid syntactically, if not semantically.
18840
18841 Six keys are supported by this alist:
18842
18843 @table @code
18844
18845 @item STRING
18846 If the key is a string, it is the name of the header to perform the
18847 match on.  Scoring can only be performed on these eight headers:
18848 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18849 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18850 these headers, there are three strings to tell Gnus to fetch the entire
18851 article and do the match on larger parts of the article: @code{Body}
18852 will perform the match on the body of the article, @code{Head} will
18853 perform the match on the head of the article, and @code{All} will
18854 perform the match on the entire article.  Note that using any of these
18855 last three keys will slow down group entry @emph{considerably}.  The
18856 final ``header'' you can score on is @code{Followup}.  These score
18857 entries will result in new score entries being added for all follow-ups
18858 to articles that matches these score entries.
18859
18860 Following this key is a arbitrary number of score entries, where each
18861 score entry has one to four elements.
18862 @enumerate
18863
18864 @item
18865 The first element is the @dfn{match element}.  On most headers this will
18866 be a string, but on the Lines and Chars headers, this must be an
18867 integer.
18868
18869 @item
18870 If the second element is present, it should be a number---the @dfn{score
18871 element}.  This number should be an integer in the neginf to posinf
18872 interval.  This number is added to the score of the article if the match
18873 is successful.  If this element is not present, the
18874 @code{gnus-score-interactive-default-score} number will be used
18875 instead.  This is 1000 by default.
18876
18877 @item
18878 If the third element is present, it should be a number---the @dfn{date
18879 element}.  This date says when the last time this score entry matched,
18880 which provides a mechanism for expiring the score entries.  It this
18881 element is not present, the score entry is permanent.  The date is
18882 represented by the number of days since December 31, 1 BCE.
18883
18884 @item
18885 If the fourth element is present, it should be a symbol---the @dfn{type
18886 element}.  This element specifies what function should be used to see
18887 whether this score entry matches the article.  What match types that can
18888 be used depends on what header you wish to perform the match on.
18889 @table @dfn
18890
18891 @item From, Subject, References, Xref, Message-ID
18892 For most header types, there are the @code{r} and @code{R} (regexp), as
18893 well as @code{s} and @code{S} (substring) types, and @code{e} and
18894 @code{E} (exact match), and @code{w} (word match) types.  If this
18895 element is not present, Gnus will assume that substring matching should
18896 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18897 that the matches will be done in a case-sensitive manner.  All these
18898 one-letter types are really just abbreviations for the @code{regexp},
18899 @code{string}, @code{exact}, and @code{word} types, which you can use
18900 instead, if you feel like.
18901
18902 @item Extra
18903 Just as for the standard string overview headers, if you are using
18904 gnus-extra-headers, you can score on these headers' values.  In this
18905 case, there is a 5th element in the score entry, being the name of the
18906 header to be scored.  The following entry is useful in your
18907 @file{all.SCORE} file in case of spam attacks from a single origin host,
18908 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
18909
18910 @lisp
18911 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
18912 @end lisp
18913
18914 @item Lines, Chars
18915 These two headers use different match types: @code{<}, @code{>},
18916 @code{=}, @code{>=} and @code{<=}.
18917
18918 These predicates are true if
18919
18920 @example
18921 (PREDICATE HEADER MATCH)
18922 @end example
18923
18924 evaluates to non-@code{nil}.  For instance, the advanced match
18925 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
18926 following form:
18927
18928 @lisp
18929 (< header-value 4)
18930 @end lisp
18931
18932 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
18933 the match, we get the score added if the article has less than 4 lines.
18934 (It's easy to get confused and think it's the other way around.  But
18935 it's not.  I think.)
18936
18937 When matching on @code{Lines}, be careful because some back ends (like
18938 @code{nndir}) do not generate @code{Lines} header, so every article ends
18939 up being marked as having 0 lines.  This can lead to strange results if
18940 you happen to lower score of the articles with few lines.
18941
18942 @item Date
18943 For the Date header we have three kinda silly match types:
18944 @code{before}, @code{at} and @code{after}.  I can't really imagine this
18945 ever being useful, but, like, it would feel kinda silly not to provide
18946 this function.  Just in case.  You never know.  Better safe than sorry.
18947 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
18948 sex on a first date.  (I have been told that at least one person, and I
18949 quote, ``found this function indispensable'', however.)
18950
18951 @cindex ISO8601
18952 @cindex date
18953 A more useful match type is @code{regexp}.  With it, you can match the
18954 date string using a regular expression.  The date is normalized to
18955 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
18956 you want to match all articles that have been posted on April 1st in
18957 every year, you could use @samp{....0401.........} as a match string,
18958 for instance.  (Note that the date is kept in its original time zone, so
18959 this will match articles that were posted when it was April 1st where
18960 the article was posted from.  Time zones are such wholesome fun for the
18961 whole family, eh?)
18962
18963 @item Head, Body, All
18964 These three match keys use the same match types as the @code{From} (etc)
18965 header uses.
18966
18967 @item Followup
18968 This match key is somewhat special, in that it will match the
18969 @code{From} header, and affect the score of not only the matching
18970 articles, but also all followups to the matching articles.  This allows
18971 you e.g. increase the score of followups to your own articles, or
18972 decrease the score of followups to the articles of some known
18973 trouble-maker.  Uses the same match types as the @code{From} header
18974 uses.  (Using this match key will lead to creation of @file{ADAPT}
18975 files.)
18976
18977 @item Thread
18978 This match key works along the same lines as the @code{Followup} match
18979 key.  If you say that you want to score on a (sub-)thread started by an
18980 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18981 match.  This will add a new @samp{thread} match for each article that
18982 has @var{x} in its @code{References} header.  (These new @samp{thread}
18983 matches will use the @code{Message-ID}s of these matching articles.)
18984 This will ensure that you can raise/lower the score of an entire thread,
18985 even though some articles in the thread may not have complete
18986 @code{References} headers.  Note that using this may lead to
18987 undeterministic scores of the articles in the thread.  (Using this match
18988 key will lead to creation of @file{ADAPT} files.)
18989 @end table
18990 @end enumerate
18991
18992 @cindex score file atoms
18993 @item mark
18994 The value of this entry should be a number.  Any articles with a score
18995 lower than this number will be marked as read.
18996
18997 @item expunge
18998 The value of this entry should be a number.  Any articles with a score
18999 lower than this number will be removed from the summary buffer.
19000
19001 @item mark-and-expunge
19002 The value of this entry should be a number.  Any articles with a score
19003 lower than this number will be marked as read and removed from the
19004 summary buffer.
19005
19006 @item thread-mark-and-expunge
19007 The value of this entry should be a number.  All articles that belong to
19008 a thread that has a total score below this number will be marked as read
19009 and removed from the summary buffer.  @code{gnus-thread-score-function}
19010 says how to compute the total score for a thread.
19011
19012 @item files
19013 The value of this entry should be any number of file names.  These files
19014 are assumed to be score files as well, and will be loaded the same way
19015 this one was.
19016
19017 @item exclude-files
19018 The clue of this entry should be any number of files.  These files will
19019 not be loaded, even though they would normally be so, for some reason or
19020 other.
19021
19022 @item eval
19023 The value of this entry will be @code{eval}el.  This element will be
19024 ignored when handling global score files.
19025
19026 @item read-only
19027 Read-only score files will not be updated or saved.  Global score files
19028 should feature this atom (@pxref{Global Score Files}).  (Note:
19029 @dfn{Global} here really means @dfn{global}; not your personal
19030 apply-to-all-groups score files.)
19031
19032 @item orphan
19033 The value of this entry should be a number.  Articles that do not have
19034 parents will get this number added to their scores.  Imagine you follow
19035 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19036 will only follow a few of the threads, also want to see any new threads.
19037
19038 You can do this with the following two score file entries:
19039
19040 @example
19041         (orphan -500)
19042         (mark-and-expunge -100)
19043 @end example
19044
19045 When you enter the group the first time, you will only see the new
19046 threads.  You then raise the score of the threads that you find
19047 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19048 rest.  Next time you enter the group, you will see new articles in the
19049 interesting threads, plus any new threads.
19050
19051 I.e.---the orphan score atom is for high-volume groups where a few
19052 interesting threads which can't be found automatically by ordinary
19053 scoring rules exist.
19054
19055 @item adapt
19056 This entry controls the adaptive scoring.  If it is @code{t}, the
19057 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19058 adaptive scoring will be performed on this group.  If it is a list, this
19059 list will be used as the adaptive scoring rules.  If it isn't present,
19060 or is something other than @code{t} or @code{ignore}, the default
19061 adaptive scoring rules will be used.  If you want to use adaptive
19062 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19063 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19064 not want adaptive scoring.  If you only want adaptive scoring in a few
19065 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19066 insert @code{(adapt t)} in the score files of the groups where you want
19067 it.
19068
19069 @item adapt-file
19070 All adaptive score entries will go to the file named by this entry.  It
19071 will also be applied when entering the group.  This atom might be handy
19072 if you want to adapt on several groups at once, using the same adaptive
19073 file for a number of groups.
19074
19075 @item local
19076 @cindex local variables
19077 The value of this entry should be a list of @code{(@var{var}
19078 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19079 current summary buffer, and set to the value specified.  This is a
19080 convenient, if somewhat strange, way of setting variables in some
19081 groups if you don't like hooks much.  Note that the @var{value} won't
19082 be evaluated.
19083 @end table
19084
19085
19086 @node Score File Editing
19087 @section Score File Editing
19088
19089 You normally enter all scoring commands from the summary buffer, but you
19090 might feel the urge to edit them by hand as well, so we've supplied you
19091 with a mode for that.
19092
19093 It's simply a slightly customized @code{emacs-lisp} mode, with these
19094 additional commands:
19095
19096 @table @kbd
19097
19098 @item C-c C-c
19099 @kindex C-c C-c (Score)
19100 @findex gnus-score-edit-done
19101 Save the changes you have made and return to the summary buffer
19102 (@code{gnus-score-edit-done}).
19103
19104 @item C-c C-d
19105 @kindex C-c C-d (Score)
19106 @findex gnus-score-edit-insert-date
19107 Insert the current date in numerical format
19108 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19109 you were wondering.
19110
19111 @item C-c C-p
19112 @kindex C-c C-p (Score)
19113 @findex gnus-score-pretty-print
19114 The adaptive score files are saved in an unformatted fashion.  If you
19115 intend to read one of these files, you want to @dfn{pretty print} it
19116 first.  This command (@code{gnus-score-pretty-print}) does that for
19117 you.
19118
19119 @end table
19120
19121 Type @kbd{M-x gnus-score-mode} to use this mode.
19122
19123 @vindex gnus-score-mode-hook
19124 @code{gnus-score-menu-hook} is run in score mode buffers.
19125
19126 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19127 e} to begin editing score files.
19128
19129
19130 @node Adaptive Scoring
19131 @section Adaptive Scoring
19132 @cindex adaptive scoring
19133
19134 If all this scoring is getting you down, Gnus has a way of making it all
19135 happen automatically---as if by magic.  Or rather, as if by artificial
19136 stupidity, to be precise.
19137
19138 @vindex gnus-use-adaptive-scoring
19139 When you read an article, or mark an article as read, or kill an
19140 article, you leave marks behind.  On exit from the group, Gnus can sniff
19141 these marks and add score elements depending on what marks it finds.
19142 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19143 @code{t} or @code{(line)}.  If you want score adaptively on separate
19144 words appearing in the subjects, you should set this variable to
19145 @code{(word)}.  If you want to use both adaptive methods, set this
19146 variable to @code{(word line)}.
19147
19148 @vindex gnus-default-adaptive-score-alist
19149 To give you complete control over the scoring process, you can customize
19150 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19151 might look something like this:
19152
19153 @lisp
19154 (setq gnus-default-adaptive-score-alist
19155   '((gnus-unread-mark)
19156     (gnus-ticked-mark (from 4))
19157     (gnus-dormant-mark (from 5))
19158     (gnus-del-mark (from -4) (subject -1))
19159     (gnus-read-mark (from 4) (subject 2))
19160     (gnus-expirable-mark (from -1) (subject -1))
19161     (gnus-killed-mark (from -1) (subject -3))
19162     (gnus-kill-file-mark)
19163     (gnus-ancient-mark)
19164     (gnus-low-score-mark)
19165     (gnus-catchup-mark (from -1) (subject -1))))
19166 @end lisp
19167
19168 As you see, each element in this alist has a mark as a key (either a
19169 variable name or a ``real'' mark---a character).  Following this key is
19170 a arbitrary number of header/score pairs.  If there are no header/score
19171 pairs following the key, no adaptive scoring will be done on articles
19172 that have that key as the article mark.  For instance, articles with
19173 @code{gnus-unread-mark} in the example above will not get adaptive score
19174 entries.
19175
19176 Each article can have only one mark, so just a single of these rules
19177 will be applied to each article.
19178
19179 To take @code{gnus-del-mark} as an example---this alist says that all
19180 articles that have that mark (i.e., are marked with @samp{e}) will have a
19181 score entry added to lower based on the @code{From} header by -4, and
19182 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19183
19184 If you have marked 10 articles with the same subject with
19185 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19186 That means that that subject will get a score of ten times -1, which
19187 should be, unless I'm much mistaken, -10.
19188
19189 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19190 the read articles will be marked with the @samp{E} mark.  This'll
19191 probably make adaptive scoring slightly impossible, so auto-expiring and
19192 adaptive scoring doesn't really mix very well.
19193
19194 The headers you can score on are @code{from}, @code{subject},
19195 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19196 @code{chars} and @code{date}.  In addition, you can score on
19197 @code{followup}, which will create an adaptive score entry that matches
19198 on the @code{References} header using the @code{Message-ID} of the
19199 current article, thereby matching the following thread.
19200
19201 If you use this scheme, you should set the score file atom @code{mark}
19202 to something small---like -300, perhaps, to avoid having small random
19203 changes result in articles getting marked as read.
19204
19205 After using adaptive scoring for a week or so, Gnus should start to
19206 become properly trained and enhance the authors you like best, and kill
19207 the authors you like least, without you having to say so explicitly.
19208
19209 You can control what groups the adaptive scoring is to be performed on
19210 by using the score files (@pxref{Score File Format}).  This will also
19211 let you use different rules in different groups.
19212
19213 @vindex gnus-adaptive-file-suffix
19214 The adaptive score entries will be put into a file where the name is the
19215 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19216 is @file{ADAPT}.
19217
19218 @vindex gnus-score-exact-adapt-limit
19219 When doing adaptive scoring, substring or fuzzy matching would probably
19220 give you the best results in most cases.  However, if the header one
19221 matches is short, the possibility for false positives is great, so if
19222 the length of the match is less than
19223 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19224 this variable is @code{nil}, exact matching will always be used to avoid
19225 this problem.
19226
19227 @vindex gnus-default-adaptive-word-score-alist
19228 As mentioned above, you can adapt either on individual words or entire
19229 headers.  If you adapt on words, the
19230 @code{gnus-default-adaptive-word-score-alist} variable says what score
19231 each instance of a word should add given a mark.
19232
19233 @lisp
19234 (setq gnus-default-adaptive-word-score-alist
19235       `((,gnus-read-mark . 30)
19236         (,gnus-catchup-mark . -10)
19237         (,gnus-killed-mark . -20)
19238         (,gnus-del-mark . -15)))
19239 @end lisp
19240
19241 This is the default value.  If you have adaption on words enabled, every
19242 word that appears in subjects of articles marked with
19243 @code{gnus-read-mark} will result in a score rule that increase the
19244 score with 30 points.
19245
19246 @vindex gnus-default-ignored-adaptive-words
19247 @vindex gnus-ignored-adaptive-words
19248 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19249 will be ignored.  If you wish to add more words to be ignored, use the
19250 @code{gnus-ignored-adaptive-words} list instead.
19251
19252 @vindex gnus-adaptive-word-length-limit
19253 Some may feel that short words shouldn't count when doing adaptive
19254 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19255 an integer.  Words shorter than this number will be ignored.  This
19256 variable defaults to @code{nil}.
19257
19258 @vindex gnus-adaptive-word-syntax-table
19259 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19260 syntax table in effect.  It is similar to the standard syntax table, but
19261 it considers numbers to be non-word-constituent characters.
19262
19263 @vindex gnus-adaptive-word-minimum
19264 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19265 word scoring process will never bring down the score of an article to
19266 below this number.  The default is @code{nil}.
19267
19268 @vindex gnus-adaptive-word-no-group-words
19269 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19270 won't adaptively word score any of the words in the group name.  Useful
19271 for groups like @samp{comp.editors.emacs}, where most of the subject
19272 lines contain the word @samp{emacs}.
19273
19274 After using this scheme for a while, it might be nice to write a
19275 @code{gnus-psychoanalyze-user} command to go through the rules and see
19276 what words you like and what words you don't like.  Or perhaps not.
19277
19278 Note that the adaptive word scoring thing is highly experimental and is
19279 likely to change in the future.  Initial impressions seem to indicate
19280 that it's totally useless as it stands.  Some more work (involving more
19281 rigorous statistical methods) will have to be done to make this useful.
19282
19283
19284 @node Home Score File
19285 @section Home Score File
19286
19287 The score file where new score file entries will go is called the
19288 @dfn{home score file}.  This is normally (and by default) the score file
19289 for the group itself.  For instance, the home score file for
19290 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19291
19292 However, this may not be what you want.  It is often convenient to share
19293 a common home score file among many groups---all @samp{emacs} groups
19294 could perhaps use the same home score file.
19295
19296 @vindex gnus-home-score-file
19297 The variable that controls this is @code{gnus-home-score-file}.  It can
19298 be:
19299
19300 @enumerate
19301 @item
19302 A string.  Then this file will be used as the home score file for all
19303 groups.
19304
19305 @item
19306 A function.  The result of this function will be used as the home score
19307 file.  The function will be called with the name of the group as the
19308 parameter.
19309
19310 @item
19311 A list.  The elements in this list can be:
19312
19313 @enumerate
19314 @item
19315 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19316 group name, the @var{file-name} will be used as the home score file.
19317
19318 @item
19319 A function.  If the function returns non-@code{nil}, the result will
19320 be used as the home score file.
19321
19322 @item
19323 A string.  Use the string as the home score file.
19324 @end enumerate
19325
19326 The list will be traversed from the beginning towards the end looking
19327 for matches.
19328
19329 @end enumerate
19330
19331 So, if you want to use just a single score file, you could say:
19332
19333 @lisp
19334 (setq gnus-home-score-file
19335       "my-total-score-file.SCORE")
19336 @end lisp
19337
19338 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19339 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19340
19341 @findex gnus-hierarchial-home-score-file
19342 @lisp
19343 (setq gnus-home-score-file
19344       'gnus-hierarchial-home-score-file)
19345 @end lisp
19346
19347 This is a ready-made function provided for your convenience.
19348 Other functions include
19349
19350 @table @code
19351 @item gnus-current-home-score-file
19352 @findex gnus-current-home-score-file
19353 Return the ``current'' regular score file.  This will make scoring
19354 commands add entry to the ``innermost'' matching score file.
19355
19356 @end table
19357
19358 If you want to have one score file for the @samp{emacs} groups and
19359 another for the @samp{comp} groups, while letting all other groups use
19360 their own home score files:
19361
19362 @lisp
19363 (setq gnus-home-score-file
19364       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19365       '(("\\.emacs" "emacs.SCORE")
19366         ;; @r{All the comp groups in one score file}
19367         ("^comp" "comp.SCORE")))
19368 @end lisp
19369
19370 @vindex gnus-home-adapt-file
19371 @code{gnus-home-adapt-file} works exactly the same way as
19372 @code{gnus-home-score-file}, but says what the home adaptive score file
19373 is instead.  All new adaptive file entries will go into the file
19374 specified by this variable, and the same syntax is allowed.
19375
19376 In addition to using @code{gnus-home-score-file} and
19377 @code{gnus-home-adapt-file}, you can also use group parameters
19378 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19379 Parameters}) to achieve much the same.  Group and topic parameters take
19380 precedence over this variable.
19381
19382
19383 @node Followups To Yourself
19384 @section Followups To Yourself
19385
19386 Gnus offers two commands for picking out the @code{Message-ID} header in
19387 the current buffer.  Gnus will then add a score rule that scores using
19388 this @code{Message-ID} on the @code{References} header of other
19389 articles.  This will, in effect, increase the score of all articles that
19390 respond to the article in the current buffer.  Quite useful if you want
19391 to easily note when people answer what you've said.
19392
19393 @table @code
19394
19395 @item gnus-score-followup-article
19396 @findex gnus-score-followup-article
19397 This will add a score to articles that directly follow up your own
19398 article.
19399
19400 @item gnus-score-followup-thread
19401 @findex gnus-score-followup-thread
19402 This will add a score to all articles that appear in a thread ``below''
19403 your own article.
19404 @end table
19405
19406 @vindex message-sent-hook
19407 These two functions are both primarily meant to be used in hooks like
19408 @code{message-sent-hook}, like this:
19409 @lisp
19410 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19411 @end lisp
19412
19413
19414 If you look closely at your own @code{Message-ID}, you'll notice that
19415 the first two or three characters are always the same.  Here's two of
19416 mine:
19417
19418 @example
19419 <x6u3u47icf.fsf@@eyesore.no>
19420 <x6sp9o7ibw.fsf@@eyesore.no>
19421 @end example
19422
19423 So ``my'' ident on this machine is @samp{x6}.  This can be
19424 exploited---the following rule will raise the score on all followups to
19425 myself:
19426
19427 @lisp
19428 ("references"
19429  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19430   1000 nil r))
19431 @end lisp
19432
19433 Whether it's the first two or first three characters that are ``yours''
19434 is system-dependent.
19435
19436
19437 @node Scoring On Other Headers
19438 @section Scoring On Other Headers
19439 @cindex scoring on other headers
19440
19441 Gnus is quite fast when scoring the ``traditional''
19442 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19443 other headers requires writing a @code{head} scoring rule, which means
19444 that Gnus has to request every single article from the back end to find
19445 matches.  This takes a long time in big groups.
19446
19447 Now, there's not much you can do about this for news groups, but for
19448 mail groups, you have greater control.  In the @pxref{To From
19449 Newsgroups} section of the manual, it's explained in greater detail what
19450 this mechanism does, but here's a cookbook example for @code{nnml} on
19451 how to allow scoring on the @samp{To} and @samp{Cc} headers.
19452
19453 Put the following in your @file{~/.gnus.el} file.
19454
19455 @lisp
19456 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19457       nnmail-extra-headers gnus-extra-headers)
19458 @end lisp
19459
19460 Restart Gnus and rebuild your @code{nnml} overview files with the
19461 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19462 time if you have much mail.
19463
19464 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19465 so: @kbd{I e s p To RET <your name> RET}.
19466
19467 See?  Simple.
19468
19469
19470 @node Scoring Tips
19471 @section Scoring Tips
19472 @cindex scoring tips
19473
19474 @table @dfn
19475
19476 @item Crossposts
19477 @cindex crossposts
19478 @cindex scoring crossposts
19479 If you want to lower the score of crossposts, the line to match on is
19480 the @code{Xref} header.
19481 @lisp
19482 ("xref" (" talk.politics.misc:" -1000))
19483 @end lisp
19484
19485 @item Multiple crossposts
19486 If you want to lower the score of articles that have been crossposted to
19487 more than, say, 3 groups:
19488 @lisp
19489 ("xref"
19490   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19491    -1000 nil r))
19492 @end lisp
19493
19494 @item Matching on the body
19495 This is generally not a very good idea---it takes a very long time.
19496 Gnus actually has to fetch each individual article from the server.  But
19497 you might want to anyway, I guess.  Even though there are three match
19498 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19499 and stick with it in each score file.  If you use any two, each article
19500 will be fetched @emph{twice}.  If you want to match a bit on the
19501 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19502 the matches.
19503
19504 @item Marking as read
19505 You will probably want to mark articles that have scores below a certain
19506 number as read.  This is most easily achieved by putting the following
19507 in your @file{all.SCORE} file:
19508 @lisp
19509 ((mark -100))
19510 @end lisp
19511 You may also consider doing something similar with @code{expunge}.
19512
19513 @item Negated character classes
19514 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19515 That will match newlines, which might lead to, well, The Unknown.  Say
19516 @code{[^abcd\n]*} instead.
19517 @end table
19518
19519
19520 @node Reverse Scoring
19521 @section Reverse Scoring
19522 @cindex reverse scoring
19523
19524 If you want to keep just articles that have @samp{Sex with Emacs} in the
19525 subject header, and expunge all other articles, you could put something
19526 like this in your score file:
19527
19528 @lisp
19529 (("subject"
19530   ("Sex with Emacs" 2))
19531  (mark 1)
19532  (expunge 1))
19533 @end lisp
19534
19535 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19536 rest as read, and expunge them to boot.
19537
19538
19539 @node Global Score Files
19540 @section Global Score Files
19541 @cindex global score files
19542
19543 Sure, other newsreaders have ``global kill files''.  These are usually
19544 nothing more than a single kill file that applies to all groups, stored
19545 in the user's home directory.  Bah!  Puny, weak newsreaders!
19546
19547 What I'm talking about here are Global Score Files.  Score files from
19548 all over the world, from users everywhere, uniting all nations in one
19549 big, happy score file union!  Ange-score!  New and untested!
19550
19551 @vindex gnus-global-score-files
19552 All you have to do to use other people's score files is to set the
19553 @code{gnus-global-score-files} variable.  One entry for each score file,
19554 or each score file directory.  Gnus will decide by itself what score
19555 files are applicable to which group.
19556
19557 To use the score file
19558 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19559 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19560 say this:
19561
19562 @lisp
19563 (setq gnus-global-score-files
19564       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19565         "/ftp@@ftp.some-where:/pub/score/"))
19566 @end lisp
19567
19568 @findex gnus-score-search-global-directories
19569 @noindent
19570 Simple, eh?  Directory names must end with a @samp{/}.  These
19571 directories are typically scanned only once during each Gnus session.
19572 If you feel the need to manually re-scan the remote directories, you can
19573 use the @code{gnus-score-search-global-directories} command.
19574
19575 Note that, at present, using this option will slow down group entry
19576 somewhat.  (That is---a lot.)
19577
19578 If you want to start maintaining score files for other people to use,
19579 just put your score file up for anonymous ftp and announce it to the
19580 world.  Become a retro-moderator!  Participate in the retro-moderator
19581 wars sure to ensue, where retro-moderators battle it out for the
19582 sympathy of the people, luring them to use their score files on false
19583 premises!  Yay!  The net is saved!
19584
19585 Here are some tips for the would-be retro-moderator, off the top of my
19586 head:
19587
19588 @itemize @bullet
19589
19590 @item
19591 Articles heavily crossposted are probably junk.
19592 @item
19593 To lower a single inappropriate article, lower by @code{Message-ID}.
19594 @item
19595 Particularly brilliant authors can be raised on a permanent basis.
19596 @item
19597 Authors that repeatedly post off-charter for the group can safely be
19598 lowered out of existence.
19599 @item
19600 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19601 articles completely.
19602
19603 @item
19604 Use expiring score entries to keep the size of the file down.  You
19605 should probably have a long expiry period, though, as some sites keep
19606 old articles for a long time.
19607 @end itemize
19608
19609 @dots{} I wonder whether other newsreaders will support global score files
19610 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19611 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19612 holding our breath yet?
19613
19614
19615 @node Kill Files
19616 @section Kill Files
19617 @cindex kill files
19618
19619 Gnus still supports those pesky old kill files.  In fact, the kill file
19620 entries can now be expiring, which is something I wrote before Daniel
19621 Quinlan thought of doing score files, so I've left the code in there.
19622
19623 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19624 than score processing, so it might be a good idea to rewrite your kill
19625 files into score files.
19626
19627 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19628 forms into this file, which means that you can use kill files as some
19629 sort of primitive hook function to be run on group entry, even though
19630 that isn't a very good idea.
19631
19632 Normal kill files look like this:
19633
19634 @lisp
19635 (gnus-kill "From" "Lars Ingebrigtsen")
19636 (gnus-kill "Subject" "ding")
19637 (gnus-expunge "X")
19638 @end lisp
19639
19640 This will mark every article written by me as read, and remove the
19641 marked articles from the summary buffer.  Very useful, you'll agree.
19642
19643 Other programs use a totally different kill file syntax.  If Gnus
19644 encounters what looks like a @code{rn} kill file, it will take a stab at
19645 interpreting it.
19646
19647 Two summary functions for editing a @sc{gnus} kill file:
19648
19649 @table @kbd
19650
19651 @item M-k
19652 @kindex M-k (Summary)
19653 @findex gnus-summary-edit-local-kill
19654 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19655
19656 @item M-K
19657 @kindex M-K (Summary)
19658 @findex gnus-summary-edit-global-kill
19659 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19660 @end table
19661
19662 Two group mode functions for editing the kill files:
19663
19664 @table @kbd
19665
19666 @item M-k
19667 @kindex M-k (Group)
19668 @findex gnus-group-edit-local-kill
19669 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19670
19671 @item M-K
19672 @kindex M-K (Group)
19673 @findex gnus-group-edit-global-kill
19674 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19675 @end table
19676
19677 Kill file variables:
19678
19679 @table @code
19680 @item gnus-kill-file-name
19681 @vindex gnus-kill-file-name
19682 A kill file for the group @samp{soc.motss} is normally called
19683 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19684 this file name is detailed by the @code{gnus-kill-file-name} variable.
19685 The ``global'' kill file (not in the score file sense of ``global'', of
19686 course) is just called @file{KILL}.
19687
19688 @vindex gnus-kill-save-kill-file
19689 @item gnus-kill-save-kill-file
19690 If this variable is non-@code{nil}, Gnus will save the
19691 kill file after processing, which is necessary if you use expiring
19692 kills.
19693
19694 @item gnus-apply-kill-hook
19695 @vindex gnus-apply-kill-hook
19696 @findex gnus-apply-kill-file-unless-scored
19697 @findex gnus-apply-kill-file
19698 A hook called to apply kill files to a group.  It is
19699 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19700 kill file if you have a score file for the same group, you can set this
19701 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19702 kill files to be processed, you should set this variable to @code{nil}.
19703
19704 @item gnus-kill-file-mode-hook
19705 @vindex gnus-kill-file-mode-hook
19706 A hook called in kill-file mode buffers.
19707
19708 @end table
19709
19710
19711 @node Converting Kill Files
19712 @section Converting Kill Files
19713 @cindex kill files
19714 @cindex converting kill files
19715
19716 If you have loads of old kill files, you may want to convert them into
19717 score files.  If they are ``regular'', you can use
19718 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19719 by hand.
19720
19721 The kill to score conversion package isn't included in Gnus by default.
19722 You can fetch it from
19723 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19724
19725 If your old kill files are very complex---if they contain more
19726 non-@code{gnus-kill} forms than not, you'll have to convert them by
19727 hand.  Or just let them be as they are.  Gnus will still use them as
19728 before.
19729
19730
19731 @node GroupLens
19732 @section GroupLens
19733 @cindex GroupLens
19734
19735 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19736 collaborative filtering system that helps you work together with other
19737 people to find the quality news articles out of the huge volume of
19738 news articles generated every day.
19739
19740 To accomplish this the GroupLens system combines your opinions about
19741 articles you have already read with the opinions of others who have done
19742 likewise and gives you a personalized prediction for each unread news
19743 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19744 rate articles, and finds other people that rate articles the same way.
19745 Once it has found some people you agree with it tells you, in the form
19746 of a prediction, what they thought of the article.  You can use this
19747 prediction to help you decide whether or not you want to read the
19748 article.
19749
19750 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19751 so this section is mostly of historical interest.
19752
19753 @menu
19754 * Using GroupLens::             How to make Gnus use GroupLens.
19755 * Rating Articles::             Letting GroupLens know how you rate articles.
19756 * Displaying Predictions::      Displaying predictions given by GroupLens.
19757 * GroupLens Variables::         Customizing GroupLens.
19758 @end menu
19759
19760
19761 @node Using GroupLens
19762 @subsection Using GroupLens
19763
19764 To use GroupLens you must register a pseudonym with your local
19765 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19766 Bureau (BBB)} is the only better bit in town at the moment.
19767
19768 Once you have registered you'll need to set a couple of variables.
19769
19770 @table @code
19771
19772 @item gnus-use-grouplens
19773 @vindex gnus-use-grouplens
19774 Setting this variable to a non-@code{nil} value will make Gnus hook into
19775 all the relevant GroupLens functions.
19776
19777 @item grouplens-pseudonym
19778 @vindex grouplens-pseudonym
19779 This variable should be set to the pseudonym you got when registering
19780 with the Better Bit Bureau.
19781
19782 @item grouplens-newsgroups
19783 @vindex grouplens-newsgroups
19784 A list of groups that you want to get GroupLens predictions for.
19785
19786 @end table
19787
19788 That's the minimum of what you need to get up and running with GroupLens.
19789 Once you've registered, GroupLens will start giving you scores for
19790 articles based on the average of what other people think.  But, to get
19791 the real benefit of GroupLens you need to start rating articles
19792 yourself.  Then the scores GroupLens gives you will be personalized for
19793 you, based on how the people you usually agree with have already rated.
19794
19795
19796 @node Rating Articles
19797 @subsection Rating Articles
19798
19799 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19800 Where 1 means something like this article is a waste of bandwidth and 5
19801 means that the article was really good.  The basic question to ask
19802 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19803 like this one?''
19804
19805 There are four ways to enter a rating for an article in GroupLens.
19806
19807 @table @kbd
19808
19809 @item r
19810 @kindex r (GroupLens)
19811 @findex bbb-summary-rate-article
19812 This function will prompt you for a rating on a scale of one to five.
19813
19814 @item k
19815 @kindex k (GroupLens)
19816 @findex grouplens-score-thread
19817 This function will prompt you for a rating, and rate all the articles in
19818 the thread.  This is really useful for some of those long running giant
19819 threads in rec.humor.
19820
19821 @end table
19822
19823 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19824 the score of the article you're reading.
19825
19826 @table @kbd
19827
19828 @item 1-5 n
19829 @kindex n (GroupLens)
19830 @findex grouplens-next-unread-article
19831 Rate the article and go to the next unread article.
19832
19833 @item 1-5 ,
19834 @kindex , (GroupLens)
19835 @findex grouplens-best-unread-article
19836 Rate the article and go to the next unread article with the highest score.
19837
19838 @end table
19839
19840 If you want to give the current article a score of 4 and then go to the
19841 next article, just type @kbd{4 n}.
19842
19843
19844 @node Displaying Predictions
19845 @subsection Displaying Predictions
19846
19847 GroupLens makes a prediction for you about how much you will like a
19848 news article.  The predictions from GroupLens are on a scale from 1 to
19849 5, where 1 is the worst and 5 is the best.  You can use the predictions
19850 from GroupLens in one of three ways controlled by the variable
19851 @code{gnus-grouplens-override-scoring}.
19852
19853 @vindex gnus-grouplens-override-scoring
19854 There are three ways to display predictions in grouplens.  You may
19855 choose to have the GroupLens scores contribute to, or override the
19856 regular gnus scoring mechanism.  override is the default; however, some
19857 people prefer to see the Gnus scores plus the grouplens scores.  To get
19858 the separate scoring behavior you need to set
19859 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19860 GroupLens predictions combined with the grouplens scores set it to
19861 @code{'override} and to combine the scores set
19862 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19863 the combine option you will also want to set the values for
19864 @code{grouplens-prediction-offset} and
19865 @code{grouplens-score-scale-factor}.
19866
19867 @vindex grouplens-prediction-display
19868 In either case, GroupLens gives you a few choices for how you would like
19869 to see your predictions displayed.  The display of predictions is
19870 controlled by the @code{grouplens-prediction-display} variable.
19871
19872 The following are valid values for that variable.
19873
19874 @table @code
19875 @item prediction-spot
19876 The higher the prediction, the further to the right an @samp{*} is
19877 displayed.
19878
19879 @item confidence-interval
19880 A numeric confidence interval.
19881
19882 @item prediction-bar
19883 The higher the prediction, the longer the bar.
19884
19885 @item confidence-bar
19886 Numerical confidence.
19887
19888 @item confidence-spot
19889 The spot gets bigger with more confidence.
19890
19891 @item prediction-num
19892 Plain-old numeric value.
19893
19894 @item confidence-plus-minus
19895 Prediction +/- confidence.
19896
19897 @end table
19898
19899
19900 @node GroupLens Variables
19901 @subsection GroupLens Variables
19902
19903 @table @code
19904
19905 @item gnus-summary-grouplens-line-format
19906 The summary line format used in GroupLens-enhanced summary buffers.  It
19907 accepts the same specs as the normal summary line format (@pxref{Summary
19908 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
19909 %s\n}.
19910
19911 @item grouplens-bbb-host
19912 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
19913 default.
19914
19915 @item grouplens-bbb-port
19916 Port of the host running the bbbd server.  The default is 9000.
19917
19918 @item grouplens-score-offset
19919 Offset the prediction by this value.  In other words, subtract the
19920 prediction value by this number to arrive at the effective score.  The
19921 default is 0.
19922
19923 @item grouplens-score-scale-factor
19924 This variable allows the user to magnify the effect of GroupLens scores.
19925 The scale factor is applied after the offset.  The default is 1.
19926
19927 @end table
19928
19929
19930 @node Advanced Scoring
19931 @section Advanced Scoring
19932
19933 Scoring on Subjects and From headers is nice enough, but what if you're
19934 really interested in what a person has to say only when she's talking
19935 about a particular subject?  Or what if you really don't want to
19936 read what person A has to say when she's following up to person B, but
19937 want to read what she says when she's following up to person C?
19938
19939 By using advanced scoring rules you may create arbitrarily complex
19940 scoring patterns.
19941
19942 @menu
19943 * Advanced Scoring Syntax::     A definition.
19944 * Advanced Scoring Examples::   What they look like.
19945 * Advanced Scoring Tips::       Getting the most out of it.
19946 @end menu
19947
19948
19949 @node Advanced Scoring Syntax
19950 @subsection Advanced Scoring Syntax
19951
19952 Ordinary scoring rules have a string as the first element in the rule.
19953 Advanced scoring rules have a list as the first element.  The second
19954 element is the score to be applied if the first element evaluated to a
19955 non-@code{nil} value.
19956
19957 These lists may consist of three logical operators, one redirection
19958 operator, and various match operators.
19959
19960 Logical operators:
19961
19962 @table @code
19963 @item &
19964 @itemx and
19965 This logical operator will evaluate each of its arguments until it finds
19966 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19967 evaluate to @code{true} values, then this operator will return
19968 @code{true}.
19969
19970 @item |
19971 @itemx or
19972 This logical operator will evaluate each of its arguments until it finds
19973 one that evaluates to @code{true}.  If no arguments are @code{true},
19974 then this operator will return @code{false}.
19975
19976 @item !
19977 @itemx not
19978 @itemx Â¬
19979 This logical operator only takes a single argument.  It returns the
19980 logical negation of the value of its argument.
19981
19982 @end table
19983
19984 There is an @dfn{indirection operator} that will make its arguments
19985 apply to the ancestors of the current article being scored.  For
19986 instance, @code{1-} will make score rules apply to the parent of the
19987 current article.  @code{2-} will make score rules apply to the
19988 grandparent of the current article.  Alternatively, you can write
19989 @code{^^}, where the number of @code{^}s (carets) says how far back into
19990 the ancestry you want to go.
19991
19992 Finally, we have the match operators.  These are the ones that do the
19993 real work.  Match operators are header name strings followed by a match
19994 and a match type.  A typical match operator looks like @samp{("from"
19995 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19996 simple scoring, and the match types are also the same.
19997
19998
19999 @node Advanced Scoring Examples
20000 @subsection Advanced Scoring Examples
20001
20002 Please note that the following examples are score file rules.  To
20003 make a complete score file from them, surround them with another pair
20004 of parentheses.
20005
20006 Let's say you want to increase the score of articles written by Lars
20007 when he's talking about Gnus:
20008
20009 @example
20010 @group
20011 ((&
20012   ("from" "Lars Ingebrigtsen")
20013   ("subject" "Gnus"))
20014  1000)
20015 @end group
20016 @end example
20017
20018 Quite simple, huh?
20019
20020 When he writes long articles, he sometimes has something nice to say:
20021
20022 @example
20023 ((&
20024   ("from" "Lars Ingebrigtsen")
20025   (|
20026    ("subject" "Gnus")
20027    ("lines" 100 >)))
20028  1000)
20029 @end example
20030
20031 However, when he responds to things written by Reig Eigil Logge, you
20032 really don't want to read what he's written:
20033
20034 @example
20035 ((&
20036   ("from" "Lars Ingebrigtsen")
20037   (1- ("from" "Reig Eigir Logge")))
20038  -100000)
20039 @end example
20040
20041 Everybody that follows up Redmondo when he writes about disappearing
20042 socks should have their scores raised, but only when they talk about
20043 white socks.  However, when Lars talks about socks, it's usually not
20044 very interesting:
20045
20046 @example
20047 ((&
20048   (1-
20049    (&
20050     ("from" "redmondo@@.*no" r)
20051     ("body" "disappearing.*socks" t)))
20052   (! ("from" "Lars Ingebrigtsen"))
20053   ("body" "white.*socks"))
20054  1000)
20055 @end example
20056
20057 The possibilities are endless.
20058
20059
20060 @node Advanced Scoring Tips
20061 @subsection Advanced Scoring Tips
20062
20063 The @code{&} and @code{|} logical operators do short-circuit logic.
20064 That is, they stop processing their arguments when it's clear what the
20065 result of the operation will be.  For instance, if one of the arguments
20066 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20067 the rest of the arguments.  This means that you should put slow matches
20068 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20069 @samp{subject}) first.
20070
20071 The indirection arguments (@code{1-} and so on) will make their
20072 arguments work on previous generations of the thread.  If you say
20073 something like:
20074
20075 @example
20076 ...
20077 (1-
20078  (1-
20079   ("from" "lars")))
20080 ...
20081 @end example
20082
20083 Then that means "score on the from header of the grandparent of the
20084 current article".  An indirection is quite fast, but it's better to say:
20085
20086 @example
20087 (1-
20088  (&
20089   ("from" "Lars")
20090   ("subject" "Gnus")))
20091 @end example
20092
20093 than it is to say:
20094
20095 @example
20096 (&
20097  (1- ("from" "Lars"))
20098  (1- ("subject" "Gnus")))
20099 @end example
20100
20101
20102 @node Score Decays
20103 @section Score Decays
20104 @cindex score decays
20105 @cindex decays
20106
20107 You may find that your scores have a tendency to grow without
20108 bounds, especially if you're using adaptive scoring.  If scores get too
20109 big, they lose all meaning---they simply max out and it's difficult to
20110 use them in any sensible way.
20111
20112 @vindex gnus-decay-scores
20113 @findex gnus-decay-score
20114 @vindex gnus-decay-score-function
20115 Gnus provides a mechanism for decaying scores to help with this problem.
20116 When score files are loaded and @code{gnus-decay-scores} is
20117 non-@code{nil}, Gnus will run the score files through the decaying
20118 mechanism thereby lowering the scores of all non-permanent score rules.
20119 The decay itself if performed by the @code{gnus-decay-score-function}
20120 function, which is @code{gnus-decay-score} by default.  Here's the
20121 definition of that function:
20122
20123 @lisp
20124 (defun gnus-decay-score (score)
20125   "Decay SCORE.
20126 This is done according to `gnus-score-decay-constant'
20127 and `gnus-score-decay-scale'."
20128   (floor
20129    (- score
20130       (* (if (< score 0) 1 -1)
20131          (min (abs score)
20132               (max gnus-score-decay-constant
20133                    (* (abs score)
20134                       gnus-score-decay-scale)))))))
20135 @end lisp
20136
20137 @vindex gnus-score-decay-scale
20138 @vindex gnus-score-decay-constant
20139 @code{gnus-score-decay-constant} is 3 by default and
20140 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20141
20142 @enumerate
20143 @item
20144 Scores between -3 and 3 will be set to 0 when this function is called.
20145
20146 @item
20147 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20148
20149 @item
20150 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20151 score.
20152 @end enumerate
20153
20154 If you don't like this decay function, write your own.  It is called
20155 with the score to be decayed as its only parameter, and it should return
20156 the new score, which should be an integer.
20157
20158 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20159 four days, Gnus will decay the scores four times, for instance.
20160
20161 @iftex
20162 @iflatex
20163 @chapter Message
20164 @include message.texi
20165 @chapter Emacs MIME
20166 @include emacs-mime.texi
20167 @chapter Sieve
20168 @include sieve.texi
20169 @chapter PGG
20170 @include pgg.texi
20171 @end iflatex
20172 @end iftex
20173
20174 @node Various
20175 @chapter Various
20176
20177 @menu
20178 * Process/Prefix::              A convention used by many treatment commands.
20179 * Interactive::                 Making Gnus ask you many questions.
20180 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20181 * Formatting Variables::        You can specify what buffers should look like.
20182 * Window Layout::               Configuring the Gnus buffer windows.
20183 * Faces and Fonts::             How to change how faces look.
20184 * Compilation::                 How to speed Gnus up.
20185 * Mode Lines::                  Displaying information in the mode lines.
20186 * Highlighting and Menus::      Making buffers look all nice and cozy.
20187 * Buttons::                     Get tendinitis in ten easy steps!
20188 * Daemons::                     Gnus can do things behind your back.
20189 * NoCeM::                       How to avoid spam and other fatty foods.
20190 * Undo::                        Some actions can be undone.
20191 * Predicate Specifiers::        Specifying predicates.
20192 * Moderation::                  What to do if you're a moderator.
20193 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20194 * Fuzzy Matching::              What's the big fuzz?
20195 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20196 * Various Various::             Things that are really various.
20197 @end menu
20198
20199
20200 @node Process/Prefix
20201 @section Process/Prefix
20202 @cindex process/prefix convention
20203
20204 Many functions, among them functions for moving, decoding and saving
20205 articles, use what is known as the @dfn{Process/Prefix convention}.
20206
20207 This is a method for figuring out what articles the user wants the
20208 command to be performed on.
20209
20210 It goes like this:
20211
20212 If the numeric prefix is N, perform the operation on the next N
20213 articles, starting with the current one.  If the numeric prefix is
20214 negative, perform the operation on the previous N articles, starting
20215 with the current one.
20216
20217 @vindex transient-mark-mode
20218 If @code{transient-mark-mode} in non-@code{nil} and the region is
20219 active, all articles in the region will be worked upon.
20220
20221 If there is no numeric prefix, but some articles are marked with the
20222 process mark, perform the operation on the articles marked with
20223 the process mark.
20224
20225 If there is neither a numeric prefix nor any articles marked with the
20226 process mark, just perform the operation on the current article.
20227
20228 Quite simple, really, but it needs to be made clear so that surprises
20229 are avoided.
20230
20231 Commands that react to the process mark will push the current list of
20232 process marked articles onto a stack and will then clear all process
20233 marked articles.  You can restore the previous configuration with the
20234 @kbd{M P y} command (@pxref{Setting Process Marks}).
20235
20236 @vindex gnus-summary-goto-unread
20237 One thing that seems to shock & horrify lots of people is that, for
20238 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20239 Since each @kbd{d} (which marks the current article as read) by default
20240 goes to the next unread article after marking, this means that @kbd{3 d}
20241 will mark the next three unread articles as read, no matter what the
20242 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20243 @code{nil} for a more straightforward action.
20244
20245 Many commands do not use the process/prefix convention.  All commands
20246 that do explicitly say so in this manual.  To apply the process/prefix
20247 convention to commands that do not use it, you can use the @kbd{M-&}
20248 command.  For instance, to mark all the articles in the group as
20249 expirable, you could say @kbd{M P b M-& E}.
20250
20251
20252 @node Interactive
20253 @section Interactive
20254 @cindex interaction
20255
20256 @table @code
20257
20258 @item gnus-novice-user
20259 @vindex gnus-novice-user
20260 If this variable is non-@code{nil}, you are either a newcomer to the
20261 World of Usenet, or you are very cautious, which is a nice thing to be,
20262 really.  You will be given questions of the type ``Are you sure you want
20263 to do this?'' before doing anything dangerous.  This is @code{t} by
20264 default.
20265
20266 @item gnus-expert-user
20267 @vindex gnus-expert-user
20268 If this variable is non-@code{nil}, you will seldom be asked any
20269 questions by Gnus.  It will simply assume you know what you're doing, no
20270 matter how strange.
20271
20272 @item gnus-interactive-catchup
20273 @vindex gnus-interactive-catchup
20274 Require confirmation before catching up a group if non-@code{nil}.  It
20275 is @code{t} by default.
20276
20277 @item gnus-interactive-exit
20278 @vindex gnus-interactive-exit
20279 Require confirmation before exiting Gnus.  This variable is @code{t} by
20280 default.
20281 @end table
20282
20283
20284 @node Symbolic Prefixes
20285 @section Symbolic Prefixes
20286 @cindex symbolic prefixes
20287
20288 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20289 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20290 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20291 rule of 900 to the current article.
20292
20293 This is all nice and well, but what if you want to give a command some
20294 additional information?  Well, what most commands do is interpret the
20295 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20296 doesn't want a backup file to be created when saving the current buffer,
20297 for instance.  But what if you want to save without making a backup
20298 file, and you want Emacs to flash lights and play a nice tune at the
20299 same time?  You can't, and you're probably perfectly happy that way.
20300
20301 @kindex M-i (Summary)
20302 @findex gnus-symbolic-argument
20303 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20304 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20305 character typed in is the value.  You can stack as many @kbd{M-i}
20306 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20307 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20308 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20309 @code{b}''.  You get the drift.
20310
20311 Typing in symbolic prefixes to commands that don't accept them doesn't
20312 hurt, but it doesn't do any good either.  Currently not many Gnus
20313 functions make use of the symbolic prefix.
20314
20315 If you're interested in how Gnus implements this, @pxref{Extended
20316 Interactive}.
20317
20318
20319 @node Formatting Variables
20320 @section Formatting Variables
20321 @cindex formatting variables
20322
20323 Throughout this manual you've probably noticed lots of variables called
20324 things like @code{gnus-group-line-format} and
20325 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20326 output lines in the various buffers.  There's quite a lot of them.
20327 Fortunately, they all use the same syntax, so there's not that much to
20328 be annoyed by.
20329
20330 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20331 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20332 lots of percentages everywhere.
20333
20334 @menu
20335 * Formatting Basics::           A formatting variable is basically a format string.
20336 * Mode Line Formatting::        Some rules about mode line formatting variables.
20337 * Advanced Formatting::         Modifying output in various ways.
20338 * User-Defined Specs::          Having Gnus call your own functions.
20339 * Formatting Fonts::            Making the formatting look colorful and nice.
20340 * Positioning Point::           Moving point to a position after an operation.
20341 * Tabulation::                  Tabulating your output.
20342 * Wide Characters::             Dealing with wide characters.
20343 @end menu
20344
20345 Currently Gnus uses the following formatting variables:
20346 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20347 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20348 @code{gnus-group-mode-line-format},
20349 @code{gnus-summary-mode-line-format},
20350 @code{gnus-article-mode-line-format},
20351 @code{gnus-server-mode-line-format}, and
20352 @code{gnus-summary-pick-line-format}.
20353
20354 All these format variables can also be arbitrary elisp forms.  In that
20355 case, they will be @code{eval}ed to insert the required lines.
20356
20357 @kindex M-x gnus-update-format
20358 @findex gnus-update-format
20359 Gnus includes a command to help you while creating your own format
20360 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20361 update the spec in question and pop you to a buffer where you can
20362 examine the resulting Lisp code to be run to generate the line.
20363
20364
20365
20366 @node Formatting Basics
20367 @subsection Formatting Basics
20368
20369 Each @samp{%} element will be replaced by some string or other when the
20370 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20371 spec, and pad with spaces to get a 5-character field''.
20372
20373 As with normal C and Emacs Lisp formatting strings, the numerical
20374 modifier between the @samp{%} and the formatting type character will
20375 @dfn{pad} the output so that it is always at least that long.
20376 @samp{%5y} will make the field always (at least) five characters wide by
20377 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20378 the right instead.
20379
20380 You may also wish to limit the length of the field to protect against
20381 particularly wide values.  For that you can say @samp{%4,6y}, which
20382 means that the field will never be more than 6 characters wide and never
20383 less than 4 characters wide.
20384
20385 Also Gnus supports some extended format specifications, such as
20386 @samp{%&user-date;}.
20387
20388
20389 @node Mode Line Formatting
20390 @subsection Mode Line Formatting
20391
20392 Mode line formatting variables (e.g.,
20393 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20394 buffer line oriented formatting variables (@pxref{Formatting Basics})
20395 with the following two differences:
20396
20397 @enumerate
20398
20399 @item
20400 There must be no newline (@samp{\n}) at the end.
20401
20402 @item
20403 The special @samp{%%b} spec can be used to display the buffer name.
20404 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20405 @samp{%} to allow it to pass through the formatting machinery unmangled,
20406 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20407 display interprets to mean ``show the buffer name''.  For a full list of
20408 mode line specs Emacs understands, see the documentation of the
20409 @code{mode-line-format} variable.
20410
20411 @end enumerate
20412
20413
20414 @node Advanced Formatting
20415 @subsection Advanced Formatting
20416
20417 It is frequently useful to post-process the fields in some way.
20418 Padding, limiting, cutting off parts and suppressing certain values can
20419 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20420 look like @samp{%~(cut 3)~(ignore "0")y}.
20421
20422 These are the valid modifiers:
20423
20424 @table @code
20425 @item pad
20426 @itemx pad-left
20427 Pad the field to the left with spaces until it reaches the required
20428 length.
20429
20430 @item pad-right
20431 Pad the field to the right with spaces until it reaches the required
20432 length.
20433
20434 @item max
20435 @itemx max-left
20436 Cut off characters from the left until it reaches the specified length.
20437
20438 @item max-right
20439 Cut off characters from the right until it reaches the specified
20440 length.
20441
20442 @item cut
20443 @itemx cut-left
20444 Cut off the specified number of characters from the left.
20445
20446 @item cut-right
20447 Cut off the specified number of characters from the right.
20448
20449 @item ignore
20450 Return an empty string if the field is equal to the specified value.
20451
20452 @item form
20453 Use the specified form as the field value when the @samp{@@} spec is
20454 used.
20455
20456 Here's an example:
20457
20458 @lisp
20459 "~(form (current-time-string))@@"
20460 @end lisp
20461
20462 @end table
20463
20464 Let's take an example.  The @samp{%o} spec in the summary mode lines
20465 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20466 This is quite a mouthful, so we want to shave off the century number and
20467 the time, leaving us with a six-character date.  That would be
20468 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20469 maxing, and we need the padding to ensure that the date is never less
20470 than 6 characters to make it look nice in columns.)
20471
20472 Ignoring is done first; then cutting; then maxing; and then as the very
20473 last operation, padding.
20474
20475 If you use lots of these advanced thingies, you'll find that Gnus gets
20476 quite slow.  This can be helped enormously by running @kbd{M-x
20477 gnus-compile} when you are satisfied with the look of your lines.
20478 @xref{Compilation}.
20479
20480
20481 @node User-Defined Specs
20482 @subsection User-Defined Specs
20483
20484 All the specs allow for inserting user defined specifiers---@samp{u}.
20485 The next character in the format string should be a letter.  Gnus
20486 will call the function @code{gnus-user-format-function-}@samp{X}, where
20487 @samp{X} is the letter following @samp{%u}.  The function will be passed
20488 a single parameter---what the parameter means depends on what buffer
20489 it's being called from.  The function should return a string, which will
20490 be inserted into the buffer just like information from any other
20491 specifier.  This function may also be called with dummy values, so it
20492 should protect against that.
20493
20494 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20495 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20496
20497 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20498 much the same without defining new functions.  Here's an example:
20499 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20500 given here will be evaluated to yield the current line number, and then
20501 inserted.
20502
20503
20504 @node Formatting Fonts
20505 @subsection Formatting Fonts
20506
20507 There are specs for highlighting, and these are shared by all the format
20508 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20509 the special @code{mouse-face} property set, which means that it will be
20510 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20511 over it.
20512
20513 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20514 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20515 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20516 and so on.  Create as many faces as you wish.  The same goes for the
20517 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20518 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20519
20520 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20521 special @code{balloon-help} property set to
20522 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20523 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20524 variables should be either strings or symbols naming functions that
20525 return a string.  When the mouse passes over text with this property
20526 set, a balloon window will appear and display the string.  Please
20527 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20528 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20529 XEmacs) for more information on this.  (For technical reasons, the
20530 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20531 paragraph.)
20532
20533 Here's an alternative recipe for the group buffer:
20534
20535 @lisp
20536 ;; @r{Create three face types.}
20537 (setq gnus-face-1 'bold)
20538 (setq gnus-face-3 'italic)
20539
20540 ;; @r{We want the article count to be in}
20541 ;; @r{a bold and green face.  So we create}
20542 ;; @r{a new face called @code{my-green-bold}.}
20543 (copy-face 'bold 'my-green-bold)
20544 ;; @r{Set the color.}
20545 (set-face-foreground 'my-green-bold "ForestGreen")
20546 (setq gnus-face-2 'my-green-bold)
20547
20548 ;; @r{Set the new & fancy format.}
20549 (setq gnus-group-line-format
20550       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20551 @end lisp
20552
20553 I'm sure you'll be able to use this scheme to create totally unreadable
20554 and extremely vulgar displays.  Have fun!
20555
20556 Note that the @samp{%(} specs (and friends) do not make any sense on the
20557 mode-line variables.
20558
20559 @node Positioning Point
20560 @subsection Positioning Point
20561
20562 Gnus usually moves point to a pre-defined place on each line in most
20563 buffers.  By default, point move to the first colon character on the
20564 line.  You can customize this behaviour in three different ways.
20565
20566 You can move the colon character to somewhere else on the line.
20567
20568 @findex gnus-goto-colon
20569 You can redefine the function that moves the point to the colon.  The
20570 function is called @code{gnus-goto-colon}.
20571
20572 But perhaps the most convenient way to deal with this, if you don't want
20573 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20574 put a @samp{%*} somewhere in your format line definition, Gnus will
20575 place point there.
20576
20577
20578 @node Tabulation
20579 @subsection Tabulation
20580
20581 You can usually line up your displays by padding and cutting your
20582 strings.  However, when combining various strings of different size, it
20583 can often be more convenient to just output the strings, and then worry
20584 about lining up the following text afterwards.
20585
20586 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20587 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20588
20589 @samp{%50=} will insert space characters to pad the line up to column
20590 50.  If the text is already past column 50, nothing will be inserted.
20591 This is the soft tabulator.
20592
20593 @samp{%-50=} will insert space characters to pad the line up to column
20594 50.  If the text is already past column 50, the excess text past column
20595 50 will be removed.  This is the hard tabulator.
20596
20597
20598 @node Wide Characters
20599 @subsection Wide Characters
20600
20601 Fixed width fonts in most countries have characters of the same width.
20602 Some countries, however, use Latin characters mixed with wider
20603 characters---most notable East Asian countries.
20604
20605 The problem is that when formatting, Gnus assumes that if a string is 10
20606 characters wide, it'll be 10 Latin characters wide on the screen.  In
20607 these countries, that's not true.
20608
20609 @vindex gnus-use-correct-string-widths
20610 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20611 @code{t}.  This makes buffer generation slower, but the results will be
20612 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20613 for Emacs.
20614
20615
20616 @node Window Layout
20617 @section Window Layout
20618 @cindex window layout
20619
20620 No, there's nothing here about X, so be quiet.
20621
20622 @vindex gnus-use-full-window
20623 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20624 other windows and occupy the entire Emacs screen by itself.  It is
20625 @code{t} by default.
20626
20627 Setting this variable to @code{nil} kinda works, but there are
20628 glitches.  Use at your own peril.
20629
20630 @vindex gnus-buffer-configuration
20631 @code{gnus-buffer-configuration} describes how much space each Gnus
20632 buffer should be given.  Here's an excerpt of this variable:
20633
20634 @lisp
20635 ((group (vertical 1.0 (group 1.0 point)
20636                       (if gnus-carpal (group-carpal 4))))
20637  (article (vertical 1.0 (summary 0.25 point)
20638                         (article 1.0))))
20639 @end lisp
20640
20641 This is an alist.  The @dfn{key} is a symbol that names some action or
20642 other.  For instance, when displaying the group buffer, the window
20643 configuration function will use @code{group} as the key.  A full list of
20644 possible names is listed below.
20645
20646 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20647 should occupy.  To take the @code{article} split as an example -
20648
20649 @lisp
20650 (article (vertical 1.0 (summary 0.25 point)
20651                        (article 1.0)))
20652 @end lisp
20653
20654 This @dfn{split} says that the summary buffer should occupy 25% of upper
20655 half of the screen, and that it is placed over the article buffer.  As
20656 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20657 reaching for that calculator there).  However, the special number
20658 @code{1.0} is used to signal that this buffer should soak up all the
20659 rest of the space available after the rest of the buffers have taken
20660 whatever they need.  There should be only one buffer with the @code{1.0}
20661 size spec per split.
20662
20663 Point will be put in the buffer that has the optional third element
20664 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20665 split where the tag @code{frame-focus} is a member (i.e. is the third or
20666 fourth element in the list, depending on whether the @code{point} tag is
20667 present) gets focus.
20668
20669 Here's a more complicated example:
20670
20671 @lisp
20672 (article (vertical 1.0 (group 4)
20673                        (summary 0.25 point)
20674                        (if gnus-carpal (summary-carpal 4))
20675                        (article 1.0)))
20676 @end lisp
20677
20678 If the size spec is an integer instead of a floating point number,
20679 then that number will be used to say how many lines a buffer should
20680 occupy, not a percentage.
20681
20682 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20683 precise---if the @code{car} of the split is a function or a subr), this
20684 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20685 be used as a split.  This means that there will be three buffers if
20686 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20687 is non-@code{nil}.
20688
20689 Not complicated enough for you?  Well, try this on for size:
20690
20691 @lisp
20692 (article (horizontal 1.0
20693              (vertical 0.5
20694                  (group 1.0)
20695                  (gnus-carpal 4))
20696              (vertical 1.0
20697                  (summary 0.25 point)
20698                  (summary-carpal 4)
20699                  (article 1.0))))
20700 @end lisp
20701
20702 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20703 @code{horizontal} thingie?
20704
20705 If the first element in one of the split is @code{horizontal}, Gnus will
20706 split the window horizontally, giving you two windows side-by-side.
20707 Inside each of these strips you may carry on all you like in the normal
20708 fashion.  The number following @code{horizontal} says what percentage of
20709 the screen is to be given to this strip.
20710
20711 For each split, there @emph{must} be one element that has the 100% tag.
20712 The splitting is never accurate, and this buffer will eat any leftover
20713 lines from the splits.
20714
20715 To be slightly more formal, here's a definition of what a valid split
20716 may look like:
20717
20718 @example
20719 @group
20720 split      = frame | horizontal | vertical | buffer | form
20721 frame      = "(frame " size *split ")"
20722 horizontal = "(horizontal " size *split ")"
20723 vertical   = "(vertical " size *split ")"
20724 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20725 size       = number | frame-params
20726 buf-name   = group | article | summary ...
20727 @end group
20728 @end example
20729
20730 The limitations are that the @code{frame} split can only appear as the
20731 top-level split.  @var{form} should be an Emacs Lisp form that should
20732 return a valid split.  We see that each split is fully recursive, and
20733 may contain any number of @code{vertical} and @code{horizontal} splits.
20734
20735 @vindex gnus-window-min-width
20736 @vindex gnus-window-min-height
20737 @cindex window height
20738 @cindex window width
20739 Finding the right sizes can be a bit complicated.  No window may be less
20740 than @code{gnus-window-min-height} (default 1) characters high, and all
20741 windows must be at least @code{gnus-window-min-width} (default 1)
20742 characters wide.  Gnus will try to enforce this before applying the
20743 splits.  If you want to use the normal Emacs window width/height limit,
20744 you can just set these two variables to @code{nil}.
20745
20746 If you're not familiar with Emacs terminology, @code{horizontal} and
20747 @code{vertical} splits may work the opposite way of what you'd expect.
20748 Windows inside a @code{horizontal} split are shown side-by-side, and
20749 windows within a @code{vertical} split are shown above each other.
20750
20751 @findex gnus-configure-frame
20752 If you want to experiment with window placement, a good tip is to call
20753 @code{gnus-configure-frame} directly with a split.  This is the function
20754 that does all the real work when splitting buffers.  Below is a pretty
20755 nonsensical configuration with 5 windows; two for the group buffer and
20756 three for the article buffer.  (I said it was nonsensical.)  If you
20757 @code{eval} the statement below, you can get an idea of how that would
20758 look straight away, without going through the normal Gnus channels.
20759 Play with it until you're satisfied, and then use
20760 @code{gnus-add-configuration} to add your new creation to the buffer
20761 configuration list.
20762
20763 @lisp
20764 (gnus-configure-frame
20765  '(horizontal 1.0
20766     (vertical 10
20767       (group 1.0)
20768       (article 0.3 point))
20769     (vertical 1.0
20770       (article 1.0)
20771       (horizontal 4
20772         (group 1.0)
20773         (article 10)))))
20774 @end lisp
20775
20776 You might want to have several frames as well.  No prob---just use the
20777 @code{frame} split:
20778
20779 @lisp
20780 (gnus-configure-frame
20781  '(frame 1.0
20782          (vertical 1.0
20783                    (summary 0.25 point frame-focus)
20784                    (article 1.0))
20785          (vertical ((height . 5) (width . 15)
20786                     (user-position . t)
20787                     (left . -1) (top . 1))
20788                    (picon 1.0))))
20789
20790 @end lisp
20791
20792 This split will result in the familiar summary/article window
20793 configuration in the first (or ``main'') frame, while a small additional
20794 frame will be created where picons will be shown.  As you can see,
20795 instead of the normal @code{1.0} top-level spec, each additional split
20796 should have a frame parameter alist as the size spec.
20797 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20798 Reference Manual}.  Under XEmacs, a frame property list will be
20799 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20800 is such a plist.
20801 The list of all possible keys for @code{gnus-buffer-configuration} can
20802 be found in its default value.
20803
20804 Note that the @code{message} key is used for both
20805 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20806 it is desirable to distinguish between the two, something like this
20807 might be used:
20808
20809 @lisp
20810 (message (horizontal 1.0
20811                      (vertical 1.0 (message 1.0 point))
20812                      (vertical 0.24
20813                                (if (buffer-live-p gnus-summary-buffer)
20814                                    '(summary 0.5))
20815                                (group 1.0))))
20816 @end lisp
20817
20818 One common desire for a multiple frame split is to have a separate frame
20819 for composing mail and news while leaving the original frame intact.  To
20820 accomplish that, something like the following can be done:
20821
20822 @lisp
20823 (message
20824   (frame 1.0
20825          (if (not (buffer-live-p gnus-summary-buffer))
20826              (car (cdr (assoc 'group gnus-buffer-configuration)))
20827            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20828          (vertical ((user-position . t) (top . 1) (left . 1)
20829                     (name . "Message"))
20830                    (message 1.0 point))))
20831 @end lisp
20832
20833 @findex gnus-add-configuration
20834 Since the @code{gnus-buffer-configuration} variable is so long and
20835 complicated, there's a function you can use to ease changing the config
20836 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20837 you want to change the @code{article} setting, you could say:
20838
20839 @lisp
20840 (gnus-add-configuration
20841  '(article (vertical 1.0
20842                (group 4)
20843                (summary .25 point)
20844                (article 1.0))))
20845 @end lisp
20846
20847 You'd typically stick these @code{gnus-add-configuration} calls in your
20848 @file{~/.gnus.el} file or in some startup hook---they should be run after
20849 Gnus has been loaded.
20850
20851 @vindex gnus-always-force-window-configuration
20852 If all windows mentioned in the configuration are already visible, Gnus
20853 won't change the window configuration.  If you always want to force the
20854 ``right'' window configuration, you can set
20855 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20856
20857 If you're using tree displays (@pxref{Tree Display}), and the tree
20858 window is displayed vertically next to another window, you may also want
20859 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20860 windows resized.
20861
20862 @subsection Example Window Configurations
20863
20864 @itemize @bullet
20865 @item
20866 Narrow left hand side occupied by group buffer.  Right hand side split
20867 between summary buffer (top one-sixth) and article buffer (bottom).
20868
20869 @ifinfo
20870 @example
20871 +---+---------+
20872 | G | Summary |
20873 | r +---------+
20874 | o |         |
20875 | u | Article |
20876 | p |         |
20877 +---+---------+
20878 @end example
20879 @end ifinfo
20880
20881 @lisp
20882 (gnus-add-configuration
20883  '(article
20884    (horizontal 1.0
20885                (vertical 25 (group 1.0))
20886                (vertical 1.0
20887                          (summary 0.16 point)
20888                          (article 1.0)))))
20889
20890 (gnus-add-configuration
20891  '(summary
20892    (horizontal 1.0
20893                (vertical 25 (group 1.0))
20894                (vertical 1.0 (summary 1.0 point)))))
20895 @end lisp
20896
20897 @end itemize
20898
20899
20900 @node Faces and Fonts
20901 @section Faces and Fonts
20902 @cindex faces
20903 @cindex fonts
20904 @cindex colors
20905
20906 Fiddling with fonts and faces used to be very difficult, but these days
20907 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
20908 the face you want to alter, and alter it via the standard Customize
20909 interface.
20910
20911
20912 @node Compilation
20913 @section Compilation
20914 @cindex compilation
20915 @cindex byte-compilation
20916
20917 @findex gnus-compile
20918
20919 Remember all those line format specification variables?
20920 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
20921 on.  Now, Gnus will of course heed whatever these variables are, but,
20922 unfortunately, changing them will mean a quite significant slow-down.
20923 (The default values of these variables have byte-compiled functions
20924 associated with them, while the user-generated versions do not, of
20925 course.)
20926
20927 To help with this, you can run @kbd{M-x gnus-compile} after you've
20928 fiddled around with the variables and feel that you're (kind of)
20929 satisfied.  This will result in the new specs being byte-compiled, and
20930 you'll get top speed again.  Gnus will save these compiled specs in the
20931 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
20932 this function, though---you should compile them yourself by sticking
20933 them into the @file{~/.gnus.el} file and byte-compiling that file.)
20934
20935
20936 @node Mode Lines
20937 @section Mode Lines
20938 @cindex mode lines
20939
20940 @vindex gnus-updated-mode-lines
20941 @code{gnus-updated-mode-lines} says what buffers should keep their mode
20942 lines updated.  It is a list of symbols.  Supported symbols include
20943 @code{group}, @code{article}, @code{summary}, @code{server},
20944 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
20945 Gnus will keep that mode line updated with information that may be
20946 pertinent.  If this variable is @code{nil}, screen refresh may be
20947 quicker.
20948
20949 @cindex display-time
20950
20951 @vindex gnus-mode-non-string-length
20952 By default, Gnus displays information on the current article in the mode
20953 lines of the summary and article buffers.  The information Gnus wishes
20954 to display (e.g. the subject of the article) is often longer than the
20955 mode lines, and therefore have to be cut off at some point.  The
20956 @code{gnus-mode-non-string-length} variable says how long the other
20957 elements on the line is (i.e., the non-info part).  If you put
20958 additional elements on the mode line (e.g. a clock), you should modify
20959 this variable:
20960
20961 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
20962 @lisp
20963 (add-hook 'display-time-hook
20964           (lambda () (setq gnus-mode-non-string-length
20965                            (+ 21
20966                               (if line-number-mode 5 0)
20967                               (if column-number-mode 4 0)
20968                               (length display-time-string)))))
20969 @end lisp
20970
20971 If this variable is @code{nil} (which is the default), the mode line
20972 strings won't be chopped off, and they won't be padded either.  Note
20973 that the default is unlikely to be desirable, as even the percentage
20974 complete in the buffer may be crowded off the mode line; the user should
20975 configure this variable appropriately for her configuration.
20976
20977
20978 @node Highlighting and Menus
20979 @section Highlighting and Menus
20980 @cindex visual
20981 @cindex highlighting
20982 @cindex menus
20983
20984 @vindex gnus-visual
20985 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20986 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20987 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20988 file.
20989
20990 This variable can be a list of visual properties that are enabled.  The
20991 following elements are valid, and are all included by default:
20992
20993 @table @code
20994 @item group-highlight
20995 Do highlights in the group buffer.
20996 @item summary-highlight
20997 Do highlights in the summary buffer.
20998 @item article-highlight
20999 Do highlights in the article buffer.
21000 @item highlight
21001 Turn on highlighting in all buffers.
21002 @item group-menu
21003 Create menus in the group buffer.
21004 @item summary-menu
21005 Create menus in the summary buffers.
21006 @item article-menu
21007 Create menus in the article buffer.
21008 @item browse-menu
21009 Create menus in the browse buffer.
21010 @item server-menu
21011 Create menus in the server buffer.
21012 @item score-menu
21013 Create menus in the score buffers.
21014 @item menu
21015 Create menus in all buffers.
21016 @end table
21017
21018 So if you only want highlighting in the article buffer and menus in all
21019 buffers, you could say something like:
21020
21021 @lisp
21022 (setq gnus-visual '(article-highlight menu))
21023 @end lisp
21024
21025 If you want highlighting only and no menus whatsoever, you'd say:
21026
21027 @lisp
21028 (setq gnus-visual '(highlight))
21029 @end lisp
21030
21031 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21032 in all Gnus buffers.
21033
21034 Other general variables that influence the look of all buffers include:
21035
21036 @table @code
21037 @item gnus-mouse-face
21038 @vindex gnus-mouse-face
21039 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21040 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21041
21042 @end table
21043
21044 There are hooks associated with the creation of all the different menus:
21045
21046 @table @code
21047
21048 @item gnus-article-menu-hook
21049 @vindex gnus-article-menu-hook
21050 Hook called after creating the article mode menu.
21051
21052 @item gnus-group-menu-hook
21053 @vindex gnus-group-menu-hook
21054 Hook called after creating the group mode menu.
21055
21056 @item gnus-summary-menu-hook
21057 @vindex gnus-summary-menu-hook
21058 Hook called after creating the summary mode menu.
21059
21060 @item gnus-server-menu-hook
21061 @vindex gnus-server-menu-hook
21062 Hook called after creating the server mode menu.
21063
21064 @item gnus-browse-menu-hook
21065 @vindex gnus-browse-menu-hook
21066 Hook called after creating the browse mode menu.
21067
21068 @item gnus-score-menu-hook
21069 @vindex gnus-score-menu-hook
21070 Hook called after creating the score mode menu.
21071
21072 @end table
21073
21074
21075 @node Buttons
21076 @section Buttons
21077 @cindex buttons
21078 @cindex mouse
21079 @cindex click
21080
21081 Those new-fangled @dfn{mouse} contraptions is very popular with the
21082 young, hep kids who don't want to learn the proper way to do things
21083 these days.  Why, I remember way back in the summer of '89, when I was
21084 using Emacs on a Tops 20 system.  Three hundred users on one single
21085 machine, and every user was running Simula compilers.  Bah!
21086
21087 Right.
21088
21089 @vindex gnus-carpal
21090 Well, you can make Gnus display bufferfuls of buttons you can click to
21091 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21092 really.  Tell the chiropractor I sent you.
21093
21094
21095 @table @code
21096
21097 @item gnus-carpal-mode-hook
21098 @vindex gnus-carpal-mode-hook
21099 Hook run in all carpal mode buffers.
21100
21101 @item gnus-carpal-button-face
21102 @vindex gnus-carpal-button-face
21103 Face used on buttons.
21104
21105 @item gnus-carpal-header-face
21106 @vindex gnus-carpal-header-face
21107 Face used on carpal buffer headers.
21108
21109 @item gnus-carpal-group-buffer-buttons
21110 @vindex gnus-carpal-group-buffer-buttons
21111 Buttons in the group buffer.
21112
21113 @item gnus-carpal-summary-buffer-buttons
21114 @vindex gnus-carpal-summary-buffer-buttons
21115 Buttons in the summary buffer.
21116
21117 @item gnus-carpal-server-buffer-buttons
21118 @vindex gnus-carpal-server-buffer-buttons
21119 Buttons in the server buffer.
21120
21121 @item gnus-carpal-browse-buffer-buttons
21122 @vindex gnus-carpal-browse-buffer-buttons
21123 Buttons in the browse buffer.
21124 @end table
21125
21126 All the @code{buttons} variables are lists.  The elements in these list
21127 are either cons cells where the @code{car} contains a text to be displayed and
21128 the @code{cdr} contains a function symbol, or a simple string.
21129
21130
21131 @node Daemons
21132 @section Daemons
21133 @cindex demons
21134 @cindex daemons
21135
21136 Gnus, being larger than any program ever written (allegedly), does lots
21137 of strange stuff that you may wish to have done while you're not
21138 present.  For instance, you may want it to check for new mail once in a
21139 while.  Or you may want it to close down all connections to all servers
21140 when you leave Emacs idle.  And stuff like that.
21141
21142 Gnus will let you do stuff like that by defining various
21143 @dfn{handlers}.  Each handler consists of three elements:  A
21144 @var{function}, a @var{time}, and an @var{idle} parameter.
21145
21146 Here's an example of a handler that closes connections when Emacs has
21147 been idle for thirty minutes:
21148
21149 @lisp
21150 (gnus-demon-close-connections nil 30)
21151 @end lisp
21152
21153 Here's a handler that scans for @acronym{PGP} headers every hour when
21154 Emacs is idle:
21155
21156 @lisp
21157 (gnus-demon-scan-pgp 60 t)
21158 @end lisp
21159
21160 This @var{time} parameter and than @var{idle} parameter work together
21161 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21162 @code{nil}, then the function will be called every @var{time} minutes.
21163
21164 If @var{idle} is @code{t}, then the function will be called after
21165 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21166 the function will never be called.  But once Emacs goes idle, the
21167 function will be called every @var{time} minutes.
21168
21169 If @var{idle} is a number and @var{time} is a number, the function will
21170 be called every @var{time} minutes only when Emacs has been idle for
21171 @var{idle} minutes.
21172
21173 If @var{idle} is a number and @var{time} is @code{nil}, the function
21174 will be called once every time Emacs has been idle for @var{idle}
21175 minutes.
21176
21177 And if @var{time} is a string, it should look like @samp{07:31}, and
21178 the function will then be called once every day somewhere near that
21179 time.  Modified by the @var{idle} parameter, of course.
21180
21181 @vindex gnus-demon-timestep
21182 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21183 seconds.  This is 60 by default.  If you change that variable,
21184 all the timings in the handlers will be affected.)
21185
21186 So, if you want to add a handler, you could put something like this in
21187 your @file{~/.gnus.el} file:
21188
21189 @findex gnus-demon-add-handler
21190 @lisp
21191 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21192 @end lisp
21193
21194 @findex gnus-demon-add-nocem
21195 @findex gnus-demon-add-scanmail
21196 @findex gnus-demon-add-rescan
21197 @findex gnus-demon-add-scan-timestamps
21198 @findex gnus-demon-add-disconnection
21199 Some ready-made functions to do this have been created:
21200 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21201 @code{gnus-demon-add-nntp-close-connection},
21202 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21203 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21204 @file{~/.gnus.el} if you want those abilities.
21205
21206 @findex gnus-demon-init
21207 @findex gnus-demon-cancel
21208 @vindex gnus-demon-handlers
21209 If you add handlers to @code{gnus-demon-handlers} directly, you should
21210 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21211 daemons, you can use the @code{gnus-demon-cancel} function.
21212
21213 Note that adding daemons can be pretty naughty if you over do it.  Adding
21214 functions that scan all news and mail from all servers every two seconds
21215 is a sure-fire way of getting booted off any respectable system.  So
21216 behave.
21217
21218
21219 @node NoCeM
21220 @section NoCeM
21221 @cindex nocem
21222 @cindex spam
21223
21224 @dfn{Spamming} is posting the same article lots and lots of times.
21225 Spamming is bad.  Spamming is evil.
21226
21227 Spamming is usually canceled within a day or so by various anti-spamming
21228 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21229 NoCeM is pronounced ``no see-'em'', and means what the name
21230 implies---these are messages that make the offending articles, like, go
21231 away.
21232
21233 What use are these NoCeM messages if the articles are canceled anyway?
21234 Some sites do not honor cancel messages and some sites just honor cancels
21235 from a select few people.  Then you may wish to make use of the NoCeM
21236 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21237
21238 Gnus can read and parse the messages in this group automatically, and
21239 this will make spam disappear.
21240
21241 There are some variables to customize, of course:
21242
21243 @table @code
21244 @item gnus-use-nocem
21245 @vindex gnus-use-nocem
21246 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21247 by default.
21248
21249 @item gnus-nocem-groups
21250 @vindex gnus-nocem-groups
21251 Gnus will look for NoCeM messages in the groups in this list.  The
21252 default is 
21253 @lisp
21254 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21255  "alt.nocem.misc" "news.admin.net-abuse.announce")
21256 @end lisp
21257
21258 @item gnus-nocem-issuers
21259 @vindex gnus-nocem-issuers
21260 There are many people issuing NoCeM messages.  This list says what
21261 people you want to listen to.  The default is
21262 @lisp
21263 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21264  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21265 @end lisp
21266 fine, upstanding citizens all of them.
21267
21268 Known despammers that you can put in this list are listed at@*
21269 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21270
21271 You do not have to heed NoCeM messages from all these people---just the
21272 ones you want to listen to.  You also don't have to accept all NoCeM
21273 messages from the people you like.  Each NoCeM message has a @dfn{type}
21274 header that gives the message a (more or less, usually less) rigorous
21275 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21276 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21277 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21278 Each condition is either a string (which is a regexp that matches types
21279 you want to use) or a list on the form @code{(not @var{string})}, where
21280 @var{string} is a regexp that matches types you don't want to use.
21281
21282 For instance, if you want all NoCeM messages from Chris Lewis except his
21283 @samp{troll} messages, you'd say:
21284
21285 @lisp
21286 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21287 @end lisp
21288
21289 On the other hand, if you just want nothing but his @samp{spam} and
21290 @samp{spew} messages, you'd say:
21291
21292 @lisp
21293 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21294 @end lisp
21295
21296 The specs are applied left-to-right.
21297
21298
21299 @item gnus-nocem-verifyer
21300 @vindex gnus-nocem-verifyer
21301 @findex mc-verify
21302 This should be a function for verifying that the NoCeM issuer is who she
21303 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21304 function.  If this is too slow and you don't care for verification
21305 (which may be dangerous), you can set this variable to @code{nil}.
21306
21307 If you want signed NoCeM messages to be verified and unsigned messages
21308 not to be verified (but used anyway), you could do something like:
21309
21310 @lisp
21311 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21312
21313 (defun my-gnus-mc-verify ()
21314   (not (eq 'forged
21315            (ignore-errors
21316              (if (mc-verify)
21317                  t
21318                'forged)))))
21319 @end lisp
21320
21321 This might be dangerous, though.
21322
21323 @item gnus-nocem-directory
21324 @vindex gnus-nocem-directory
21325 This is where Gnus will store its NoCeM cache files.  The default is@*
21326 @file{~/News/NoCeM/}.
21327
21328 @item gnus-nocem-expiry-wait
21329 @vindex gnus-nocem-expiry-wait
21330 The number of days before removing old NoCeM entries from the cache.
21331 The default is 15.  If you make it shorter Gnus will be faster, but you
21332 might then see old spam.
21333
21334 @item gnus-nocem-check-from
21335 @vindex gnus-nocem-check-from
21336 Non-@code{nil} means check for valid issuers in message bodies.
21337 Otherwise don't bother fetching articles unless their author matches a
21338 valid issuer; that is much faster if you are selective about the
21339 issuers.
21340
21341 @item gnus-nocem-check-article-limit
21342 @vindex gnus-nocem-check-article-limit
21343 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21344 group.  NoCeM groups can be huge and very slow to process.
21345
21346 @end table
21347
21348 Using NoCeM could potentially be a memory hog.  If you have many living
21349 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21350 big.  If this is a problem, you should kill off all (or most) of your
21351 unsubscribed groups (@pxref{Subscription Commands}).
21352
21353
21354 @node Undo
21355 @section Undo
21356 @cindex undo
21357
21358 It is very useful to be able to undo actions one has done.  In normal
21359 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21360 In Gnus buffers, however, it isn't that simple.
21361
21362 The things Gnus displays in its buffer is of no value whatsoever to
21363 Gnus---it's all just data designed to look nice to the user.
21364 Killing a group in the group buffer with @kbd{C-k} makes the line
21365 disappear, but that's just a side-effect of the real action---the
21366 removal of the group in question from the internal Gnus structures.
21367 Undoing something like that can't be done by the normal Emacs
21368 @code{undo} function.
21369
21370 Gnus tries to remedy this somewhat by keeping track of what the user
21371 does and coming up with actions that would reverse the actions the user
21372 takes.  When the user then presses the @code{undo} key, Gnus will run
21373 the code to reverse the previous action, or the previous actions.
21374 However, not all actions are easily reversible, so Gnus currently offers
21375 a few key functions to be undoable.  These include killing groups,
21376 yanking groups, and changing the list of read articles of groups.
21377 That's it, really.  More functions may be added in the future, but each
21378 added function means an increase in data to be stored, so Gnus will
21379 never be totally undoable.
21380
21381 @findex gnus-undo-mode
21382 @vindex gnus-use-undo
21383 @findex gnus-undo
21384 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21385 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21386 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21387 command, which should feel kinda like the normal Emacs @code{undo}
21388 command.
21389
21390
21391 @node Predicate Specifiers
21392 @section Predicate Specifiers
21393 @cindex predicate specifiers
21394
21395 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21396 form that allows flexible specification of predicates without having
21397 to type all that much.
21398
21399 These specifiers are lists consisting of functions, symbols and lists.
21400
21401 Here's an example:
21402
21403 @lisp
21404 (or gnus-article-unseen-p
21405     gnus-article-unread-p)
21406 @end lisp
21407
21408 The available symbols are @code{or}, @code{and} and @code{not}.  The
21409 functions all take one parameter.
21410
21411 @findex gnus-make-predicate
21412 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21413 to create a function that can be called.  This input parameter to this
21414 function will be passed along to all the functions in the predicate
21415 specifier.
21416
21417
21418 @node Moderation
21419 @section Moderation
21420 @cindex moderation
21421
21422 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21423 It is not included in the standard Gnus package.  Write a mail to
21424 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21425 get a copy.
21426
21427 The moderation package is implemented as a minor mode for summary
21428 buffers.  Put
21429
21430 @lisp
21431 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21432 @end lisp
21433
21434 in your @file{~/.gnus.el} file.
21435
21436 If you are the moderator of @samp{rec.zoofle}, this is how it's
21437 supposed to work:
21438
21439 @enumerate
21440 @item
21441 You split your incoming mail by matching on
21442 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21443 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21444
21445 @item
21446 You enter that group once in a while and post articles using the @kbd{e}
21447 (edit-and-post) or @kbd{s} (just send unedited) commands.
21448
21449 @item
21450 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21451 articles that weren't approved by you, you can cancel them with the
21452 @kbd{c} command.
21453 @end enumerate
21454
21455 To use moderation mode in these two groups, say:
21456
21457 @lisp
21458 (setq gnus-moderated-list
21459       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21460 @end lisp
21461
21462
21463 @node Image Enhancements
21464 @section Image Enhancements
21465
21466 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21467 support images yet.}, is able to display pictures and stuff, so Gnus has
21468 taken advantage of that.
21469
21470 @menu
21471 * Picons::                      How to display pictures of what you're reading.
21472 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21473 * X-Face::                      Display a funky, teensy black-and-white image.
21474 * XVarious::                    Other XEmacsy Gnusey variables.
21475 @end menu
21476
21477
21478 @node Picons
21479 @subsection Picons
21480
21481 @iftex
21482 @iflatex
21483 \include{picons}
21484 @end iflatex
21485 @end iftex
21486
21487 So@dots{}  You want to slow down your news reader even more!  This is a
21488 good way to do so.  Its also a great way to impress people staring
21489 over your shoulder as you read news.
21490
21491 What are Picons?  To quote directly from the Picons Web site:
21492
21493 @iftex
21494 @iflatex
21495 \margindex{}
21496 @end iflatex
21497 @end iftex
21498
21499 @quotation
21500 @dfn{Picons} is short for ``personal icons''.  They're small,
21501 constrained images used to represent users and domains on the net,
21502 organized into databases so that the appropriate image for a given
21503 e-mail address can be found.  Besides users and domains, there are picon
21504 databases for Usenet newsgroups and weather forecasts.  The picons are
21505 in either monochrome @code{XBM} format or color @code{XPM} and
21506 @code{GIF} formats.
21507 @end quotation
21508
21509 @vindex gnus-picon-databases
21510 For instructions on obtaining and installing the picons databases,
21511 point your Web browser at
21512 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21513
21514 If you are using Debian GNU/Linux, saying @samp{apt-get install
21515 picons.*} will install the picons where Gnus can find them.
21516
21517 To enable displaying picons, simply make sure that
21518 @code{gnus-picon-databases} points to the directory containing the
21519 Picons databases.
21520
21521 The following variables offer control over where things are located.
21522
21523 @table @code
21524
21525 @item gnus-picon-databases
21526 @vindex gnus-picon-databases
21527 The location of the picons database.  This is a list of directories
21528 containing the @file{news}, @file{domains}, @file{users} (and so on)
21529 subdirectories.  Defaults to @code{("/usr/lib/picon"
21530 "/usr/local/faces")}.
21531
21532 @item gnus-picon-news-directories
21533 @vindex gnus-picon-news-directories
21534 List of subdirectories to search in @code{gnus-picon-databases} for
21535 newsgroups faces.  @code{("news")} is the default.
21536
21537 @item gnus-picon-user-directories
21538 @vindex gnus-picon-user-directories
21539 List of subdirectories to search in @code{gnus-picon-databases} for user
21540 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21541
21542 @item gnus-picon-domain-directories
21543 @vindex gnus-picon-domain-directories
21544 List of subdirectories to search in @code{gnus-picon-databases} for
21545 domain name faces.  Defaults to @code{("domains")}.  Some people may
21546 want to add @samp{"unknown"} to this list.
21547
21548 @item gnus-picon-file-types
21549 @vindex gnus-picon-file-types
21550 Ordered list of suffixes on picon file names to try.  Defaults to
21551 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21552
21553 @end table
21554
21555 @node Smileys
21556 @subsection Smileys
21557 @cindex smileys
21558
21559 @iftex
21560 @iflatex
21561 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21562 \input{smiley}
21563 @end iflatex
21564 @end iftex
21565
21566 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21567 currently the only package that uses Smiley, it is documented here.
21568
21569 In short---to use Smiley in Gnus, put the following in your
21570 @file{~/.gnus.el} file:
21571
21572 @lisp
21573 (setq gnus-treat-display-smileys t)
21574 @end lisp
21575
21576 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21577 the like---to pictures and displays those instead of the text smiley
21578 faces.  The conversion is controlled by a list of regexps that matches
21579 text and maps that to file names.
21580
21581 @vindex smiley-regexp-alist
21582 The alist used is specified by the @code{smiley-regexp-alist}
21583 variable.  The first item in each element is the regexp to be matched;
21584 the second element is the regexp match group that is to be replaced by
21585 the picture; and the third element is the name of the file to be
21586 displayed.
21587
21588 The following variables customize where Smiley will look for these
21589 files:
21590
21591 @table @code
21592
21593 @item smiley-data-directory
21594 @vindex smiley-data-directory
21595 Where Smiley will look for smiley faces files.
21596
21597 @item gnus-smiley-file-types
21598 @vindex gnus-smiley-file-types
21599 List of suffixes on smiley file names to try.
21600
21601 @end table
21602
21603
21604 @node X-Face
21605 @subsection X-Face
21606 @cindex x-face
21607
21608 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21609 depth) image that's supposed to represent the author of the message.
21610 It seems to be supported by an ever-growing number of mail and news
21611 readers.
21612
21613 @cindex x-face
21614 @findex gnus-article-display-x-face
21615 @findex gnus-article-x-face-command
21616 @vindex gnus-article-x-face-command
21617 @vindex gnus-article-x-face-too-ugly
21618 @iftex
21619 @iflatex
21620 \include{xface}
21621 @end iflatex
21622 @end iftex
21623 @c @anchor{X-Face}
21624
21625 Decoding an @code{X-Face} header either requires an Emacs that has
21626 @samp{compface} support (which most XEmacs versions has), or that you
21627 have @samp{compface} installed on your system.  If either is true,
21628 Gnus will default to displaying @code{X-Face} headers.
21629
21630 The variable that controls this is the
21631 @code{gnus-article-x-face-command} variable.  If this variable is a
21632 string, this string will be executed in a sub-shell.  If it is a
21633 function, this function will be called with the face as the argument.
21634 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21635 the @code{From} header, the face will not be shown.
21636
21637 The default action under Emacs 20 is to fork off the @code{display}
21638 program@footnote{@code{display} is from the ImageMagick package.  For
21639 the @code{uncompface} and @code{icontopbm} programs look for a package
21640 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21641 view the face.
21642
21643 Under XEmacs or Emacs 21+ with suitable image support, the default
21644 action is to display the face before the @code{From} header.  (It's
21645 nicer if XEmacs has been compiled with @code{X-Face} support---that
21646 will make display somewhat faster.  If there's no native @code{X-Face}
21647 support, Gnus will try to convert the @code{X-Face} header using
21648 external programs from the @code{pbmplus} package and
21649 friends.@footnote{On a GNU/Linux system look for packages with names
21650 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21651
21652 (Note: @code{x-face} is used in the variable/function names, not
21653 @code{xface}).
21654
21655 Gnus provides a few convenience functions and variables to allow
21656 easier insertion of X-Face headers in outgoing messages.
21657
21658 @findex gnus-random-x-face
21659 @vindex gnus-convert-pbm-to-x-face-command
21660 @vindex gnus-x-face-directory
21661 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21662 @code{gnus-x-face-directory} and picks one at random, and then
21663 converts it to the X-Face format by using the
21664 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21665 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21666 header data as a string.
21667
21668 @findex gnus-insert-random-x-face-header
21669 @code{gnus-insert-random-x-face-header} calls
21670 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21671 randomly generated data.
21672
21673 @findex gnus-x-face-from-file
21674 @vindex gnus-convert-image-to-x-face-command
21675 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21676 converts the file to X-Face format by using the
21677 @code{gnus-convert-image-to-x-face-command} shell command.
21678
21679 Here's how you would typically use the first function.  Put something
21680 like the following in your @file{~/.gnus.el} file:
21681
21682 @lisp
21683 (setq message-required-news-headers
21684       (nconc message-required-news-headers
21685              (list '(X-Face . gnus-random-x-face))))
21686 @end lisp
21687
21688 Using the last function would be something like this:
21689
21690 @lisp
21691 (setq message-required-news-headers
21692       (nconc message-required-news-headers
21693              (list '(X-Face . (lambda ()
21694                                 (gnus-x-face-from-file
21695                                  "~/My-face.gif"))))))
21696 @end lisp
21697
21698
21699 @node XVarious
21700 @subsection Various XEmacs Variables
21701
21702 @table @code
21703 @item gnus-xmas-glyph-directory
21704 @vindex gnus-xmas-glyph-directory
21705 This is where Gnus will look for pictures.  Gnus will normally
21706 auto-detect this directory, but you may set it manually if you have an
21707 unusual directory structure.
21708
21709 @item gnus-xmas-logo-color-alist
21710 @vindex gnus-xmas-logo-color-alist
21711 This is an alist where the key is a type symbol and the values are the
21712 foreground and background color of the splash page glyph.
21713
21714 @item gnus-xmas-logo-color-style
21715 @vindex gnus-xmas-logo-color-style
21716 This is the key used to look up the color in the alist described above.
21717 Valid values include @code{flame}, @code{pine}, @code{moss},
21718 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21719 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21720
21721 @item gnus-xmas-modeline-glyph
21722 @vindex gnus-xmas-modeline-glyph
21723 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21724 default.
21725
21726 @end table
21727
21728 @subsubsection Toolbar
21729
21730 @table @code
21731
21732 @item gnus-use-toolbar
21733 @vindex gnus-use-toolbar
21734 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21735 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21736 @code{right-toolbar}, or @code{left-toolbar}.
21737
21738 @item gnus-group-toolbar
21739 @vindex gnus-group-toolbar
21740 The toolbar in the group buffer.
21741
21742 @item gnus-summary-toolbar
21743 @vindex gnus-summary-toolbar
21744 The toolbar in the summary buffer.
21745
21746 @item gnus-summary-mail-toolbar
21747 @vindex gnus-summary-mail-toolbar
21748 The toolbar in the summary buffer of mail groups.
21749
21750 @end table
21751
21752 @iftex
21753 @iflatex
21754 \margindex{}
21755 @end iflatex
21756 @end iftex
21757
21758
21759 @node Fuzzy Matching
21760 @section Fuzzy Matching
21761 @cindex fuzzy matching
21762
21763 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21764 things like scoring, thread gathering and thread comparison.
21765
21766 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21767 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21768 means, and the implementation has changed over time.
21769
21770 Basically, it tries to remove all noise from lines before comparing.
21771 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21772 out of the strings before comparing the results.  This often leads to
21773 adequate results---even when faced with strings generated by text
21774 manglers masquerading as newsreaders.
21775
21776
21777 @node Thwarting Email Spam
21778 @section Thwarting Email Spam
21779 @cindex email spam
21780 @cindex spam
21781 @cindex UCE
21782 @cindex unsolicited commercial email
21783
21784 In these last days of the Usenet, commercial vultures are hanging about
21785 and grepping through news like crazy to find email addresses they can
21786 foist off their scams and products to.  As a reaction to this, many
21787 people have started putting nonsense addresses into their @code{From}
21788 lines.  I think this is counterproductive---it makes it difficult for
21789 people to send you legitimate mail in response to things you write, as
21790 well as making it difficult to see who wrote what.  This rewriting may
21791 perhaps be a bigger menace than the unsolicited commercial email itself
21792 in the end.
21793
21794 The biggest problem I have with email spam is that it comes in under
21795 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21796 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21797 mail group, only to find two pyramid schemes, seven advertisements
21798 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21799 and one mail asking me to repent and find some god.
21800
21801 This is annoying.  Here's what you can do about it.
21802
21803 @menu
21804 * The problem of spam::         Some background, and some solutions
21805 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21806 * SpamAssassin::                How to use external anti-spam tools.
21807 * Hashcash::                    Reduce spam by burning CPU time.
21808 * Filtering Spam Using The Spam ELisp Package::  
21809 * Filtering Spam Using Statistics with spam-stat::  
21810 @end menu
21811
21812 @node The problem of spam
21813 @subsection The problem of spam
21814 @cindex email spam
21815 @cindex spam filtering approaches
21816 @cindex filtering approaches, spam
21817 @cindex UCE
21818 @cindex unsolicited commercial email
21819
21820 First, some background on spam.
21821
21822 If you have access to e-mail, you are familiar with spam (technically
21823 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21824 because e-mail delivery is very cheap compared to paper mail, so only
21825 a very small percentage of people need to respond to an UCE to make it
21826 worthwhile to the advertiser.  Ironically, one of the most common
21827 spams is the one offering a database of e-mail addresses for further
21828 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21829 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21830
21831 Spam comes from a wide variety of sources.  It is simply impossible to
21832 dispose of all spam without discarding useful messages.  A good
21833 example is the TMDA system, which requires senders
21834 unknown to you to confirm themselves as legitimate senders before
21835 their e-mail can reach you.  Without getting into the technical side
21836 of TMDA, a downside is clearly that e-mail from legitimate sources may
21837 be discarded if those sources can't or won't confirm themselves
21838 through the TMDA system.  Another problem with TMDA is that it
21839 requires its users to have a basic understanding of e-mail delivery
21840 and processing.
21841
21842 The simplest approach to filtering spam is filtering.  If you get 200
21843 spam messages per day from @samp{random-address@@vmadmin.com}, you
21844 block @samp{vmadmin.com}.  If you get 200 messages about
21845 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21846 message.  This, unfortunately, is a great way to discard legitimate
21847 e-mail.  For instance, the very informative and useful RISKS digest
21848 has been blocked by overzealous mail filters because it
21849 @strong{contained} words that were common in spam messages.
21850 Nevertheless, in isolated cases, with great care, direct filtering of
21851 mail can be useful.
21852
21853 Another approach to filtering e-mail is the distributed spam
21854 processing, for instance DCC implements such a system.  In essence,
21855 @code{N} systems around the world agree that a machine @samp{X} in
21856 China, Ghana, or California is sending out spam e-mail, and these
21857 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21858 a database.  The criteria for spam detection vary---it may be the
21859 number of messages sent, the content of the messages, and so on.  When
21860 a user of the distributed processing system wants to find out if a
21861 message is spam, he consults one of those @code{N} systems.
21862
21863 Distributed spam processing works very well against spammers that send
21864 a large number of messages at once, but it requires the user to set up
21865 fairly complicated checks.  There are commercial and free distributed
21866 spam processing systems.  Distributed spam processing has its risks as
21867 well.  For instance legitimate e-mail senders have been accused of
21868 sending spam, and their web sites have been shut down for some time
21869 because of the incident.
21870
21871 The statistical approach to spam filtering is also popular.  It is
21872 based on a statistical analysis of previous spam messages.  Usually
21873 the analysis is a simple word frequency count, with perhaps pairs of
21874 words or 3-word combinations thrown into the mix.  Statistical
21875 analysis of spam works very well in most of the cases, but it can
21876 classify legitimate e-mail as spam in some cases.  It takes time to
21877 run the analysis, the full message must be analyzed, and the user has
21878 to store the database of spam analyses.
21879
21880 @node Anti-Spam Basics
21881 @subsection Anti-Spam Basics
21882 @cindex email spam
21883 @cindex spam
21884 @cindex UCE
21885 @cindex unsolicited commercial email
21886
21887 One way of dealing with spam is having Gnus split out all spam into a
21888 @samp{spam} mail group (@pxref{Splitting Mail}).
21889
21890 First, pick one (1) valid mail address that you can be reached at, and
21891 put it in your @code{From} header of all your news articles.  (I've
21892 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21893 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21894 sysadmin whether your sendmail installation accepts keywords in the local
21895 part of the mail address.)
21896
21897 @lisp
21898 (setq message-default-news-headers
21899       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21900 @end lisp
21901
21902 Then put the following split rule in @code{nnmail-split-fancy}
21903 (@pxref{Fancy Mail Splitting}):
21904
21905 @lisp
21906 (
21907  ...
21908  (to "larsi@@trym.ifi.uio.no"
21909       (| ("subject" "re:.*" "misc")
21910          ("references" ".*@@.*" "misc")
21911          "spam"))
21912  ...
21913 )
21914 @end lisp
21915
21916 This says that all mail to this address is suspect, but if it has a
21917 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21918 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21919 (This idea probably comes from Tim Pierce.)
21920
21921 In addition, many mail spammers talk directly to your @acronym{SMTP} server
21922 and do not include your email address explicitly in the @code{To}
21923 header.  Why they do this is unknown---perhaps it's to thwart this
21924 thwarting scheme?  In any case, this is trivial to deal with---you just
21925 put anything not addressed to you in the @samp{spam} group by ending
21926 your fancy split rule in this way:
21927
21928 @lisp
21929 (
21930  ...
21931  (to "larsi" "misc")
21932  "spam")
21933 @end lisp
21934
21935 In my experience, this will sort virtually everything into the right
21936 group.  You still have to check the @samp{spam} group from time to time to
21937 check for legitimate mail, though.  If you feel like being a good net
21938 citizen, you can even send off complaints to the proper authorities on
21939 each unsolicited commercial email---at your leisure.
21940
21941 If you are also a lazy net citizen, you will probably prefer complaining
21942 automatically with the @file{gnus-junk.el} package, available FOR FREE
21943 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21944 Since most e-mail spam is sent automatically, this may reconcile the
21945 cosmic balance somewhat.
21946
21947 This works for me.  It allows people an easy way to contact me (they can
21948 just press @kbd{r} in the usual way), and I'm not bothered at all with
21949 spam.  It's a win-win situation.  Forging @code{From} headers to point
21950 to non-existent domains is yucky, in my opinion.
21951
21952
21953
21954 @node SpamAssassin
21955 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21956 @cindex SpamAssassin
21957 @cindex Vipul's Razor
21958 @cindex DCC
21959
21960 The days where the hints in the previous section was sufficient in
21961 avoiding spam is coming to an end.  There are many tools out there
21962 that claim to reduce the amount of spam you get.  This section could
21963 easily become outdated fast, as new products replace old, but
21964 fortunately most of these tools seem to have similar interfaces.  Even
21965 though this section will use SpamAssassin as an example, it should be
21966 easy to adapt it to most other tools.
21967
21968 If the tool you are using is not installed on the mail server, you
21969 need to invoke it yourself.  Ideas on how to use the
21970 @code{:postscript} mail source parameter (@pxref{Mail Source
21971 Specifiers}) follows.
21972
21973 @lisp
21974 (setq mail-sources
21975       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21976         (pop :user "jrl"
21977              :server "pophost"
21978              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21979 @end lisp
21980
21981 Once you managed to process your incoming spool somehow, thus making
21982 the mail contain e.g. a header indicating it is spam, you are ready to
21983 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21984
21985 @lisp
21986 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21987                              ...))
21988 @end lisp
21989
21990 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21991
21992 @lisp
21993 (setq nnmail-split-methods 'nnmail-split-fancy
21994       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21995                              ...))
21996 @end lisp
21997
21998 Some people might not like the idea of piping the mail through various
21999 programs using a @code{:prescript} (if some program is buggy, you
22000 might lose all mail).  If you are one of them, another solution is to
22001 call the external tools during splitting.  Example fancy split method:
22002
22003 @lisp
22004 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22005                              ...))
22006 (defun kevin-spamassassin ()
22007   (save-excursion
22008     (let ((buf (or (get-buffer " *nnmail incoming*")
22009                    (get-buffer " *nnml move*"))))
22010       (if (not buf)
22011           (progn (message "Oops, cannot find message buffer") nil)
22012         (set-buffer buf)
22013         (if (eq 1 (call-process-region (point-min) (point-max)
22014                                        "spamc" nil nil nil "-c"))
22015             "spam")))))
22016 @end lisp
22017
22018 That is about it.  As some spam is likely to get through anyway, you
22019 might want to have a nifty function to call when you happen to read
22020 spam.  And here is the nifty function:
22021
22022 @lisp
22023  (defun my-gnus-raze-spam ()
22024   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22025   (interactive)
22026   (gnus-summary-show-raw-article)
22027   (gnus-summary-save-in-pipe "razor-report -f -d")
22028   (gnus-summary-mark-as-expirable 1))
22029 @end lisp
22030
22031 @node Hashcash
22032 @subsection Hashcash
22033 @cindex hashcash
22034
22035 A novel technique to fight spam is to require senders to do something
22036 costly for each message they send.  This has the obvious drawback that
22037 you cannot rely on that everyone in the world uses this technique,
22038 since it is not part of the Internet standards, but it may be useful
22039 in smaller communities.
22040
22041 While the tools in the previous section work well in practice, they
22042 work only because the tools are constantly maintained and updated as
22043 new form of spam appears.  This means that a small percentage of spam
22044 will always get through.  It also means that somewhere, someone needs
22045 to read lots of spam to update these tools.  Hashcash avoids that, but
22046 instead requires that everyone you communicate with supports the
22047 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22048 The approaches have their own advantages and disadvantages, but as
22049 often in the real world, a combination of them is stronger than either
22050 one of them separately.
22051
22052 @cindex X-Hashcash
22053 The ``something costly'' is to burn CPU time, more specifically to
22054 compute a hash collision up to a certain number of bits.  The
22055 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22056 header. For more details, and for the external application
22057 @code{hashcash} you need to install to use this feature, see
22058 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22059 information can be found at @uref{http://www.camram.org/}.
22060
22061 If you wish to call hashcash for each message you send, say something
22062 like:
22063
22064 @lisp
22065 (require 'hashcash)
22066 (add-hook 'message-send-hook 'mail-add-payment)
22067 @end lisp
22068
22069 The @code{hashcash.el} library can be found in the Gnus development
22070 contrib directory. or at
22071 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22072
22073 You will need to set up some additional variables as well:
22074
22075 @table @code
22076
22077 @item hashcash-default-payment
22078 @vindex hashcash-default-payment
22079 This variable indicates the default number of bits the hash collision
22080 should consist of.  By default this is 0, meaning nothing will be
22081 done.  Suggested useful values include 17 to 29.
22082
22083 @item hashcash-payment-alist
22084 @vindex hashcash-payment-alist
22085 Some receivers may require you to spend burn more CPU time than the
22086 default.  This variable contains a list of @samp{(@var{addr}
22087 @var{amount})} cells, where @var{addr} is the receiver (email address
22088 or newsgroup) and @var{amount} is the number of bits in the collision
22089 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22090 @var{amount})} cells, where the @var{string} is the string to use
22091 (normally the email address or newsgroup name is used).
22092
22093 @item hashcash
22094 @vindex hashcash
22095 Where the @code{hashcash} binary is installed.
22096
22097 @end table
22098
22099 Currently there is no built in functionality in Gnus to verify
22100 hashcash cookies, it is expected that this is performed by your hand
22101 customized mail filtering scripts.  Improvements in this area would be
22102 a useful contribution, however.
22103
22104 @node Filtering Spam Using The Spam ELisp Package
22105 @subsection Filtering Spam Using The Spam ELisp Package
22106 @cindex spam filtering
22107 @cindex spam
22108
22109 The idea behind @code{spam.el} is to have a control center for spam detection
22110 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
22111 filters incoming mail, and it analyzes mail known to be spam or ham.
22112 @emph{Ham} is the name used throughout @code{spam.el} to indicate
22113 non-spam messages.
22114
22115 So, what happens when you load @code{spam.el}?  First of all, you get
22116 the following keyboard commands:
22117
22118 @table @kbd
22119
22120 @item M-d
22121 @itemx M s x
22122 @itemx S x
22123 @kindex M-d
22124 @kindex S x
22125 @kindex M s x
22126 @findex gnus-summary-mark-as-spam
22127 @code{gnus-summary-mark-as-spam}.
22128
22129 Mark current article as spam, showing it with the @samp{$} mark.
22130 Whenever you see a spam article, make sure to mark its summary line
22131 with @kbd{M-d} before leaving the group.  This is done automatically
22132 for unread articles in @emph{spam} groups.
22133
22134 @item M s t
22135 @itemx S t
22136 @kindex M s t
22137 @kindex S t
22138 @findex spam-bogofilter-score
22139 @code{spam-bogofilter-score}.
22140
22141 You must have Bogofilter installed for that command to work properly.
22142
22143 @xref{Bogofilter}.
22144
22145 @end table
22146
22147 Also, when you load @code{spam.el}, you will be able to customize its
22148 variables.  Try @code{customize-group} on the @samp{spam} variable
22149 group.
22150
22151 @vindex gnus-spam-process-newsgroups
22152 The concepts of ham processors and spam processors are very important.
22153 Ham processors and spam processors for a group can be set with the
22154 @code{spam-process} group parameter, or the
22155 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22156 mail known to be non-spam (@emph{ham}) and process it in some way so
22157 that later similar mail will also be considered non-spam.  Spam
22158 processors take mail known to be spam and process it so similar spam
22159 will be detected later.
22160
22161 @vindex gnus-spam-newsgroup-contents
22162 Gnus learns from the spam you get.  You have to collect your spam in
22163 one or more spam groups, and set or customize the variable
22164 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22165 groups to contain spam by setting their group parameter
22166 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22167 by customizing the corresponding variable
22168 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22169 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22170 also be used to declare groups as @emph{ham} groups if you set their
22171 classification to @code{gnus-group-spam-classification-ham}.  If
22172 groups are not classified by means of @code{spam-junk-mailgroups},
22173 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22174 considered @emph{unclassified}.  All groups are unclassified by
22175 default.
22176
22177 @vindex gnus-spam-mark
22178 @cindex $
22179 In spam groups, all messages are considered to be spam by default:
22180 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22181 group.  If you have seen a message, had it marked as spam, then
22182 unmarked it, it won't be marked as spam when you enter the group
22183 thereafter.  You can disable that behavior, so all unread messages
22184 will get the @samp{$} mark, if you set the
22185 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22186 remove the @samp{$} mark when you are in the group summary buffer for
22187 every message that is not spam after all.  To remove the @samp{$}
22188 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22189 declaring it read the non-spam way.  When you leave a group, all
22190 spam-marked (@samp{$}) articles are sent to a spam processor which
22191 will study them as spam samples.
22192
22193 Messages may also be deleted in various other ways, and unless
22194 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22195 and @samp{r} for default read or explicit delete, marks @samp{X} and
22196 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22197 low scores, are all considered to be associated with articles which
22198 are not spam.  This assumption might be false, in particular if you
22199 use kill files or score files as means for detecting genuine spam, you
22200 should then adjust the @code{ham-marks} group parameter.
22201
22202 @defvar ham-marks
22203 You can customize this group or topic parameter to be the list of
22204 marks you want to consider ham.  By default, the list contains the
22205 deleted, read, killed, kill-filed, and low-score marks.
22206 @end defvar
22207
22208 @defvar spam-marks
22209 You can customize this group or topic parameter to be the list of
22210 marks you want to consider spam.  By default, the list contains only
22211 the spam mark.
22212 @end defvar
22213
22214 When you leave @emph{any} group, regardless of its
22215 @code{spam-contents} classification, all spam-marked articles are sent
22216 to a spam processor, which will study these as spam samples.  If you
22217 explicit kill a lot, you might sometimes end up with articles marked
22218 @samp{K} which you never saw, and which might accidentally contain
22219 spam.  Best is to make sure that real spam is marked with @samp{$},
22220 and nothing else.
22221
22222 @vindex gnus-ham-process-destinations
22223 When you leave a @emph{spam} group, all spam-marked articles are
22224 marked as expired after processing with the spam processor.  This is
22225 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22226 @strong{ham} articles in a spam group will be moved to a location
22227 determined by either the @code{ham-process-destination} group
22228 parameter or a match in the @code{gnus-ham-process-destinations}
22229 variable, which is a list of regular expressions matched with group
22230 names (it's easiest to customize this variable with
22231 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22232 location is a group name.  If the @code{ham-process-destination}
22233 parameter is not set, ham articles are left in place.  If the
22234 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22235 set, the ham articles are marked as unread before being moved.
22236
22237 When you leave a @emph{ham} group, all ham-marked articles are sent to
22238 a ham processor, which will study these as non-spam samples.
22239
22240 @vindex gnus-spam-process-destinations
22241 When you leave a @emph{ham} or @emph{unclassified} group, all
22242 @strong{spam} articles are moved to a location determined by either
22243 the @code{spam-process-destination} group parameter or a match in the
22244 @code{gnus-spam-process-destinations} variable, which is a list of
22245 regular expressions matched with group names (it's easiest to
22246 customize this variable with @code{customize-variable
22247 gnus-spam-process-destinations}).  The ultimate location is a group
22248 name.  If the @code{spam-process-destination} parameter is not set,
22249 the spam articles are only expired.
22250
22251 To use the @code{spam.el} facilities for incoming mail filtering, you
22252 must add the following to your fancy split list
22253 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22254
22255 @example
22256 (: spam-split)
22257 @end example
22258
22259 Note that the fancy split may be called @code{nnmail-split-fancy} or
22260 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22261 nnimap back ends to retrieve your mail.
22262
22263 The @code{spam-split} function will process incoming mail and send the
22264 mail considered to be spam into the group name given by the variable
22265 @code{spam-split-group}.  By default that group name is @samp{spam},
22266 but you can customize @code{spam-split-group}.
22267
22268 You can also give @code{spam-split} a parameter,
22269 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22270
22271 Take these split rules (with @code{spam-use-regex-headers} and
22272 @code{spam-use-blackholes} set):
22273
22274 @example
22275  nnimap-split-fancy '(|
22276                       (any "ding" "ding")
22277                       (: spam-split)
22278                       ;; default mailbox
22279                       "mail")
22280 @end example
22281
22282 Now, the problem is that you want all ding messages to make it to the
22283 ding folder.  But that will let obvious spam (for example, spam
22284 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22285 when it's sent to the ding list.  On the other hand, some messages to
22286 the ding list are from a mail server in the blackhole list, so the
22287 invocation of @code{spam-split} can't be before the ding rule.
22288
22289 You can let SpamAssassin headers supercede ding rules, but all other
22290 @code{spam-split} rules (including a second invocation of the
22291 regex-headers check) will be after the ding rule:
22292
22293 @example
22294  nnimap-split-fancy '(|
22295                       (: spam-split 'spam-use-regex-headers)
22296                       (any "ding" "ding")
22297                       (: spam-split)
22298                       ;; default mailbox
22299                       "mail")
22300 @end example
22301
22302 Basically, this lets you invoke specific @code{spam-split} checks
22303 depending on your particular needs.  You don't have to throw all mail
22304 into all the spam tests.  Another reason why this is nice is that
22305 messages to mailing lists you have rules for don't have to have
22306 resource-intensive blackhole checks performed on them.  You could also
22307 specify different spam checks for your nnmail split vs. your nnimap
22308 split.  Go crazy.
22309
22310 You still have to have specific checks such as
22311 @code{spam-use-regex-headers} set to t, even if you specifically
22312 invoke @code{spam-split} with the check.  The reason is that when
22313 loading @code{spam.el}, some conditional loading is done depending on
22314 what @code{spam-use-xyz} variables you have set.
22315
22316 @emph{Note for IMAP users}
22317
22318 The boolean variable @code{nnimap-split-download-body} needs to be
22319 set, if you want to split based on the whole message instead of just
22320 the headers.  By default, the nnimap back end will only retrieve the
22321 message headers.  If you use @code{spam-check-bogofilter},
22322 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22323 can benefit from the full message body), you should set this variable.
22324 It is not set by default because it will slow @acronym{IMAP} down, and
22325 that is not an appropriate decision to make on behalf of the user.
22326
22327 @xref{Splitting in IMAP}.
22328
22329 @emph{TODO: Currently, spam.el only supports insertion of articles
22330 into a back end.  There is no way to tell spam.el that an article is no
22331 longer spam or ham.}
22332
22333 @emph{TODO: spam.el needs to provide a uniform way of training all the
22334 statistical databases.  Some have that functionality built-in, others
22335 don't.}
22336
22337 The following are the methods you can use to control the behavior of
22338 @code{spam-split} and their corresponding spam and ham processors:
22339
22340 @menu
22341 * Blacklists and Whitelists::   
22342 * BBDB Whitelists::             
22343 * Gmane Spam Reporting::        
22344 * Anti-spam Hashcash Payments::  
22345 * Blackholes::                  
22346 * Regular Expressions Header Matching::  
22347 * Bogofilter::                  
22348 * ifile spam filtering::        
22349 * spam-stat spam filtering::    
22350 * Extending the spam elisp package::  
22351 @end menu
22352
22353 @node Blacklists and Whitelists
22354 @subsubsection Blacklists and Whitelists
22355 @cindex spam filtering
22356 @cindex whitelists, spam filtering
22357 @cindex blacklists, spam filtering
22358 @cindex spam
22359
22360 @defvar spam-use-blacklist
22361
22362 Set this variable to @code{t} if you want to use blacklists when
22363 splitting incoming mail.  Messages whose senders are in the blacklist
22364 will be sent to the @code{spam-split-group}.  This is an explicit
22365 filter, meaning that it acts only on mail senders @emph{declared} to
22366 be spammers.
22367
22368 @end defvar
22369
22370 @defvar spam-use-whitelist
22371
22372 Set this variable to @code{t} if you want to use whitelists when
22373 splitting incoming mail.  Messages whose senders are not in the
22374 whitelist will be sent to the next spam-split rule.  This is an
22375 explicit filter, meaning that unless someone is in the whitelist, their
22376 messages are not assumed to be spam or ham.
22377
22378 @end defvar
22379
22380 @defvar spam-use-whitelist-exclusive
22381
22382 Set this variable to @code{t} if you want to use whitelists as an
22383 implicit filter, meaning that every message will be considered spam
22384 unless the sender is in the whitelist.  Use with care.
22385
22386 @end defvar
22387
22388 @defvar gnus-group-spam-exit-processor-blacklist
22389
22390 Add this symbol to a group's @code{spam-process} parameter by
22391 customizing the group parameters or the
22392 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22393 added to a group's @code{spam-process} parameter, the senders of
22394 spam-marked articles will be added to the blacklist.
22395
22396 @end defvar
22397
22398 @defvar gnus-group-ham-exit-processor-whitelist
22399
22400 Add this symbol to a group's @code{spam-process} parameter by
22401 customizing the group parameters or the
22402 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22403 added to a group's @code{spam-process} parameter, the senders of
22404 ham-marked articles in @emph{ham} groups will be added to the
22405 whitelist.  Note that this ham processor has no effect in @emph{spam}
22406 or @emph{unclassified} groups.
22407
22408 @end defvar
22409
22410 Blacklists are lists of regular expressions matching addresses you
22411 consider to be spam senders.  For instance, to block mail from any
22412 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22413 blacklist.  You start out with an empty blacklist.  Blacklist entries
22414 use the Emacs regular expression syntax.
22415
22416 Conversely, whitelists tell Gnus what addresses are considered
22417 legitimate.  All messages from whitelisted addresses are considered
22418 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22419 Emacs regular expression syntax.
22420
22421 The blacklist and whitelist file locations can be customized with the
22422 @code{spam-directory} variable (@file{~/News/spam} by default), or
22423 the @code{spam-whitelist} and @code{spam-blacklist} variables
22424 directly.  The whitelist and blacklist files will by default be in the
22425 @code{spam-directory} directory, named @file{whitelist} and
22426 @file{blacklist} respectively.
22427
22428 @node BBDB Whitelists
22429 @subsubsection BBDB Whitelists
22430 @cindex spam filtering
22431 @cindex BBDB whitelists, spam filtering
22432 @cindex BBDB, spam filtering
22433 @cindex spam
22434
22435 @defvar spam-use-BBDB
22436
22437 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22438 Whitelists}), but uses the BBDB as the source of whitelisted
22439 addresses, without regular expressions.  You must have the BBDB loaded
22440 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22441 not in the BBDB will be sent to the next spam-split rule.  This is an
22442 explicit filter, meaning that unless someone is in the BBDB, their
22443 messages are not assumed to be spam or ham.
22444
22445 @end defvar
22446
22447 @defvar spam-use-BBDB-exclusive
22448
22449 Set this variable to @code{t} if you want to use the BBDB as an
22450 implicit filter, meaning that every message will be considered spam
22451 unless the sender is in the BBDB.  Use with care.  Only sender
22452 addresses in the BBDB will be allowed through; all others will be
22453 classified as spammers.
22454
22455 @end defvar
22456
22457 @defvar gnus-group-ham-exit-processor-BBDB
22458
22459 Add this symbol to a group's @code{spam-process} parameter by
22460 customizing the group parameters or the
22461 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22462 added to a group's @code{spam-process} parameter, the senders of
22463 ham-marked articles in @emph{ham} groups will be added to the
22464 BBDB.  Note that this ham processor has no effect in @emph{spam}
22465 or @emph{unclassified} groups.
22466
22467 @end defvar
22468
22469 @node Gmane Spam Reporting
22470 @subsubsection Gmane Spam Reporting
22471 @cindex spam reporting
22472 @cindex Gmane, spam reporting
22473 @cindex Gmane, spam reporting
22474 @cindex spam
22475
22476 @defvar gnus-group-spam-exit-processor-report-gmane
22477
22478 Add this symbol to a group's @code{spam-process} parameter by
22479 customizing the group parameters or the
22480 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22481 added to a group's @code{spam-process} parameter, the spam-marked
22482 articles groups will be reported to the Gmane administrators.
22483
22484 @end defvar
22485
22486 @node Anti-spam Hashcash Payments
22487 @subsubsection Anti-spam Hashcash Payments
22488 @cindex spam filtering
22489 @cindex hashcash, spam filtering
22490 @cindex spam
22491
22492 @defvar spam-use-hashcash
22493
22494 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22495 Whitelists}), but uses hashcash tokens for whitelisting messages
22496 instead of the sender address.  You must have the @code{hashcash.el}
22497 package loaded for @code{spam-use-hashcash} to work properly.
22498 Messages without a hashcash payment token will be sent to the next
22499 spam-split rule.  This is an explicit filter, meaning that unless a
22500 hashcash token is found, the messages are not assumed to be spam or
22501 ham.
22502
22503 @end defvar
22504
22505 @node Blackholes
22506 @subsubsection Blackholes
22507 @cindex spam filtering
22508 @cindex blackholes, spam filtering
22509 @cindex spam
22510
22511 @defvar spam-use-blackholes
22512
22513 This option is disabled by default.  You can let Gnus consult the
22514 blackhole-type distributed spam processing systems (DCC, for instance)
22515 when you set this option.  The variable @code{spam-blackhole-servers}
22516 holds the list of blackhole servers Gnus will consult.  The current
22517 list is fairly comprehensive, but make sure to let us know if it
22518 contains outdated servers.
22519
22520 The blackhole check uses the @code{dig.el} package, but you can tell
22521 @code{spam.el} to use @code{dns.el} instead for better performance if
22522 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22523 this time to set @code{spam-use-dig} to @code{nil} despite the
22524 possible performance improvements, because some users may be unable to
22525 use it, but you can try it and see if it works for you.
22526
22527 @end defvar
22528
22529 @defvar spam-blackhole-servers
22530
22531 The list of servers to consult for blackhole checks.
22532
22533 @end defvar
22534
22535 @defvar spam-blackhole-good-server-regex
22536
22537 A regular expression for IPs that should not be checked against the
22538 blackhole server list.  When set to @code{nil}, it has no effect.
22539
22540 @end defvar
22541
22542 @defvar spam-use-dig
22543
22544 Use the @code{dig.el} package instead of the @code{dns.el} package.
22545 The default setting of @code{t} is recommended.
22546
22547 @end defvar
22548
22549 Blackhole checks are done only on incoming mail.  There is no spam or
22550 ham processor for blackholes.
22551
22552 @node Regular Expressions Header Matching
22553 @subsubsection Regular Expressions Header Matching
22554 @cindex spam filtering
22555 @cindex regular expressions header matching, spam filtering
22556 @cindex spam
22557
22558 @defvar spam-use-regex-headers
22559
22560 This option is disabled by default.  You can let Gnus check the
22561 message headers against lists of regular expressions when you set this
22562 option.  The variables @code{spam-regex-headers-spam} and
22563 @code{spam-regex-headers-ham} hold the list of regular expressions.
22564 Gnus will check against the message headers to determine if the
22565 message is spam or ham, respectively.
22566
22567 @end defvar
22568
22569 @defvar spam-regex-headers-spam
22570
22571 The list of regular expressions that, when matched in the headers of
22572 the message, positively identify it as spam.
22573
22574 @end defvar
22575
22576 @defvar spam-regex-headers-ham
22577
22578 The list of regular expressions that, when matched in the headers of
22579 the message, positively identify it as ham.
22580
22581 @end defvar
22582
22583 Regular expression header checks are done only on incoming mail.
22584 There is no specific spam or ham processor for regular expressions.
22585
22586 @node Bogofilter
22587 @subsubsection Bogofilter
22588 @cindex spam filtering
22589 @cindex bogofilter, spam filtering
22590 @cindex spam
22591
22592 @defvar spam-use-bogofilter
22593
22594 Set this variable if you want @code{spam-split} to use Eric Raymond's
22595 speedy Bogofilter.
22596
22597 With a minimum of care for associating the @samp{$} mark for spam
22598 articles only, Bogofilter training all gets fairly automatic.  You
22599 should do this until you get a few hundreds of articles in each
22600 category, spam or not.  The command @kbd{S t} in summary mode, either
22601 for debugging or for curiosity, shows the @emph{spamicity} score of
22602 the current article (between 0.0 and 1.0).
22603
22604 Bogofilter determines if a message is spam based on an internal
22605 threshold, set at compilation time.  That threshold can't be
22606 customized.
22607
22608 If the @code{bogofilter} executable is not in your path, Bogofilter
22609 processing will be turned off.
22610
22611 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22612
22613 @end defvar
22614
22615 @defvar spam-use-bogofilter-headers
22616
22617 Set this variable if you want @code{spam-split} to use Eric Raymond's
22618 speedy Bogofilter, looking only at the message headers.  It works
22619 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22620 must be in the message already.  Normally you would do this with a
22621 procmail recipe or something similar; consult the Bogofilter
22622 installation documents for details.
22623
22624 You should not enable this if you use @code{spam-use-bogofilter}.
22625
22626 @end defvar
22627
22628 @defvar gnus-group-spam-exit-processor-bogofilter
22629 Add this symbol to a group's @code{spam-process} parameter by
22630 customizing the group parameters or the
22631 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22632 added to a group's @code{spam-process} parameter, spam-marked articles
22633 will be added to the Bogofilter spam database.
22634 @end defvar
22635
22636 @defvar gnus-group-ham-exit-processor-bogofilter
22637 Add this symbol to a group's @code{spam-process} parameter by
22638 customizing the group parameters or the
22639 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22640 added to a group's @code{spam-process} parameter, the ham-marked
22641 articles in @emph{ham} groups will be added to the Bogofilter database
22642 of non-spam messages.  Note that this ham processor has no effect in
22643 @emph{spam} or @emph{unclassified} groups.
22644 @end defvar
22645
22646 @defvar spam-bogofilter-database-directory
22647
22648 This is the directory where Bogofilter will store its databases.  It
22649 is not specified by default, so Bogofilter will use its own default
22650 database directory.
22651
22652 @end defvar
22653
22654 The Bogofilter mail classifier is similar to ifile in intent and
22655 purpose.  A ham and a spam processor are provided, plus the
22656 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22657 variables to indicate to spam-split that Bogofilter should either be
22658 used, or has already been used on the article.  The 0.9.2.1 version of
22659 Bogofilter was used to test this functionality.
22660
22661 @node ifile spam filtering
22662 @subsubsection ifile spam filtering
22663 @cindex spam filtering
22664 @cindex ifile, spam filtering
22665 @cindex spam
22666
22667 @defvar spam-use-ifile
22668
22669 Enable this variable if you want @code{spam-split} to use ifile, a
22670 statistical analyzer similar to Bogofilter.
22671
22672 @end defvar
22673
22674 @defvar spam-ifile-all-categories
22675
22676 Enable this variable if you want @code{spam-use-ifile} to give you all
22677 the ifile categories, not just spam/non-spam.  If you use this, make
22678 sure you train ifile as described in its documentation.
22679
22680 @end defvar
22681
22682 @defvar spam-ifile-spam-category
22683
22684 This is the category of spam messages as far as ifile is concerned.
22685 The actual string used is irrelevant, but you probably want to leave
22686 the default value of @samp{spam}.
22687 @end defvar
22688
22689 @defvar spam-ifile-database-path
22690
22691 This is the filename for the ifile database.  It is not specified by
22692 default, so ifile will use its own default database name.
22693
22694 @end defvar
22695
22696 The ifile mail classifier is similar to Bogofilter in intent and
22697 purpose.  A ham and a spam processor are provided, plus the
22698 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22699 should be used.  The 1.2.1 version of ifile was used to test this
22700 functionality.
22701
22702 @node spam-stat spam filtering
22703 @subsubsection spam-stat spam filtering
22704 @cindex spam filtering
22705 @cindex spam-stat, spam filtering
22706 @cindex spam-stat
22707 @cindex spam
22708
22709 @xref{Filtering Spam Using Statistics with spam-stat}.
22710
22711 @defvar spam-use-stat
22712
22713 Enable this variable if you want @code{spam-split} to use
22714 spam-stat.el, an Emacs Lisp statistical analyzer.
22715
22716 @end defvar
22717
22718 @defvar gnus-group-spam-exit-processor-stat
22719 Add this symbol to a group's @code{spam-process} parameter by
22720 customizing the group parameters or the
22721 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22722 added to a group's @code{spam-process} parameter, the spam-marked
22723 articles will be added to the spam-stat database of spam messages.
22724 @end defvar
22725
22726 @defvar gnus-group-ham-exit-processor-stat
22727 Add this symbol to a group's @code{spam-process} parameter by
22728 customizing the group parameters or the
22729 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22730 added to a group's @code{spam-process} parameter, the ham-marked
22731 articles in @emph{ham} groups will be added to the spam-stat database
22732 of non-spam messages.  Note that this ham processor has no effect in
22733 @emph{spam} or @emph{unclassified} groups.
22734 @end defvar
22735
22736 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
22737 provides an internal (Lisp-only) spam database, which unlike ifile or
22738 Bogofilter does not require external programs.  A spam and a ham
22739 processor, and the @code{spam-use-stat} variable for @code{spam-split}
22740 are provided.
22741
22742 @node Extending the spam elisp package
22743 @subsubsection Extending the spam elisp package
22744 @cindex spam filtering
22745 @cindex spam elisp package, extending
22746 @cindex extending the spam elisp package
22747
22748 Say you want to add a new back end called blackbox.  For filtering
22749 incoming mail, provide the following:
22750
22751 @enumerate
22752
22753 @item
22754 code
22755
22756 @lisp
22757 (defvar spam-use-blackbox nil
22758   "True if blackbox should be used.")
22759 @end lisp
22760
22761 Add
22762 @example
22763     (spam-use-blackbox   . spam-check-blackbox)
22764 @end example
22765 to @code{spam-list-of-checks}.
22766
22767 @item
22768 functionality
22769
22770 Write the @code{spam-check-blackbox} function.  It should return
22771 @samp{nil} or @code{spam-split-group}.  See the existing
22772 @code{spam-check-*} functions for examples of what you can do.
22773
22774 Make sure to add @code{spam-use-blackbox} to
22775 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
22776 mail analyzer that needs the full message body to operate.
22777
22778 @end enumerate
22779
22780 For processing spam and ham messages, provide the following:
22781
22782 @enumerate
22783
22784 @item
22785 code 
22786
22787 Note you don't have to provide a spam or a ham processor.  Only
22788 provide them if Blackbox supports spam or ham processing.
22789
22790 @lisp
22791 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
22792   "The Blackbox summary exit spam processor.
22793 Only applicable to spam groups.")
22794
22795 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
22796   "The whitelist summary exit ham processor.
22797 Only applicable to non-spam (unclassified and ham) groups.")
22798
22799 @end lisp
22800
22801 @item
22802 functionality
22803
22804 @lisp
22805 (defun spam-blackbox-register-spam-routine ()
22806   (spam-generic-register-routine
22807    ;; @r{the spam function}
22808    (lambda (article)
22809      (let ((from (spam-fetch-field-from-fast article)))
22810        (when (stringp from)
22811            (blackbox-do-something-with-this-spammer from))))
22812    ;; @r{the ham function}
22813    nil))
22814
22815 (defun spam-blackbox-register-ham-routine ()
22816   (spam-generic-register-routine
22817    ;; @r{the spam function}
22818    nil
22819    ;; @r{the ham function}
22820    (lambda (article)
22821      (let ((from (spam-fetch-field-from-fast article)))
22822        (when (stringp from)
22823            (blackbox-do-something-with-this-ham-sender from))))))
22824 @end lisp
22825
22826 Write the @code{blackbox-do-something-with-this-ham-sender} and
22827 @code{blackbox-do-something-with-this-spammer} functions.  You can add
22828 more complex code than fetching the message sender, but keep in mind
22829 that retrieving the whole message takes significantly longer than the
22830 sender through @code{spam-fetch-field-from-fast}, because the message
22831 senders are kept in memory by Gnus.
22832
22833 @end enumerate
22834
22835
22836 @node Filtering Spam Using Statistics with spam-stat
22837 @subsection Filtering Spam Using Statistics with spam-stat
22838 @cindex Paul Graham
22839 @cindex Graham, Paul
22840 @cindex naive Bayesian spam filtering
22841 @cindex Bayesian spam filtering, naive
22842 @cindex spam filtering, naive Bayesian
22843
22844 Paul Graham has written an excellent essay about spam filtering using
22845 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
22846 Spam}.  In it he describes the inherent deficiency of rule-based
22847 filtering as used by SpamAssassin, for example: Somebody has to write
22848 the rules, and everybody else has to install these rules.  You are
22849 always late.  It would be much better, he argues, to filter mail based
22850 on whether it somehow resembles spam or non-spam.  One way to measure
22851 this is word distribution.  He then goes on to describe a solution
22852 that checks whether a new mail resembles any of your other spam mails
22853 or not.
22854
22855 The basic idea is this:  Create a two collections of your mail, one
22856 with spam, one with non-spam.  Count how often each word appears in
22857 either collection, weight this by the total number of mails in the
22858 collections, and store this information in a dictionary.  For every
22859 word in a new mail, determine its probability to belong to a spam or a
22860 non-spam mail.  Use the 15 most conspicuous words, compute the total
22861 probability of the mail being spam.  If this probability is higher
22862 than a certain threshold, the mail is considered to be spam.
22863
22864 Gnus supports this kind of filtering.  But it needs some setting up.
22865 First, you need two collections of your mail, one with spam, one with
22866 non-spam.  Then you need to create a dictionary using these two
22867 collections, and save it.  And last but not least, you need to use
22868 this dictionary in your fancy mail splitting rules.
22869
22870 @menu
22871 * Creating a spam-stat dictionary::  
22872 * Splitting mail using spam-stat::  
22873 * Low-level interface to the spam-stat dictionary::  
22874 @end menu
22875
22876 @node Creating a spam-stat dictionary
22877 @subsubsection Creating a spam-stat dictionary
22878
22879 Before you can begin to filter spam based on statistics, you must
22880 create these statistics based on two mail collections, one with spam,
22881 one with non-spam.  These statistics are then stored in a dictionary
22882 for later use.  In order for these statistics to be meaningful, you
22883 need several hundred emails in both collections.
22884
22885 Gnus currently supports only the nnml back end for automated dictionary
22886 creation.  The nnml back end stores all mails in a directory, one file
22887 per mail.  Use the following:
22888
22889 @defun spam-stat-process-spam-directory
22890 Create spam statistics for every file in this directory.  Every file
22891 is treated as one spam mail.
22892 @end defun
22893
22894 @defun spam-stat-process-non-spam-directory
22895 Create non-spam statistics for every file in this directory.  Every
22896 file is treated as one non-spam mail.
22897 @end defun
22898
22899 Usually you would call @code{spam-stat-process-spam-directory} on a
22900 directory such as @file{~/Mail/mail/spam} (this usually corresponds
22901 the the group @samp{nnml:mail.spam}), and you would call
22902 @code{spam-stat-process-non-spam-directory} on a directory such as
22903 @file{~/Mail/mail/misc} (this usually corresponds the the group
22904 @samp{nnml:mail.misc}).
22905
22906 When you are using @acronym{IMAP}, you won't have the mails available
22907 locally, so that will not work.  One solution is to use the Gnus Agent
22908 to cache the articles.  Then you can use directories such as
22909 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
22910 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
22911
22912 @defvar spam-stat
22913 This variable holds the hash-table with all the statistics---the
22914 dictionary we have been talking about.  For every word in either
22915 collection, this hash-table stores a vector describing how often the
22916 word appeared in spam and often it appeared in non-spam mails.
22917 @end defvar
22918
22919 If you want to regenerate the statistics from scratch, you need to
22920 reset the dictionary.
22921
22922 @defun spam-stat-reset
22923 Reset the @code{spam-stat} hash-table, deleting all the statistics.
22924 @end defun
22925
22926 When you are done, you must save the dictionary.  The dictionary may
22927 be rather large.  If you will not update the dictionary incrementally
22928 (instead, you will recreate it once a month, for example), then you
22929 can reduce the size of the dictionary by deleting all words that did
22930 not appear often enough or that do not clearly belong to only spam or
22931 only non-spam mails.
22932
22933 @defun spam-stat-reduce-size
22934 Reduce the size of the dictionary.  Use this only if you do not want
22935 to update the dictionary incrementally.
22936 @end defun
22937
22938 @defun spam-stat-save
22939 Save the dictionary.
22940 @end defun
22941
22942 @defvar spam-stat-file
22943 The filename used to store the dictionary.  This defaults to
22944 @file{~/.spam-stat.el}.
22945 @end defvar
22946
22947 @node Splitting mail using spam-stat
22948 @subsubsection Splitting mail using spam-stat
22949
22950 In order to use @code{spam-stat} to split your mail, you need to add the
22951 following to your @file{~/.gnus.el} file:
22952
22953 @lisp
22954 (require 'spam-stat)
22955 (spam-stat-load)
22956 @end lisp
22957
22958 This will load the necessary Gnus code, and the dictionary you
22959 created.
22960
22961 Next, you need to adapt your fancy splitting rules:  You need to
22962 determine how to use @code{spam-stat}.  The following examples are for
22963 the nnml back end.  Using the nnimap back end works just as well.  Just
22964 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
22965
22966 In the simplest case, you only have two groups, @samp{mail.misc} and
22967 @samp{mail.spam}.  The following expression says that mail is either
22968 spam or it should go into @samp{mail.misc}.  If it is spam, then
22969 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
22970
22971 @lisp
22972 (setq nnmail-split-fancy
22973       `(| (: spam-stat-split-fancy)
22974           "mail.misc"))
22975 @end lisp
22976
22977 @defvar spam-stat-split-fancy-spam-group
22978 The group to use for spam.  Default is @samp{mail.spam}.
22979 @end defvar
22980
22981 If you also filter mail with specific subjects into other groups, use
22982 the following expression.  Only mails not matching the regular
22983 expression are considered potential spam.
22984
22985 @lisp
22986 (setq nnmail-split-fancy
22987       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
22988           (: spam-stat-split-fancy)
22989           "mail.misc"))
22990 @end lisp
22991
22992 If you want to filter for spam first, then you must be careful when
22993 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
22994 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
22995 non-spam, therefore both should be in your collection of non-spam
22996 mails, when creating the dictionary!
22997
22998 @lisp
22999 (setq nnmail-split-fancy
23000       `(| (: spam-stat-split-fancy)
23001           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23002           "mail.misc"))
23003 @end lisp
23004
23005 You can combine this with traditional filtering.  Here, we move all
23006 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23007 @code{spam-stat-split-fancy} will never see them, the mails in
23008 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23009 nor in your collection of non-spam mails, when creating the
23010 dictionary!
23011
23012 @lisp
23013 (setq nnmail-split-fancy
23014       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23015           (: spam-stat-split-fancy)
23016           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23017           "mail.misc"))
23018 @end lisp
23019
23020
23021 @node Low-level interface to the spam-stat dictionary
23022 @subsubsection Low-level interface to the spam-stat dictionary
23023
23024 The main interface to using @code{spam-stat}, are the following functions:
23025
23026 @defun spam-stat-buffer-is-spam
23027 Called in a buffer, that buffer is considered to be a new spam mail.
23028 Use this for new mail that has not been processed before.
23029 @end defun
23030
23031 @defun spam-stat-buffer-is-no-spam
23032 Called in a buffer, that buffer is considered to be a new non-spam
23033 mail.  Use this for new mail that has not been processed before.
23034 @end defun
23035
23036 @defun spam-stat-buffer-change-to-spam
23037 Called in a buffer, that buffer is no longer considered to be normal
23038 mail but spam.  Use this to change the status of a mail that has
23039 already been processed as non-spam.
23040 @end defun
23041
23042 @defun spam-stat-buffer-change-to-non-spam
23043 Called in a buffer, that buffer is no longer considered to be spam but
23044 normal mail.  Use this to change the status of a mail that has already
23045 been processed as spam.
23046 @end defun
23047
23048 @defun spam-stat-save
23049 Save the hash table to the file.  The filename used is stored in the
23050 variable @code{spam-stat-file}.
23051 @end defun
23052
23053 @defun spam-stat-load
23054 Load the hash table from a file.  The filename used is stored in the
23055 variable @code{spam-stat-file}.
23056 @end defun
23057
23058 @defun spam-stat-score-word
23059 Return the spam score for a word.
23060 @end defun
23061
23062 @defun spam-stat-score-buffer
23063 Return the spam score for a buffer.
23064 @end defun
23065
23066 @defun spam-stat-split-fancy
23067 Use this function for fancy mail splitting.  Add the rule @samp{(:
23068 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23069 @end defun
23070
23071 Make sure you load the dictionary before using it.  This requires the
23072 following in your @file{~/.gnus.el} file:
23073
23074 @lisp
23075 (require 'spam-stat)
23076 (spam-stat-load)
23077 @end lisp
23078
23079 Typical test will involve calls to the following functions:
23080
23081 @smallexample
23082 Reset: (setq spam-stat (make-hash-table :test 'equal))
23083 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23084 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23085 Save table: (spam-stat-save)
23086 File size: (nth 7 (file-attributes spam-stat-file))
23087 Number of words: (hash-table-count spam-stat)
23088 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23089 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23090 Reduce table size: (spam-stat-reduce-size)
23091 Save table: (spam-stat-save)
23092 File size: (nth 7 (file-attributes spam-stat-file))
23093 Number of words: (hash-table-count spam-stat)
23094 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23095 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23096 @end smallexample
23097
23098 Here is how you would create your dictionary:
23099
23100 @smallexample
23101 Reset: (setq spam-stat (make-hash-table :test 'equal))
23102 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23103 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23104 Repeat for any other non-spam group you need...
23105 Reduce table size: (spam-stat-reduce-size)
23106 Save table: (spam-stat-save)
23107 @end smallexample
23108
23109 @node Various Various
23110 @section Various Various
23111 @cindex mode lines
23112 @cindex highlights
23113
23114 @table @code
23115
23116 @item gnus-home-directory
23117 @vindex gnus-home-directory
23118 All Gnus file and directory variables will be initialized from this
23119 variable, which defaults to @file{~/}.
23120
23121 @item gnus-directory
23122 @vindex gnus-directory
23123 Most Gnus storage file and directory variables will be initialized from
23124 this variable, which defaults to the @env{SAVEDIR} environment
23125 variable, or @file{~/News/} if that variable isn't set.
23126
23127 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23128 This means that other directory variables that are initialized from this
23129 variable won't be set properly if you set this variable in
23130 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23131
23132 @item gnus-default-directory
23133 @vindex gnus-default-directory
23134 Not related to the above variable at all---this variable says what the
23135 default directory of all Gnus buffers should be.  If you issue commands
23136 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23137 default directory.  If this variable is @code{nil} (which is the
23138 default), the default directory will be the default directory of the
23139 buffer you were in when you started Gnus.
23140
23141 @item gnus-verbose
23142 @vindex gnus-verbose
23143 This variable is an integer between zero and ten.  The higher the value,
23144 the more messages will be displayed.  If this variable is zero, Gnus
23145 will never flash any messages, if it is seven (which is the default),
23146 most important messages will be shown, and if it is ten, Gnus won't ever
23147 shut up, but will flash so many messages it will make your head swim.
23148
23149 @item gnus-verbose-backends
23150 @vindex gnus-verbose-backends
23151 This variable works the same way as @code{gnus-verbose}, but it applies
23152 to the Gnus back ends instead of Gnus proper.
23153
23154 @item nnheader-max-head-length
23155 @vindex nnheader-max-head-length
23156 When the back ends read straight heads of articles, they all try to read
23157 as little as possible.  This variable (default 4096) specifies
23158 the absolute max length the back ends will try to read before giving up
23159 on finding a separator line between the head and the body.  If this
23160 variable is @code{nil}, there is no upper read bound.  If it is
23161 @code{t}, the back ends won't try to read the articles piece by piece,
23162 but read the entire articles.  This makes sense with some versions of
23163 @code{ange-ftp} or @code{efs}.
23164
23165 @item nnheader-head-chop-length
23166 @vindex nnheader-head-chop-length
23167 This variable (default 2048) says how big a piece of each article to
23168 read when doing the operation described above.
23169
23170 @item nnheader-file-name-translation-alist
23171 @vindex nnheader-file-name-translation-alist
23172 @cindex file names
23173 @cindex invalid characters in file names
23174 @cindex characters in file names
23175 This is an alist that says how to translate characters in file names.
23176 For instance, if @samp{:} is invalid as a file character in file names
23177 on your system (you OS/2 user you), you could say something like:
23178
23179 @lisp
23180 @group
23181 (setq nnheader-file-name-translation-alist
23182       '((?: . ?_)))
23183 @end group
23184 @end lisp
23185
23186 In fact, this is the default value for this variable on OS/2 and MS
23187 Windows (phooey) systems.
23188
23189 @item gnus-hidden-properties
23190 @vindex gnus-hidden-properties
23191 This is a list of properties to use to hide ``invisible'' text.  It is
23192 @code{(invisible t intangible t)} by default on most systems, which
23193 makes invisible text invisible and intangible.
23194
23195 @item gnus-parse-headers-hook
23196 @vindex gnus-parse-headers-hook
23197 A hook called before parsing headers.  It can be used, for instance, to
23198 gather statistics on the headers fetched, or perhaps you'd like to prune
23199 some headers.  I don't see why you'd want that, though.
23200
23201 @item gnus-shell-command-separator
23202 @vindex gnus-shell-command-separator
23203 String used to separate two shell commands.  The default is @samp{;}.
23204
23205 @item gnus-invalid-group-regexp
23206 @vindex gnus-invalid-group-regexp
23207
23208 Regexp to match ``invalid'' group names when querying user for a group
23209 name.  The default value catches some @strong{really} invalid group
23210 names who could possibly mess up Gnus internally (like allowing
23211 @samp{:} in a group name, which is normally used to delimit method and
23212 group).
23213
23214 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23215
23216
23217 @end table
23218
23219 @node The End
23220 @chapter The End
23221
23222 Well, that's the manual---you can get on with your life now.  Keep in
23223 touch.  Say hello to your cats from me.
23224
23225 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23226
23227 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23228
23229 @quotation
23230 @strong{Te Deum}
23231
23232 @sp 1
23233 Not because of victories @*
23234 I sing,@*
23235 having none,@*
23236 but for the common sunshine,@*
23237 the breeze,@*
23238 the largess of the spring.
23239
23240 @sp 1
23241 Not for victory@*
23242 but for the day's work done@*
23243 as well as I was able;@*
23244 not for a seat upon the dais@*
23245 but at the common table.@*
23246 @end quotation
23247
23248
23249 @node Appendices
23250 @chapter Appendices
23251
23252 @menu
23253 * XEmacs::                      Requirements for installing under XEmacs.
23254 * History::                     How Gnus got where it is today.
23255 * On Writing Manuals::          Why this is not a beginner's guide.
23256 * Terminology::                 We use really difficult, like, words here.
23257 * Customization::               Tailoring Gnus to your needs.
23258 * Troubleshooting::             What you might try if things do not work.
23259 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23260 * Emacs for Heathens::          A short introduction to Emacsian terms.
23261 * Frequently Asked Questions::  The Gnus FAQ
23262 @end menu
23263
23264
23265 @node XEmacs
23266 @section XEmacs
23267 @cindex XEmacs
23268 @cindex installing under XEmacs
23269
23270 XEmacs is distributed as a collection of packages.  You should install
23271 whatever packages the Gnus XEmacs package requires.  The current
23272 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23273 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23274 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23275 @samp{misc-games} package is required for Morse decoding.
23276
23277
23278 @node History
23279 @section History
23280
23281 @cindex history
23282 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23283 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23284
23285 If you want to investigate the person responsible for this outrage,
23286 you can point your (feh!) web browser to
23287 @uref{http://quimby.gnus.org/}.  This is also the primary
23288 distribution point for the new and spiffy versions of Gnus, and is
23289 known as The Site That Destroys Newsrcs And Drives People Mad.
23290
23291 During the first extended alpha period of development, the new Gnus was
23292 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23293 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23294 (Besides, the ``Gnus'' in this abbreviation should probably be
23295 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23296 appropriate name, don't you think?)
23297
23298 In any case, after spending all that energy on coming up with a new and
23299 spunky name, we decided that the name was @emph{too} spunky, so we
23300 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23301 ``@sc{gnus}''.  New vs. old.
23302
23303 @menu
23304 * Gnus Versions::               What Gnus versions have been released.
23305 * Other Gnus Versions::         Other Gnus versions that also have been released.
23306 * Why?::                        What's the point of Gnus?
23307 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23308 * Conformity::                  Gnus tries to conform to all standards.
23309 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23310 * Gnus Development::            How Gnus is developed.
23311 * Contributors::                Oodles of people.
23312 * New Features::                Pointers to some of the new stuff in Gnus.
23313 @end menu
23314
23315
23316 @node Gnus Versions
23317 @subsection Gnus Versions
23318 @cindex ding Gnus
23319 @cindex September Gnus
23320 @cindex Red Gnus
23321 @cindex Quassia Gnus
23322 @cindex Pterodactyl Gnus
23323 @cindex Oort Gnus
23324 @cindex No Gnus
23325 @cindex Gnus versions
23326
23327 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23328 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23329 plus 15 Gnus 5.0 releases).
23330
23331 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23332 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23333
23334 On July 28th 1996 work on Red Gnus was begun, and it was released on
23335 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23336
23337 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23338 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23339
23340 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23341 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23342 1999.
23343
23344 On the 26th of October 2000, Oort Gnus was begun.
23345
23346 If you happen upon a version of Gnus that has a prefixed name --
23347 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23348 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23349 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23350 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23351 released version of Gnus and snuggle up to that instead.
23352
23353
23354 @node Other Gnus Versions
23355 @subsection Other Gnus Versions
23356 @cindex Semi-gnus
23357
23358 In addition to the versions of Gnus which have had their releases
23359 coordinated by Lars, one major development has been Semi-gnus from
23360 Japan.  It's based on a library called @acronym{SEMI}, which provides
23361 @acronym{MIME} capabilities.
23362
23363 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23364 Collectively, they are called ``Semi-gnus'', and different strains are
23365 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23366 @acronym{MIME} and multilingualization things, especially important for
23367 Japanese users.
23368
23369
23370 @node Why?
23371 @subsection Why?
23372
23373 What's the point of Gnus?
23374
23375 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23376 newsreader, that lets you do anything you can think of.  That was my
23377 original motivation, but while working on Gnus, it has become clear to
23378 me that this generation of newsreaders really belong in the stone age.
23379 Newsreaders haven't developed much since the infancy of the net.  If the
23380 volume continues to rise with the current rate of increase, all current
23381 newsreaders will be pretty much useless.  How do you deal with
23382 newsgroups that have thousands of new articles each day?  How do you
23383 keep track of millions of people who post?
23384
23385 Gnus offers no real solutions to these questions, but I would very much
23386 like to see Gnus being used as a testing ground for new methods of
23387 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23388 to separate the newsreader from the back ends, Gnus now offers a simple
23389 interface for anybody who wants to write new back ends for fetching mail
23390 and news from different sources.  I have added hooks for customizations
23391 everywhere I could imagine it being useful.  By doing so, I'm inviting
23392 every one of you to explore and invent.
23393
23394 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23395 @kbd{C-u 100 M-x all-hail-xemacs}.
23396
23397
23398 @node Compatibility
23399 @subsection Compatibility
23400
23401 @cindex compatibility
23402 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23403 bindings have been kept.  More key bindings have been added, of course,
23404 but only in one or two obscure cases have old bindings been changed.
23405
23406 Our motto is:
23407 @quotation
23408 @cartouche
23409 @center In a cloud bones of steel.
23410 @end cartouche
23411 @end quotation
23412
23413 All commands have kept their names.  Some internal functions have changed
23414 their names.
23415
23416 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23417 Articles}.
23418
23419 One major compatibility question is the presence of several summary
23420 buffers.  All variables relevant while reading a group are
23421 buffer-local to the summary buffer they belong in.  Although many
23422 important variables have their values copied into their global
23423 counterparts whenever a command is executed in the summary buffer, this
23424 change might lead to incorrect values being used unless you are careful.
23425
23426 All code that relies on knowledge of @sc{gnus} internals will probably
23427 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23428 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23429 maintains a hash table that points to the entries in this alist (which
23430 speeds up many functions), and changing the alist directly will lead to
23431 peculiar results.
23432
23433 @cindex hilit19
23434 @cindex highlighting
23435 Old hilit19 code does not work at all.  In fact, you should probably
23436 remove all hilit code from all Gnus hooks
23437 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23438 Gnus provides various integrated functions for highlighting.  These are
23439 faster and more accurate.  To make life easier for everybody, Gnus will
23440 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23441 Away!
23442
23443 Packages like @code{expire-kill} will no longer work.  As a matter of
23444 fact, you should probably remove all old @sc{gnus} packages (and other
23445 code) when you start using Gnus.  More likely than not, Gnus already
23446 does what you have written code to make @sc{gnus} do.  (Snicker.)
23447
23448 Even though old methods of doing things are still supported, only the
23449 new methods are documented in this manual.  If you detect a new method of
23450 doing something while reading this manual, that does not mean you have
23451 to stop doing it the old way.
23452
23453 Gnus understands all @sc{gnus} startup files.
23454
23455 @kindex M-x gnus-bug
23456 @findex gnus-bug
23457 @cindex reporting bugs
23458 @cindex bugs
23459 Overall, a casual user who hasn't written much code that depends on
23460 @sc{gnus} internals should suffer no problems.  If problems occur,
23461 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23462
23463 @vindex gnus-bug-create-help-buffer
23464 If you are in the habit of sending bug reports @emph{very} often, you
23465 may find the helpful help buffer annoying after a while.  If so, set
23466 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23467 up at you.
23468
23469
23470 @node Conformity
23471 @subsection Conformity
23472
23473 No rebels without a clue here, ma'am.  We conform to all standards known
23474 to (wo)man.  Except for those standards and/or conventions we disagree
23475 with, of course.
23476
23477 @table @strong
23478
23479 @item RFC (2)822
23480 @cindex RFC 822
23481 @cindex RFC 2822
23482 There are no known breaches of this standard.
23483
23484 @item RFC 1036
23485 @cindex RFC 1036
23486 There are no known breaches of this standard, either.
23487
23488 @item Son-of-RFC 1036
23489 @cindex Son-of-RFC 1036
23490 We do have some breaches to this one.
23491
23492 @table @emph
23493
23494 @item X-Newsreader
23495 @itemx User-Agent
23496 These are considered to be ``vanity headers'', while I consider them
23497 to be consumer information.  After seeing so many badly formatted
23498 articles coming from @code{tin} and @code{Netscape} I know not to use
23499 either of those for posting articles.  I would not have known that if
23500 it wasn't for the @code{X-Newsreader} header.
23501 @end table
23502
23503 @item USEFOR
23504 @cindex USEFOR
23505 USEFOR is an IETF working group writing a successor to RFC 1036, based
23506 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23507 various changes to the format of news articles.  The Gnus towers will
23508 look into implementing the changes when the draft is accepted as an RFC.
23509
23510 @item MIME - RFC 2045-2049 etc
23511 @cindex @acronym{MIME}
23512 All the various @acronym{MIME} RFCs are supported.
23513
23514 @item Disposition Notifications - RFC 2298
23515 Message Mode is able to request notifications from the receiver.
23516
23517 @item PGP - RFC 1991 and RFC 2440
23518 @cindex RFC 1991
23519 @cindex RFC 2440
23520 RFC 1991 is the original @acronym{PGP} message specification,
23521 published as a Information RFC.  RFC 2440 was the follow-up, now
23522 called Open PGP, and put on the Standards Track.  Both document a
23523 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23524 encoding (signing and encryption) and decoding (verification and
23525 decryption).
23526
23527 @item PGP/MIME - RFC 2015/3156
23528 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23529 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23530 Gnus supports both encoding and decoding.
23531
23532 @item S/MIME - RFC 2633
23533 RFC 2633 describes the @acronym{S/MIME} format.
23534
23535 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23536 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23537 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23538 authentication for @acronym{IMAP}. RFC 2086 describes access control
23539 lists (ACLs) for @acronym{IMAP}. RFC 2359 describes a @acronym{IMAP}
23540 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23541 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23542 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23543
23544 @end table
23545
23546 If you ever notice Gnus acting non-compliant with regards to the texts
23547 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23548 know.
23549
23550
23551 @node Emacsen
23552 @subsection Emacsen
23553 @cindex Emacsen
23554 @cindex XEmacs
23555 @cindex Mule
23556 @cindex Emacs
23557
23558 Gnus should work on :
23559
23560 @itemize @bullet
23561
23562 @item
23563 Emacs 20.7 and up.
23564
23565 @item
23566 XEmacs 21.1 and up.
23567
23568 @end itemize
23569
23570 This Gnus version will absolutely not work on any Emacsen older than
23571 that.  Not reliably, at least.  Older versions of Gnus may work on older
23572 Emacs versions.
23573
23574 There are some vague differences between Gnus on the various
23575 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23576 other than that, things should look pretty much the same under all
23577 Emacsen.
23578
23579
23580 @node Gnus Development
23581 @subsection Gnus Development
23582
23583 Gnus is developed in a two-phased cycle.  The first phase involves much
23584 discussion on the @samp{ding@@gnus.org} mailing list, where people
23585 propose changes and new features, post patches and new back ends.  This
23586 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23587 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23588 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23589 unstable and should not be used by casual users.  Gnus alpha releases
23590 have names like ``Red Gnus'' and ``Quassia Gnus''.
23591
23592 After futzing around for 50-100 alpha releases, Gnus is declared
23593 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23594 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23595 supposed to be able to use these, and these are mostly discussed on the
23596 @samp{gnu.emacs.gnus} newsgroup.
23597
23598 @cindex Incoming*
23599 @vindex mail-source-delete-incoming
23600 Some variable defaults differ between alpha Gnusae and released Gnusae.
23601 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23602 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23603 lossage of mail if an alpha release hiccups while handling the mail.
23604
23605 The division of discussion between the ding mailing list and the Gnus
23606 newsgroup is not purely based on publicity concerns.  It's true that
23607 having people write about the horrible things that an alpha Gnus release
23608 can do (sometimes) in a public forum may scare people off, but more
23609 importantly, talking about new experimental features that have been
23610 introduced may confuse casual users.  New features are frequently
23611 introduced, fiddled with, and judged to be found wanting, and then
23612 either discarded or totally rewritten.  People reading the mailing list
23613 usually keep up with these rapid changes, while people on the newsgroup
23614 can't be assumed to do so.
23615
23616
23617
23618 @node Contributors
23619 @subsection Contributors
23620 @cindex contributors
23621
23622 The new Gnus version couldn't have been done without the help of all the
23623 people on the (ding) mailing list.  Every day for over a year I have
23624 gotten billions of nice bug reports from them, filling me with joy,
23625 every single one of them.  Smooches.  The people on the list have been
23626 tried beyond endurance, what with my ``oh, that's a neat idea <type
23627 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23628 work at all <type type>, yup, I'll ship that one off right away <ship
23629 off> no, wait, that absolutely does not work'' policy for releases.
23630 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23631 ``worser''? ``much worser''?  ``worsest''?)
23632
23633 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23634 wrong show.
23635
23636 @itemize @bullet
23637
23638 @item
23639 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23640
23641 @item
23642 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23643 nnwarchive and many, many other things connected with @acronym{MIME} and
23644 other types of en/decoding, as well as general bug fixing, new
23645 functionality and stuff.
23646
23647 @item
23648 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23649 well as numerous other things).
23650
23651 @item
23652 Luis Fernandes---design and graphics.
23653
23654 @item
23655 Joe Reiss---creator of the smiley faces.
23656
23657 @item
23658 Justin Sheehy--the @acronym{FAQ} maintainer.
23659
23660 @item
23661 Erik Naggum---help, ideas, support, code and stuff.
23662
23663 @item
23664 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23665 @dfn{picons} (@pxref{Picons}).
23666
23667 @item
23668 Kim-Minh Kaplan---further work on the picon code.
23669
23670 @item
23671 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23672 (@pxref{GroupLens}).
23673
23674 @item
23675 Sudish Joseph---innumerable bug fixes.
23676
23677 @item
23678 Ilja Weis---@file{gnus-topic.el}.
23679
23680 @item
23681 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23682
23683 @item
23684 Vladimir Alexiev---the refcard and reference booklets.
23685
23686 @item
23687 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23688 distribution by Felix Lee and JWZ.
23689
23690 @item
23691 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23692
23693 @item
23694 Peter Mutsaers---orphan article scoring code.
23695
23696 @item
23697 Ken Raeburn---POP mail support.
23698
23699 @item
23700 Hallvard B Furuseth---various bits and pieces, especially dealing with
23701 .newsrc files.
23702
23703 @item
23704 Brian Edmonds---@file{gnus-bbdb.el}.
23705
23706 @item
23707 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23708
23709 @item
23710 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23711
23712 @item
23713 François Pinard---many, many interesting and thorough bug reports, as
23714 well as autoconf support.
23715
23716 @end itemize
23717
23718 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23719 Borges, and Jost Krieger proof-reading parts of the manual.
23720
23721 The following people have contributed many patches and suggestions:
23722
23723 Christopher Davis,
23724 Andrew Eskilsson,
23725 Kai Grossjohann,
23726 Kevin Greiner,
23727 Jesper Harder,
23728 Paul Jarc,
23729 Simon Josefsson,
23730 David KÃ¥gedal,
23731 Richard Pieri,
23732 Fabrice Popineau,
23733 Daniel Quinlan,
23734 Michael Shields,
23735 Reiner Steib,
23736 Jason L. Tibbitts, III,
23737 Jack Vinson,
23738 Katsumi Yamaoka, @c Yamaoka
23739 and
23740 Teodor Zlatanov.
23741
23742 Also thanks to the following for patches and stuff:
23743
23744 Jari Aalto,
23745 Adrian Aichner,
23746 Vladimir Alexiev,
23747 Russ Allbery,
23748 Peter Arius,
23749 Matt Armstrong,
23750 Marc Auslander,
23751 Miles Bader,
23752 Alexei V. Barantsev,
23753 Frank Bennett,
23754 Robert Bihlmeyer,
23755 Chris Bone,
23756 Mark Borges,
23757 Mark Boyns,
23758 Lance A. Brown,
23759 Rob Browning,
23760 Kees de Bruin,
23761 Martin Buchholz,
23762 Joe Buehler,
23763 Kevin Buhr,
23764 Alastair Burt,
23765 Joao Cachopo,
23766 Zlatko Calusic,
23767 Massimo Campostrini,
23768 Castor,
23769 David Charlap,
23770 Dan Christensen,
23771 Kevin Christian,
23772 Jae-you Chung, @c ?
23773 James H. Cloos, Jr.,
23774 Laura Conrad,
23775 Michael R. Cook,
23776 Glenn Coombs,
23777 Andrew J. Cosgriff,
23778 Neil Crellin,
23779 Frank D. Cringle,
23780 Geoffrey T. Dairiki,
23781 Andre Deparade,
23782 Ulrik Dickow,
23783 Dave Disser,
23784 Rui-Tao Dong, @c ?
23785 Joev Dubach,
23786 Michael Welsh Duggan,
23787 Dave Edmondson,
23788 Paul Eggert,
23789 Mark W. Eichin,
23790 Karl Eichwalder,
23791 Enami Tsugutomo, @c Enami
23792 Michael Ernst,
23793 Luc Van Eycken,
23794 Sam Falkner,
23795 Nelson Jose dos Santos Ferreira,
23796 Sigbjorn Finne,
23797 Sven Fischer,
23798 Paul Fisher,
23799 Decklin Foster,
23800 Gary D. Foster,
23801 Paul Franklin,
23802 Guy Geens,
23803 Arne Georg Gleditsch,
23804 David S. Goldberg,
23805 Michelangelo Grigni,
23806 Dale Hagglund,
23807 D. Hall,
23808 Magnus Hammerin,
23809 Kenichi Handa, @c Handa
23810 Raja R. Harinath,
23811 Yoshiki Hayashi, @c Hayashi
23812 P. E. Jareth Hein,
23813 Hisashige Kenji, @c Hisashige
23814 Scott Hofmann,
23815 Marc Horowitz,
23816 Gunnar Horrigmo,
23817 Richard Hoskins,
23818 Brad Howes,
23819 Miguel de Icaza,
23820 François Felix Ingrand,
23821 Tatsuya Ichikawa, @c Ichikawa
23822 Ishikawa Ichiro, @c Ishikawa
23823 Lee Iverson,
23824 Iwamuro Motonori, @c Iwamuro
23825 Rajappa Iyer,
23826 Andreas Jaeger,
23827 Adam P. Jenkins,
23828 Randell Jesup,
23829 Fred Johansen,
23830 Gareth Jones,
23831 Greg Klanderman,
23832 Karl Kleinpaste,
23833 Michael Klingbeil,
23834 Peter Skov Knudsen,
23835 Shuhei Kobayashi, @c Kobayashi
23836 Petr Konecny,
23837 Koseki Yoshinori, @c Koseki
23838 Thor Kristoffersen,
23839 Jens Lautenbacher,
23840 Martin Larose,
23841 Seokchan Lee, @c Lee
23842 Joerg Lenneis,
23843 Carsten Leonhardt,
23844 James LewisMoss,
23845 Christian Limpach,
23846 Markus Linnala,
23847 Dave Love,
23848 Mike McEwan,
23849 Tonny Madsen,
23850 Shlomo Mahlab,
23851 Nat Makarevitch,
23852 Istvan Marko,
23853 David Martin,
23854 Jason R. Mastaler,
23855 Gordon Matzigkeit,
23856 Timo Metzemakers,
23857 Richard Mlynarik,
23858 Lantz Moore,
23859 Morioka Tomohiko, @c Morioka
23860 Erik Toubro Nielsen,
23861 Hrvoje Niksic,
23862 Andy Norman,
23863 Fred Oberhauser,
23864 C. R. Oldham,
23865 Alexandre Oliva,
23866 Ken Olstad,
23867 Masaharu Onishi, @c Onishi
23868 Hideki Ono, @c Ono
23869 Ettore Perazzoli,
23870 William Perry,
23871 Stephen Peters,
23872 Jens-Ulrik Holger Petersen,
23873 Ulrich Pfeifer,
23874 Matt Pharr,
23875 Andy Piper,
23876 John McClary Prevost,
23877 Bill Pringlemeir,
23878 Mike Pullen,
23879 Jim Radford,
23880 Colin Rafferty,
23881 Lasse Rasinen,
23882 Lars Balker Rasmussen,
23883 Joe Reiss,
23884 Renaud Rioboo,
23885 Roland B. Roberts,
23886 Bart Robinson,
23887 Christian von Roques,
23888 Markus Rost,
23889 Jason Rumney,
23890 Wolfgang Rupprecht,
23891 Jay Sachs,
23892 Dewey M. Sasser,
23893 Conrad Sauerwald,
23894 Loren Schall,
23895 Dan Schmidt,
23896 Ralph Schleicher,
23897 Philippe Schnoebelen,
23898 Andreas Schwab,
23899 Randal L. Schwartz,
23900 Danny Siu,
23901 Matt Simmons,
23902 Paul D. Smith,
23903 Jeff Sparkes,
23904 Toby Speight,
23905 Michael Sperber,
23906 Darren Stalder,
23907 Richard Stallman,
23908 Greg Stark,
23909 Sam Steingold,
23910 Paul Stevenson,
23911 Jonas Steverud,
23912 Paul Stodghill,
23913 Kiyokazu Suto, @c Suto
23914 Kurt Swanson,
23915 Samuel Tardieu,
23916 Teddy,
23917 Chuck Thompson,
23918 Tozawa Akihiko, @c Tozawa
23919 Philippe Troin,
23920 James Troup,
23921 Trung Tran-Duc,
23922 Jack Twilley,
23923 Aaron M. Ucko,
23924 Aki Vehtari,
23925 Didier Verna,
23926 Vladimir Volovich,
23927 Jan Vroonhof,
23928 Stefan Waldherr,
23929 Pete Ware,
23930 Barry A. Warsaw,
23931 Christoph Wedler,
23932 Joe Wells,
23933 Lee Willis,
23934 and
23935 Lloyd Zusman.
23936
23937
23938 For a full overview of what each person has done, the ChangeLogs
23939 included in the Gnus alpha distributions should give ample reading
23940 (550kB and counting).
23941
23942 Apologies to everybody that I've forgotten, of which there are many, I'm
23943 sure.
23944
23945 Gee, that's quite a list of people.  I guess that must mean that there
23946 actually are people who are using Gnus.  Who'd'a thunk it!
23947
23948
23949 @node New Features
23950 @subsection New Features
23951 @cindex new features
23952
23953 @menu
23954 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
23955 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
23956 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
23957 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
23958 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
23959 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
23960 @end menu
23961
23962 These lists are, of course, just @emph{short} overviews of the
23963 @emph{most} important new features.  No, really.  There are tons more.
23964 Yes, we have feeping creaturism in full effect.
23965
23966 @node ding Gnus
23967 @subsubsection (ding) Gnus
23968
23969 New features in Gnus 5.0/5.1:
23970
23971 @itemize @bullet
23972
23973 @item
23974 The look of all buffers can be changed by setting format-like variables
23975 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
23976
23977 @item
23978 Local spool and several @acronym{NNTP} servers can be used at once
23979 (@pxref{Select Methods}).
23980
23981 @item
23982 You can combine groups into virtual groups (@pxref{Virtual Groups}).
23983
23984 @item
23985 You can read a number of different mail formats (@pxref{Getting Mail}).
23986 All the mail back ends implement a convenient mail expiry scheme
23987 (@pxref{Expiring Mail}).
23988
23989 @item
23990 Gnus can use various strategies for gathering threads that have lost
23991 their roots (thereby gathering loose sub-threads into one thread) or it
23992 can go back and retrieve enough headers to build a complete thread
23993 (@pxref{Customizing Threading}).
23994
23995 @item
23996 Killed groups can be displayed in the group buffer, and you can read
23997 them as well (@pxref{Listing Groups}).
23998
23999 @item
24000 Gnus can do partial group updates---you do not have to retrieve the
24001 entire active file just to check for new articles in a few groups
24002 (@pxref{The Active File}).
24003
24004 @item
24005 Gnus implements a sliding scale of subscribedness to groups
24006 (@pxref{Group Levels}).
24007
24008 @item
24009 You can score articles according to any number of criteria
24010 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24011 articles for you (@pxref{Adaptive Scoring}).
24012
24013 @item
24014 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24015 manner, so it should be difficult to lose much data on what you have
24016 read if your machine should go down (@pxref{Auto Save}).
24017
24018 @item
24019 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24020 cluttering up the @file{.emacs} file.
24021
24022 @item
24023 You can set the process mark on both groups and articles and perform
24024 operations on all the marked items (@pxref{Process/Prefix}).
24025
24026 @item
24027 You can grep through a subset of groups and create a group from the
24028 results (@pxref{Kibozed Groups}).
24029
24030 @item
24031 You can list subsets of groups according to, well, anything
24032 (@pxref{Listing Groups}).
24033
24034 @item
24035 You can browse foreign servers and subscribe to groups from those
24036 servers (@pxref{Browse Foreign Server}).
24037
24038 @item
24039 Gnus can fetch articles, asynchronously, on a second connection to the
24040 server (@pxref{Asynchronous Fetching}).
24041
24042 @item
24043 You can cache articles locally (@pxref{Article Caching}).
24044
24045 @item
24046 The uudecode functions have been expanded and generalized
24047 (@pxref{Decoding Articles}).
24048
24049 @item
24050 You can still post uuencoded articles, which was a little-known feature
24051 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24052
24053 @item
24054 Fetching parents (and other articles) now actually works without
24055 glitches (@pxref{Finding the Parent}).
24056
24057 @item
24058 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24059
24060 @item
24061 Digests (and other files) can be used as the basis for groups
24062 (@pxref{Document Groups}).
24063
24064 @item
24065 Articles can be highlighted and customized (@pxref{Customizing
24066 Articles}).
24067
24068 @item
24069 URLs and other external references can be buttonized (@pxref{Article
24070 Buttons}).
24071
24072 @item
24073 You can do lots of strange stuff with the Gnus window & frame
24074 configuration (@pxref{Window Layout}).
24075
24076 @item
24077 You can click on buttons instead of using the keyboard
24078 (@pxref{Buttons}).
24079
24080 @end itemize
24081
24082
24083 @node September Gnus
24084 @subsubsection September Gnus
24085
24086 @iftex
24087 @iflatex
24088 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24089 @end iflatex
24090 @end iftex
24091
24092 New features in Gnus 5.2/5.3:
24093
24094 @itemize @bullet
24095
24096 @item
24097 A new message composition mode is used.  All old customization variables
24098 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24099 now obsolete.
24100
24101 @item
24102 Gnus is now able to generate @dfn{sparse} threads---threads where
24103 missing articles are represented by empty nodes (@pxref{Customizing
24104 Threading}).
24105
24106 @lisp
24107 (setq gnus-build-sparse-threads 'some)
24108 @end lisp
24109
24110 @item
24111 Outgoing articles are stored on a special archive server
24112 (@pxref{Archived Messages}).
24113
24114 @item
24115 Partial thread regeneration now happens when articles are
24116 referred.
24117
24118 @item
24119 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24120
24121 @item
24122 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24123
24124 @item
24125 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24126
24127 @lisp
24128 (setq gnus-use-trees t)
24129 @end lisp
24130
24131 @item
24132 An @code{nn}-like pick-and-read minor mode is available for the summary
24133 buffers (@pxref{Pick and Read}).
24134
24135 @lisp
24136 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24137 @end lisp
24138
24139 @item
24140 In binary groups you can use a special binary minor mode (@pxref{Binary
24141 Groups}).
24142
24143 @item
24144 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24145 Topics}).
24146
24147 @lisp
24148 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24149 @end lisp
24150
24151 @item
24152 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24153
24154 @item
24155 Groups can now have a score, and bubbling based on entry frequency
24156 is possible (@pxref{Group Score}).
24157
24158 @lisp
24159 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24160 @end lisp
24161
24162 @item
24163 Groups can be process-marked, and commands can be performed on
24164 groups of groups (@pxref{Marking Groups}).
24165
24166 @item
24167 Caching is possible in virtual groups.
24168
24169 @item
24170 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24171 news batches, ClariNet briefs collections, and just about everything
24172 else (@pxref{Document Groups}).
24173
24174 @item
24175 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24176 (@pxref{SOUP}).
24177
24178 @item
24179 The Gnus cache is much faster.
24180
24181 @item
24182 Groups can be sorted according to many criteria (@pxref{Sorting
24183 Groups}).
24184
24185 @item
24186 New group parameters have been introduced to set list-addresses and
24187 expiry times (@pxref{Group Parameters}).
24188
24189 @item
24190 All formatting specs allow specifying faces to be used
24191 (@pxref{Formatting Fonts}).
24192
24193 @item
24194 There are several more commands for setting/removing/acting on process
24195 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24196
24197 @item
24198 The summary buffer can be limited to show parts of the available
24199 articles based on a wide range of criteria.  These commands have been
24200 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24201
24202 @item
24203 Articles can be made persistent with the @kbd{*} command
24204 (@pxref{Persistent Articles}).
24205
24206 @item
24207 All functions for hiding article elements are now toggles.
24208
24209 @item
24210 Article headers can be buttonized (@pxref{Article Washing}).
24211
24212 @item
24213 All mail back ends support fetching articles by @code{Message-ID}.
24214
24215 @item
24216 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24217
24218 @item
24219 All summary mode commands are available directly from the article
24220 buffer (@pxref{Article Keymap}).
24221
24222 @item
24223 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24224 Layout}).
24225
24226 @item
24227 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24228 @iftex
24229 @iflatex
24230 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24231 @end iflatex
24232 @end iftex
24233
24234 @item
24235 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24236
24237 @lisp
24238 (setq gnus-use-nocem t)
24239 @end lisp
24240
24241 @item
24242 Groups can be made permanently visible (@pxref{Listing Groups}).
24243
24244 @lisp
24245 (setq gnus-permanently-visible-groups "^nnml:")
24246 @end lisp
24247
24248 @item
24249 Many new hooks have been introduced to make customizing easier.
24250
24251 @item
24252 Gnus respects the @code{Mail-Copies-To} header.
24253
24254 @item
24255 Threads can be gathered by looking at the @code{References} header
24256 (@pxref{Customizing Threading}).
24257
24258 @lisp
24259 (setq gnus-summary-thread-gathering-function
24260       'gnus-gather-threads-by-references)
24261 @end lisp
24262
24263 @item
24264 Read articles can be stored in a special backlog buffer to avoid
24265 refetching (@pxref{Article Backlog}).
24266
24267 @lisp
24268 (setq gnus-keep-backlog 50)
24269 @end lisp
24270
24271 @item
24272 A clean copy of the current article is always stored in a separate
24273 buffer to allow easier treatment.
24274
24275 @item
24276 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24277
24278 @item
24279 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24280 Articles}).
24281
24282 @lisp
24283 (setq gnus-prompt-before-saving t)
24284 @end lisp
24285
24286 @item
24287 @code{gnus-uu} can view decoded files asynchronously while fetching
24288 articles (@pxref{Other Decode Variables}).
24289
24290 @lisp
24291 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24292 @end lisp
24293
24294 @item
24295 Filling in the article buffer now works properly on cited text
24296 (@pxref{Article Washing}).
24297
24298 @item
24299 Hiding cited text adds buttons to toggle hiding, and how much
24300 cited text to hide is now customizable (@pxref{Article Hiding}).
24301
24302 @lisp
24303 (setq gnus-cited-lines-visible 2)
24304 @end lisp
24305
24306 @item
24307 Boring headers can be hidden (@pxref{Article Hiding}).
24308
24309 @item
24310 Default scoring values can now be set from the menu bar.
24311
24312 @item
24313 Further syntax checking of outgoing articles have been added.
24314
24315 @end itemize
24316
24317
24318 @node Red Gnus
24319 @subsubsection Red Gnus
24320
24321 New features in Gnus 5.4/5.5:
24322
24323 @iftex
24324 @iflatex
24325 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24326 @end iflatex
24327 @end iftex
24328
24329 @itemize @bullet
24330
24331 @item
24332 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24333
24334 @item
24335 Article prefetching functionality has been moved up into
24336 Gnus (@pxref{Asynchronous Fetching}).
24337
24338 @item
24339 Scoring can now be performed with logical operators like @code{and},
24340 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24341 Scoring}).
24342
24343 @item
24344 Article washing status can be displayed in the
24345 article mode line (@pxref{Misc Article}).
24346
24347 @item
24348 @file{gnus.el} has been split into many smaller files.
24349
24350 @item
24351 Suppression of duplicate articles based on Message-ID can be done
24352 (@pxref{Duplicate Suppression}).
24353
24354 @lisp
24355 (setq gnus-suppress-duplicates t)
24356 @end lisp
24357
24358 @item
24359 New variables for specifying what score and adapt files are to be
24360 considered home score and adapt files (@pxref{Home Score File}) have
24361 been added.
24362
24363 @item
24364 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24365 Server Internals}).
24366
24367 @item
24368 Groups can inherit group parameters from parent topics (@pxref{Topic
24369 Parameters}).
24370
24371 @item
24372 Article editing has been revamped and is now actually usable.
24373
24374 @item
24375 Signatures can be recognized in more intelligent fashions
24376 (@pxref{Article Signature}).
24377
24378 @item
24379 Summary pick mode has been made to look more @code{nn}-like.  Line
24380 numbers are displayed and the @kbd{.} command can be used to pick
24381 articles (@code{Pick and Read}).
24382
24383 @item
24384 Commands for moving the @file{.newsrc.eld} from one server to
24385 another have been added (@pxref{Changing Servers}).
24386
24387 @item
24388 There's a way now to specify that ``uninteresting'' fields be suppressed
24389 when generating lines in buffers (@pxref{Advanced Formatting}).
24390
24391 @item
24392 Several commands in the group buffer can be undone with @kbd{C-M-_}
24393 (@pxref{Undo}).
24394
24395 @item
24396 Scoring can be done on words using the new score type @code{w}
24397 (@pxref{Score File Format}).
24398
24399 @item
24400 Adaptive scoring can be done on a Subject word-by-word basis
24401 (@pxref{Adaptive Scoring}).
24402
24403 @lisp
24404 (setq gnus-use-adaptive-scoring '(word))
24405 @end lisp
24406
24407 @item
24408 Scores can be decayed (@pxref{Score Decays}).
24409
24410 @lisp
24411 (setq gnus-decay-scores t)
24412 @end lisp
24413
24414 @item
24415 Scoring can be performed using a regexp on the Date header.  The Date is
24416 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24417
24418 @item
24419 A new command has been added to remove all data on articles from
24420 the native server (@pxref{Changing Servers}).
24421
24422 @item
24423 A new command for reading collections of documents
24424 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24425 (@pxref{Really Various Summary Commands}).
24426
24427 @item
24428 Process mark sets can be pushed and popped (@pxref{Setting Process
24429 Marks}).
24430
24431 @item
24432 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24433 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24434
24435 @item
24436 A new back end for reading searches from Web search engines
24437 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24438 (@pxref{Web Searches}).
24439
24440 @item
24441 Groups inside topics can now be sorted using the standard sorting
24442 functions, and each topic can be sorted independently (@pxref{Topic
24443 Sorting}).
24444
24445 @item
24446 Subsets of the groups can be sorted independently (@code{Sorting
24447 Groups}).
24448
24449 @item
24450 Cached articles can be pulled into the groups (@pxref{Summary Generation
24451 Commands}).
24452 @iftex
24453 @iflatex
24454 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24455 @end iflatex
24456 @end iftex
24457
24458 @item
24459 Score files are now applied in a more reliable order (@pxref{Score
24460 Variables}).
24461
24462 @item
24463 Reports on where mail messages end up can be generated (@pxref{Splitting
24464 Mail}).
24465
24466 @item
24467 More hooks and functions have been added to remove junk from incoming
24468 mail before saving the mail (@pxref{Washing Mail}).
24469
24470 @item
24471 Emphasized text can be properly fontisized:
24472
24473 @end itemize
24474
24475
24476 @node Quassia Gnus
24477 @subsubsection Quassia Gnus
24478
24479 New features in Gnus 5.6:
24480
24481 @itemize @bullet
24482
24483 @item
24484 New functionality for using Gnus as an offline newsreader has been
24485 added.  A plethora of new commands and modes have been added.  See
24486 @pxref{Gnus Unplugged} for the full story.
24487
24488 @item
24489  The @code{nndraft} back end has returned, but works differently than
24490 before.  All Message buffers are now also articles in the @code{nndraft}
24491 group, which is created automatically.
24492
24493 @item
24494 @code{gnus-alter-header-function} can now be used to alter header
24495 values.
24496
24497 @item
24498  @code{gnus-summary-goto-article} now accept Message-ID's.
24499
24500 @item
24501  A new Message command for deleting text in the body of a message
24502 outside the region: @kbd{C-c C-v}.
24503
24504 @item
24505  You can now post to component group in @code{nnvirtual} groups with
24506 @kbd{C-u C-c C-c}.
24507
24508 @item
24509  @code{nntp-rlogin-program}---new variable to ease customization.
24510
24511 @item
24512  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24513 re-highlighting of the article buffer.
24514
24515 @item
24516  New element in @code{gnus-boring-article-headers}---@code{long-to}.
24517
24518 @item
24519  @kbd{M-i} symbolic prefix command.  See the section ``Symbolic
24520 Prefixes'' in the Gnus manual for details.
24521
24522 @item
24523  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24524 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24525
24526 @item
24527  @code{gnus-simplify-subject-functions} variable to allow greater
24528 control over simplification.
24529
24530 @item
24531  @kbd{A T}---new command for fetching the current thread.
24532
24533 @item
24534  @kbd{/ T}---new command for including the current thread in the
24535 limit.
24536
24537 @item
24538  @kbd{M-RET} is a new Message command for breaking cited text.
24539
24540 @item
24541  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24542
24543 @item
24544  The @code{custom-face-lookup} function has been removed.
24545 If you used this function in your initialization files, you must
24546 rewrite them to use @code{face-spec-set} instead.
24547
24548 @item
24549  Canceling now uses the current select method.  Symbolic prefix
24550 @kbd{a} forces normal posting method.
24551
24552 @item
24553  New command to translate M******** sm*rtq**t*s into proper
24554 text---@kbd{W d}.
24555
24556 @item
24557  For easier debugging of @code{nntp}, you can set
24558 @code{nntp-record-commands} to a non-@code{nil} value.
24559
24560 @item
24561  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24562 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24563
24564 @item
24565  A command for editing group parameters from the summary buffer
24566 has been added.
24567
24568 @item
24569  A history of where mails have been split is available.
24570
24571 @item
24572  A new article date command has been added---@code{article-date-iso8601}.
24573
24574 @item
24575  Subjects can be simplified when threading by setting
24576 @code{gnus-score-thread-simplify}.
24577
24578 @item
24579  A new function for citing in Message has been
24580 added---@code{message-cite-original-without-signature}.
24581
24582 @item
24583  @code{article-strip-all-blank-lines}---new article command.
24584
24585 @item
24586  A new Message command to kill to the end of the article has
24587 been added.
24588
24589 @item
24590  A minimum adaptive score can be specified by using the
24591 @code{gnus-adaptive-word-minimum} variable.
24592
24593 @item
24594  The ``lapsed date'' article header can be kept continually
24595 updated by the @code{gnus-start-date-timer} command.
24596
24597 @item
24598  Web listserv archives can be read with the @code{nnlistserv} back end.
24599
24600 @item
24601  Old dejanews archives can now be read by @code{nnweb}.
24602
24603 @end itemize
24604
24605 @node Pterodactyl Gnus
24606 @subsubsection Pterodactyl Gnus
24607
24608 New features in Gnus 5.8:
24609
24610 @itemize @bullet
24611
24612 @item
24613 The mail-fetching functions have changed.  See the manual for the
24614 many details.  In particular, all procmail fetching variables are gone.
24615
24616 If you used procmail like in
24617
24618 @lisp
24619 (setq nnmail-use-procmail t)
24620 (setq nnmail-spool-file 'procmail)
24621 (setq nnmail-procmail-directory "~/mail/incoming/")
24622 (setq nnmail-procmail-suffix "\\.in")
24623 @end lisp
24624
24625 this now has changed to
24626
24627 @lisp
24628 (setq mail-sources
24629       '((directory :path "~/mail/incoming/"
24630                    :suffix ".in")))
24631 @end lisp
24632
24633 @xref{Mail Source Specifiers}.
24634
24635 @item
24636 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24637 Gnus, and adds a slew of new commands.  See the manual for details.
24638
24639 @item
24640 Gnus has also been multilingualized.  This also affects too
24641 many parts of Gnus to summarize here, and adds many new variables.
24642
24643 @item
24644 @code{gnus-auto-select-first} can now be a function to be
24645 called to position point.
24646
24647 @item
24648 The user can now decide which extra headers should be included in
24649 summary buffers and @acronym{NOV} files.
24650
24651 @item
24652 @code{gnus-article-display-hook} has been removed.  Instead, a number
24653 of variables starting with @code{gnus-treat-} have been added.
24654
24655 @item
24656 The Gnus posting styles have been redone again and now works in a
24657 subtly different manner.
24658
24659 @item
24660 New web-based back ends have been added: @code{nnslashdot},
24661 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24662 again, to keep up with ever-changing layouts.
24663
24664 @item
24665 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24666
24667 @end itemize
24668
24669 @node Oort Gnus
24670 @subsubsection Oort Gnus
24671 @cindex Oort Gnus
24672
24673 New features in Gnus 5.10:
24674
24675 @itemize @bullet
24676
24677 @item
24678 The revised Gnus @acronym{FAQ} is included in the manual,
24679 @xref{Frequently Asked Questions}.
24680
24681 @item
24682 Upgrading from previous (stable) version if you have used Oort.
24683
24684 If you have tried Oort (the unstable Gnus branch leading to this
24685 release) but went back to a stable version, be careful when upgrading to
24686 this version.  In particular, you will probably want to remove all
24687 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24688 read from your @file{.newsrc.eld} instead of from the
24689 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24690 later entry for more information about marks.  Note that downgrading
24691 isn't save in general.
24692
24693 @item
24694 Article Buttons
24695
24696 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24697 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24698 variables @code{gnus-button-@var{*}-level} can be used to control the
24699 appearance of all article buttons.  @xref{Article Button Levels}.
24700
24701 @item
24702 Dired integration
24703
24704 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24705 a file as an attachment (@kbd{C-c C-a}), open a file using the approriate
24706 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24707 (@kbd{C-c P}).  It is enabled with 
24708 @lisp
24709 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24710 @end lisp
24711
24712 @item
24713 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24714
24715 @item
24716 Single-part yenc encoded attachments can be decoded.
24717
24718 @item
24719 Picons
24720
24721 The picons code has been reimplemented to work in GNU Emacs---some of
24722 the previous options have been removed or renamed.
24723
24724 Picons are small ``personal icons'' representing users, domain and
24725 newsgroups, which can be displayed in the Article buffer.
24726 @xref{Picons}.
24727
24728 @item
24729 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
24730 boundary line is drawn at the end of the headers.
24731
24732 @item
24733 Retrieval of charters and control messages
24734
24735 There are new commands for fetching newsgroup charters (@kbd{H c}) and
24736 control messages (@kbd{H C}).
24737
24738 @item
24739 Delayed articles
24740
24741 You can delay the sending of a message with @kbd{C-c C-j} in the Message
24742 buffer.  The messages are delivered at specified time.  This is useful
24743 for sending yourself reminders.  @xref{Delayed Articles}.
24744
24745 @item
24746 If @code{auto-compression-mode} is enabled, attachments are automatically
24747 decompressed when activated.
24748
24749 @item
24750 If the new option @code{nnml-use-compressed-files} is non-@code{nil}, 
24751 the nnml back end allows compressed message files.
24752
24753 @item
24754 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
24755
24756 @item
24757 The Summary Buffer uses an arrow in the fringe to indicate the current 
24758 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
24759
24760 @item
24761 Warn about email replies to news
24762
24763 Do you often find yourself replying to news by email by mistake?  Then
24764 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
24765 you.
24766
24767 @item
24768 If the new option @code{gnus-summary-display-while-building} is
24769 non-@code{nil}, the summary buffer is shown and updated as it's being
24770 built.
24771
24772 @item
24773 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
24774 opposed to old but unread messages).
24775
24776 @item
24777 The new option @code{gnus-gcc-mark-as-read} automatically marks 
24778 Gcc articles as read.
24779
24780 @item
24781 The nndoc back end now supports mailman digests and exim bounces.
24782
24783 @item
24784 Gnus supports RFC 2369 mailing list headers, and adds a number of 
24785 related commands in mailing list groups.  @xref{Mailing List}.
24786
24787 @item
24788 The Date header can be displayed in a format that can be read aloud
24789 in English.  @xref{Article Date}.
24790
24791 @item
24792 The envelope sender address can be customized when using Sendmail.
24793 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
24794
24795 @item
24796 diffs are automatically highlighted in groups matching
24797 @code{mm-uu-diff-groups-regexp}
24798
24799 @item
24800 @acronym{TLS} wrapper shipped with Gnus
24801
24802 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
24803 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
24804 @acronym{TLS}/@acronym{SSL} support via (external third party)
24805 @file{ssl.el} and OpenSSL still works.
24806
24807 @item
24808 New @file{make.bat} for compiling and installing Gnus under MS Windows
24809
24810 Use @file{make.bat} if you want to install Gnus under MS Windows, the
24811 first argument to the batch-program should be the directory where
24812 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
24813 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
24814 the second parameter.
24815
24816 @file{make.bat} has been rewritten from scratch, it now features
24817 automatic recognition of XEmacs and GNU Emacs, generates
24818 @file{gnus-load.el}, checks if errors occur while compilation and
24819 generation of info files and reports them at the end of the build
24820 process. It now uses @code{makeinfo} if it is available and falls
24821 back to @file{infohack.el} otherwise.  @file{make.bat} should now
24822 install all files which are necessary to run Gnus and be generally a
24823 complete replacement for the @code{configure; make; make install}
24824 cycle used under Unix systems.
24825
24826 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
24827 been removed.
24828
24829 @item
24830 Support for non-@acronym{ASCII} domain names
24831
24832 Message supports non-@acronym{ASCII} domain names in From:, To: and
24833 Cc: and will query you whether to perform encoding when you try to
24834 send a message.  The variable @code{message-use-idna} controls this.
24835 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
24836 and Cc: when you view a message.  The variable @code{gnus-use-idna}
24837 controls this.
24838
24839 @item
24840 Better handling of Microsoft citation styles
24841
24842 Gnus now tries to recognize the mangled header block that some Microsoft
24843 mailers use to indicate that the rest of the message is a citation, even
24844 though it is not quoted in any way.  The variable
24845 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
24846 citations.
24847
24848 @item
24849 @code{gnus-article-skip-boring}
24850
24851 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
24852 not scroll down to show you a page that contains only boring text,
24853 which by default means cited text and signature.  You can customize
24854 what is skippable using @code{gnus-article-boring-faces}.
24855
24856 This feature is especially useful if you read many articles that
24857 consist of a little new content at the top with a long, untrimmed
24858 message cited below.
24859
24860 @item
24861 The format spec @code{%C} for positioning point has changed to @code{%*}.
24862
24863 @item
24864 The new variable @code{gnus-parameters} can be used to set group parameters.
24865
24866 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
24867 the parameters in @file{~/.newsrc.eld}, but via this variable you can
24868 enjoy the powers of customize, and simplified backups since you set the
24869 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
24870 variable maps regular expressions matching group names to group
24871 parameters, a'la:
24872 @lisp
24873 (setq gnus-parameters
24874       '(("mail\\..*"
24875          (gnus-show-threads nil)
24876          (gnus-use-scoring nil))
24877         ("^nnimap:\\(foo.bar\\)$"
24878          (to-group . "\\1"))))
24879 @end lisp
24880
24881 @item
24882 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
24883
24884 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
24885 disable it.
24886
24887 @item
24888 Gnus no longer generate the Sender: header automatically.
24889
24890 Earlier it was generated iff the user configurable email address was
24891 different from the Gnus guessed default user address.  As the guessing
24892 algorithm is rarely correct these days, and (more controversally) the
24893 only use of the Sender: header was to check if you are entitled to
24894 cancel/supersede news (which is now solved by Cancel Locks instead,
24895 see another entry), generation of the header has been disabled by
24896 default.  See the variables @code{message-required-headers},
24897 @code{message-required-news-headers}, and
24898 @code{message-required-mail-headers}.
24899
24900 @item
24901 Features from third party @file{message-utils.el} added to @file{message.el}.
24902
24903 Message now asks if you wish to remove @samp{(was: <old subject>)} from
24904 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
24905 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
24906 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
24907 appropriate headers and a note in the body for cross-postings and
24908 followups (see the variables @code{message-cross-post-@var{*}}).
24909
24910 @item
24911 References and X-Draft-Headers are no longer generated when you start
24912 composing messages and @code{message-generate-headers-first} is
24913 @code{nil}.
24914
24915 @item
24916 Improved anti-spam features.
24917
24918 Gnus is now able to take out spam from your mail and news streams
24919 using a wide variety of programs and filter rules. Among the supported
24920 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
24921 for easy use of external packages such as SpamAssassin and Hashcash
24922 are also new.  @xref{Thwarting Email Spam}.
24923
24924 @item
24925 Easy inclusion of X-Faces headers.
24926
24927 @item
24928 In the summary buffer, the new command @kbd{/ N} inserts new messages
24929 and @kbd{/ o} inserts old messages.
24930
24931 @item
24932 Gnus decodes morse encoded messages if you press @kbd{W m}.
24933
24934 @item
24935 Unread count correct in nnimap groups.
24936
24937 The estimated number of unread articles in the group buffer should now
24938 be correct for nnimap groups.  This is achieved by calling
24939 @code{nnimap-fixup-unread-after-getting-new-news} from the
24940 @code{gnus-setup-news-hook} (called on startup) and
24941 @code{gnus-after-getting-new-news-hook}. (called after getting new
24942 mail).  If you have modified those variables from the default, you may
24943 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
24944 you were happy with the estimate and want to save some (minimal) time
24945 when getting new mail, remove the function.
24946
24947 @item
24948 Group Carbon Copy (GCC) quoting
24949
24950 To support groups that contains SPC and other weird characters, groups
24951 are quoted before they are placed in the Gcc: header.  This means
24952 variables such as @code{gnus-message-archive-group} should no longer
24953 contain quote characters to make groups containing SPC work.  Also, if
24954 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
24955 into two groups) you must change it to return the list
24956 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
24957 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
24958 was incorrect earlier, it just didn't generate any problems since it
24959 was inserted directly.
24960
24961 @item
24962 @file{~/News/overview/} not used.
24963
24964 As a result of the following change, the @file{~/News/overview/}
24965 directory is not used any more.  You can safely delete the entire
24966 hierarchy.
24967
24968 @item
24969 @code{gnus-agent}
24970
24971 The Gnus Agent has seen a major updated and is now enabled by default,
24972 and all nntp and nnimap servers from @code{gnus-select-method} and
24973 @code{gnus-secondary-select-method} are agentized by default. Earlier
24974 only the server in @code{gnus-select-method} was agentized by the
24975 default, and the agent was disabled by default.  When the agent is
24976 enabled, headers are now also retrieved from the Agent cache instead
24977 of the back ends when possible. Earlier this only happened in the
24978 unplugged state.  You can enroll or remove servers with @kbd{J a} and
24979 @kbd{J r} in the server buffer.  Gnus will not download articles into
24980 the Agent cache, unless you instruct it to do so, though, by using
24981 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
24982 behaviour of having the Agent disabled with @code{(setq gnus-agent
24983 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
24984 is not needed any more.
24985
24986 @item
24987 @code{gnus-summary-line-format}
24988
24989 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
24990 %s\n}.  Moreover @code{gnus-extra-headers},
24991 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
24992 changed their default so that the users name will be replaced by the
24993 recipient's name or the group name posting to for @acronym{NNTP}
24994 groups.
24995
24996 @item
24997 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
24998
24999 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25000 broken Outlook (Express) articles.
25001
25002 @item
25003 @code{(require 'gnus-load)}
25004
25005 If you use a stand-alone Gnus distribution, you'd better add
25006 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25007 lisp directory into load-path.
25008
25009 File @file{gnus-load.el} contains autoload commands, functions and variables,
25010 some of which may not be included in distributions of Emacsen.
25011
25012 @item
25013 @code{gnus-slave-unplugged}
25014
25015 A new command which starts Gnus offline in slave mode.
25016
25017 @item
25018 @code{message-insinuate-rmail}
25019
25020 Adding @code{(message-insinuate-rmail)} and @code{(setq
25021 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25022 compose, reply and forward messages in message-mode, where you can
25023 enjoy the power of @acronym{MML}.
25024
25025 @item
25026 @code{message-minibuffer-local-map}
25027
25028 The line below enables BBDB in resending a message:
25029 @lisp
25030 (define-key message-minibuffer-local-map [(tab)]
25031   'bbdb-complete-name)
25032 @end lisp
25033
25034 @item
25035 Externalizing and deleting of attachments.
25036
25037 If @code{gnus-gcc-externalize-attachments} or
25038 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25039 local files as external parts.
25040
25041 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25042 on @acronym{MIME} buttons) saves a part and replaces the part with an
25043 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25044 @acronym{MIME} buttons) removes a part. It works only on back ends
25045 that support editing.
25046
25047 @item
25048 @code{gnus-default-charset}
25049
25050 The default value is determined from the
25051 @code{current-language-environment} variable, instead of
25052 @code{iso-8859-1}.  Also the @samp{.*} item in
25053 @code{gnus-group-charset-alist} is removed.
25054
25055 @item
25056 @code{gnus-posting-styles}
25057
25058 Add a new format of match like
25059 @lisp
25060 ((header "to" "larsi.*org")
25061  (Organization "Somewhere, Inc."))
25062 @end lisp
25063 The old format like the lines below is obsolete, but still accepted.
25064 @lisp
25065 (header "to" "larsi.*org"
25066         (Organization "Somewhere, Inc."))
25067 @end lisp
25068
25069 @item
25070 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25071
25072 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25073 added into these two variables. If you customized those, perhaps you
25074 need add those two headers too.
25075
25076 @item
25077 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25078
25079 If one reads an article while plugged, and the article already exists
25080 in the Agent, it won't get downloaded once more.  @code{(setq
25081 gnus-agent-cache nil)} reverts to the old behavior.
25082
25083 @item
25084 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25085 composing messages, it is enabled by @code{use-hard-newlines}.
25086 Decoding format=flowed was present but not documented in earlier
25087 versions.
25088
25089 @item
25090 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25091
25092 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25093
25094 @item
25095 Gnus supports Maildir groups.
25096
25097 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25098
25099 @item
25100 Printing capabilities are enhanced.
25101
25102 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25103 Article buffers.  Also, each individual @acronym{MIME} part can be
25104 printed using @kbd{p} on the @acronym{MIME} button.
25105
25106 @item
25107 Message supports the Importance: (RFC 2156) header.
25108
25109 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25110 the valid values.
25111
25112 @item
25113 Gnus supports Cancel Locks in News.
25114
25115 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25116 used to determine if you wrote a article or not (for cancelling and
25117 superseding).  Gnus generates a random password string the first time
25118 you post a message, and saves it in your @file{~/.emacs} using the Custom
25119 system.  While the variable is called @code{canlock-password}, it is not
25120 security sensitive data.  Publishing your canlock string on the web
25121 will not allow anyone to be able to anything she could not already do.
25122 The behaviour can be changed by customizing @code{message-insert-canlock}.
25123
25124 @item
25125 Gnus supports server-side mail filtering using Sieve.
25126
25127 Sieve rules can be added as Group Parameters for groups, and the
25128 complete Sieve script is generated using @kbd{D g} from the Group
25129 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25130 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25131 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25132
25133 @item
25134 Extended format specs.
25135
25136 Format spec @samp{%&user-date;} is added into
25137 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25138 format specs are supported.  The extended format specs look like
25139 @samp{%u&foo;}, which invokes function
25140 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25141 escape character, old user defined format @samp{%u&} is no longer supported.
25142
25143 @item
25144 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25145
25146 It was aliased to @kbd{Y c}
25147 (@code{gnus-summary-insert-cached-articles}). The new function filters
25148 out other articles.
25149
25150 @item
25151 Group names are treated as UTF-8 by default.
25152
25153 This is supposedly what USEFOR wanted to migrate to.  See
25154 @code{gnus-group-name-charset-group-alist} and
25155 @code{gnus-group-name-charset-method-alist} for customization.
25156
25157 @item
25158 The nnml and nnfolder backends store marks for each groups.
25159
25160 This makes it possible to take backup of nnml/nnfolder servers/groups
25161 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25162 makes it possible to share articles and marks between users (without
25163 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25164 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25165 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25166 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25167 another machine, Gnus will automatically use the @file{.marks} or
25168 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25169 The new server variables @code{nnml-marks-is-evil} and
25170 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25171
25172 @item
25173 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25174 been renamed to ``Gnus''.
25175
25176 @item
25177 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25178 renamed to ``Attachments''.  Note that this menu also contains security
25179 related stuff, like signing and encryption (@pxref{Security, Security,,
25180 message, Message Manual}).
25181
25182 @item
25183 @code{gnus-group-charset-alist} and
25184 @code{gnus-group-ignored-charsets-alist}.
25185
25186 The regexps in these variables are compared with full group names
25187 instead of real group names in 5.8.  Users who customize these
25188 variables should change those regexps accordingly. For example:
25189 @lisp
25190 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25191 @end lisp
25192
25193 @item
25194 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25195 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25196
25197 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25198 additional Lisp libraries.  This add several menu items to the
25199 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25200 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25201
25202 @item
25203 Gnus inlines external parts (message/external).
25204
25205 @item
25206 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25207 C-m}.
25208
25209 This change was made to avoid conflict with the standard binding of
25210 @code{back-to-indentation}, which is also useful in message mode.
25211 @end itemize
25212
25213 @iftex
25214
25215 @page
25216 @node The Manual
25217 @section The Manual
25218 @cindex colophon
25219 @cindex manual
25220
25221 This manual was generated from a TeXinfo file and then run through
25222 either @code{texi2dvi}
25223 @iflatex
25224 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25225 and then run through @code{latex} and @code{dvips}
25226 @end iflatex
25227 to get what you hold in your hands now.
25228
25229 The following conventions have been used:
25230
25231 @enumerate
25232
25233 @item
25234 This is a @samp{string}
25235
25236 @item
25237 This is a @kbd{keystroke}
25238
25239 @item
25240 This is a @file{file}
25241
25242 @item
25243 This is a @code{symbol}
25244
25245 @end enumerate
25246
25247 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25248 mean:
25249
25250 @lisp
25251 (setq flargnoze "yes")
25252 @end lisp
25253
25254 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25255
25256 @lisp
25257 (setq flumphel 'yes)
25258 @end lisp
25259
25260 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25261 ever get them confused.
25262
25263 @iflatex
25264 @c @head
25265 Of course, everything in this manual is of vital interest, so you should
25266 read it all.  Several times.  However, if you feel like skimming the
25267 manual, look for that gnu head you should see in the margin over
25268 there---it means that what's being discussed is of more importance than
25269 the rest of the stuff.  (On the other hand, if everything is infinitely
25270 important, how can anything be more important than that?  Just one more
25271 of the mysteries of this world, I guess.)
25272 @end iflatex
25273
25274 @end iftex
25275
25276
25277 @node On Writing Manuals
25278 @section On Writing Manuals
25279
25280 I guess most manuals are written after-the-fact; documenting a program
25281 that's already there.  This is not how this manual is written.  When
25282 implementing something, I write the manual entry for that something
25283 straight away.  I then see that it's difficult to explain the
25284 functionality, so I write how it's supposed to be, and then I change the
25285 implementation.  Writing the documentation and writing the code goes
25286 hand in hand.
25287
25288 This, of course, means that this manual has no, or little, flow.  It
25289 documents absolutely everything in Gnus, but often not where you're
25290 looking for it.  It is a reference manual, and not a guide to how to get
25291 started with Gnus.
25292
25293 That would be a totally different book, that should be written using the
25294 reference manual as source material.  It would look quite differently.
25295
25296
25297 @page
25298 @node Terminology
25299 @section Terminology
25300
25301 @cindex terminology
25302 @table @dfn
25303
25304 @item news
25305 @cindex news
25306 This is what you are supposed to use this thing for---reading news.
25307 News is generally fetched from a nearby @acronym{NNTP} server, and is
25308 generally publicly available to everybody.  If you post news, the entire
25309 world is likely to read just what you have written, and they'll all
25310 snigger mischievously.  Behind your back.
25311
25312 @item mail
25313 @cindex mail
25314 Everything that's delivered to you personally is mail.  Some news/mail
25315 readers (like Gnus) blur the distinction between mail and news, but
25316 there is a difference.  Mail is private.  News is public.  Mailing is
25317 not posting, and replying is not following up.
25318
25319 @item reply
25320 @cindex reply
25321 Send a mail to the person who has written what you are reading.
25322
25323 @item follow up
25324 @cindex follow up
25325 Post an article to the current newsgroup responding to the article you
25326 are reading.
25327
25328 @item back end
25329 @cindex back end
25330 Gnus considers mail and news to be mostly the same, really.  The only
25331 difference is how to access the actual articles.  News articles are
25332 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25333 messages could be read from a file on the local disk.  The internal
25334 architecture of Gnus thus comprises a `front end' and a number of
25335 `back ends'.  Internally, when you enter a group (by hitting
25336 @key{RET}, say), you thereby invoke a function in the front end in
25337 Gnus.  The front end then `talks' to a back end and says things like
25338 ``Give me the list of articles in the foo group'' or ``Show me article
25339 number 4711''.
25340
25341 So a back end mainly defines either a protocol (the @code{nntp} back
25342 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25343 accesses mail via @acronym{IMAP}) or a file format and directory
25344 layout (the @code{nnspool} back end accesses news via the common
25345 `spool directory' format, the @code{nnml} back end access mail via a
25346 file format and directory layout that's quite similar).
25347
25348 Gnus does not handle the underlying media, so to speak---this is all
25349 done by the back ends.  A back end is a collection of functions to
25350 access the articles.
25351
25352 However, sometimes the term `back end' is also used where `server'
25353 would have been more appropriate.  And then there is the term `select
25354 method' which can mean either.  The Gnus terminology can be quite
25355 confusing.
25356
25357 @item native
25358 @cindex native
25359 Gnus will always use one method (and back end) as the @dfn{native}, or
25360 default, way of getting news.
25361
25362 @item foreign
25363 @cindex foreign
25364 You can also have any number of foreign groups active at the same time.
25365 These are groups that use non-native non-secondary back ends for getting
25366 news.
25367
25368 @item secondary
25369 @cindex secondary
25370 Secondary back ends are somewhere half-way between being native and being
25371 foreign, but they mostly act like they are native.
25372
25373 @item article
25374 @cindex article
25375 A message that has been posted as news.
25376
25377 @item mail message
25378 @cindex mail message
25379 A message that has been mailed.
25380
25381 @item message
25382 @cindex message
25383 A mail message or news article
25384
25385 @item head
25386 @cindex head
25387 The top part of a message, where administrative information (etc.) is
25388 put.
25389
25390 @item body
25391 @cindex body
25392 The rest of an article.  Everything not in the head is in the
25393 body.
25394
25395 @item header
25396 @cindex header
25397 A line from the head of an article.
25398
25399 @item headers
25400 @cindex headers
25401 A collection of such lines, or a collection of heads.  Or even a
25402 collection of @acronym{NOV} lines.
25403
25404 @item @acronym{NOV}
25405 @cindex @acronym{NOV}
25406 When Gnus enters a group, it asks the back end for the headers of all
25407 unread articles in the group.  Most servers support the News OverView
25408 format, which is more compact and much faster to read and parse than the
25409 normal @sc{head} format.
25410
25411 @item level
25412 @cindex levels
25413 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25414 that have a lower level are ``more'' subscribed than the groups with a
25415 higher level.  In fact, groups on levels 1-5 are considered
25416 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25417 are @dfn{killed}.  Commands for listing groups and scanning for new
25418 articles will all use the numeric prefix as @dfn{working level}.
25419
25420 @item killed groups
25421 @cindex killed groups
25422 No information on killed groups is stored or updated, which makes killed
25423 groups much easier to handle than subscribed groups.
25424
25425 @item zombie groups
25426 @cindex zombie groups
25427 Just like killed groups, only slightly less dead.
25428
25429 @item active file
25430 @cindex active file
25431 The news server has to keep track of what articles it carries, and what
25432 groups exist.  All this information in stored in the active file, which
25433 is rather large, as you might surmise.
25434
25435 @item bogus groups
25436 @cindex bogus groups
25437 A group that exists in the @file{.newsrc} file, but isn't known to the
25438 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25439 This means that the group probably doesn't exist (any more).
25440
25441 @item activating
25442 @cindex activating groups
25443 The act of asking the server for info on a group and computing the
25444 number of unread articles is called @dfn{activating the group}.
25445 Un-activated groups are listed with @samp{*} in the group buffer.
25446
25447 @item server
25448 @cindex server
25449 A machine one can connect to and get news (or mail) from.
25450
25451 @item select method
25452 @cindex select method
25453 A structure that specifies the back end, the server and the virtual
25454 server settings.
25455
25456 @item virtual server
25457 @cindex virtual server
25458 A named select method.  Since a select method defines all there is to
25459 know about connecting to a (physical) server, taking the thing as a
25460 whole is a virtual server.
25461
25462 @item washing
25463 @cindex washing
25464 Taking a buffer and running it through a filter of some sort.  The
25465 result will (more often than not) be cleaner and more pleasing than the
25466 original.
25467
25468 @item ephemeral groups
25469 @cindex ephemeral groups
25470 @cindex temporary groups
25471 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25472 groups are groups that will have no data stored---when you exit the
25473 group, it'll disappear into the aether.
25474
25475 @item solid groups
25476 @cindex solid groups
25477 This is the opposite of ephemeral groups.  All groups listed in the
25478 group buffer are solid groups.
25479
25480 @item sparse articles
25481 @cindex sparse articles
25482 These are article placeholders shown in the summary buffer when
25483 @code{gnus-build-sparse-threads} has been switched on.
25484
25485 @item threading
25486 @cindex threading
25487 To put responses to articles directly after the articles they respond
25488 to---in a hierarchical fashion.
25489
25490 @item root
25491 @cindex root
25492 @cindex thread root
25493 The first article in a thread is the root.  It is the ancestor of all
25494 articles in the thread.
25495
25496 @item parent
25497 @cindex parent
25498 An article that has responses.
25499
25500 @item child
25501 @cindex child
25502 An article that responds to a different article---its parent.
25503
25504 @item digest
25505 @cindex digest
25506 A collection of messages in one file.  The most common digest format is
25507 specified by RFC 1153.
25508
25509 @end table
25510
25511
25512 @page
25513 @node Customization
25514 @section Customization
25515 @cindex general customization
25516
25517 All variables are properly documented elsewhere in this manual.  This
25518 section is designed to give general pointers on how to customize Gnus
25519 for some quite common situations.
25520
25521 @menu
25522 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25523 * Slow Terminal Connection::    You run a remote Emacs.
25524 * Little Disk Space::           You feel that having large setup files is icky.
25525 * Slow Machine::                You feel like buying a faster machine.
25526 @end menu
25527
25528
25529 @node Slow/Expensive Connection
25530 @subsection Slow/Expensive NNTP Connection
25531
25532 If you run Emacs on a machine locally, and get your news from a machine
25533 over some very thin strings, you want to cut down on the amount of data
25534 Gnus has to get from the @acronym{NNTP} server.
25535
25536 @table @code
25537
25538 @item gnus-read-active-file
25539 Set this to @code{nil}, which will inhibit Gnus from requesting the
25540 entire active file from the server.  This file is often v.  large.  You
25541 also have to set @code{gnus-check-new-newsgroups} and
25542 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25543 doesn't suddenly decide to fetch the active file anyway.
25544
25545 @item gnus-nov-is-evil
25546 This one has to be @code{nil}.  If not, grabbing article headers from
25547 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25548 support @sc{xover}; Gnus will detect this by itself.
25549 @end table
25550
25551
25552 @node Slow Terminal Connection
25553 @subsection Slow Terminal Connection
25554
25555 Let's say you use your home computer for dialing up the system that runs
25556 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25557 possible) the amount of data sent over the wires.
25558
25559 @table @code
25560
25561 @item gnus-auto-center-summary
25562 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25563 buffer all the time.  If it is @code{vertical}, do only vertical
25564 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25565 horizontal and vertical recentering.
25566
25567 @item gnus-visible-headers
25568 Cut down on the headers included in the articles to the
25569 minimum.  You can, in fact, make do without them altogether---most of the
25570 useful data is in the summary buffer, anyway.  Set this variable to
25571 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25572
25573 Set this hook to all the available hiding commands:
25574 @lisp
25575 (setq gnus-treat-hide-headers 'head
25576       gnus-treat-hide-signature t
25577       gnus-treat-hide-citation t)
25578 @end lisp
25579
25580 @item gnus-use-full-window
25581 By setting this to @code{nil}, you can make all the windows smaller.
25582 While this doesn't really cut down much generally, it means that you
25583 have to see smaller portions of articles before deciding that you didn't
25584 want to read them anyway.
25585
25586 @item gnus-thread-hide-subtree
25587 If this is non-@code{nil}, all threads in the summary buffer will be
25588 hidden initially.
25589
25590
25591 @item gnus-updated-mode-lines
25592 If this is @code{nil}, Gnus will not put information in the buffer mode
25593 lines, which might save some time.
25594 @end table
25595
25596
25597 @node Little Disk Space
25598 @subsection Little Disk Space
25599 @cindex disk space
25600
25601 The startup files can get rather large, so you may want to cut their
25602 sizes a bit if you are running out of space.
25603
25604 @table @code
25605
25606 @item gnus-save-newsrc-file
25607 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25608 only save @file{.newsrc.eld}.  This means that you will not be able to
25609 use any other newsreaders than Gnus.  This variable is @code{t} by
25610 default.
25611
25612 @item gnus-read-newsrc-file
25613 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25614 only read @file{.newsrc.eld}.  This means that you will not be able to
25615 use any other newsreaders than Gnus.  This variable is @code{t} by
25616 default.
25617
25618 @item gnus-save-killed-list
25619 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25620 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25621 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25622 variable to @code{nil}.  This variable is @code{t} by default.
25623
25624 @end table
25625
25626
25627 @node Slow Machine
25628 @subsection Slow Machine
25629 @cindex slow machine
25630
25631 If you have a slow machine, or are just really impatient, there are a
25632 few things you can do to make Gnus run faster.
25633
25634 Set @code{gnus-check-new-newsgroups} and
25635 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25636
25637 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25638 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25639 summary buffer faster.
25640
25641
25642 @page
25643 @node Troubleshooting
25644 @section Troubleshooting
25645 @cindex troubleshooting
25646
25647 Gnus works @emph{so} well straight out of the box---I can't imagine any
25648 problems, really.
25649
25650 Ahem.
25651
25652 @enumerate
25653
25654 @item
25655 Make sure your computer is switched on.
25656
25657 @item
25658 Make sure that you really load the current Gnus version.  If you have
25659 been running @sc{gnus}, you need to exit Emacs and start it up again before
25660 Gnus will work.
25661
25662 @item
25663 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25664 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
25665 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
25666 flee}, you have some old @file{.el} files lying around.  Delete these.
25667
25668 @item
25669 Read the help group (@kbd{G h} in the group buffer) for a
25670 @acronym{FAQ} and a how-to.
25671
25672 @item
25673 @vindex max-lisp-eval-depth
25674 Gnus works on many recursive structures, and in some extreme (and very
25675 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25676 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25677 something like that.
25678 @end enumerate
25679
25680 If all else fails, report the problem as a bug.
25681
25682 @cindex bugs
25683 @cindex reporting bugs
25684
25685 @kindex M-x gnus-bug
25686 @findex gnus-bug
25687 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25688 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25689 me the backtrace.  I will fix bugs, but I can only fix them if you send
25690 me a precise description as to how to reproduce the bug.
25691
25692 You really can never be too detailed in a bug report.  Always use the
25693 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25694 a 10Kb mail each time you use it, and even if you have sent me your
25695 environment 500 times before.  I don't care.  I want the full info each
25696 time.
25697
25698 It is also important to remember that I have no memory whatsoever.  If
25699 you send a bug report, and I send you a reply, and then you just send
25700 back ``No, it's not! Moron!'', I will have no idea what you are
25701 insulting me about.  Always over-explain everything.  It's much easier
25702 for all of us---if I don't have all the information I need, I will just
25703 mail you and ask for more info, and everything takes more time.
25704
25705 If the problem you're seeing is very visual, and you can't quite explain
25706 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25707 it somewhere it can be reached, and include the URL of the picture in
25708 the bug report.
25709
25710 @cindex patches
25711 If you would like to contribute a patch to fix bugs or make
25712 improvements, please produce the patch using @samp{diff -u}.
25713
25714 @cindex edebug
25715 If you want to debug your problem further before reporting, possibly
25716 in order to solve the problem yourself and send a patch, you can use
25717 edebug.  Debugging Lisp code is documented in the Elisp manual
25718 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
25719 Lisp Reference Manual}).  To get you started with edebug, consider if
25720 you discover some weird behaviour when pressing @kbd{c}, the first
25721 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
25722 the documentation buffer that leads you to the function definition,
25723 then press @kbd{M-x edebug-defun RET} with point inside that function,
25724 return to Gnus and press @kbd{c} to invoke the code.  You will be
25725 placed in the lisp buffer and can single step using @kbd{SPC} and
25726 evaluate expressions using @kbd{M-:} or inspect variables using
25727 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
25728 @kbd{c} or @kbd{g}.
25729
25730 @cindex elp
25731 @cindex profile
25732 @cindex slow
25733 Sometimes, a problem do not directly generate a elisp error but
25734 manifests itself by causing Gnus to be very slow.  In these cases, you
25735 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
25736 slow, and then try to analyze the backtrace (repeating the procedure
25737 helps isolating the real problem areas).  
25738
25739 A fancier approach is to use the elisp profiler, ELP.  The profiler is
25740 (or should be) fully documented elsewhere, but to get you started
25741 there are a few steps that need to be followed.  First, instrument the
25742 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
25743 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
25744 RET message}.  Then perform the operation that is slow and press
25745 @kbd{M-x elp-results}.  You will then see which operations that takes
25746 time, and can debug them further.  If the entire operation takes much
25747 longer than the time spent in the slowest function in the profiler
25748 output, you probably profiled the wrong part of Gnus.  To reset
25749 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
25750 elp-restore-all} is supposed to remove profiling, but given the
25751 complexities and dynamic code generation in Gnus, it might not always
25752 work perfectly.
25753
25754 @cindex gnu.emacs.gnus
25755 @cindex ding mailing list
25756 If you just need help, you are better off asking on
25757 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
25758 @email{ding@@gnus.org, the ding mailing list}.  Write to
25759 @email{ding-request@@gnus.org} to subscribe.
25760
25761
25762 @page
25763 @node Gnus Reference Guide
25764 @section Gnus Reference Guide
25765
25766 It is my hope that other people will figure out smart stuff that Gnus
25767 can do, and that other people will write those smart things as well.  To
25768 facilitate that I thought it would be a good idea to describe the inner
25769 workings of Gnus.  And some of the not-so-inner workings, while I'm at
25770 it.
25771
25772 You can never expect the internals of a program not to change, but I
25773 will be defining (in some details) the interface between Gnus and its
25774 back ends (this is written in stone), the format of the score files
25775 (ditto), data structures (some are less likely to change than others)
25776 and general methods of operation.
25777
25778 @menu
25779 * Gnus Utility Functions::      Common functions and variable to use.
25780 * Back End Interface::          How Gnus communicates with the servers.
25781 * Score File Syntax::           A BNF definition of the score file standard.
25782 * Headers::                     How Gnus stores headers internally.
25783 * Ranges::                      A handy format for storing mucho numbers.
25784 * Group Info::                  The group info format.
25785 * Extended Interactive::        Symbolic prefixes and stuff.
25786 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
25787 * Various File Formats::        Formats of files that Gnus use.
25788 @end menu
25789
25790
25791 @node Gnus Utility Functions
25792 @subsection Gnus Utility Functions
25793 @cindex Gnus utility functions
25794 @cindex utility functions
25795 @cindex functions
25796 @cindex internal variables
25797
25798 When writing small functions to be run from hooks (and stuff), it's
25799 vital to have access to the Gnus internal functions and variables.
25800 Below is a list of the most common ones.
25801
25802 @table @code
25803
25804 @item gnus-newsgroup-name
25805 @vindex gnus-newsgroup-name
25806 This variable holds the name of the current newsgroup.
25807
25808 @item gnus-find-method-for-group
25809 @findex gnus-find-method-for-group
25810 A function that returns the select method for @var{group}.
25811
25812 @item gnus-group-real-name
25813 @findex gnus-group-real-name
25814 Takes a full (prefixed) Gnus group name, and returns the unprefixed
25815 name.
25816
25817 @item gnus-group-prefixed-name
25818 @findex gnus-group-prefixed-name
25819 Takes an unprefixed group name and a select method, and returns the full
25820 (prefixed) Gnus group name.
25821
25822 @item gnus-get-info
25823 @findex gnus-get-info
25824 Returns the group info list for @var{group}.
25825
25826 @item gnus-group-unread
25827 @findex gnus-group-unread
25828 The number of unread articles in @var{group}, or @code{t} if that is
25829 unknown.
25830
25831 @item gnus-active
25832 @findex gnus-active
25833 The active entry for @var{group}.
25834
25835 @item gnus-set-active
25836 @findex gnus-set-active
25837 Set the active entry for @var{group}.
25838
25839 @item gnus-add-current-to-buffer-list
25840 @findex gnus-add-current-to-buffer-list
25841 Adds the current buffer to the list of buffers to be killed on Gnus
25842 exit.
25843
25844 @item gnus-continuum-version
25845 @findex gnus-continuum-version
25846 Takes a Gnus version string as a parameter and returns a floating point
25847 number.  Earlier versions will always get a lower number than later
25848 versions.
25849
25850 @item gnus-group-read-only-p
25851 @findex gnus-group-read-only-p
25852 Says whether @var{group} is read-only or not.
25853
25854 @item gnus-news-group-p
25855 @findex gnus-news-group-p
25856 Says whether @var{group} came from a news back end.
25857
25858 @item gnus-ephemeral-group-p
25859 @findex gnus-ephemeral-group-p
25860 Says whether @var{group} is ephemeral or not.
25861
25862 @item gnus-server-to-method
25863 @findex gnus-server-to-method
25864 Returns the select method corresponding to @var{server}.
25865
25866 @item gnus-server-equal
25867 @findex gnus-server-equal
25868 Says whether two virtual servers are equal.
25869
25870 @item gnus-group-native-p
25871 @findex gnus-group-native-p
25872 Says whether @var{group} is native or not.
25873
25874 @item gnus-group-secondary-p
25875 @findex gnus-group-secondary-p
25876 Says whether @var{group} is secondary or not.
25877
25878 @item gnus-group-foreign-p
25879 @findex gnus-group-foreign-p
25880 Says whether @var{group} is foreign or not.
25881
25882 @item gnus-group-find-parameter
25883 @findex gnus-group-find-parameter
25884 Returns the parameter list of @var{group}.  If given a second parameter,
25885 returns the value of that parameter for @var{group}.
25886
25887 @item gnus-group-set-parameter
25888 @findex gnus-group-set-parameter
25889 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
25890
25891 @item gnus-narrow-to-body
25892 @findex gnus-narrow-to-body
25893 Narrows the current buffer to the body of the article.
25894
25895 @item gnus-check-backend-function
25896 @findex gnus-check-backend-function
25897 Takes two parameters, @var{function} and @var{group}.  If the back end
25898 @var{group} comes from supports @var{function}, return non-@code{nil}.
25899
25900 @lisp
25901 (gnus-check-backend-function "request-scan" "nnml:misc")
25902 @result{} t
25903 @end lisp
25904
25905 @item gnus-read-method
25906 @findex gnus-read-method
25907 Prompts the user for a select method.
25908
25909 @end table
25910
25911
25912 @node Back End Interface
25913 @subsection Back End Interface
25914
25915 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
25916 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
25917 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
25918 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
25919 examples of the latter we have @code{nntp-port-number} and
25920 @code{nnmbox-directory}.
25921
25922 When Gnus asks for information from a back end---say @code{nntp}---on
25923 something, it will normally include a virtual server name in the
25924 function parameters.  (If not, the back end should use the ``current''
25925 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
25926 server as its only (optional) parameter.  If this virtual server hasn't
25927 been opened, the function should fail.
25928
25929 Note that a virtual server name has no relation to some physical server
25930 name.  Take this example:
25931
25932 @lisp
25933 (nntp "odd-one"
25934       (nntp-address "ifi.uio.no")
25935       (nntp-port-number 4324))
25936 @end lisp
25937
25938 Here the virtual server name is @samp{odd-one} while the name of
25939 the physical server is @samp{ifi.uio.no}.
25940
25941 The back ends should be able to switch between several virtual servers.
25942 The standard back ends implement this by keeping an alist of virtual
25943 server environments that they pull down/push up when needed.
25944
25945 There are two groups of interface functions: @dfn{required functions},
25946 which must be present, and @dfn{optional functions}, which Gnus will
25947 always check for presence before attempting to call 'em.
25948
25949 All these functions are expected to return data in the buffer
25950 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
25951 unfortunately named, but we'll have to live with it.  When I talk about
25952 @dfn{resulting data}, I always refer to the data in that buffer.  When I
25953 talk about @dfn{return value}, I talk about the function value returned by
25954 the function call.  Functions that fail should return @code{nil} as the
25955 return value.
25956
25957 Some back ends could be said to be @dfn{server-forming} back ends, and
25958 some might be said not to be.  The latter are back ends that generally
25959 only operate on one group at a time, and have no concept of ``server''
25960 ---they have a group, and they deliver info on that group and nothing
25961 more.
25962
25963 Gnus identifies each message by way of group name and article number.  A
25964 few remarks about these article numbers might be useful.  First of all,
25965 the numbers are positive integers.  Secondly, it is normally not
25966 possible for later articles to `re-use' older article numbers without
25967 confusing Gnus.  That is, if a group has ever contained a message
25968 numbered 42, then no other message may get that number, or Gnus will get
25969 mightily confused.@footnote{See the function
25970 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
25971 Third, article numbers must be assigned in order of arrival in the
25972 group; this is not necessarily the same as the date of the message.
25973
25974 The previous paragraph already mentions all the `hard' restrictions that
25975 article numbers must fulfill.  But it seems that it might be useful to
25976 assign @emph{consecutive} article numbers, for Gnus gets quite confused
25977 if there are holes in the article numbering sequence.  However, due to
25978 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
25979 also useful for the article numbers to start at 1 to avoid running out
25980 of numbers as long as possible.
25981
25982 Note that by convention, backends are named @code{nnsomething}, but
25983 Gnus also comes with some @code{nnnotbackends}, such as
25984 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
25985
25986 In the examples and definitions I will refer to the imaginary back end
25987 @code{nnchoke}.
25988
25989 @cindex @code{nnchoke}
25990
25991 @menu
25992 * Required Back End Functions::  Functions that must be implemented.
25993 * Optional Back End Functions::  Functions that need not be implemented.
25994 * Error Messaging::             How to get messages and report errors.
25995 * Writing New Back Ends::       Extending old back ends.
25996 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
25997 * Mail-like Back Ends::         Some tips on mail back ends.
25998 @end menu
25999
26000
26001 @node Required Back End Functions
26002 @subsubsection Required Back End Functions
26003
26004 @table @code
26005
26006 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26007
26008 @var{articles} is either a range of article numbers or a list of
26009 @code{Message-ID}s.  Current back ends do not fully support either---only
26010 sequences (lists) of article numbers, and most back ends do not support
26011 retrieval of @code{Message-ID}s.  But they should try for both.
26012
26013 The result data should either be HEADs or @acronym{NOV} lines, and the result
26014 value should either be @code{headers} or @code{nov} to reflect this.
26015 This might later be expanded to @code{various}, which will be a mixture
26016 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26017
26018 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26019 headers'', in some meaning of the word.  This is generally done by
26020 fetching (at most) @var{fetch-old} extra headers less than the smallest
26021 article number in @code{articles}, and filling the gaps as well.  The
26022 presence of this parameter can be ignored if the back end finds it
26023 cumbersome to follow the request.  If this is non-@code{nil} and not a
26024 number, do maximum fetches.
26025
26026 Here's an example HEAD:
26027
26028 @example
26029 221 1056 Article retrieved.
26030 Path: ifi.uio.no!sturles
26031 From: sturles@@ifi.uio.no (Sturle Sunde)
26032 Newsgroups: ifi.discussion
26033 Subject: Re: Something very droll
26034 Date: 27 Oct 1994 14:02:57 +0100
26035 Organization: Dept. of Informatics, University of Oslo, Norway
26036 Lines: 26
26037 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26038 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26039 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26040 .
26041 @end example
26042
26043 So a @code{headers} return value would imply that there's a number of
26044 these in the data buffer.
26045
26046 Here's a BNF definition of such a buffer:
26047
26048 @example
26049 headers        = *head
26050 head           = error / valid-head
26051 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26052 valid-head     = valid-message *header "." eol
26053 valid-message  = "221 " <number> " Article retrieved." eol
26054 header         = <text> eol
26055 @end example
26056
26057 @cindex BNF
26058 (The version of BNF used here is the one used in RFC822.)
26059
26060 If the return value is @code{nov}, the data buffer should contain
26061 @dfn{network overview database} lines.  These are basically fields
26062 separated by tabs.
26063
26064 @example
26065 nov-buffer = *nov-line
26066 nov-line   = field 7*8[ <TAB> field ] eol
26067 field      = <text except TAB>
26068 @end example
26069
26070 For a closer look at what should be in those fields,
26071 @pxref{Headers}.
26072
26073
26074 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26075
26076 @var{server} is here the virtual server name.  @var{definitions} is a
26077 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26078
26079 If the server can't be opened, no error should be signaled.  The back end
26080 may then choose to refuse further attempts at connecting to this
26081 server.  In fact, it should do so.
26082
26083 If the server is opened already, this function should return a
26084 non-@code{nil} value.  There should be no data returned.
26085
26086
26087 @item (nnchoke-close-server &optional SERVER)
26088
26089 Close connection to @var{server} and free all resources connected
26090 to it.  Return @code{nil} if the server couldn't be closed for some
26091 reason.
26092
26093 There should be no data returned.
26094
26095
26096 @item (nnchoke-request-close)
26097
26098 Close connection to all servers and free all resources that the back end
26099 have reserved.  All buffers that have been created by that back end
26100 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26101 function is generally only called when Gnus is shutting down.
26102
26103 There should be no data returned.
26104
26105
26106 @item (nnchoke-server-opened &optional SERVER)
26107
26108 If @var{server} is the current virtual server, and the connection to the
26109 physical server is alive, then this function should return a
26110 non-@code{nil} vlue.  This function should under no circumstances
26111 attempt to reconnect to a server we have lost connection to.
26112
26113 There should be no data returned.
26114
26115
26116 @item (nnchoke-status-message &optional SERVER)
26117
26118 This function should return the last error message from @var{server}.
26119
26120 There should be no data returned.
26121
26122
26123 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26124
26125 The result data from this function should be the article specified by
26126 @var{article}.  This might either be a @code{Message-ID} or a number.
26127 It is optional whether to implement retrieval by @code{Message-ID}, but
26128 it would be nice if that were possible.
26129
26130 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26131 in this buffer instead of the normal data buffer.  This is to make it
26132 possible to avoid copying large amounts of data from one buffer to
26133 another, while Gnus mainly requests articles to be inserted directly
26134 into its article buffer.
26135
26136 If it is at all possible, this function should return a cons cell where
26137 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26138 the article number.  This will enable Gnus to find out what the real
26139 group and article numbers are when fetching articles by
26140 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26141 on successful article retrieval.
26142
26143
26144 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26145
26146 Get data on @var{group}.  This function also has the side effect of
26147 making @var{group} the current group.
26148
26149 If @var{fast}, don't bother to return useful data, just make @var{group}
26150 the current group.
26151
26152 Here's an example of some result data and a definition of the same:
26153
26154 @example
26155 211 56 1000 1059 ifi.discussion
26156 @end example
26157
26158 The first number is the status, which should be 211.  Next is the
26159 total number of articles in the group, the lowest article number, the
26160 highest article number, and finally the group name.  Note that the total
26161 number of articles may be less than one might think while just
26162 considering the highest and lowest article numbers, but some articles
26163 may have been canceled.  Gnus just discards the total-number, so
26164 whether one should take the bother to generate it properly (if that is a
26165 problem) is left as an exercise to the reader.  If the group contains no
26166 articles, the lowest article number should be reported as 1 and the
26167 highest as 0.
26168
26169 @example
26170 group-status = [ error / info ] eol
26171 error        = [ "4" / "5" ] 2<number> " " <Error message>
26172 info         = "211 " 3* [ <number> " " ] <string>
26173 @end example
26174
26175
26176 @item (nnchoke-close-group GROUP &optional SERVER)
26177
26178 Close @var{group} and free any resources connected to it.  This will be
26179 a no-op on most back ends.
26180
26181 There should be no data returned.
26182
26183
26184 @item (nnchoke-request-list &optional SERVER)
26185
26186 Return a list of all groups available on @var{server}.  And that means
26187 @emph{all}.
26188
26189 Here's an example from a server that only carries two groups:
26190
26191 @example
26192 ifi.test 0000002200 0000002000 y
26193 ifi.discussion 3324 3300 n
26194 @end example
26195
26196 On each line we have a group name, then the highest article number in
26197 that group, the lowest article number, and finally a flag.  If the group
26198 contains no articles, the lowest article number should be reported as 1
26199 and the highest as 0.
26200
26201 @example
26202 active-file = *active-line
26203 active-line = name " " <number> " " <number> " " flags eol
26204 name        = <string>
26205 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26206 @end example
26207
26208 The flag says whether the group is read-only (@samp{n}), is moderated
26209 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26210 (@samp{=other-group}) or none of the above (@samp{y}).
26211
26212
26213 @item (nnchoke-request-post &optional SERVER)
26214
26215 This function should post the current buffer.  It might return whether
26216 the posting was successful or not, but that's not required.  If, for
26217 instance, the posting is done asynchronously, it has generally not been
26218 completed by the time this function concludes.  In that case, this
26219 function should set up some kind of sentinel to beep the user loud and
26220 clear if the posting could not be completed.
26221
26222 There should be no result data from this function.
26223
26224 @end table
26225
26226
26227 @node Optional Back End Functions
26228 @subsubsection Optional Back End Functions
26229
26230 @table @code
26231
26232 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26233
26234 @var{groups} is a list of groups, and this function should request data
26235 on all those groups.  How it does it is of no concern to Gnus, but it
26236 should attempt to do this in a speedy fashion.
26237
26238 The return value of this function can be either @code{active} or
26239 @code{group}, which says what the format of the result data is.  The
26240 former is in the same format as the data from
26241 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26242 in the same format as @code{nnchoke-request-group} gives.
26243
26244 @example
26245 group-buffer = *active-line / *group-status
26246 @end example
26247
26248
26249 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26250
26251 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26252 alterations.  This comes in handy if the back end really carries all
26253 the information (as is the case with virtual and imap groups).  This
26254 function should destructively alter the info to suit its needs, and
26255 should return a non-@code{nil} value.
26256
26257 There should be no result data from this function.
26258
26259
26260 @item (nnchoke-request-type GROUP &optional ARTICLE)
26261
26262 When the user issues commands for ``sending news'' (@kbd{F} in the
26263 summary buffer, for instance), Gnus has to know whether the article the
26264 user is following up on is news or mail.  This function should return
26265 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26266 is mail and @code{unknown} if the type can't be decided.  (The
26267 @var{article} parameter is necessary in @code{nnvirtual} groups which
26268 might very well combine mail groups and news groups.)  Both @var{group}
26269 and @var{article} may be @code{nil}.
26270
26271 There should be no result data from this function.
26272
26273
26274 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26275
26276 Set/remove/add marks on articles.  Normally Gnus handles the article
26277 marks (such as read, ticked, expired etc) internally, and store them in
26278 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26279 all information about the articles on the server, so Gnus need to
26280 propagate the mark information to the server.
26281
26282 @var{action} is a list of mark setting requests, having this format:
26283
26284 @example
26285 (RANGE ACTION MARK)
26286 @end example
26287
26288 @var{range} is a range of articles you wish to update marks on.
26289 @var{action} is @code{add} or @code{del}, used to add marks or remove
26290 marks (preserving all marks not mentioned).  @var{mark} is a list of
26291 marks; where each mark is a symbol.  Currently used marks are
26292 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26293 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26294 @code{forward} and @code{recent}, but your back end should, if
26295 possible, not limit itself to these.
26296
26297 Given contradictory actions, the last action in the list should be the
26298 effective one.  That is, if your action contains a request to add the
26299 @code{tick} mark on article 1 and, later in the list, a request to
26300 remove the mark on the same article, the mark should in fact be removed.
26301
26302 An example action list:
26303
26304 @example
26305 (((5 12 30) 'del '(tick))
26306  ((10 . 90) 'add '(read expire))
26307  ((92 94) 'del '(read)))
26308 @end example
26309
26310 The function should return a range of articles it wasn't able to set the
26311 mark on (currently not used for anything).
26312
26313 There should be no result data from this function.
26314
26315 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26316
26317 If the user tries to set a mark that the back end doesn't like, this
26318 function may change the mark.  Gnus will use whatever this function
26319 returns as the mark for @var{article} instead of the original
26320 @var{mark}.  If the back end doesn't care, it must return the original
26321 @var{mark}, and not @code{nil} or any other type of garbage.
26322
26323 The only use for this I can see is what @code{nnvirtual} does with
26324 it---if a component group is auto-expirable, marking an article as read
26325 in the virtual group should result in the article being marked as
26326 expirable.
26327
26328 There should be no result data from this function.
26329
26330
26331 @item (nnchoke-request-scan &optional GROUP SERVER)
26332
26333 This function may be called at any time (by Gnus or anything else) to
26334 request that the back end check for incoming articles, in one way or
26335 another.  A mail back end will typically read the spool file or query
26336 the @acronym{POP} server when this function is invoked.  The
26337 @var{group} doesn't have to be heeded---if the back end decides that
26338 it is too much work just scanning for a single group, it may do a
26339 total scan of all groups.  It would be nice, however, to keep things
26340 local if that's practical.
26341
26342 There should be no result data from this function.
26343
26344
26345 @item (nnchoke-request-group-description GROUP &optional SERVER)
26346
26347 The result data from this function should be a description of
26348 @var{group}.
26349
26350 @example
26351 description-line = name <TAB> description eol
26352 name             = <string>
26353 description      = <text>
26354 @end example
26355
26356 @item (nnchoke-request-list-newsgroups &optional SERVER)
26357
26358 The result data from this function should be the description of all
26359 groups available on the server.
26360
26361 @example
26362 description-buffer = *description-line
26363 @end example
26364
26365
26366 @item (nnchoke-request-newgroups DATE &optional SERVER)
26367
26368 The result data from this function should be all groups that were
26369 created after @samp{date}, which is in normal human-readable date format
26370 (i.e., the date format used in mail and news headers, and returned by
26371 the function @code{message-make-date} by default).  The data should be
26372 in the active buffer format.
26373
26374 It is okay for this function to return `too many' groups; some back ends
26375 might find it cheaper to return the full list of groups, rather than
26376 just the new groups.  But don't do this for back ends with many groups.
26377 Normally, if the user creates the groups herself, there won't be too
26378 many groups, so @code{nnml} and the like are probably safe.  But for
26379 back ends like @code{nntp}, where the groups have been created by the
26380 server, it is quite likely that there can be many groups.
26381
26382
26383 @item (nnchoke-request-create-group GROUP &optional SERVER)
26384
26385 This function should create an empty group with name @var{group}.
26386
26387 There should be no return data.
26388
26389
26390 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26391
26392 This function should run the expiry process on all articles in the
26393 @var{articles} range (which is currently a simple list of article
26394 numbers.)  It is left up to the back end to decide how old articles
26395 should be before they are removed by this function.  If @var{force} is
26396 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26397 they are.
26398
26399 This function should return a list of articles that it did not/was not
26400 able to delete.
26401
26402 There should be no result data returned.
26403
26404
26405 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26406
26407 This function should move @var{article} (which is a number) from
26408 @var{group} by calling @var{accept-form}.
26409
26410 This function should ready the article in question for moving by
26411 removing any header lines it has added to the article, and generally
26412 should ``tidy up'' the article.  Then it should @code{eval}
26413 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26414 will do the actual copying.  If this @code{eval} returns a
26415 non-@code{nil} value, the article should be removed.
26416
26417 If @var{last} is @code{nil}, that means that there is a high likelihood
26418 that there will be more requests issued shortly, so that allows some
26419 optimizations.
26420
26421 The function should return a cons where the @code{car} is the group name and
26422 the @code{cdr} is the article number that the article was entered as.
26423
26424 There should be no data returned.
26425
26426
26427 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26428
26429 This function takes the current buffer and inserts it into @var{group}.
26430 If @var{last} in @code{nil}, that means that there will be more calls to
26431 this function in short order.
26432
26433 The function should return a cons where the @code{car} is the group name and
26434 the @code{cdr} is the article number that the article was entered as.
26435
26436 The group should exist before the backend is asked to accept the
26437 article for that group.
26438
26439 There should be no data returned.
26440
26441
26442 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26443
26444 This function should remove @var{article} (which is a number) from
26445 @var{group} and insert @var{buffer} there instead.
26446
26447 There should be no data returned.
26448
26449
26450 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26451
26452 This function should delete @var{group}.  If @var{force}, it should
26453 really delete all the articles in the group, and then delete the group
26454 itself.  (If there is such a thing as ``the group itself''.)
26455
26456 There should be no data returned.
26457
26458
26459 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26460
26461 This function should rename @var{group} into @var{new-name}.  All
26462 articles in @var{group} should move to @var{new-name}.
26463
26464 There should be no data returned.
26465
26466 @end table
26467
26468
26469 @node Error Messaging
26470 @subsubsection Error Messaging
26471
26472 @findex nnheader-report
26473 @findex nnheader-get-report
26474 The back ends should use the function @code{nnheader-report} to report
26475 error conditions---they should not raise errors when they aren't able to
26476 perform a request.  The first argument to this function is the back end
26477 symbol, and the rest are interpreted as arguments to @code{format} if
26478 there are multiple of them, or just a string if there is one of them.
26479 This function must always returns @code{nil}.
26480
26481 @lisp
26482 (nnheader-report 'nnchoke "You did something totally bogus")
26483
26484 (nnheader-report 'nnchoke "Could not request group %s" group)
26485 @end lisp
26486
26487 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26488 @code{nil} back from a server, and this function returns the most
26489 recently reported message for the back end in question.  This function
26490 takes one argument---the server symbol.
26491
26492 Internally, these functions access @var{back-end}@code{-status-string},
26493 so the @code{nnchoke} back end will have its error message stored in
26494 @code{nnchoke-status-string}.
26495
26496
26497 @node Writing New Back Ends
26498 @subsubsection Writing New Back Ends
26499
26500 Many back ends are quite similar.  @code{nnml} is just like
26501 @code{nnspool}, but it allows you to edit the articles on the server.
26502 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26503 and it doesn't maintain overview databases.  @code{nndir} is just like
26504 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26505 editing articles.
26506
26507 It would make sense if it were possible to ``inherit'' functions from
26508 back ends when writing new back ends.  And, indeed, you can do that if you
26509 want to.  (You don't have to if you don't want to, of course.)
26510
26511 All the back ends declare their public variables and functions by using a
26512 package called @code{nnoo}.
26513
26514 To inherit functions from other back ends (and allow other back ends to
26515 inherit functions from the current back end), you should use the
26516 following macros:
26517
26518 @table @code
26519
26520 @item nnoo-declare
26521 This macro declares the first parameter to be a child of the subsequent
26522 parameters.  For instance:
26523
26524 @lisp
26525 (nnoo-declare nndir
26526   nnml nnmh)
26527 @end lisp
26528
26529 @code{nndir} has declared here that it intends to inherit functions from
26530 both @code{nnml} and @code{nnmh}.
26531
26532 @item defvoo
26533 This macro is equivalent to @code{defvar}, but registers the variable as
26534 a public server variable.  Most state-oriented variables should be
26535 declared with @code{defvoo} instead of @code{defvar}.
26536
26537 In addition to the normal @code{defvar} parameters, it takes a list of
26538 variables in the parent back ends to map the variable to when executing
26539 a function in those back ends.
26540
26541 @lisp
26542 (defvoo nndir-directory nil
26543   "Where nndir will look for groups."
26544   nnml-current-directory nnmh-current-directory)
26545 @end lisp
26546
26547 This means that @code{nnml-current-directory} will be set to
26548 @code{nndir-directory} when an @code{nnml} function is called on behalf
26549 of @code{nndir}.  (The same with @code{nnmh}.)
26550
26551 @item nnoo-define-basics
26552 This macro defines some common functions that almost all back ends should
26553 have.
26554
26555 @lisp
26556 (nnoo-define-basics nndir)
26557 @end lisp
26558
26559 @item deffoo
26560 This macro is just like @code{defun} and takes the same parameters.  In
26561 addition to doing the normal @code{defun} things, it registers the
26562 function as being public so that other back ends can inherit it.
26563
26564 @item nnoo-map-functions
26565 This macro allows mapping of functions from the current back end to
26566 functions from the parent back ends.
26567
26568 @lisp
26569 (nnoo-map-functions nndir
26570   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26571   (nnmh-request-article 0 nndir-current-group 0 0))
26572 @end lisp
26573
26574 This means that when @code{nndir-retrieve-headers} is called, the first,
26575 third, and fourth parameters will be passed on to
26576 @code{nnml-retrieve-headers}, while the second parameter is set to the
26577 value of @code{nndir-current-group}.
26578
26579 @item nnoo-import
26580 This macro allows importing functions from back ends.  It should be the
26581 last thing in the source file, since it will only define functions that
26582 haven't already been defined.
26583
26584 @lisp
26585 (nnoo-import nndir
26586   (nnmh
26587    nnmh-request-list
26588    nnmh-request-newgroups)
26589   (nnml))
26590 @end lisp
26591
26592 This means that calls to @code{nndir-request-list} should just be passed
26593 on to @code{nnmh-request-list}, while all public functions from
26594 @code{nnml} that haven't been defined in @code{nndir} yet should be
26595 defined now.
26596
26597 @end table
26598
26599 Below is a slightly shortened version of the @code{nndir} back end.
26600
26601 @lisp
26602 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26603 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26604
26605 ;;; @r{Code:}
26606
26607 (require 'nnheader)
26608 (require 'nnmh)
26609 (require 'nnml)
26610 (require 'nnoo)
26611 (eval-when-compile (require 'cl))
26612
26613 (nnoo-declare nndir
26614   nnml nnmh)
26615
26616 (defvoo nndir-directory nil
26617   "Where nndir will look for groups."
26618   nnml-current-directory nnmh-current-directory)
26619
26620 (defvoo nndir-nov-is-evil nil
26621   "*Non-nil means that nndir will never retrieve NOV headers."
26622   nnml-nov-is-evil)
26623
26624 (defvoo nndir-current-group ""
26625   nil
26626   nnml-current-group nnmh-current-group)
26627 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26628 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26629
26630 (defvoo nndir-status-string "" nil nnmh-status-string)
26631 (defconst nndir-version "nndir 1.0")
26632
26633 ;;; @r{Interface functions.}
26634
26635 (nnoo-define-basics nndir)
26636
26637 (deffoo nndir-open-server (server &optional defs)
26638   (setq nndir-directory
26639         (or (cadr (assq 'nndir-directory defs))
26640             server))
26641   (unless (assq 'nndir-directory defs)
26642     (push `(nndir-directory ,server) defs))
26643   (push `(nndir-current-group
26644           ,(file-name-nondirectory
26645             (directory-file-name nndir-directory)))
26646         defs)
26647   (push `(nndir-top-directory
26648           ,(file-name-directory (directory-file-name nndir-directory)))
26649         defs)
26650   (nnoo-change-server 'nndir server defs))
26651
26652 (nnoo-map-functions nndir
26653   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26654   (nnmh-request-article 0 nndir-current-group 0 0)
26655   (nnmh-request-group nndir-current-group 0 0)
26656   (nnmh-close-group nndir-current-group 0))
26657
26658 (nnoo-import nndir
26659   (nnmh
26660    nnmh-status-message
26661    nnmh-request-list
26662    nnmh-request-newgroups))
26663
26664 (provide 'nndir)
26665 @end lisp
26666
26667
26668 @node Hooking New Back Ends Into Gnus
26669 @subsubsection Hooking New Back Ends Into Gnus
26670
26671 @vindex gnus-valid-select-methods
26672 @findex gnus-declare-backend
26673 Having Gnus start using your new back end is rather easy---you just
26674 declare it with the @code{gnus-declare-backend} functions.  This will
26675 enter the back end into the @code{gnus-valid-select-methods} variable.
26676
26677 @code{gnus-declare-backend} takes two parameters---the back end name and
26678 an arbitrary number of @dfn{abilities}.
26679
26680 Here's an example:
26681
26682 @lisp
26683 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26684 @end lisp
26685
26686 The above line would then go in the @file{nnchoke.el} file.
26687
26688 The abilities can be:
26689
26690 @table @code
26691 @item mail
26692 This is a mailish back end---followups should (probably) go via mail.
26693 @item post
26694 This is a newsish back end---followups should (probably) go via news.
26695 @item post-mail
26696 This back end supports both mail and news.
26697 @item none
26698 This is neither a post nor mail back end---it's something completely
26699 different.
26700 @item respool
26701 It supports respooling---or rather, it is able to modify its source
26702 articles and groups.
26703 @item address
26704 The name of the server should be in the virtual server name.  This is
26705 true for almost all back ends.
26706 @item prompt-address
26707 The user should be prompted for an address when doing commands like
26708 @kbd{B} in the group buffer.  This is true for back ends like
26709 @code{nntp}, but not @code{nnmbox}, for instance.
26710 @end table
26711
26712
26713 @node Mail-like Back Ends
26714 @subsubsection Mail-like Back Ends
26715
26716 One of the things that separate the mail back ends from the rest of the
26717 back ends is the heavy dependence by most of the mail back ends on
26718 common functions in @file{nnmail.el}.  For instance, here's the
26719 definition of @code{nnml-request-scan}:
26720
26721 @lisp
26722 (deffoo nnml-request-scan (&optional group server)
26723   (setq nnml-article-file-alist nil)
26724   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
26725 @end lisp
26726
26727 It simply calls @code{nnmail-get-new-mail} with a few parameters,
26728 and @code{nnmail} takes care of all the moving and splitting of the
26729 mail.
26730
26731 This function takes four parameters.
26732
26733 @table @var
26734 @item method
26735 This should be a symbol to designate which back end is responsible for
26736 the call.
26737
26738 @item exit-function
26739 This function should be called after the splitting has been performed.
26740
26741 @item temp-directory
26742 Where the temporary files should be stored.
26743
26744 @item group
26745 This optional argument should be a group name if the splitting is to be
26746 performed for one group only.
26747 @end table
26748
26749 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
26750 save each article.  @var{back-end}@code{-active-number} will be called to
26751 find the article number assigned to this article.
26752
26753 The function also uses the following variables:
26754 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
26755 this back end); and @var{back-end}@code{-group-alist} and
26756 @var{back-end}@code{-active-file} to generate the new active file.
26757 @var{back-end}@code{-group-alist} should be a group-active alist, like
26758 this:
26759
26760 @example
26761 (("a-group" (1 . 10))
26762  ("some-group" (34 . 39)))
26763 @end example
26764
26765
26766 @node Score File Syntax
26767 @subsection Score File Syntax
26768
26769 Score files are meant to be easily parseable, but yet extremely
26770 mallable.   It was decided that something that had the same read syntax
26771 as an Emacs Lisp list would fit that spec.
26772
26773 Here's a typical score file:
26774
26775 @lisp
26776 (("summary"
26777   ("win95" -10000 nil s)
26778   ("Gnus"))
26779  ("from"
26780   ("Lars" -1000))
26781  (mark -100))
26782 @end lisp
26783
26784 BNF definition of a score file:
26785
26786 @example
26787 score-file      = "" / "(" *element ")"
26788 element         = rule / atom
26789 rule            = string-rule / number-rule / date-rule
26790 string-rule     = "(" quote string-header quote space *string-match ")"
26791 number-rule     = "(" quote number-header quote space *number-match ")"
26792 date-rule       = "(" quote date-header quote space *date-match ")"
26793 quote           = <ascii 34>
26794 string-header   = "subject" / "from" / "references" / "message-id" /
26795                   "xref" / "body" / "head" / "all" / "followup"
26796 number-header   = "lines" / "chars"
26797 date-header     = "date"
26798 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
26799                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
26800 score           = "nil" / <integer>
26801 date            = "nil" / <natural number>
26802 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
26803                   "r" / "regex" / "R" / "Regex" /
26804                   "e" / "exact" / "E" / "Exact" /
26805                   "f" / "fuzzy" / "F" / "Fuzzy"
26806 number-match    = "(" <integer> [ "" / [ space score [ "" /
26807                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
26808 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
26809 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
26810                   space date [ "" / [ space date-match-t ] ] ] ] ")"
26811 date-match-t    = "nil" / "at" / "before" / "after"
26812 atom            = "(" [ required-atom / optional-atom ] ")"
26813 required-atom   = mark / expunge / mark-and-expunge / files /
26814                   exclude-files / read-only / touched
26815 optional-atom   = adapt / local / eval
26816 mark            = "mark" space nil-or-number
26817 nil-or-number   = "nil" / <integer>
26818 expunge         = "expunge" space nil-or-number
26819 mark-and-expunge = "mark-and-expunge" space nil-or-number
26820 files           = "files" *[ space <string> ]
26821 exclude-files   = "exclude-files" *[ space <string> ]
26822 read-only       = "read-only" [ space "nil" / space "t" ]
26823 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
26824 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
26825 local           = "local" *[ space "(" <string> space <form> ")" ]
26826 eval            = "eval" space <form>
26827 space           = *[ " " / <TAB> / <NEWLINE> ]
26828 @end example
26829
26830 Any unrecognized elements in a score file should be ignored, but not
26831 discarded.
26832
26833 As you can see, white space is needed, but the type and amount of white
26834 space is irrelevant.  This means that formatting of the score file is
26835 left up to the programmer---if it's simpler to just spew it all out on
26836 one looong line, then that's ok.
26837
26838 The meaning of the various atoms are explained elsewhere in this
26839 manual (@pxref{Score File Format}).
26840
26841
26842 @node Headers
26843 @subsection Headers
26844
26845 Internally Gnus uses a format for storing article headers that
26846 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
26847 almost suspect that the author looked at the @acronym{NOV} specification and
26848 just shamelessly @emph{stole} the entire thing, and one would be right.
26849
26850 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
26851 RFC 1036 to talk about lines in the head of an article (e.g.,
26852 @code{From}).  It is used by many people as a synonym for
26853 ``head''---``the header and the body''.  (That should be avoided, in my
26854 opinion.)  And Gnus uses a format internally that it calls ``header'',
26855 which is what I'm talking about here.  This is a 9-element vector,
26856 basically, with each header (ouch) having one slot.
26857
26858 These slots are, in order: @code{number}, @code{subject}, @code{from},
26859 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
26860 @code{xref}, and @code{extra}.  There are macros for accessing and
26861 setting these slots---they all have predictable names beginning with
26862 @code{mail-header-} and @code{mail-header-set-}, respectively.
26863
26864 All these slots contain strings, except the @code{extra} slot, which
26865 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
26866
26867
26868 @node Ranges
26869 @subsection Ranges
26870
26871 @sc{gnus} introduced a concept that I found so useful that I've started
26872 using it a lot and have elaborated on it greatly.
26873
26874 The question is simple: If you have a large amount of objects that are
26875 identified by numbers (say, articles, to take a @emph{wild} example)
26876 that you want to qualify as being ``included'', a normal sequence isn't
26877 very useful.  (A 200,000 length sequence is a bit long-winded.)
26878
26879 The solution is as simple as the question: You just collapse the
26880 sequence.
26881
26882 @example
26883 (1 2 3 4 5 6 10 11 12)
26884 @end example
26885
26886 is transformed into
26887
26888 @example
26889 ((1 . 6) (10 . 12))
26890 @end example
26891
26892 To avoid having those nasty @samp{(13 . 13)} elements to denote a
26893 lonesome object, a @samp{13} is a valid element:
26894
26895 @example
26896 ((1 . 6) 7 (10 . 12))
26897 @end example
26898
26899 This means that comparing two ranges to find out whether they are equal
26900 is slightly tricky:
26901
26902 @example
26903 ((1 . 5) 7 8 (10 . 12))
26904 @end example
26905
26906 and
26907
26908 @example
26909 ((1 . 5) (7 . 8) (10 . 12))
26910 @end example
26911
26912 are equal.  In fact, any non-descending list is a range:
26913
26914 @example
26915 (1 2 3 4 5)
26916 @end example
26917
26918 is a perfectly valid range, although a pretty long-winded one.  This is
26919 also valid:
26920
26921 @example
26922 (1 . 5)
26923 @end example
26924
26925 and is equal to the previous range.
26926
26927 Here's a BNF definition of ranges.  Of course, one must remember the
26928 semantic requirement that the numbers are non-descending.  (Any number
26929 of repetition of the same number is allowed, but apt to disappear in
26930 range handling.)
26931
26932 @example
26933 range           = simple-range / normal-range
26934 simple-range    = "(" number " . " number ")"
26935 normal-range    = "(" start-contents ")"
26936 contents        = "" / simple-range *[ " " contents ] /
26937                   number *[ " " contents ]
26938 @end example
26939
26940 Gnus currently uses ranges to keep track of read articles and article
26941 marks.  I plan on implementing a number of range operators in C if The
26942 Powers That Be are willing to let me.  (I haven't asked yet, because I
26943 need to do some more thinking on what operators I need to make life
26944 totally range-based without ever having to convert back to normal
26945 sequences.)
26946
26947
26948 @node Group Info
26949 @subsection Group Info
26950
26951 Gnus stores all permanent info on groups in a @dfn{group info} list.
26952 This list is from three to six elements (or more) long and exhaustively
26953 describes the group.
26954
26955 Here are two example group infos; one is a very simple group while the
26956 second is a more complex one:
26957
26958 @example
26959 ("no.group" 5 ((1 . 54324)))
26960
26961 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
26962                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
26963                 (nnml "")
26964                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
26965 @end example
26966
26967 The first element is the @dfn{group name}---as Gnus knows the group,
26968 anyway.  The second element is the @dfn{subscription level}, which
26969 normally is a small integer.  (It can also be the @dfn{rank}, which is a
26970 cons cell where the @code{car} is the level and the @code{cdr} is the
26971 score.)  The third element is a list of ranges of read articles.  The
26972 fourth element is a list of lists of article marks of various kinds.
26973 The fifth element is the select method (or virtual server, if you like).
26974 The sixth element is a list of @dfn{group parameters}, which is what
26975 this section is about.
26976
26977 Any of the last three elements may be missing if they are not required.
26978 In fact, the vast majority of groups will normally only have the first
26979 three elements, which saves quite a lot of cons cells.
26980
26981 Here's a BNF definition of the group info format:
26982
26983 @example
26984 info          = "(" group space ralevel space read
26985                 [ "" / [ space marks-list [ "" / [ space method [ "" /
26986                 space parameters ] ] ] ] ] ")"
26987 group         = quote <string> quote
26988 ralevel       = rank / level
26989 level         = <integer in the range of 1 to inf>
26990 rank          = "(" level "." score ")"
26991 score         = <integer in the range of 1 to inf>
26992 read          = range
26993 marks-lists   = nil / "(" *marks ")"
26994 marks         = "(" <string> range ")"
26995 method        = "(" <string> *elisp-forms ")"
26996 parameters    = "(" *elisp-forms ")"
26997 @end example
26998
26999 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27000 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27001 in pseudo-BNF.
27002
27003 If you have a Gnus info and want to access the elements, Gnus offers a
27004 series of macros for getting/setting these elements.
27005
27006 @table @code
27007 @item gnus-info-group
27008 @itemx gnus-info-set-group
27009 @findex gnus-info-group
27010 @findex gnus-info-set-group
27011 Get/set the group name.
27012
27013 @item gnus-info-rank
27014 @itemx gnus-info-set-rank
27015 @findex gnus-info-rank
27016 @findex gnus-info-set-rank
27017 Get/set the group rank (@pxref{Group Score}).
27018
27019 @item gnus-info-level
27020 @itemx gnus-info-set-level
27021 @findex gnus-info-level
27022 @findex gnus-info-set-level
27023 Get/set the group level.
27024
27025 @item gnus-info-score
27026 @itemx gnus-info-set-score
27027 @findex gnus-info-score
27028 @findex gnus-info-set-score
27029 Get/set the group score (@pxref{Group Score}).
27030
27031 @item gnus-info-read
27032 @itemx gnus-info-set-read
27033 @findex gnus-info-read
27034 @findex gnus-info-set-read
27035 Get/set the ranges of read articles.
27036
27037 @item gnus-info-marks
27038 @itemx gnus-info-set-marks
27039 @findex gnus-info-marks
27040 @findex gnus-info-set-marks
27041 Get/set the lists of ranges of marked articles.
27042
27043 @item gnus-info-method
27044 @itemx gnus-info-set-method
27045 @findex gnus-info-method
27046 @findex gnus-info-set-method
27047 Get/set the group select method.
27048
27049 @item gnus-info-params
27050 @itemx gnus-info-set-params
27051 @findex gnus-info-params
27052 @findex gnus-info-set-params
27053 Get/set the group parameters.
27054 @end table
27055
27056 All the getter functions take one parameter---the info list.  The setter
27057 functions take two parameters---the info list and the new value.
27058
27059 The last three elements in the group info aren't mandatory, so it may be
27060 necessary to extend the group info before setting the element.  If this
27061 is necessary, you can just pass on a non-@code{nil} third parameter to
27062 the three final setter functions to have this happen automatically.
27063
27064
27065 @node Extended Interactive
27066 @subsection Extended Interactive
27067 @cindex interactive
27068 @findex gnus-interactive
27069
27070 Gnus extends the standard Emacs @code{interactive} specification
27071 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27072 Prefixes}).  Here's an example of how this is used:
27073
27074 @lisp
27075 (defun gnus-summary-increase-score (&optional score symp)
27076   (interactive (gnus-interactive "P\ny"))
27077   ...
27078   )
27079 @end lisp
27080
27081 The best thing to do would have been to implement
27082 @code{gnus-interactive} as a macro which would have returned an
27083 @code{interactive} form, but this isn't possible since Emacs checks
27084 whether a function is interactive or not by simply doing an @code{assq}
27085 on the lambda form.  So, instead we have @code{gnus-interactive}
27086 function that takes a string and returns values that are usable to
27087 @code{interactive}.
27088
27089 This function accepts (almost) all normal @code{interactive} specs, but
27090 adds a few more.
27091
27092 @table @samp
27093 @item y
27094 @vindex gnus-current-prefix-symbol
27095 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27096 variable.
27097
27098 @item Y
27099 @vindex gnus-current-prefix-symbols
27100 A list of the current symbolic prefixes---the
27101 @code{gnus-current-prefix-symbol} variable.
27102
27103 @item A
27104 The current article number---the @code{gnus-summary-article-number}
27105 function.
27106
27107 @item H
27108 The current article header---the @code{gnus-summary-article-header}
27109 function.
27110
27111 @item g
27112 The current group name---the @code{gnus-group-group-name}
27113 function.
27114
27115 @end table
27116
27117
27118 @node Emacs/XEmacs Code
27119 @subsection Emacs/XEmacs Code
27120 @cindex XEmacs
27121 @cindex Emacsen
27122
27123 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27124 platforms must be the primary one.  I chose Emacs.  Not because I don't
27125 like XEmacs or Mule, but because it comes first alphabetically.
27126
27127 This means that Gnus will byte-compile under Emacs with nary a warning,
27128 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27129 As I use byte-compilation warnings to help me root out trivial errors in
27130 Gnus, that's very useful.
27131
27132 I've also consistently used Emacs function interfaces, but have used
27133 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27134 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27135 function.  I then define a function called @code{gnus-run-at-time} that
27136 takes the same parameters as the Emacs @code{run-at-time}.  When running
27137 Gnus under Emacs, the former function is just an alias for the latter.
27138 However, when running under XEmacs, the former is an alias for the
27139 following function:
27140
27141 @lisp
27142 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27143   (start-itimer
27144    "gnus-run-at-time"
27145    `(lambda ()
27146       (,function ,@@args))
27147    time repeat))
27148 @end lisp
27149
27150 This sort of thing has been done for bunches of functions.  Gnus does
27151 not redefine any native Emacs functions while running under XEmacs---it
27152 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27153 all over.
27154
27155 In the cases where the XEmacs function interface was obviously cleaner,
27156 I used it instead.  For example @code{gnus-region-active-p} is an alias
27157 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27158
27159 Of course, I could have chosen XEmacs as my native platform and done
27160 mapping functions the other way around.  But I didn't.  The performance
27161 hit these indirections impose on Gnus under XEmacs should be slight.
27162
27163
27164 @node Various File Formats
27165 @subsection Various File Formats
27166
27167 @menu
27168 * Active File Format::          Information on articles and groups available.
27169 * Newsgroups File Format::      Group descriptions.
27170 @end menu
27171
27172
27173 @node Active File Format
27174 @subsubsection Active File Format
27175
27176 The active file lists all groups available on the server in
27177 question.  It also lists the highest and lowest current article numbers
27178 in each group.
27179
27180 Here's an excerpt from a typical active file:
27181
27182 @example
27183 soc.motss 296030 293865 y
27184 alt.binaries.pictures.fractals 3922 3913 n
27185 comp.sources.unix 1605 1593 m
27186 comp.binaries.ibm.pc 5097 5089 y
27187 no.general 1000 900 y
27188 @end example
27189
27190 Here's a pseudo-BNF definition of this file:
27191
27192 @example
27193 active      = *group-line
27194 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27195 group       = <non-white-space string>
27196 spc         = " "
27197 high-number = <non-negative integer>
27198 low-number  = <positive integer>
27199 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27200 @end example
27201
27202 For a full description of this file, see the manual pages for
27203 @samp{innd}, in particular @samp{active(5)}.
27204
27205
27206 @node Newsgroups File Format
27207 @subsubsection Newsgroups File Format
27208
27209 The newsgroups file lists groups along with their descriptions.  Not all
27210 groups on the server have to be listed,  and not all groups in the file
27211 have to exist on the server.  The file is meant purely as information to
27212 the user.
27213
27214 The format is quite simple; a group name, a tab, and the description.
27215 Here's the definition:
27216
27217 @example
27218 newsgroups    = *line
27219 line          = group tab description <NEWLINE>
27220 group         = <non-white-space string>
27221 tab           = <TAB>
27222 description   = <string>
27223 @end example
27224
27225
27226 @page
27227 @node Emacs for Heathens
27228 @section Emacs for Heathens
27229
27230 Believe it or not, but some people who use Gnus haven't really used
27231 Emacs much before they embarked on their journey on the Gnus Love Boat.
27232 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27233 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27234 is a regexp that is used for matching on the group name'' are magical
27235 phrases with little or no meaning, then this appendix is for you.  If
27236 you are already familiar with Emacs, just ignore this and go fondle your
27237 cat instead.
27238
27239 @menu
27240 * Keystrokes::                  Entering text and executing commands.
27241 * Emacs Lisp::                  The built-in Emacs programming language.
27242 @end menu
27243
27244
27245 @node Keystrokes
27246 @subsection Keystrokes
27247
27248 @itemize @bullet
27249 @item
27250 Q: What is an experienced Emacs user?
27251
27252 @item
27253 A: A person who wishes that the terminal had pedals.
27254 @end itemize
27255
27256 Yes, when you use Emacs, you are apt to use the control key, the shift
27257 key and the meta key a lot.  This is very annoying to some people
27258 (notably @code{vi}le users), and the rest of us just love the hell out
27259 of it.  Just give up and submit.  Emacs really does stand for
27260 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27261 may have heard from other disreputable sources (like the Emacs author).
27262
27263 The shift keys are normally located near your pinky fingers, and are
27264 normally used to get capital letters and stuff.  You probably use it all
27265 the time.  The control key is normally marked ``CTRL'' or something like
27266 that.  The meta key is, funnily enough, never marked as such on any
27267 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27268 which is the meta key on this keyboard.  It's usually located somewhere
27269 to the left hand side of the keyboard, usually on the bottom row.
27270
27271 Now, us Emacs people don't say ``press the meta-control-m key'',
27272 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27273 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27274 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27275 down the control key, and hold it down while you press @kbd{k}''.
27276 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27277 the control key and then press @kbd{k}''.  Simple, ay?
27278
27279 This is somewhat complicated by the fact that not all keyboards have a
27280 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27281 means ``press escape, release escape, press @kbd{k}''.  That's much more
27282 work than if you have a meta key, so if that's the case, I respectfully
27283 suggest you get a real keyboard with a meta key.  You can't live without
27284 it.
27285
27286
27287
27288 @node Emacs Lisp
27289 @subsection Emacs Lisp
27290
27291 Emacs is the King of Editors because it's really a Lisp interpreter.
27292 Each and every key you tap runs some Emacs Lisp code snippet, and since
27293 Emacs Lisp is an interpreted language, that means that you can configure
27294 any key to run any arbitrary code.  You just, like, do it.
27295
27296 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27297 functions.  (These are byte-compiled for speed, but it's still
27298 interpreted.)  If you decide that you don't like the way Gnus does
27299 certain things, it's trivial to have it do something a different way.
27300 (Well, at least if you know how to write Lisp code.)  However, that's
27301 beyond the scope of this manual, so we are simply going to talk about
27302 some common constructs that you normally use in your @file{.emacs} file
27303 to customize Gnus.
27304
27305 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27306 write the following:
27307
27308 @lisp
27309 (setq gnus-florgbnize 4)
27310 @end lisp
27311
27312 This function (really ``special form'') @code{setq} is the one that can
27313 set a variable to some value.  This is really all you need to know.  Now
27314 you can go and fill your @file{.emacs} file with lots of these to change
27315 how Gnus works.
27316
27317 If you have put that thing in your @file{.emacs} file, it will be read
27318 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27319 start Emacs.  If you want to change the variable right away, simply say
27320 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27321 previous ``form'', which is a simple @code{setq} statement here.
27322
27323 Go ahead---just try it, if you're located at your Emacs.  After you
27324 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27325 is the return value of the form you @code{eval}ed.
27326
27327 Some pitfalls:
27328
27329 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27330 that means:
27331
27332 @lisp
27333 (setq gnus-read-active-file 'some)
27334 @end lisp
27335
27336 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27337 @samp{nntp.ifi.uio.no}'', that means:
27338
27339 @lisp
27340 (setq gnus-nntp-server "nntp.ifi.uio.no")
27341 @end lisp
27342
27343 So be careful not to mix up strings (the latter) with symbols (the
27344 former).  The manual is unambiguous, but it can be confusing.
27345
27346 @page
27347 @include gnus-faq.texi
27348
27349 @node Index
27350 @chapter Index
27351 @printindex cp
27352
27353 @node Key Index
27354 @chapter Key Index
27355 @printindex ky
27356
27357 @summarycontents
27358 @contents
27359 @bye
27360
27361 @iftex
27362 @iflatex
27363 \end{document}
27364 @end iflatex
27365 @end iftex
27366
27367 @c Local Variables:
27368 @c mode: texinfo
27369 @c coding: iso-8859-1
27370 @c End: