(Sorting the Summary Buffer): Index.
[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}{Gnus v5.10.2}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
57 \newcommand{\gnusenv}[1]{\gnustt{#1}}
58 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
59 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
60 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
61 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
63 \newcommand{\gnusdfn}[1]{\textit{#1}}
64 \newcommand{\gnusi}[1]{\textit{#1}}
65 \newcommand{\gnusr}[1]{\textrm{#1}}
66 \newcommand{\gnusstrong}[1]{\textbf{#1}}
67 \newcommand{\gnusemph}[1]{\textit{#1}}
68 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
69 \newcommand{\gnussc}[1]{\textsc{#1}}
70 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
71 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
72 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
73 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
74 \newcommand{\gnusacronym}[1]{\textsc{#1}}
75 \newcommand{\gnusemail}[1]{\textit{#1}}
76
77 \newcommand{\gnusbullet}{{${\bullet}$}}
78 \newcommand{\gnusdollar}{\$}
79 \newcommand{\gnusampersand}{\&}
80 \newcommand{\gnuspercent}{\%}
81 \newcommand{\gnushash}{\#}
82 \newcommand{\gnushat}{\symbol{"5E}}
83 \newcommand{\gnusunderline}{\symbol{"5F}}
84 \newcommand{\gnusnot}{$\neg$}
85 \newcommand{\gnustilde}{\symbol{"7E}}
86 \newcommand{\gnusless}{{$<$}}
87 \newcommand{\gnusgreater}{{$>$}}
88 \newcommand{\gnusbraceleft}{{$>$}}
89 \newcommand{\gnusbraceright}{{$>$}}
90
91 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
92 \newcommand{\gnusinteresting}{
93 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
94 }
95
96 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
97
98 \newcommand{\gnuspagechapter}[1]{
99 {\mbox{}}
100 }
101
102 \newdimen{\gnusdimen}
103 \gnusdimen 0pt
104
105 \newcommand{\gnuschapter}[2]{
106 \gnuscleardoublepage
107 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
108 \chapter{#2}
109 \renewcommand{\gnussectionname}{}
110 \renewcommand{\gnuschaptername}{#2}
111 \thispagestyle{empty}
112 \hspace*{-2cm}
113 \begin{picture}(500,500)(0,0)
114 \put(480,350){\makebox(0,0)[tr]{#1}}
115 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
116 \end{picture}
117 \clearpage
118 }
119
120 \newcommand{\gnusfigure}[3]{
121 \begin{figure}
122 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
123 #3
124 \end{picture}
125 \caption{#1}
126 \end{figure}
127 }
128
129 \newcommand{\gnusicon}[1]{
130 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
131 }
132
133 \newcommand{\gnuspicon}[1]{
134 \margindex{\epsfig{figure=#1,width=2cm}}
135 }
136
137 \newcommand{\gnusxface}[2]{
138 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
139 }
140
141 \newcommand{\gnussmiley}[2]{
142 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
143 }
144
145 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
146
147 \newcommand{\gnussection}[1]{
148 \renewcommand{\gnussectionname}{#1}
149 \section{#1}
150 }
151
152 \newenvironment{codelist}%
153 {\begin{list}{}{
154 }
155 }{\end{list}}
156
157 \newenvironment{kbdlist}%
158 {\begin{list}{}{
159 \labelwidth=0cm
160 }
161 }{\end{list}}
162
163 \newenvironment{dfnlist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{stronglist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{samplist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{varlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newenvironment{emphlist}%
184 {\begin{list}{}{
185 }
186 }{\end{list}}
187
188 \newlength\gnusheadtextwidth
189 \setlength{\gnusheadtextwidth}{\headtextwidth}
190 \addtolength{\gnusheadtextwidth}{1cm}
191
192 \newpagestyle{gnuspreamble}%
193 {
194 {
195 \ifodd\count0
196 {
197 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
198 }
199 \else
200 {
201 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
202 }
203 }
204 \fi
205 }
206 }
207 {
208 \ifodd\count0
209 \mbox{} \hfill
210 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
211 \else
212 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
213 \hfill \mbox{}
214 \fi
215 }
216
217 \newpagestyle{gnusindex}%
218 {
219 {
220 \ifodd\count0
221 {
222 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
223 }
224 \else
225 {
226 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
227 }
228 \fi
229 }
230 }
231 {
232 \ifodd\count0
233 \mbox{} \hfill
234 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
235 \else
236 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
237 \hfill \mbox{}
238 \fi
239 }
240
241 \newpagestyle{gnus}%
242 {
243 {
244 \ifodd\count0
245 {
246 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
247 }
248 \else
249 {
250 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
251 }
252 \fi
253 }
254 }
255 {
256 \ifodd\count0
257 \mbox{} \hfill
258 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
259 \else
260 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
261 \hfill \mbox{}
262 \fi
263 }
264
265 \pagenumbering{roman}
266 \pagestyle{gnuspreamble}
267
268 @end iflatex
269 @end iftex
270
271 @iftex
272 @iflatex
273 \begin{titlepage}
274 {
275
276 %\addtolength{\oddsidemargin}{-5cm}
277 %\addtolength{\evensidemargin}{-5cm}
278 \parindent=0cm
279 \addtolength{\textheight}{2cm}
280
281 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
282 \rule{15cm}{1mm}\\
283 \vfill
284 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
285 \vfill
286 \rule{15cm}{1mm}\\
287 \gnusauthor{by Lars Magne Ingebrigtsen}
288 \newpage
289 }
290
291 \mbox{}
292 \vfill
293
294 \thispagestyle{empty}
295
296 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
297 2002, 2003
298 Free Software Foundation, Inc.
299
300
301 Permission is granted to copy, distribute and/or modify this document
302 under the terms of the GNU Free Documentation License, Version 1.1 or
303 any later version published by the Free Software Foundation; with no
304 Invariant Sections, with the Front-Cover texts being ``A GNU
305 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
306 license is included in the section entitled ``GNU Free Documentation
307 License'' in the Emacs manual.
308
309 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
310 this GNU Manual, like GNU software.  Copies published by the Free
311 Software Foundation raise funds for GNU development.''
312
313 This document is part of a collection distributed under the GNU Free
314 Documentation License.  If you want to distribute this document
315 separately from the collection, you can do so by adding a copy of the
316 license to the document, as described in section 6 of the license.
317 \newpage
318 \end{titlepage}
319 @end iflatex
320 @end iftex
321
322 @ifnottex
323
324 This file documents Gnus, the GNU Emacs newsreader.
325
326 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
327         Free Software Foundation, Inc.
328
329 Permission is granted to copy, distribute and/or modify this document
330 under the terms of the GNU Free Documentation License, Version 1.1 or
331 any later version published by the Free Software Foundation; with the
332 Invariant Sections being none, with the Front-Cover texts being ``A GNU
333 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
334 license is included in the section entitled ``GNU Free Documentation
335 License'' in the Emacs manual.
336
337 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
338 this GNU Manual, like GNU software.  Copies published by the Free
339 Software Foundation raise funds for GNU development.''
340
341 This document is part of a collection distributed under the GNU Free
342 Documentation License.  If you want to distribute this document
343 separately from the collection, you can do so by adding a copy of the
344 license to the document, as described in section 6 of the license.
345 @end ifnottex
346
347 @tex
348
349 @titlepage
350 @title Gnus Manual
351
352 @author by Lars Magne Ingebrigtsen
353 @page
354
355 @vskip 0pt plus 1filll
356 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
357 2002, 2003
358         Free Software Foundation, Inc.
359
360 Permission is granted to copy, distribute and/or modify this document
361 under the terms of the GNU Free Documentation License, Version 1.1 or
362 any later version published by the Free Software Foundation; with no
363 Invariant Sections, with the Front-Cover texts being ``A GNU
364 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
365 license is included in the section entitled ``GNU Free Documentation
366 License'' in the Emacs manual.
367
368 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
369 this GNU Manual, like GNU software.  Copies published by the Free
370 Software Foundation raise funds for GNU development.''
371
372 This document is part of a collection distributed under the GNU Free
373 Documentation License.  If you want to distribute this document
374 separately from the collection, you can do so by adding a copy of the
375 license to the document, as described in section 6 of the license.
376
377 @end titlepage
378 @page
379
380 @end tex
381
382
383 @node Top
384 @top The Gnus Newsreader
385
386 @ifinfo
387
388 You can read news (and mail) from within Emacs by using Gnus.  The news
389 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
390 spool or your mbox file.  All at the same time, if you want to push your
391 luck.
392
393 This manual corresponds to Gnus v5.10.2.
394
395 @end ifinfo
396
397 @iftex
398
399 @iflatex
400 \tableofcontents
401 \gnuscleardoublepage
402 @end iflatex
403
404 Gnus is the advanced, self-documenting, customizable, extensible
405 unreal-time newsreader for GNU Emacs.
406
407 Oops.  That sounds oddly familiar, so let's start over again to avoid
408 being accused of plagiarism:
409
410 Gnus is a message-reading laboratory.  It will let you look at just
411 about anything as if it were a newsgroup.  You can read mail with it,
412 you can browse directories with it, you can @code{ftp} with it---you
413 can even read news with it!
414
415 Gnus tries to empower people who read news the same way Emacs empowers
416 people who edit text.  Gnus sets no limits to what the user should be
417 allowed to do.  Users are encouraged to extend Gnus to make it behave
418 like they want it to behave.  A program should not control people;
419 people should be empowered to do what they want by using (or abusing)
420 the program.
421
422 @end iftex
423
424 @menu
425 * Starting Up::                 Finding news can be a pain.
426 * Group Buffer::                Selecting, subscribing and killing groups.
427 * Summary Buffer::              Reading, saving and posting articles.
428 * Article Buffer::              Displaying and handling articles.
429 * Composing Messages::          Information on sending mail and news.
430 * Select Methods::              Gnus reads all messages from various select methods.
431 * Scoring::                     Assigning values to articles.
432 * Various::                     General purpose settings.
433 * The End::                     Farewell and goodbye.
434 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
435 * Index::                       Variable, function and concept index.
436 * Key Index::                   Key Index.
437
438 Other related manuals
439
440 * Message:(message).            Composing messages.
441 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
442 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
443 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
444
445 @detailmenu
446  --- The Detailed Node Listing ---
447
448 Starting Gnus
449
450 * Finding the News::            Choosing a method for getting news.
451 * The First Time::              What does Gnus do the first time you start it?
452 * The Server is Down::          How can I read my mail then?
453 * Slave Gnusae::                You can have more than one Gnus active at a time.
454 * Fetching a Group::            Starting Gnus just to read a group.
455 * New Groups::                  What is Gnus supposed to do with new groups?
456 * Changing Servers::            You may want to move from one server to another.
457 * Startup Files::               Those pesky startup files---@file{.newsrc}.
458 * Auto Save::                   Recovering from a crash.
459 * The Active File::             Reading the active file over a slow line Takes Time.
460 * Startup Variables::           Other variables you might change.
461
462 New Groups
463
464 * Checking New Groups::         Determining what groups are new.
465 * Subscription Methods::        What Gnus should do with new groups.
466 * Filtering New Groups::        Making Gnus ignore certain new groups.
467
468 Group Buffer
469
470 * Group Buffer Format::         Information listed and how you can change it.
471 * Group Maneuvering::           Commands for moving in the group buffer.
472 * Selecting a Group::           Actually reading news.
473 * Subscription Commands::       Unsubscribing, killing, subscribing.
474 * Group Data::                  Changing the info for a group.
475 * Group Levels::                Levels? What are those, then?
476 * Group Score::                 A mechanism for finding out what groups you like.
477 * Marking Groups::              You can mark groups for later processing.
478 * Foreign Groups::              Creating and editing groups.
479 * Group Parameters::            Each group may have different parameters set.
480 * Listing Groups::              Gnus can list various subsets of the groups.
481 * Sorting Groups::              Re-arrange the group order.
482 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
483 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
484 * Exiting Gnus::                Stop reading news and get some work done.
485 * Group Topics::                A folding group mode divided into topics.
486 * Misc Group Stuff::            Other stuff that you can to do.
487
488 Group Buffer Format
489
490 * Group Line Specification::    Deciding how the group buffer is to look.
491 * Group Mode Line Specification::  The group buffer mode line.
492 * Group Highlighting::          Having nice colors in the group buffer.
493
494 Group Topics
495
496 * Topic Commands::              Interactive E-Z commands.
497 * Topic Variables::             How to customize the topics the Lisp Way.
498 * Topic Sorting::               Sorting each topic individually.
499 * Topic Topology::              A map of the world.
500 * Topic Parameters::            Parameters that apply to all groups in a topic.
501
502 Misc Group Stuff
503
504 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
505 * Group Information::           Information and help on groups and Gnus.
506 * Group Timestamp::             Making Gnus keep track of when you last read a group.
507 * File Commands::               Reading and writing the Gnus files.
508 * Sieve Commands::              Managing Sieve scripts.
509
510 Summary Buffer
511
512 * Summary Buffer Format::       Deciding how the summary buffer is to look.
513 * Summary Maneuvering::         Moving around the summary buffer.
514 * Choosing Articles::           Reading articles.
515 * Paging the Article::          Scrolling the current article.
516 * Reply Followup and Post::     Posting articles.
517 * Delayed Articles::            Send articles at a later time.
518 * Marking Articles::            Marking articles as read, expirable, etc.
519 * Limiting::                    You can limit the summary buffer.
520 * Threading::                   How threads are made.
521 * Sorting the Summary Buffer::  How articles and threads are sorted.
522 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
523 * Article Caching::             You may store articles in a cache.
524 * Persistent Articles::         Making articles expiry-resistant.
525 * Article Backlog::             Having already read articles hang around.
526 * Saving Articles::             Ways of customizing article saving.
527 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
528 * Article Treatment::           The article buffer can be mangled at will.
529 * MIME Commands::               Doing MIMEy things with the articles.
530 * Charsets::                    Character set issues.
531 * Article Commands::            Doing various things with the article buffer.
532 * Summary Sorting::             Sorting the summary buffer in various ways.
533 * Finding the Parent::          No child support? Get the parent.
534 * Alternative Approaches::      Reading using non-default summaries.
535 * Tree Display::                A more visual display of threads.
536 * Mail Group Commands::         Some commands can only be used in mail groups.
537 * Various Summary Stuff::       What didn't fit anywhere else.
538 * Exiting the Summary Buffer::  Returning to the Group buffer,
539                                 or reselecting the current group.
540 * Crosspost Handling::          How crossposted articles are dealt with.
541 * Duplicate Suppression::       An alternative when crosspost handling fails.
542 * Security::                    Decrypt and Verify.
543 * Mailing List::                Mailing list minor mode.
544
545 Summary Buffer Format
546
547 * Summary Buffer Lines::        You can specify how summary lines should look.
548 * To From Newsgroups::          How to not display your own name.
549 * Summary Buffer Mode Line::    You can say how the mode line should look.
550 * Summary Highlighting::        Making the summary buffer all pretty and nice.
551
552 Choosing Articles
553
554 * Choosing Commands::           Commands for choosing articles.
555 * Choosing Variables::          Variables that influence these commands.
556
557 Reply, Followup and Post
558
559 * Summary Mail Commands::       Sending mail.
560 * Summary Post Commands::       Sending news.
561 * Summary Message Commands::    Other Message-related commands.
562 * Canceling and Superseding::
563
564 Marking Articles
565
566 * Unread Articles::             Marks for unread articles.
567 * Read Articles::               Marks for read articles.
568 * Other Marks::                 Marks that do not affect readedness.
569 * Setting Marks::
570 * Generic Marking Commands::
571 * Setting Process Marks::
572
573 Marking Articles
574
575 * Setting Marks::             How to set and remove marks.
576 * Generic Marking Commands::  How to customize the marking.
577 * Setting Process Marks::     How to mark articles for later processing.
578
579 Threading
580
581 * Customizing Threading::       Variables you can change to affect the threading.
582 * Thread Commands::             Thread based commands in the summary buffer.
583
584 Customizing Threading
585
586 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
587 * Filling In Threads::          Making the threads displayed look fuller.
588 * More Threading::              Even more variables for fiddling with threads.
589 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
590
591 Decoding Articles
592
593 * Uuencoded Articles::          Uudecode articles.
594 * Shell Archives::              Unshar articles.
595 * PostScript Files::            Split PostScript.
596 * Other Files::                 Plain save and binhex.
597 * Decoding Variables::          Variables for a happy decoding.
598 * Viewing Files::               You want to look at the result of the decoding?
599
600 Decoding Variables
601
602 * Rule Variables::              Variables that say how a file is to be viewed.
603 * Other Decode Variables::      Other decode variables.
604 * Uuencoding and Posting::      Variables for customizing uuencoding.
605
606 Article Treatment
607
608 * Article Highlighting::        You want to make the article look like fruit salad.
609 * Article Fontisizing::         Making emphasized text look nice.
610 * Article Hiding::              You also want to make certain info go away.
611 * Article Washing::             Lots of way-neat functions to make life better.
612 * Article Header::              Doing various header transformations.
613 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
614 * Article Button Levels::       Controlling appearance of buttons.
615 * Article Date::                Grumble, UT!
616 * Article Display::             Display various stuff---X-Face, Picons, Smileys
617 * Article Signature::           What is a signature?
618 * Article Miscellanea::         Various other stuff.
619
620 Alternative Approaches
621
622 * Pick and Read::               First mark articles and then read them.
623 * Binary Groups::               Auto-decode all articles.
624
625 Various Summary Stuff
626
627 * Summary Group Information::   Information oriented commands.
628 * Searching for Articles::      Multiple article commands.
629 * Summary Generation Commands::
630 * Really Various Summary Commands::  Those pesky non-conformant commands.
631
632 Article Buffer
633
634 * Hiding Headers::              Deciding what headers should be displayed.
635 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
636 * Customizing Articles::        Tailoring the look of the articles.
637 * Article Keymap::              Keystrokes available in the article buffer.
638 * Misc Article::                Other stuff.
639
640 Composing Messages
641
642 * Mail::                        Mailing and replying.
643 * Posting Server::              What server should you post and mail via?
644 * Mail and Post::               Mailing and posting at the same time.
645 * Archived Messages::           Where Gnus stores the messages you've sent.
646 * Posting Styles::              An easier way to specify who you are.
647 * Drafts::                      Postponing messages and rejected messages.
648 * Rejected Articles::           What happens if the server doesn't like your article?
649 * Signing and encrypting::      How to compose secure messages.
650
651 Select Methods
652
653 * Server Buffer::               Making and editing virtual servers.
654 * Getting News::                Reading USENET news with Gnus.
655 * Getting Mail::                Reading your personal mail with Gnus.
656 * Browsing the Web::            Getting messages from a plethora of Web sources.
657 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
658 * Other Sources::               Reading directories, files, SOUP packets.
659 * Combined Groups::             Combining groups into one group.
660 * Gnus Unplugged::              Reading news and mail offline.
661
662 Server Buffer
663
664 * Server Buffer Format::        You can customize the look of this buffer.
665 * Server Commands::             Commands to manipulate servers.
666 * Example Methods::             Examples server specifications.
667 * Creating a Virtual Server::   An example session.
668 * Server Variables::            Which variables to set.
669 * Servers and Methods::         You can use server names as select methods.
670 * Unavailable Servers::         Some servers you try to contact may be down.
671
672 Getting News
673
674 * NNTP::                        Reading news from an @acronym{NNTP} server.
675 * News Spool::                  Reading news from the local spool.
676
677 @acronym{NNTP}
678
679 * Direct Functions::            Connecting directly to the server.
680 * Indirect Functions::          Connecting indirectly to the server.
681 * Common Variables::            Understood by several connection functions.
682
683 Getting Mail
684
685 * Mail in a Newsreader::        Important introductory notes.
686 * Getting Started Reading Mail::  A simple cookbook example.
687 * Splitting Mail::              How to create mail groups.
688 * Mail Sources::                How to tell Gnus where to get mail from.
689 * Mail Back End Variables::     Variables for customizing mail handling.
690 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
691 * Group Mail Splitting::        Use group customize to drive mail splitting.
692 * Incorporating Old Mail::      What about the old mail you have?
693 * Expiring Mail::               Getting rid of unwanted mail.
694 * Washing Mail::                Removing cruft from the mail you get.
695 * Duplicates::                  Dealing with duplicated mail.
696 * Not Reading Mail::            Using mail back ends for reading other files.
697 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
698
699 Mail Sources
700
701 * Mail Source Specifiers::      How to specify what a mail source is.
702 * Mail Source Customization::   Some variables that influence things.
703 * Fetching Mail::               Using the mail source specifiers.
704
705 Choosing a Mail Back End
706
707 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
708 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
709 * Mail Spool::                  Store your mail in a private spool?
710 * MH Spool::                    An mhspool-like back end.
711 * Maildir::                     Another one-file-per-message format.
712 * Mail Folders::                Having one file for each group.
713 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
714
715 Browsing the Web
716
717 * Archiving Mail::
718 * Web Searches::                Creating groups from articles that match a string.
719 * Slashdot::                    Reading the Slashdot comments.
720 * Ultimate::                    The Ultimate Bulletin Board systems.
721 * Web Archive::                 Reading mailing list archived on web.
722 * RSS::                         Reading RDF site summary.
723 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
724
725 @acronym{IMAP}
726
727 * Splitting in IMAP::           Splitting mail with nnimap.
728 * Expiring in IMAP::            Expiring mail with nnimap.
729 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
730 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
731 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
732
733 Other Sources
734
735 * Directory Groups::            You can read a directory as if it was a newsgroup.
736 * Anything Groups::             Dired?  Who needs dired?
737 * Document Groups::             Single files can be the basis of a group.
738 * SOUP::                        Reading @sc{soup} packets ``offline''.
739 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
740
741 Document Groups
742
743 * Document Server Internals::   How to add your own document types.
744
745 SOUP
746
747 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
748 * SOUP Groups::                 A back end for reading @sc{soup} packets.
749 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
750
751 Combined Groups
752
753 * Virtual Groups::              Combining articles from many groups.
754 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
755
756 Gnus Unplugged
757
758 * Agent Basics::                How it all is supposed to work.
759 * Agent Categories::            How to tell the Gnus Agent what to download.
760 * Agent Commands::              New commands for all the buffers.
761 * Agent Visuals::               Ways that the agent may effect your summary buffer.
762 * Agent as Cache::              The Agent is a big cache too.
763 * Agent Expiry::                How to make old articles go away.
764 * Agent Regeneration::          How to recover from lost connections and other accidents.
765 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
766 * Outgoing Messages::           What happens when you post/mail something?
767 * Agent Variables::             Customizing is fun.
768 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
769 * Batching Agents::             How to fetch news from a @code{cron} job.
770 * Agent Caveats::               What you think it'll do and what it does.
771
772 Agent Categories
773
774 * Category Syntax::             What a category looks like.
775 * Category Buffer::             A buffer for maintaining categories.
776 * Category Variables::          Customize'r'Us.
777
778 Agent Commands
779
780 * Group Agent Commands::        Configure groups and fetch their contents.
781 * Summary Agent Commands::      Manually select then fetch specific articles.
782 * Server Agent Commands::       Select the servers that are supported by the agent.
783
784 Scoring
785
786 * Summary Score Commands::      Adding score entries for the current group.
787 * Group Score Commands::        General score commands.
788 * Score Variables::             Customize your scoring.  (My, what terminology).
789 * Score File Format::           What a score file may contain.
790 * Score File Editing::          You can edit score files by hand as well.
791 * Adaptive Scoring::            Big Sister Gnus knows what you read.
792 * Home Score File::             How to say where new score entries are to go.
793 * Followups To Yourself::       Having Gnus notice when people answer you.
794 * Scoring On Other Headers::    Scoring on non-standard headers.
795 * Scoring Tips::                How to score effectively.
796 * Reverse Scoring::             That problem child of old is not problem.
797 * Global Score Files::          Earth-spanning, ear-splitting score files.
798 * Kill Files::                  They are still here, but they can be ignored.
799 * Converting Kill Files::       Translating kill files to score files.
800 * GroupLens::                   Getting predictions on what you like to read.
801 * Advanced Scoring::            Using logical expressions to build score rules.
802 * Score Decays::                It can be useful to let scores wither away.
803
804 GroupLens
805
806 * Using GroupLens::             How to make Gnus use GroupLens.
807 * Rating Articles::             Letting GroupLens know how you rate articles.
808 * Displaying Predictions::      Displaying predictions given by GroupLens.
809 * GroupLens Variables::         Customizing GroupLens.
810
811 Advanced Scoring
812
813 * Advanced Scoring Syntax::     A definition.
814 * Advanced Scoring Examples::   What they look like.
815 * Advanced Scoring Tips::       Getting the most out of it.
816
817 Various
818
819 * Process/Prefix::              A convention used by many treatment commands.
820 * Interactive::                 Making Gnus ask you many questions.
821 * Symbolic Prefixes::           How to supply some Gnus functions with options.
822 * Formatting Variables::        You can specify what buffers should look like.
823 * Window Layout::               Configuring the Gnus buffer windows.
824 * Faces and Fonts::             How to change how faces look.
825 * Compilation::                 How to speed Gnus up.
826 * Mode Lines::                  Displaying information in the mode lines.
827 * Highlighting and Menus::      Making buffers look all nice and cozy.
828 * Buttons::                     Get tendinitis in ten easy steps!
829 * Daemons::                     Gnus can do things behind your back.
830 * NoCeM::                       How to avoid spam and other fatty foods.
831 * Undo::                        Some actions can be undone.
832 * Predicate Specifiers::        Specifying predicates.
833 * Moderation::                  What to do if you're a moderator.
834 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
835 * Fuzzy Matching::              What's the big fuzz?
836 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
837 * Various Various::             Things that are really various.
838
839 Formatting Variables
840
841 * Formatting Basics::           A formatting variable is basically a format string.
842 * Mode Line Formatting::        Some rules about mode line formatting variables.
843 * Advanced Formatting::         Modifying output in various ways.
844 * User-Defined Specs::          Having Gnus call your own functions.
845 * Formatting Fonts::            Making the formatting look colorful and nice.
846 * Positioning Point::           Moving point to a position after an operation.
847 * Tabulation::                  Tabulating your output.
848 * Wide Characters::             Dealing with wide characters.
849
850 Image Enhancements
851
852 * Picons::                      How to display pictures of what you're reading.
853 * Smileys::                     Show all those happy faces the way they were meant to be shown.
854 * X-Face::                      Display a funky, teensy black-and-white image.
855 * XVarious::                    Other XEmacsy Gnusey variables.
856
857 Thwarting Email Spam
858
859 * The problem of spam::         Some background, and some solutions
860 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
861 * SpamAssassin::                How to use external anti-spam tools.
862 * Hashcash::                    Reduce spam by burning CPU time.
863 * Filtering Spam Using The Spam ELisp Package::
864 * Filtering Spam Using Statistics with spam-stat::
865
866 Appendices
867
868 * XEmacs::                      Requirements for installing under XEmacs.
869 * History::                     How Gnus got where it is today.
870 * On Writing Manuals::          Why this is not a beginner's guide.
871 * Terminology::                 We use really difficult, like, words here.
872 * Customization::               Tailoring Gnus to your needs.
873 * Troubleshooting::             What you might try if things do not work.
874 * Gnus Reference Guide::        Rilly, rilly technical stuff.
875 * Emacs for Heathens::          A short introduction to Emacsian terms.
876 * Frequently Asked Questions::  The Gnus FAQ.
877
878 History
879
880 * Gnus Versions::               What Gnus versions have been released.
881 * Other Gnus Versions::         Other Gnus versions that also have been released.
882 * Why?::                        What's the point of Gnus?
883 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
884 * Conformity::                  Gnus tries to conform to all standards.
885 * Emacsen::                     Gnus can be run on a few modern Emacsen.
886 * Gnus Development::            How Gnus is developed.
887 * Contributors::                Oodles of people.
888 * New Features::                Pointers to some of the new stuff in Gnus.
889
890 New Features
891
892 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
893 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
894 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
895 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
896 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
897 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
898
899 Customization
900
901 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
902 * Slow Terminal Connection::    You run a remote Emacs.
903 * Little Disk Space::           You feel that having large setup files is icky.
904 * Slow Machine::                You feel like buying a faster machine.
905
906 Gnus Reference Guide
907
908 * Gnus Utility Functions::      Common functions and variable to use.
909 * Back End Interface::          How Gnus communicates with the servers.
910 * Score File Syntax::           A BNF definition of the score file standard.
911 * Headers::                     How Gnus stores headers internally.
912 * Ranges::                      A handy format for storing mucho numbers.
913 * Group Info::                  The group info format.
914 * Extended Interactive::        Symbolic prefixes and stuff.
915 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
916 * Various File Formats::        Formats of files that Gnus use.
917
918 Back End Interface
919
920 * Required Back End Functions::  Functions that must be implemented.
921 * Optional Back End Functions::  Functions that need not be implemented.
922 * Error Messaging::             How to get messages and report errors.
923 * Writing New Back Ends::       Extending old back ends.
924 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
925 * Mail-like Back Ends::         Some tips on mail back ends.
926
927 Various File Formats
928
929 * Active File Format::          Information on articles and groups available.
930 * Newsgroups File Format::      Group descriptions.
931
932 Emacs for Heathens
933
934 * Keystrokes::                  Entering text and executing commands.
935 * Emacs Lisp::                  The built-in Emacs programming language.
936
937 @end detailmenu
938 @end menu
939
940 @node Starting Up
941 @chapter Starting Gnus
942 @cindex starting up
943
944 @kindex M-x gnus
945 @findex gnus
946 If your system administrator has set things up properly, starting Gnus
947 and reading news is extremely easy---you just type @kbd{M-x gnus} in
948 your Emacs.
949
950 @findex gnus-other-frame
951 @kindex M-x gnus-other-frame
952 If you want to start Gnus in a different frame, you can use the command
953 @kbd{M-x gnus-other-frame} instead.
954
955 If things do not go smoothly at startup, you have to twiddle some
956 variables in your @file{~/.gnus.el} file.  This file is similar to
957 @file{~/.emacs}, but is read when gnus starts.
958
959 If you puzzle at any terms used in this manual, please refer to the
960 terminology section (@pxref{Terminology}).
961
962 @menu
963 * Finding the News::            Choosing a method for getting news.
964 * The First Time::              What does Gnus do the first time you start it?
965 * The Server is Down::          How can I read my mail then?
966 * Slave Gnusae::                You can have more than one Gnus active at a time.
967 * Fetching a Group::            Starting Gnus just to read a group.
968 * New Groups::                  What is Gnus supposed to do with new groups?
969 * Changing Servers::            You may want to move from one server to another.
970 * Startup Files::               Those pesky startup files---@file{.newsrc}.
971 * Auto Save::                   Recovering from a crash.
972 * The Active File::             Reading the active file over a slow line Takes Time.
973 * Startup Variables::           Other variables you might change.
974 @end menu
975
976
977 @node Finding the News
978 @section Finding the News
979 @cindex finding news
980
981 @vindex gnus-select-method
982 @c @head
983 The @code{gnus-select-method} variable says where Gnus should look for
984 news.  This variable should be a list where the first element says
985 @dfn{how} and the second element says @dfn{where}.  This method is your
986 native method.  All groups not fetched with this method are
987 foreign groups.
988
989 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
990 you want to get your daily dosage of news from, you'd say:
991
992 @lisp
993 (setq gnus-select-method '(nntp "news.somewhere.edu"))
994 @end lisp
995
996 If you want to read directly from the local spool, say:
997
998 @lisp
999 (setq gnus-select-method '(nnspool ""))
1000 @end lisp
1001
1002 If you can use a local spool, you probably should, as it will almost
1003 certainly be much faster.  But do not use the local spool if your
1004 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1005
1006 @vindex gnus-nntpserver-file
1007 @cindex NNTPSERVER
1008 @cindex @acronym{NNTP} server
1009 If this variable is not set, Gnus will take a look at the
1010 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1011 Gnus will see whether @code{gnus-nntpserver-file}
1012 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1013 If that fails as well, Gnus will try to use the machine running Emacs
1014 as an @acronym{NNTP} server.  That's a long shot, though.
1015
1016 @vindex gnus-nntp-server
1017 If @code{gnus-nntp-server} is set, this variable will override
1018 @code{gnus-select-method}.  You should therefore set
1019 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1020
1021 @vindex gnus-secondary-servers
1022 @vindex gnus-nntp-server
1023 You can also make Gnus prompt you interactively for the name of an
1024 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1025 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1026 in the @code{gnus-secondary-servers} list (if any).  You can also just
1027 type in the name of any server you feel like visiting.  (Note that this
1028 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1029 gnus} later in the same Emacs session, Gnus will contact the same
1030 server.)
1031
1032 @findex gnus-group-browse-foreign-server
1033 @kindex B (Group)
1034 However, if you use one @acronym{NNTP} server regularly and are just
1035 interested in a couple of groups from a different server, you would be
1036 better served by using the @kbd{B} command in the group buffer.  It will
1037 let you have a look at what groups are available, and you can subscribe
1038 to any of the groups you want to.  This also makes @file{.newsrc}
1039 maintenance much tidier.  @xref{Foreign Groups}.
1040
1041 @vindex gnus-secondary-select-methods
1042 @c @head
1043 A slightly different approach to foreign groups is to set the
1044 @code{gnus-secondary-select-methods} variable.  The select methods
1045 listed in this variable are in many ways just as native as the
1046 @code{gnus-select-method} server.  They will also be queried for active
1047 files during startup (if that's required), and new newsgroups that
1048 appear on these servers will be subscribed (or not) just as native
1049 groups are.
1050
1051 For instance, if you use the @code{nnmbox} back end to read your mail,
1052 you would typically set this variable to
1053
1054 @lisp
1055 (setq gnus-secondary-select-methods '((nnmbox "")))
1056 @end lisp
1057
1058
1059 @node The First Time
1060 @section The First Time
1061 @cindex first time usage
1062
1063 If no startup files exist, Gnus will try to determine what groups should
1064 be subscribed by default.
1065
1066 @vindex gnus-default-subscribed-newsgroups
1067 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1068 will subscribe you to just those groups in that list, leaving the rest
1069 killed.  Your system administrator should have set this variable to
1070 something useful.
1071
1072 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1073 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1074 here as @dfn{whatever Lars thinks you should read}.)
1075
1076 You'll also be subscribed to the Gnus documentation group, which should
1077 help you with most common problems.
1078
1079 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1080 use the normal functions for handling new groups, and not do anything
1081 special.
1082
1083
1084 @node The Server is Down
1085 @section The Server is Down
1086 @cindex server errors
1087
1088 If the default server is down, Gnus will understandably have some
1089 problems starting.  However, if you have some mail groups in addition to
1090 the news groups, you may want to start Gnus anyway.
1091
1092 Gnus, being the trusting sort of program, will ask whether to proceed
1093 without a native select method if that server can't be contacted.  This
1094 will happen whether the server doesn't actually exist (i.e., you have
1095 given the wrong address) or the server has just momentarily taken ill
1096 for some reason or other.  If you decide to continue and have no foreign
1097 groups, you'll find it difficult to actually do anything in the group
1098 buffer.  But, hey, that's your problem.  Blllrph!
1099
1100 @findex gnus-no-server
1101 @kindex M-x gnus-no-server
1102 @c @head
1103 If you know that the server is definitely down, or you just want to read
1104 your mail without bothering with the server at all, you can use the
1105 @code{gnus-no-server} command to start Gnus.  That might come in handy
1106 if you're in a hurry as well.  This command will not attempt to contact
1107 your primary server---instead, it will just activate all groups on level
1108 1 and 2.  (You should preferably keep no native groups on those two
1109 levels.) Also @pxref{Group Levels}.
1110
1111
1112 @node Slave Gnusae
1113 @section Slave Gnusae
1114 @cindex slave
1115
1116 You might want to run more than one Emacs with more than one Gnus at the
1117 same time.  If you are using different @file{.newsrc} files (e.g., if you
1118 are using the two different Gnusae to read from two different servers),
1119 that is no problem whatsoever.  You just do it.
1120
1121 The problem appears when you want to run two Gnusae that use the same
1122 @file{.newsrc} file.
1123
1124 To work around that problem some, we here at the Think-Tank at the Gnus
1125 Towers have come up with a new concept: @dfn{Masters} and
1126 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1127 taken out a copyright on those words.  If you wish to use those words in
1128 conjunction with each other, you have to send $1 per usage instance to
1129 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1130 Applications}) will be much more expensive, of course.)
1131
1132 @findex gnus-slave
1133 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1134 however you do it).  Each subsequent slave Gnusae should be started with
1135 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1136 files, but instead save @dfn{slave files} that contain information only
1137 on what groups have been read in the slave session.  When a master Gnus
1138 starts, it will read (and delete) these slave files, incorporating all
1139 information from them.  (The slave files will be read in the sequence
1140 they were created, so the latest changes will have precedence.)
1141
1142 Information from the slave files has, of course, precedence over the
1143 information in the normal (i.e., master) @file{.newsrc} file.
1144
1145 If the @file{.newsrc*} files have not been saved in the master when the
1146 slave starts, you may be prompted as to whether to read an auto-save
1147 file.  If you answer ``yes'', the unsaved changes to the master will be
1148 incorporated into the slave.  If you answer ``no'', the slave may see some
1149 messages as unread that have been read in the master.
1150
1151 @node Fetching a Group
1152 @section Fetching a Group
1153 @cindex fetching a group
1154
1155 @findex gnus-fetch-group
1156 It is sometimes convenient to be able to just say ``I want to read this
1157 group and I don't care whether Gnus has been started or not''.  This is
1158 perhaps more useful for people who write code than for users, but the
1159 command @code{gnus-fetch-group} provides this functionality in any case.
1160 It takes the group name as a parameter.
1161
1162
1163 @node New Groups
1164 @section New Groups
1165 @cindex new groups
1166 @cindex subscription
1167
1168 @vindex gnus-check-new-newsgroups
1169 If you are satisfied that you really never want to see any new groups,
1170 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1171 also save you some time at startup.  Even if this variable is
1172 @code{nil}, you can always subscribe to the new groups just by pressing
1173 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1174 is @code{ask-server} by default.  If you set this variable to
1175 @code{always}, then Gnus will query the back ends for new groups even
1176 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1177
1178 @menu
1179 * Checking New Groups::         Determining what groups are new.
1180 * Subscription Methods::        What Gnus should do with new groups.
1181 * Filtering New Groups::        Making Gnus ignore certain new groups.
1182 @end menu
1183
1184
1185 @node Checking New Groups
1186 @subsection Checking New Groups
1187
1188 Gnus normally determines whether a group is new or not by comparing the
1189 list of groups from the active file(s) with the lists of subscribed and
1190 dead groups.  This isn't a particularly fast method.  If
1191 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1192 server for new groups since the last time.  This is both faster and
1193 cheaper.  This also means that you can get rid of the list of killed
1194 groups altogether, so you may set @code{gnus-save-killed-list} to
1195 @code{nil}, which will save time both at startup, at exit, and all over.
1196 Saves disk space, too.  Why isn't this the default, then?
1197 Unfortunately, not all servers support this command.
1198
1199 I bet I know what you're thinking now: How do I find out whether my
1200 server supports @code{ask-server}?  No?  Good, because I don't have a
1201 fail-safe answer.  I would suggest just setting this variable to
1202 @code{ask-server} and see whether any new groups appear within the next
1203 few days.  If any do, then it works.  If none do, then it doesn't
1204 work.  I could write a function to make Gnus guess whether the server
1205 supports @code{ask-server}, but it would just be a guess.  So I won't.
1206 You could @code{telnet} to the server and say @code{HELP} and see
1207 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1208 it does, then it might work.  (But there are servers that lists
1209 @samp{NEWGROUPS} without supporting the function properly.)
1210
1211 This variable can also be a list of select methods.  If so, Gnus will
1212 issue an @code{ask-server} command to each of the select methods, and
1213 subscribe them (or not) using the normal methods.  This might be handy
1214 if you are monitoring a few servers for new groups.  A side effect is
1215 that startup will take much longer, so you can meditate while waiting.
1216 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1217
1218
1219 @node Subscription Methods
1220 @subsection Subscription Methods
1221
1222 @vindex gnus-subscribe-newsgroup-method
1223 What Gnus does when it encounters a new group is determined by the
1224 @code{gnus-subscribe-newsgroup-method} variable.
1225
1226 This variable should contain a function.  This function will be called
1227 with the name of the new group as the only parameter.
1228
1229 Some handy pre-fab functions are:
1230
1231 @table @code
1232
1233 @item gnus-subscribe-zombies
1234 @vindex gnus-subscribe-zombies
1235 Make all new groups zombies.  This is the default.  You can browse the
1236 zombies later (with @kbd{A z}) and either kill them all off properly
1237 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1238
1239 @item gnus-subscribe-randomly
1240 @vindex gnus-subscribe-randomly
1241 Subscribe all new groups in arbitrary order.  This really means that all
1242 new groups will be added at ``the top'' of the group buffer.
1243
1244 @item gnus-subscribe-alphabetically
1245 @vindex gnus-subscribe-alphabetically
1246 Subscribe all new groups in alphabetical order.
1247
1248 @item gnus-subscribe-hierarchically
1249 @vindex gnus-subscribe-hierarchically
1250 Subscribe all new groups hierarchically.  The difference between this
1251 function and @code{gnus-subscribe-alphabetically} is slight.
1252 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1253 alphabetical fashion, while this function will enter groups into its
1254 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1255 @samp{comp} hierarchy, this function will not mess that configuration
1256 up.  Or something like that.
1257
1258 @item gnus-subscribe-interactively
1259 @vindex gnus-subscribe-interactively
1260 Subscribe new groups interactively.  This means that Gnus will ask
1261 you about @strong{all} new groups.  The groups you choose to subscribe
1262 to will be subscribed hierarchically.
1263
1264 @item gnus-subscribe-killed
1265 @vindex gnus-subscribe-killed
1266 Kill all new groups.
1267
1268 @item gnus-subscribe-topics
1269 @vindex gnus-subscribe-topics
1270 Put the groups into the topic that has a matching @code{subscribe} topic
1271 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1272 topic parameter that looks like
1273
1274 @example
1275 "nnslashdot"
1276 @end example
1277
1278 will mean that all groups that match that regex will be subscribed under
1279 that topic.
1280
1281 If no topics match the groups, the groups will be subscribed in the
1282 top-level topic.
1283
1284 @end table
1285
1286 @vindex gnus-subscribe-hierarchical-interactive
1287 A closely related variable is
1288 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1289 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1290 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1291 will ask you for each sub-hierarchy whether you want to descend the
1292 hierarchy or not.
1293
1294 One common mistake is to set the variable a few paragraphs above
1295 (@code{gnus-subscribe-newsgroup-method}) to
1296 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1297 will not work.  This is ga-ga.  So don't do it.
1298
1299
1300 @node Filtering New Groups
1301 @subsection Filtering New Groups
1302
1303 A nice and portable way to control which new newsgroups should be
1304 subscribed (or ignored) is to put an @dfn{options} line at the start of
1305 the @file{.newsrc} file.  Here's an example:
1306
1307 @example
1308 options -n !alt.all !rec.all sci.all
1309 @end example
1310
1311 @vindex gnus-subscribe-options-newsgroup-method
1312 This line obviously belongs to a serious-minded intellectual scientific
1313 person (or she may just be plain old boring), because it says that all
1314 groups that have names beginning with @samp{alt} and @samp{rec} should
1315 be ignored, and all groups with names beginning with @samp{sci} should
1316 be subscribed.  Gnus will not use the normal subscription method for
1317 subscribing these groups.
1318 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1319 variable defaults to @code{gnus-subscribe-alphabetically}.
1320
1321 @vindex gnus-options-not-subscribe
1322 @vindex gnus-options-subscribe
1323 If you don't want to mess with your @file{.newsrc} file, you can just
1324 set the two variables @code{gnus-options-subscribe} and
1325 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1326 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1327 and if the new group matches the former, it will be unconditionally
1328 subscribed, and if it matches the latter, it will be ignored.
1329
1330 @vindex gnus-auto-subscribed-groups
1331 Yet another variable that meddles here is
1332 @code{gnus-auto-subscribed-groups}.  It works exactly like
1333 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1334 thought it would be nice to have two of these.  This variable is more
1335 meant for setting some ground rules, while the other variable is used
1336 more for user fiddling.  By default this variable makes all new groups
1337 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1338 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1339 subscribed.  If you don't like that, just set this variable to
1340 @code{nil}.
1341
1342 New groups that match this regexp are subscribed using
1343 @code{gnus-subscribe-options-newsgroup-method}.
1344
1345
1346 @node Changing Servers
1347 @section Changing Servers
1348 @cindex changing servers
1349
1350 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1351 This happens very rarely, but perhaps you change jobs, or one server is
1352 very flaky and you want to use another.
1353
1354 Changing the server is pretty easy, right?  You just change
1355 @code{gnus-select-method} to point to the new server?
1356
1357 @emph{Wrong!}
1358
1359 Article numbers are not (in any way) kept synchronized between different
1360 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1361 you have read is by keeping track of article numbers.  So when you
1362 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1363 worthless.
1364
1365 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1366 file from one server to another.  They all have one thing in
1367 common---they take a looong time to run.  You don't want to use these
1368 functions more than absolutely necessary.
1369
1370 @kindex M-x gnus-change-server
1371 @findex gnus-change-server
1372 If you have access to both servers, Gnus can request the headers for all
1373 the articles you have read and compare @code{Message-ID}s and map the
1374 article numbers of the read articles and article marks.  The @kbd{M-x
1375 gnus-change-server} command will do this for all your native groups.  It
1376 will prompt for the method you want to move to.
1377
1378 @kindex M-x gnus-group-move-group-to-server
1379 @findex gnus-group-move-group-to-server
1380 You can also move individual groups with the @kbd{M-x
1381 gnus-group-move-group-to-server} command.  This is useful if you want to
1382 move a (foreign) group from one server to another.
1383
1384 @kindex M-x gnus-group-clear-data-on-native-groups
1385 @findex gnus-group-clear-data-on-native-groups
1386 If you don't have access to both the old and new server, all your marks
1387 and read ranges have become worthless.  You can use the @kbd{M-x
1388 gnus-group-clear-data-on-native-groups} command to clear out all data
1389 that you have on your native groups.  Use with caution.
1390
1391 @kindex M-x gnus-group-clear-data
1392 @findex gnus-group-clear-data
1393 Clear the data from the current group only---nix out marks and the
1394 list of read articles (@code{gnus-group-clear-data}).
1395
1396 After changing servers, you @strong{must} move the cache hierarchy away,
1397 since the cached articles will have wrong article numbers, which will
1398 affect which articles Gnus thinks are read.
1399 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1400 to have it done automatically; for @code{gnus-group-clear-data}, you
1401 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1402 cache for all groups).
1403
1404
1405 @node Startup Files
1406 @section Startup Files
1407 @cindex startup files
1408 @cindex .newsrc
1409 @cindex .newsrc.el
1410 @cindex .newsrc.eld
1411
1412 Now, you all know about the @file{.newsrc} file.  All subscription
1413 information is traditionally stored in this file.
1414
1415 Things got a bit more complicated with @sc{gnus}.  In addition to
1416 keeping the @file{.newsrc} file updated, it also used a file called
1417 @file{.newsrc.el} for storing all the information that didn't fit into
1418 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1419 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1420 files was the most recently saved, which enabled people to swap between
1421 @sc{gnus} and other newsreaders.
1422
1423 That was kinda silly, so Gnus went one better: In addition to the
1424 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1425 @file{.newsrc.eld}.  It will read whichever of these files that are most
1426 recent, but it will never write a @file{.newsrc.el} file.  You should
1427 never delete the @file{.newsrc.eld} file---it contains much information
1428 not stored in the @file{.newsrc} file.
1429
1430 @vindex gnus-save-newsrc-file
1431 @vindex gnus-read-newsrc-file
1432 You can turn off writing the @file{.newsrc} file by setting
1433 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1434 the file and save some space, as well as exiting from Gnus faster.
1435 However, this will make it impossible to use other newsreaders than
1436 Gnus.  But hey, who would want to, right?  Similarly, setting
1437 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1438 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1439 convenient if you have a tendency to use Netscape once in a while.
1440
1441 @vindex gnus-save-killed-list
1442 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1443 will not save the list of killed groups to the startup file.  This will
1444 save both time (when starting and quitting) and space (on disk).  It
1445 will also mean that Gnus has no record of what groups are new or old,
1446 so the automatic new groups subscription methods become meaningless.
1447 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1448 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1449 Groups}).  This variable can also be a regular expression.  If that's
1450 the case, remove all groups that do not match this regexp before
1451 saving.  This can be useful in certain obscure situations that involve
1452 several servers where not all servers support @code{ask-server}.
1453
1454 @vindex gnus-startup-file
1455 @vindex gnus-backup-startup-file
1456 @vindex version-control
1457 The @code{gnus-startup-file} variable says where the startup files are.
1458 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1459 file being whatever that one is, with a @samp{.eld} appended.
1460 If you want version control for this file, set
1461 @code{gnus-backup-startup-file}.  It respects the same values as the
1462 @code{version-control} variable.
1463
1464 @vindex gnus-save-newsrc-hook
1465 @vindex gnus-save-quick-newsrc-hook
1466 @vindex gnus-save-standard-newsrc-hook
1467 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1468 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1469 saving the @file{.newsrc.eld} file, and
1470 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1471 @file{.newsrc} file.  The latter two are commonly used to turn version
1472 control on or off.  Version control is on by default when saving the
1473 startup files.  If you want to turn backup creation off, say something like:
1474
1475 @lisp
1476 (defun turn-off-backup ()
1477   (set (make-local-variable 'backup-inhibited) t))
1478
1479 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1480 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1481 @end lisp
1482
1483 @vindex gnus-init-file
1484 @vindex gnus-site-init-file
1485 When Gnus starts, it will read the @code{gnus-site-init-file}
1486 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1487 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1488 and can be used to avoid cluttering your @file{~/.emacs} and
1489 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1490 with the same names as these, but with @file{.elc} and @file{.el}
1491 suffixes.  In other words, if you have set @code{gnus-init-file} to
1492 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1493 and finally @file{~/.gnus} (in this order).
1494
1495
1496
1497 @node Auto Save
1498 @section Auto Save
1499 @cindex dribble file
1500 @cindex auto-save
1501
1502 Whenever you do something that changes the Gnus data (reading articles,
1503 catching up, killing/subscribing groups), the change is added to a
1504 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1505 Emacs way.  If your Emacs should crash before you have saved the
1506 @file{.newsrc} files, all changes you have made can be recovered from
1507 this file.
1508
1509 If Gnus detects this file at startup, it will ask the user whether to
1510 read it.  The auto save file is deleted whenever the real startup file is
1511 saved.
1512
1513 @vindex gnus-use-dribble-file
1514 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1515 maintain a dribble buffer.  The default is @code{t}.
1516
1517 @vindex gnus-dribble-directory
1518 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1519 this variable is @code{nil}, which it is by default, Gnus will dribble
1520 into the directory where the @file{.newsrc} file is located.  (This is
1521 normally the user's home directory.)  The dribble file will get the same
1522 file permissions as the @file{.newsrc} file.
1523
1524 @vindex gnus-always-read-dribble-file
1525 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1526 read the dribble file on startup without querying the user.
1527
1528
1529 @node The Active File
1530 @section The Active File
1531 @cindex active file
1532 @cindex ignored groups
1533
1534 When Gnus starts, or indeed whenever it tries to determine whether new
1535 articles have arrived, it reads the active file.  This is a very large
1536 file that lists all the active groups and articles on the server.
1537
1538 @vindex gnus-ignored-newsgroups
1539 Before examining the active file, Gnus deletes all lines that match the
1540 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1541 any groups with bogus names, but you can use this variable to make Gnus
1542 ignore hierarchies you aren't ever interested in.  However, this is not
1543 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1544 Groups} for an overview of other variables that can be used instead.
1545
1546 @c This variable is
1547 @c @code{nil} by default, and will slow down active file handling somewhat
1548 @c if you set it to anything else.
1549
1550 @vindex gnus-read-active-file
1551 @c @head
1552 The active file can be rather Huge, so if you have a slow network, you
1553 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1554 reading the active file.  This variable is @code{some} by default.
1555
1556 Gnus will try to make do by getting information just on the groups that
1557 you actually subscribe to.
1558
1559 Note that if you subscribe to lots and lots of groups, setting this
1560 variable to @code{nil} will probably make Gnus slower, not faster.  At
1561 present, having this variable @code{nil} will slow Gnus down
1562 considerably, unless you read news over a 2400 baud modem.
1563
1564 This variable can also have the value @code{some}.  Gnus will then
1565 attempt to read active info only on the subscribed groups.  On some
1566 servers this is quite fast (on sparkling, brand new INN servers that
1567 support the @code{LIST ACTIVE group} command), on others this isn't fast
1568 at all.  In any case, @code{some} should be faster than @code{nil}, and
1569 is certainly faster than @code{t} over slow lines.
1570
1571 Some news servers (old versions of Leafnode and old versions of INN, for
1572 instance) do not support the @code{LIST ACTIVE group}.  For these
1573 servers, @code{nil} is probably the most efficient value for this
1574 variable.
1575
1576 If this variable is @code{nil}, Gnus will ask for group info in total
1577 lock-step, which isn't very fast.  If it is @code{some} and you use an
1578 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1579 read all the replies in one swoop.  This will normally result in better
1580 performance, but if the server does not support the aforementioned
1581 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1582
1583 If you think that starting up Gnus takes too long, try all the three
1584 different values for this variable and see what works best for you.
1585
1586 In any case, if you use @code{some} or @code{nil}, you should definitely
1587 kill all groups that you aren't interested in to speed things up.
1588
1589 Note that this variable also affects active file retrieval from
1590 secondary select methods.
1591
1592
1593 @node Startup Variables
1594 @section Startup Variables
1595
1596 @table @code
1597
1598 @item gnus-load-hook
1599 @vindex gnus-load-hook
1600 A hook run while Gnus is being loaded.  Note that this hook will
1601 normally be run just once in each Emacs session, no matter how many
1602 times you start Gnus.
1603
1604 @item gnus-before-startup-hook
1605 @vindex gnus-before-startup-hook
1606 A hook run after starting up Gnus successfully.
1607
1608 @item gnus-startup-hook
1609 @vindex gnus-startup-hook
1610 A hook run as the very last thing after starting up Gnus
1611
1612 @item gnus-started-hook
1613 @vindex gnus-started-hook
1614 A hook that is run as the very last thing after starting up Gnus
1615 successfully.
1616
1617 @item gnus-setup-news-hook
1618 @vindex gnus-setup-news-hook
1619 A hook that is run after reading the @file{.newsrc} file(s), but before
1620 generating the group buffer.
1621
1622 @item gnus-check-bogus-newsgroups
1623 @vindex gnus-check-bogus-newsgroups
1624 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1625 startup.  A @dfn{bogus group} is a group that you have in your
1626 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1627 bogus groups can take quite a while, so to save time and resources it's
1628 best to leave this option off, and do the checking for bogus groups once
1629 in a while from the group buffer instead (@pxref{Group Maintenance}).
1630
1631 @item gnus-inhibit-startup-message
1632 @vindex gnus-inhibit-startup-message
1633 If non-@code{nil}, the startup message won't be displayed.  That way,
1634 your boss might not notice as easily that you are reading news instead
1635 of doing your job.  Note that this variable is used before
1636 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1637
1638 @item gnus-no-groups-message
1639 @vindex gnus-no-groups-message
1640 Message displayed by Gnus when no groups are available.
1641
1642 @item gnus-play-startup-jingle
1643 @vindex gnus-play-startup-jingle
1644 If non-@code{nil}, play the Gnus jingle at startup.
1645
1646 @item gnus-startup-jingle
1647 @vindex gnus-startup-jingle
1648 Jingle to be played if the above variable is non-@code{nil}.  The
1649 default is @samp{Tuxedomoon.Jingle4.au}.
1650
1651 @end table
1652
1653
1654 @node Group Buffer
1655 @chapter Group Buffer
1656 @cindex group buffer
1657
1658 @c Alex Schroeder suggests to rearrange this as follows:
1659 @c
1660 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1661 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1662 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1663 @c   7. Group Score, 8. Group Buffer Format
1664 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1665 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1666 @c <kensanata> First, "Gnus considers groups... (default 9)."
1667 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1668 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1669 @c <kensanata> Then expand the next paragraph or add some more to it.
1670 @c    This short one sentence explains levels 1 and 2, therefore I understand
1671 @c    that I should keep important news at 3 and boring news at 4.
1672 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1673 @c    Maybe keep those that you don't want to read temporarily at 6,
1674 @c    those that you never want to read at 8, those that offend your
1675 @c    human rights at 9...
1676
1677
1678 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1679 is the first buffer shown when Gnus starts, and will never be killed as
1680 long as Gnus is active.
1681
1682 @iftex
1683 @iflatex
1684 \gnusfigure{The Group Buffer}{320}{
1685 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1686 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1687 \put(120,38){\vector(1,2){10}}
1688 \put(40,60){\makebox(0,0)[r]{Mode line}}
1689 \put(40,58){\vector(1,0){30}}
1690 \put(200,28){\makebox(0,0)[t]{Native select method}}
1691 \put(200,26){\vector(-1,2){15}}
1692 }
1693 @end iflatex
1694 @end iftex
1695
1696 @menu
1697 * Group Buffer Format::         Information listed and how you can change it.
1698 * Group Maneuvering::           Commands for moving in the group buffer.
1699 * Selecting a Group::           Actually reading news.
1700 * Subscription Commands::       Unsubscribing, killing, subscribing.
1701 * Group Data::                  Changing the info for a group.
1702 * Group Levels::                Levels? What are those, then?
1703 * Group Score::                 A mechanism for finding out what groups you like.
1704 * Marking Groups::              You can mark groups for later processing.
1705 * Foreign Groups::              Creating and editing groups.
1706 * Group Parameters::            Each group may have different parameters set.
1707 * Listing Groups::              Gnus can list various subsets of the groups.
1708 * Sorting Groups::              Re-arrange the group order.
1709 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1710 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1711 * Exiting Gnus::                Stop reading news and get some work done.
1712 * Group Topics::                A folding group mode divided into topics.
1713 * Misc Group Stuff::            Other stuff that you can to do.
1714 @end menu
1715
1716
1717 @node Group Buffer Format
1718 @section Group Buffer Format
1719
1720 @menu
1721 * Group Line Specification::    Deciding how the group buffer is to look.
1722 * Group Mode Line Specification::  The group buffer mode line.
1723 * Group Highlighting::          Having nice colors in the group buffer.
1724 @end menu
1725
1726
1727 @node Group Line Specification
1728 @subsection Group Line Specification
1729 @cindex group buffer format
1730
1731 The default format of the group buffer is nice and dull, but you can
1732 make it as exciting and ugly as you feel like.
1733
1734 Here's a couple of example group lines:
1735
1736 @example
1737      25: news.announce.newusers
1738  *    0: alt.fan.andrea-dworkin
1739 @end example
1740
1741 Quite simple, huh?
1742
1743 You can see that there are 25 unread articles in
1744 @samp{news.announce.newusers}.  There are no unread articles, but some
1745 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1746 asterisk at the beginning of the line?).
1747
1748 @vindex gnus-group-line-format
1749 You can change that format to whatever you want by fiddling with the
1750 @code{gnus-group-line-format} variable.  This variable works along the
1751 lines of a @code{format} specification, which is pretty much the same as
1752 a @code{printf} specifications, for those of you who use (feh!) C.
1753 @xref{Formatting Variables}.
1754
1755 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1756
1757 There should always be a colon on the line; the cursor always moves to
1758 the colon after performing an operation.  @xref{Positioning
1759 Point}.  Nothing else is required---not even the group name.  All
1760 displayed text is just window dressing, and is never examined by Gnus.
1761 Gnus stores all real information it needs using text properties.
1762
1763 (Note that if you make a really strange, wonderful, spreadsheet-like
1764 layout, everybody will believe you are hard at work with the accounting
1765 instead of wasting time reading news.)
1766
1767 Here's a list of all available format characters:
1768
1769 @table @samp
1770
1771 @item M
1772 An asterisk if the group only has marked articles.
1773
1774 @item S
1775 Whether the group is subscribed.
1776
1777 @item L
1778 Level of subscribedness.
1779
1780 @item N
1781 Number of unread articles.
1782
1783 @item I
1784 Number of dormant articles.
1785
1786 @item T
1787 Number of ticked articles.
1788
1789 @item R
1790 Number of read articles.
1791
1792 @item U
1793 Number of unseen articles.
1794
1795 @item t
1796 Estimated total number of articles.  (This is really @var{max-number}
1797 minus @var{min-number} plus 1.)
1798
1799 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1800 efficient access to @var{max-number} and @var{min-number} but getting
1801 the true unread message count is not possible efficiently.  For
1802 hysterical raisins, even the mail back ends, where the true number of
1803 unread messages might be available efficiently, use the same limited
1804 interface.  To remove this restriction from Gnus means that the back
1805 end interface has to be changed, which is not an easy job.  If you
1806 want to work on this, please contact the Gnus mailing list.
1807
1808 @item y
1809 Number of unread, unticked, non-dormant articles.
1810
1811 @item i
1812 Number of ticked and dormant articles.
1813
1814 @item g
1815 Full group name.
1816
1817 @item G
1818 Group name.
1819
1820 @item C
1821 Group comment (@pxref{Group Parameters}) or group name if there is no
1822 comment element in the group parameters.
1823
1824 @item D
1825 Newsgroup description.  You need to read the group descriptions
1826 before these will appear, and to do that, you either have to set
1827 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1828 command.
1829
1830 @item o
1831 @samp{m} if moderated.
1832
1833 @item O
1834 @samp{(m)} if moderated.
1835
1836 @item s
1837 Select method.
1838
1839 @item B
1840 If the summary buffer for the group is open or not.
1841
1842 @item n
1843 Select from where.
1844
1845 @item z
1846 A string that looks like @samp{<%s:%n>} if a foreign select method is
1847 used.
1848
1849 @item P
1850 Indentation based on the level of the topic (@pxref{Group Topics}).
1851
1852 @item c
1853 @vindex gnus-group-uncollapsed-levels
1854 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1855 variable says how many levels to leave at the end of the group name.
1856 The default is 1---this will mean that group names like
1857 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1858
1859 @item m
1860 @vindex gnus-new-mail-mark
1861 @cindex %
1862 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1863 the group lately.
1864
1865 @item p
1866 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1867
1868 @item d
1869 A string that says when you last read the group (@pxref{Group
1870 Timestamp}).
1871
1872 @item u
1873 User defined specifier.  The next character in the format string should
1874 be a letter.  Gnus will call the function
1875 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1876 following @samp{%u}.  The function will be passed a single dummy
1877 parameter as argument.  The function should return a string, which will
1878 be inserted into the buffer just like information from any other
1879 specifier.
1880 @end table
1881
1882 @cindex *
1883 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1884 if no info is available---for instance, if it is a non-activated foreign
1885 group, or a bogus native group.
1886
1887
1888 @node Group Mode Line Specification
1889 @subsection Group Mode Line Specification
1890 @cindex group mode line
1891
1892 @vindex gnus-group-mode-line-format
1893 The mode line can be changed by setting
1894 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1895 doesn't understand that many format specifiers:
1896
1897 @table @samp
1898 @item S
1899 The native news server.
1900 @item M
1901 The native select method.
1902 @end table
1903
1904
1905 @node Group Highlighting
1906 @subsection Group Highlighting
1907 @cindex highlighting
1908 @cindex group highlighting
1909
1910 @vindex gnus-group-highlight
1911 Highlighting in the group buffer is controlled by the
1912 @code{gnus-group-highlight} variable.  This is an alist with elements
1913 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1914 something non-@code{nil}, the @var{face} will be used on the line.
1915
1916 Here's an example value for this variable that might look nice if the
1917 background is dark:
1918
1919 @lisp
1920 (cond (window-system
1921        (setq custom-background-mode 'light)
1922        (defface my-group-face-1
1923          '((t (:foreground "Red" :bold t))) "First group face")
1924        (defface my-group-face-2
1925          '((t (:foreground "DarkSeaGreen4" :bold t)))
1926          "Second group face")
1927        (defface my-group-face-3
1928          '((t (:foreground "Green4" :bold t))) "Third group face")
1929        (defface my-group-face-4
1930          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1931        (defface my-group-face-5
1932          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1933
1934 (setq gnus-group-highlight
1935       '(((> unread 200) . my-group-face-1)
1936         ((and (< level 3) (zerop unread)) . my-group-face-2)
1937         ((< level 3) . my-group-face-3)
1938         ((zerop unread) . my-group-face-4)
1939         (t . my-group-face-5)))
1940 @end lisp
1941
1942 Also @pxref{Faces and Fonts}.
1943
1944 Variables that are dynamically bound when the forms are evaluated
1945 include:
1946
1947 @table @code
1948 @item group
1949 The group name.
1950 @item unread
1951 The number of unread articles in the group.
1952 @item method
1953 The select method.
1954 @item mailp
1955 Whether the group is a mail group.
1956 @item level
1957 The level of the group.
1958 @item score
1959 The score of the group.
1960 @item ticked
1961 The number of ticked articles in the group.
1962 @item total
1963 The total number of articles in the group.  Or rather,
1964 @var{max-number} minus @var{min-number} plus one.
1965 @item topic
1966 When using the topic minor mode, this variable is bound to the current
1967 topic being inserted.
1968 @end table
1969
1970 When the forms are @code{eval}ed, point is at the beginning of the line
1971 of the group in question, so you can use many of the normal Gnus
1972 functions for snarfing info on the group.
1973
1974 @vindex gnus-group-update-hook
1975 @findex gnus-group-highlight-line
1976 @code{gnus-group-update-hook} is called when a group line is changed.
1977 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1978 calls @code{gnus-group-highlight-line} by default.
1979
1980
1981 @node Group Maneuvering
1982 @section Group Maneuvering
1983 @cindex group movement
1984
1985 All movement commands understand the numeric prefix and will behave as
1986 expected, hopefully.
1987
1988 @table @kbd
1989
1990 @item n
1991 @kindex n (Group)
1992 @findex gnus-group-next-unread-group
1993 Go to the next group that has unread articles
1994 (@code{gnus-group-next-unread-group}).
1995
1996 @item p
1997 @itemx DEL
1998 @kindex DEL (Group)
1999 @kindex p (Group)
2000 @findex gnus-group-prev-unread-group
2001 Go to the previous group that has unread articles
2002 (@code{gnus-group-prev-unread-group}).
2003
2004 @item N
2005 @kindex N (Group)
2006 @findex gnus-group-next-group
2007 Go to the next group (@code{gnus-group-next-group}).
2008
2009 @item P
2010 @kindex P (Group)
2011 @findex gnus-group-prev-group
2012 Go to the previous group (@code{gnus-group-prev-group}).
2013
2014 @item M-n
2015 @kindex M-n (Group)
2016 @findex gnus-group-next-unread-group-same-level
2017 Go to the next unread group on the same (or lower) level
2018 (@code{gnus-group-next-unread-group-same-level}).
2019
2020 @item M-p
2021 @kindex M-p (Group)
2022 @findex gnus-group-prev-unread-group-same-level
2023 Go to the previous unread group on the same (or lower) level
2024 (@code{gnus-group-prev-unread-group-same-level}).
2025 @end table
2026
2027 Three commands for jumping to groups:
2028
2029 @table @kbd
2030
2031 @item j
2032 @kindex j (Group)
2033 @findex gnus-group-jump-to-group
2034 Jump to a group (and make it visible if it isn't already)
2035 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2036 like living groups.
2037
2038 @item ,
2039 @kindex , (Group)
2040 @findex gnus-group-best-unread-group
2041 Jump to the unread group with the lowest level
2042 (@code{gnus-group-best-unread-group}).
2043
2044 @item .
2045 @kindex . (Group)
2046 @findex gnus-group-first-unread-group
2047 Jump to the first group with unread articles
2048 (@code{gnus-group-first-unread-group}).
2049 @end table
2050
2051 @vindex gnus-group-goto-unread
2052 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2053 commands will move to the next group, not the next unread group.  Even
2054 the commands that say they move to the next unread group.  The default
2055 is @code{t}.
2056
2057
2058 @node Selecting a Group
2059 @section Selecting a Group
2060 @cindex group selection
2061
2062 @table @kbd
2063
2064 @item SPACE
2065 @kindex SPACE (Group)
2066 @findex gnus-group-read-group
2067 Select the current group, switch to the summary buffer and display the
2068 first unread article (@code{gnus-group-read-group}).  If there are no
2069 unread articles in the group, or if you give a non-numerical prefix to
2070 this command, Gnus will offer to fetch all the old articles in this
2071 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2072 determines the number of articles Gnus will fetch.  If @var{n} is
2073 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2074 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2075
2076 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2077 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2078 - 4 2 SPC} fetches the 42 oldest ones.
2079
2080 When you are in the group (in the Summary buffer), you can type
2081 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2082 ones.
2083
2084 @item RET
2085 @kindex RET (Group)
2086 @findex gnus-group-select-group
2087 Select the current group and switch to the summary buffer
2088 (@code{gnus-group-select-group}).  Takes the same arguments as
2089 @code{gnus-group-read-group}---the only difference is that this command
2090 does not display the first unread article automatically upon group
2091 entry.
2092
2093 @item M-RET
2094 @kindex M-RET (Group)
2095 @findex gnus-group-quick-select-group
2096 This does the same as the command above, but tries to do it with the
2097 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2098 scoring/killing will be performed, there will be no highlights and no
2099 expunging.  This might be useful if you're in a real hurry and have to
2100 enter some humongous group.  If you give a 0 prefix to this command
2101 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2102 which is useful if you want to toggle threading before generating the
2103 summary buffer (@pxref{Summary Generation Commands}).
2104
2105 @item M-SPACE
2106 @kindex M-SPACE (Group)
2107 @findex gnus-group-visible-select-group
2108 This is yet one more command that does the same as the @kbd{RET}
2109 command, but this one does it without expunging and hiding dormants
2110 (@code{gnus-group-visible-select-group}).
2111
2112 @item C-M-RET
2113 @kindex C-M-RET (Group)
2114 @findex gnus-group-select-group-ephemerally
2115 Finally, this command selects the current group ephemerally without
2116 doing any processing of its contents
2117 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2118 turned off.  Everything you do in the group after selecting it in this
2119 manner will have no permanent effects.
2120
2121 @end table
2122
2123 @vindex gnus-large-newsgroup
2124 The @code{gnus-large-newsgroup} variable says what Gnus should
2125 consider to be a big group.  If it is @code{nil}, no groups are
2126 considered big.  The default value is 200.  If the group has more
2127 (unread and/or ticked) articles than this, Gnus will query the user
2128 before entering the group.  The user can then specify how many
2129 articles should be fetched from the server.  If the user specifies a
2130 negative number (@var{-n}), the @var{n} oldest articles will be
2131 fetched.  If it is positive, the @var{n} articles that have arrived
2132 most recently will be fetched.
2133
2134 @vindex gnus-large-ephemeral-newsgroup
2135 @code{gnus-large-ephemeral-newsgroup} is the same as
2136 @code{gnus-large-newsgroup}, but is only used for ephemeral
2137 newsgroups.
2138
2139 @vindex gnus-select-group-hook
2140 @vindex gnus-auto-select-first
2141 @vindex gnus-auto-select-subject
2142 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2143 automatically when entering a group with the @kbd{SPACE} command.
2144 Which article this is is controlled by the
2145 @code{gnus-auto-select-subject} variable.  Valid values for this
2146 variable is:
2147
2148 @table @code
2149
2150 @item unread
2151 Place point on the subject line of the first unread article.
2152
2153 @item first
2154 Place point on the subject line of the first article.
2155
2156 @item unseen
2157 Place point on the subject line of the first unseen article.
2158
2159 @item unseen-or-unread
2160 Place point on the subject line of the first unseen article, and if
2161 there is no such article, place point on the subject line of the first
2162 unread article.
2163
2164 @item best
2165 Place point on the subject line of the highest-scored unread article.
2166
2167 @end table
2168
2169 This variable can also be a function.  In that case, that function
2170 will be called to place point on a subject line.
2171
2172 If you want to prevent automatic selection in some group (say, in a
2173 binary group with Huge articles) you can set the
2174 @code{gnus-auto-select-first} variable to @code{nil} in
2175 @code{gnus-select-group-hook}, which is called when a group is
2176 selected.
2177
2178
2179 @node Subscription Commands
2180 @section Subscription Commands
2181 @cindex subscription
2182
2183 @table @kbd
2184
2185 @item S t
2186 @itemx u
2187 @kindex S t (Group)
2188 @kindex u (Group)
2189 @findex gnus-group-unsubscribe-current-group
2190 @c @icon{gnus-group-unsubscribe}
2191 Toggle subscription to the current group
2192 (@code{gnus-group-unsubscribe-current-group}).
2193
2194 @item S s
2195 @itemx U
2196 @kindex S s (Group)
2197 @kindex U (Group)
2198 @findex gnus-group-unsubscribe-group
2199 Prompt for a group to subscribe, and then subscribe it.  If it was
2200 subscribed already, unsubscribe it instead
2201 (@code{gnus-group-unsubscribe-group}).
2202
2203 @item S k
2204 @itemx C-k
2205 @kindex S k (Group)
2206 @kindex C-k (Group)
2207 @findex gnus-group-kill-group
2208 @c @icon{gnus-group-kill-group}
2209 Kill the current group (@code{gnus-group-kill-group}).
2210
2211 @item S y
2212 @itemx C-y
2213 @kindex S y (Group)
2214 @kindex C-y (Group)
2215 @findex gnus-group-yank-group
2216 Yank the last killed group (@code{gnus-group-yank-group}).
2217
2218 @item C-x C-t
2219 @kindex C-x C-t (Group)
2220 @findex gnus-group-transpose-groups
2221 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2222 really a subscription command, but you can use it instead of a
2223 kill-and-yank sequence sometimes.
2224
2225 @item S w
2226 @itemx C-w
2227 @kindex S w (Group)
2228 @kindex C-w (Group)
2229 @findex gnus-group-kill-region
2230 Kill all groups in the region (@code{gnus-group-kill-region}).
2231
2232 @item S z
2233 @kindex S z (Group)
2234 @findex gnus-group-kill-all-zombies
2235 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2236
2237 @item S C-k
2238 @kindex S C-k (Group)
2239 @findex gnus-group-kill-level
2240 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2241 These groups can't be yanked back after killing, so this command should
2242 be used with some caution.  The only time where this command comes in
2243 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2244 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2245 kill off all unsubscribed groups that do not have message numbers in the
2246 @file{.newsrc} file.
2247
2248 @end table
2249
2250 Also @pxref{Group Levels}.
2251
2252
2253 @node Group Data
2254 @section Group Data
2255
2256 @table @kbd
2257
2258 @item c
2259 @kindex c (Group)
2260 @findex gnus-group-catchup-current
2261 @vindex gnus-group-catchup-group-hook
2262 @c @icon{gnus-group-catchup-current}
2263 Mark all unticked articles in this group as read
2264 (@code{gnus-group-catchup-current}).
2265 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2266 the group buffer.
2267
2268 @item C
2269 @kindex C (Group)
2270 @findex gnus-group-catchup-current-all
2271 Mark all articles in this group, even the ticked ones, as read
2272 (@code{gnus-group-catchup-current-all}).
2273
2274 @item M-c
2275 @kindex M-c (Group)
2276 @findex gnus-group-clear-data
2277 Clear the data from the current group---nix out marks and the list of
2278 read articles (@code{gnus-group-clear-data}).
2279
2280 @item M-x gnus-group-clear-data-on-native-groups
2281 @kindex M-x gnus-group-clear-data-on-native-groups
2282 @findex gnus-group-clear-data-on-native-groups
2283 If you have switched from one @acronym{NNTP} server to another, all your marks
2284 and read ranges have become worthless.  You can use this command to
2285 clear out all data that you have on your native groups.  Use with
2286 caution.
2287
2288 @end table
2289
2290
2291 @node Group Levels
2292 @section Group Levels
2293 @cindex group level
2294 @cindex level
2295
2296 All groups have a level of @dfn{subscribedness}.  For instance, if a
2297 group is on level 2, it is more subscribed than a group on level 5.  You
2298 can ask Gnus to just list groups on a given level or lower
2299 (@pxref{Listing Groups}), or to just check for new articles in groups on
2300 a given level or lower (@pxref{Scanning New Messages}).
2301
2302 Remember:  The higher the level of the group, the less important it is.
2303
2304 @table @kbd
2305
2306 @item S l
2307 @kindex S l (Group)
2308 @findex gnus-group-set-current-level
2309 Set the level of the current group.  If a numeric prefix is given, the
2310 next @var{n} groups will have their levels set.  The user will be
2311 prompted for a level.
2312 @end table
2313
2314 @vindex gnus-level-killed
2315 @vindex gnus-level-zombie
2316 @vindex gnus-level-unsubscribed
2317 @vindex gnus-level-subscribed
2318 Gnus considers groups from levels 1 to
2319 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2320 @code{gnus-level-subscribed} (exclusive) and
2321 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2322 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2323 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2324 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2325 same, but zombie and killed groups have no information on what articles
2326 you have read, etc, stored.  This distinction between dead and living
2327 groups isn't done because it is nice or clever, it is done purely for
2328 reasons of efficiency.
2329
2330 It is recommended that you keep all your mail groups (if any) on quite
2331 low levels (e.g. 1 or 2).
2332
2333 Maybe the following description of the default behavior of Gnus helps to
2334 understand what these levels are all about.  By default, Gnus shows you
2335 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2336 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2337 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2338 groups are hidden, in a way.
2339
2340 Zombie and killed groups are similar to unsubscribed groups in that they
2341 are hidden by default.  But they are different from subscribed and
2342 unsubscribed groups in that Gnus doesn't ask the news server for
2343 information (number of messages, number of unread messages) on zombie
2344 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2345 aren't interested in.  If most groups are killed, Gnus is faster.
2346
2347 Why does Gnus distinguish between zombie and killed groups?  Well, when
2348 a new group arrives on the server, Gnus by default makes it a zombie
2349 group.  This means that you are normally not bothered with new groups,
2350 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2351 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2352 list of killed groups.)
2353
2354 If you want to play with the level variables, you should show some care.
2355 Set them once, and don't touch them ever again.  Better yet, don't touch
2356 them at all unless you know exactly what you're doing.
2357
2358 @vindex gnus-level-default-unsubscribed
2359 @vindex gnus-level-default-subscribed
2360 Two closely related variables are @code{gnus-level-default-subscribed}
2361 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2362 which are the levels that new groups will be put on if they are
2363 (un)subscribed.  These two variables should, of course, be inside the
2364 relevant valid ranges.
2365
2366 @vindex gnus-keep-same-level
2367 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2368 will only move to groups of the same level (or lower).  In
2369 particular, going from the last article in one group to the next group
2370 will go to the next group of the same level (or lower).  This might be
2371 handy if you want to read the most important groups before you read the
2372 rest.
2373
2374 If this variable is @code{best}, Gnus will make the next newsgroup the
2375 one with the best level.
2376
2377 @vindex gnus-group-default-list-level
2378 All groups with a level less than or equal to
2379 @code{gnus-group-default-list-level} will be listed in the group buffer
2380 by default.
2381
2382 @vindex gnus-group-list-inactive-groups
2383 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2384 groups will be listed along with the unread groups.  This variable is
2385 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2386 listed.
2387
2388 @vindex gnus-group-use-permanent-levels
2389 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2390 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2391 use this level as the ``work'' level.
2392
2393 @vindex gnus-activate-level
2394 Gnus will normally just activate (i. e., query the server about) groups
2395 on level @code{gnus-activate-level} or less.  If you don't want to
2396 activate unsubscribed groups, for instance, you might set this variable
2397 to 5.  The default is 6.
2398
2399
2400 @node Group Score
2401 @section Group Score
2402 @cindex group score
2403 @cindex group rank
2404 @cindex rank
2405
2406 You would normally keep important groups on high levels, but that scheme
2407 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2408 group buffer according to how often you read groups, perhaps?  Within
2409 reason?
2410
2411 This is what @dfn{group score} is for.  You can have Gnus assign a score
2412 to each group through the mechanism described below.  You can then sort
2413 the group buffer based on this score.  Alternatively, you can sort on
2414 score and then level.  (Taken together, the level and the score is
2415 called the @dfn{rank} of the group.  A group that is on level 4 and has
2416 a score of 1 has a higher rank than a group on level 5 that has a score
2417 of 300.  (The level is the most significant part and the score is the
2418 least significant part.))
2419
2420 @findex gnus-summary-bubble-group
2421 If you want groups you read often to get higher scores than groups you
2422 read seldom you can add the @code{gnus-summary-bubble-group} function to
2423 the @code{gnus-summary-exit-hook} hook.  This will result (after
2424 sorting) in a bubbling sort of action.  If you want to see that in
2425 action after each summary exit, you can add
2426 @code{gnus-group-sort-groups-by-rank} or
2427 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2428 slow things down somewhat.
2429
2430
2431 @node Marking Groups
2432 @section Marking Groups
2433 @cindex marking groups
2434
2435 If you want to perform some command on several groups, and they appear
2436 subsequently in the group buffer, you would normally just give a
2437 numerical prefix to the command.  Most group commands will then do your
2438 bidding on those groups.
2439
2440 However, if the groups are not in sequential order, you can still
2441 perform a command on several groups.  You simply mark the groups first
2442 with the process mark and then execute the command.
2443
2444 @table @kbd
2445
2446 @item #
2447 @kindex # (Group)
2448 @itemx M m
2449 @kindex M m (Group)
2450 @findex gnus-group-mark-group
2451 Set the mark on the current group (@code{gnus-group-mark-group}).
2452
2453 @item M-#
2454 @kindex M-# (Group)
2455 @itemx M u
2456 @kindex M u (Group)
2457 @findex gnus-group-unmark-group
2458 Remove the mark from the current group
2459 (@code{gnus-group-unmark-group}).
2460
2461 @item M U
2462 @kindex M U (Group)
2463 @findex gnus-group-unmark-all-groups
2464 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2465
2466 @item M w
2467 @kindex M w (Group)
2468 @findex gnus-group-mark-region
2469 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2470
2471 @item M b
2472 @kindex M b (Group)
2473 @findex gnus-group-mark-buffer
2474 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2475
2476 @item M r
2477 @kindex M r (Group)
2478 @findex gnus-group-mark-regexp
2479 Mark all groups that match some regular expression
2480 (@code{gnus-group-mark-regexp}).
2481 @end table
2482
2483 Also @pxref{Process/Prefix}.
2484
2485 @findex gnus-group-universal-argument
2486 If you want to execute some command on all groups that have been marked
2487 with the process mark, you can use the @kbd{M-&}
2488 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2489 the command to be executed.
2490
2491
2492 @node Foreign Groups
2493 @section Foreign Groups
2494 @cindex foreign groups
2495
2496 Below are some group mode commands for making and editing general foreign
2497 groups, as well as commands to ease the creation of a few
2498 special-purpose groups.  All these commands insert the newly created
2499 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2500 consulted.
2501
2502 @table @kbd
2503
2504 @item G m
2505 @kindex G m (Group)
2506 @findex gnus-group-make-group
2507 @cindex making groups
2508 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2509 for a name, a method and possibly an @dfn{address}.  For an easier way
2510 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2511
2512 @item G r
2513 @kindex G r (Group)
2514 @findex gnus-group-rename-group
2515 @cindex renaming groups
2516 Rename the current group to something else
2517 (@code{gnus-group-rename-group}).  This is valid only on some
2518 groups---mail groups mostly.  This command might very well be quite slow
2519 on some back ends.
2520
2521 @item G c
2522 @kindex G c (Group)
2523 @cindex customizing
2524 @findex gnus-group-customize
2525 Customize the group parameters (@code{gnus-group-customize}).
2526
2527 @item G e
2528 @kindex G e (Group)
2529 @findex gnus-group-edit-group-method
2530 @cindex renaming groups
2531 Enter a buffer where you can edit the select method of the current
2532 group (@code{gnus-group-edit-group-method}).
2533
2534 @item G p
2535 @kindex G p (Group)
2536 @findex gnus-group-edit-group-parameters
2537 Enter a buffer where you can edit the group parameters
2538 (@code{gnus-group-edit-group-parameters}).
2539
2540 @item G E
2541 @kindex G E (Group)
2542 @findex gnus-group-edit-group
2543 Enter a buffer where you can edit the group info
2544 (@code{gnus-group-edit-group}).
2545
2546 @item G d
2547 @kindex G d (Group)
2548 @findex gnus-group-make-directory-group
2549 @cindex nndir
2550 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2551 for a directory name (@code{gnus-group-make-directory-group}).
2552
2553 @item G h
2554 @kindex G h (Group)
2555 @cindex help group
2556 @findex gnus-group-make-help-group
2557 Make the Gnus help group (@code{gnus-group-make-help-group}).
2558
2559 @item G a
2560 @kindex G a (Group)
2561 @cindex (ding) archive
2562 @cindex archive group
2563 @findex gnus-group-make-archive-group
2564 @vindex gnus-group-archive-directory
2565 @vindex gnus-group-recent-archive-directory
2566 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2567 default a group pointing to the most recent articles will be created
2568 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2569 group will be created from @code{gnus-group-archive-directory}.
2570
2571 @item G k
2572 @kindex G k (Group)
2573 @findex gnus-group-make-kiboze-group
2574 @cindex nnkiboze
2575 Make a kiboze group.  You will be prompted for a name, for a regexp to
2576 match groups to be ``included'' in the kiboze group, and a series of
2577 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2578 @xref{Kibozed Groups}.
2579
2580 @item G D
2581 @kindex G D (Group)
2582 @findex gnus-group-enter-directory
2583 @cindex nneething
2584 Read an arbitrary directory as if it were a newsgroup with the
2585 @code{nneething} back end (@code{gnus-group-enter-directory}).
2586 @xref{Anything Groups}.
2587
2588 @item G f
2589 @kindex G f (Group)
2590 @findex gnus-group-make-doc-group
2591 @cindex ClariNet Briefs
2592 @cindex nndoc
2593 Make a group based on some file or other
2594 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2595 command, you will be prompted for a file name and a file type.
2596 Currently supported types are @code{mbox}, @code{babyl},
2597 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2598 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2599 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2600 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2601 you run this command without a prefix, Gnus will guess at the file
2602 type.  @xref{Document Groups}.
2603
2604 @item G u
2605 @kindex G u (Group)
2606 @vindex gnus-useful-groups
2607 @findex gnus-group-make-useful-group
2608 Create one of the groups mentioned in @code{gnus-useful-groups}
2609 (@code{gnus-group-make-useful-group}).
2610
2611 @item G w
2612 @kindex G w (Group)
2613 @findex gnus-group-make-web-group
2614 @cindex Google
2615 @cindex nnweb
2616 @cindex gmane
2617 Make an ephemeral group based on a web search
2618 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2619 command, make a solid group instead.  You will be prompted for the
2620 search engine type and the search string.  Valid search engine types
2621 include @code{google}, @code{dejanews}, and @code{gmane}.
2622 @xref{Web Searches}.
2623
2624 If you use the @code{google} search engine, you can limit the search
2625 to a particular group by using a match string like
2626 @samp{shaving group:alt.sysadmin.recovery}.
2627
2628 @item G DEL
2629 @kindex G DEL (Group)
2630 @findex gnus-group-delete-group
2631 This function will delete the current group
2632 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2633 actually delete all the articles in the group, and forcibly remove the
2634 group itself from the face of the Earth.  Use a prefix only if you are
2635 absolutely sure of what you are doing.  This command can't be used on
2636 read-only groups (like @code{nntp} group), though.
2637
2638 @item G V
2639 @kindex G V (Group)
2640 @findex gnus-group-make-empty-virtual
2641 Make a new, fresh, empty @code{nnvirtual} group
2642 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2643
2644 @item G v
2645 @kindex G v (Group)
2646 @findex gnus-group-add-to-virtual
2647 Add the current group to an @code{nnvirtual} group
2648 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2649 @end table
2650
2651 @xref{Select Methods}, for more information on the various select
2652 methods.
2653
2654 @vindex gnus-activate-foreign-newsgroups
2655 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2656 Gnus will check all foreign groups with this level or lower at startup.
2657 This might take quite a while, especially if you subscribe to lots of
2658 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2659 @code{gnus-activate-level} also affects activation of foreign
2660 newsgroups.
2661
2662
2663 @node Group Parameters
2664 @section Group Parameters
2665 @cindex group parameters
2666
2667 The group parameters store information local to a particular group.
2668 Here's an example group parameter list:
2669
2670 @example
2671 ((to-address . "ding@@gnus.org")
2672  (auto-expire . t))
2673 @end example
2674
2675 We see that each element consists of a ``dotted pair''---the thing before
2676 the dot is the key, while the thing after the dot is the value.  All the
2677 parameters have this form @emph{except} local variable specs, which are
2678 not dotted pairs, but proper lists.
2679
2680 Some parameters have correspondent customizable variables, each of which
2681 is an alist of regexps and values.
2682
2683 The following group parameters can be used:
2684
2685 @table @code
2686 @item to-address
2687 @cindex to-address
2688 Address used by when doing followups and new posts.
2689
2690 @example
2691 (to-address . "some@@where.com")
2692 @end example
2693
2694 This is primarily useful in mail groups that represent closed mailing
2695 lists---mailing lists where it's expected that everybody that writes to
2696 the mailing list is subscribed to it.  Since using this parameter
2697 ensures that the mail only goes to the mailing list itself, it means
2698 that members won't receive two copies of your followups.
2699
2700 Using @code{to-address} will actually work whether the group is foreign
2701 or not.  Let's say there's a group on the server that is called
2702 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2703 the articles from a mail-to-news gateway.  Posting directly to this
2704 group is therefore impossible---you have to send mail to the mailing
2705 list address instead.
2706
2707 See also @code{gnus-parameter-to-address-alist}.
2708
2709 @item to-list
2710 @cindex to-list
2711 Address used when doing @kbd{a} in that group.
2712
2713 @example
2714 (to-list . "some@@where.com")
2715 @end example
2716
2717 It is totally ignored
2718 when doing a followup---except that if it is present in a news group,
2719 you'll get mail group semantics when doing @kbd{f}.
2720
2721 If you do an @kbd{a} command in a mail group and you have neither a
2722 @code{to-list} group parameter nor a @code{to-address} group parameter,
2723 then a @code{to-list} group parameter will be added automatically upon
2724 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2725 @vindex gnus-add-to-list
2726
2727 If you do an @kbd{a} command in a mail group and you don't have a
2728 @code{to-list} group parameter, one will be added automatically upon
2729 sending the message.
2730
2731 @findex gnus-mailing-list-mode
2732 @cindex mail list groups
2733 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2734 entering summary buffer.
2735
2736 See also @code{gnus-parameter-to-list-alist}.
2737
2738 @anchor{subscribed}
2739 @item subscribed
2740 @cindex subscribed
2741 If this parameter is set to @code{t}, Gnus will consider the
2742 to-address and to-list parameters for this group as addresses of
2743 mailing lists you are subscribed to.  Giving Gnus this information is
2744 (only) a first step in getting it to generate correct Mail-Followup-To
2745 headers for your posts to these lists.  @xref{Mailing Lists, ,Mailing
2746 Lists, message, The Message Manual}, for a complete treatment of
2747 available MFT support.
2748
2749 See also @code{gnus-find-subscribed-addresses}, the function that
2750 directly uses this group parameter.
2751
2752 @item visible
2753 @cindex visible
2754 If the group parameter list has the element @code{(visible . t)},
2755 that group will always be visible in the Group buffer, regardless
2756 of whether it has any unread articles.
2757
2758 @item broken-reply-to
2759 @cindex broken-reply-to
2760 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2761 headers in this group are to be ignored, and for the header to be hidden
2762 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2763 can be useful if you're reading a mailing list group where the listserv
2764 has inserted @code{Reply-To} headers that point back to the listserv
2765 itself.  That is broken behavior.  So there!
2766
2767 @item to-group
2768 @cindex to-group
2769 Elements like @code{(to-group . "some.group.name")} means that all
2770 posts in that group will be sent to @code{some.group.name}.
2771
2772 @item newsgroup
2773 @cindex newsgroup
2774 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2775 will treat all responses as if they were responses to news articles.
2776 This can be useful if you have a mail group that's really a mirror of a
2777 news group.
2778
2779 @item gcc-self
2780 @cindex gcc-self
2781 If @code{(gcc-self . t)} is present in the group parameter list, newly
2782 composed messages will be @code{Gcc}'d to the current group.  If
2783 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2784 generated, if @code{(gcc-self . "string")} is present, this string will
2785 be inserted literally as a @code{gcc} header.  This parameter takes
2786 precedence over any default @code{Gcc} rules as described later
2787 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2788 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2789 a @code{nntp} server doesn't accept articles.
2790
2791 @item auto-expire
2792 @cindex auto-expire
2793 If the group parameter has an element that looks like @code{(auto-expire
2794 . t)}, all articles read will be marked as expirable.  For an
2795 alternative approach, @pxref{Expiring Mail}.
2796
2797 See also @code{gnus-auto-expirable-newsgroups}.
2798
2799 @item total-expire
2800 @cindex total-expire
2801 If the group parameter has an element that looks like
2802 @code{(total-expire . t)}, all read articles will be put through the
2803 expiry process, even if they are not marked as expirable.  Use with
2804 caution.  Unread, ticked and dormant articles are not eligible for
2805 expiry.
2806
2807 See also @code{gnus-total-expirable-newsgroups}.
2808
2809 @item expiry-wait
2810 @cindex expiry-wait
2811 @vindex nnmail-expiry-wait-function
2812 If the group parameter has an element that looks like
2813 @code{(expiry-wait . 10)}, this value will override any
2814 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2815 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2816 can either be a number of days (not necessarily an integer) or the
2817 symbols @code{never} or @code{immediate}.
2818
2819 @item score-file
2820 @cindex score file group parameter
2821 Elements that look like @code{(score-file . "file")} will make
2822 @file{file} into the current score file for the group in question.  All
2823 interactive score entries will be put into this file.
2824
2825 @item adapt-file
2826 @cindex adapt file group parameter
2827 Elements that look like @code{(adapt-file . "file")} will make
2828 @file{file} into the current adaptive file for the group in question.
2829 All adaptive score entries will be put into this file.
2830
2831 @item admin-address
2832 @cindex admin-address
2833 When unsubscribing from a mailing list you should never send the
2834 unsubscription notice to the mailing list itself.  Instead, you'd send
2835 messages to the administrative address.  This parameter allows you to
2836 put the admin address somewhere convenient.
2837
2838 @item display
2839 @cindex display
2840 Elements that look like @code{(display . MODE)} say which articles to
2841 display on entering the group.  Valid values are:
2842
2843 @table @code
2844 @item all
2845 Display all articles, both read and unread.
2846
2847 @item an integer
2848 Display the last @var{integer} articles in the group.  This is the same as
2849 entering the group with @kbd{C-u @var{integer}}.
2850
2851 @item default
2852 Display the default visible articles, which normally includes unread and
2853 ticked articles.
2854
2855 @item an array
2856 Display articles that satisfy a predicate.
2857
2858 Here are some examples:
2859
2860 @table @code
2861 @item [unread]
2862 Display only unread articles.
2863
2864 @item [not expire]
2865 Display everything except expirable articles.
2866
2867 @item [and (not reply) (not expire)]
2868 Display everything except expirable and articles you've already
2869 responded to.
2870 @end table
2871
2872 The available operators are @code{not}, @code{and} and @code{or}.
2873 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2874 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2875 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2876 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2877
2878 @end table
2879
2880 The @code{display} parameter works by limiting the summary buffer to
2881 the subset specified.  You can pop the limit by using the @kbd{/ w}
2882 command (@pxref{Limiting}).
2883
2884 @item comment
2885 @cindex comment
2886 Elements that look like @code{(comment . "This is a comment")} are
2887 arbitrary comments on the group.  You can display comments in the
2888 group line (@pxref{Group Line Specification}).
2889
2890 @item charset
2891 @cindex charset
2892 Elements that look like @code{(charset . iso-8859-1)} will make
2893 @code{iso-8859-1} the default charset; that is, the charset that will be
2894 used for all articles that do not specify a charset.
2895
2896 See also @code{gnus-group-charset-alist}.
2897
2898 @item ignored-charsets
2899 @cindex ignored-charset
2900 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2901 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2902 default charset will be used for decoding articles.
2903
2904 See also @code{gnus-group-ignored-charsets-alist}.
2905
2906 @item posting-style
2907 @cindex posting-style
2908 You can store additional posting style information for this group
2909 here (@pxref{Posting Styles}).  The format is that of an entry in the
2910 @code{gnus-posting-styles} alist, except that there's no regexp matching
2911 the group name (of course).  Style elements in this group parameter will
2912 take precedence over the ones found in @code{gnus-posting-styles}.
2913
2914 For instance, if you want a funky name and signature in this group only,
2915 instead of hacking @code{gnus-posting-styles}, you could put something
2916 like this in the group parameters:
2917
2918 @example
2919 (posting-style
2920   (name "Funky Name")
2921   ("X-My-Header" "Funky Value")
2922   (signature "Funky Signature"))
2923 @end example
2924
2925 @item post-method
2926 @cindex post-method
2927 If it is set, the value is used as the method for posting message
2928 instead of @code{gnus-post-method}.
2929
2930 @item banner
2931 @cindex banner
2932 An item like @code{(banner . @var{regexp})} causes any part of an article
2933 that matches the regular expression @var{regexp} to be stripped.  Instead of
2934 @var{regexp}, you can also use the symbol @code{signature} which strips the
2935 last signature or any of the elements of the alist
2936 @code{gnus-article-banner-alist}.
2937
2938 @item sieve
2939 @cindex sieve
2940 This parameter contains a Sieve test that should match incoming mail
2941 that should be placed in this group.  From this group parameter, a
2942 Sieve @samp{IF} control structure is generated, having the test as the
2943 condition and @samp{fileinto "group.name";} as the body.
2944
2945 For example, if the INBOX.list.sieve group has the @code{(sieve
2946 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2947 translating the group parameter into a Sieve script (@pxref{Sieve
2948 Commands}) the following Sieve code is generated:
2949
2950 @example
2951 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2952         fileinto \"INBOX.list.sieve\";
2953 @}
2954 @end example
2955
2956 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2957 Emacs Sieve}.
2958
2959 @item (@var{variable} @var{form})
2960 You can use the group parameters to set variables local to the group you
2961 are entering.  If you want to turn threading off in @samp{news.answers},
2962 you could put @code{(gnus-show-threads nil)} in the group parameters of
2963 that group.  @code{gnus-show-threads} will be made into a local variable
2964 in the summary buffer you enter, and the form @code{nil} will be
2965 @code{eval}ed there.
2966
2967 Note that this feature sets the variable locally to the summary buffer.
2968 But some variables are evaluated in the article buffer, or in the
2969 message buffer (of a reply or followup or otherwise newly created
2970 message).  As a workaround, it might help to add the variable in
2971 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2972 Stuff}.  So if you want to set @code{message-from-style} via the group
2973 parameters, then you may need the following statement elsewhere in your
2974 @file{~/.gnus} file:
2975 @lisp
2976 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2977 @end lisp
2978
2979 @vindex gnus-list-identifiers
2980 A use for this feature is to remove a mailing list identifier tag in
2981 the subject fields of articles.  E.g. if the news group
2982 @example
2983 nntp+news.gnus.org:gmane.text.docbook.apps
2984 @end example
2985 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2986 tag can be removed from the article subjects in the summary buffer for
2987 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2988 into the group parameters for the group.
2989
2990 This can also be used as a group-specific hook function, if you'd like.
2991 If you want to hear a beep when you enter a group, you could put
2992 something like @code{(dummy-variable (ding))} in the parameters of that
2993 group.  @code{dummy-variable} will be set to the result of the
2994 @code{(ding)} form, but who cares?
2995
2996 @end table
2997
2998 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2999 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3000 presents you with a Customize-like interface.  The latter helps avoid
3001 silly Lisp errors.)  You might also be interested in reading about topic
3002 parameters (@pxref{Topic Parameters}).
3003
3004 @vindex gnus-parameters
3005 Group parameters can be set via the @code{gnus-parameters} variable too.
3006 But some variables, such as @code{visible}, have no effect.  For
3007 example:
3008
3009 @lisp
3010 (setq gnus-parameters
3011       '(("mail\\..*"
3012          (gnus-show-threads nil)
3013          (gnus-use-scoring nil)
3014          (gnus-summary-line-format
3015           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3016          (gcc-self . t)
3017          (display . all))
3018
3019         ("^nnimap:\\(foo.bar\\)$"
3020          (to-group . "\\1"))
3021
3022         ("mail\\.me"
3023          (gnus-use-scoring  t))
3024
3025         ("list\\..*"
3026          (total-expire . t)
3027          (broken-reply-to . t))))
3028 @end lisp
3029
3030 String value of parameters will be subjected to regexp substitution, as
3031 the @code{to-group} example shows.
3032
3033
3034 @node Listing Groups
3035 @section Listing Groups
3036 @cindex group listing
3037
3038 These commands all list various slices of the groups available.
3039
3040 @table @kbd
3041
3042 @item l
3043 @itemx A s
3044 @kindex A s (Group)
3045 @kindex l (Group)
3046 @findex gnus-group-list-groups
3047 List all groups that have unread articles
3048 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3049 command will list only groups of level ARG and lower.  By default, it
3050 only lists groups of level five (i.e.,
3051 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3052 groups).
3053
3054 @item L
3055 @itemx A u
3056 @kindex A u (Group)
3057 @kindex L (Group)
3058 @findex gnus-group-list-all-groups
3059 List all groups, whether they have unread articles or not
3060 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3061 this command will list only groups of level ARG and lower.  By default,
3062 it lists groups of level seven or lower (i.e., just subscribed and
3063 unsubscribed groups).
3064
3065 @item A l
3066 @kindex A l (Group)
3067 @findex gnus-group-list-level
3068 List all unread groups on a specific level
3069 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3070 with no unread articles.
3071
3072 @item A k
3073 @kindex A k (Group)
3074 @findex gnus-group-list-killed
3075 List all killed groups (@code{gnus-group-list-killed}).  If given a
3076 prefix argument, really list all groups that are available, but aren't
3077 currently (un)subscribed.  This could entail reading the active file
3078 from the server.
3079
3080 @item A z
3081 @kindex A z (Group)
3082 @findex gnus-group-list-zombies
3083 List all zombie groups (@code{gnus-group-list-zombies}).
3084
3085 @item A m
3086 @kindex A m (Group)
3087 @findex gnus-group-list-matching
3088 List all unread, subscribed groups with names that match a regexp
3089 (@code{gnus-group-list-matching}).
3090
3091 @item A M
3092 @kindex A M (Group)
3093 @findex gnus-group-list-all-matching
3094 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3095
3096 @item A A
3097 @kindex A A (Group)
3098 @findex gnus-group-list-active
3099 List absolutely all groups in the active file(s) of the
3100 server(s) you are connected to (@code{gnus-group-list-active}).  This
3101 might very well take quite a while.  It might actually be a better idea
3102 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3103 thing to match on.  Also note that this command may list groups that
3104 don't exist (yet)---these will be listed as if they were killed groups.
3105 Take the output with some grains of salt.
3106
3107 @item A a
3108 @kindex A a (Group)
3109 @findex gnus-group-apropos
3110 List all groups that have names that match a regexp
3111 (@code{gnus-group-apropos}).
3112
3113 @item A d
3114 @kindex A d (Group)
3115 @findex gnus-group-description-apropos
3116 List all groups that have names or descriptions that match a regexp
3117 (@code{gnus-group-description-apropos}).
3118
3119 @item A c
3120 @kindex A c (Group)
3121 @findex gnus-group-list-cached
3122 List all groups with cached articles (@code{gnus-group-list-cached}).
3123
3124 @item A ?
3125 @kindex A ? (Group)
3126 @findex gnus-group-list-dormant
3127 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3128
3129 @item A /
3130 @kindex A / (Group)
3131 @findex gnus-group-list-limit
3132 List groups limited within the current selection
3133 (@code{gnus-group-list-limit}).
3134
3135 @item A f
3136 @kindex A f (Group)
3137 @findex gnus-group-list-flush
3138 Flush groups from the current selection (@code{gnus-group-list-flush}).
3139
3140 @item A p
3141 @kindex A p (Group)
3142 @findex gnus-group-list-plus
3143 List groups plus the current selection (@code{gnus-group-list-plus}).
3144
3145 @end table
3146
3147 @vindex gnus-permanently-visible-groups
3148 @cindex visible group parameter
3149 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3150 always be shown, whether they have unread articles or not.  You can also
3151 add the @code{visible} element to the group parameters in question to
3152 get the same effect.
3153
3154 @vindex gnus-list-groups-with-ticked-articles
3155 Groups that have just ticked articles in it are normally listed in the
3156 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3157 @code{nil}, these groups will be treated just like totally empty
3158 groups.  It is @code{t} by default.
3159
3160
3161 @node Sorting Groups
3162 @section Sorting Groups
3163 @cindex sorting groups
3164
3165 @kindex C-c C-s (Group)
3166 @findex gnus-group-sort-groups
3167 @vindex gnus-group-sort-function
3168 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3169 group buffer according to the function(s) given by the
3170 @code{gnus-group-sort-function} variable.  Available sorting functions
3171 include:
3172
3173 @table @code
3174
3175 @item gnus-group-sort-by-alphabet
3176 @findex gnus-group-sort-by-alphabet
3177 Sort the group names alphabetically.  This is the default.
3178
3179 @item gnus-group-sort-by-real-name
3180 @findex gnus-group-sort-by-real-name
3181 Sort the group alphabetically on the real (unprefixed) group names.
3182
3183 @item gnus-group-sort-by-level
3184 @findex gnus-group-sort-by-level
3185 Sort by group level.
3186
3187 @item gnus-group-sort-by-score
3188 @findex gnus-group-sort-by-score
3189 Sort by group score.  @xref{Group Score}.
3190
3191 @item gnus-group-sort-by-rank
3192 @findex gnus-group-sort-by-rank
3193 Sort by group score and then the group level.  The level and the score
3194 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3195
3196 @item gnus-group-sort-by-unread
3197 @findex gnus-group-sort-by-unread
3198 Sort by number of unread articles.
3199
3200 @item gnus-group-sort-by-method
3201 @findex gnus-group-sort-by-method
3202 Sort alphabetically on the select method.
3203
3204 @item gnus-group-sort-by-server
3205 @findex gnus-group-sort-by-server
3206 Sort alphabetically on the Gnus server name.
3207
3208
3209 @end table
3210
3211 @code{gnus-group-sort-function} can also be a list of sorting
3212 functions.  In that case, the most significant sort key function must be
3213 the last one.
3214
3215
3216 There are also a number of commands for sorting directly according to
3217 some sorting criteria:
3218
3219 @table @kbd
3220 @item G S a
3221 @kindex G S a (Group)
3222 @findex gnus-group-sort-groups-by-alphabet
3223 Sort the group buffer alphabetically by group name
3224 (@code{gnus-group-sort-groups-by-alphabet}).
3225
3226 @item G S u
3227 @kindex G S u (Group)
3228 @findex gnus-group-sort-groups-by-unread
3229 Sort the group buffer by the number of unread articles
3230 (@code{gnus-group-sort-groups-by-unread}).
3231
3232 @item G S l
3233 @kindex G S l (Group)
3234 @findex gnus-group-sort-groups-by-level
3235 Sort the group buffer by group level
3236 (@code{gnus-group-sort-groups-by-level}).
3237
3238 @item G S v
3239 @kindex G S v (Group)
3240 @findex gnus-group-sort-groups-by-score
3241 Sort the group buffer by group score
3242 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3243
3244 @item G S r
3245 @kindex G S r (Group)
3246 @findex gnus-group-sort-groups-by-rank
3247 Sort the group buffer by group rank
3248 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3249
3250 @item G S m
3251 @kindex G S m (Group)
3252 @findex gnus-group-sort-groups-by-method
3253 Sort the group buffer alphabetically by back end name@*
3254 (@code{gnus-group-sort-groups-by-method}).
3255
3256 @item G S n
3257 @kindex G S n (Group)
3258 @findex gnus-group-sort-groups-by-real-name
3259 Sort the group buffer alphabetically by real (unprefixed) group name
3260 (@code{gnus-group-sort-groups-by-real-name}).
3261
3262 @end table
3263
3264 All the commands below obey the process/prefix convention
3265 (@pxref{Process/Prefix}).
3266
3267 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3268 commands will sort in reverse order.
3269
3270 You can also sort a subset of the groups:
3271
3272 @table @kbd
3273 @item G P a
3274 @kindex G P a (Group)
3275 @findex gnus-group-sort-selected-groups-by-alphabet
3276 Sort the groups alphabetically by group name
3277 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3278
3279 @item G P u
3280 @kindex G P u (Group)
3281 @findex gnus-group-sort-selected-groups-by-unread
3282 Sort the groups by the number of unread articles
3283 (@code{gnus-group-sort-selected-groups-by-unread}).
3284
3285 @item G P l
3286 @kindex G P l (Group)
3287 @findex gnus-group-sort-selected-groups-by-level
3288 Sort the groups by group level
3289 (@code{gnus-group-sort-selected-groups-by-level}).
3290
3291 @item G P v
3292 @kindex G P v (Group)
3293 @findex gnus-group-sort-selected-groups-by-score
3294 Sort the groups by group score
3295 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3296
3297 @item G P r
3298 @kindex G P r (Group)
3299 @findex gnus-group-sort-selected-groups-by-rank
3300 Sort the groups by group rank
3301 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3302
3303 @item G P m
3304 @kindex G P m (Group)
3305 @findex gnus-group-sort-selected-groups-by-method
3306 Sort the groups alphabetically by back end name@*
3307 (@code{gnus-group-sort-selected-groups-by-method}).
3308
3309 @item G P n
3310 @kindex G P n (Group)
3311 @findex gnus-group-sort-selected-groups-by-real-name
3312 Sort the groups alphabetically by real (unprefixed) group name
3313 (@code{gnus-group-sort-selected-groups-by-real-name}).
3314
3315 @item G P s
3316 @kindex G P s (Group)
3317 @findex gnus-group-sort-selected-groups
3318 Sort the groups according to @code{gnus-group-sort-function}.
3319
3320 @end table
3321
3322 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3323 move groups around.
3324
3325
3326 @node Group Maintenance
3327 @section Group Maintenance
3328 @cindex bogus groups
3329
3330 @table @kbd
3331 @item b
3332 @kindex b (Group)
3333 @findex gnus-group-check-bogus-groups
3334 Find bogus groups and delete them
3335 (@code{gnus-group-check-bogus-groups}).
3336
3337 @item F
3338 @kindex F (Group)
3339 @findex gnus-group-find-new-groups
3340 Find new groups and process them (@code{gnus-group-find-new-groups}).
3341 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3342 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3343 to query the server for new groups, and subscribe the new groups as
3344 zombies.
3345
3346 @item C-c C-x
3347 @kindex C-c C-x (Group)
3348 @findex gnus-group-expire-articles
3349 Run all expirable articles in the current group through the expiry
3350 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3351 all expirable articles in the group that have been around for a while.
3352 (@pxref{Expiring Mail}).
3353
3354 @item C-c C-M-x
3355 @kindex C-c C-M-x (Group)
3356 @findex gnus-group-expire-all-groups
3357 Run all expirable articles in all groups through the expiry process
3358 (@code{gnus-group-expire-all-groups}).
3359
3360 @end table
3361
3362
3363 @node Browse Foreign Server
3364 @section Browse Foreign Server
3365 @cindex foreign servers
3366 @cindex browsing servers
3367
3368 @table @kbd
3369 @item B
3370 @kindex B (Group)
3371 @findex gnus-group-browse-foreign-server
3372 You will be queried for a select method and a server name.  Gnus will
3373 then attempt to contact this server and let you browse the groups there
3374 (@code{gnus-group-browse-foreign-server}).
3375 @end table
3376
3377 @findex gnus-browse-mode
3378 A new buffer with a list of available groups will appear.  This buffer
3379 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3380 a lot) like a normal group buffer.
3381
3382 Here's a list of keystrokes available in the browse mode:
3383
3384 @table @kbd
3385 @item n
3386 @kindex n (Browse)
3387 @findex gnus-group-next-group
3388 Go to the next group (@code{gnus-group-next-group}).
3389
3390 @item p
3391 @kindex p (Browse)
3392 @findex gnus-group-prev-group
3393 Go to the previous group (@code{gnus-group-prev-group}).
3394
3395 @item SPACE
3396 @kindex SPACE (Browse)
3397 @findex gnus-browse-read-group
3398 Enter the current group and display the first article
3399 (@code{gnus-browse-read-group}).
3400
3401 @item RET
3402 @kindex RET (Browse)
3403 @findex gnus-browse-select-group
3404 Enter the current group (@code{gnus-browse-select-group}).
3405
3406 @item u
3407 @kindex u (Browse)
3408 @findex gnus-browse-unsubscribe-current-group
3409 Unsubscribe to the current group, or, as will be the case here,
3410 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3411
3412 @item l
3413 @itemx q
3414 @kindex q (Browse)
3415 @kindex l (Browse)
3416 @findex gnus-browse-exit
3417 Exit browse mode (@code{gnus-browse-exit}).
3418
3419 @item d
3420 @kindex d (Browse)
3421 @findex gnus-browse-describe-group
3422 Describe the current group (@code{gnus-browse-describe-group}).
3423
3424 @item ?
3425 @kindex ? (Browse)
3426 @findex gnus-browse-describe-briefly
3427 Describe browse mode briefly (well, there's not much to describe, is
3428 there) (@code{gnus-browse-describe-briefly}).
3429 @end table
3430
3431
3432 @node Exiting Gnus
3433 @section Exiting Gnus
3434 @cindex exiting Gnus
3435
3436 Yes, Gnus is ex(c)iting.
3437
3438 @table @kbd
3439 @item z
3440 @kindex z (Group)
3441 @findex gnus-group-suspend
3442 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3443 but it kills all buffers except the Group buffer.  I'm not sure why this
3444 is a gain, but then who am I to judge?
3445
3446 @item q
3447 @kindex q (Group)
3448 @findex gnus-group-exit
3449 @c @icon{gnus-group-exit}
3450 Quit Gnus (@code{gnus-group-exit}).
3451
3452 @item Q
3453 @kindex Q (Group)
3454 @findex gnus-group-quit
3455 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3456 The dribble file will be saved, though (@pxref{Auto Save}).
3457 @end table
3458
3459 @vindex gnus-exit-gnus-hook
3460 @vindex gnus-suspend-gnus-hook
3461 @vindex gnus-after-exiting-gnus-hook
3462 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3463 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3464 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3465 exiting Gnus.
3466
3467 Note:
3468
3469 @quotation
3470 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3471 numbly heavy and herself fall into a hazy trance as the boy sitting
3472 behind her drew repeated lines with his pencil across the back of her
3473 plastic chair.
3474 @end quotation
3475
3476
3477 @node Group Topics
3478 @section Group Topics
3479 @cindex topics
3480
3481 If you read lots and lots of groups, it might be convenient to group
3482 them hierarchically according to topics.  You put your Emacs groups over
3483 here, your sex groups over there, and the rest (what, two groups or so?)
3484 you put in some misc section that you never bother with anyway.  You can
3485 even group the Emacs sex groups as a sub-topic to either the Emacs
3486 groups or the sex groups---or both!  Go wild!
3487
3488 @iftex
3489 @iflatex
3490 \gnusfigure{Group Topics}{400}{
3491 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3492 }
3493 @end iflatex
3494 @end iftex
3495
3496 Here's an example:
3497
3498 @example
3499 Gnus
3500   Emacs -- I wuw it!
3501      3: comp.emacs
3502      2: alt.religion.emacs
3503     Naughty Emacs
3504      452: alt.sex.emacs
3505        0: comp.talk.emacs.recovery
3506   Misc
3507      8: comp.binaries.fractals
3508     13: comp.sources.unix
3509 @end example
3510
3511 @findex gnus-topic-mode
3512 @kindex t (Group)
3513 To get this @emph{fab} functionality you simply turn on (ooh!) the
3514 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3515 is a toggling command.)
3516
3517 Go ahead, just try it.  I'll still be here when you get back.  La de
3518 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3519 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3520 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3521 Hot and bothered?
3522
3523 If you want this permanently enabled, you should add that minor mode to
3524 the hook for the group mode.  Put the following line in your
3525 @file{~/.gnus.el} file:
3526
3527 @lisp
3528 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3529 @end lisp
3530
3531 @menu
3532 * Topic Commands::              Interactive E-Z commands.
3533 * Topic Variables::             How to customize the topics the Lisp Way.
3534 * Topic Sorting::               Sorting each topic individually.
3535 * Topic Topology::              A map of the world.
3536 * Topic Parameters::            Parameters that apply to all groups in a topic.
3537 @end menu
3538
3539
3540 @node Topic Commands
3541 @subsection Topic Commands
3542 @cindex topic commands
3543
3544 When the topic minor mode is turned on, a new @kbd{T} submap will be
3545 available.  In addition, a few of the standard keys change their
3546 definitions slightly.
3547
3548 In general, the following kinds of operations are possible on topics.
3549 First of all, you want to create topics.  Secondly, you want to put
3550 groups in topics and to move them around until you have an order you
3551 like.  The third kind of operation is to show/hide parts of the whole
3552 shebang.  You might want to hide a topic including its subtopics and
3553 groups, to get a better overview of the other groups.
3554
3555 Here is a list of the basic keys that you might need to set up topics
3556 the way you like.
3557
3558 @table @kbd
3559
3560 @item T n
3561 @kindex T n (Topic)
3562 @findex gnus-topic-create-topic
3563 Prompt for a new topic name and create it
3564 (@code{gnus-topic-create-topic}).
3565
3566 @item T TAB
3567 @itemx TAB
3568 @kindex T TAB (Topic)
3569 @kindex TAB (Topic)
3570 @findex gnus-topic-indent
3571 ``Indent'' the current topic so that it becomes a sub-topic of the
3572 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3573 ``un-indent'' the topic instead.
3574
3575 @item M-TAB
3576 @kindex M-TAB (Topic)
3577 @findex gnus-topic-unindent
3578 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3579 parent of its current parent (@code{gnus-topic-unindent}).
3580
3581 @end table
3582
3583 The following two keys can be used to move groups and topics around.
3584 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3585 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3586 kill and yank rather than cut and paste.
3587
3588 @table @kbd
3589
3590 @item C-k
3591 @kindex C-k (Topic)
3592 @findex gnus-topic-kill-group
3593 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3594 topic will be removed along with the topic.
3595
3596 @item C-y
3597 @kindex C-y (Topic)
3598 @findex gnus-topic-yank-group
3599 Yank the previously killed group or topic
3600 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3601 before all groups.
3602
3603 So, to move a topic to the beginning of the list of topics, just hit
3604 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3605 move the cursor to the beginning of the buffer (just below the ``Gnus''
3606 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3607 paste.  Like I said -- E-Z.
3608
3609 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3610 you can move topics around as well as groups.
3611
3612 @end table
3613
3614 After setting up the topics the way you like them, you might wish to
3615 hide a topic, or to show it again.  That's why we have the following
3616 key.
3617
3618 @table @kbd
3619
3620 @item RET
3621 @kindex RET (Topic)
3622 @findex gnus-topic-select-group
3623 @itemx SPACE
3624 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3625 When you perform this command on a group, you'll enter the group, as
3626 usual.  When done on a topic line, the topic will be folded (if it was
3627 visible) or unfolded (if it was folded already).  So it's basically a
3628 toggling command on topics.  In addition, if you give a numerical
3629 prefix, group on that level (and lower) will be displayed.
3630
3631 @end table
3632
3633 Now for a list of other commands, in no particular order.
3634
3635 @table @kbd
3636
3637 @item T m
3638 @kindex T m (Topic)
3639 @findex gnus-topic-move-group
3640 Move the current group to some other topic
3641 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3642 convention (@pxref{Process/Prefix}).
3643
3644 @item T j
3645 @kindex T j (Topic)
3646 @findex gnus-topic-jump-to-topic
3647 Go to a topic (@code{gnus-topic-jump-to-topic}).
3648
3649 @item T c
3650 @kindex T c (Topic)
3651 @findex gnus-topic-copy-group
3652 Copy the current group to some other topic
3653 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3654 convention (@pxref{Process/Prefix}).
3655
3656 @item T h
3657 @kindex T h (Topic)
3658 @findex gnus-topic-hide-topic
3659 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3660 a prefix, hide the topic permanently.
3661
3662 @item T s
3663 @kindex T s (Topic)
3664 @findex gnus-topic-show-topic
3665 Show the current topic (@code{gnus-topic-show-topic}).  If given
3666 a prefix, show the topic permanently.
3667
3668 @item T D
3669 @kindex T D (Topic)
3670 @findex gnus-topic-remove-group
3671 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3672 This command is mainly useful if you have the same group in several
3673 topics and wish to remove it from one of the topics.  You may also
3674 remove a group from all topics, but in that case, Gnus will add it to
3675 the root topic the next time you start Gnus.  In fact, all new groups
3676 (which, naturally, don't belong to any topic) will show up in the root
3677 topic.
3678
3679 This command uses the process/prefix convention
3680 (@pxref{Process/Prefix}).
3681
3682 @item T M
3683 @kindex T M (Topic)
3684 @findex gnus-topic-move-matching
3685 Move all groups that match some regular expression to a topic
3686 (@code{gnus-topic-move-matching}).
3687
3688 @item T C
3689 @kindex T C (Topic)
3690 @findex gnus-topic-copy-matching
3691 Copy all groups that match some regular expression to a topic
3692 (@code{gnus-topic-copy-matching}).
3693
3694 @item T H
3695 @kindex T H (Topic)
3696 @findex gnus-topic-toggle-display-empty-topics
3697 Toggle hiding empty topics
3698 (@code{gnus-topic-toggle-display-empty-topics}).
3699
3700 @item T #
3701 @kindex T # (Topic)
3702 @findex gnus-topic-mark-topic
3703 Mark all groups in the current topic with the process mark
3704 (@code{gnus-topic-mark-topic}).  This command works recursively on
3705 sub-topics unless given a prefix.
3706
3707 @item T M-#
3708 @kindex T M-# (Topic)
3709 @findex gnus-topic-unmark-topic
3710 Remove the process mark from all groups in the current topic
3711 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3712 sub-topics unless given a prefix.
3713
3714 @item C-c C-x
3715 @kindex C-c C-x (Topic)
3716 @findex gnus-topic-expire-articles
3717 Run all expirable articles in the current group or topic through the
3718 expiry process (if any)
3719 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3720
3721 @item T r
3722 @kindex T r (Topic)
3723 @findex gnus-topic-rename
3724 Rename a topic (@code{gnus-topic-rename}).
3725
3726 @item T DEL
3727 @kindex T DEL (Topic)
3728 @findex gnus-topic-delete
3729 Delete an empty topic (@code{gnus-topic-delete}).
3730
3731 @item A T
3732 @kindex A T (Topic)
3733 @findex gnus-topic-list-active
3734 List all groups that Gnus knows about in a topics-ified way
3735 (@code{gnus-topic-list-active}).
3736
3737 @item T M-n
3738 @kindex T M-n (Topic)
3739 @findex gnus-topic-goto-next-topic
3740 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3741
3742 @item T M-p
3743 @kindex T M-p (Topic)
3744 @findex gnus-topic-goto-previous-topic
3745 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3746
3747 @item G p
3748 @kindex G p (Topic)
3749 @findex gnus-topic-edit-parameters
3750 @cindex group parameters
3751 @cindex topic parameters
3752 @cindex parameters
3753 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3754 @xref{Topic Parameters}.
3755
3756 @end table
3757
3758
3759 @node Topic Variables
3760 @subsection Topic Variables
3761 @cindex topic variables
3762
3763 The previous section told you how to tell Gnus which topics to display.
3764 This section explains how to tell Gnus what to display about each topic.
3765
3766 @vindex gnus-topic-line-format
3767 The topic lines themselves are created according to the
3768 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3769 Valid elements are:
3770
3771 @table @samp
3772 @item i
3773 Indentation.
3774 @item n
3775 Topic name.
3776 @item v
3777 Visibility.
3778 @item l
3779 Level.
3780 @item g
3781 Number of groups in the topic.
3782 @item a
3783 Number of unread articles in the topic.
3784 @item A
3785 Number of unread articles in the topic and all its subtopics.
3786 @end table
3787
3788 @vindex gnus-topic-indent-level
3789 Each sub-topic (and the groups in the sub-topics) will be indented with
3790 @code{gnus-topic-indent-level} times the topic level number of spaces.
3791 The default is 2.
3792
3793 @vindex gnus-topic-mode-hook
3794 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3795
3796 @vindex gnus-topic-display-empty-topics
3797 The @code{gnus-topic-display-empty-topics} says whether to display even
3798 topics that have no unread articles in them.  The default is @code{t}.
3799
3800
3801 @node Topic Sorting
3802 @subsection Topic Sorting
3803 @cindex topic sorting
3804
3805 You can sort the groups in each topic individually with the following
3806 commands:
3807
3808
3809 @table @kbd
3810 @item T S a
3811 @kindex T S a (Topic)
3812 @findex gnus-topic-sort-groups-by-alphabet
3813 Sort the current topic alphabetically by group name
3814 (@code{gnus-topic-sort-groups-by-alphabet}).
3815
3816 @item T S u
3817 @kindex T S u (Topic)
3818 @findex gnus-topic-sort-groups-by-unread
3819 Sort the current topic by the number of unread articles
3820 (@code{gnus-topic-sort-groups-by-unread}).
3821
3822 @item T S l
3823 @kindex T S l (Topic)
3824 @findex gnus-topic-sort-groups-by-level
3825 Sort the current topic by group level
3826 (@code{gnus-topic-sort-groups-by-level}).
3827
3828 @item T S v
3829 @kindex T S v (Topic)
3830 @findex gnus-topic-sort-groups-by-score
3831 Sort the current topic by group score
3832 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3833
3834 @item T S r
3835 @kindex T S r (Topic)
3836 @findex gnus-topic-sort-groups-by-rank
3837 Sort the current topic by group rank
3838 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3839
3840 @item T S m
3841 @kindex T S m (Topic)
3842 @findex gnus-topic-sort-groups-by-method
3843 Sort the current topic alphabetically by back end name
3844 (@code{gnus-topic-sort-groups-by-method}).
3845
3846 @item T S e
3847 @kindex T S e (Topic)
3848 @findex gnus-topic-sort-groups-by-server
3849 Sort the current topic alphabetically by server name
3850 (@code{gnus-topic-sort-groups-by-server}).
3851
3852 @item T S s
3853 @kindex T S s
3854 @findex gnus-topic-sort-groups
3855 Sort the current topic according to the function(s) given by the
3856 @code{gnus-group-sort-function} variable
3857 (@code{gnus-topic-sort-groups}).
3858
3859 @end table
3860
3861 When given a prefix argument, all these commands will sort in reverse
3862 order.  @xref{Sorting Groups}, for more information about group
3863 sorting.
3864
3865
3866 @node Topic Topology
3867 @subsection Topic Topology
3868 @cindex topic topology
3869 @cindex topology
3870
3871 So, let's have a look at an example group buffer:
3872
3873 @example
3874 @group
3875 Gnus
3876   Emacs -- I wuw it!
3877      3: comp.emacs
3878      2: alt.religion.emacs
3879     Naughty Emacs
3880      452: alt.sex.emacs
3881        0: comp.talk.emacs.recovery
3882   Misc
3883      8: comp.binaries.fractals
3884     13: comp.sources.unix
3885 @end group
3886 @end example
3887
3888 So, here we have one top-level topic (@samp{Gnus}), two topics under
3889 that, and one sub-topic under one of the sub-topics.  (There is always
3890 just one (1) top-level topic).  This topology can be expressed as
3891 follows:
3892
3893 @lisp
3894 (("Gnus" visible)
3895  (("Emacs -- I wuw it!" visible)
3896   (("Naughty Emacs" visible)))
3897  (("Misc" visible)))
3898 @end lisp
3899
3900 @vindex gnus-topic-topology
3901 This is in fact how the variable @code{gnus-topic-topology} would look
3902 for the display above.  That variable is saved in the @file{.newsrc.eld}
3903 file, and shouldn't be messed with manually---unless you really want
3904 to.  Since this variable is read from the @file{.newsrc.eld} file,
3905 setting it in any other startup files will have no effect.
3906
3907 This topology shows what topics are sub-topics of what topics (right),
3908 and which topics are visible.  Two settings are currently
3909 allowed---@code{visible} and @code{invisible}.
3910
3911
3912 @node Topic Parameters
3913 @subsection Topic Parameters
3914 @cindex topic parameters
3915
3916 All groups in a topic will inherit group parameters from the parent (and
3917 ancestor) topic parameters.  All valid group parameters are valid topic
3918 parameters (@pxref{Group Parameters}).
3919
3920 In addition, the following parameters are only valid as topic
3921 parameters:
3922
3923 @table @code
3924 @item subscribe
3925 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3926 @code{subscribe} topic parameter says what groups go in what topic.  Its
3927 value should be a regexp to match the groups that should go in that
3928 topic.
3929
3930 @item subscribe-level
3931 When subscribing new groups by topic (see the @code{subscribe} parameter),
3932 the group will be subscribed with the level specified in the
3933 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3934
3935 @end table
3936
3937 Group parameters (of course) override topic parameters, and topic
3938 parameters in sub-topics override topic parameters in super-topics.  You
3939 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3940 verb, although you may feel free to disagree with me here.)
3941
3942 @example
3943 Gnus
3944   Emacs
3945      3: comp.emacs
3946      2: alt.religion.emacs
3947    452: alt.sex.emacs
3948     Relief
3949      452: alt.sex.emacs
3950        0: comp.talk.emacs.recovery
3951   Misc
3952      8: comp.binaries.fractals
3953     13: comp.sources.unix
3954    452: alt.sex.emacs
3955 @end example
3956
3957 The @samp{Emacs} topic has the topic parameter @code{(score-file
3958 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3959 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3960 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3961 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3962 . "religion.SCORE")}.
3963
3964 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3965 will get the @file{relief.SCORE} home score file.  If you enter the same
3966 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3967 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3968 get the @file{religion.SCORE} home score file.
3969
3970 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3971 there are some problems, especially with the @code{total-expiry}
3972 parameter.  Say you have a mail group in two topics; one with
3973 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3974 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3975 of these topics you mean to expire articles from, so anything may
3976 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3977 happens.  You just have to be careful if you do stuff like that.
3978
3979
3980 @node Misc Group Stuff
3981 @section Misc Group Stuff
3982
3983 @menu
3984 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3985 * Group Information::           Information and help on groups and Gnus.
3986 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3987 * File Commands::               Reading and writing the Gnus files.
3988 * Sieve Commands::              Managing Sieve scripts.
3989 @end menu
3990
3991 @table @kbd
3992
3993 @item ^
3994 @kindex ^ (Group)
3995 @findex gnus-group-enter-server-mode
3996 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3997 @xref{Server Buffer}.
3998
3999 @item a
4000 @kindex a (Group)
4001 @findex gnus-group-post-news
4002 Start composing a message (a news by default)
4003 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4004 under the point.  If the prefix is 1, prompt for a group to post to.
4005 Contrary to what the name of this function suggests, the prepared
4006 article might be a mail instead of a news, if a mail group is specified
4007 with the prefix argument.  @xref{Composing Messages}.
4008
4009 @item m
4010 @kindex m (Group)
4011 @findex gnus-group-mail
4012 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4013 use the posting style of the group under the point.  If the prefix is 1,
4014 prompt for a group name to find the posting style.
4015 @xref{Composing Messages}.
4016
4017 @item i
4018 @kindex i (Group)
4019 @findex gnus-group-news
4020 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4021 post to the group under the point.  If the prefix is 1, prompt
4022 for group to post to.  @xref{Composing Messages}.
4023
4024 This function actually prepares a news even when using mail groups.
4025 This is useful for ``posting'' messages to mail groups without actually
4026 sending them over the network: they're just saved directly to the group
4027 in question.  The corresponding back end must have a request-post method
4028 for this to work though.
4029
4030 @end table
4031
4032 Variables for the group buffer:
4033
4034 @table @code
4035
4036 @item gnus-group-mode-hook
4037 @vindex gnus-group-mode-hook
4038 is called after the group buffer has been
4039 created.
4040
4041 @item gnus-group-prepare-hook
4042 @vindex gnus-group-prepare-hook
4043 is called after the group buffer is
4044 generated.  It may be used to modify the buffer in some strange,
4045 unnatural way.
4046
4047 @item gnus-group-prepared-hook
4048 @vindex gnus-group-prepare-hook
4049 is called as the very last thing after the group buffer has been
4050 generated.  It may be used to move point around, for instance.
4051
4052 @item gnus-permanently-visible-groups
4053 @vindex gnus-permanently-visible-groups
4054 Groups matching this regexp will always be listed in the group buffer,
4055 whether they are empty or not.
4056
4057 @item gnus-group-name-charset-method-alist
4058 @vindex gnus-group-name-charset-method-alist
4059 An alist of method and the charset for group names.  It is used to show
4060 non-@acronym{ASCII} group names.
4061
4062 For example:
4063 @lisp
4064 (setq gnus-group-name-charset-method-alist
4065     '(((nntp "news.com.cn") . cn-gb-2312)))
4066 @end lisp
4067
4068 @item gnus-group-name-charset-group-alist
4069 @cindex UTF-8 group names
4070 @vindex gnus-group-name-charset-group-alist
4071 An alist of regexp of group name and the charset for group names.  It
4072 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4073 utf-8))} is the default value if UTF-8 is supported, otherwise the
4074 default is @code{nil}.
4075
4076 For example:
4077 @lisp
4078 (setq gnus-group-name-charset-group-alist
4079     '(("\\.com\\.cn:" . cn-gb-2312)))
4080 @end lisp
4081
4082 @end table
4083
4084 @node Scanning New Messages
4085 @subsection Scanning New Messages
4086 @cindex new messages
4087 @cindex scanning new news
4088
4089 @table @kbd
4090
4091 @item g
4092 @kindex g (Group)
4093 @findex gnus-group-get-new-news
4094 @c @icon{gnus-group-get-new-news}
4095 Check the server(s) for new articles.  If the numerical prefix is used,
4096 this command will check only groups of level @var{arg} and lower
4097 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4098 command will force a total re-reading of the active file(s) from the
4099 back end(s).
4100
4101 @item M-g
4102 @kindex M-g (Group)
4103 @findex gnus-group-get-new-news-this-group
4104 @vindex gnus-goto-next-group-when-activating
4105 @c @icon{gnus-group-get-new-news-this-group}
4106 Check whether new articles have arrived in the current group
4107 (@code{gnus-group-get-new-news-this-group}).
4108 @code{gnus-goto-next-group-when-activating} says whether this command is
4109 to move point to the next group or not.  It is @code{t} by default.
4110
4111 @findex gnus-activate-all-groups
4112 @cindex activating groups
4113 @item C-c M-g
4114 @kindex C-c M-g (Group)
4115 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4116
4117 @item R
4118 @kindex R (Group)
4119 @cindex restarting
4120 @findex gnus-group-restart
4121 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4122 file(s), closes the connection to all servers, clears up all run-time
4123 Gnus variables, and then starts Gnus all over again.
4124
4125 @end table
4126
4127 @vindex gnus-get-new-news-hook
4128 @code{gnus-get-new-news-hook} is run just before checking for new news.
4129
4130 @vindex gnus-after-getting-new-news-hook
4131 @code{gnus-after-getting-new-news-hook} is run after checking for new
4132 news.
4133
4134
4135 @node Group Information
4136 @subsection Group Information
4137 @cindex group information
4138 @cindex information on groups
4139
4140 @table @kbd
4141
4142
4143 @item H f
4144 @kindex H f (Group)
4145 @findex gnus-group-fetch-faq
4146 @vindex gnus-group-faq-directory
4147 @cindex FAQ
4148 @cindex ange-ftp
4149 Try to fetch the @acronym{FAQ} for the current group
4150 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4151 from @code{gnus-group-faq-directory}, which is usually a directory on
4152 a remote machine.  This variable can also be a list of directories.
4153 In that case, giving a prefix to this command will allow you to choose
4154 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4155 used for fetching the file.
4156
4157 If fetching from the first site is unsuccessful, Gnus will attempt to go
4158 through @code{gnus-group-faq-directory} and try to open them one by one.
4159
4160 @item H c
4161 @kindex H c (Group)
4162 @findex gnus-group-fetch-charter
4163 @vindex gnus-group-charter-alist
4164 @cindex charter
4165 Try to open the charter for the current group in a web browser
4166 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4167 prefix argument.
4168
4169 Gnus will use @code{gnus-group-charter-alist} to find the location of
4170 the charter.  If no location is known, Gnus will fetch the control
4171 messages for the group, which in some cases includes the charter.
4172
4173 @item H C
4174 @kindex H C (Group)
4175 @findex gnus-group-fetch-control
4176 @vindex gnus-group-fetch-control-use-browse-url
4177 @cindex control message
4178 Fetch the control messages for the group from the archive at
4179 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4180 group if given a prefix argument.
4181
4182 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4183 Gnus will open the control messages in a browser using
4184 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4185 and displayed in an ephemeral group.
4186
4187 Note that the control messages are compressed.  To use this command
4188 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4189 Files, ,Compressed Files, emacs, The Emacs Manual}).
4190
4191 @item H d
4192 @itemx C-c C-d
4193 @c @icon{gnus-group-describe-group}
4194 @kindex H d (Group)
4195 @kindex C-c C-d (Group)
4196 @cindex describing groups
4197 @cindex group description
4198 @findex gnus-group-describe-group
4199 Describe the current group (@code{gnus-group-describe-group}).  If given
4200 a prefix, force Gnus to re-read the description from the server.
4201
4202 @item M-d
4203 @kindex M-d (Group)
4204 @findex gnus-group-describe-all-groups
4205 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4206 prefix, force Gnus to re-read the description file from the server.
4207
4208 @item H v
4209 @itemx V
4210 @kindex V (Group)
4211 @kindex H v (Group)
4212 @cindex version
4213 @findex gnus-version
4214 Display current Gnus version numbers (@code{gnus-version}).
4215
4216 @item ?
4217 @kindex ? (Group)
4218 @findex gnus-group-describe-briefly
4219 Give a very short help message (@code{gnus-group-describe-briefly}).
4220
4221 @item C-c C-i
4222 @kindex C-c C-i (Group)
4223 @cindex info
4224 @cindex manual
4225 @findex gnus-info-find-node
4226 Go to the Gnus info node (@code{gnus-info-find-node}).
4227 @end table
4228
4229
4230 @node Group Timestamp
4231 @subsection Group Timestamp
4232 @cindex timestamps
4233 @cindex group timestamps
4234
4235 It can be convenient to let Gnus keep track of when you last read a
4236 group.  To set the ball rolling, you should add
4237 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4238
4239 @lisp
4240 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4241 @end lisp
4242
4243 After doing this, each time you enter a group, it'll be recorded.
4244
4245 This information can be displayed in various ways---the easiest is to
4246 use the @samp{%d} spec in the group line format:
4247
4248 @lisp
4249 (setq gnus-group-line-format
4250       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4251 @end lisp
4252
4253 This will result in lines looking like:
4254
4255 @example
4256 *        0: mail.ding                                19961002T012943
4257          0: custom                                   19961002T012713
4258 @end example
4259
4260 As you can see, the date is displayed in compact ISO 8601 format.  This
4261 may be a bit too much, so to just display the date, you could say
4262 something like:
4263
4264 @lisp
4265 (setq gnus-group-line-format
4266       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4267 @end lisp
4268
4269 If you would like greater control of the time format, you can use a
4270 user-defined format spec.  Something like the following should do the
4271 trick:
4272
4273 @lisp
4274 (setq gnus-group-line-format
4275       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4276 (defun gnus-user-format-function-d (headers)
4277   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4278     (if time
4279         (format-time-string "%b %d  %H:%M" time)
4280       "")))
4281 @end lisp
4282
4283
4284 @node File Commands
4285 @subsection File Commands
4286 @cindex file commands
4287
4288 @table @kbd
4289
4290 @item r
4291 @kindex r (Group)
4292 @findex gnus-group-read-init-file
4293 @vindex gnus-init-file
4294 @cindex reading init file
4295 Re-read the init file (@code{gnus-init-file}, which defaults to
4296 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4297
4298 @item s
4299 @kindex s (Group)
4300 @findex gnus-group-save-newsrc
4301 @cindex saving .newsrc
4302 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4303 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4304 file(s) whether Gnus thinks it is necessary or not.
4305
4306 @c @item Z
4307 @c @kindex Z (Group)
4308 @c @findex gnus-group-clear-dribble
4309 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4310
4311 @end table
4312
4313
4314 @node Sieve Commands
4315 @subsection Sieve Commands
4316 @cindex group sieve commands
4317
4318 Sieve is a server-side mail filtering language.  In Gnus you can use
4319 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4320 sieve rules that should apply to each group.  Gnus provides two
4321 commands to translate all these group parameters into a proper Sieve
4322 script that can be transfered to the server somehow.
4323
4324 @vindex gnus-sieve-file
4325 @vindex gnus-sieve-region-start
4326 @vindex gnus-sieve-region-end
4327 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4328 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4329 between two delimiters, @code{gnus-sieve-region-start} and
4330 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4331 outside these delimiters that will not be removed the next time you
4332 regenerate the Sieve script.
4333
4334 @vindex gnus-sieve-crosspost
4335 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4336 is generated.  If it is non-@code{nil} (the default) articles is
4337 placed in all groups that have matching rules, otherwise the article
4338 is only placed in the group with the first matching rule.  For
4339 example, the group parameter @samp{(sieve address "sender"
4340 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4341 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4342 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4343 except that the line containing the call to @code{stop} is removed.)
4344
4345 @example
4346 if address "sender" "owner-ding@@hpc.uh.edu" @{
4347         fileinto "INBOX.ding";
4348         stop;
4349 @}
4350 @end example
4351
4352 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4353
4354 @table @kbd
4355
4356 @item D g
4357 @kindex D g (Group)
4358 @findex gnus-sieve-generate
4359 @vindex gnus-sieve-file
4360 @cindex generating sieve script
4361 Regenerate a Sieve script from the @code{sieve} group parameters and
4362 put you into the @code{gnus-sieve-file} without saving it.
4363
4364 @item D u
4365 @kindex D u (Group)
4366 @findex gnus-sieve-update
4367 @vindex gnus-sieve-file
4368 @cindex updating sieve script
4369 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4370 @code{sieve} group parameters, save the file and upload it to the
4371 server using the @code{sieveshell} program.
4372
4373 @end table
4374
4375
4376 @node Summary Buffer
4377 @chapter Summary Buffer
4378 @cindex summary buffer
4379
4380 A line for each article is displayed in the summary buffer.  You can
4381 move around, read articles, post articles and reply to articles.
4382
4383 The most common way to a summary buffer is to select a group from the
4384 group buffer (@pxref{Selecting a Group}).
4385
4386 You can have as many summary buffers open as you wish.
4387
4388 @menu
4389 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4390 * Summary Maneuvering::         Moving around the summary buffer.
4391 * Choosing Articles::           Reading articles.
4392 * Paging the Article::          Scrolling the current article.
4393 * Reply Followup and Post::     Posting articles.
4394 * Delayed Articles::            Send articles at a later time.
4395 * Marking Articles::            Marking articles as read, expirable, etc.
4396 * Limiting::                    You can limit the summary buffer.
4397 * Threading::                   How threads are made.
4398 * Sorting the Summary Buffer::  How articles and threads are sorted.
4399 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4400 * Article Caching::             You may store articles in a cache.
4401 * Persistent Articles::         Making articles expiry-resistant.
4402 * Article Backlog::             Having already read articles hang around.
4403 * Saving Articles::             Ways of customizing article saving.
4404 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4405 * Article Treatment::           The article buffer can be mangled at will.
4406 * MIME Commands::               Doing MIMEy things with the articles.
4407 * Charsets::                    Character set issues.
4408 * Article Commands::            Doing various things with the article buffer.
4409 * Summary Sorting::             Sorting the summary buffer in various ways.
4410 * Finding the Parent::          No child support? Get the parent.
4411 * Alternative Approaches::      Reading using non-default summaries.
4412 * Tree Display::                A more visual display of threads.
4413 * Mail Group Commands::         Some commands can only be used in mail groups.
4414 * Various Summary Stuff::       What didn't fit anywhere else.
4415 * Exiting the Summary Buffer::  Returning to the Group buffer,
4416                                 or reselecting the current group.
4417 * Crosspost Handling::          How crossposted articles are dealt with.
4418 * Duplicate Suppression::       An alternative when crosspost handling fails.
4419 * Security::                    Decrypt and Verify.
4420 * Mailing List::                Mailing list minor mode.
4421 @end menu
4422
4423
4424 @node Summary Buffer Format
4425 @section Summary Buffer Format
4426 @cindex summary buffer format
4427
4428 @iftex
4429 @iflatex
4430 \gnusfigure{The Summary Buffer}{180}{
4431 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4432 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4433 }
4434 @end iflatex
4435 @end iftex
4436
4437 @menu
4438 * Summary Buffer Lines::        You can specify how summary lines should look.
4439 * To From Newsgroups::          How to not display your own name.
4440 * Summary Buffer Mode Line::    You can say how the mode line should look.
4441 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4442 @end menu
4443
4444 @findex mail-extract-address-components
4445 @findex gnus-extract-address-components
4446 @vindex gnus-extract-address-components
4447 Gnus will use the value of the @code{gnus-extract-address-components}
4448 variable as a function for getting the name and address parts of a
4449 @code{From} header.  Two pre-defined functions exist:
4450 @code{gnus-extract-address-components}, which is the default, quite
4451 fast, and too simplistic solution; and
4452 @code{mail-extract-address-components}, which works very nicely, but is
4453 slower.  The default function will return the wrong answer in 5% of the
4454 cases.  If this is unacceptable to you, use the other function instead:
4455
4456 @lisp
4457 (setq gnus-extract-address-components
4458       'mail-extract-address-components)
4459 @end lisp
4460
4461 @vindex gnus-summary-same-subject
4462 @code{gnus-summary-same-subject} is a string indicating that the current
4463 article has the same subject as the previous.  This string will be used
4464 with those specs that require it.  The default is @code{""}.
4465
4466
4467 @node Summary Buffer Lines
4468 @subsection Summary Buffer Lines
4469
4470 @vindex gnus-summary-line-format
4471 You can change the format of the lines in the summary buffer by changing
4472 the @code{gnus-summary-line-format} variable.  It works along the same
4473 lines as a normal @code{format} string, with some extensions
4474 (@pxref{Formatting Variables}).
4475
4476 There should always be a colon or a point position marker on the line;
4477 the cursor always moves to the point position marker or the colon after
4478 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4479 possible to change this.  Just write a new function
4480 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4481 @xref{Positioning Point}.
4482
4483 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4484
4485 The following format specification characters and extended format
4486 specification(s) are understood:
4487
4488 @table @samp
4489 @item N
4490 Article number.
4491 @item S
4492 Subject string.  List identifiers stripped,
4493 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4494 @item s
4495 Subject if the article is the root of the thread or the previous article
4496 had a different subject, @code{gnus-summary-same-subject} otherwise.
4497 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4498 @item F
4499 Full @code{From} header.
4500 @item n
4501 The name (from the @code{From} header).
4502 @item f
4503 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4504 From Newsgroups}).
4505 @item a
4506 The name (from the @code{From} header).  This differs from the @code{n}
4507 spec in that it uses the function designated by the
4508 @code{gnus-extract-address-components} variable, which is slower, but
4509 may be more thorough.
4510 @item A
4511 The address (from the @code{From} header).  This works the same way as
4512 the @code{a} spec.
4513 @item L
4514 Number of lines in the article.
4515 @item c
4516 Number of characters in the article.  This specifier is not supported
4517 in some methods (like nnfolder).
4518 @item k
4519 Pretty-printed version of the number of characters in the article;
4520 for example, @samp{1.2k} or @samp{0.4M}.
4521 @item I
4522 Indentation based on thread level (@pxref{Customizing Threading}).
4523 @item B
4524 A complex trn-style thread tree, showing response-connecting trace
4525 lines.  A thread could be drawn like this:
4526
4527 @example
4528 >
4529 +->
4530 | +->
4531 | | \->
4532 | |   \->
4533 | \->
4534 +->
4535 \->
4536 @end example
4537
4538 You can customize the appearance with the following options.  Note
4539 that it is possible to make the thread display look really neat by
4540 replacing the default @acronym{ASCII} characters with graphic
4541 line-drawing glyphs.
4542 @table @code
4543 @item gnus-sum-thread-tree-root
4544 @vindex gnus-sum-thread-tree-root
4545 Used for the root of a thread.  If @code{nil}, use subject
4546 instead.  The default is @samp{> }.
4547
4548 @item gnus-sum-thread-tree-false-root
4549 @vindex gnus-sum-thread-tree-false-root
4550 Used for the false root of a thread (@pxref{Loose Threads}).  If
4551 @code{nil}, use subject instead.  The default is @samp{> }.
4552
4553 @item gnus-sum-thread-tree-single-indent
4554 @vindex gnus-sum-thread-tree-single-indent
4555 Used for a thread with just one message.  If @code{nil}, use subject
4556 instead.  The default is @samp{}.
4557
4558 @item gnus-sum-thread-tree-vertical
4559 @vindex gnus-sum-thread-tree-vertical
4560 Used for drawing a vertical line.  The default is @samp{| }.
4561
4562 @item gnus-sum-thread-tree-indent
4563 @vindex gnus-sum-thread-tree-indent
4564 Used for indenting.  The default is @samp{  }.
4565
4566 @item gnus-sum-thread-tree-leaf-with-other
4567 @vindex gnus-sum-thread-tree-leaf-with-other
4568 Used for a leaf with brothers.  The default is @samp{+-> }.
4569
4570 @item gnus-sum-thread-tree-single-leaf
4571 @vindex gnus-sum-thread-tree-single-leaf
4572 Used for a leaf without brothers.  The default is @samp{\-> }
4573
4574 @end table
4575
4576 @item T
4577 Nothing if the article is a root and lots of spaces if it isn't (it
4578 pushes everything after it off the screen).
4579 @item [
4580 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4581 for adopted articles (@pxref{Customizing Threading}).
4582 @item ]
4583 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4584 for adopted articles.
4585 @item >
4586 One space for each thread level.
4587 @item <
4588 Twenty minus thread level spaces.
4589 @item U
4590 Unread.  @xref{Read Articles}.
4591
4592 @item R
4593 This misleadingly named specifier is the @dfn{secondary mark}.  This
4594 mark will say whether the article has been replied to, has been cached,
4595 or has been saved.  @xref{Other Marks}.
4596
4597 @item i
4598 Score as a number (@pxref{Scoring}).
4599 @item z
4600 @vindex gnus-summary-zcore-fuzz
4601 Zcore, @samp{+} if above the default level and @samp{-} if below the
4602 default level.  If the difference between
4603 @code{gnus-summary-default-score} and the score is less than
4604 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4605 @item V
4606 Total thread score.
4607 @item x
4608 @code{Xref}.
4609 @item D
4610 @code{Date}.
4611 @item d
4612 The @code{Date} in @code{DD-MMM} format.
4613 @item o
4614 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4615 @item M
4616 @code{Message-ID}.
4617 @item r
4618 @code{References}.
4619 @item t
4620 Number of articles in the current sub-thread.  Using this spec will slow
4621 down summary buffer generation somewhat.
4622 @item e
4623 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4624 article has any children.
4625 @item P
4626 The line number.
4627 @item O
4628 Download mark.
4629 @item &user-date;
4630 Age sensitive date format.  Various date format is defined in
4631 @code{gnus-user-date-format-alist}.
4632 @item u
4633 User defined specifier.  The next character in the format string should
4634 be a letter.  Gnus will call the function
4635 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4636 following @samp{%u}.  The function will be passed the current header as
4637 argument.  The function should return a string, which will be inserted
4638 into the summary just like information from any other summary specifier.
4639 @end table
4640
4641 Text between @samp{%(} and @samp{%)} will be highlighted with
4642 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4643 There can only be one such area.
4644
4645 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4646 have to be handled with care.  For reasons of efficiency, Gnus will
4647 compute what column these characters will end up in, and ``hard-code''
4648 that.  This means that it is invalid to have these specs after a
4649 variable-length spec.  Well, you might not be arrested, but your summary
4650 buffer will look strange, which is bad enough.
4651
4652 The smart choice is to have these specs as far to the left as possible.
4653 (Isn't that the case with everything, though?  But I digress.)
4654
4655 This restriction may disappear in later versions of Gnus.
4656
4657
4658 @node To From Newsgroups
4659 @subsection To From Newsgroups
4660 @cindex To
4661 @cindex Newsgroups
4662
4663 In some groups (particularly in archive groups), the @code{From} header
4664 isn't very interesting, since all the articles there are written by
4665 you.  To display the information in the @code{To} or @code{Newsgroups}
4666 headers instead, you need to decide three things: What information to
4667 gather; where to display it; and when to display it.
4668
4669 @enumerate
4670 @item
4671 @vindex gnus-extra-headers
4672 The reading of extra header information is controlled by the
4673 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4674 instance:
4675
4676 @lisp
4677 (setq gnus-extra-headers
4678       '(To Newsgroups X-Newsreader))
4679 @end lisp
4680
4681 This will result in Gnus trying to obtain these three headers, and
4682 storing it in header structures for later easy retrieval.
4683
4684 @item
4685 @findex gnus-extra-header
4686 The value of these extra headers can be accessed via the
4687 @code{gnus-extra-header} function.  Here's a format line spec that will
4688 access the @code{X-Newsreader} header:
4689
4690 @example
4691 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4692 @end example
4693
4694 @item
4695 @vindex gnus-ignored-from-addresses
4696 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4697 summary line spec returns the @code{To}, @code{Newsreader} or
4698 @code{From} header.  If this regexp matches the contents of the
4699 @code{From} header, the value of the @code{To} or @code{Newsreader}
4700 headers are used instead.
4701
4702 @end enumerate
4703
4704 @vindex nnmail-extra-headers
4705 A related variable is @code{nnmail-extra-headers}, which controls when
4706 to include extra headers when generating overview (@acronym{NOV}) files.
4707 If you have old overview files, you should regenerate them after
4708 changing this variable, by entering the server buffer using @kbd{^},
4709 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4710 regeneration.
4711
4712 @vindex gnus-summary-line-format
4713 You also have to instruct Gnus to display the data by changing the
4714 @code{%n} spec to the @code{%f} spec in the
4715 @code{gnus-summary-line-format} variable.
4716
4717 In summary, you'd typically put something like the following in
4718 @file{~/.gnus.el}:
4719
4720 @lisp
4721 (setq gnus-extra-headers
4722       '(To Newsgroups))
4723 (setq nnmail-extra-headers gnus-extra-headers)
4724 (setq gnus-summary-line-format
4725       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4726 (setq gnus-ignored-from-addresses
4727       "Your Name Here")
4728 @end lisp
4729
4730 (The values listed above are the default values in Gnus.  Alter them
4731 to fit your needs.)
4732
4733 A note for news server administrators, or for users who wish to try to
4734 convince their news server administrator to provide some additional
4735 support:
4736
4737 The above is mostly useful for mail groups, where you have control over
4738 the @acronym{NOV} files that are created.  However, if you can persuade your
4739 nntp admin to add (in the usual implementation, notably INN):
4740
4741 @example
4742 Newsgroups:full
4743 @end example
4744
4745 to the end of her @file{overview.fmt} file, then you can use that just
4746 as you would the extra headers from the mail groups.
4747
4748
4749 @node Summary Buffer Mode Line
4750 @subsection Summary Buffer Mode Line
4751
4752 @vindex gnus-summary-mode-line-format
4753 You can also change the format of the summary mode bar (@pxref{Mode Line
4754 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4755 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4756
4757 Here are the elements you can play with:
4758
4759 @table @samp
4760 @item G
4761 Group name.
4762 @item p
4763 Unprefixed group name.
4764 @item A
4765 Current article number.
4766 @item z
4767 Current article score.
4768 @item V
4769 Gnus version.
4770 @item U
4771 Number of unread articles in this group.
4772 @item e
4773 Number of unread articles in this group that aren't displayed in the
4774 summary buffer.
4775 @item Z
4776 A string with the number of unread and unselected articles represented
4777 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4778 articles, and just as @samp{<%U more>} if there are just unread articles
4779 and no unselected ones.
4780 @item g
4781 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4782 shortened to @samp{r.a.anime}.
4783 @item S
4784 Subject of the current article.
4785 @item u
4786 User-defined spec (@pxref{User-Defined Specs}).
4787 @item s
4788 Name of the current score file (@pxref{Scoring}).
4789 @item d
4790 Number of dormant articles (@pxref{Unread Articles}).
4791 @item t
4792 Number of ticked articles (@pxref{Unread Articles}).
4793 @item r
4794 Number of articles that have been marked as read in this session.
4795 @item E
4796 Number of articles expunged by the score files.
4797 @end table
4798
4799
4800 @node Summary Highlighting
4801 @subsection Summary Highlighting
4802
4803 @table @code
4804
4805 @item gnus-visual-mark-article-hook
4806 @vindex gnus-visual-mark-article-hook
4807 This hook is run after selecting an article.  It is meant to be used for
4808 highlighting the article in some way.  It is not run if
4809 @code{gnus-visual} is @code{nil}.
4810
4811 @item gnus-summary-update-hook
4812 @vindex gnus-summary-update-hook
4813 This hook is called when a summary line is changed.  It is not run if
4814 @code{gnus-visual} is @code{nil}.
4815
4816 @item gnus-summary-selected-face
4817 @vindex gnus-summary-selected-face
4818 This is the face (or @dfn{font} as some people call it) used to
4819 highlight the current article in the summary buffer.
4820
4821 @item gnus-summary-highlight
4822 @vindex gnus-summary-highlight
4823 Summary lines are highlighted according to this variable, which is a
4824 list where the elements are of the format @code{(@var{form}
4825 . @var{face})}.  If you would, for instance, like ticked articles to be
4826 italic and high-scored articles to be bold, you could set this variable
4827 to something like
4828 @lisp
4829 (((eq mark gnus-ticked-mark) . italic)
4830  ((> score default) . bold))
4831 @end lisp
4832 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4833 @var{face} will be applied to the line.
4834 @end table
4835
4836
4837 @node Summary Maneuvering
4838 @section Summary Maneuvering
4839 @cindex summary movement
4840
4841 All the straight movement commands understand the numeric prefix and
4842 behave pretty much as you'd expect.
4843
4844 None of these commands select articles.
4845
4846 @table @kbd
4847 @item G M-n
4848 @itemx M-n
4849 @kindex M-n (Summary)
4850 @kindex G M-n (Summary)
4851 @findex gnus-summary-next-unread-subject
4852 Go to the next summary line of an unread article
4853 (@code{gnus-summary-next-unread-subject}).
4854
4855 @item G M-p
4856 @itemx M-p
4857 @kindex M-p (Summary)
4858 @kindex G M-p (Summary)
4859 @findex gnus-summary-prev-unread-subject
4860 Go to the previous summary line of an unread article
4861 (@code{gnus-summary-prev-unread-subject}).
4862
4863 @item G g
4864 @kindex G g (Summary)
4865 @findex gnus-summary-goto-subject
4866 Ask for an article number and then go to the summary line of that article
4867 without displaying the article (@code{gnus-summary-goto-subject}).
4868 @end table
4869
4870 If Gnus asks you to press a key to confirm going to the next group, you
4871 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4872 buffer, searching for the next group to read without actually returning
4873 to the group buffer.
4874
4875 Variables related to summary movement:
4876
4877 @table @code
4878
4879 @vindex gnus-auto-select-next
4880 @item gnus-auto-select-next
4881 If you issue one of the movement commands (like @kbd{n}) and there are
4882 no more unread articles after the current one, Gnus will offer to go to
4883 the next group.  If this variable is @code{t} and the next group is
4884 empty, Gnus will exit summary mode and return to the group buffer.  If
4885 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4886 next group with unread articles.  As a special case, if this variable
4887 is @code{quietly}, Gnus will select the next group without asking for
4888 confirmation.  If this variable is @code{almost-quietly}, the same
4889 will happen only if you are located on the last article in the group.
4890 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4891 command will go to the next group without confirmation.  Also
4892 @pxref{Group Levels}.
4893
4894 @item gnus-auto-select-same
4895 @vindex gnus-auto-select-same
4896 If non-@code{nil}, all the movement commands will try to go to the next
4897 article with the same subject as the current.  (@dfn{Same} here might
4898 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4899 for details (@pxref{Customizing Threading}).)  If there are no more
4900 articles with the same subject, go to the first unread article.
4901
4902 This variable is not particularly useful if you use a threaded display.
4903
4904 @item gnus-summary-check-current
4905 @vindex gnus-summary-check-current
4906 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4907 to the next (or previous) article if the current article is unread.
4908 Instead, they will choose the current article.
4909
4910 @item gnus-auto-center-summary
4911 @vindex gnus-auto-center-summary
4912 If non-@code{nil}, Gnus will keep the point in the summary buffer
4913 centered at all times.  This makes things quite tidy, but if you have a
4914 slow network connection, or simply do not like this un-Emacsism, you can
4915 set this variable to @code{nil} to get the normal Emacs scrolling
4916 action.  This will also inhibit horizontal re-centering of the summary
4917 buffer, which might make it more inconvenient to read extremely long
4918 threads.
4919
4920 This variable can also be a number.  In that case, center the window at
4921 the given number of lines from the top.
4922
4923 @end table
4924
4925
4926 @node Choosing Articles
4927 @section Choosing Articles
4928 @cindex selecting articles
4929
4930 @menu
4931 * Choosing Commands::           Commands for choosing articles.
4932 * Choosing Variables::          Variables that influence these commands.
4933 @end menu
4934
4935
4936 @node Choosing Commands
4937 @subsection Choosing Commands
4938
4939 None of the following movement commands understand the numeric prefix,
4940 and they all select and display an article.
4941
4942 If you want to fetch new articles or redisplay the group, see
4943 @ref{Exiting the Summary Buffer}.
4944
4945 @table @kbd
4946 @item SPACE
4947 @kindex SPACE (Summary)
4948 @findex gnus-summary-next-page
4949 Select the current article, or, if that one's read already, the next
4950 unread article (@code{gnus-summary-next-page}).
4951
4952 If you have an article window open already and you press @kbd{SPACE}
4953 again, the article will be scrolled.  This lets you conveniently
4954 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
4955
4956 @item G n
4957 @itemx n
4958 @kindex n (Summary)
4959 @kindex G n (Summary)
4960 @findex gnus-summary-next-unread-article
4961 @c @icon{gnus-summary-next-unread}
4962 Go to next unread article (@code{gnus-summary-next-unread-article}).
4963
4964 @item G p
4965 @itemx p
4966 @kindex p (Summary)
4967 @findex gnus-summary-prev-unread-article
4968 @c @icon{gnus-summary-prev-unread}
4969 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4970
4971 @item G N
4972 @itemx N
4973 @kindex N (Summary)
4974 @kindex G N (Summary)
4975 @findex gnus-summary-next-article
4976 Go to the next article (@code{gnus-summary-next-article}).
4977
4978 @item G P
4979 @itemx P
4980 @kindex P (Summary)
4981 @kindex G P (Summary)
4982 @findex gnus-summary-prev-article
4983 Go to the previous article (@code{gnus-summary-prev-article}).
4984
4985 @item G C-n
4986 @kindex G C-n (Summary)
4987 @findex gnus-summary-next-same-subject
4988 Go to the next article with the same subject
4989 (@code{gnus-summary-next-same-subject}).
4990
4991 @item G C-p
4992 @kindex G C-p (Summary)
4993 @findex gnus-summary-prev-same-subject
4994 Go to the previous article with the same subject
4995 (@code{gnus-summary-prev-same-subject}).
4996
4997 @item G f
4998 @itemx .
4999 @kindex G f  (Summary)
5000 @kindex .  (Summary)
5001 @findex gnus-summary-first-unread-article
5002 Go to the first unread article
5003 (@code{gnus-summary-first-unread-article}).
5004
5005 @item G b
5006 @itemx ,
5007 @kindex G b (Summary)
5008 @kindex , (Summary)
5009 @findex gnus-summary-best-unread-article
5010 Go to the unread article with the highest score
5011 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5012 go to the first unread article that has a score over the default score.
5013
5014 @item G l
5015 @itemx l
5016 @kindex l (Summary)
5017 @kindex G l (Summary)
5018 @findex gnus-summary-goto-last-article
5019 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5020
5021 @item G o
5022 @kindex G o (Summary)
5023 @findex gnus-summary-pop-article
5024 @cindex history
5025 @cindex article history
5026 Pop an article off the summary history and go to this article
5027 (@code{gnus-summary-pop-article}).  This command differs from the
5028 command above in that you can pop as many previous articles off the
5029 history as you like, while @kbd{l} toggles the two last read articles.
5030 For a somewhat related issue (if you use these commands a lot),
5031 @pxref{Article Backlog}.
5032
5033 @item G j
5034 @itemx j
5035 @kindex j (Summary)
5036 @kindex G j (Summary)
5037 @findex gnus-summary-goto-article
5038 Ask for an article number or @code{Message-ID}, and then go to that
5039 article (@code{gnus-summary-goto-article}).
5040
5041 @end table
5042
5043
5044 @node Choosing Variables
5045 @subsection Choosing Variables
5046
5047 Some variables relevant for moving and selecting articles:
5048
5049 @table @code
5050 @item gnus-auto-extend-newsgroup
5051 @vindex gnus-auto-extend-newsgroup
5052 All the movement commands will try to go to the previous (or next)
5053 article, even if that article isn't displayed in the Summary buffer if
5054 this variable is non-@code{nil}.  Gnus will then fetch the article from
5055 the server and display it in the article buffer.
5056
5057 @item gnus-select-article-hook
5058 @vindex gnus-select-article-hook
5059 This hook is called whenever an article is selected.  By default it
5060 exposes any threads hidden under the selected article.  If you would
5061 like each article to be saved in the Agent as you read it, putting
5062 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5063
5064 @item gnus-mark-article-hook
5065 @vindex gnus-mark-article-hook
5066 @findex gnus-summary-mark-unread-as-read
5067 @findex gnus-summary-mark-read-and-unread-as-read
5068 @findex gnus-unread-mark
5069 This hook is called whenever an article is selected.  It is intended to
5070 be used for marking articles as read.  The default value is
5071 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5072 mark of almost any article you read to @code{gnus-unread-mark}.  The
5073 only articles not affected by this function are ticked, dormant, and
5074 expirable articles.  If you'd instead like to just have unread articles
5075 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5076 instead.  It will leave marks like @code{gnus-low-score-mark},
5077 @code{gnus-del-mark} (and so on) alone.
5078
5079 @end table
5080
5081
5082 @node Paging the Article
5083 @section Scrolling the Article
5084 @cindex article scrolling
5085
5086 @table @kbd
5087
5088 @item SPACE
5089 @kindex SPACE (Summary)
5090 @findex gnus-summary-next-page
5091 Pressing @kbd{SPACE} will scroll the current article forward one page,
5092 or, if you have come to the end of the current article, will choose the
5093 next article (@code{gnus-summary-next-page}).
5094
5095 @vindex gnus-article-boring-faces
5096 @vindex gnus-article-skip-boring
5097 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5098 the article consists only of citations and signature, then it will be
5099 skipped; the next article will be shown instead.  You can customize
5100 what is considered uninteresting with
5101 @code{gnus-article-boring-faces}.  You can manually view the article's
5102 pages, no matter how boring, using @kbd{C-M-v}.
5103
5104 @item DEL
5105 @kindex DEL (Summary)
5106 @findex gnus-summary-prev-page
5107 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5108
5109 @item RET
5110 @kindex RET (Summary)
5111 @findex gnus-summary-scroll-up
5112 Scroll the current article one line forward
5113 (@code{gnus-summary-scroll-up}).
5114
5115 @item M-RET
5116 @kindex M-RET (Summary)
5117 @findex gnus-summary-scroll-down
5118 Scroll the current article one line backward
5119 (@code{gnus-summary-scroll-down}).
5120
5121 @item A g
5122 @itemx g
5123 @kindex A g (Summary)
5124 @kindex g (Summary)
5125 @findex gnus-summary-show-article
5126 @vindex gnus-summary-show-article-charset-alist
5127 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5128 given a prefix, fetch the current article, but don't run any of the
5129 article treatment functions.  This will give you a ``raw'' article, just
5130 the way it came from the server.
5131
5132 If given a numerical prefix, you can do semi-manual charset stuff.
5133 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5134 encoded in the @code{cn-gb-2312} charset.  If you have
5135
5136 @lisp
5137 (setq gnus-summary-show-article-charset-alist
5138       '((1 . cn-gb-2312)
5139         (2 . big5)))
5140 @end lisp
5141
5142 then you can say @kbd{C-u 1 g} to get the same effect.
5143
5144 @item A <
5145 @itemx <
5146 @kindex < (Summary)
5147 @kindex A < (Summary)
5148 @findex gnus-summary-beginning-of-article
5149 Scroll to the beginning of the article
5150 (@code{gnus-summary-beginning-of-article}).
5151
5152 @item A >
5153 @itemx >
5154 @kindex > (Summary)
5155 @kindex A > (Summary)
5156 @findex gnus-summary-end-of-article
5157 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5158
5159 @item A s
5160 @itemx s
5161 @kindex A s (Summary)
5162 @kindex s (Summary)
5163 @findex gnus-summary-isearch-article
5164 Perform an isearch in the article buffer
5165 (@code{gnus-summary-isearch-article}).
5166
5167 @item h
5168 @kindex h (Summary)
5169 @findex gnus-summary-select-article-buffer
5170 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5171
5172 @end table
5173
5174
5175 @node Reply Followup and Post
5176 @section Reply, Followup and Post
5177
5178 @menu
5179 * Summary Mail Commands::       Sending mail.
5180 * Summary Post Commands::       Sending news.
5181 * Summary Message Commands::    Other Message-related commands.
5182 * Canceling and Superseding::
5183 @end menu
5184
5185
5186 @node Summary Mail Commands
5187 @subsection Summary Mail Commands
5188 @cindex mail
5189 @cindex composing mail
5190
5191 Commands for composing a mail message:
5192
5193 @table @kbd
5194
5195 @item S r
5196 @itemx r
5197 @kindex S r (Summary)
5198 @kindex r (Summary)
5199 @findex gnus-summary-reply
5200 @c @icon{gnus-summary-mail-reply}
5201 @c @icon{gnus-summary-reply}
5202 Mail a reply to the author of the current article
5203 (@code{gnus-summary-reply}).
5204
5205 @item S R
5206 @itemx R
5207 @kindex R (Summary)
5208 @kindex S R (Summary)
5209 @findex gnus-summary-reply-with-original
5210 @c @icon{gnus-summary-reply-with-original}
5211 Mail a reply to the author of the current article and include the
5212 original message (@code{gnus-summary-reply-with-original}).  This
5213 command uses the process/prefix convention.
5214
5215 @item S w
5216 @kindex S w (Summary)
5217 @findex gnus-summary-wide-reply
5218 Mail a wide reply to the author of the current article
5219 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5220 goes out to all people listed in the @code{To}, @code{From} (or
5221 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5222 present, that's used instead.
5223
5224 @item S W
5225 @kindex S W (Summary)
5226 @findex gnus-summary-wide-reply-with-original
5227 Mail a wide reply to the current article and include the original
5228 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5229 the process/prefix convention.
5230
5231 @item S v
5232 @kindex S v (Summary)
5233 @findex gnus-summary-very-wide-reply
5234 Mail a very wide reply to the author of the current article
5235 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5236 that goes out to all people listed in the @code{To}, @code{From} (or
5237 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5238 articles.  This command uses the process/prefix convention.
5239
5240 @item S V
5241 @kindex S V (Summary)
5242 @findex gnus-summary-very-wide-reply-with-original
5243 Mail a very wide reply to the author of the current article and include the
5244 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5245 command uses the process/prefix convention.
5246
5247 @item S B r
5248 @kindex S B r (Summary)
5249 @findex gnus-summary-reply-broken-reply-to
5250 Mail a reply to the author of the current article but ignore the
5251 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5252 If you need this because a mailing list incorrectly sets a
5253 @code{Reply-To} header pointing to the list, you probably want to set
5254 the @code{broken-reply-to} group parameter instead, so things will work
5255 correctly.  @xref{Group Parameters}.
5256
5257 @item S B R
5258 @kindex S B R (Summary)
5259 @findex gnus-summary-reply-broken-reply-to-with-original
5260 Mail a reply to the author of the current article and include the
5261 original message but ignore the @code{Reply-To} field
5262 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5263
5264 @item S o m
5265 @itemx C-c C-f
5266 @kindex S o m (Summary)
5267 @kindex C-c C-f (Summary)
5268 @findex gnus-summary-mail-forward
5269 @c @icon{gnus-summary-mail-forward}
5270 Forward the current article to some other person
5271 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5272 is forwarded according to the value of (@code{message-forward-as-mime})
5273 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5274 message and forward directly inline; if the prefix is 2, forward message
5275 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5276 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5277 directly inline; otherwise, the message is forwarded as no prefix given
5278 but use the flipped value of (@code{message-forward-as-mime}).  By
5279 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5280 section.
5281
5282 @item S m
5283 @itemx m
5284 @kindex m (Summary)
5285 @kindex S m (Summary)
5286 @findex gnus-summary-mail-other-window
5287 @c @icon{gnus-summary-mail-originate}
5288 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5289 the posting style of the current group.  If given a prefix, disable that.
5290 If the prefix is 1, prompt for a group name to find the posting style.
5291
5292 @item S i
5293 @itemx i
5294 @kindex i (Summary)
5295 @kindex S i (Summary)
5296 @findex gnus-summary-news-other-window
5297 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5298 post to the current group.  If given a prefix, disable that.  If the
5299 prefix is 1, prompt for a group to post to.
5300
5301 This function actually prepares a news even when using mail groups.
5302 This is useful for ``posting'' messages to mail groups without actually
5303 sending them over the network: they're just saved directly to the group
5304 in question.  The corresponding back end must have a request-post method
5305 for this to work though.
5306
5307 @item S D b
5308 @kindex S D b (Summary)
5309 @findex gnus-summary-resend-bounced-mail
5310 @cindex bouncing mail
5311 If you have sent a mail, but the mail was bounced back to you for some
5312 reason (wrong address, transient failure), you can use this command to
5313 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5314 will be popped into a mail buffer where you can edit the headers before
5315 sending the mail off again.  If you give a prefix to this command, and
5316 the bounced mail is a reply to some other mail, Gnus will try to fetch
5317 that mail and display it for easy perusal of its headers.  This might
5318 very well fail, though.
5319
5320 @item S D r
5321 @kindex S D r (Summary)
5322 @findex gnus-summary-resend-message
5323 Not to be confused with the previous command,
5324 @code{gnus-summary-resend-message} will prompt you for an address to
5325 send the current message off to, and then send it to that place.  The
5326 headers of the message won't be altered---but lots of headers that say
5327 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5328 means that you actually send a mail to someone that has a @code{To}
5329 header that (probably) points to yourself.  This will confuse people.
5330 So, natcherly you'll only do that if you're really eVIl.
5331
5332 This command is mainly used if you have several accounts and want to
5333 ship a mail to a different account of yours.  (If you're both
5334 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5335 to the @code{root} account, you may want to resend it to
5336 @code{postmaster}.  Ordnung muss sein!
5337
5338 This command understands the process/prefix convention
5339 (@pxref{Process/Prefix}).
5340
5341 @item S O m
5342 @kindex S O m (Summary)
5343 @findex gnus-uu-digest-mail-forward
5344 Digest the current series (@pxref{Decoding Articles}) and forward the
5345 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5346 uses the process/prefix convention (@pxref{Process/Prefix}).
5347
5348 @item S M-c
5349 @kindex S M-c (Summary)
5350 @findex gnus-summary-mail-crosspost-complaint
5351 @cindex crossposting
5352 @cindex excessive crossposting
5353 Send a complaint about excessive crossposting to the author of the
5354 current article (@code{gnus-summary-mail-crosspost-complaint}).
5355
5356 @findex gnus-crosspost-complaint
5357 This command is provided as a way to fight back against the current
5358 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5359 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5360 command understands the process/prefix convention
5361 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5362
5363 @end table
5364
5365 Also @xref{Header Commands, ,Header Commands, message, The Message
5366 Manual}, for more information.
5367
5368
5369 @node Summary Post Commands
5370 @subsection Summary Post Commands
5371 @cindex post
5372 @cindex composing news
5373
5374 Commands for posting a news article:
5375
5376 @table @kbd
5377 @item S p
5378 @itemx a
5379 @kindex a (Summary)
5380 @kindex S p (Summary)
5381 @findex gnus-summary-post-news
5382 @c @icon{gnus-summary-post-news}
5383 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5384 default, post to the current group.  If given a prefix, disable that.
5385 If the prefix is 1, prompt for another group instead.
5386
5387 @item S f
5388 @itemx f
5389 @kindex f (Summary)
5390 @kindex S f (Summary)
5391 @findex gnus-summary-followup
5392 @c @icon{gnus-summary-followup}
5393 Post a followup to the current article (@code{gnus-summary-followup}).
5394
5395 @item S F
5396 @itemx F
5397 @kindex S F (Summary)
5398 @kindex F (Summary)
5399 @c @icon{gnus-summary-followup-with-original}
5400 @findex gnus-summary-followup-with-original
5401 Post a followup to the current article and include the original message
5402 (@code{gnus-summary-followup-with-original}).  This command uses the
5403 process/prefix convention.
5404
5405 @item S n
5406 @kindex S n (Summary)
5407 @findex gnus-summary-followup-to-mail
5408 Post a followup to the current article via news, even if you got the
5409 message through mail (@code{gnus-summary-followup-to-mail}).
5410
5411 @item S N
5412 @kindex S N (Summary)
5413 @findex gnus-summary-followup-to-mail-with-original
5414 Post a followup to the current article via news, even if you got the
5415 message through mail and include the original message
5416 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5417 the process/prefix convention.
5418
5419 @item S o p
5420 @kindex S o p (Summary)
5421 @findex gnus-summary-post-forward
5422 Forward the current article to a newsgroup
5423 (@code{gnus-summary-post-forward}).
5424  If no prefix is given, the message is forwarded according to the value
5425 of (@code{message-forward-as-mime}) and
5426 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5427 message and forward directly inline; if the prefix is 2, forward message
5428 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5429 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5430 directly inline; otherwise, the message is forwarded as no prefix given
5431 but use the flipped value of (@code{message-forward-as-mime}).  By
5432 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5433
5434 @item S O p
5435 @kindex S O p (Summary)
5436 @findex gnus-uu-digest-post-forward
5437 @cindex digests
5438 @cindex making digests
5439 Digest the current series and forward the result to a newsgroup
5440 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5441 process/prefix convention.
5442
5443 @item S u
5444 @kindex S u (Summary)
5445 @findex gnus-uu-post-news
5446 @c @icon{gnus-uu-post-news}
5447 Uuencode a file, split it into parts, and post it as a series
5448 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5449 @end table
5450
5451 Also @xref{Header Commands, ,Header Commands, message, The Message
5452 Manual}, for more information.
5453
5454
5455 @node Summary Message Commands
5456 @subsection Summary Message Commands
5457
5458 @table @kbd
5459 @item S y
5460 @kindex S y (Summary)
5461 @findex gnus-summary-yank-message
5462 Yank the current article into an already existing Message composition
5463 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5464 what message buffer you want to yank into, and understands the
5465 process/prefix convention (@pxref{Process/Prefix}).
5466
5467 @end table
5468
5469
5470 @node Canceling and Superseding
5471 @subsection Canceling Articles
5472 @cindex canceling articles
5473 @cindex superseding articles
5474
5475 Have you ever written something, and then decided that you really,
5476 really, really wish you hadn't posted that?
5477
5478 Well, you can't cancel mail, but you can cancel posts.
5479
5480 @findex gnus-summary-cancel-article
5481 @kindex C (Summary)
5482 @c @icon{gnus-summary-cancel-article}
5483 Find the article you wish to cancel (you can only cancel your own
5484 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5485 c} (@code{gnus-summary-cancel-article}).  Your article will be
5486 canceled---machines all over the world will be deleting your article.
5487 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5488
5489 Be aware, however, that not all sites honor cancels, so your article may
5490 live on here and there, while most sites will delete the article in
5491 question.
5492
5493 Gnus will use the ``current'' select method when canceling.  If you
5494 want to use the standard posting method, use the @samp{a} symbolic
5495 prefix (@pxref{Symbolic Prefixes}).
5496
5497 If you discover that you have made some mistakes and want to do some
5498 corrections, you can post a @dfn{superseding} article that will replace
5499 your original article.
5500
5501 @findex gnus-summary-supersede-article
5502 @kindex S (Summary)
5503 Go to the original article and press @kbd{S s}
5504 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5505 where you can edit the article all you want before sending it off the
5506 usual way.
5507
5508 The same goes for superseding as for canceling, only more so: Some
5509 sites do not honor superseding.  On those sites, it will appear that you
5510 have posted almost the same article twice.
5511
5512 If you have just posted the article, and change your mind right away,
5513 there is a trick you can use to cancel/supersede the article without
5514 waiting for the article to appear on your site first.  You simply return
5515 to the post buffer (which is called @code{*sent ...*}).  There you will
5516 find the article you just posted, with all the headers intact.  Change
5517 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5518 header by substituting one of those words for the word
5519 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5520 you would do normally.  The previous article will be
5521 canceled/superseded.
5522
5523 Just remember, kids: There is no 'c' in 'supersede'.
5524
5525 @node Delayed Articles
5526 @section Delayed Articles
5527 @cindex delayed sending
5528 @cindex send delayed
5529
5530 Sometimes, you might wish to delay the sending of a message.  For
5531 example, you might wish to arrange for a message to turn up just in time
5532 to remind your about the birthday of your Significant Other.  For this,
5533 there is the @code{gnus-delay} package.  Setup is simple:
5534
5535 @lisp
5536 (gnus-delay-initialize)
5537 @end lisp
5538
5539 @findex gnus-delay-article
5540 Normally, to send a message you use the @kbd{C-c C-c} command from
5541 Message mode.  To delay a message, use @kbd{C-c C-j}
5542 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5543 message should be delayed.  Possible answers are:
5544
5545 @itemize @bullet
5546 @item
5547 A time span.  Consists of an integer and a letter.  For example,
5548 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5549 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5550 (months) and @code{Y} (years).
5551
5552 @item
5553 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5554 delayed until that day, at a specific time (eight o'clock by default).
5555 See also @code{gnus-delay-default-hour}.
5556
5557 @item
5558 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5559 stuff.  The deadline will be at that time today, except if that time has
5560 already passed, then it's at the given time tomorrow.  So if it's ten
5561 o'clock in the morning and you specify @code{11:15}, then the deadline
5562 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5563 that means a time tomorrow.
5564 @end itemize
5565
5566 The action of the @code{gnus-delay-article} command is influenced by a
5567 couple of variables:
5568
5569 @table @code
5570 @item gnus-delay-default-hour
5571 @vindex gnus-delay-default-hour
5572 When you specify a specific date, the message will be due on that hour
5573 on the given date.  Possible values are integers 0 through 23.
5574
5575 @item gnus-delay-default-delay
5576 @vindex gnus-delay-default-delay
5577 This is a string and gives the default delay.  It can be of any of the
5578 formats described above.
5579
5580 @item gnus-delay-group
5581 @vindex gnus-delay-group
5582 Delayed articles will be kept in this group on the drafts server until
5583 they are due.  You probably don't need to change this.  The default
5584 value is @code{"delayed"}.
5585
5586 @item gnus-delay-header
5587 @vindex gnus-delay-header
5588 The deadline for each article will be stored in a header.  This variable
5589 is a string and gives the header name.  You probably don't need to
5590 change this.  The default value is @code{"X-Gnus-Delayed"}.
5591 @end table
5592
5593 The way delaying works is like this: when you use the
5594 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5595 calculates the deadline of the message and stores it in the
5596 @code{X-Gnus-Delayed} header and puts the message in the
5597 @code{nndraft:delayed} group.
5598
5599 @findex gnus-delay-send-queue
5600 And whenever you get new news, Gnus looks through the group for articles
5601 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5602 function for this.  By default, this function is added to the hook
5603 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5604 Maybe you want to use the demon to send drafts?  Just tell the demon to
5605 execute the @code{gnus-delay-send-queue} function.
5606
5607 @table @code
5608 @item gnus-delay-initialize
5609 @findex gnus-delay-initialize
5610 By default, this function installs @code{gnus-delay-send-queue} in
5611 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5612 argument @code{no-check}.  If it is non-@code{nil},
5613 @code{gnus-get-new-news-hook} is not changed.  The optional first
5614 argument is ignored.
5615
5616 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5617 Presumably, you want to use the demon for sending due delayed articles.
5618 Just don't forget to set that up :-)
5619 @end table
5620
5621
5622 @node Marking Articles
5623 @section Marking Articles
5624 @cindex article marking
5625 @cindex article ticking
5626 @cindex marks
5627
5628 There are several marks you can set on an article.
5629
5630 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5631 neologism ohoy!) of the article.  Alphabetic marks generally mean
5632 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5633
5634 In addition, you also have marks that do not affect readedness.
5635
5636 @menu
5637 * Unread Articles::             Marks for unread articles.
5638 * Read Articles::               Marks for read articles.
5639 * Other Marks::                 Marks that do not affect readedness.
5640 @end menu
5641
5642 @ifinfo
5643 There's a plethora of commands for manipulating these marks:
5644 @end ifinfo
5645
5646 @menu
5647 * Setting Marks::             How to set and remove marks.
5648 * Generic Marking Commands::  How to customize the marking.
5649 * Setting Process Marks::     How to mark articles for later processing.
5650 @end menu
5651
5652
5653 @node Unread Articles
5654 @subsection Unread Articles
5655
5656 The following marks mark articles as (kinda) unread, in one form or
5657 other.
5658
5659 @table @samp
5660 @item !
5661 @vindex gnus-ticked-mark
5662 Marked as ticked (@code{gnus-ticked-mark}).
5663
5664 @dfn{Ticked articles} are articles that will remain visible always.  If
5665 you see an article that you find interesting, or you want to put off
5666 reading it, or replying to it, until sometime later, you'd typically
5667 tick it.  However, articles can be expired (from news servers by the
5668 news server software, Gnus itself never expires ticked messages), so if
5669 you want to keep an article forever, you'll have to make it persistent
5670 (@pxref{Persistent Articles}).
5671
5672 @item ?
5673 @vindex gnus-dormant-mark
5674 Marked as dormant (@code{gnus-dormant-mark}).
5675
5676 @dfn{Dormant articles} will only appear in the summary buffer if there
5677 are followups to it.  If you want to see them even if they don't have
5678 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5679 Otherwise (except for the visibility issue), they are just like ticked
5680 messages.
5681
5682 @item SPACE
5683 @vindex gnus-unread-mark
5684 Marked as unread (@code{gnus-unread-mark}).
5685
5686 @dfn{Unread articles} are articles that haven't been read at all yet.
5687 @end table
5688
5689
5690 @node Read Articles
5691 @subsection Read Articles
5692 @cindex expirable mark
5693
5694 All the following marks mark articles as read.
5695
5696 @table @samp
5697
5698 @item r
5699 @vindex gnus-del-mark
5700 These are articles that the user has marked as read with the @kbd{d}
5701 command manually, more or less (@code{gnus-del-mark}).
5702
5703 @item R
5704 @vindex gnus-read-mark
5705 Articles that have actually been read (@code{gnus-read-mark}).
5706
5707 @item O
5708 @vindex gnus-ancient-mark
5709 Articles that were marked as read in previous sessions and are now
5710 @dfn{old} (@code{gnus-ancient-mark}).
5711
5712 @item K
5713 @vindex gnus-killed-mark
5714 Marked as killed (@code{gnus-killed-mark}).
5715
5716 @item X
5717 @vindex gnus-kill-file-mark
5718 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5719
5720 @item Y
5721 @vindex gnus-low-score-mark
5722 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5723
5724 @item C
5725 @vindex gnus-catchup-mark
5726 Marked as read by a catchup (@code{gnus-catchup-mark}).
5727
5728 @item G
5729 @vindex gnus-canceled-mark
5730 Canceled article (@code{gnus-canceled-mark})
5731
5732 @item F
5733 @vindex gnus-souped-mark
5734 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5735
5736 @item Q
5737 @vindex gnus-sparse-mark
5738 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5739 Threading}.
5740
5741 @item M
5742 @vindex gnus-duplicate-mark
5743 Article marked as read by duplicate suppression
5744 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5745
5746 @end table
5747
5748 All these marks just mean that the article is marked as read, really.
5749 They are interpreted differently when doing adaptive scoring, though.
5750
5751 One more special mark, though:
5752
5753 @table @samp
5754 @item E
5755 @vindex gnus-expirable-mark
5756 Marked as expirable (@code{gnus-expirable-mark}).
5757
5758 Marking articles as @dfn{expirable} (or have them marked as such
5759 automatically) doesn't make much sense in normal groups---a user doesn't
5760 control expiring of news articles, but in mail groups, for instance,
5761 articles marked as @dfn{expirable} can be deleted by Gnus at
5762 any time.
5763 @end table
5764
5765
5766 @node Other Marks
5767 @subsection Other Marks
5768 @cindex process mark
5769 @cindex bookmarks
5770
5771 There are some marks that have nothing to do with whether the article is
5772 read or not.
5773
5774 @itemize @bullet
5775
5776 @item
5777 You can set a bookmark in the current article.  Say you are reading a
5778 long thesis on cats' urinary tracts, and have to go home for dinner
5779 before you've finished reading the thesis.  You can then set a bookmark
5780 in the article, and Gnus will jump to this bookmark the next time it
5781 encounters the article.  @xref{Setting Marks}.
5782
5783 @item
5784 @vindex gnus-replied-mark
5785 All articles that you have replied to or made a followup to (i.e., have
5786 answered) will be marked with an @samp{A} in the second column
5787 (@code{gnus-replied-mark}).
5788
5789 @item
5790 @vindex gnus-forwarded-mark
5791 All articles that you have forwarded will be marked with an @samp{F} in
5792 the second column (@code{gnus-forwarded-mark}).
5793
5794 @item
5795 @vindex gnus-cached-mark
5796 Articles stored in the article cache will be marked with an @samp{*} in
5797 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5798
5799 @item
5800 @vindex gnus-saved-mark
5801 Articles ``saved'' (in some manner or other; not necessarily
5802 religiously) are marked with an @samp{S} in the second column
5803 (@code{gnus-saved-mark}).
5804
5805 @item
5806 @vindex gnus-recent-mark
5807 Articles that according to the server haven't been shown to the user
5808 before are marked with a @samp{N} in the second column
5809 (@code{gnus-recent-mark}).  Note that not all servers support this
5810 mark, in which case it simply never appears.  Compare with
5811 @code{gnus-unseen-mark}.
5812
5813 @item
5814 @vindex gnus-unseen-mark
5815 Articles that haven't been seen before in Gnus by the user are marked
5816 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5817 Compare with @code{gnus-recent-mark}.
5818
5819 @item
5820 @vindex gnus-downloaded-mark
5821 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5822 downloaded for unplugged (offline) viewing.  If you are using the
5823 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5824 (The variable @code{gnus-downloaded-mark} controls which character to
5825 use.)
5826
5827 @item
5828 @vindex gnus-undownloaded-mark
5829 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5830 not have been downloaded.  Such articles cannot be viewed while you
5831 are unplugged (offline).  If you are using the @samp{%O} spec, these
5832 articles get the @samp{-} mark in that spec.  (The variable
5833 @code{gnus-undownloaded-mark} controls which character to use.)
5834
5835 @item
5836 @vindex gnus-downloadable-mark
5837 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5838 automatically, but it is also possible to explicitly mark articles for
5839 download, even if they would not be downloaded automatically.  Such
5840 explicitly-marked articles get the @samp{%} mark in the first column.
5841 (The variable @code{gnus-downloadable-mark} controls which character to
5842 use.)
5843
5844 @item
5845 @vindex gnus-not-empty-thread-mark
5846 @vindex gnus-empty-thread-mark
5847 If the @samp{%e} spec is used, the presence of threads or not will be
5848 marked with @code{gnus-not-empty-thread-mark} and
5849 @code{gnus-empty-thread-mark} in the third column, respectively.
5850
5851 @item
5852 @vindex gnus-process-mark
5853 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5854 variety of commands react to the presence of the process mark.  For
5855 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5856 all articles that have been marked with the process mark.  Articles
5857 marked with the process mark have a @samp{#} in the second column.
5858
5859 @end itemize
5860
5861 You might have noticed that most of these ``non-readedness'' marks
5862 appear in the second column by default.  So if you have a cached, saved,
5863 replied article that you have process-marked, what will that look like?
5864
5865 Nothing much.  The precedence rules go as follows: process -> cache ->
5866 replied -> saved.  So if the article is in the cache and is replied,
5867 you'll only see the cache mark and not the replied mark.
5868
5869
5870 @node Setting Marks
5871 @subsection Setting Marks
5872 @cindex setting marks
5873
5874 All the marking commands understand the numeric prefix.
5875
5876 @table @kbd
5877 @item M c
5878 @itemx M-u
5879 @kindex M c (Summary)
5880 @kindex M-u (Summary)
5881 @findex gnus-summary-clear-mark-forward
5882 @cindex mark as unread
5883 Clear all readedness-marks from the current article
5884 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5885 article as unread.
5886
5887 @item M t
5888 @itemx !
5889 @kindex ! (Summary)
5890 @kindex M t (Summary)
5891 @findex gnus-summary-tick-article-forward
5892 Tick the current article (@code{gnus-summary-tick-article-forward}).
5893 @xref{Article Caching}.
5894
5895 @item M ?
5896 @itemx ?
5897 @kindex ? (Summary)
5898 @kindex M ? (Summary)
5899 @findex gnus-summary-mark-as-dormant
5900 Mark the current article as dormant
5901 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5902
5903 @item M d
5904 @itemx d
5905 @kindex M d (Summary)
5906 @kindex d (Summary)
5907 @findex gnus-summary-mark-as-read-forward
5908 Mark the current article as read
5909 (@code{gnus-summary-mark-as-read-forward}).
5910
5911 @item D
5912 @kindex D (Summary)
5913 @findex gnus-summary-mark-as-read-backward
5914 Mark the current article as read and move point to the previous line
5915 (@code{gnus-summary-mark-as-read-backward}).
5916
5917 @item M k
5918 @itemx k
5919 @kindex k (Summary)
5920 @kindex M k (Summary)
5921 @findex gnus-summary-kill-same-subject-and-select
5922 Mark all articles that have the same subject as the current one as read,
5923 and then select the next unread article
5924 (@code{gnus-summary-kill-same-subject-and-select}).
5925
5926 @item M K
5927 @itemx C-k
5928 @kindex M K (Summary)
5929 @kindex C-k (Summary)
5930 @findex gnus-summary-kill-same-subject
5931 Mark all articles that have the same subject as the current one as read
5932 (@code{gnus-summary-kill-same-subject}).
5933
5934 @item M C
5935 @kindex M C (Summary)
5936 @findex gnus-summary-catchup
5937 @c @icon{gnus-summary-catchup}
5938 Mark all unread articles as read (@code{gnus-summary-catchup}).
5939
5940 @item M C-c
5941 @kindex M C-c (Summary)
5942 @findex gnus-summary-catchup-all
5943 Mark all articles in the group as read---even the ticked and dormant
5944 articles (@code{gnus-summary-catchup-all}).
5945
5946 @item M H
5947 @kindex M H (Summary)
5948 @findex gnus-summary-catchup-to-here
5949 Catchup the current group to point (before the point)
5950 (@code{gnus-summary-catchup-to-here}).
5951
5952 @item M h
5953 @kindex M h (Summary)
5954 @findex gnus-summary-catchup-from-here
5955 Catchup the current group from point (after the point)
5956 (@code{gnus-summary-catchup-from-here}).
5957
5958 @item C-w
5959 @kindex C-w (Summary)
5960 @findex gnus-summary-mark-region-as-read
5961 Mark all articles between point and mark as read
5962 (@code{gnus-summary-mark-region-as-read}).
5963
5964 @item M V k
5965 @kindex M V k (Summary)
5966 @findex gnus-summary-kill-below
5967 Kill all articles with scores below the default score (or below the
5968 numeric prefix) (@code{gnus-summary-kill-below}).
5969
5970 @item M e
5971 @itemx E
5972 @kindex M e (Summary)
5973 @kindex E (Summary)
5974 @findex gnus-summary-mark-as-expirable
5975 Mark the current article as expirable
5976 (@code{gnus-summary-mark-as-expirable}).
5977
5978 @item M b
5979 @kindex M b (Summary)
5980 @findex gnus-summary-set-bookmark
5981 Set a bookmark in the current article
5982 (@code{gnus-summary-set-bookmark}).
5983
5984 @item M B
5985 @kindex M B (Summary)
5986 @findex gnus-summary-remove-bookmark
5987 Remove the bookmark from the current article
5988 (@code{gnus-summary-remove-bookmark}).
5989
5990 @item M V c
5991 @kindex M V c (Summary)
5992 @findex gnus-summary-clear-above
5993 Clear all marks from articles with scores over the default score (or
5994 over the numeric prefix) (@code{gnus-summary-clear-above}).
5995
5996 @item M V u
5997 @kindex M V u (Summary)
5998 @findex gnus-summary-tick-above
5999 Tick all articles with scores over the default score (or over the
6000 numeric prefix) (@code{gnus-summary-tick-above}).
6001
6002 @item M V m
6003 @kindex M V m (Summary)
6004 @findex gnus-summary-mark-above
6005 Prompt for a mark, and mark all articles with scores over the default
6006 score (or over the numeric prefix) with this mark
6007 (@code{gnus-summary-clear-above}).
6008 @end table
6009
6010 @vindex gnus-summary-goto-unread
6011 The @code{gnus-summary-goto-unread} variable controls what action should
6012 be taken after setting a mark.  If non-@code{nil}, point will move to
6013 the next/previous unread article.  If @code{nil}, point will just move
6014 one line up or down.  As a special case, if this variable is
6015 @code{never}, all the marking commands as well as other commands (like
6016 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6017 The default is @code{t}.
6018
6019
6020 @node Generic Marking Commands
6021 @subsection Generic Marking Commands
6022
6023 Some people would like the command that ticks an article (@kbd{!}) go to
6024 the next article.  Others would like it to go to the next unread
6025 article.  Yet others would like it to stay on the current article.  And
6026 even though I haven't heard of anybody wanting it to go to the
6027 previous (unread) article, I'm sure there are people that want that as
6028 well.
6029
6030 Multiply these five behaviors with five different marking commands, and
6031 you get a potentially complex set of variable to control what each
6032 command should do.
6033
6034 To sidestep that mess, Gnus provides commands that do all these
6035 different things.  They can be found on the @kbd{M M} map in the summary
6036 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6037 to list in this manual.
6038
6039 While you can use these commands directly, most users would prefer
6040 altering the summary mode keymap.  For instance, if you would like the
6041 @kbd{!} command to go to the next article instead of the next unread
6042 article, you could say something like:
6043
6044 @lisp
6045 @group
6046 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6047 (defun my-alter-summary-map ()
6048   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6049 @end group
6050 @end lisp
6051
6052 @noindent
6053 or
6054
6055 @lisp
6056 (defun my-alter-summary-map ()
6057   (local-set-key "!" "MM!n"))
6058 @end lisp
6059
6060
6061 @node Setting Process Marks
6062 @subsection Setting Process Marks
6063 @cindex setting process marks
6064
6065 Process marks are displayed as @code{#} in the summary buffer, and are
6066 used for marking articles in such a way that other commands will
6067 process these articles.  For instance, if you process mark four
6068 articles and then use the @kbd{*} command, Gnus will enter these four
6069 commands into the cache.  For more information,
6070 @pxref{Process/Prefix}.
6071
6072 @table @kbd
6073
6074 @item M P p
6075 @itemx #
6076 @kindex # (Summary)
6077 @kindex M P p (Summary)
6078 @findex gnus-summary-mark-as-processable
6079 Mark the current article with the process mark
6080 (@code{gnus-summary-mark-as-processable}).
6081 @findex gnus-summary-unmark-as-processable
6082
6083 @item M P u
6084 @itemx M-#
6085 @kindex M P u (Summary)
6086 @kindex M-# (Summary)
6087 Remove the process mark, if any, from the current article
6088 (@code{gnus-summary-unmark-as-processable}).
6089
6090 @item M P U
6091 @kindex M P U (Summary)
6092 @findex gnus-summary-unmark-all-processable
6093 Remove the process mark from all articles
6094 (@code{gnus-summary-unmark-all-processable}).
6095
6096 @item M P i
6097 @kindex M P i (Summary)
6098 @findex gnus-uu-invert-processable
6099 Invert the list of process marked articles
6100 (@code{gnus-uu-invert-processable}).
6101
6102 @item M P R
6103 @kindex M P R (Summary)
6104 @findex gnus-uu-mark-by-regexp
6105 Mark articles that have a @code{Subject} header that matches a regular
6106 expression (@code{gnus-uu-mark-by-regexp}).
6107
6108 @item M P G
6109 @kindex M P G (Summary)
6110 @findex gnus-uu-unmark-by-regexp
6111 Unmark articles that have a @code{Subject} header that matches a regular
6112 expression (@code{gnus-uu-unmark-by-regexp}).
6113
6114 @item M P r
6115 @kindex M P r (Summary)
6116 @findex gnus-uu-mark-region
6117 Mark articles in region (@code{gnus-uu-mark-region}).
6118
6119 @item M P g
6120 @kindex M P g
6121 @findex gnus-uu-unmark-region
6122 Unmark articles in region (@code{gnus-uu-unmark-region}).
6123
6124 @item M P t
6125 @kindex M P t (Summary)
6126 @findex gnus-uu-mark-thread
6127 Mark all articles in the current (sub)thread
6128 (@code{gnus-uu-mark-thread}).
6129
6130 @item M P T
6131 @kindex M P T (Summary)
6132 @findex gnus-uu-unmark-thread
6133 Unmark all articles in the current (sub)thread
6134 (@code{gnus-uu-unmark-thread}).
6135
6136 @item M P v
6137 @kindex M P v (Summary)
6138 @findex gnus-uu-mark-over
6139 Mark all articles that have a score above the prefix argument
6140 (@code{gnus-uu-mark-over}).
6141
6142 @item M P s
6143 @kindex M P s (Summary)
6144 @findex gnus-uu-mark-series
6145 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6146
6147 @item M P S
6148 @kindex M P S (Summary)
6149 @findex gnus-uu-mark-sparse
6150 Mark all series that have already had some articles marked
6151 (@code{gnus-uu-mark-sparse}).
6152
6153 @item M P a
6154 @kindex M P a (Summary)
6155 @findex gnus-uu-mark-all
6156 Mark all articles in series order (@code{gnus-uu-mark-series}).
6157
6158 @item M P b
6159 @kindex M P b (Summary)
6160 @findex gnus-uu-mark-buffer
6161 Mark all articles in the buffer in the order they appear
6162 (@code{gnus-uu-mark-buffer}).
6163
6164 @item M P k
6165 @kindex M P k (Summary)
6166 @findex gnus-summary-kill-process-mark
6167 Push the current process mark set onto the stack and unmark all articles
6168 (@code{gnus-summary-kill-process-mark}).
6169
6170 @item M P y
6171 @kindex M P y (Summary)
6172 @findex gnus-summary-yank-process-mark
6173 Pop the previous process mark set from the stack and restore it
6174 (@code{gnus-summary-yank-process-mark}).
6175
6176 @item M P w
6177 @kindex M P w (Summary)
6178 @findex gnus-summary-save-process-mark
6179 Push the current process mark set onto the stack
6180 (@code{gnus-summary-save-process-mark}).
6181
6182 @end table
6183
6184 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6185 set process marks based on article body contents.
6186
6187
6188 @node Limiting
6189 @section Limiting
6190 @cindex limiting
6191
6192 It can be convenient to limit the summary buffer to just show some
6193 subset of the articles currently in the group.  The effect most limit
6194 commands have is to remove a few (or many) articles from the summary
6195 buffer.
6196
6197 All limiting commands work on subsets of the articles already fetched
6198 from the servers.  None of these commands query the server for
6199 additional articles.
6200
6201 @table @kbd
6202
6203 @item / /
6204 @itemx / s
6205 @kindex / / (Summary)
6206 @findex gnus-summary-limit-to-subject
6207 Limit the summary buffer to articles that match some subject
6208 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6209 matching articles.
6210
6211 @item / a
6212 @kindex / a (Summary)
6213 @findex gnus-summary-limit-to-author
6214 Limit the summary buffer to articles that match some author
6215 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6216 matching articles.
6217
6218 @item / x
6219 @kindex / x (Summary)
6220 @findex gnus-summary-limit-to-extra
6221 Limit the summary buffer to articles that match one of the ``extra''
6222 headers (@pxref{To From Newsgroups})
6223 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6224 matching articles.
6225
6226 @item / u
6227 @itemx x
6228 @kindex / u (Summary)
6229 @kindex x (Summary)
6230 @findex gnus-summary-limit-to-unread
6231 Limit the summary buffer to articles not marked as read
6232 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6233 buffer to articles strictly unread.  This means that ticked and
6234 dormant articles will also be excluded.
6235
6236 @item / m
6237 @kindex / m (Summary)
6238 @findex gnus-summary-limit-to-marks
6239 Ask for a mark and then limit to all articles that have been marked
6240 with that mark (@code{gnus-summary-limit-to-marks}).
6241
6242 @item / t
6243 @kindex / t (Summary)
6244 @findex gnus-summary-limit-to-age
6245 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6246 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6247 articles younger than that number of days.
6248
6249 @item / n
6250 @kindex / n (Summary)
6251 @findex gnus-summary-limit-to-articles
6252 Limit the summary buffer to the current article
6253 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6254 convention (@pxref{Process/Prefix}).
6255
6256 @item / w
6257 @kindex / w (Summary)
6258 @findex gnus-summary-pop-limit
6259 Pop the previous limit off the stack and restore it
6260 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6261 the stack.
6262
6263 @item / .
6264 @kindex / . (Summary)
6265 @findex gnus-summary-limit-to-unseen
6266 Limit the summary buffer to the unseen articles
6267 (@code{gnus-summary-limit-to-unseen}).
6268
6269 @item / v
6270 @kindex / v (Summary)
6271 @findex gnus-summary-limit-to-score
6272 Limit the summary buffer to articles that have a score at or above some
6273 score (@code{gnus-summary-limit-to-score}).
6274
6275 @item / p
6276 @kindex / p (Summary)
6277 @findex gnus-summary-limit-to-display-predicate
6278 Limit the summary buffer to articles that satisfy the @code{display}
6279 group parameter predicate
6280 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6281 Parameters}, for more on this predicate.
6282
6283 @item / E
6284 @itemx M S
6285 @kindex M S (Summary)
6286 @kindex / E (Summary)
6287 @findex gnus-summary-limit-include-expunged
6288 Include all expunged articles in the limit
6289 (@code{gnus-summary-limit-include-expunged}).
6290
6291 @item / D
6292 @kindex / D (Summary)
6293 @findex gnus-summary-limit-include-dormant
6294 Include all dormant articles in the limit
6295 (@code{gnus-summary-limit-include-dormant}).
6296
6297 @item / *
6298 @kindex / * (Summary)
6299 @findex gnus-summary-limit-include-cached
6300 Include all cached articles in the limit
6301 (@code{gnus-summary-limit-include-cached}).
6302
6303 @item / d
6304 @kindex / d (Summary)
6305 @findex gnus-summary-limit-exclude-dormant
6306 Exclude all dormant articles from the limit
6307 (@code{gnus-summary-limit-exclude-dormant}).
6308
6309 @item / M
6310 @kindex / M (Summary)
6311 @findex gnus-summary-limit-exclude-marks
6312 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6313
6314 @item / T
6315 @kindex / T (Summary)
6316 @findex gnus-summary-limit-include-thread
6317 Include all the articles in the current thread in the limit.
6318
6319 @item / c
6320 @kindex / c (Summary)
6321 @findex gnus-summary-limit-exclude-childless-dormant
6322 Exclude all dormant articles that have no children from the limit@*
6323 (@code{gnus-summary-limit-exclude-childless-dormant}).
6324
6325 @item / C
6326 @kindex / C (Summary)
6327 @findex gnus-summary-limit-mark-excluded-as-read
6328 Mark all excluded unread articles as read
6329 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6330 also mark excluded ticked and dormant articles as read.
6331
6332 @item / N
6333 @kindex / N (Summary)
6334 @findex gnus-summary-insert-new-articles
6335 Insert all new articles in the summary buffer.  It scans for new emails
6336 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6337
6338 @item / o
6339 @kindex / o (Summary)
6340 @findex gnus-summary-insert-old-articles
6341 Insert all old articles in the summary buffer.  If given a numbered
6342 prefix, fetch this number of articles.
6343
6344 @end table
6345
6346
6347 @node Threading
6348 @section Threading
6349 @cindex threading
6350 @cindex article threading
6351
6352 Gnus threads articles by default.  @dfn{To thread} is to put responses
6353 to articles directly after the articles they respond to---in a
6354 hierarchical fashion.
6355
6356 Threading is done by looking at the @code{References} headers of the
6357 articles.  In a perfect world, this would be enough to build pretty
6358 trees, but unfortunately, the @code{References} header is often broken
6359 or simply missing.  Weird news propagation exacerbates the problem,
6360 so one has to employ other heuristics to get pleasing results.  A
6361 plethora of approaches exists, as detailed in horrible detail in
6362 @ref{Customizing Threading}.
6363
6364 First, a quick overview of the concepts:
6365
6366 @table @dfn
6367 @item root
6368 The top-most article in a thread; the first article in the thread.
6369
6370 @item thread
6371 A tree-like article structure.
6372
6373 @item sub-thread
6374 A small(er) section of this tree-like structure.
6375
6376 @item loose threads
6377 Threads often lose their roots due to article expiry, or due to the root
6378 already having been read in a previous session, and not displayed in the
6379 summary buffer.  We then typically have many sub-threads that really
6380 belong to one thread, but are without connecting roots.  These are
6381 called loose threads.
6382
6383 @item thread gathering
6384 An attempt to gather loose threads into bigger threads.
6385
6386 @item sparse threads
6387 A thread where the missing articles have been ``guessed'' at, and are
6388 displayed as empty lines in the summary buffer.
6389
6390 @end table
6391
6392
6393 @menu
6394 * Customizing Threading::       Variables you can change to affect the threading.
6395 * Thread Commands::             Thread based commands in the summary buffer.
6396 @end menu
6397
6398
6399 @node Customizing Threading
6400 @subsection Customizing Threading
6401 @cindex customizing threading
6402
6403 @menu
6404 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6405 * Filling In Threads::          Making the threads displayed look fuller.
6406 * More Threading::              Even more variables for fiddling with threads.
6407 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6408 @end menu
6409
6410
6411 @node Loose Threads
6412 @subsubsection Loose Threads
6413 @cindex <
6414 @cindex >
6415 @cindex loose threads
6416
6417 @table @code
6418 @item gnus-summary-make-false-root
6419 @vindex gnus-summary-make-false-root
6420 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6421 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6422 Yup.)  Loose subtrees occur when the real root has expired, or you've
6423 read or killed the root in a previous session.
6424
6425 When there is no real root of a thread, Gnus will have to fudge
6426 something.  This variable says what fudging method Gnus should use.
6427 There are four possible values:
6428
6429 @iftex
6430 @iflatex
6431 \gnusfigure{The Summary Buffer}{390}{
6432 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6433 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6434 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6435 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6436 }
6437 @end iflatex
6438 @end iftex
6439
6440 @cindex adopting articles
6441
6442 @table @code
6443
6444 @item adopt
6445 Gnus will make the first of the orphaned articles the parent.  This
6446 parent will adopt all the other articles.  The adopted articles will be
6447 marked as such by pointy brackets (@samp{<>}) instead of the standard
6448 square brackets (@samp{[]}).  This is the default method.
6449
6450 @item dummy
6451 @vindex gnus-summary-dummy-line-format
6452 @vindex gnus-summary-make-false-root-always
6453 Gnus will create a dummy summary line that will pretend to be the
6454 parent.  This dummy line does not correspond to any real article, so
6455 selecting it will just select the first real article after the dummy
6456 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6457 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6458 which is the subject of the article.  @xref{Formatting Variables}.
6459 If you want all threads to have a dummy root, even the non-gathered
6460 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6461
6462 @item empty
6463 Gnus won't actually make any article the parent, but simply leave the
6464 subject field of all orphans except the first empty.  (Actually, it will
6465 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6466 Buffer Format}).)
6467
6468 @item none
6469 Don't make any article parent at all.  Just gather the threads and
6470 display them after one another.
6471
6472 @item nil
6473 Don't gather loose threads.
6474 @end table
6475
6476 @item gnus-summary-gather-subject-limit
6477 @vindex gnus-summary-gather-subject-limit
6478 Loose threads are gathered by comparing subjects of articles.  If this
6479 variable is @code{nil}, Gnus requires an exact match between the
6480 subjects of the loose threads before gathering them into one big
6481 super-thread.  This might be too strict a requirement, what with the
6482 presence of stupid newsreaders that chop off long subject lines.  If
6483 you think so, set this variable to, say, 20 to require that only the
6484 first 20 characters of the subjects have to match.  If you set this
6485 variable to a really low number, you'll find that Gnus will gather
6486 everything in sight into one thread, which isn't very helpful.
6487
6488 @cindex fuzzy article gathering
6489 If you set this variable to the special value @code{fuzzy}, Gnus will
6490 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6491 Matching}).
6492
6493 @item gnus-simplify-subject-fuzzy-regexp
6494 @vindex gnus-simplify-subject-fuzzy-regexp
6495 This can either be a regular expression or list of regular expressions
6496 that match strings that will be removed from subjects if fuzzy subject
6497 simplification is used.
6498
6499 @item gnus-simplify-ignored-prefixes
6500 @vindex gnus-simplify-ignored-prefixes
6501 If you set @code{gnus-summary-gather-subject-limit} to something as low
6502 as 10, you might consider setting this variable to something sensible:
6503
6504 @c Written by Michael Ernst <mernst@cs.rice.edu>
6505 @lisp
6506 (setq gnus-simplify-ignored-prefixes
6507       (concat
6508        "\\`\\[?\\("
6509        (mapconcat
6510         'identity
6511         '("looking"
6512           "wanted" "followup" "summary\\( of\\)?"
6513           "help" "query" "problem" "question"
6514           "answer" "reference" "announce"
6515           "How can I" "How to" "Comparison of"
6516           ;; ...
6517           )
6518         "\\|")
6519        "\\)\\s *\\("
6520        (mapconcat 'identity
6521                   '("for" "for reference" "with" "about")
6522                   "\\|")
6523        "\\)?\\]?:?[ \t]*"))
6524 @end lisp
6525
6526 All words that match this regexp will be removed before comparing two
6527 subjects.
6528
6529 @item gnus-simplify-subject-functions
6530 @vindex gnus-simplify-subject-functions
6531 If non-@code{nil}, this variable overrides
6532 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6533 list of functions to apply to the @code{Subject} string iteratively to
6534 arrive at the simplified version of the string.
6535
6536 Useful functions to put in this list include:
6537
6538 @table @code
6539 @item gnus-simplify-subject-re
6540 @findex gnus-simplify-subject-re
6541 Strip the leading @samp{Re:}.
6542
6543 @item gnus-simplify-subject-fuzzy
6544 @findex gnus-simplify-subject-fuzzy
6545 Simplify fuzzily.
6546
6547 @item gnus-simplify-whitespace
6548 @findex gnus-simplify-whitespace
6549 Remove excessive whitespace.
6550
6551 @item gnus-simplify-all-whitespace
6552 @findex gnus-simplify-all-whitespace
6553 Remove all whitespace.
6554 @end table
6555
6556 You may also write your own functions, of course.
6557
6558
6559 @item gnus-summary-gather-exclude-subject
6560 @vindex gnus-summary-gather-exclude-subject
6561 Since loose thread gathering is done on subjects only, that might lead
6562 to many false hits, especially with certain common subjects like
6563 @samp{} and @samp{(none)}.  To make the situation slightly better,
6564 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6565 what subjects should be excluded from the gathering process.@*
6566 The default is @samp{^ *$\\|^(none)$}.
6567
6568 @item gnus-summary-thread-gathering-function
6569 @vindex gnus-summary-thread-gathering-function
6570 Gnus gathers threads by looking at @code{Subject} headers.  This means
6571 that totally unrelated articles may end up in the same ``thread'', which
6572 is confusing.  An alternate approach is to look at all the
6573 @code{Message-ID}s in all the @code{References} headers to find matches.
6574 This will ensure that no gathered threads ever include unrelated
6575 articles, but it also means that people who have posted with broken
6576 newsreaders won't be gathered properly.  The choice is yours---plague or
6577 cholera:
6578
6579 @table @code
6580 @item gnus-gather-threads-by-subject
6581 @findex gnus-gather-threads-by-subject
6582 This function is the default gathering function and looks at
6583 @code{Subject}s exclusively.
6584
6585 @item gnus-gather-threads-by-references
6586 @findex gnus-gather-threads-by-references
6587 This function looks at @code{References} headers exclusively.
6588 @end table
6589
6590 If you want to test gathering by @code{References}, you could say
6591 something like:
6592
6593 @lisp
6594 (setq gnus-summary-thread-gathering-function
6595       'gnus-gather-threads-by-references)
6596 @end lisp
6597
6598 @end table
6599
6600
6601 @node Filling In Threads
6602 @subsubsection Filling In Threads
6603
6604 @table @code
6605 @item gnus-fetch-old-headers
6606 @vindex gnus-fetch-old-headers
6607 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6608 more old headers---headers to articles marked as read.  If you
6609 would like to display as few summary lines as possible, but still
6610 connect as many loose threads as possible, you should set this variable
6611 to @code{some} or a number.  If you set it to a number, no more than
6612 that number of extra old headers will be fetched.  In either case,
6613 fetching old headers only works if the back end you are using carries
6614 overview files---this would normally be @code{nntp}, @code{nnspool},
6615 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6616 the thread has been expired by the server, there's not much Gnus can do
6617 about that.
6618
6619 This variable can also be set to @code{invisible}.  This won't have any
6620 visible effects, but is useful if you use the @kbd{A T} command a lot
6621 (@pxref{Finding the Parent}).
6622
6623 @item gnus-fetch-old-ephemeral-headers
6624 @vindex gnus-fetch-old-ephemeral-headers
6625 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6626 newsgroups.
6627
6628 @item gnus-build-sparse-threads
6629 @vindex gnus-build-sparse-threads
6630 Fetching old headers can be slow.  A low-rent similar effect can be
6631 gotten by setting this variable to @code{some}.  Gnus will then look at
6632 the complete @code{References} headers of all articles and try to string
6633 together articles that belong in the same thread.  This will leave
6634 @dfn{gaps} in the threading display where Gnus guesses that an article
6635 is missing from the thread.  (These gaps appear like normal summary
6636 lines.  If you select a gap, Gnus will try to fetch the article in
6637 question.)  If this variable is @code{t}, Gnus will display all these
6638 ``gaps'' without regard for whether they are useful for completing the
6639 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6640 off sparse leaf nodes that don't lead anywhere.  This variable is
6641 @code{nil} by default.
6642
6643 @item gnus-read-all-available-headers
6644 @vindex gnus-read-all-available-headers
6645 This is a rather obscure variable that few will find useful.  It's
6646 intended for those non-news newsgroups where the back end has to fetch
6647 quite a lot to present the summary buffer, and where it's impossible to
6648 go back to parents of articles.  This is mostly the case in the
6649 web-based groups, like the @code{nnultimate} groups.
6650
6651 If you don't use those, then it's safe to leave this as the default
6652 @code{nil}.  If you want to use this variable, it should be a regexp
6653 that matches the group name, or @code{t} for all groups.
6654
6655 @end table
6656
6657
6658 @node More Threading
6659 @subsubsection More Threading
6660
6661 @table @code
6662 @item gnus-show-threads
6663 @vindex gnus-show-threads
6664 If this variable is @code{nil}, no threading will be done, and all of
6665 the rest of the variables here will have no effect.  Turning threading
6666 off will speed group selection up a bit, but it is sure to make reading
6667 slower and more awkward.
6668
6669 @item gnus-thread-hide-subtree
6670 @vindex gnus-thread-hide-subtree
6671 If non-@code{nil}, all threads will be hidden when the summary buffer is
6672 generated.
6673
6674 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6675 Available predicates are @code{gnus-article-unread-p} and
6676 @code{gnus-article-unseen-p}.
6677
6678 Here's an example:
6679
6680 @lisp
6681 (setq gnus-thread-hide-subtree
6682       '(or gnus-article-unread-p
6683            gnus-article-unseen-p))
6684 @end lisp
6685
6686 (It's a pretty nonsensical example, since all unseen articles are also
6687 unread, but you get my drift.)
6688
6689
6690 @item gnus-thread-expunge-below
6691 @vindex gnus-thread-expunge-below
6692 All threads that have a total score (as defined by
6693 @code{gnus-thread-score-function}) less than this number will be
6694 expunged.  This variable is @code{nil} by default, which means that no
6695 threads are expunged.
6696
6697 @item gnus-thread-hide-killed
6698 @vindex gnus-thread-hide-killed
6699 if you kill a thread and this variable is non-@code{nil}, the subtree
6700 will be hidden.
6701
6702 @item gnus-thread-ignore-subject
6703 @vindex gnus-thread-ignore-subject
6704 Sometimes somebody changes the subject in the middle of a thread.  If
6705 this variable is non-@code{nil}, which is the default, the subject
6706 change is ignored.  If it is @code{nil}, a change in the subject will
6707 result in a new thread.
6708
6709 @item gnus-thread-indent-level
6710 @vindex gnus-thread-indent-level
6711 This is a number that says how much each sub-thread should be indented.
6712 The default is 4.
6713
6714 @item gnus-sort-gathered-threads-function
6715 @vindex gnus-sort-gathered-threads-function
6716 Sometimes, particularly with mailing lists, the order in which mails
6717 arrive locally is not necessarily the same as the order in which they
6718 arrived on the mailing list.  Consequently, when sorting sub-threads
6719 using the default @code{gnus-thread-sort-by-number}, responses can end
6720 up appearing before the article to which they are responding to.
6721 Setting this variable to an alternate value
6722 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6723 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6724 more logical sub-thread ordering in such instances.
6725
6726 @end table
6727
6728
6729 @node Low-Level Threading
6730 @subsubsection Low-Level Threading
6731
6732 @table @code
6733
6734 @item gnus-parse-headers-hook
6735 @vindex gnus-parse-headers-hook
6736 Hook run before parsing any headers.
6737
6738 @item gnus-alter-header-function
6739 @vindex gnus-alter-header-function
6740 If non-@code{nil}, this function will be called to allow alteration of
6741 article header structures.  The function is called with one parameter,
6742 the article header vector, which it may alter in any way.  For instance,
6743 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6744 in systematic ways (by adding prefixes and such), you can use this
6745 variable to un-scramble the @code{Message-ID}s so that they are more
6746 meaningful.  Here's one example:
6747
6748 @lisp
6749 (setq gnus-alter-header-function 'my-alter-message-id)
6750
6751 (defun my-alter-message-id (header)
6752   (let ((id (mail-header-id header)))
6753     (when (string-match
6754            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6755       (mail-header-set-id
6756        (concat (match-string 1 id) "@@" (match-string 2 id))
6757        header))))
6758 @end lisp
6759
6760 @end table
6761
6762
6763 @node Thread Commands
6764 @subsection Thread Commands
6765 @cindex thread commands
6766
6767 @table @kbd
6768
6769 @item T k
6770 @itemx C-M-k
6771 @kindex T k (Summary)
6772 @kindex C-M-k (Summary)
6773 @findex gnus-summary-kill-thread
6774 Mark all articles in the current (sub-)thread as read
6775 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6776 remove all marks instead.  If the prefix argument is negative, tick
6777 articles instead.
6778
6779 @item T l
6780 @itemx C-M-l
6781 @kindex T l (Summary)
6782 @kindex C-M-l (Summary)
6783 @findex gnus-summary-lower-thread
6784 Lower the score of the current (sub-)thread
6785 (@code{gnus-summary-lower-thread}).
6786
6787 @item T i
6788 @kindex T i (Summary)
6789 @findex gnus-summary-raise-thread
6790 Increase the score of the current (sub-)thread
6791 (@code{gnus-summary-raise-thread}).
6792
6793 @item T #
6794 @kindex T # (Summary)
6795 @findex gnus-uu-mark-thread
6796 Set the process mark on the current (sub-)thread
6797 (@code{gnus-uu-mark-thread}).
6798
6799 @item T M-#
6800 @kindex T M-# (Summary)
6801 @findex gnus-uu-unmark-thread
6802 Remove the process mark from the current (sub-)thread
6803 (@code{gnus-uu-unmark-thread}).
6804
6805 @item T T
6806 @kindex T T (Summary)
6807 @findex gnus-summary-toggle-threads
6808 Toggle threading (@code{gnus-summary-toggle-threads}).
6809
6810 @item T s
6811 @kindex T s (Summary)
6812 @findex gnus-summary-show-thread
6813 Expose the (sub-)thread hidden under the current article, if any@*
6814 (@code{gnus-summary-show-thread}).
6815
6816 @item T h
6817 @kindex T h (Summary)
6818 @findex gnus-summary-hide-thread
6819 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6820
6821 @item T S
6822 @kindex T S (Summary)
6823 @findex gnus-summary-show-all-threads
6824 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6825
6826 @item T H
6827 @kindex T H (Summary)
6828 @findex gnus-summary-hide-all-threads
6829 Hide all threads (@code{gnus-summary-hide-all-threads}).
6830
6831 @item T t
6832 @kindex T t (Summary)
6833 @findex gnus-summary-rethread-current
6834 Re-thread the current article's thread
6835 (@code{gnus-summary-rethread-current}).  This works even when the
6836 summary buffer is otherwise unthreaded.
6837
6838 @item T ^
6839 @kindex T ^ (Summary)
6840 @findex gnus-summary-reparent-thread
6841 Make the current article the child of the marked (or previous) article
6842 (@code{gnus-summary-reparent-thread}).
6843
6844 @end table
6845
6846 The following commands are thread movement commands.  They all
6847 understand the numeric prefix.
6848
6849 @table @kbd
6850
6851 @item T n
6852 @kindex T n (Summary)
6853 @itemx C-M-f
6854 @kindex C-M-n (Summary)
6855 @itemx M-down
6856 @kindex M-down (Summary)
6857 @findex gnus-summary-next-thread
6858 Go to the next thread (@code{gnus-summary-next-thread}).
6859
6860 @item T p
6861 @kindex T p (Summary)
6862 @itemx C-M-b
6863 @kindex C-M-p (Summary)
6864 @itemx M-up
6865 @kindex M-up (Summary)
6866 @findex gnus-summary-prev-thread
6867 Go to the previous thread (@code{gnus-summary-prev-thread}).
6868
6869 @item T d
6870 @kindex T d (Summary)
6871 @findex gnus-summary-down-thread
6872 Descend the thread (@code{gnus-summary-down-thread}).
6873
6874 @item T u
6875 @kindex T u (Summary)
6876 @findex gnus-summary-up-thread
6877 Ascend the thread (@code{gnus-summary-up-thread}).
6878
6879 @item T o
6880 @kindex T o (Summary)
6881 @findex gnus-summary-top-thread
6882 Go to the top of the thread (@code{gnus-summary-top-thread}).
6883 @end table
6884
6885 @vindex gnus-thread-operation-ignore-subject
6886 If you ignore subject while threading, you'll naturally end up with
6887 threads that have several different subjects in them.  If you then issue
6888 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6889 wish to kill the entire thread, but just those parts of the thread that
6890 have the same subject as the current article.  If you like this idea,
6891 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6892 is non-@code{nil} (which it is by default), subjects will be ignored
6893 when doing thread commands.  If this variable is @code{nil}, articles in
6894 the same thread with different subjects will not be included in the
6895 operation in question.  If this variable is @code{fuzzy}, only articles
6896 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6897 Matching}).
6898
6899
6900 @node Sorting the Summary Buffer
6901 @section Sorting the Summary Buffer
6902
6903 @findex gnus-thread-sort-by-total-score
6904 @findex gnus-thread-sort-by-date
6905 @findex gnus-thread-sort-by-score
6906 @findex gnus-thread-sort-by-subject
6907 @findex gnus-thread-sort-by-author
6908 @findex gnus-thread-sort-by-number
6909 @findex gnus-thread-sort-by-random
6910 @vindex gnus-thread-sort-functions
6911 @findex gnus-thread-sort-by-most-recent-number
6912 @findex gnus-thread-sort-by-most-recent-date
6913 If you are using a threaded summary display, you can sort the threads by
6914 setting @code{gnus-thread-sort-functions}, which can be either a single
6915 function, a list of functions, or a list containing functions and
6916 @code{(not some-function)} elements.
6917
6918 By default, sorting is done on article numbers.  Ready-made sorting
6919 predicate functions include @code{gnus-thread-sort-by-number},
6920 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6921 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6922 @code{gnus-thread-sort-by-most-recent-number},
6923 @code{gnus-thread-sort-by-most-recent-date},
6924 @code{gnus-thread-sort-by-random} and
6925 @code{gnus-thread-sort-by-total-score}.
6926
6927 Each function takes two threads and returns non-@code{nil} if the first
6928 thread should be sorted before the other.  Note that sorting really is
6929 normally done by looking only at the roots of each thread.
6930
6931 If you use more than one function, the primary sort key should be the
6932 last function in the list.  You should probably always include
6933 @code{gnus-thread-sort-by-number} in the list of sorting
6934 functions---preferably first.  This will ensure that threads that are
6935 equal with respect to the other sort criteria will be displayed in
6936 ascending article order.
6937
6938 If you would like to sort by reverse score, then by subject, and finally
6939 by number, you could do something like:
6940
6941 @lisp
6942 (setq gnus-thread-sort-functions
6943       '(gnus-thread-sort-by-number
6944         gnus-thread-sort-by-subject
6945         (not gnus-thread-sort-by-total-score)))
6946 @end lisp
6947
6948 The threads that have highest score will be displayed first in the
6949 summary buffer.  When threads have the same score, they will be sorted
6950 alphabetically.  The threads that have the same score and the same
6951 subject will be sorted by number, which is (normally) the sequence in
6952 which the articles arrived.
6953
6954 If you want to sort by score and then reverse arrival order, you could
6955 say something like:
6956
6957 @lisp
6958 (setq gnus-thread-sort-functions
6959       '((lambda (t1 t2)
6960           (not (gnus-thread-sort-by-number t1 t2)))
6961         gnus-thread-sort-by-score))
6962 @end lisp
6963
6964 @vindex gnus-thread-score-function
6965 The function in the @code{gnus-thread-score-function} variable (default
6966 @code{+}) is used for calculating the total score of a thread.  Useful
6967 functions might be @code{max}, @code{min}, or squared means, or whatever
6968 tickles your fancy.
6969
6970 @findex gnus-article-sort-functions
6971 @findex gnus-article-sort-by-date
6972 @findex gnus-article-sort-by-score
6973 @findex gnus-article-sort-by-subject
6974 @findex gnus-article-sort-by-author
6975 @findex gnus-article-sort-by-random
6976 @findex gnus-article-sort-by-number
6977 If you are using an unthreaded display for some strange reason or
6978 other, you have to fiddle with the @code{gnus-article-sort-functions}
6979 variable.  It is very similar to the
6980 @code{gnus-thread-sort-functions}, except that it uses slightly
6981 different functions for article comparison.  Available sorting
6982 predicate functions are @code{gnus-article-sort-by-number},
6983 @code{gnus-article-sort-by-author},
6984 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6985 @code{gnus-article-sort-by-random}, and
6986 @code{gnus-article-sort-by-score}.
6987
6988 If you want to sort an unthreaded summary display by subject, you could
6989 say something like:
6990
6991 @lisp
6992 (setq gnus-article-sort-functions
6993       '(gnus-article-sort-by-number
6994         gnus-article-sort-by-subject))
6995 @end lisp
6996
6997
6998
6999 @node Asynchronous Fetching
7000 @section Asynchronous Article Fetching
7001 @cindex asynchronous article fetching
7002 @cindex article pre-fetch
7003 @cindex pre-fetch
7004
7005 If you read your news from an @acronym{NNTP} server that's far away, the
7006 network latencies may make reading articles a chore.  You have to wait
7007 for a while after pressing @kbd{n} to go to the next article before the
7008 article appears.  Why can't Gnus just go ahead and fetch the article
7009 while you are reading the previous one?  Why not, indeed.
7010
7011 First, some caveats.  There are some pitfalls to using asynchronous
7012 article fetching, especially the way Gnus does it.
7013
7014 Let's say you are reading article 1, which is short, and article 2 is
7015 quite long, and you are not interested in reading that.  Gnus does not
7016 know this, so it goes ahead and fetches article 2.  You decide to read
7017 article 3, but since Gnus is in the process of fetching article 2, the
7018 connection is blocked.
7019
7020 To avoid these situations, Gnus will open two (count 'em two)
7021 connections to the server.  Some people may think this isn't a very nice
7022 thing to do, but I don't see any real alternatives.  Setting up that
7023 extra connection takes some time, so Gnus startup will be slower.
7024
7025 Gnus will fetch more articles than you will read.  This will mean that
7026 the link between your machine and the @acronym{NNTP} server will become more
7027 loaded than if you didn't use article pre-fetch.  The server itself will
7028 also become more loaded---both with the extra article requests, and the
7029 extra connection.
7030
7031 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7032 you really want to.
7033
7034 @vindex gnus-asynchronous
7035 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7036 happen automatically.
7037
7038 @vindex gnus-use-article-prefetch
7039 You can control how many articles are to be pre-fetched by setting
7040 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7041 that when you read an article in the group, the back end will pre-fetch
7042 the next 30 articles.  If this variable is @code{t}, the back end will
7043 pre-fetch all the articles it can without bound.  If it is
7044 @code{nil}, no pre-fetching will be done.
7045
7046 @vindex gnus-async-prefetch-article-p
7047 @findex gnus-async-read-p
7048 There are probably some articles that you don't want to pre-fetch---read
7049 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7050 variable controls whether an article is to be pre-fetched.  This
7051 function should return non-@code{nil} when the article in question is
7052 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7053 returns @code{nil} on read articles.  The function is called with an
7054 article data structure as the only parameter.
7055
7056 If, for instance, you wish to pre-fetch only unread articles shorter
7057 than 100 lines, you could say something like:
7058
7059 @lisp
7060 (defun my-async-short-unread-p (data)
7061   "Return non-nil for short, unread articles."
7062   (and (gnus-data-unread-p data)
7063        (< (mail-header-lines (gnus-data-header data))
7064           100)))
7065
7066 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7067 @end lisp
7068
7069 These functions will be called many, many times, so they should
7070 preferably be short and sweet to avoid slowing down Gnus too much.
7071 It's probably a good idea to byte-compile things like this.
7072
7073 @vindex gnus-prefetched-article-deletion-strategy
7074 Articles have to be removed from the asynch buffer sooner or later.  The
7075 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7076 articles.  This is a list that may contain the following elements:
7077
7078 @table @code
7079 @item read
7080 Remove articles when they are read.
7081
7082 @item exit
7083 Remove articles when exiting the group.
7084 @end table
7085
7086 The default value is @code{(read exit)}.
7087
7088 @c @vindex gnus-use-header-prefetch
7089 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7090 @c from the next group.
7091
7092
7093 @node Article Caching
7094 @section Article Caching
7095 @cindex article caching
7096 @cindex caching
7097
7098 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7099 consider turning article caching on.  Each article will then be stored
7100 locally under your home directory.  As you may surmise, this could
7101 potentially use @emph{huge} amounts of disk space, as well as eat up all
7102 your inodes so fast it will make your head swim.  In vodka.
7103
7104 Used carefully, though, it could be just an easier way to save articles.
7105
7106 @vindex gnus-use-long-file-name
7107 @vindex gnus-cache-directory
7108 @vindex gnus-use-cache
7109 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7110 all articles ticked or marked as dormant will then be copied
7111 over to your local cache (@code{gnus-cache-directory}).  Whether this
7112 cache is flat or hierarchical is controlled by the
7113 @code{gnus-use-long-file-name} variable, as usual.
7114
7115 When re-selecting a ticked or dormant article, it will be fetched from the
7116 cache instead of from the server.  As articles in your cache will never
7117 expire, this might serve as a method of saving articles while still
7118 keeping them where they belong.  Just mark all articles you want to save
7119 as dormant, and don't worry.
7120
7121 When an article is marked as read, is it removed from the cache.
7122
7123 @vindex gnus-cache-remove-articles
7124 @vindex gnus-cache-enter-articles
7125 The entering/removal of articles from the cache is controlled by the
7126 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7127 variables.  Both are lists of symbols.  The first is @code{(ticked
7128 dormant)} by default, meaning that ticked and dormant articles will be
7129 put in the cache.  The latter is @code{(read)} by default, meaning that
7130 articles marked as read are removed from the cache.  Possibly
7131 symbols in these two lists are @code{ticked}, @code{dormant},
7132 @code{unread} and @code{read}.
7133
7134 @findex gnus-jog-cache
7135 So where does the massive article-fetching and storing come into the
7136 picture?  The @code{gnus-jog-cache} command will go through all
7137 subscribed newsgroups, request all unread articles, score them, and
7138 store them in the cache.  You should only ever, ever ever ever, use this
7139 command if 1) your connection to the @acronym{NNTP} server is really, really,
7140 really slow and 2) you have a really, really, really huge disk.
7141 Seriously.  One way to cut down on the number of articles downloaded is
7142 to score unwanted articles down and have them marked as read.  They will
7143 not then be downloaded by this command.
7144
7145 @vindex gnus-uncacheable-groups
7146 @vindex gnus-cacheable-groups
7147 It is likely that you do not want caching on all groups.  For instance,
7148 if your @code{nnml} mail is located under your home directory, it makes no
7149 sense to cache it somewhere else under your home directory.  Unless you
7150 feel that it's neat to use twice as much space.
7151
7152 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7153 regexp of groups to cache, @samp{^nntp} for instance, or set the
7154 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7155 Both variables are @code{nil} by default.  If a group matches both
7156 variables, the group is not cached.
7157
7158 @findex gnus-cache-generate-nov-databases
7159 @findex gnus-cache-generate-active
7160 @vindex gnus-cache-active-file
7161 The cache stores information on what articles it contains in its active
7162 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7163 of the cache) becomes all messed up for some reason or other, Gnus
7164 offers two functions that will try to set things right.  @kbd{M-x
7165 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7166 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7167 file.
7168
7169 @findex gnus-cache-move-cache
7170 @code{gnus-cache-move-cache} will move your whole
7171 @code{gnus-cache-directory} to some other location.  You get asked to
7172 where, isn't that cool?
7173
7174 @node Persistent Articles
7175 @section Persistent Articles
7176 @cindex persistent articles
7177
7178 Closely related to article caching, we have @dfn{persistent articles}.
7179 In fact, it's just a different way of looking at caching, and much more
7180 useful in my opinion.
7181
7182 Say you're reading a newsgroup, and you happen on to some valuable gem
7183 that you want to keep and treasure forever.  You'd normally just save it
7184 (using one of the many saving commands) in some file.  The problem with
7185 that is that it's just, well, yucky.  Ideally you'd prefer just having
7186 the article remain in the group where you found it forever; untouched by
7187 the expiry going on at the news server.
7188
7189 This is what a @dfn{persistent article} is---an article that just won't
7190 be deleted.  It's implemented using the normal cache functions, but
7191 you use two explicit commands for managing persistent articles:
7192
7193 @table @kbd
7194
7195 @item *
7196 @kindex * (Summary)
7197 @findex gnus-cache-enter-article
7198 Make the current article persistent (@code{gnus-cache-enter-article}).
7199
7200 @item M-*
7201 @kindex M-* (Summary)
7202 @findex gnus-cache-remove-article
7203 Remove the current article from the persistent articles
7204 (@code{gnus-cache-remove-article}).  This will normally delete the
7205 article.
7206 @end table
7207
7208 Both these commands understand the process/prefix convention.
7209
7210 To avoid having all ticked articles (and stuff) entered into the cache,
7211 you should set @code{gnus-use-cache} to @code{passive} if you're just
7212 interested in persistent articles:
7213
7214 @lisp
7215 (setq gnus-use-cache 'passive)
7216 @end lisp
7217
7218
7219 @node Article Backlog
7220 @section Article Backlog
7221 @cindex backlog
7222 @cindex article backlog
7223
7224 If you have a slow connection, but the idea of using caching seems
7225 unappealing to you (and it is, really), you can help the situation some
7226 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7227 already read articles so that it doesn't have to re-fetch articles
7228 you've already read.  This only helps if you are in the habit of
7229 re-selecting articles you've recently read, of course.  If you never do
7230 that, turning the backlog on will slow Gnus down a little bit, and
7231 increase memory usage some.
7232
7233 @vindex gnus-keep-backlog
7234 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7235 at most @var{n} old articles in a buffer for later re-fetching.  If this
7236 variable is non-@code{nil} and is not a number, Gnus will store
7237 @emph{all} read articles, which means that your Emacs will grow without
7238 bound before exploding and taking your machine down with you.  I put
7239 that in there just to keep y'all on your toes.
7240
7241 The default value is 20.
7242
7243
7244 @node Saving Articles
7245 @section Saving Articles
7246 @cindex saving articles
7247
7248 Gnus can save articles in a number of ways.  Below is the documentation
7249 for saving articles in a fairly straight-forward fashion (i.e., little
7250 processing of the article is done before it is saved).  For a different
7251 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7252 (@pxref{Decoding Articles}).
7253
7254 For the commands listed here, the target is a file.  If you want to
7255 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7256 command (@pxref{Mail Group Commands}).
7257
7258 @vindex gnus-save-all-headers
7259 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7260 unwanted headers before saving the article.
7261
7262 @vindex gnus-saved-headers
7263 If the preceding variable is @code{nil}, all headers that match the
7264 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7265 deleted before saving.
7266
7267 @table @kbd
7268
7269 @item O o
7270 @itemx o
7271 @kindex O o (Summary)
7272 @kindex o (Summary)
7273 @findex gnus-summary-save-article
7274 @c @icon{gnus-summary-save-article}
7275 Save the current article using the default article saver
7276 (@code{gnus-summary-save-article}).
7277
7278 @item O m
7279 @kindex O m (Summary)
7280 @findex gnus-summary-save-article-mail
7281 Save the current article in mail format
7282 (@code{gnus-summary-save-article-mail}).
7283
7284 @item O r
7285 @kindex O r (Summary)
7286 @findex gnus-summary-save-article-rmail
7287 Save the current article in Rmail format
7288 (@code{gnus-summary-save-article-rmail}).
7289
7290 @item O f
7291 @kindex O f (Summary)
7292 @findex gnus-summary-save-article-file
7293 @c @icon{gnus-summary-save-article-file}
7294 Save the current article in plain file format
7295 (@code{gnus-summary-save-article-file}).
7296
7297 @item O F
7298 @kindex O F (Summary)
7299 @findex gnus-summary-write-article-file
7300 Write the current article in plain file format, overwriting any previous
7301 file contents (@code{gnus-summary-write-article-file}).
7302
7303 @item O b
7304 @kindex O b (Summary)
7305 @findex gnus-summary-save-article-body-file
7306 Save the current article body in plain file format
7307 (@code{gnus-summary-save-article-body-file}).
7308
7309 @item O h
7310 @kindex O h (Summary)
7311 @findex gnus-summary-save-article-folder
7312 Save the current article in mh folder format
7313 (@code{gnus-summary-save-article-folder}).
7314
7315 @item O v
7316 @kindex O v (Summary)
7317 @findex gnus-summary-save-article-vm
7318 Save the current article in a VM folder
7319 (@code{gnus-summary-save-article-vm}).
7320
7321 @item O p
7322 @itemx |
7323 @kindex O p (Summary)
7324 @kindex | (Summary)
7325 @findex gnus-summary-pipe-output
7326 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7327 the current article to a process (@code{gnus-summary-pipe-output}).
7328 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7329 complete headers in the piped output.
7330
7331 @item O P
7332 @kindex O P (Summary)
7333 @findex gnus-summary-muttprint
7334 @vindex gnus-summary-muttprint-program
7335 Save the current article into muttprint.  That is, print it using the
7336 external program @uref{http://muttprint.sourceforge.net/,
7337 Muttprint}.  The program name and options to use is controlled by the
7338 variable @code{gnus-summary-muttprint-program}.
7339 (@code{gnus-summary-muttprint}).
7340
7341 @end table
7342
7343 @vindex gnus-prompt-before-saving
7344 All these commands use the process/prefix convention
7345 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7346 functions, you might get tired of being prompted for files to save each
7347 and every article in.  The prompting action is controlled by
7348 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7349 default, giving you that excessive prompting action you know and
7350 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7351 just once for each series of articles you save.  If you like to really
7352 have Gnus do all your thinking for you, you can even set this variable
7353 to @code{nil}, which means that you will never be prompted for files to
7354 save articles in.  Gnus will simply save all the articles in the default
7355 files.
7356
7357
7358 @vindex gnus-default-article-saver
7359 You can customize the @code{gnus-default-article-saver} variable to make
7360 Gnus do what you want it to.  You can use any of the six ready-made
7361 functions below, or you can create your own.
7362
7363 @table @code
7364
7365 @item gnus-summary-save-in-rmail
7366 @findex gnus-summary-save-in-rmail
7367 @vindex gnus-rmail-save-name
7368 @findex gnus-plain-save-name
7369 This is the default format, @dfn{Babyl}.  Uses the function in the
7370 @code{gnus-rmail-save-name} variable to get a file name to save the
7371 article in.  The default is @code{gnus-plain-save-name}.
7372
7373 @item gnus-summary-save-in-mail
7374 @findex gnus-summary-save-in-mail
7375 @vindex gnus-mail-save-name
7376 Save in a Unix mail (mbox) file.  Uses the function in the
7377 @code{gnus-mail-save-name} variable to get a file name to save the
7378 article in.  The default is @code{gnus-plain-save-name}.
7379
7380 @item gnus-summary-save-in-file
7381 @findex gnus-summary-save-in-file
7382 @vindex gnus-file-save-name
7383 @findex gnus-numeric-save-name
7384 Append the article straight to an ordinary file.  Uses the function in
7385 the @code{gnus-file-save-name} variable to get a file name to save the
7386 article in.  The default is @code{gnus-numeric-save-name}.
7387
7388 @item gnus-summary-write-to-file
7389 @findex gnus-summary-write-to-file
7390 Write the article straight to an ordinary file.  The file is
7391 overwritten if it exists.  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-body-in-file
7396 @findex gnus-summary-save-body-in-file
7397 Append the article body to an ordinary file.  Uses the function in the
7398 @code{gnus-file-save-name} variable to get a file name to save the
7399 article in.  The default is @code{gnus-numeric-save-name}.
7400
7401 @item gnus-summary-save-in-folder
7402 @findex gnus-summary-save-in-folder
7403 @findex gnus-folder-save-name
7404 @findex gnus-Folder-save-name
7405 @vindex gnus-folder-save-name
7406 @cindex rcvstore
7407 @cindex MH folders
7408 Save the article to an MH folder using @code{rcvstore} from the MH
7409 library.  Uses the function in the @code{gnus-folder-save-name} variable
7410 to get a file name to save the article in.  The default is
7411 @code{gnus-folder-save-name}, but you can also use
7412 @code{gnus-Folder-save-name}, which creates capitalized names.
7413
7414 @item gnus-summary-save-in-vm
7415 @findex gnus-summary-save-in-vm
7416 Save the article in a VM folder.  You have to have the VM mail
7417 reader to use this setting.
7418 @end table
7419
7420 @vindex gnus-article-save-directory
7421 All of these functions, except for the last one, will save the article
7422 in the @code{gnus-article-save-directory}, which is initialized from the
7423 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7424 default.
7425
7426 As you can see above, the functions use different functions to find a
7427 suitable name of a file to save the article in.  Below is a list of
7428 available functions that generate names:
7429
7430 @table @code
7431
7432 @item gnus-Numeric-save-name
7433 @findex gnus-Numeric-save-name
7434 File names like @file{~/News/Alt.andrea-dworkin/45}.
7435
7436 @item gnus-numeric-save-name
7437 @findex gnus-numeric-save-name
7438 File names like @file{~/News/alt.andrea-dworkin/45}.
7439
7440 @item gnus-Plain-save-name
7441 @findex gnus-Plain-save-name
7442 File names like @file{~/News/Alt.andrea-dworkin}.
7443
7444 @item gnus-plain-save-name
7445 @findex gnus-plain-save-name
7446 File names like @file{~/News/alt.andrea-dworkin}.
7447
7448 @item gnus-sender-save-name
7449 @findex gnus-sender-save-name
7450 File names like @file{~/News/larsi}.
7451 @end table
7452
7453 @vindex gnus-split-methods
7454 You can have Gnus suggest where to save articles by plonking a regexp into
7455 the @code{gnus-split-methods} alist.  For instance, if you would like to
7456 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7457 related to VM in @file{vm-stuff}, you could set this variable to something
7458 like:
7459
7460 @lisp
7461 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7462  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7463  (my-choosing-function "../other-dir/my-stuff")
7464  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7465 @end lisp
7466
7467 We see that this is a list where each element is a list that has two
7468 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7469 a string (in which case it is used as a regexp to match on the article
7470 head); it can be a symbol (which will be called as a function with the
7471 group name as a parameter); or it can be a list (which will be
7472 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7473 the @dfn{file} will be used as a default prompt.  In addition, the
7474 result of the operation itself will be used if the function or form
7475 called returns a string or a list of strings.
7476
7477 You basically end up with a list of file names that might be used when
7478 saving the current article.  (All ``matches'' will be used.)  You will
7479 then be prompted for what you really want to use as a name, with file
7480 name completion over the results from applying this variable.
7481
7482 This variable is @code{((gnus-article-archive-name))} by default, which
7483 means that Gnus will look at the articles it saves for an
7484 @code{Archive-name} line and use that as a suggestion for the file
7485 name.
7486
7487 Here's an example function to clean up file names somewhat.  If you have
7488 lots of mail groups called things like
7489 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7490 these group names before creating the file name to save to.  The
7491 following will do just that:
7492
7493 @lisp
7494 (defun my-save-name (group)
7495   (when (string-match "^nnml:mail." group)
7496     (substring group (match-end 0))))
7497
7498 (setq gnus-split-methods
7499       '((gnus-article-archive-name)
7500         (my-save-name)))
7501 @end lisp
7502
7503
7504 @vindex gnus-use-long-file-name
7505 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7506 @code{nil}, all the preceding functions will replace all periods
7507 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7508 the functions will generate hierarchies of directories instead of having
7509 all the files in the top level directory
7510 (@file{~/News/alt/andrea-dworkin} instead of
7511 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7512 on most systems.  However, for historical reasons, this is @code{nil} on
7513 Xenix and usg-unix-v machines by default.
7514
7515 This function also affects kill and score file names.  If this variable
7516 is a list, and the list contains the element @code{not-score}, long file
7517 names will not be used for score files, if it contains the element
7518 @code{not-save}, long file names will not be used for saving, and if it
7519 contains the element @code{not-kill}, long file names will not be used
7520 for kill files.
7521
7522 If you'd like to save articles in a hierarchy that looks something like
7523 a spool, you could
7524
7525 @lisp
7526 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7527 (setq gnus-default-article-saver
7528       'gnus-summary-save-in-file)          ; @r{no encoding}
7529 @end lisp
7530
7531 Then just save with @kbd{o}.  You'd then read this hierarchy with
7532 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7533 the top level directory as the argument (@file{~/News/}).  Then just walk
7534 around to the groups/directories with @code{nneething}.
7535
7536
7537 @node Decoding Articles
7538 @section Decoding Articles
7539 @cindex decoding articles
7540
7541 Sometime users post articles (or series of articles) that have been
7542 encoded in some way or other.  Gnus can decode them for you.
7543
7544 @menu
7545 * Uuencoded Articles::          Uudecode articles.
7546 * Shell Archives::              Unshar articles.
7547 * PostScript Files::            Split PostScript.
7548 * Other Files::                 Plain save and binhex.
7549 * Decoding Variables::          Variables for a happy decoding.
7550 * Viewing Files::               You want to look at the result of the decoding?
7551 @end menu
7552
7553 @cindex series
7554 @cindex article series
7555 All these functions use the process/prefix convention
7556 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7557 the extension that a ``single article'' means ``a single series''.  Gnus
7558 can find out by itself what articles belong to a series, decode all the
7559 articles and unpack/view/save the resulting file(s).
7560
7561 Gnus guesses what articles are in the series according to the following
7562 simplish rule: The subjects must be (nearly) identical, except for the
7563 last two numbers of the line.  (Spaces are largely ignored, however.)
7564
7565 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7566 will find all the articles that match the regexp @samp{^cat.gif
7567 ([0-9]+/[0-9]+).*$}.
7568
7569 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7570 series}, will not be properly recognized by any of the automatic viewing
7571 commands, and you have to mark the articles manually with @kbd{#}.
7572
7573
7574 @node Uuencoded Articles
7575 @subsection Uuencoded Articles
7576 @cindex uudecode
7577 @cindex uuencoded articles
7578
7579 @table @kbd
7580
7581 @item X u
7582 @kindex X u (Summary)
7583 @findex gnus-uu-decode-uu
7584 @c @icon{gnus-uu-decode-uu}
7585 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7586
7587 @item X U
7588 @kindex X U (Summary)
7589 @findex gnus-uu-decode-uu-and-save
7590 Uudecodes and saves the current series
7591 (@code{gnus-uu-decode-uu-and-save}).
7592
7593 @item X v u
7594 @kindex X v u (Summary)
7595 @findex gnus-uu-decode-uu-view
7596 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7597
7598 @item X v U
7599 @kindex X v U (Summary)
7600 @findex gnus-uu-decode-uu-and-save-view
7601 Uudecodes, views and saves the current series
7602 (@code{gnus-uu-decode-uu-and-save-view}).
7603
7604 @end table
7605
7606 Remember that these all react to the presence of articles marked with
7607 the process mark.  If, for instance, you'd like to decode and save an
7608 entire newsgroup, you'd typically do @kbd{M P a}
7609 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7610 (@code{gnus-uu-decode-uu-and-save}).
7611
7612 All this is very much different from how @code{gnus-uu} worked with
7613 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7614 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7615 articles in some way (@pxref{Setting Process Marks}) and then press
7616 @kbd{X u}.
7617
7618 @vindex gnus-uu-notify-files
7619 Note: When trying to decode articles that have names matching
7620 @code{gnus-uu-notify-files}, which is hard-coded to
7621 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7622 automatically post an article on @samp{comp.unix.wizards} saying that
7623 you have just viewed the file in question.  This feature can't be turned
7624 off.
7625
7626
7627 @node Shell Archives
7628 @subsection Shell Archives
7629 @cindex unshar
7630 @cindex shell archives
7631 @cindex shared articles
7632
7633 Shell archives (``shar files'') used to be a popular way to distribute
7634 sources, but it isn't used all that much today.  In any case, we have
7635 some commands to deal with these:
7636
7637 @table @kbd
7638
7639 @item X s
7640 @kindex X s (Summary)
7641 @findex gnus-uu-decode-unshar
7642 Unshars the current series (@code{gnus-uu-decode-unshar}).
7643
7644 @item X S
7645 @kindex X S (Summary)
7646 @findex gnus-uu-decode-unshar-and-save
7647 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7648
7649 @item X v s
7650 @kindex X v s (Summary)
7651 @findex gnus-uu-decode-unshar-view
7652 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7653
7654 @item X v S
7655 @kindex X v S (Summary)
7656 @findex gnus-uu-decode-unshar-and-save-view
7657 Unshars, views and saves the current series
7658 (@code{gnus-uu-decode-unshar-and-save-view}).
7659 @end table
7660
7661
7662 @node PostScript Files
7663 @subsection PostScript Files
7664 @cindex PostScript
7665
7666 @table @kbd
7667
7668 @item X p
7669 @kindex X p (Summary)
7670 @findex gnus-uu-decode-postscript
7671 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7672
7673 @item X P
7674 @kindex X P (Summary)
7675 @findex gnus-uu-decode-postscript-and-save
7676 Unpack and save the current PostScript series
7677 (@code{gnus-uu-decode-postscript-and-save}).
7678
7679 @item X v p
7680 @kindex X v p (Summary)
7681 @findex gnus-uu-decode-postscript-view
7682 View the current PostScript series
7683 (@code{gnus-uu-decode-postscript-view}).
7684
7685 @item X v P
7686 @kindex X v P (Summary)
7687 @findex gnus-uu-decode-postscript-and-save-view
7688 View and save the current PostScript series
7689 (@code{gnus-uu-decode-postscript-and-save-view}).
7690 @end table
7691
7692
7693 @node Other Files
7694 @subsection Other Files
7695
7696 @table @kbd
7697 @item X o
7698 @kindex X o (Summary)
7699 @findex gnus-uu-decode-save
7700 Save the current series
7701 (@code{gnus-uu-decode-save}).
7702
7703 @item X b
7704 @kindex X b (Summary)
7705 @findex gnus-uu-decode-binhex
7706 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7707 doesn't really work yet.
7708 @end table
7709
7710
7711 @node Decoding Variables
7712 @subsection Decoding Variables
7713
7714 Adjective, not verb.
7715
7716 @menu
7717 * Rule Variables::              Variables that say how a file is to be viewed.
7718 * Other Decode Variables::      Other decode variables.
7719 * Uuencoding and Posting::      Variables for customizing uuencoding.
7720 @end menu
7721
7722
7723 @node Rule Variables
7724 @subsubsection Rule Variables
7725 @cindex rule variables
7726
7727 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7728 variables are of the form
7729
7730 @lisp
7731       (list '(regexp1 command2)
7732             '(regexp2 command2)
7733             ...)
7734 @end lisp
7735
7736 @table @code
7737
7738 @item gnus-uu-user-view-rules
7739 @vindex gnus-uu-user-view-rules
7740 @cindex sox
7741 This variable is consulted first when viewing files.  If you wish to use,
7742 for instance, @code{sox} to convert an @file{.au} sound file, you could
7743 say something like:
7744 @lisp
7745 (setq gnus-uu-user-view-rules
7746       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7747 @end lisp
7748
7749 @item gnus-uu-user-view-rules-end
7750 @vindex gnus-uu-user-view-rules-end
7751 This variable is consulted if Gnus couldn't make any matches from the
7752 user and default view rules.
7753
7754 @item gnus-uu-user-archive-rules
7755 @vindex gnus-uu-user-archive-rules
7756 This variable can be used to say what commands should be used to unpack
7757 archives.
7758 @end table
7759
7760
7761 @node Other Decode Variables
7762 @subsubsection Other Decode Variables
7763
7764 @table @code
7765 @vindex gnus-uu-grabbed-file-functions
7766
7767 @item gnus-uu-grabbed-file-functions
7768 All functions in this list will be called right after each file has been
7769 successfully decoded---so that you can move or view files right away,
7770 and don't have to wait for all files to be decoded before you can do
7771 anything.  Ready-made functions you can put in this list are:
7772
7773 @table @code
7774
7775 @item gnus-uu-grab-view
7776 @findex gnus-uu-grab-view
7777 View the file.
7778
7779 @item gnus-uu-grab-move
7780 @findex gnus-uu-grab-move
7781 Move the file (if you're using a saving function.)
7782 @end table
7783
7784 @item gnus-uu-be-dangerous
7785 @vindex gnus-uu-be-dangerous
7786 Specifies what to do if unusual situations arise during decoding.  If
7787 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7788 that didn't work, and overwrite existing files.  Otherwise, ask each
7789 time.
7790
7791 @item gnus-uu-ignore-files-by-name
7792 @vindex gnus-uu-ignore-files-by-name
7793 Files with name matching this regular expression won't be viewed.
7794
7795 @item gnus-uu-ignore-files-by-type
7796 @vindex gnus-uu-ignore-files-by-type
7797 Files with a @acronym{MIME} type matching this variable won't be viewed.
7798 Note that Gnus tries to guess what type the file is based on the name.
7799 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7800 kludgey.
7801
7802 @item gnus-uu-tmp-dir
7803 @vindex gnus-uu-tmp-dir
7804 Where @code{gnus-uu} does its work.
7805
7806 @item gnus-uu-do-not-unpack-archives
7807 @vindex gnus-uu-do-not-unpack-archives
7808 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7809 looking for files to display.
7810
7811 @item gnus-uu-view-and-save
7812 @vindex gnus-uu-view-and-save
7813 Non-@code{nil} means that the user will always be asked to save a file
7814 after viewing it.
7815
7816 @item gnus-uu-ignore-default-view-rules
7817 @vindex gnus-uu-ignore-default-view-rules
7818 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7819 rules.
7820
7821 @item gnus-uu-ignore-default-archive-rules
7822 @vindex gnus-uu-ignore-default-archive-rules
7823 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7824 unpacking commands.
7825
7826 @item gnus-uu-kill-carriage-return
7827 @vindex gnus-uu-kill-carriage-return
7828 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7829 from articles.
7830
7831 @item gnus-uu-unmark-articles-not-decoded
7832 @vindex gnus-uu-unmark-articles-not-decoded
7833 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7834 decoded articles as unread.
7835
7836 @item gnus-uu-correct-stripped-uucode
7837 @vindex gnus-uu-correct-stripped-uucode
7838 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7839 uuencoded files that have had trailing spaces deleted.
7840
7841 @item gnus-uu-pre-uudecode-hook
7842 @vindex gnus-uu-pre-uudecode-hook
7843 Hook run before sending a message to @code{uudecode}.
7844
7845 @item gnus-uu-view-with-metamail
7846 @vindex gnus-uu-view-with-metamail
7847 @cindex metamail
7848 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7849 commands defined by the rule variables and just fudge a @acronym{MIME}
7850 content type based on the file name.  The result will be fed to
7851 @code{metamail} for viewing.
7852
7853 @item gnus-uu-save-in-digest
7854 @vindex gnus-uu-save-in-digest
7855 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7856 decoding, will save in digests.  If this variable is @code{nil},
7857 @code{gnus-uu} will just save everything in a file without any
7858 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7859 to specify any meaningful volume and issue numbers were found, so I
7860 simply dropped them.
7861
7862 @end table
7863
7864
7865 @node Uuencoding and Posting
7866 @subsubsection Uuencoding and Posting
7867
7868 @table @code
7869
7870 @item gnus-uu-post-include-before-composing
7871 @vindex gnus-uu-post-include-before-composing
7872 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7873 before you compose the article.  If this variable is @code{t}, you can
7874 either include an encoded file with @kbd{C-c C-i} or have one included
7875 for you when you post the article.
7876
7877 @item gnus-uu-post-length
7878 @vindex gnus-uu-post-length
7879 Maximum length of an article.  The encoded file will be split into how
7880 many articles it takes to post the entire file.
7881
7882 @item gnus-uu-post-threaded
7883 @vindex gnus-uu-post-threaded
7884 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7885 thread.  This may not be smart, as no other decoder I have seen is able
7886 to follow threads when collecting uuencoded articles.  (Well, I have
7887 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7888 think that counts@dots{}) Default is @code{nil}.
7889
7890 @item gnus-uu-post-separate-description
7891 @vindex gnus-uu-post-separate-description
7892 Non-@code{nil} means that the description will be posted in a separate
7893 article.  The first article will typically be numbered (0/x).  If this
7894 variable is @code{nil}, the description the user enters will be included
7895 at the beginning of the first article, which will be numbered (1/x).
7896 Default is @code{t}.
7897
7898 @end table
7899
7900
7901 @node Viewing Files
7902 @subsection Viewing Files
7903 @cindex viewing files
7904 @cindex pseudo-articles
7905
7906 After decoding, if the file is some sort of archive, Gnus will attempt
7907 to unpack the archive and see if any of the files in the archive can be
7908 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7909 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7910 uncompress and de-tar the main file, and then view the two pictures.
7911 This unpacking process is recursive, so if the archive contains archives
7912 of archives, it'll all be unpacked.
7913
7914 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7915 extracted file into the summary buffer.  If you go to these
7916 ``articles'', you will be prompted for a command to run (usually Gnus
7917 will make a suggestion), and then the command will be run.
7918
7919 @vindex gnus-view-pseudo-asynchronously
7920 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7921 until the viewing is done before proceeding.
7922
7923 @vindex gnus-view-pseudos
7924 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7925 the pseudo-articles into the summary buffer, but view them
7926 immediately.  If this variable is @code{not-confirm}, the user won't even
7927 be asked for a confirmation before viewing is done.
7928
7929 @vindex gnus-view-pseudos-separately
7930 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7931 pseudo-article will be created for each file to be viewed.  If
7932 @code{nil}, all files that use the same viewing command will be given as
7933 a list of parameters to that command.
7934
7935 @vindex gnus-insert-pseudo-articles
7936 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7937 pseudo-articles when decoding.  It is @code{t} by default.
7938
7939 So; there you are, reading your @emph{pseudo-articles} in your
7940 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7941 Why isn't anything real anymore? How did we get here?
7942
7943
7944 @node Article Treatment
7945 @section Article Treatment
7946
7947 Reading through this huge manual, you may have quite forgotten that the
7948 object of newsreaders is to actually, like, read what people have
7949 written.  Reading articles.  Unfortunately, people are quite bad at
7950 writing, so there are tons of functions and variables to make reading
7951 these articles easier.
7952
7953 @menu
7954 * Article Highlighting::        You want to make the article look like fruit salad.
7955 * Article Fontisizing::         Making emphasized text look nice.
7956 * Article Hiding::              You also want to make certain info go away.
7957 * Article Washing::             Lots of way-neat functions to make life better.
7958 * Article Header::              Doing various header transformations.
7959 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7960 * Article Button Levels::       Controlling appearance of buttons.
7961 * Article Date::                Grumble, UT!
7962 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7963 * Article Signature::           What is a signature?
7964 * Article Miscellanea::         Various other stuff.
7965 @end menu
7966
7967
7968 @node Article Highlighting
7969 @subsection Article Highlighting
7970 @cindex highlighting
7971
7972 Not only do you want your article buffer to look like fruit salad, but
7973 you want it to look like technicolor fruit salad.
7974
7975 @table @kbd
7976
7977 @item W H a
7978 @kindex W H a (Summary)
7979 @findex gnus-article-highlight
7980 @findex gnus-article-maybe-highlight
7981 Do much highlighting of the current article
7982 (@code{gnus-article-highlight}).  This function highlights header, cited
7983 text, the signature, and adds buttons to the body and the head.
7984
7985 @item W H h
7986 @kindex W H h (Summary)
7987 @findex gnus-article-highlight-headers
7988 @vindex gnus-header-face-alist
7989 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7990 highlighting will be done according to the @code{gnus-header-face-alist}
7991 variable, which is a list where each element has the form
7992 @code{(@var{regexp} @var{name} @var{content})}.
7993 @var{regexp} is a regular expression for matching the
7994 header, @var{name} is the face used for highlighting the header name
7995 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7996 the header value.  The first match made will be used.  Note that
7997 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7998
7999 @item W H c
8000 @kindex W H c (Summary)
8001 @findex gnus-article-highlight-citation
8002 Highlight cited text (@code{gnus-article-highlight-citation}).
8003
8004 Some variables to customize the citation highlights:
8005
8006 @table @code
8007 @vindex gnus-cite-parse-max-size
8008
8009 @item gnus-cite-parse-max-size
8010 If the article size if bigger than this variable (which is 25000 by
8011 default), no citation highlighting will be performed.
8012
8013 @item gnus-cite-max-prefix
8014 @vindex gnus-cite-max-prefix
8015 Maximum possible length for a citation prefix (default 20).
8016
8017 @item gnus-cite-face-list
8018 @vindex gnus-cite-face-list
8019 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8020 When there are citations from multiple articles in the same message,
8021 Gnus will try to give each citation from each article its own face.
8022 This should make it easier to see who wrote what.
8023
8024 @item gnus-supercite-regexp
8025 @vindex gnus-supercite-regexp
8026 Regexp matching normal Supercite attribution lines.
8027
8028 @item gnus-supercite-secondary-regexp
8029 @vindex gnus-supercite-secondary-regexp
8030 Regexp matching mangled Supercite attribution lines.
8031
8032 @item gnus-cite-minimum-match-count
8033 @vindex gnus-cite-minimum-match-count
8034 Minimum number of identical prefixes we have to see before we believe
8035 that it's a citation.
8036
8037 @item gnus-cite-attribution-prefix
8038 @vindex gnus-cite-attribution-prefix
8039 Regexp matching the beginning of an attribution line.
8040
8041 @item gnus-cite-attribution-suffix
8042 @vindex gnus-cite-attribution-suffix
8043 Regexp matching the end of an attribution line.
8044
8045 @item gnus-cite-attribution-face
8046 @vindex gnus-cite-attribution-face
8047 Face used for attribution lines.  It is merged with the face for the
8048 cited text belonging to the attribution.
8049
8050 @end table
8051
8052
8053 @item W H s
8054 @kindex W H s (Summary)
8055 @vindex gnus-signature-separator
8056 @vindex gnus-signature-face
8057 @findex gnus-article-highlight-signature
8058 Highlight the signature (@code{gnus-article-highlight-signature}).
8059 Everything after @code{gnus-signature-separator} (@pxref{Article
8060 Signature}) in an article will be considered a signature and will be
8061 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8062 default.
8063
8064 @end table
8065
8066 @xref{Customizing Articles}, for how to highlight articles automatically.
8067
8068
8069 @node Article Fontisizing
8070 @subsection Article Fontisizing
8071 @cindex emphasis
8072 @cindex article emphasis
8073
8074 @findex gnus-article-emphasize
8075 @kindex W e (Summary)
8076 People commonly add emphasis to words in news articles by writing things
8077 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8078 this look nicer by running the article through the @kbd{W e}
8079 (@code{gnus-article-emphasize}) command.
8080
8081 @vindex gnus-emphasis-alist
8082 How the emphasis is computed is controlled by the
8083 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8084 element is a regular expression to be matched.  The second is a number
8085 that says what regular expression grouping is used to find the entire
8086 emphasized word.  The third is a number that says what regexp grouping
8087 should be displayed and highlighted.  (The text between these two
8088 groupings will be hidden.)  The fourth is the face used for
8089 highlighting.
8090
8091 @lisp
8092 (setq gnus-emphasis-alist
8093       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8094         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8095 @end lisp
8096
8097 @cindex slash
8098 @cindex asterisk
8099 @cindex underline
8100 @cindex /
8101 @cindex *
8102
8103 @vindex gnus-emphasis-underline
8104 @vindex gnus-emphasis-bold
8105 @vindex gnus-emphasis-italic
8106 @vindex gnus-emphasis-underline-bold
8107 @vindex gnus-emphasis-underline-italic
8108 @vindex gnus-emphasis-bold-italic
8109 @vindex gnus-emphasis-underline-bold-italic
8110 By default, there are seven rules, and they use the following faces:
8111 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8112 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8113 @code{gnus-emphasis-underline-italic},
8114 @code{gnus-emphasis-underline-bold}, and
8115 @code{gnus-emphasis-underline-bold-italic}.
8116
8117 If you want to change these faces, you can either use @kbd{M-x
8118 customize}, or you can use @code{copy-face}.  For instance, if you want
8119 to make @code{gnus-emphasis-italic} use a red face instead, you could
8120 say something like:
8121
8122 @lisp
8123 (copy-face 'red 'gnus-emphasis-italic)
8124 @end lisp
8125
8126 @vindex gnus-group-highlight-words-alist
8127
8128 If you want to highlight arbitrary words, you can use the
8129 @code{gnus-group-highlight-words-alist} variable, which uses the same
8130 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8131 parameter (@pxref{Group Parameters}) can also be used.
8132
8133 @xref{Customizing Articles}, for how to fontize articles automatically.
8134
8135
8136 @node Article Hiding
8137 @subsection Article Hiding
8138 @cindex article hiding
8139
8140 Or rather, hiding certain things in each article.  There usually is much
8141 too much cruft in most articles.
8142
8143 @table @kbd
8144
8145 @item W W a
8146 @kindex W W a (Summary)
8147 @findex gnus-article-hide
8148 Do quite a lot of hiding on the article buffer
8149 (@kbd{gnus-article-hide}).  In particular, this function will hide
8150 headers, @acronym{PGP}, cited text and the signature.
8151
8152 @item W W h
8153 @kindex W W h (Summary)
8154 @findex gnus-article-hide-headers
8155 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8156 Headers}.
8157
8158 @item W W b
8159 @kindex W W b (Summary)
8160 @findex gnus-article-hide-boring-headers
8161 Hide headers that aren't particularly interesting
8162 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8163
8164 @item W W s
8165 @kindex W W s (Summary)
8166 @findex gnus-article-hide-signature
8167 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8168 Signature}.
8169
8170 @item W W l
8171 @kindex W W l (Summary)
8172 @findex gnus-article-hide-list-identifiers
8173 @vindex gnus-list-identifiers
8174 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8175 are strings some mailing list servers add to the beginning of all
8176 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8177 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8178 may not contain @code{\\(..\\)}.
8179
8180 @table @code
8181
8182 @item gnus-list-identifiers
8183 @vindex gnus-list-identifiers
8184 A regular expression that matches list identifiers to be removed from
8185 subject.  This can also be a list of regular expressions.
8186
8187 @end table
8188
8189 @item W W P
8190 @kindex W W P (Summary)
8191 @findex gnus-article-hide-pem
8192 Hide @acronym{PEM} (privacy enhanced messages) cruft
8193 (@code{gnus-article-hide-pem}).
8194
8195 @item W W B
8196 @kindex W W B (Summary)
8197 @findex gnus-article-strip-banner
8198 @vindex gnus-article-banner-alist
8199 @vindex gnus-article-address-banner-alist
8200 @cindex banner
8201 @cindex OneList
8202 @cindex stripping advertisements
8203 @cindex advertisements
8204 Strip the banner specified by the @code{banner} group parameter
8205 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8206 annoying banners and/or signatures that some mailing lists and moderated
8207 groups adds to all the messages.  The way to use this function is to add
8208 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8209 group you want banners stripped from.  The parameter either be a string,
8210 which will be interpreted as a regular expression matching text to be
8211 removed, or the symbol @code{signature}, meaning that the (last)
8212 signature should be removed, or other symbol, meaning that the
8213 corresponding regular expression in @code{gnus-article-banner-alist} is
8214 used.
8215
8216 Regardless of a group, you can hide things like advertisements only when
8217 the sender of an article has a certain mail address specified in
8218 @code{gnus-article-address-banner-alist}.
8219
8220 @table @code
8221
8222 @item gnus-article-address-banner-alist
8223 @vindex gnus-article-address-banner-alist
8224 Alist of mail addresses and banners.  Each element has the form
8225 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8226 matching a mail address in the From header, @var{banner} is one of a
8227 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8228 a regexp and @code{nil}.  If @var{address} matches author's mail
8229 address, it will remove things like advertisements.  For example, if a
8230 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8231 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8232 sends, you can use the following element to remove them:
8233
8234 @lisp
8235 ("@@yoo-hoo\\.co\\.jp\\'" .
8236  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8237 @end lisp
8238
8239 @end table
8240
8241 @item W W c
8242 @kindex W W c (Summary)
8243 @findex gnus-article-hide-citation
8244 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8245 customizing the hiding:
8246
8247 @table @code
8248
8249 @item gnus-cited-opened-text-button-line-format
8250 @itemx gnus-cited-closed-text-button-line-format
8251 @vindex gnus-cited-closed-text-button-line-format
8252 @vindex gnus-cited-opened-text-button-line-format
8253 Gnus adds buttons to show where the cited text has been hidden, and to
8254 allow toggle hiding the text.  The format of the variable is specified
8255 by these format-like variable (@pxref{Formatting Variables}).  These
8256 specs are valid:
8257
8258 @table @samp
8259 @item b
8260 Starting point of the hidden text.
8261 @item e
8262 Ending point of the hidden text.
8263 @item l
8264 Number of characters in the hidden region.
8265 @item n
8266 Number of lines of hidden text.
8267 @end table
8268
8269 @item gnus-cited-lines-visible
8270 @vindex gnus-cited-lines-visible
8271 The number of lines at the beginning of the cited text to leave
8272 shown.  This can also be a cons cell with the number of lines at the top
8273 and bottom of the text, respectively, to remain visible.
8274
8275 @end table
8276
8277 @item W W C-c
8278 @kindex W W C-c (Summary)
8279 @findex gnus-article-hide-citation-maybe
8280
8281 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8282 following two variables:
8283
8284 @table @code
8285 @item gnus-cite-hide-percentage
8286 @vindex gnus-cite-hide-percentage
8287 If the cited text is of a bigger percentage than this variable (default
8288 50), hide the cited text.
8289
8290 @item gnus-cite-hide-absolute
8291 @vindex gnus-cite-hide-absolute
8292 The cited text must have at least this length (default 10) before it
8293 is hidden.
8294 @end table
8295
8296 @item W W C
8297 @kindex W W C (Summary)
8298 @findex gnus-article-hide-citation-in-followups
8299 Hide cited text in articles that aren't roots
8300 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8301 useful as an interactive command, but might be a handy function to stick
8302 have happen automatically (@pxref{Customizing Articles}).
8303
8304 @end table
8305
8306 All these ``hiding'' commands are toggles, but if you give a negative
8307 prefix to these commands, they will show what they have previously
8308 hidden.  If you give a positive prefix, they will always hide.
8309
8310 Also @pxref{Article Highlighting} for further variables for
8311 citation customization.
8312
8313 @xref{Customizing Articles}, for how to hide article elements
8314 automatically.
8315
8316
8317 @node Article Washing
8318 @subsection Article Washing
8319 @cindex washing
8320 @cindex article washing
8321
8322 We call this ``article washing'' for a really good reason.  Namely, the
8323 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8324
8325 @dfn{Washing} is defined by us as ``changing something from something to
8326 something else'', but normally results in something looking better.
8327 Cleaner, perhaps.
8328
8329 @xref{Customizing Articles}, if you want to change how Gnus displays
8330 articles by default.
8331
8332 @table @kbd
8333
8334 @item C-u g
8335 This is not really washing, it's sort of the opposite of washing.  If
8336 you type this, you see the article exactly as it exists on disk or on
8337 the server.
8338
8339 @item g
8340 Force redisplaying of the current article
8341 (@code{gnus-summary-show-article}).  This is also not really washing.
8342 If you type this, you see the article without any previously applied
8343 interactive Washing functions but with all default treatments
8344 (@pxref{Customizing Articles}).
8345
8346 @item W l
8347 @kindex W l (Summary)
8348 @findex gnus-summary-stop-page-breaking
8349 Remove page breaks from the current article
8350 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8351 delimiters.
8352
8353 @item W r
8354 @kindex W r (Summary)
8355 @findex gnus-summary-caesar-message
8356 @c @icon{gnus-summary-caesar-message}
8357 Do a Caesar rotate (rot13) on the article buffer
8358 (@code{gnus-summary-caesar-message}).
8359 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8360 (Typically offensive jokes and such.)
8361
8362 It's commonly called ``rot13'' because each letter is rotated 13
8363 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8364 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8365 is rumored to have employed this form of, uh, somewhat weak encryption.
8366
8367 @item W m
8368 @kindex W m (Summary)
8369 @findex gnus-summary-morse-message
8370 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8371
8372 @item W t
8373 @item t
8374 @kindex W t (Summary)
8375 @kindex t (Summary)
8376 @findex gnus-summary-toggle-header
8377 Toggle whether to display all headers in the article buffer
8378 (@code{gnus-summary-toggle-header}).
8379
8380 @item W v
8381 @kindex W v (Summary)
8382 @findex gnus-summary-verbose-headers
8383 Toggle whether to display all headers in the article buffer permanently
8384 (@code{gnus-summary-verbose-headers}).
8385
8386 @item W o
8387 @kindex W o (Summary)
8388 @findex gnus-article-treat-overstrike
8389 Treat overstrike (@code{gnus-article-treat-overstrike}).
8390
8391 @item W d
8392 @kindex W d (Summary)
8393 @findex gnus-article-treat-dumbquotes
8394 @vindex gnus-article-dumbquotes-map
8395 @cindex Smartquotes
8396 @cindex M****s*** sm*rtq**t*s
8397 @cindex Latin 1
8398 Treat M****s*** sm*rtq**t*s according to
8399 @code{gnus-article-dumbquotes-map}
8400 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8401 whether a character is a sm*rtq**t* or not, so it should only be used
8402 interactively.
8403
8404 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8405 an attempt to provide more quoting characters.  If you see something
8406 like @code{\222} or @code{\264} where you're expecting some kind of
8407 apostrophe or quotation mark, then try this wash.
8408
8409 @item W Y f
8410 @kindex W Y f (Summary)
8411 @findex gnus-article-outlook-deuglify-article
8412 @cindex Outlook Express
8413 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8414 unwrap lines, repair attribution and rearrange citation.
8415 (@code{gnus-article-outlook-deuglify-article}).
8416
8417 @item W Y u
8418 @kindex W Y u (Summary)
8419 @findex gnus-article-outlook-unwrap-lines
8420 @vindex gnus-outlook-deuglify-unwrap-min
8421 @vindex gnus-outlook-deuglify-unwrap-max
8422 Unwrap lines that appear to be wrapped citation lines.  You can control
8423 what lines will be unwrapped by frobbing
8424 @code{gnus-outlook-deuglify-unwrap-min} and
8425 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8426 maximum length of an unwrapped citation line.
8427 (@code{gnus-article-outlook-unwrap-lines}).
8428
8429 @item W Y a
8430 @kindex W Y a (Summary)
8431 @findex gnus-article-outlook-repair-attribution
8432 Repair a broken attribution line.@*
8433 (@code{gnus-article-outlook-repair-attribution}).
8434
8435 @item W Y c
8436 @kindex W Y c (Summary)
8437 @findex gnus-article-outlook-rearrange-citation
8438 Repair broken citations by rearranging the text.
8439 (@code{gnus-article-outlook-rearrange-citation}).
8440
8441 @item W w
8442 @kindex W w (Summary)
8443 @findex gnus-article-fill-cited-article
8444 Do word wrap (@code{gnus-article-fill-cited-article}).
8445
8446 You can give the command a numerical prefix to specify the width to use
8447 when filling.
8448
8449 @item W Q
8450 @kindex W Q (Summary)
8451 @findex gnus-article-fill-long-lines
8452 Fill long lines (@code{gnus-article-fill-long-lines}).
8453
8454 @item W C
8455 @kindex W C (Summary)
8456 @findex gnus-article-capitalize-sentences
8457 Capitalize the first word in each sentence
8458 (@code{gnus-article-capitalize-sentences}).
8459
8460 @item W c
8461 @kindex W c (Summary)
8462 @findex gnus-article-remove-cr
8463 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8464 (this takes care of DOS line endings), and then translate any remaining
8465 CRs into LF (this takes care of Mac line endings)
8466 (@code{gnus-article-remove-cr}).
8467
8468 @item W q
8469 @kindex W q (Summary)
8470 @findex gnus-article-de-quoted-unreadable
8471 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8472 Quoted-Printable is one common @acronym{MIME} encoding employed when
8473 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8474 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8475 doesn't look very readable to me.  Note that this is usually done
8476 automatically by Gnus if the message in question has a
8477 @code{Content-Transfer-Encoding} header that says that this encoding
8478 has been done.  If a prefix is given, a charset will be asked for.
8479
8480 @item W 6
8481 @kindex W 6 (Summary)
8482 @findex gnus-article-de-base64-unreadable
8483 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8484 one common @acronym{MIME} encoding employed when sending
8485 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8486 usually done automatically by Gnus if the message in question has a
8487 @code{Content-Transfer-Encoding} header that says that this encoding
8488 has been done.  If a prefix is given, a charset will be asked for.
8489
8490 @item W Z
8491 @kindex W Z (Summary)
8492 @findex gnus-article-decode-HZ
8493 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8494 common encoding employed when sending Chinese articles.  It typically
8495 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8496
8497 @item W u
8498 @kindex W u (Summary)
8499 @findex gnus-article-unsplit-urls
8500 Remove newlines from within URLs.  Some mailers insert newlines into
8501 outgoing email messages to keep lines short.  This reformatting can
8502 split long URLs onto multiple lines.  Repair those URLs by removing
8503 the newlines (@code{gnus-article-unsplit-urls}).
8504
8505 @item W h
8506 @kindex W h (Summary)
8507 @findex gnus-article-wash-html
8508 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8509 usually done automatically by Gnus if the message in question has a
8510 @code{Content-Type} header that says that the message is @acronym{HTML}.
8511
8512 If a prefix is given, a charset will be asked for.
8513
8514 @vindex gnus-article-wash-function
8515 The default is to use the function specified by
8516 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8517 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8518 @acronym{HTML}, but this is controlled by the
8519 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8520 can use include:
8521
8522 @table @code
8523 @item w3
8524 Use Emacs/w3.
8525
8526 @item w3m
8527 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8528
8529 @item links
8530 Use @uref{http://links.sf.net/, Links}.
8531
8532 @item lynx
8533 Use @uref{http://lynx.isc.org/, Lynx}.
8534
8535 @item html2text
8536 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8537
8538 @end table
8539
8540 @item W b
8541 @kindex W b (Summary)
8542 @findex gnus-article-add-buttons
8543 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8544 @xref{Article Buttons}.
8545
8546 @item W B
8547 @kindex W B (Summary)
8548 @findex gnus-article-add-buttons-to-head
8549 Add clickable buttons to the article headers
8550 (@code{gnus-article-add-buttons-to-head}).
8551
8552 @item W p
8553 @kindex W p (Summary)
8554 @findex gnus-article-verify-x-pgp-sig
8555 Verify a signed control message
8556 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8557 @code{newgroup} and @code{checkgroups} are usually signed by the
8558 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8559 the maintainer to your keyring to verify the
8560 message.@footnote{@acronym{PGP} keys for many hierarchies are
8561 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8562
8563 @item W s
8564 @kindex W s (Summary)
8565 @findex gnus-summary-force-verify-and-decrypt
8566 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8567 @acronym{S/MIME}) message
8568 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8569
8570 @item W a
8571 @kindex W a (Summary)
8572 @findex gnus-article-strip-headers-in-body
8573 Strip headers like the @code{X-No-Archive} header from the beginning of
8574 article bodies (@code{gnus-article-strip-headers-in-body}).
8575
8576 @item W E l
8577 @kindex W E l (Summary)
8578 @findex gnus-article-strip-leading-blank-lines
8579 Remove all blank lines from the beginning of the article
8580 (@code{gnus-article-strip-leading-blank-lines}).
8581
8582 @item W E m
8583 @kindex W E m (Summary)
8584 @findex gnus-article-strip-multiple-blank-lines
8585 Replace all blank lines with empty lines and then all multiple empty
8586 lines with a single empty line.
8587 (@code{gnus-article-strip-multiple-blank-lines}).
8588
8589 @item W E t
8590 @kindex W E t (Summary)
8591 @findex gnus-article-remove-trailing-blank-lines
8592 Remove all blank lines at the end of the article
8593 (@code{gnus-article-remove-trailing-blank-lines}).
8594
8595 @item W E a
8596 @kindex W E a (Summary)
8597 @findex gnus-article-strip-blank-lines
8598 Do all the three commands above
8599 (@code{gnus-article-strip-blank-lines}).
8600
8601 @item W E A
8602 @kindex W E A (Summary)
8603 @findex gnus-article-strip-all-blank-lines
8604 Remove all blank lines
8605 (@code{gnus-article-strip-all-blank-lines}).
8606
8607 @item W E s
8608 @kindex W E s (Summary)
8609 @findex gnus-article-strip-leading-space
8610 Remove all white space from the beginning of all lines of the article
8611 body (@code{gnus-article-strip-leading-space}).
8612
8613 @item W E e
8614 @kindex W E e (Summary)
8615 @findex gnus-article-strip-trailing-space
8616 Remove all white space from the end of all lines of the article
8617 body (@code{gnus-article-strip-trailing-space}).
8618
8619 @end table
8620
8621 @xref{Customizing Articles}, for how to wash articles automatically.
8622
8623
8624 @node Article Header
8625 @subsection Article Header
8626
8627 These commands perform various transformations of article header.
8628
8629 @table @kbd
8630
8631 @item W G u
8632 @kindex W G u (Summary)
8633 @findex gnus-article-treat-unfold-headers
8634 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8635
8636 @item W G n
8637 @kindex W G n (Summary)
8638 @findex gnus-article-treat-fold-newsgroups
8639 Fold the @code{Newsgroups} and @code{Followup-To} headers
8640 (@code{gnus-article-treat-fold-newsgroups}).
8641
8642 @item W G f
8643 @kindex W G f (Summary)
8644 @findex gnus-article-treat-fold-headers
8645 Fold all the message headers
8646 (@code{gnus-article-treat-fold-headers}).
8647
8648 @item W E w
8649 @kindex W E w
8650 @findex gnus-article-remove-leading-whitespace
8651 Remove excessive whitespace from all headers
8652 (@code{gnus-article-remove-leading-whitespace}).
8653
8654 @end table
8655
8656
8657 @node Article Buttons
8658 @subsection Article Buttons
8659 @cindex buttons
8660
8661 People often include references to other stuff in articles, and it would
8662 be nice if Gnus could just fetch whatever it is that people talk about
8663 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8664 button on these references.
8665
8666 @vindex gnus-button-man-handler
8667 Gnus adds @dfn{buttons} to certain standard references by default:
8668 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8669 Emacs or Gnus related references.  This is controlled by two variables,
8670 one that handles article bodies and one that handles article heads:
8671
8672 @table @code
8673
8674 @item gnus-button-alist
8675 @vindex gnus-button-alist
8676 This is an alist where each entry has this form:
8677
8678 @lisp
8679 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8680 @end lisp
8681
8682 @table @var
8683
8684 @item regexp
8685 All text that match this regular expression (case insensitive) will be
8686 considered an external reference.  Here's a typical regexp that matches
8687 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8688 variable containing a regexp, useful variables to use include
8689 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8690
8691 @item button-par
8692 Gnus has to know which parts of the matches is to be highlighted.  This
8693 is a number that says what sub-expression of the regexp is to be
8694 highlighted.  If you want it all highlighted, you use 0 here.
8695
8696 @item use-p
8697 This form will be @code{eval}ed, and if the result is non-@code{nil},
8698 this is considered a match.  This is useful if you want extra sifting to
8699 avoid false matches.  Often variables named
8700 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8701 Levels}, but any other form may be used too.
8702
8703 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8704
8705 @item function
8706 This function will be called when you click on this button.
8707
8708 @item data-par
8709 As with @var{button-par}, this is a sub-expression number, but this one
8710 says which part of the match is to be sent as data to @var{function}.
8711
8712 @end table
8713
8714 So the full entry for buttonizing URLs is then
8715
8716 @lisp
8717 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8718 @end lisp
8719
8720 @item gnus-header-button-alist
8721 @vindex gnus-header-button-alist
8722 This is just like the other alist, except that it is applied to the
8723 article head only, and that each entry has an additional element that is
8724 used to say what headers to apply the buttonize coding to:
8725
8726 @lisp
8727 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8728 @end lisp
8729
8730 @var{header} is a regular expression.
8731 @end table
8732
8733 @subsubsection Related variables and functions
8734
8735 @table @code
8736 @item gnus-button-@var{*}-level
8737 @xref{Article Button Levels}.
8738
8739 @c Stuff related to gnus-button-browse-level
8740
8741 @item gnus-button-url-regexp
8742 @vindex gnus-button-url-regexp
8743 A regular expression that matches embedded URLs.  It is used in the
8744 default values of the variables above.
8745
8746 @c Stuff related to gnus-button-man-level
8747
8748 @item gnus-button-man-handler
8749 @vindex gnus-button-man-handler
8750 The function to use for displaying man pages.  It must take at least one
8751 argument with a string naming the man page.
8752
8753 @c Stuff related to gnus-button-message-level
8754
8755 @item gnus-button-mid-or-mail-regexp
8756 @vindex gnus-button-mid-or-mail-regexp
8757 Regular expression that matches a message ID or a mail address.
8758
8759 @item gnus-button-prefer-mid-or-mail
8760 @vindex gnus-button-prefer-mid-or-mail
8761 This variable determines what to do when the button on a string as
8762 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8763 message ID or a mail address.  If it is one of the symbols @code{mid} or
8764 @code{mail}, Gnus will always assume that the string is a message ID or
8765 a mail address, respectively.  If this variable is set to the symbol
8766 @code{ask}, always query the user what do do.  If it is a function, this
8767 function will be called with the string as its only argument.  The
8768 function must return @code{mid}, @code{mail}, @code{invalid} or
8769 @code{ask}.  The default value is the function
8770 @code{gnus-button-mid-or-mail-heuristic}.
8771
8772 @item gnus-button-mid-or-mail-heuristic
8773 @findex gnus-button-mid-or-mail-heuristic
8774 Function that guesses whether its argument is a message ID or a mail
8775 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8776 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8777 string is invalid.
8778
8779 @item gnus-button-mid-or-mail-heuristic-alist
8780 @vindex gnus-button-mid-or-mail-heuristic-alist
8781 An alist of @code{(RATE . REGEXP)} pairs used by the function
8782 @code{gnus-button-mid-or-mail-heuristic}.
8783
8784 @c Stuff related to gnus-button-tex-level
8785
8786 @item gnus-button-ctan-handler
8787 @findex gnus-button-ctan-handler
8788 The function to use for displaying CTAN links.  It must take one
8789 argument, the string naming the URL.
8790
8791 @item gnus-ctan-url
8792 @vindex gnus-ctan-url
8793 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8794 by @code{gnus-button-ctan-handler}.
8795
8796 @c Misc stuff
8797
8798 @item gnus-article-button-face
8799 @vindex gnus-article-button-face
8800 Face used on buttons.
8801
8802 @item gnus-article-mouse-face
8803 @vindex gnus-article-mouse-face
8804 Face used when the mouse cursor is over a button.
8805
8806 @end table
8807
8808 @xref{Customizing Articles}, for how to buttonize articles automatically.
8809
8810
8811 @node Article Button Levels
8812 @subsection Article button levels
8813 @cindex button levels
8814 The higher the value of the variables @code{gnus-button-@var{*}-level},
8815 the more buttons will appear.  If the level is zero, no corresponding
8816 buttons are displayed.  With the default value (which is 5) you should
8817 already see quite a lot of buttons.  With higher levels, you will see
8818 more buttons, but you may also get more false positives.  To avoid them,
8819 you can set the variables @code{gnus-button-@var{*}-level} local to
8820 specific groups (@pxref{Group Parameters}).  Here's an example for the
8821 variable @code{gnus-parameters}:
8822
8823 @lisp
8824 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8825 (setq gnus-parameters
8826       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8827         ("\\<unix\\>"               (gnus-button-man-level 10))
8828         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8829 @end lisp
8830
8831 @table @code
8832
8833 @item gnus-button-browse-level
8834 @vindex gnus-button-browse-level
8835 Controls the display of references to message IDs, mail addresses and
8836 news URLs.  Related variables and functions include
8837 @code{gnus-button-url-regexp}, @code{browse-url}, and
8838 @code{browse-url-browser-function}.
8839
8840 @item gnus-button-emacs-level
8841 @vindex gnus-button-emacs-level
8842 Controls the display of Emacs or Gnus references.  Related functions are
8843 @code{gnus-button-handle-custom},
8844 @code{gnus-button-handle-describe-function},
8845 @code{gnus-button-handle-describe-variable},
8846 @code{gnus-button-handle-symbol},
8847 @code{gnus-button-handle-describe-key},
8848 @code{gnus-button-handle-apropos},
8849 @code{gnus-button-handle-apropos-command},
8850 @code{gnus-button-handle-apropos-variable},
8851 @code{gnus-button-handle-apropos-documentation}, and
8852 @code{gnus-button-handle-library}.
8853
8854 @item gnus-button-man-level
8855 @vindex gnus-button-man-level
8856 Controls the display of references to (Unix) man pages.
8857 See @code{gnus-button-man-handler}.
8858
8859 @item gnus-button-message-level
8860 @vindex gnus-button-message-level
8861 Controls the display of message IDs, mail addresses and news URLs.
8862 Related variables and functions include
8863 @code{gnus-button-mid-or-mail-regexp},
8864 @code{gnus-button-prefer-mid-or-mail},
8865 @code{gnus-button-mid-or-mail-heuristic}, and
8866 @code{gnus-button-mid-or-mail-heuristic-alist}.
8867
8868 @item gnus-button-tex-level
8869 @vindex gnus-button-tex-level
8870 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8871 URLs.  See the variables @code{gnus-ctan-url},
8872 @code{gnus-button-ctan-handler},
8873 @code{gnus-button-ctan-directory-regexp}, and
8874 @code{gnus-button-handle-ctan-bogus-regexp}.
8875
8876 @end table
8877
8878
8879 @node Article Date
8880 @subsection Article Date
8881
8882 The date is most likely generated in some obscure timezone you've never
8883 heard of, so it's quite nice to be able to find out what the time was
8884 when the article was sent.
8885
8886 @table @kbd
8887
8888 @item W T u
8889 @kindex W T u (Summary)
8890 @findex gnus-article-date-ut
8891 Display the date in UT (aka. GMT, aka ZULU)
8892 (@code{gnus-article-date-ut}).
8893
8894 @item W T i
8895 @kindex W T i (Summary)
8896 @findex gnus-article-date-iso8601
8897 @cindex ISO 8601
8898 Display the date in international format, aka. ISO 8601
8899 (@code{gnus-article-date-iso8601}).
8900
8901 @item W T l
8902 @kindex W T l (Summary)
8903 @findex gnus-article-date-local
8904 Display the date in the local timezone (@code{gnus-article-date-local}).
8905
8906 @item W T p
8907 @kindex W T p (Summary)
8908 @findex gnus-article-date-english
8909 Display the date in a format that's easily pronounceable in English
8910 (@code{gnus-article-date-english}).
8911
8912 @item W T s
8913 @kindex W T s (Summary)
8914 @vindex gnus-article-time-format
8915 @findex gnus-article-date-user
8916 @findex format-time-string
8917 Display the date using a user-defined format
8918 (@code{gnus-article-date-user}).  The format is specified by the
8919 @code{gnus-article-time-format} variable, and is a string that's passed
8920 to @code{format-time-string}.  See the documentation of that variable
8921 for a list of possible format specs.
8922
8923 @item W T e
8924 @kindex W T e (Summary)
8925 @findex gnus-article-date-lapsed
8926 @findex gnus-start-date-timer
8927 @findex gnus-stop-date-timer
8928 Say how much time has elapsed between the article was posted and now
8929 (@code{gnus-article-date-lapsed}).  It looks something like:
8930
8931 @example
8932 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8933 @end example
8934
8935 @vindex gnus-article-date-lapsed-new-header
8936 The value of @code{gnus-article-date-lapsed-new-header} determines
8937 whether this header will just be added below the old Date one, or will
8938 replace it.
8939
8940 An advantage of using Gnus to read mail is that it converts simple bugs
8941 into wonderful absurdities.
8942
8943 If you want to have this line updated continually, you can put
8944
8945 @lisp
8946 (gnus-start-date-timer)
8947 @end lisp
8948
8949 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8950 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8951 command.
8952
8953 @item W T o
8954 @kindex W T o (Summary)
8955 @findex gnus-article-date-original
8956 Display the original date (@code{gnus-article-date-original}).  This can
8957 be useful if you normally use some other conversion function and are
8958 worried that it might be doing something totally wrong.  Say, claiming
8959 that the article was posted in 1854.  Although something like that is
8960 @emph{totally} impossible.  Don't you trust me? *titter*
8961
8962 @end table
8963
8964 @xref{Customizing Articles}, for how to display the date in your
8965 preferred format automatically.
8966
8967
8968 @node Article Display
8969 @subsection Article Display
8970 @cindex picons
8971 @cindex x-face
8972 @cindex smileys
8973
8974 These commands add various frivolous display gimmicks to the article
8975 buffer in Emacs versions that support them.
8976
8977 @code{X-Face} headers are small black-and-white images supplied by the
8978 message headers (@pxref{X-Face}).
8979
8980 @code{Face} headers are small colored images supplied by the message
8981 headers (@pxref{Face}).
8982
8983 Smileys are those little @samp{:-)} symbols that people like to litter
8984 their messages with (@pxref{Smileys}).
8985
8986 Picons, on the other hand, reside on your own system, and Gnus will
8987 try to match the headers to what you have (@pxref{Picons}).
8988
8989 All these functions are toggles---if the elements already exist,
8990 they'll be removed.
8991
8992 @table @kbd
8993 @item W D x
8994 @kindex W D x (Summary)
8995 @findex gnus-article-display-x-face
8996 Display an @code{X-Face} in the @code{From} header.
8997 (@code{gnus-article-display-x-face}).
8998
8999 @item W D d
9000 @kindex W D d (Summary)
9001 @findex gnus-article-display-face
9002 Display a @code{Face} in the @code{From} header.
9003 (@code{gnus-article-display-face}).
9004
9005 @item W D s
9006 @kindex W D s (Summary)
9007 @findex gnus-treat-smiley
9008 Display smileys (@code{gnus-treat-smiley}).
9009
9010 @item W D f
9011 @kindex W D f (Summary)
9012 @findex gnus-treat-from-picon
9013 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9014
9015 @item W D m
9016 @kindex W D m (Summary)
9017 @findex gnus-treat-mail-picon
9018 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9019 (@code{gnus-treat-mail-picon}).
9020
9021 @item W D n
9022 @kindex W D n (Summary)
9023 @findex gnus-treat-newsgroups-picon
9024 Piconify all news headers (i. e., @code{Newsgroups} and
9025 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9026
9027 @item W D D
9028 @kindex W D D (Summary)
9029 @findex gnus-article-remove-images
9030 Remove all images from the article buffer
9031 (@code{gnus-article-remove-images}).
9032
9033 @end table
9034
9035
9036
9037 @node Article Signature
9038 @subsection Article Signature
9039 @cindex signatures
9040 @cindex article signature
9041
9042 @vindex gnus-signature-separator
9043 Each article is divided into two parts---the head and the body.  The
9044 body can be divided into a signature part and a text part.  The variable
9045 that says what is to be considered a signature is
9046 @code{gnus-signature-separator}.  This is normally the standard
9047 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9048 non-standard signature separators, so this variable can also be a list
9049 of regular expressions to be tested, one by one.  (Searches are done
9050 from the end of the body towards the beginning.)  One likely value is:
9051
9052 @lisp
9053 (setq gnus-signature-separator
9054       '("^-- $"         ; @r{The standard}
9055         "^-- *$"        ; @r{A common mangling}
9056         "^-------*$"    ; @r{Many people just use a looong}
9057                         ; @r{line of dashes.  Shame!}
9058         "^ *--------*$" ; @r{Double-shame!}
9059         "^________*$"   ; @r{Underscores are also popular}
9060         "^========*$")) ; @r{Pervert!}
9061 @end lisp
9062
9063 The more permissive you are, the more likely it is that you'll get false
9064 positives.
9065
9066 @vindex gnus-signature-limit
9067 @code{gnus-signature-limit} provides a limit to what is considered a
9068 signature when displaying articles.
9069
9070 @enumerate
9071 @item
9072 If it is an integer, no signature may be longer (in characters) than
9073 that integer.
9074 @item
9075 If it is a floating point number, no signature may be longer (in lines)
9076 than that number.
9077 @item
9078 If it is a function, the function will be called without any parameters,
9079 and if it returns @code{nil}, there is no signature in the buffer.
9080 @item
9081 If it is a string, it will be used as a regexp.  If it matches, the text
9082 in question is not a signature.
9083 @end enumerate
9084
9085 This variable can also be a list where the elements may be of the types
9086 listed above.  Here's an example:
9087
9088 @lisp
9089 (setq gnus-signature-limit
9090       '(200.0 "^---*Forwarded article"))
9091 @end lisp
9092
9093 This means that if there are more than 200 lines after the signature
9094 separator, or the text after the signature separator is matched by
9095 the regular expression @samp{^---*Forwarded article}, then it isn't a
9096 signature after all.
9097
9098
9099 @node Article Miscellanea
9100 @subsection Article Miscellanea
9101
9102 @table @kbd
9103 @item A t
9104 @kindex A t (Summary)
9105 @findex gnus-article-babel
9106 Translate the article from one language to another
9107 (@code{gnus-article-babel}).
9108
9109 @end table
9110
9111
9112 @node MIME Commands
9113 @section MIME Commands
9114 @cindex MIME decoding
9115 @cindex attachments
9116 @cindex viewing attachments
9117
9118 The following commands all understand the numerical prefix.  For
9119 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9120
9121 @table @kbd
9122 @item b
9123 @itemx K v
9124 @kindex b (Summary)
9125 @kindex K v (Summary)
9126 View the @acronym{MIME} part.
9127
9128 @item K o
9129 @kindex K o (Summary)
9130 Save the @acronym{MIME} part.
9131
9132 @item K c
9133 @kindex K c (Summary)
9134 Copy the @acronym{MIME} part.
9135
9136 @item K e
9137 @kindex K e (Summary)
9138 View the @acronym{MIME} part externally.
9139
9140 @item K i
9141 @kindex K i (Summary)
9142 View the @acronym{MIME} part internally.
9143
9144 @item K |
9145 @kindex K | (Summary)
9146 Pipe the @acronym{MIME} part to an external command.
9147 @end table
9148
9149 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9150 the same manner:
9151
9152 @table @kbd
9153 @item K b
9154 @kindex K b (Summary)
9155 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9156 mostly useful if you wish to save (or perform other actions) on inlined
9157 parts.
9158
9159 @item K m
9160 @kindex K m (Summary)
9161 @findex gnus-summary-repair-multipart
9162 Some multipart messages are transmitted with missing or faulty headers.
9163 This command will attempt to ``repair'' these messages so that they can
9164 be viewed in a more pleasant manner
9165 (@code{gnus-summary-repair-multipart}).
9166
9167 @item X m
9168 @kindex X m (Summary)
9169 @findex gnus-summary-save-parts
9170 Save all parts matching a @acronym{MIME} type to a directory
9171 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9172 convention (@pxref{Process/Prefix}).
9173
9174 @item M-t
9175 @kindex M-t (Summary)
9176 @findex gnus-summary-toggle-display-buttonized
9177 Toggle the buttonized display of the article buffer
9178 (@code{gnus-summary-toggle-display-buttonized}).
9179
9180 @item W M w
9181 @kindex W M w (Summary)
9182 @findex gnus-article-decode-mime-words
9183 Decode RFC 2047-encoded words in the article headers
9184 (@code{gnus-article-decode-mime-words}).
9185
9186 @item W M c
9187 @kindex W M c (Summary)
9188 @findex gnus-article-decode-charset
9189 Decode encoded article bodies as well as charsets
9190 (@code{gnus-article-decode-charset}).
9191
9192 This command looks in the @code{Content-Type} header to determine the
9193 charset.  If there is no such header in the article, you can give it a
9194 prefix, which will prompt for the charset to decode as.  In regional
9195 groups where people post using some common encoding (but do not
9196 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9197 parameter to the required charset (@pxref{Group Parameters}).
9198
9199 @item W M v
9200 @kindex W M v (Summary)
9201 @findex gnus-mime-view-all-parts
9202 View all the @acronym{MIME} parts in the current article
9203 (@code{gnus-mime-view-all-parts}).
9204
9205 @end table
9206
9207 Relevant variables:
9208
9209 @table @code
9210 @item gnus-ignored-mime-types
9211 @vindex gnus-ignored-mime-types
9212 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9213 this list will be completely ignored by Gnus.  The default value is
9214 @code{nil}.
9215
9216 To have all Vcards be ignored, you'd say something like this:
9217
9218 @lisp
9219 (setq gnus-ignored-mime-types
9220       '("text/x-vcard"))
9221 @end lisp
9222
9223 @item gnus-article-loose-mime
9224 @vindex gnus-article-loose-mime
9225 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9226 before interpreting the message as a @acronym{MIME} message.  This helps
9227 when reading messages from certain broken mail user agents.  The
9228 default is @code{nil}.
9229
9230 @item gnus-article-emulate-mime
9231 @vindex gnus-article-emulate-mime
9232 There are other, non-@acronym{MIME} encoding methods used.  The most common
9233 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9234 this variable is non-@code{nil}, Gnus will look in message bodies to
9235 see if it finds these encodings, and if so, it'll run them through the
9236 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9237
9238 @item gnus-unbuttonized-mime-types
9239 @vindex gnus-unbuttonized-mime-types
9240 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9241 this list won't have @acronym{MIME} buttons inserted unless they aren't
9242 displayed or this variable is overridden by
9243 @code{gnus-buttonized-mime-types}.  The default value is
9244 @code{(".*/.*")}.  This variable is only used when
9245 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9246
9247 @item gnus-buttonized-mime-types
9248 @vindex gnus-buttonized-mime-types
9249 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9250 this list will have @acronym{MIME} buttons inserted unless they aren't
9251 displayed.  This variable overrides
9252 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9253 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9254 is @code{nil}.
9255
9256 To see e.g. security buttons but no other buttons, you could set this
9257 variable to @code{("multipart/signed")} and leave
9258 @code{gnus-unbuttonized-mime-types} at the default value.
9259
9260 @item gnus-inhibit-mime-unbuttonizing
9261 @vindex gnus-inhibit-mime-unbuttonizing
9262 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9263 default value is @code{nil}.
9264
9265 @item gnus-article-mime-part-function
9266 @vindex gnus-article-mime-part-function
9267 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9268 handle as the parameter.  The function is meant to be used to allow
9269 users to gather information from the article (e. g., add Vcard info to
9270 the bbdb database) or to do actions based on parts (e. g., automatically
9271 save all jpegs into some directory).
9272
9273 Here's an example function the does the latter:
9274
9275 @lisp
9276 (defun my-save-all-jpeg-parts (handle)
9277   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9278     (with-temp-buffer
9279       (insert (mm-get-part handle))
9280       (write-region (point-min) (point-max)
9281                     (read-file-name "Save jpeg to: ")))))
9282 (setq gnus-article-mime-part-function
9283       'my-save-all-jpeg-parts)
9284 @end lisp
9285
9286 @vindex gnus-mime-multipart-functions
9287 @item gnus-mime-multipart-functions
9288 Alist of @acronym{MIME} multipart types and functions to handle them.
9289
9290 @vindex mm-file-name-rewrite-functions
9291 @item mm-file-name-rewrite-functions
9292 List of functions used for rewriting file names of @acronym{MIME} parts.
9293 Each function takes a file name as input and returns a file name.
9294
9295 Ready-made functions include@*
9296 @code{mm-file-name-delete-whitespace},
9297 @code{mm-file-name-trim-whitespace},
9298 @code{mm-file-name-collapse-whitespace}, and
9299 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9300 the variable @code{mm-file-name-replace-whitespace} to replace each
9301 whitespace character in a file name with that string; default value
9302 is @code{"_"} (a single underscore).
9303 @findex mm-file-name-delete-whitespace
9304 @findex mm-file-name-trim-whitespace
9305 @findex mm-file-name-collapse-whitespace
9306 @findex mm-file-name-replace-whitespace
9307 @vindex mm-file-name-replace-whitespace
9308
9309 The standard functions @code{capitalize}, @code{downcase},
9310 @code{upcase}, and @code{upcase-initials} may be useful, too.
9311
9312 Everybody knows that whitespace characters in file names are evil,
9313 except those who don't know.  If you receive lots of attachments from
9314 such unenlightened users, you can make live easier by adding
9315
9316 @lisp
9317 (setq mm-file-name-rewrite-functions
9318       '(mm-file-name-trim-whitespace
9319         mm-file-name-collapse-whitespace
9320         mm-file-name-replace-whitespace))
9321 @end lisp
9322
9323 @noindent
9324 to your @file{~/.gnus.el} file.
9325
9326 @end table
9327
9328
9329 @node Charsets
9330 @section Charsets
9331 @cindex charsets
9332
9333 People use different charsets, and we have @acronym{MIME} to let us know what
9334 charsets they use.  Or rather, we wish we had.  Many people use
9335 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9336 just send out messages without saying what character sets they use.  To
9337 help a bit with this, some local news hierarchies have policies that say
9338 what character set is the default.  For instance, the @samp{fj}
9339 hierarchy uses @code{iso-2022-jp-2}.
9340
9341 @vindex gnus-group-charset-alist
9342 This knowledge is encoded in the @code{gnus-group-charset-alist}
9343 variable, which is an alist of regexps (use the first item to match full
9344 group names) and default charsets to be used when reading these groups.
9345
9346 @vindex gnus-newsgroup-ignored-charsets
9347 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9348 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9349 even if they really are in @code{koi-8}.  To help here, the
9350 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9351 charsets that are listed here will be ignored.  The variable can be
9352 set on a group-by-group basis using the group parameters (@pxref{Group
9353 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9354 which includes values some agents insist on having in there.
9355
9356 @vindex gnus-group-posting-charset-alist
9357 When posting, @code{gnus-group-posting-charset-alist} is used to
9358 determine which charsets should not be encoded using the @acronym{MIME}
9359 encodings.  For instance, some hierarchies discourage using
9360 quoted-printable header encoding.
9361
9362 This variable is an alist of regexps and permitted unencoded charsets
9363 for posting.  Each element of the alist has the form @code{(}@var{test
9364 header body-list}@code{)}, where:
9365
9366 @table @var
9367 @item test
9368 is either a regular expression matching the newsgroup header or a
9369 variable to query,
9370 @item header
9371 is the charset which may be left unencoded in the header (@code{nil}
9372 means encode all charsets),
9373 @item body-list
9374 is a list of charsets which may be encoded using 8bit content-transfer
9375 encoding in the body, or one of the special values @code{nil} (always
9376 encode using quoted-printable) or @code{t} (always use 8bit).
9377 @end table
9378
9379 @cindex Russian
9380 @cindex koi8-r
9381 @cindex koi8-u
9382 @cindex iso-8859-5
9383 @cindex coding system aliases
9384 @cindex preferred charset
9385
9386 Other charset tricks that may be useful, although not Gnus-specific:
9387
9388 If there are several @acronym{MIME} charsets that encode the same Emacs
9389 charset, you can choose what charset to use by saying the following:
9390
9391 @lisp
9392 (put-charset-property 'cyrillic-iso8859-5
9393                       'preferred-coding-system 'koi8-r)
9394 @end lisp
9395
9396 This means that Russian will be encoded using @code{koi8-r} instead of
9397 the default @code{iso-8859-5} @acronym{MIME} charset.
9398
9399 If you want to read messages in @code{koi8-u}, you can cheat and say
9400
9401 @lisp
9402 (define-coding-system-alias 'koi8-u 'koi8-r)
9403 @end lisp
9404
9405 This will almost do the right thing.
9406
9407 And finally, to read charsets like @code{windows-1251}, you can say
9408 something like
9409
9410 @lisp
9411 (codepage-setup 1251)
9412 (define-coding-system-alias 'windows-1251 'cp1251)
9413 @end lisp
9414
9415
9416 @node Article Commands
9417 @section Article Commands
9418
9419 @table @kbd
9420
9421 @item A P
9422 @cindex PostScript
9423 @cindex printing
9424 @kindex A P (Summary)
9425 @vindex gnus-ps-print-hook
9426 @findex gnus-summary-print-article
9427 Generate and print a PostScript image of the article buffer
9428 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9429 be run just before printing the buffer.  An alternative way to print
9430 article is to use Muttprint (@pxref{Saving Articles}).
9431
9432 @end table
9433
9434
9435 @node Summary Sorting
9436 @section Summary Sorting
9437 @cindex summary sorting
9438
9439 You can have the summary buffer sorted in various ways, even though I
9440 can't really see why you'd want that.
9441
9442 @table @kbd
9443
9444 @item C-c C-s C-n
9445 @kindex C-c C-s C-n (Summary)
9446 @findex gnus-summary-sort-by-number
9447 Sort by article number (@code{gnus-summary-sort-by-number}).
9448
9449 @item C-c C-s C-a
9450 @kindex C-c C-s C-a (Summary)
9451 @findex gnus-summary-sort-by-author
9452 Sort by author (@code{gnus-summary-sort-by-author}).
9453
9454 @item C-c C-s C-s
9455 @kindex C-c C-s C-s (Summary)
9456 @findex gnus-summary-sort-by-subject
9457 Sort by subject (@code{gnus-summary-sort-by-subject}).
9458
9459 @item C-c C-s C-d
9460 @kindex C-c C-s C-d (Summary)
9461 @findex gnus-summary-sort-by-date
9462 Sort by date (@code{gnus-summary-sort-by-date}).
9463
9464 @item C-c C-s C-l
9465 @kindex C-c C-s C-l (Summary)
9466 @findex gnus-summary-sort-by-lines
9467 Sort by lines (@code{gnus-summary-sort-by-lines}).
9468
9469 @item C-c C-s C-c
9470 @kindex C-c C-s C-c (Summary)
9471 @findex gnus-summary-sort-by-chars
9472 Sort by article length (@code{gnus-summary-sort-by-chars}).
9473
9474 @item C-c C-s C-i
9475 @kindex C-c C-s C-i (Summary)
9476 @findex gnus-summary-sort-by-score
9477 Sort by score (@code{gnus-summary-sort-by-score}).
9478
9479 @item C-c C-s C-r
9480 @kindex C-c C-s C-r (Summary)
9481 @findex gnus-summary-sort-by-random
9482 Randomize (@code{gnus-summary-sort-by-random}).
9483
9484 @item C-c C-s C-o
9485 @kindex C-c C-s C-o (Summary)
9486 @findex gnus-summary-sort-by-original
9487 Sort using the default sorting method
9488 (@code{gnus-summary-sort-by-original}).
9489 @end table
9490
9491 These functions will work both when you use threading and when you don't
9492 use threading.  In the latter case, all summary lines will be sorted,
9493 line by line.  In the former case, sorting will be done on a
9494 root-by-root basis, which might not be what you were looking for.  To
9495 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9496 Commands}).
9497
9498
9499 @node Finding the Parent
9500 @section Finding the Parent
9501 @cindex parent articles
9502 @cindex referring articles
9503
9504 @table @kbd
9505 @item ^
9506 @kindex ^ (Summary)
9507 @findex gnus-summary-refer-parent-article
9508 If you'd like to read the parent of the current article, and it is not
9509 displayed in the summary buffer, you might still be able to.  That is,
9510 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9511 and the @code{References} in the current article are not mangled, you
9512 can just press @kbd{^} or @kbd{A r}
9513 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9514 you'll get the parent.  If the parent is already displayed in the
9515 summary buffer, point will just move to this article.
9516
9517 If given a positive numerical prefix, fetch that many articles back into
9518 the ancestry.  If given a negative numerical prefix, fetch just that
9519 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9520 grandparent and the grandgrandparent of the current article.  If you say
9521 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9522 article.
9523
9524 @item A R (Summary)
9525 @findex gnus-summary-refer-references
9526 @kindex A R (Summary)
9527 Fetch all articles mentioned in the @code{References} header of the
9528 article (@code{gnus-summary-refer-references}).
9529
9530 @item A T (Summary)
9531 @findex gnus-summary-refer-thread
9532 @kindex A T (Summary)
9533 Display the full thread where the current article appears
9534 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9535 headers in the current group to work, so it usually takes a while.  If
9536 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9537 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9538 visible effects normally, but it'll make this command work a whole lot
9539 faster.  Of course, it'll make group entry somewhat slow.
9540
9541 @vindex gnus-refer-thread-limit
9542 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9543 articles before the first displayed in the current group) headers to
9544 fetch when doing this command.  The default is 200.  If @code{t}, all
9545 the available headers will be fetched.  This variable can be overridden
9546 by giving the @kbd{A T} command a numerical prefix.
9547
9548 @item M-^ (Summary)
9549 @findex gnus-summary-refer-article
9550 @kindex M-^ (Summary)
9551 @cindex Message-ID
9552 @cindex fetching by Message-ID
9553 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9554 matter what group it belongs to.  @kbd{M-^}
9555 (@code{gnus-summary-refer-article}) will ask you for a
9556 @code{Message-ID}, which is one of those long, hard-to-read thingies
9557 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9558 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9559 @end table
9560
9561 The current select method will be used when fetching by
9562 @code{Message-ID} from non-news select method, but you can override this
9563 by giving this command a prefix.
9564
9565 @vindex gnus-refer-article-method
9566 If the group you are reading is located on a back end that does not
9567 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9568 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9569 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9570 updating the spool you are reading from, but that's not really
9571 necessary.
9572
9573 It can also be a list of select methods, as well as the special symbol
9574 @code{current}, which means to use the current select method.  If it
9575 is a list, Gnus will try all the methods in the list until it finds a
9576 match.
9577
9578 Here's an example setting that will first try the current method, and
9579 then ask Google if that fails:
9580
9581 @lisp
9582 (setq gnus-refer-article-method
9583       '(current
9584         (nnweb "google" (nnweb-type google))))
9585 @end lisp
9586
9587 Most of the mail back ends support fetching by @code{Message-ID}, but
9588 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9589 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9590 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9591 only able to locate articles that have been posted to the current group.
9592 (Anything else would be too time consuming.)  @code{nnmh} does not
9593 support this at all.
9594
9595
9596 @node Alternative Approaches
9597 @section Alternative Approaches
9598
9599 Different people like to read news using different methods.  This being
9600 Gnus, we offer a small selection of minor modes for the summary buffers.
9601
9602 @menu
9603 * Pick and Read::               First mark articles and then read them.
9604 * Binary Groups::               Auto-decode all articles.
9605 @end menu
9606
9607
9608 @node Pick and Read
9609 @subsection Pick and Read
9610 @cindex pick and read
9611
9612 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9613 a two-phased reading interface.  The user first marks in a summary
9614 buffer the articles she wants to read.  Then she starts reading the
9615 articles with just an article buffer displayed.
9616
9617 @findex gnus-pick-mode
9618 @kindex M-x gnus-pick-mode
9619 Gnus provides a summary buffer minor mode that allows
9620 this---@code{gnus-pick-mode}.  This basically means that a few process
9621 mark commands become one-keystroke commands to allow easy marking, and
9622 it provides one additional command for switching to the summary buffer.
9623
9624 Here are the available keystrokes when using pick mode:
9625
9626 @table @kbd
9627 @item .
9628 @kindex . (Pick)
9629 @findex gnus-pick-article-or-thread
9630 Pick the article or thread on the current line
9631 (@code{gnus-pick-article-or-thread}).  If the variable
9632 @code{gnus-thread-hide-subtree} is true, then this key selects the
9633 entire thread when used at the first article of the thread.  Otherwise,
9634 it selects just the article.  If given a numerical prefix, go to that
9635 thread or article and pick it.  (The line number is normally displayed
9636 at the beginning of the summary pick lines.)
9637
9638 @item SPACE
9639 @kindex SPACE (Pick)
9640 @findex gnus-pick-next-page
9641 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9642 at the end of the buffer, start reading the picked articles.
9643
9644 @item u
9645 @kindex u (Pick)
9646 @findex gnus-pick-unmark-article-or-thread.
9647 Unpick the thread or article
9648 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9649 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9650 thread if used at the first article of the thread.  Otherwise it unpicks
9651 just the article.  You can give this key a numerical prefix to unpick
9652 the thread or article at that line.
9653
9654 @item RET
9655 @kindex RET (Pick)
9656 @findex gnus-pick-start-reading
9657 @vindex gnus-pick-display-summary
9658 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9659 given a prefix, mark all unpicked articles as read first.  If
9660 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9661 will still be visible when you are reading.
9662
9663 @end table
9664
9665 All the normal summary mode commands are still available in the
9666 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9667 which is mapped to the same function
9668 @code{gnus-summary-tick-article-forward}.
9669
9670 If this sounds like a good idea to you, you could say:
9671
9672 @lisp
9673 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9674 @end lisp
9675
9676 @vindex gnus-pick-mode-hook
9677 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9678
9679 @vindex gnus-mark-unpicked-articles-as-read
9680 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9681 all unpicked articles as read.  The default is @code{nil}.
9682
9683 @vindex gnus-summary-pick-line-format
9684 The summary line format in pick mode is slightly different from the
9685 standard format.  At the beginning of each line the line number is
9686 displayed.  The pick mode line format is controlled by the
9687 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9688 Variables}).  It accepts the same format specs that
9689 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9690
9691
9692 @node Binary Groups
9693 @subsection Binary Groups
9694 @cindex binary groups
9695
9696 @findex gnus-binary-mode
9697 @kindex M-x gnus-binary-mode
9698 If you spend much time in binary groups, you may grow tired of hitting
9699 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9700 is a minor mode for summary buffers that makes all ordinary Gnus article
9701 selection functions uudecode series of articles and display the result
9702 instead of just displaying the articles the normal way.
9703
9704 @kindex g (Binary)
9705 @findex gnus-binary-show-article
9706 The only way, in fact, to see the actual articles is the @kbd{g}
9707 command, when you have turned on this mode
9708 (@code{gnus-binary-show-article}).
9709
9710 @vindex gnus-binary-mode-hook
9711 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9712
9713
9714 @node Tree Display
9715 @section Tree Display
9716 @cindex trees
9717
9718 @vindex gnus-use-trees
9719 If you don't like the normal Gnus summary display, you might try setting
9720 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9721 additional @dfn{tree buffer}.  You can execute all summary mode commands
9722 in the tree buffer.
9723
9724 There are a few variables to customize the tree display, of course:
9725
9726 @table @code
9727 @item gnus-tree-mode-hook
9728 @vindex gnus-tree-mode-hook
9729 A hook called in all tree mode buffers.
9730
9731 @item gnus-tree-mode-line-format
9732 @vindex gnus-tree-mode-line-format
9733 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9734 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9735 of valid specs, @pxref{Summary Buffer Mode Line}.
9736
9737 @item gnus-selected-tree-face
9738 @vindex gnus-selected-tree-face
9739 Face used for highlighting the selected article in the tree buffer.  The
9740 default is @code{modeline}.
9741
9742 @item gnus-tree-line-format
9743 @vindex gnus-tree-line-format
9744 A format string for the tree nodes.  The name is a bit of a misnomer,
9745 though---it doesn't define a line, but just the node.  The default value
9746 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9747 the name of the poster.  It is vital that all nodes are of the same
9748 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9749
9750 Valid specs are:
9751
9752 @table @samp
9753 @item n
9754 The name of the poster.
9755 @item f
9756 The @code{From} header.
9757 @item N
9758 The number of the article.
9759 @item [
9760 The opening bracket.
9761 @item ]
9762 The closing bracket.
9763 @item s
9764 The subject.
9765 @end table
9766
9767 @xref{Formatting Variables}.
9768
9769 Variables related to the display are:
9770
9771 @table @code
9772 @item gnus-tree-brackets
9773 @vindex gnus-tree-brackets
9774 This is used for differentiating between ``real'' articles and
9775 ``sparse'' articles.  The format is
9776 @example
9777 ((@var{real-open} . @var{real-close})
9778  (@var{sparse-open} . @var{sparse-close})
9779  (@var{dummy-open} . @var{dummy-close}))
9780 @end example
9781 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9782
9783 @item gnus-tree-parent-child-edges
9784 @vindex gnus-tree-parent-child-edges
9785 This is a list that contains the characters used for connecting parent
9786 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9787
9788 @end table
9789
9790 @item gnus-tree-minimize-window
9791 @vindex gnus-tree-minimize-window
9792 If this variable is non-@code{nil}, Gnus will try to keep the tree
9793 buffer as small as possible to allow more room for the other Gnus
9794 windows.  If this variable is a number, the tree buffer will never be
9795 higher than that number.  The default is @code{t}.  Note that if you
9796 have several windows displayed side-by-side in a frame and the tree
9797 buffer is one of these, minimizing the tree window will also resize all
9798 other windows displayed next to it.
9799
9800 You may also wish to add the following hook to keep the window minimized
9801 at all times:
9802
9803 @lisp
9804 (add-hook 'gnus-configure-windows-hook
9805           'gnus-tree-perhaps-minimize)
9806 @end lisp
9807
9808 @item gnus-generate-tree-function
9809 @vindex gnus-generate-tree-function
9810 @findex gnus-generate-horizontal-tree
9811 @findex gnus-generate-vertical-tree
9812 The function that actually generates the thread tree.  Two predefined
9813 functions are available: @code{gnus-generate-horizontal-tree} and
9814 @code{gnus-generate-vertical-tree} (which is the default).
9815
9816 @end table
9817
9818 Here's an example from a horizontal tree buffer:
9819
9820 @example
9821 @{***@}-(***)-[odd]-[Gun]
9822      |      \[Jan]
9823      |      \[odd]-[Eri]
9824      |      \(***)-[Eri]
9825      |            \[odd]-[Paa]
9826      \[Bjo]
9827      \[Gun]
9828      \[Gun]-[Jor]
9829 @end example
9830
9831 Here's the same thread displayed in a vertical tree buffer:
9832
9833 @example
9834 @group
9835 @{***@}
9836   |--------------------------\-----\-----\
9837 (***)                         [Bjo] [Gun] [Gun]
9838   |--\-----\-----\                          |
9839 [odd] [Jan] [odd] (***)                   [Jor]
9840   |           |     |--\
9841 [Gun]       [Eri] [Eri] [odd]
9842                           |
9843                         [Paa]
9844 @end group
9845 @end example
9846
9847 If you're using horizontal trees, it might be nice to display the trees
9848 side-by-side with the summary buffer.  You could add something like the
9849 following to your @file{~/.gnus.el} file:
9850
9851 @lisp
9852 (setq gnus-use-trees t
9853       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9854       gnus-tree-minimize-window nil)
9855 (gnus-add-configuration
9856  '(article
9857    (vertical 1.0
9858              (horizontal 0.25
9859                          (summary 0.75 point)
9860                          (tree 1.0))
9861              (article 1.0))))
9862 @end lisp
9863
9864 @xref{Window Layout}.
9865
9866
9867 @node Mail Group Commands
9868 @section Mail Group Commands
9869 @cindex mail group commands
9870
9871 Some commands only make sense in mail groups.  If these commands are
9872 invalid in the current group, they will raise a hell and let you know.
9873
9874 All these commands (except the expiry and edit commands) use the
9875 process/prefix convention (@pxref{Process/Prefix}).
9876
9877 @table @kbd
9878
9879 @item B e
9880 @kindex B e (Summary)
9881 @findex gnus-summary-expire-articles
9882 Run all expirable articles in the current group through the expiry
9883 process (@code{gnus-summary-expire-articles}).  That is, delete all
9884 expirable articles in the group that have been around for a while.
9885 (@pxref{Expiring Mail}).
9886
9887 @item B C-M-e
9888 @kindex B C-M-e (Summary)
9889 @findex gnus-summary-expire-articles-now
9890 Delete all the expirable articles in the group
9891 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9892 articles eligible for expiry in the current group will
9893 disappear forever into that big @file{/dev/null} in the sky.
9894
9895 @item B DEL
9896 @kindex B DEL (Summary)
9897 @findex gnus-summary-delete-article
9898 @c @icon{gnus-summary-mail-delete}
9899 Delete the mail article.  This is ``delete'' as in ``delete it from your
9900 disk forever and ever, never to return again.'' Use with caution.
9901 (@code{gnus-summary-delete-article}).
9902
9903 @item B m
9904 @kindex B m (Summary)
9905 @cindex move mail
9906 @findex gnus-summary-move-article
9907 @vindex gnus-preserve-marks
9908 Move the article from one mail group to another
9909 (@code{gnus-summary-move-article}).  Marks will be preserved if
9910 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9911
9912 @item B c
9913 @kindex B c (Summary)
9914 @cindex copy mail
9915 @findex gnus-summary-copy-article
9916 @c @icon{gnus-summary-mail-copy}
9917 Copy the article from one group (mail group or not) to a mail group
9918 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9919 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9920
9921 @item B B
9922 @kindex B B (Summary)
9923 @cindex crosspost mail
9924 @findex gnus-summary-crosspost-article
9925 Crosspost the current article to some other group
9926 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9927 the article in the other group, and the Xref headers of the article will
9928 be properly updated.
9929
9930 @item B i
9931 @kindex B i (Summary)
9932 @findex gnus-summary-import-article
9933 Import an arbitrary file into the current mail newsgroup
9934 (@code{gnus-summary-import-article}).  You will be prompted for a file
9935 name, a @code{From} header and a @code{Subject} header.
9936
9937 @item B I
9938 @kindex B I (Summary)
9939 @findex gnus-summary-create-article
9940 Create an empty article in the current mail newsgroups
9941 (@code{gnus-summary-create-article}).  You will be prompted for a
9942 @code{From} header and a @code{Subject} header.
9943
9944 @item B r
9945 @kindex B r (Summary)
9946 @findex gnus-summary-respool-article
9947 @vindex gnus-summary-respool-default-method
9948 Respool the mail article (@code{gnus-summary-respool-article}).
9949 @code{gnus-summary-respool-default-method} will be used as the default
9950 select method when respooling.  This variable is @code{nil} by default,
9951 which means that the current group select method will be used instead.
9952 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9953 (which is the default).
9954
9955 @item B w
9956 @itemx e
9957 @kindex B w (Summary)
9958 @kindex e (Summary)
9959 @findex gnus-summary-edit-article
9960 @kindex C-c C-c (Article)
9961 @findex gnus-summary-edit-article-done
9962 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9963 editing and make the changes permanent, type @kbd{C-c C-c}
9964 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9965 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9966
9967 @item B q
9968 @kindex B q (Summary)
9969 @findex gnus-summary-respool-query
9970 If you want to re-spool an article, you might be curious as to what group
9971 the article will end up in before you do the re-spooling.  This command
9972 will tell you (@code{gnus-summary-respool-query}).
9973
9974 @item B t
9975 @kindex B t (Summary)
9976 @findex gnus-summary-respool-trace
9977 Similarly, this command will display all fancy splitting patterns used
9978 when respooling, if any (@code{gnus-summary-respool-trace}).
9979
9980 @item B p
9981 @kindex B p (Summary)
9982 @findex gnus-summary-article-posted-p
9983 Some people have a tendency to send you ``courtesy'' copies when they
9984 follow up to articles you have posted.  These usually have a
9985 @code{Newsgroups} header in them, but not always.  This command
9986 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9987 article from your news server (or rather, from
9988 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9989 report back whether it found the article or not.  Even if it says that
9990 it didn't find the article, it may have been posted anyway---mail
9991 propagation is much faster than news propagation, and the news copy may
9992 just not have arrived yet.
9993
9994 @item K E
9995 @kindex K E (Summary)
9996 @findex gnus-article-encrypt-body
9997 @vindex gnus-article-encrypt-protocol
9998 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9999 The body is encrypted with the encryption protocol specified by the
10000 variable @code{gnus-article-encrypt-protocol}.
10001
10002 @end table
10003
10004 @vindex gnus-move-split-methods
10005 @cindex moving articles
10006 If you move (or copy) articles regularly, you might wish to have Gnus
10007 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10008 variable that uses the same syntax as @code{gnus-split-methods}
10009 (@pxref{Saving Articles}).  You may customize that variable to create
10010 suggestions you find reasonable.  (Note that
10011 @code{gnus-move-split-methods} uses group names where
10012 @code{gnus-split-methods} uses file names.)
10013
10014 @lisp
10015 (setq gnus-move-split-methods
10016       '(("^From:.*Lars Magne" "nnml:junk")
10017         ("^Subject:.*gnus" "nnfolder:important")
10018         (".*" "nnml:misc")))
10019 @end lisp
10020
10021
10022 @node Various Summary Stuff
10023 @section Various Summary Stuff
10024
10025 @menu
10026 * Summary Group Information::   Information oriented commands.
10027 * Searching for Articles::      Multiple article commands.
10028 * Summary Generation Commands::
10029 * Really Various Summary Commands::  Those pesky non-conformant commands.
10030 @end menu
10031
10032 @table @code
10033 @vindex gnus-summary-display-while-building
10034 @item gnus-summary-display-while-building
10035 If non-@code{nil}, show and update the summary buffer as it's being
10036 built.  If @code{t}, update the buffer after every line is inserted.
10037 If the value is an integer, @var{n}, update the display every @var{n}
10038 lines.  The default is @code{nil}.
10039
10040 @vindex gnus-summary-display-arrow
10041 @item gnus-summary-display-arrow
10042 If non-@code{nil}, display an arrow in the fringe to indicate the
10043 current article.
10044
10045 @vindex gnus-summary-mode-hook
10046 @item gnus-summary-mode-hook
10047 This hook is called when creating a summary mode buffer.
10048
10049 @vindex gnus-summary-generate-hook
10050 @item gnus-summary-generate-hook
10051 This is called as the last thing before doing the threading and the
10052 generation of the summary buffer.  It's quite convenient for customizing
10053 the threading variables based on what data the newsgroup has.  This hook
10054 is called from the summary buffer after most summary buffer variables
10055 have been set.
10056
10057 @vindex gnus-summary-prepare-hook
10058 @item gnus-summary-prepare-hook
10059 It is called after the summary buffer has been generated.  You might use
10060 it to, for instance, highlight lines or modify the look of the buffer in
10061 some other ungodly manner.  I don't care.
10062
10063 @vindex gnus-summary-prepared-hook
10064 @item gnus-summary-prepared-hook
10065 A hook called as the very last thing after the summary buffer has been
10066 generated.
10067
10068 @vindex gnus-summary-ignore-duplicates
10069 @item gnus-summary-ignore-duplicates
10070 When Gnus discovers two articles that have the same @code{Message-ID},
10071 it has to do something drastic.  No articles are allowed to have the
10072 same @code{Message-ID}, but this may happen when reading mail from some
10073 sources.  Gnus allows you to customize what happens with this variable.
10074 If it is @code{nil} (which is the default), Gnus will rename the
10075 @code{Message-ID} (for display purposes only) and display the article as
10076 any other article.  If this variable is @code{t}, it won't display the
10077 article---it'll be as if it never existed.
10078
10079 @vindex gnus-alter-articles-to-read-function
10080 @item gnus-alter-articles-to-read-function
10081 This function, which takes two parameters (the group name and the list
10082 of articles to be selected), is called to allow the user to alter the
10083 list of articles to be selected.
10084
10085 For instance, the following function adds the list of cached articles to
10086 the list in one particular group:
10087
10088 @lisp
10089 (defun my-add-cached-articles (group articles)
10090   (if (string= group "some.group")
10091       (append gnus-newsgroup-cached articles)
10092     articles))
10093 @end lisp
10094
10095 @vindex gnus-newsgroup-variables
10096 @item gnus-newsgroup-variables
10097 A list of newsgroup (summary buffer) local variables, or cons of
10098 variables and their default values (when the default values are not
10099 @code{nil}), that should be made global while the summary buffer is
10100 active.  These variables can be used to set variables in the group
10101 parameters while still allowing them to affect operations done in
10102 other buffers.  For example:
10103
10104 @lisp
10105 (setq gnus-newsgroup-variables
10106       '(message-use-followup-to
10107         (gnus-visible-headers .
10108  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10109 @end lisp
10110
10111 @end table
10112
10113
10114 @node Summary Group Information
10115 @subsection Summary Group Information
10116
10117 @table @kbd
10118
10119 @item H f
10120 @kindex H f (Summary)
10121 @findex gnus-summary-fetch-faq
10122 @vindex gnus-group-faq-directory
10123 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10124 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10125 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10126 is usually a directory on a remote machine.  This variable can also be
10127 a list of directories.  In that case, giving a prefix to this command
10128 will allow you to choose between the various sites.  @code{ange-ftp}
10129 or @code{efs} will probably be used for fetching the file.
10130
10131 @item H d
10132 @kindex H d (Summary)
10133 @findex gnus-summary-describe-group
10134 Give a brief description of the current group
10135 (@code{gnus-summary-describe-group}).  If given a prefix, force
10136 rereading the description from the server.
10137
10138 @item H h
10139 @kindex H h (Summary)
10140 @findex gnus-summary-describe-briefly
10141 Give an extremely brief description of the most important summary
10142 keystrokes (@code{gnus-summary-describe-briefly}).
10143
10144 @item H i
10145 @kindex H i (Summary)
10146 @findex gnus-info-find-node
10147 Go to the Gnus info node (@code{gnus-info-find-node}).
10148 @end table
10149
10150
10151 @node Searching for Articles
10152 @subsection Searching for Articles
10153
10154 @table @kbd
10155
10156 @item M-s
10157 @kindex M-s (Summary)
10158 @findex gnus-summary-search-article-forward
10159 Search through all subsequent (raw) articles for a regexp
10160 (@code{gnus-summary-search-article-forward}).
10161
10162 @item M-r
10163 @kindex M-r (Summary)
10164 @findex gnus-summary-search-article-backward
10165 Search through all previous (raw) articles for a regexp
10166 (@code{gnus-summary-search-article-backward}).
10167
10168 @item &
10169 @kindex & (Summary)
10170 @findex gnus-summary-execute-command
10171 This command will prompt you for a header, a regular expression to match
10172 on this field, and a command to be executed if the match is made
10173 (@code{gnus-summary-execute-command}).  If the header is an empty
10174 string, the match is done on the entire article.  If given a prefix,
10175 search backward instead.
10176
10177 For instance, @kbd{& RET some.*string #} will put the process mark on
10178 all articles that have heads or bodies that match @samp{some.*string}.
10179
10180 @item M-&
10181 @kindex M-& (Summary)
10182 @findex gnus-summary-universal-argument
10183 Perform any operation on all articles that have been marked with
10184 the process mark (@code{gnus-summary-universal-argument}).
10185 @end table
10186
10187 @node Summary Generation Commands
10188 @subsection Summary Generation Commands
10189
10190 @table @kbd
10191
10192 @item Y g
10193 @kindex Y g (Summary)
10194 @findex gnus-summary-prepare
10195 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10196
10197 @item Y c
10198 @kindex Y c (Summary)
10199 @findex gnus-summary-insert-cached-articles
10200 Pull all cached articles (for the current group) into the summary buffer
10201 (@code{gnus-summary-insert-cached-articles}).
10202
10203 @item Y d
10204 @kindex Y d (Summary)
10205 @findex gnus-summary-insert-dormant-articles
10206 Pull all dormant articles (for the current group) into the summary buffer
10207 (@code{gnus-summary-insert-dormant-articles}).
10208
10209 @end table
10210
10211
10212 @node Really Various Summary Commands
10213 @subsection Really Various Summary Commands
10214
10215 @table @kbd
10216
10217 @item A D
10218 @itemx C-d
10219 @kindex C-d (Summary)
10220 @kindex A D (Summary)
10221 @findex gnus-summary-enter-digest-group
10222 If the current article is a collection of other articles (for instance,
10223 a digest), you might use this command to enter a group based on the that
10224 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10225 guess what article type is currently displayed unless you give a prefix
10226 to this command, which forces a ``digest'' interpretation.  Basically,
10227 whenever you see a message that is a collection of other messages of
10228 some format, you @kbd{C-d} and read these messages in a more convenient
10229 fashion.
10230
10231 @item C-M-d
10232 @kindex C-M-d (Summary)
10233 @findex gnus-summary-read-document
10234 This command is very similar to the one above, but lets you gather
10235 several documents into one biiig group
10236 (@code{gnus-summary-read-document}).  It does this by opening several
10237 @code{nndoc} groups for each document, and then opening an
10238 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10239 command understands the process/prefix convention
10240 (@pxref{Process/Prefix}).
10241
10242 @item C-t
10243 @kindex C-t (Summary)
10244 @findex gnus-summary-toggle-truncation
10245 Toggle truncation of summary lines
10246 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10247 line centering function in the summary buffer, so it's not a good idea
10248 to have truncation switched off while reading articles.
10249
10250 @item =
10251 @kindex = (Summary)
10252 @findex gnus-summary-expand-window
10253 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10254 If given a prefix, force an @code{article} window configuration.
10255
10256 @item C-M-e
10257 @kindex C-M-e (Summary)
10258 @findex gnus-summary-edit-parameters
10259 Edit the group parameters (@pxref{Group Parameters}) of the current
10260 group (@code{gnus-summary-edit-parameters}).
10261
10262 @item C-M-a
10263 @kindex C-M-a (Summary)
10264 @findex gnus-summary-customize-parameters
10265 Customize the group parameters (@pxref{Group Parameters}) of the current
10266 group (@code{gnus-summary-customize-parameters}).
10267
10268 @end table
10269
10270
10271 @node Exiting the Summary Buffer
10272 @section Exiting the Summary Buffer
10273 @cindex summary exit
10274 @cindex exiting groups
10275
10276 Exiting from the summary buffer will normally update all info on the
10277 group and return you to the group buffer.
10278
10279 @table @kbd
10280
10281 @item Z Z
10282 @itemx q
10283 @kindex Z Z (Summary)
10284 @kindex q (Summary)
10285 @findex gnus-summary-exit
10286 @vindex gnus-summary-exit-hook
10287 @vindex gnus-summary-prepare-exit-hook
10288 @vindex gnus-group-no-more-groups-hook
10289 @c @icon{gnus-summary-exit}
10290 Exit the current group and update all information on the group
10291 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10292 called before doing much of the exiting, which calls
10293 @code{gnus-summary-expire-articles} by default.
10294 @code{gnus-summary-exit-hook} is called after finishing the exit
10295 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10296 group mode having no more (unread) groups.
10297
10298 @item Z E
10299 @itemx Q
10300 @kindex Z E (Summary)
10301 @kindex Q (Summary)
10302 @findex gnus-summary-exit-no-update
10303 Exit the current group without updating any information on the group
10304 (@code{gnus-summary-exit-no-update}).
10305
10306 @item Z c
10307 @itemx c
10308 @kindex Z c (Summary)
10309 @kindex c (Summary)
10310 @findex gnus-summary-catchup-and-exit
10311 @c @icon{gnus-summary-catchup-and-exit}
10312 Mark all unticked articles in the group as read and then exit
10313 (@code{gnus-summary-catchup-and-exit}).
10314
10315 @item Z C
10316 @kindex Z C (Summary)
10317 @findex gnus-summary-catchup-all-and-exit
10318 Mark all articles, even the ticked ones, as read and then exit
10319 (@code{gnus-summary-catchup-all-and-exit}).
10320
10321 @item Z n
10322 @kindex Z n (Summary)
10323 @findex gnus-summary-catchup-and-goto-next-group
10324 Mark all articles as read and go to the next group
10325 (@code{gnus-summary-catchup-and-goto-next-group}).
10326
10327 @item Z R
10328 @kindex Z R (Summary)
10329 @findex gnus-summary-reselect-current-group
10330 Exit this group, and then enter it again
10331 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10332 all articles, both read and unread.
10333
10334 @item Z G
10335 @itemx M-g
10336 @kindex Z G (Summary)
10337 @kindex M-g (Summary)
10338 @findex gnus-summary-rescan-group
10339 @c @icon{gnus-summary-mail-get}
10340 Exit the group, check for new articles in the group, and select the
10341 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10342 articles, both read and unread.
10343
10344 @item Z N
10345 @kindex Z N (Summary)
10346 @findex gnus-summary-next-group
10347 Exit the group and go to the next group
10348 (@code{gnus-summary-next-group}).
10349
10350 @item Z P
10351 @kindex Z P (Summary)
10352 @findex gnus-summary-prev-group
10353 Exit the group and go to the previous group
10354 (@code{gnus-summary-prev-group}).
10355
10356 @item Z s
10357 @kindex Z s (Summary)
10358 @findex gnus-summary-save-newsrc
10359 Save the current number of read/marked articles in the dribble buffer
10360 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10361 given a prefix, also save the @file{.newsrc} file(s).  Using this
10362 command will make exit without updating (the @kbd{Q} command) worthless.
10363 @end table
10364
10365 @vindex gnus-exit-group-hook
10366 @code{gnus-exit-group-hook} is called when you exit the current group
10367 with an ``updating'' exit.  For instance @kbd{Q}
10368 (@code{gnus-summary-exit-no-update}) does not call this hook.
10369
10370 @findex gnus-summary-wake-up-the-dead
10371 @findex gnus-dead-summary-mode
10372 @vindex gnus-kill-summary-on-exit
10373 If you're in the habit of exiting groups, and then changing your mind
10374 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10375 If you do that, Gnus won't kill the summary buffer when you exit it.
10376 (Quelle surprise!)  Instead it will change the name of the buffer to
10377 something like @samp{*Dead Summary ... *} and install a minor mode
10378 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10379 buffer, you'll find that all keys are mapped to a function called
10380 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10381 summary buffer will result in a live, normal summary buffer.
10382
10383 There will never be more than one dead summary buffer at any one time.
10384
10385 @vindex gnus-use-cross-reference
10386 The data on the current group will be updated (which articles you have
10387 read, which articles you have replied to, etc.) when you exit the
10388 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10389 @code{t} (which is the default), articles that are cross-referenced to
10390 this group and are marked as read, will also be marked as read in the
10391 other subscribed groups they were cross-posted to.  If this variable is
10392 neither @code{nil} nor @code{t}, the article will be marked as read in
10393 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10394
10395
10396 @node Crosspost Handling
10397 @section Crosspost Handling
10398
10399 @cindex velveeta
10400 @cindex spamming
10401 Marking cross-posted articles as read ensures that you'll never have to
10402 read the same article more than once.  Unless, of course, somebody has
10403 posted it to several groups separately.  Posting the same article to
10404 several groups (not cross-posting) is called @dfn{spamming}, and you are
10405 by law required to send nasty-grams to anyone who perpetrates such a
10406 heinous crime.  You may want to try NoCeM handling to filter out spam
10407 (@pxref{NoCeM}).
10408
10409 Remember: Cross-posting is kinda ok, but posting the same article
10410 separately to several groups is not.  Massive cross-posting (aka.
10411 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10412 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10413 excessive crossposting (@pxref{Summary Mail Commands}).
10414
10415 @cindex cross-posting
10416 @cindex Xref
10417 @cindex @acronym{NOV}
10418 One thing that may cause Gnus to not do the cross-posting thing
10419 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10420 (which is very nice, because it speeds things up considerably) which
10421 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10422 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10423 even with @sc{xover} by registering the @code{Xref} lines of all
10424 articles you actually read, but if you kill the articles, or just mark
10425 them as read without reading them, Gnus will not get a chance to snoop
10426 the @code{Xref} lines out of these articles, and will be unable to use
10427 the cross reference mechanism.
10428
10429 @cindex LIST overview.fmt
10430 @cindex overview.fmt
10431 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10432 in its overview files, try @samp{telnet your.nntp.server nntp},
10433 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10434 overview.fmt}.  This may not work, but if it does, and the last line you
10435 get does not read @samp{Xref:full}, then you should shout and whine at
10436 your news admin until she includes the @code{Xref} header in the
10437 overview files.
10438
10439 @vindex gnus-nov-is-evil
10440 If you want Gnus to get the @code{Xref}s right all the time, you have to
10441 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10442 considerably.
10443
10444 C'est la vie.
10445
10446 For an alternative approach, @pxref{Duplicate Suppression}.
10447
10448
10449 @node Duplicate Suppression
10450 @section Duplicate Suppression
10451
10452 By default, Gnus tries to make sure that you don't have to read the same
10453 article more than once by utilizing the crossposting mechanism
10454 (@pxref{Crosspost Handling}).  However, that simple and efficient
10455 approach may not work satisfactory for some users for various
10456 reasons.
10457
10458 @enumerate
10459 @item
10460 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10461 is evil and not very common.
10462
10463 @item
10464 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10465 @file{.overview} data bases.  This is evil and all too common, alas.
10466
10467 @item
10468 You may be reading the same group (or several related groups) from
10469 different @acronym{NNTP} servers.
10470
10471 @item
10472 You may be getting mail that duplicates articles posted to groups.
10473 @end enumerate
10474
10475 I'm sure there are other situations where @code{Xref} handling fails as
10476 well, but these four are the most common situations.
10477
10478 If, and only if, @code{Xref} handling fails for you, then you may
10479 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10480 will remember the @code{Message-ID}s of all articles you have read or
10481 otherwise marked as read, and then, as if by magic, mark them as read
10482 all subsequent times you see them---in @emph{all} groups.  Using this
10483 mechanism is quite likely to be somewhat inefficient, but not overly
10484 so.  It's certainly preferable to reading the same articles more than
10485 once.
10486
10487 Duplicate suppression is not a very subtle instrument.  It's more like a
10488 sledge hammer than anything else.  It works in a very simple
10489 fashion---if you have marked an article as read, it adds this Message-ID
10490 to a cache.  The next time it sees this Message-ID, it will mark the
10491 article as read with the @samp{M} mark.  It doesn't care what group it
10492 saw the article in.
10493
10494 @table @code
10495 @item gnus-suppress-duplicates
10496 @vindex gnus-suppress-duplicates
10497 If non-@code{nil}, suppress duplicates.
10498
10499 @item gnus-save-duplicate-list
10500 @vindex gnus-save-duplicate-list
10501 If non-@code{nil}, save the list of duplicates to a file.  This will
10502 make startup and shutdown take longer, so the default is @code{nil}.
10503 However, this means that only duplicate articles read in a single Gnus
10504 session are suppressed.
10505
10506 @item gnus-duplicate-list-length
10507 @vindex gnus-duplicate-list-length
10508 This variable says how many @code{Message-ID}s to keep in the duplicate
10509 suppression list.  The default is 10000.
10510
10511 @item gnus-duplicate-file
10512 @vindex gnus-duplicate-file
10513 The name of the file to store the duplicate suppression list in.  The
10514 default is @file{~/News/suppression}.
10515 @end table
10516
10517 If you have a tendency to stop and start Gnus often, setting
10518 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10519 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10520 the other hand, saving the list makes startup and shutdown much slower,
10521 so that means that if you stop and start Gnus often, you should set
10522 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10523 to you to figure out, I think.
10524
10525 @node Security
10526 @section Security
10527
10528 Gnus is able to verify signed messages or decrypt encrypted messages.
10529 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10530 and @acronym{S/MIME}, however you need some external programs to get
10531 things to work:
10532
10533 @enumerate
10534 @item
10535 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10536 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10537 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10538 Manual}), but Mailcrypt and gpg.el are also supported.
10539
10540 @item
10541 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10542 or newer is recommended.
10543
10544 @end enumerate
10545
10546 More information on how to set things up can be found in the message
10547 manual (@pxref{Security, ,Security, message, Message Manual}).
10548
10549 @table @code
10550 @item mm-verify-option
10551 @vindex mm-verify-option
10552 Option of verifying signed parts.  @code{never}, not verify;
10553 @code{always}, always verify; @code{known}, only verify known
10554 protocols.  Otherwise, ask user.
10555
10556 @item mm-decrypt-option
10557 @vindex mm-decrypt-option
10558 Option of decrypting encrypted parts.  @code{never}, no decryption;
10559 @code{always}, always decrypt; @code{known}, only decrypt known
10560 protocols.  Otherwise, ask user.
10561
10562 @item mml1991-use
10563 @vindex mml1991-use
10564 Symbol indicating elisp interface to OpenPGP implementation for
10565 @acronym{PGP} messages.  The default is @code{pgg}, but
10566 @code{mailcrypt} and @code{gpg} are also supported although
10567 deprecated.
10568
10569 @item mml2015-use
10570 @vindex mml2015-use
10571 Symbol indicating elisp interface to OpenPGP implementation for
10572 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10573 @code{mailcrypt} and @code{gpg} are also supported although
10574 deprecated.
10575
10576 @end table
10577
10578 @cindex snarfing keys
10579 @cindex importing PGP keys
10580 @cindex PGP key ring import
10581 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10582 key ring) is not supported explicitly through a menu item or command,
10583 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10584 allowing you to specify whatever action you think is appropriate
10585 through the usual @acronym{MIME} infrastructure.  You can use a
10586 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10587 Emacs MIME Manual}) such as the following to import keys using GNU
10588 Privacy Guard when you click on the @acronym{MIME} button
10589 (@pxref{Using MIME}).
10590
10591 @example
10592 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10593 @end example
10594 @noindent
10595 This happens to also be the default action defined in
10596 @code{mailcap-mime-data}.
10597
10598 @node Mailing List
10599 @section Mailing List
10600 @cindex mailing list
10601 @cindex RFC 2396
10602
10603 @kindex A M (summary)
10604 @findex gnus-mailing-list-insinuate
10605 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10606 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10607 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10608 summary buffer.
10609
10610 That enables the following commands to the summary buffer:
10611
10612 @table @kbd
10613
10614 @item C-c C-n h
10615 @kindex C-c C-n h (Summary)
10616 @findex gnus-mailing-list-help
10617 Send a message to fetch mailing list help, if List-Help field exists.
10618
10619 @item C-c C-n s
10620 @kindex C-c C-n s (Summary)
10621 @findex gnus-mailing-list-subscribe
10622 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10623
10624 @item C-c C-n u
10625 @kindex C-c C-n u (Summary)
10626 @findex gnus-mailing-list-unsubscribe
10627 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10628 field exists.
10629
10630 @item C-c C-n p
10631 @kindex C-c C-n p (Summary)
10632 @findex gnus-mailing-list-post
10633 Post to the mailing list, if List-Post field exists.
10634
10635 @item C-c C-n o
10636 @kindex C-c C-n o (Summary)
10637 @findex gnus-mailing-list-owner
10638 Send a message to the mailing list owner, if List-Owner field exists.
10639
10640 @item C-c C-n a
10641 @kindex C-c C-n a (Summary)
10642 @findex gnus-mailing-list-owner
10643 Browse the mailing list archive, if List-Archive field exists.
10644
10645 @end table
10646
10647
10648 @node Article Buffer
10649 @chapter Article Buffer
10650 @cindex article buffer
10651
10652 The articles are displayed in the article buffer, of which there is only
10653 one.  All the summary buffers share the same article buffer unless you
10654 tell Gnus otherwise.
10655
10656 @menu
10657 * Hiding Headers::              Deciding what headers should be displayed.
10658 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10659 * Customizing Articles::        Tailoring the look of the articles.
10660 * Article Keymap::              Keystrokes available in the article buffer.
10661 * Misc Article::                Other stuff.
10662 @end menu
10663
10664
10665 @node Hiding Headers
10666 @section Hiding Headers
10667 @cindex hiding headers
10668 @cindex deleting headers
10669
10670 The top section of each article is the @dfn{head}.  (The rest is the
10671 @dfn{body}, but you may have guessed that already.)
10672
10673 @vindex gnus-show-all-headers
10674 There is a lot of useful information in the head: the name of the person
10675 who wrote the article, the date it was written and the subject of the
10676 article.  That's well and nice, but there's also lots of information
10677 most people do not want to see---what systems the article has passed
10678 through before reaching you, the @code{Message-ID}, the
10679 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10680 of some of those lines.  If you want to keep all those lines in the
10681 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10682
10683 Gnus provides you with two variables for sifting headers:
10684
10685 @table @code
10686
10687 @item gnus-visible-headers
10688 @vindex gnus-visible-headers
10689 If this variable is non-@code{nil}, it should be a regular expression
10690 that says what headers you wish to keep in the article buffer.  All
10691 headers that do not match this variable will be hidden.
10692
10693 For instance, if you only want to see the name of the person who wrote
10694 the article and the subject, you'd say:
10695
10696 @lisp
10697 (setq gnus-visible-headers "^From:\\|^Subject:")
10698 @end lisp
10699
10700 This variable can also be a list of regexps to match headers to
10701 remain visible.
10702
10703 @item gnus-ignored-headers
10704 @vindex gnus-ignored-headers
10705 This variable is the reverse of @code{gnus-visible-headers}.  If this
10706 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10707 should be a regular expression that matches all lines that you want to
10708 hide.  All lines that do not match this variable will remain visible.
10709
10710 For instance, if you just want to get rid of the @code{References} line
10711 and the @code{Xref} line, you might say:
10712
10713 @lisp
10714 (setq gnus-ignored-headers "^References:\\|^Xref:")
10715 @end lisp
10716
10717 This variable can also be a list of regexps to match headers to
10718 be removed.
10719
10720 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10721 variable will have no effect.
10722
10723 @end table
10724
10725 @vindex gnus-sorted-header-list
10726 Gnus can also sort the headers for you.  (It does this by default.)  You
10727 can control the sorting by setting the @code{gnus-sorted-header-list}
10728 variable.  It is a list of regular expressions that says in what order
10729 the headers are to be displayed.
10730
10731 For instance, if you want the name of the author of the article first,
10732 and then the subject, you might say something like:
10733
10734 @lisp
10735 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10736 @end lisp
10737
10738 Any headers that are to remain visible, but are not listed in this
10739 variable, will be displayed in random order after all the headers listed in this variable.
10740
10741 @findex gnus-article-hide-boring-headers
10742 @vindex gnus-boring-article-headers
10743 You can hide further boring headers by setting
10744 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10745 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10746 list, but this list doesn't actually contain header names.  Instead is
10747 lists various @dfn{boring conditions} that Gnus can check and remove
10748 from sight.
10749
10750 These conditions are:
10751 @table @code
10752 @item empty
10753 Remove all empty headers.
10754 @item followup-to
10755 Remove the @code{Followup-To} header if it is identical to the
10756 @code{Newsgroups} header.
10757 @item reply-to
10758 Remove the @code{Reply-To} header if it lists the same address as the
10759 @code{From} header, or if the @code{broken-reply-to} group parameter is
10760 set.
10761 @item newsgroups
10762 Remove the @code{Newsgroups} header if it only contains the current group
10763 name.
10764 @item to-address
10765 Remove the @code{To} header if it only contains the address identical to
10766 the current group's @code{to-address} parameter.
10767 @item to-list
10768 Remove the @code{To} header if it only contains the address identical to
10769 the current group's @code{to-list} parameter.
10770 @item cc-list
10771 Remove the @code{CC} header if it only contains the address identical to
10772 the current group's @code{to-list} parameter.
10773 @item date
10774 Remove the @code{Date} header if the article is less than three days
10775 old.
10776 @item long-to
10777 Remove the @code{To} header if it is very long.
10778 @item many-to
10779 Remove all @code{To} headers if there are more than one.
10780 @end table
10781
10782 To include these three elements, you could say something like:
10783
10784 @lisp
10785 (setq gnus-boring-article-headers
10786       '(empty followup-to reply-to))
10787 @end lisp
10788
10789 This is also the default value for this variable.
10790
10791
10792 @node Using MIME
10793 @section Using MIME
10794 @cindex @acronym{MIME}
10795
10796 Mime is a standard for waving your hands through the air, aimlessly,
10797 while people stand around yawning.
10798
10799 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10800 while all newsreaders die of fear.
10801
10802 @acronym{MIME} may specify what character set the article uses, the encoding
10803 of the characters, and it also makes it possible to embed pictures and
10804 other naughty stuff in innocent-looking articles.
10805
10806 @vindex gnus-display-mime-function
10807 @findex gnus-display-mime
10808 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10809 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10810 default, which creates a bundle of clickable buttons that can be used to
10811 display, save and manipulate the @acronym{MIME} objects.
10812
10813 The following commands are available when you have placed point over a
10814 @acronym{MIME} button:
10815
10816 @table @kbd
10817 @findex gnus-article-press-button
10818 @item RET (Article)
10819 @kindex RET (Article)
10820 @itemx BUTTON-2 (Article)
10821 Toggle displaying of the @acronym{MIME} object
10822 (@code{gnus-article-press-button}).  If built-in viewers can not display
10823 the object, Gnus resorts to external viewers in the @file{mailcap}
10824 files.  If a viewer has the @samp{copiousoutput} specification, the
10825 object is displayed inline.
10826
10827 @findex gnus-mime-view-part
10828 @item M-RET (Article)
10829 @kindex M-RET (Article)
10830 @itemx v (Article)
10831 Prompt for a method, and then view the @acronym{MIME} object using this
10832 method (@code{gnus-mime-view-part}).
10833
10834 @findex gnus-mime-view-part-as-type
10835 @item t (Article)
10836 @kindex t (Article)
10837 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10838 (@code{gnus-mime-view-part-as-type}).
10839
10840 @findex gnus-mime-view-part-as-charset
10841 @item C (Article)
10842 @kindex C (Article)
10843 Prompt for a charset, and then view the @acronym{MIME} object using this
10844 charset (@code{gnus-mime-view-part-as-charset}).
10845
10846 @findex gnus-mime-save-part
10847 @item o (Article)
10848 @kindex o (Article)
10849 Prompt for a file name, and then save the @acronym{MIME} object
10850 (@code{gnus-mime-save-part}).
10851
10852 @findex gnus-mime-save-part-and-strip
10853 @item C-o (Article)
10854 @kindex C-o (Article)
10855 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10856 the article.  Then proceed to article editing, where a reasonable
10857 suggestion is being made on how the altered article should look
10858 like.  The stripped @acronym{MIME} object will be referred via the
10859 message/external-body @acronym{MIME} type.
10860 (@code{gnus-mime-save-part-and-strip}).
10861
10862 @findex gnus-mime-delete-part
10863 @item d (Article)
10864 @kindex d (Article)
10865 Delete the @acronym{MIME} object from the article and replace it with some
10866 information about the removed @acronym{MIME} object
10867 (@code{gnus-mime-delete-part}).
10868
10869 @findex gnus-mime-copy-part
10870 @item c (Article)
10871 @kindex c (Article)
10872 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10873 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10874 @file{.bz2} are automatically decompressed if
10875 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10876 Accessing Compressed Files, emacs, The Emacs Editor}).
10877
10878 @findex gnus-mime-print-part
10879 @item p (Article)
10880 @kindex p (Article)
10881 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10882 command respects the @samp{print=} specifications in the
10883 @file{.mailcap} file.
10884
10885 @findex gnus-mime-inline-part
10886 @item i (Article)
10887 @kindex i (Article)
10888 Insert the contents of the @acronym{MIME} object into the buffer
10889 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10890 the raw contents without decoding.  If given a numerical prefix, you can
10891 do semi-manual charset stuff (see
10892 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
10893 Article}).
10894
10895 @findex gnus-mime-view-part-internally
10896 @item E (Article)
10897 @kindex E (Article)
10898 View the @acronym{MIME} object with an internal viewer.  If no internal
10899 viewer is available, use an external viewer
10900 (@code{gnus-mime-view-part-internally}).
10901
10902 @findex gnus-mime-view-part-externally
10903 @item e (Article)
10904 @kindex e (Article)
10905 View the @acronym{MIME} object with an external viewer.
10906 (@code{gnus-mime-view-part-externally}).
10907
10908 @findex gnus-mime-pipe-part
10909 @item | (Article)
10910 @kindex | (Article)
10911 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10912
10913 @findex gnus-mime-action-on-part
10914 @item . (Article)
10915 @kindex . (Article)
10916 Interactively run an action on the @acronym{MIME} object
10917 (@code{gnus-mime-action-on-part}).
10918
10919 @end table
10920
10921 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10922 determines which parts to do this with is described in the Emacs
10923 @acronym{MIME} manual.
10924
10925 It might be best to just use the toggling functions from the article
10926 buffer to avoid getting nasty surprises.  (For instance, you enter the
10927 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10928 decoded the sound file in the article and some horrible sing-a-long song
10929 comes screaming out your speakers, and you can't find the volume button,
10930 because there isn't one, and people are starting to look at you, and you
10931 try to stop the program, but you can't, and you can't find the program
10932 to control the volume, and everybody else in the room suddenly decides
10933 to look at you disdainfully, and you'll feel rather stupid.)
10934
10935 Any similarity to real events and people is purely coincidental.  Ahem.
10936
10937 Also @pxref{MIME Commands}.
10938
10939
10940 @node Customizing Articles
10941 @section Customizing Articles
10942 @cindex article customization
10943
10944 A slew of functions for customizing how the articles are to look like
10945 exist.  You can call these functions interactively
10946 (@pxref{Article Washing}), or you can have them
10947 called automatically when you select the articles.
10948
10949 To have them called automatically, you should set the corresponding
10950 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10951 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10952 be set, but first we discuss the values these variables can have.
10953
10954 Note: Some values, while valid, make little sense.  Check the list below
10955 for sensible values.
10956
10957 @enumerate
10958 @item
10959 @code{nil}: Don't do this treatment.
10960
10961 @item
10962 @code{t}: Do this treatment on all body parts.
10963
10964 @item
10965 @code{head}: Do the treatment on the headers.
10966
10967 @item
10968 @code{last}: Do this treatment on the last part.
10969
10970 @item
10971 An integer: Do this treatment on all body parts that have a length less
10972 than this number.
10973
10974 @item
10975 A list of strings: Do this treatment on all body parts that are in
10976 articles that are read in groups that have names that match one of the
10977 regexps in the list.
10978
10979 @item
10980 A list where the first element is not a string:
10981
10982 The list is evaluated recursively.  The first element of the list is a
10983 predicate.  The following predicates are recognized: @code{or},
10984 @code{and}, @code{not} and @code{typep}.  Here's an example:
10985
10986 @lisp
10987 (or last
10988     (typep "text/x-vcard"))
10989 @end lisp
10990
10991 @end enumerate
10992
10993 You may have noticed that the word @dfn{part} is used here.  This refers
10994 to the fact that some messages are @acronym{MIME} multipart articles that may
10995 be divided into several parts.  Articles that are not multiparts are
10996 considered to contain just a single part.
10997
10998 @vindex gnus-article-treat-types
10999 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11000 want to, but by default, only @samp{text/plain} parts are given the
11001 treatment.  This is controlled by the @code{gnus-article-treat-types}
11002 variable, which is a list of regular expressions that are matched to the
11003 type of the part.  This variable is ignored if the value of the
11004 controlling variable is a predicate list, as described above.
11005
11006 The following treatment options are available.  The easiest way to
11007 customize this is to examine the @code{gnus-article-treat} customization
11008 group.  Values in parenthesis are suggested sensible values.  Others are
11009 possible but those listed are probably sufficient for most people.
11010
11011 @table @code
11012 @item gnus-treat-buttonize (t, integer)
11013 @item gnus-treat-buttonize-head (head)
11014
11015 @xref{Article Buttons}.
11016
11017 @item gnus-treat-capitalize-sentences (t, integer)
11018 @item gnus-treat-overstrike (t, integer)
11019 @item gnus-treat-strip-cr (t, integer)
11020 @item gnus-treat-strip-headers-in-body (t, integer)
11021 @item gnus-treat-strip-leading-blank-lines (t, integer)
11022 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11023 @item gnus-treat-strip-pem (t, last, integer)
11024 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11025 @item gnus-treat-unsplit-urls (t, integer)
11026 @item gnus-treat-wash-html (t, integer)
11027
11028 @xref{Article Washing}.
11029
11030 @item gnus-treat-date-english (head)
11031 @item gnus-treat-date-iso8601 (head)
11032 @item gnus-treat-date-lapsed (head)
11033 @item gnus-treat-date-local (head)
11034 @item gnus-treat-date-original (head)
11035 @item gnus-treat-date-user-defined (head)
11036 @item gnus-treat-date-ut (head)
11037
11038 @xref{Article Date}.
11039
11040 @item gnus-treat-from-picon (head)
11041 @item gnus-treat-mail-picon (head)
11042 @item gnus-treat-newsgroups-picon (head)
11043
11044 @xref{Picons}.
11045
11046 @item gnus-treat-display-smileys (t, integer)
11047
11048 @item gnus-treat-body-boundary (head)
11049
11050 @vindex gnus-body-boundary-delimiter
11051 Adds a delimiter between header and body, the string used as delimiter
11052 is controlled by @code{gnus-body-boundary-delimiter}.
11053
11054 @xref{Smileys}.
11055
11056 @item gnus-treat-display-xface (head)
11057
11058 @xref{X-Face}.
11059
11060 @item gnus-treat-display-face (head)
11061
11062 @xref{Face}.
11063
11064 @item gnus-treat-emphasize (t, head, integer)
11065 @item gnus-treat-fill-article (t, integer)
11066 @item gnus-treat-fill-long-lines (t, integer)
11067 @item gnus-treat-hide-boring-headers (head)
11068 @item gnus-treat-hide-citation (t, integer)
11069 @item gnus-treat-hide-citation-maybe (t, integer)
11070 @item gnus-treat-hide-headers (head)
11071 @item gnus-treat-hide-signature (t, last)
11072 @item gnus-treat-strip-banner (t, last)
11073 @item gnus-treat-strip-list-identifiers (head)
11074
11075 @xref{Article Hiding}.
11076
11077 @item gnus-treat-highlight-citation (t, integer)
11078 @item gnus-treat-highlight-headers (head)
11079 @item gnus-treat-highlight-signature (t, last, integer)
11080
11081 @xref{Article Highlighting}.
11082
11083 @item gnus-treat-play-sounds
11084 @item gnus-treat-translate
11085 @item gnus-treat-x-pgp-sig (head)
11086
11087 @item gnus-treat-unfold-headers (head)
11088 @item gnus-treat-fold-headers (head)
11089 @item gnus-treat-fold-newsgroups (head)
11090 @item gnus-treat-leading-whitespace (head)
11091
11092 @xref{Article Header}.
11093
11094
11095 @end table
11096
11097 @vindex gnus-part-display-hook
11098 You can, of course, write your own functions to be called from
11099 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11100 part, and you can do anything you like, pretty much.  There is no
11101 information that you have to keep in the buffer---you can change
11102 everything.
11103
11104
11105 @node Article Keymap
11106 @section Article Keymap
11107
11108 Most of the keystrokes in the summary buffer can also be used in the
11109 article buffer.  They should behave as if you typed them in the summary
11110 buffer, which means that you don't actually have to have a summary
11111 buffer displayed while reading.  You can do it all from the article
11112 buffer.
11113
11114 A few additional keystrokes are available:
11115
11116 @table @kbd
11117
11118 @item SPACE
11119 @kindex SPACE (Article)
11120 @findex gnus-article-next-page
11121 Scroll forwards one page (@code{gnus-article-next-page}).
11122 This is exactly the same as @kbd{h SPACE h}.
11123
11124 @item DEL
11125 @kindex DEL (Article)
11126 @findex gnus-article-prev-page
11127 Scroll backwards one page (@code{gnus-article-prev-page}).
11128 This is exactly the same as @kbd{h DEL h}.
11129
11130 @item C-c ^
11131 @kindex C-c ^ (Article)
11132 @findex gnus-article-refer-article
11133 If point is in the neighborhood of a @code{Message-ID} and you press
11134 @kbd{C-c ^}, Gnus will try to get that article from the server
11135 (@code{gnus-article-refer-article}).
11136
11137 @item C-c C-m
11138 @kindex C-c C-m (Article)
11139 @findex gnus-article-mail
11140 Send a reply to the address near point (@code{gnus-article-mail}).  If
11141 given a prefix, include the mail.
11142
11143 @item s
11144 @kindex s (Article)
11145 @findex gnus-article-show-summary
11146 Reconfigure the buffers so that the summary buffer becomes visible
11147 (@code{gnus-article-show-summary}).
11148
11149 @item ?
11150 @kindex ? (Article)
11151 @findex gnus-article-describe-briefly
11152 Give a very brief description of the available keystrokes
11153 (@code{gnus-article-describe-briefly}).
11154
11155 @item TAB
11156 @kindex TAB (Article)
11157 @findex gnus-article-next-button
11158 Go to the next button, if any (@code{gnus-article-next-button}).  This
11159 only makes sense if you have buttonizing turned on.
11160
11161 @item M-TAB
11162 @kindex M-TAB (Article)
11163 @findex gnus-article-prev-button
11164 Go to the previous button, if any (@code{gnus-article-prev-button}).
11165
11166 @item R
11167 @kindex R (Article)
11168 @findex gnus-article-reply-with-original
11169 Send a reply to the current article and yank the current article
11170 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11171 wide reply.  If the region is active, only yank the text in the
11172 region.
11173
11174 @item F
11175 @kindex F (Article)
11176 @findex gnus-article-followup-with-original
11177 Send a followup to the current article and yank the current article
11178 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11179 a wide reply.  If the region is active, only yank the text in the
11180 region.
11181
11182
11183 @end table
11184
11185
11186 @node Misc Article
11187 @section Misc Article
11188
11189 @table @code
11190
11191 @item gnus-single-article-buffer
11192 @vindex gnus-single-article-buffer
11193 If non-@code{nil}, use the same article buffer for all the groups.
11194 (This is the default.)  If @code{nil}, each group will have its own
11195 article buffer.
11196
11197 @vindex gnus-article-decode-hook
11198 @item gnus-article-decode-hook
11199 @cindex @acronym{MIME}
11200 Hook used to decode @acronym{MIME} articles.  The default value is
11201 @code{(article-decode-charset article-decode-encoded-words)}
11202
11203 @vindex gnus-article-prepare-hook
11204 @item gnus-article-prepare-hook
11205 This hook is called right after the article has been inserted into the
11206 article buffer.  It is mainly intended for functions that do something
11207 depending on the contents; it should probably not be used for changing
11208 the contents of the article buffer.
11209
11210 @item gnus-article-mode-hook
11211 @vindex gnus-article-mode-hook
11212 Hook called in article mode buffers.
11213
11214 @item gnus-article-mode-syntax-table
11215 @vindex gnus-article-mode-syntax-table
11216 Syntax table used in article buffers.  It is initialized from
11217 @code{text-mode-syntax-table}.
11218
11219 @vindex gnus-article-over-scroll
11220 @item gnus-article-over-scroll
11221 If non-@code{nil}, allow scrolling the article buffer even when there
11222 no more new text to scroll in.  The default is @code{nil}.
11223
11224 @vindex gnus-article-mode-line-format
11225 @item gnus-article-mode-line-format
11226 This variable is a format string along the same lines as
11227 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11228 accepts the same format specifications as that variable, with two
11229 extensions:
11230
11231 @table @samp
11232
11233 @item w
11234 The @dfn{wash status} of the article.  This is a short string with one
11235 character for each possible article wash operation that may have been
11236 performed.  The characters and their meaning:
11237
11238 @table @samp
11239
11240 @item c
11241 Displayed when cited text may be hidden in the article buffer.
11242
11243 @item h
11244 Displayed when headers are hidden in the article buffer.
11245
11246 @item p
11247 Displayed when article is digitally signed or encrypted, and Gnus has
11248 hidden the security headers.  (N.B. does not tell anything about
11249 security status, i.e. good or bad signature.)
11250
11251 @item s
11252 Displayed when the signature has been hidden in the Article buffer.
11253
11254 @item o
11255 Displayed when Gnus has treated overstrike characters in the article buffer.
11256
11257 @item e
11258 Displayed when Gnus has treated emphasised strings in the article buffer.
11259
11260 @end table
11261
11262 @item m
11263 The number of @acronym{MIME} parts in the article.
11264
11265 @end table
11266
11267 @vindex gnus-break-pages
11268
11269 @item gnus-break-pages
11270 Controls whether @dfn{page breaking} is to take place.  If this variable
11271 is non-@code{nil}, the articles will be divided into pages whenever a
11272 page delimiter appears in the article.  If this variable is @code{nil},
11273 paging will not be done.
11274
11275 @item gnus-page-delimiter
11276 @vindex gnus-page-delimiter
11277 This is the delimiter mentioned above.  By default, it is @samp{^L}
11278 (formfeed).
11279
11280 @cindex IDNA
11281 @cindex internationalized domain names
11282 @vindex gnus-use-idna
11283 @item gnus-use-idna
11284 This variable controls whether Gnus performs IDNA decoding of
11285 internationalized domain names inside @samp{From}, @samp{To} and
11286 @samp{Cc} headers.  This requires
11287 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11288 variable is only enabled if you have installed it.
11289
11290 @end table
11291
11292
11293 @node Composing Messages
11294 @chapter Composing Messages
11295 @cindex composing messages
11296 @cindex messages
11297 @cindex mail
11298 @cindex sending mail
11299 @cindex reply
11300 @cindex followup
11301 @cindex post
11302 @cindex using gpg
11303 @cindex using s/mime
11304 @cindex using smime
11305
11306 @kindex C-c C-c (Post)
11307 All commands for posting and mailing will put you in a message buffer
11308 where you can edit the article all you like, before you send the
11309 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11310 Message Manual}.  Where the message will be posted/mailed to depends
11311 on your setup (@pxref{Posting Server}).
11312
11313 @menu
11314 * Mail::                        Mailing and replying.
11315 * Posting Server::              What server should you post and mail via?
11316 * Mail and Post::               Mailing and posting at the same time.
11317 * Archived Messages::           Where Gnus stores the messages you've sent.
11318 * Posting Styles::              An easier way to specify who you are.
11319 * Drafts::                      Postponing messages and rejected messages.
11320 * Rejected Articles::           What happens if the server doesn't like your article?
11321 * Signing and encrypting::      How to compose secure messages.
11322 @end menu
11323
11324 Also @pxref{Canceling and Superseding} for information on how to
11325 remove articles you shouldn't have posted.
11326
11327
11328 @node Mail
11329 @section Mail
11330
11331 Variables for customizing outgoing mail:
11332
11333 @table @code
11334 @item gnus-uu-digest-headers
11335 @vindex gnus-uu-digest-headers
11336 List of regexps to match headers included in digested messages.  The
11337 headers will be included in the sequence they are matched.  If
11338 @code{nil} include all headers.
11339
11340 @item gnus-add-to-list
11341 @vindex gnus-add-to-list
11342 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11343 that have none when you do a @kbd{a}.
11344
11345 @item gnus-confirm-mail-reply-to-news
11346 @vindex gnus-confirm-mail-reply-to-news
11347 This can also be a function receiving the group name as the only
11348 parameter which should return non-@code{nil} if a confirmation is
11349 needed, or a regular expression matching group names, where
11350 confirmation is should be asked for.
11351
11352 If you find yourself never wanting to reply to mail, but occasionally
11353 press R anyway, this variable might be for you.
11354
11355 @item gnus-confirm-treat-mail-like-news
11356 @vindex gnus-confirm-treat-mail-like-news
11357 If non-@code{nil}, Gnus also requests confirmation according to
11358 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11359 useful for treating mailing lists like newsgroups.
11360
11361 @end table
11362
11363
11364 @node Posting Server
11365 @section Posting Server
11366
11367 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11368 (extremely intelligent, of course) article, where does it go?
11369
11370 Thank you for asking.  I hate you.
11371
11372 It can be quite complicated.
11373
11374 @vindex gnus-post-method
11375 When posting news, Message usually invokes @code{message-send-news}
11376 (@pxref{News Variables, , News Variables, message, Message Manual}).
11377 Normally, Gnus will post using the same select method as you're
11378 reading from (which might be convenient if you're reading lots of
11379 groups from different private servers).  However.  If the server
11380 you're reading from doesn't allow posting, just reading, you probably
11381 want to use some other server to post your (extremely intelligent and
11382 fabulously interesting) articles.  You can then set the
11383 @code{gnus-post-method} to some other method:
11384
11385 @lisp
11386 (setq gnus-post-method '(nnspool ""))
11387 @end lisp
11388
11389 Now, if you've done this, and then this server rejects your article, or
11390 this server is down, what do you do then?  To override this variable you
11391 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11392 the ``current'' server, to get back the default behavior, for posting.
11393
11394 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11395 Gnus will prompt you for what method to use for posting.
11396
11397 You can also set @code{gnus-post-method} to a list of select methods.
11398 If that's the case, Gnus will always prompt you for what method to use
11399 for posting.
11400
11401 Finally, if you want to always post using the native select method,
11402 you can set this variable to @code{native}.
11403
11404 When sending mail, Message invokes @code{message-send-mail-function}.
11405 The default function, @code{message-send-mail-with-sendmail}, pipes
11406 your article to the @code{sendmail} binary for further queuing and
11407 sending.  When your local system is not configured for sending mail
11408 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11409 server, you can set @code{message-send-mail-function} to
11410 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11411 package correctly.  An example:
11412
11413 @lisp
11414 (setq message-send-mail-function 'smtpmail-send-it
11415       smtpmail-default-smtp-server "YOUR SMTP HOST")
11416 @end lisp
11417
11418 To the thing similar to this, there is
11419 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11420 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11421 documentation for the function @code{mail-source-touch-pop}.
11422
11423 Other possible choices for @code{message-send-mail-function} includes
11424 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11425 and @code{feedmail-send-it}.
11426
11427 @node Mail and Post
11428 @section Mail and Post
11429
11430 Here's a list of variables relevant to both mailing and
11431 posting:
11432
11433 @table @code
11434 @item gnus-mailing-list-groups
11435 @findex gnus-mailing-list-groups
11436 @cindex mailing lists
11437
11438 If your news server offers groups that are really mailing lists
11439 gatewayed to the @acronym{NNTP} server, you can read those groups without
11440 problems, but you can't post/followup to them without some difficulty.
11441 One solution is to add a @code{to-address} to the group parameters
11442 (@pxref{Group Parameters}).  An easier thing to do is set the
11443 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11444 really are mailing lists.  Then, at least, followups to the mailing
11445 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11446 still a pain, though.
11447
11448 @item gnus-user-agent
11449 @vindex gnus-user-agent
11450 @cindex User-Agent
11451
11452 This variable controls which information should be exposed in the
11453 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11454 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11455 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11456 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11457 system type) or a custom string.  If you set it to a string, be sure to
11458 use a valid format, see RFC 2616.
11459
11460 @end table
11461
11462 You may want to do spell-checking on messages that you send out.  Or, if
11463 you don't want to spell-check by hand, you could add automatic
11464 spell-checking via the @code{ispell} package:
11465
11466 @cindex ispell
11467 @findex ispell-message
11468 @lisp
11469 (add-hook 'message-send-hook 'ispell-message)
11470 @end lisp
11471
11472 If you want to change the @code{ispell} dictionary based on what group
11473 you're in, you could say something like the following:
11474
11475 @lisp
11476 (add-hook 'gnus-select-group-hook
11477           (lambda ()
11478             (cond
11479              ((string-match
11480                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11481               (ispell-change-dictionary "deutsch"))
11482              (t
11483               (ispell-change-dictionary "english")))))
11484 @end lisp
11485
11486 Modify to suit your needs.
11487
11488
11489 @node Archived Messages
11490 @section Archived Messages
11491 @cindex archived messages
11492 @cindex sent messages
11493
11494 Gnus provides a few different methods for storing the mail and news you
11495 send.  The default method is to use the @dfn{archive virtual server} to
11496 store the messages.  If you want to disable this completely, the
11497 @code{gnus-message-archive-group} variable should be @code{nil}, which
11498 is the default.
11499
11500 For archiving interesting messages in a group you read, see the
11501 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11502 Group Commands}).
11503
11504 @vindex gnus-message-archive-method
11505 @code{gnus-message-archive-method} says what virtual server Gnus is to
11506 use to store sent messages.  The default is:
11507
11508 @lisp
11509 (nnfolder "archive"
11510           (nnfolder-directory   "~/Mail/archive")
11511           (nnfolder-active-file "~/Mail/archive/active")
11512           (nnfolder-get-new-mail nil)
11513           (nnfolder-inhibit-expiry t))
11514 @end lisp
11515
11516 You can, however, use any mail select method (@code{nnml},
11517 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11518 for doing this sort of thing, though.  If you don't like the default
11519 directory chosen, you could say something like:
11520
11521 @lisp
11522 (setq gnus-message-archive-method
11523       '(nnfolder "archive"
11524                  (nnfolder-inhibit-expiry t)
11525                  (nnfolder-active-file "~/News/sent-mail/active")
11526                  (nnfolder-directory "~/News/sent-mail/")))
11527 @end lisp
11528
11529 @vindex gnus-message-archive-group
11530 @cindex Gcc
11531 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11532 to one or more group(s) on that server.  Which group to use is
11533 determined by the @code{gnus-message-archive-group} variable.
11534
11535 This variable can be used to do the following:
11536
11537 @itemize @bullet
11538 @item
11539 a string
11540 Messages will be saved in that group.
11541
11542 Note that you can include a select method in the group name, then the
11543 message will not be stored in the select method given by
11544 @code{gnus-message-archive-method}, but in the select method specified
11545 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11546 has the default value shown above.  Then setting
11547 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11548 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11549 value @code{"nnml:foo"}, then outgoing messages will be stored in
11550 @samp{nnml:foo}.
11551 @item
11552 a list of strings
11553 Messages will be saved in all those groups.
11554 @item
11555 an alist of regexps, functions and forms
11556 When a key ``matches'', the result is used.
11557 @item
11558 @code{nil}
11559 No message archiving will take place.  This is the default.
11560 @end itemize
11561
11562 Let's illustrate:
11563
11564 Just saving to a single group called @samp{MisK}:
11565 @lisp
11566 (setq gnus-message-archive-group "MisK")
11567 @end lisp
11568
11569 Saving to two groups, @samp{MisK} and @samp{safe}:
11570 @lisp
11571 (setq gnus-message-archive-group '("MisK" "safe"))
11572 @end lisp
11573
11574 Save to different groups based on what group you are in:
11575 @lisp
11576 (setq gnus-message-archive-group
11577       '(("^alt" "sent-to-alt")
11578         ("mail" "sent-to-mail")
11579         (".*" "sent-to-misc")))
11580 @end lisp
11581
11582 More complex stuff:
11583 @lisp
11584 (setq gnus-message-archive-group
11585       '((if (message-news-p)
11586             "misc-news"
11587           "misc-mail")))
11588 @end lisp
11589
11590 How about storing all news messages in one file, but storing all mail
11591 messages in one file per month:
11592
11593 @lisp
11594 (setq gnus-message-archive-group
11595       '((if (message-news-p)
11596             "misc-news"
11597           (concat "mail." (format-time-string "%Y-%m")))))
11598 @end lisp
11599
11600 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11601 @c use a different value for @code{gnus-message-archive-group} there.)
11602
11603 Now, when you send a message off, it will be stored in the appropriate
11604 group.  (If you want to disable storing for just one particular message,
11605 you can just remove the @code{Gcc} header that has been inserted.)  The
11606 archive group will appear in the group buffer the next time you start
11607 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11608 enter it and read the articles in it just like you'd read any other
11609 group.  If the group gets really big and annoying, you can simply rename
11610 if (using @kbd{G r} in the group buffer) to something
11611 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11612 continue to be stored in the old (now empty) group.
11613
11614 That's the default method of archiving sent messages.  Gnus offers a
11615 different way for the people who don't like the default method.  In that
11616 case you should set @code{gnus-message-archive-group} to @code{nil};
11617 this will disable archiving.
11618
11619 @table @code
11620 @item gnus-outgoing-message-group
11621 @vindex gnus-outgoing-message-group
11622 All outgoing messages will be put in this group.  If you want to store
11623 all your outgoing mail and articles in the group @samp{nnml:archive},
11624 you set this variable to that value.  This variable can also be a list of
11625 group names.
11626
11627 If you want to have greater control over what group to put each
11628 message in, you can set this variable to a function that checks the
11629 current newsgroup name and then returns a suitable group name (or list
11630 of names).
11631
11632 This variable can be used instead of @code{gnus-message-archive-group},
11633 but the latter is the preferred method.
11634
11635 @item gnus-gcc-mark-as-read
11636 @vindex gnus-gcc-mark-as-read
11637 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11638
11639 @item gnus-gcc-externalize-attachments
11640 @vindex gnus-gcc-externalize-attachments
11641 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11642 and matches the Gcc group name, attach files as external parts; if it is
11643 @code{all}, attach local files as external parts; if it is other
11644 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11645 changed in the future.
11646
11647 @end table
11648
11649
11650 @node Posting Styles
11651 @section Posting Styles
11652 @cindex posting styles
11653 @cindex styles
11654
11655 All them variables, they make my head swim.
11656
11657 So what if you want a different @code{Organization} and signature based
11658 on what groups you post to?  And you post both from your home machine
11659 and your work machine, and you want different @code{From} lines, and so
11660 on?
11661
11662 @vindex gnus-posting-styles
11663 One way to do stuff like that is to write clever hooks that change the
11664 variables you need to have changed.  That's a bit boring, so somebody
11665 came up with the bright idea of letting the user specify these things in
11666 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11667 variable:
11668
11669 @lisp
11670 ((".*"
11671   (signature "Peace and happiness")
11672   (organization "What me?"))
11673  ("^comp"
11674   (signature "Death to everybody"))
11675  ("comp.emacs.i-love-it"
11676   (organization "Emacs is it")))
11677 @end lisp
11678
11679 As you might surmise from this example, this alist consists of several
11680 @dfn{styles}.  Each style will be applicable if the first element
11681 ``matches'', in some form or other.  The entire alist will be iterated
11682 over, from the beginning towards the end, and each match will be
11683 applied, which means that attributes in later styles that match override
11684 the same attributes in earlier matching styles.  So
11685 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11686 signature and the @samp{What me?} @code{Organization} header.
11687
11688 The first element in each style is called the @code{match}.  If it's a
11689 string, then Gnus will try to regexp match it against the group name.
11690 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11691 will look in the original article for a header whose name is
11692 @var{match} and compare that @var{regexp}.  @var{match} and
11693 @var{regexp} are strings.  (There original article is the one you are
11694 replying or following up to.  If you are not composing a reply or a
11695 followup, then there is nothing to match against.)  If the
11696 @code{match} is a function symbol, that function will be called with
11697 no arguments.  If it's a variable symbol, then the variable will be
11698 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11699 any case, if this returns a non-@code{nil} value, then the style is
11700 said to @dfn{match}.
11701
11702 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11703 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11704 attribute name can be one of @code{signature}, @code{signature-file},
11705 @code{x-face-file}, @code{address} (overriding
11706 @code{user-mail-address}), @code{name} (overriding
11707 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11708 be a string or a symbol.  In that case, this will be used as a header
11709 name, and the value will be inserted in the headers of the article; if
11710 the value is @code{nil}, the header name will be removed.  If the
11711 attribute name is @code{eval}, the form is evaluated, and the result
11712 is thrown away.
11713
11714 The attribute value can be a string (used verbatim), a function with
11715 zero arguments (the return value will be used), a variable (its value
11716 will be used) or a list (it will be @code{eval}ed and the return value
11717 will be used).  The functions and sexps are called/@code{eval}ed in the
11718 message buffer that is being set up.  The headers of the current article
11719 are available through the @code{message-reply-headers} variable, which
11720 is a vector of the following headers: number subject from date id
11721 references chars lines xref extra.
11722
11723 @vindex message-reply-headers
11724
11725 If you wish to check whether the message you are about to compose is
11726 meant to be a news article or a mail message, you can check the values
11727 of the @code{message-news-p} and @code{message-mail-p} functions.
11728
11729 @findex message-mail-p
11730 @findex message-news-p
11731
11732 So here's a new example:
11733
11734 @lisp
11735 (setq gnus-posting-styles
11736       '((".*"
11737          (signature-file "~/.signature")
11738          (name "User Name")
11739          ("X-Home-Page" (getenv "WWW_HOME"))
11740          (organization "People's Front Against MWM"))
11741         ("^rec.humor"
11742          (signature my-funny-signature-randomizer))
11743         ((equal (system-name) "gnarly")  ;; @r{A form}
11744          (signature my-quote-randomizer))
11745         (message-news-p        ;; @r{A function symbol}
11746          (signature my-news-signature))
11747         (window-system         ;; @r{A value symbol}
11748          ("X-Window-System" (format "%s" window-system)))
11749         ;; @r{If I'm replying to Larsi, set the Organization header.}
11750         ((header "from" "larsi.*org")
11751          (Organization "Somewhere, Inc."))
11752         ((posting-from-work-p) ;; @r{A user defined function}
11753          (signature-file "~/.work-signature")
11754          (address "user@@bar.foo")
11755          (body "You are fired.\n\nSincerely, your boss.")
11756          (organization "Important Work, Inc"))
11757         ("nnml:.*"
11758          (From (save-excursion
11759                  (set-buffer gnus-article-buffer)
11760                  (message-fetch-field "to"))))
11761         ("^nn.+:"
11762          (signature-file "~/.mail-signature"))))
11763 @end lisp
11764
11765 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11766 @code{From} address in all your outgoing replies, which might be handy
11767 if you fill many roles.
11768
11769
11770 @node Drafts
11771 @section Drafts
11772 @cindex drafts
11773
11774 If you are writing a message (mail or news) and suddenly remember that
11775 you have a steak in the oven (or some pesto in the food processor, you
11776 craaazy vegetarians), you'll probably wish there was a method to save
11777 the message you are writing so that you can continue editing it some
11778 other day, and send it when you feel its finished.
11779
11780 Well, don't worry about it.  Whenever you start composing a message of
11781 some sort using the Gnus mail and post commands, the buffer you get will
11782 automatically associate to an article in a special @dfn{draft} group.
11783 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11784 article will be saved there.  (Auto-save files also go to the draft
11785 group.)
11786
11787 @cindex nndraft
11788 @vindex nndraft-directory
11789 The draft group is a special group (which is implemented as an
11790 @code{nndraft} group, if you absolutely have to know) called
11791 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11792 @code{nndraft} is to store its files.  What makes this group special is
11793 that you can't tick any articles in it or mark any articles as
11794 read---all articles in the group are permanently unread.
11795
11796 If the group doesn't exist, it will be created and you'll be subscribed
11797 to it.  The only way to make it disappear from the Group buffer is to
11798 unsubscribe it.  The special properties of the draft group comes from
11799 a group property (@pxref{Group Parameters}), and if lost the group
11800 behaves like any other group.  This means the commands below will not
11801 be available.  To restore the special properties of the group, the
11802 simplest way is to kill the group, using @kbd{C-k}, and restart
11803 Gnus.  The group is automatically created again with the
11804 correct parameters.  The content of the group is not lost.
11805
11806 @c @findex gnus-dissociate-buffer-from-draft
11807 @c @kindex C-c M-d (Mail)
11808 @c @kindex C-c M-d (Post)
11809 @c @findex gnus-associate-buffer-with-draft
11810 @c @kindex C-c C-d (Mail)
11811 @c @kindex C-c C-d (Post)
11812 @c If you're writing some super-secret message that you later want to
11813 @c encode with PGP before sending, you may wish to turn the auto-saving
11814 @c (and association with the draft group) off.  You never know who might be
11815 @c interested in reading all your extremely valuable and terribly horrible
11816 @c and interesting secrets.  The @kbd{C-c M-d}
11817 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11818 @c If you change your mind and want to turn the auto-saving back on again,
11819 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11820 @c
11821 @c @vindex gnus-use-draft
11822 @c To leave association with the draft group off by default, set
11823 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11824
11825 @findex gnus-draft-edit-message
11826 @kindex D e (Draft)
11827 When you want to continue editing the article, you simply enter the
11828 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11829 that.  You will be placed in a buffer where you left off.
11830
11831 Rejected articles will also be put in this draft group (@pxref{Rejected
11832 Articles}).
11833
11834 @findex gnus-draft-send-all-messages
11835 @kindex D s (Draft)
11836 @findex gnus-draft-send-message
11837 @kindex D S (Draft)
11838 If you have lots of rejected messages you want to post (or mail) without
11839 doing further editing, you can use the @kbd{D s} command
11840 (@code{gnus-draft-send-message}).  This command understands the
11841 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11842 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11843 in the buffer.
11844
11845 @findex gnus-draft-toggle-sending
11846 @kindex D t (Draft)
11847 If you have some messages that you wish not to send, you can use the
11848 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11849 as unsendable.  This is a toggling command.
11850
11851
11852 @node Rejected Articles
11853 @section Rejected Articles
11854 @cindex rejected articles
11855
11856 Sometimes a news server will reject an article.  Perhaps the server
11857 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11858 @emph{there be demons}.  Perhaps you have included too much cited text.
11859 Perhaps the disk is full.  Perhaps the server is down.
11860
11861 These situations are, of course, totally beyond the control of Gnus.
11862 (Gnus, of course, loves the way you look, always feels great, has angels
11863 fluttering around inside of it, doesn't care about how much cited text
11864 you include, never runs full and never goes down.)  So Gnus saves these
11865 articles until some later time when the server feels better.
11866
11867 The rejected articles will automatically be put in a special draft group
11868 (@pxref{Drafts}).  When the server comes back up again, you'd then
11869 typically enter that group and send all the articles off.
11870
11871 @node Signing and encrypting
11872 @section Signing and encrypting
11873 @cindex using gpg
11874 @cindex using s/mime
11875 @cindex using smime
11876
11877 Gnus can digitally sign and encrypt your messages, using vanilla
11878 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11879 decoding such messages, see the @code{mm-verify-option} and
11880 @code{mm-decrypt-option} options (@pxref{Security}).
11881
11882 @vindex gnus-message-replysign
11883 @vindex gnus-message-replyencrypt
11884 @vindex gnus-message-replysignencrypted
11885 Often, you would like to sign replies to people who send you signed
11886 messages.  Even more often, you might want to encrypt messages which
11887 are in reply to encrypted messages.  Gnus offers
11888 @code{gnus-message-replysign} to enable the former, and
11889 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11890 @code{gnus-message-replysignencrypted} (on by default) will sign
11891 automatically encrypted messages.
11892
11893 Instructing MML to perform security operations on a @acronym{MIME} part is
11894 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11895 C-m c} key map for encryption, as follows.
11896
11897 @table @kbd
11898
11899 @item C-c C-m s s
11900 @kindex C-c C-m s s
11901 @findex mml-secure-message-sign-smime
11902
11903 Digitally sign current message using @acronym{S/MIME}.
11904
11905 @item C-c C-m s o
11906 @kindex C-c C-m s o
11907 @findex mml-secure-message-sign-pgp
11908
11909 Digitally sign current message using @acronym{PGP}.
11910
11911 @item C-c C-m s p
11912 @kindex C-c C-m s p
11913 @findex mml-secure-message-sign-pgp
11914
11915 Digitally sign current message using @acronym{PGP/MIME}.
11916
11917 @item C-c C-m c s
11918 @kindex C-c C-m c s
11919 @findex mml-secure-message-encrypt-smime
11920
11921 Digitally encrypt current message using @acronym{S/MIME}.
11922
11923 @item C-c C-m c o
11924 @kindex C-c C-m c o
11925 @findex mml-secure-message-encrypt-pgp
11926
11927 Digitally encrypt current message using @acronym{PGP}.
11928
11929 @item C-c C-m c p
11930 @kindex C-c C-m c p
11931 @findex mml-secure-message-encrypt-pgpmime
11932
11933 Digitally encrypt current message using @acronym{PGP/MIME}.
11934
11935 @item C-c C-m C-n
11936 @kindex C-c C-m C-n
11937 @findex mml-unsecure-message
11938 Remove security related MML tags from message.
11939
11940 @end table
11941
11942 @xref{Security, ,Security, message, Message Manual}, for more information.
11943
11944 @node Select Methods
11945 @chapter Select Methods
11946 @cindex foreign groups
11947 @cindex select methods
11948
11949 A @dfn{foreign group} is a group not read by the usual (or
11950 default) means.  It could be, for instance, a group from a different
11951 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11952 personal mail group.
11953
11954 A foreign group (or any group, really) is specified by a @dfn{name} and
11955 a @dfn{select method}.  To take the latter first, a select method is a
11956 list where the first element says what back end to use (e.g. @code{nntp},
11957 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11958 name}.  There may be additional elements in the select method, where the
11959 value may have special meaning for the back end in question.
11960
11961 One could say that a select method defines a @dfn{virtual server}---so
11962 we do just that (@pxref{Server Buffer}).
11963
11964 The @dfn{name} of the group is the name the back end will recognize the
11965 group as.
11966
11967 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11968 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11969 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11970 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11971 back end just knows this group as @samp{soc.motss}.
11972
11973 The different methods all have their peculiarities, of course.
11974
11975 @menu
11976 * Server Buffer::               Making and editing virtual servers.
11977 * Getting News::                Reading USENET news with Gnus.
11978 * Getting Mail::                Reading your personal mail with Gnus.
11979 * Browsing the Web::            Getting messages from a plethora of Web sources.
11980 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11981 * Other Sources::               Reading directories, files, SOUP packets.
11982 * Combined Groups::             Combining groups into one group.
11983 * Gnus Unplugged::              Reading news and mail offline.
11984 @end menu
11985
11986
11987 @node Server Buffer
11988 @section Server Buffer
11989
11990 Traditionally, a @dfn{server} is a machine or a piece of software that
11991 one connects to, and then requests information from.  Gnus does not
11992 connect directly to any real servers, but does all transactions through
11993 one back end or other.  But that's just putting one layer more between
11994 the actual media and Gnus, so we might just as well say that each
11995 back end represents a virtual server.
11996
11997 For instance, the @code{nntp} back end may be used to connect to several
11998 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11999 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12000 use, and what parameters to set by specifying a @dfn{select method}.
12001
12002 These select method specifications can sometimes become quite
12003 complicated---say, for instance, that you want to read from the
12004 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12005 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12006 Anyway, if you had to specify that for each group that used this
12007 server, that would be too much work, so Gnus offers a way of naming
12008 select methods, which is what you do in the server buffer.
12009
12010 To enter the server buffer, use the @kbd{^}
12011 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12012
12013 @menu
12014 * Server Buffer Format::        You can customize the look of this buffer.
12015 * Server Commands::             Commands to manipulate servers.
12016 * Example Methods::             Examples server specifications.
12017 * Creating a Virtual Server::   An example session.
12018 * Server Variables::            Which variables to set.
12019 * Servers and Methods::         You can use server names as select methods.
12020 * Unavailable Servers::         Some servers you try to contact may be down.
12021 @end menu
12022
12023 @vindex gnus-server-mode-hook
12024 @code{gnus-server-mode-hook} is run when creating the server buffer.
12025
12026
12027 @node Server Buffer Format
12028 @subsection Server Buffer Format
12029 @cindex server buffer format
12030
12031 @vindex gnus-server-line-format
12032 You can change the look of the server buffer lines by changing the
12033 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12034 variable, with some simple extensions:
12035
12036 @table @samp
12037
12038 @item h
12039 How the news is fetched---the back end name.
12040
12041 @item n
12042 The name of this server.
12043
12044 @item w
12045 Where the news is to be fetched from---the address.
12046
12047 @item s
12048 The opened/closed/denied status of the server.
12049 @end table
12050
12051 @vindex gnus-server-mode-line-format
12052 The mode line can also be customized by using the
12053 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12054 Formatting}).  The following specs are understood:
12055
12056 @table @samp
12057 @item S
12058 Server name.
12059
12060 @item M
12061 Server method.
12062 @end table
12063
12064 Also @pxref{Formatting Variables}.
12065
12066
12067 @node Server Commands
12068 @subsection Server Commands
12069 @cindex server commands
12070
12071 @table @kbd
12072
12073 @item a
12074 @kindex a (Server)
12075 @findex gnus-server-add-server
12076 Add a new server (@code{gnus-server-add-server}).
12077
12078 @item e
12079 @kindex e (Server)
12080 @findex gnus-server-edit-server
12081 Edit a server (@code{gnus-server-edit-server}).
12082
12083 @item SPACE
12084 @kindex SPACE (Server)
12085 @findex gnus-server-read-server
12086 Browse the current server (@code{gnus-server-read-server}).
12087
12088 @item q
12089 @kindex q (Server)
12090 @findex gnus-server-exit
12091 Return to the group buffer (@code{gnus-server-exit}).
12092
12093 @item k
12094 @kindex k (Server)
12095 @findex gnus-server-kill-server
12096 Kill the current server (@code{gnus-server-kill-server}).
12097
12098 @item y
12099 @kindex y (Server)
12100 @findex gnus-server-yank-server
12101 Yank the previously killed server (@code{gnus-server-yank-server}).
12102
12103 @item c
12104 @kindex c (Server)
12105 @findex gnus-server-copy-server
12106 Copy the current server (@code{gnus-server-copy-server}).
12107
12108 @item l
12109 @kindex l (Server)
12110 @findex gnus-server-list-servers
12111 List all servers (@code{gnus-server-list-servers}).
12112
12113 @item s
12114 @kindex s (Server)
12115 @findex gnus-server-scan-server
12116 Request that the server scan its sources for new articles
12117 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12118 servers.
12119
12120 @item g
12121 @kindex g (Server)
12122 @findex gnus-server-regenerate-server
12123 Request that the server regenerate all its data structures
12124 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12125 a mail back end that has gotten out of sync.
12126
12127 @end table
12128
12129
12130 @node Example Methods
12131 @subsection Example Methods
12132
12133 Most select methods are pretty simple and self-explanatory:
12134
12135 @lisp
12136 (nntp "news.funet.fi")
12137 @end lisp
12138
12139 Reading directly from the spool is even simpler:
12140
12141 @lisp
12142 (nnspool "")
12143 @end lisp
12144
12145 As you can see, the first element in a select method is the name of the
12146 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12147 will.
12148
12149 After these two elements, there may be an arbitrary number of
12150 @code{(@var{variable} @var{form})} pairs.
12151
12152 To go back to the first example---imagine that you want to read from
12153 port 15 on that machine.  This is what the select method should
12154 look like then:
12155
12156 @lisp
12157 (nntp "news.funet.fi" (nntp-port-number 15))
12158 @end lisp
12159
12160 You should read the documentation to each back end to find out what
12161 variables are relevant, but here's an @code{nnmh} example:
12162
12163 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12164 you have two structures that you wish to access: One is your private
12165 mail spool, and the other is a public one.  Here's the possible spec for
12166 your private mail:
12167
12168 @lisp
12169 (nnmh "private" (nnmh-directory "~/private/mail/"))
12170 @end lisp
12171
12172 (This server is then called @samp{private}, but you may have guessed
12173 that.)
12174
12175 Here's the method for a public spool:
12176
12177 @lisp
12178 (nnmh "public"
12179       (nnmh-directory "/usr/information/spool/")
12180       (nnmh-get-new-mail nil))
12181 @end lisp
12182
12183 @cindex proxy
12184 @cindex firewall
12185
12186 If you are behind a firewall and only have access to the @acronym{NNTP}
12187 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12188 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12189 Doing this can be rather fiddly, but your virtual server definition
12190 should probably look something like this:
12191
12192 @lisp
12193 (nntp "firewall"
12194       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12195       (nntp-via-address "the.firewall.machine")
12196       (nntp-address "the.real.nntp.host")
12197       (nntp-end-of-line "\n"))
12198 @end lisp
12199
12200 If you want to use the wonderful @code{ssh} program to provide a
12201 compressed connection over the modem line, you could add the following
12202 configuration to the example above:
12203
12204 @lisp
12205       (nntp-via-rlogin-command "ssh")
12206 @end lisp
12207
12208 See also @code{nntp-via-rlogin-command-switches}.
12209
12210 If you're behind a firewall, but have direct access to the outside world
12211 through a wrapper command like "runsocks", you could open a socksified
12212 telnet connection to the news server as follows:
12213
12214 @lisp
12215 (nntp "outside"
12216       (nntp-pre-command "runsocks")
12217       (nntp-open-connection-function nntp-open-via-telnet)
12218       (nntp-address "the.news.server")
12219       (nntp-end-of-line "\n"))
12220 @end lisp
12221
12222 This means that you have to have set up @code{ssh-agent} correctly to
12223 provide automatic authorization, of course.  And to get a compressed
12224 connection, you have to have the @samp{Compression} option in the
12225 @code{ssh} @file{config} file.
12226
12227
12228 @node Creating a Virtual Server
12229 @subsection Creating a Virtual Server
12230
12231 If you're saving lots of articles in the cache by using persistent
12232 articles, you may want to create a virtual server to read the cache.
12233
12234 First you need to add a new server.  The @kbd{a} command does that.  It
12235 would probably be best to use @code{nnspool} to read the cache.  You
12236 could also use @code{nnml} or @code{nnmh}, though.
12237
12238 Type @kbd{a nnspool RET cache RET}.
12239
12240 You should now have a brand new @code{nnspool} virtual server called
12241 @samp{cache}.  You now need to edit it to have the right definitions.
12242 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12243 will contain the following:
12244
12245 @lisp
12246 (nnspool "cache")
12247 @end lisp
12248
12249 Change that to:
12250
12251 @lisp
12252 (nnspool "cache"
12253          (nnspool-spool-directory "~/News/cache/")
12254          (nnspool-nov-directory "~/News/cache/")
12255          (nnspool-active-file "~/News/cache/active"))
12256 @end lisp
12257
12258 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12259 @kbd{RET} over this virtual server, you should be entered into a browse
12260 buffer, and you should be able to enter any of the groups displayed.
12261
12262
12263 @node Server Variables
12264 @subsection Server Variables
12265 @cindex server variables
12266 @cindex server parameters
12267
12268 One sticky point when defining variables (both on back ends and in Emacs
12269 in general) is that some variables are typically initialized from other
12270 variables when the definition of the variables is being loaded.  If you
12271 change the ``base'' variable after the variables have been loaded, you
12272 won't change the ``derived'' variables.
12273
12274 This typically affects directory and file variables.  For instance,
12275 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12276 directory variables are initialized from that variable, so
12277 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12278 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12279 @code{nnml-directory}---you have to explicitly set all the file
12280 variables to be what you want them to be.  For a complete list of
12281 variables for each back end, see each back end's section later in this
12282 manual, but here's an example @code{nnml} definition:
12283
12284 @lisp
12285 (nnml "public"
12286       (nnml-directory "~/my-mail/")
12287       (nnml-active-file "~/my-mail/active")
12288       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12289 @end lisp
12290
12291 Server variables are often called @dfn{server parameters}.
12292
12293 @node Servers and Methods
12294 @subsection Servers and Methods
12295
12296 Wherever you would normally use a select method
12297 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12298 when browsing a foreign server) you can use a virtual server name
12299 instead.  This could potentially save lots of typing.  And it's nice all
12300 over.
12301
12302
12303 @node Unavailable Servers
12304 @subsection Unavailable Servers
12305
12306 If a server seems to be unreachable, Gnus will mark that server as
12307 @code{denied}.  That means that any subsequent attempt to make contact
12308 with that server will just be ignored.  ``It can't be opened,'' Gnus
12309 will tell you, without making the least effort to see whether that is
12310 actually the case or not.
12311
12312 That might seem quite naughty, but it does make sense most of the time.
12313 Let's say you have 10 groups subscribed to on server
12314 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12315 away from you and the machine is quite slow, so it takes 1 minute just
12316 to find out that it refuses connection to you today.  If Gnus were to
12317 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12318 attempt to do that.  Once it has gotten a single ``connection refused'',
12319 it will regard that server as ``down''.
12320
12321 So, what happens if the machine was only feeling unwell temporarily?
12322 How do you test to see whether the machine has come up again?
12323
12324 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12325 with the following commands:
12326
12327 @table @kbd
12328
12329 @item O
12330 @kindex O (Server)
12331 @findex gnus-server-open-server
12332 Try to establish connection to the server on the current line
12333 (@code{gnus-server-open-server}).
12334
12335 @item C
12336 @kindex C (Server)
12337 @findex gnus-server-close-server
12338 Close the connection (if any) to the server
12339 (@code{gnus-server-close-server}).
12340
12341 @item D
12342 @kindex D (Server)
12343 @findex gnus-server-deny-server
12344 Mark the current server as unreachable
12345 (@code{gnus-server-deny-server}).
12346
12347 @item M-o
12348 @kindex M-o (Server)
12349 @findex gnus-server-open-all-servers
12350 Open the connections to all servers in the buffer
12351 (@code{gnus-server-open-all-servers}).
12352
12353 @item M-c
12354 @kindex M-c (Server)
12355 @findex gnus-server-close-all-servers
12356 Close the connections to all servers in the buffer
12357 (@code{gnus-server-close-all-servers}).
12358
12359 @item R
12360 @kindex R (Server)
12361 @findex gnus-server-remove-denials
12362 Remove all marks to whether Gnus was denied connection from any servers
12363 (@code{gnus-server-remove-denials}).
12364
12365 @item L
12366 @kindex L (Server)
12367 @findex gnus-server-offline-server
12368 Set server status to offline (@code{gnus-server-offline-server}).
12369
12370 @end table
12371
12372
12373 @node Getting News
12374 @section Getting News
12375 @cindex reading news
12376 @cindex news back ends
12377
12378 A newsreader is normally used for reading news.  Gnus currently provides
12379 only two methods of getting news---it can read from an @acronym{NNTP} server,
12380 or it can read from a local spool.
12381
12382 @menu
12383 * NNTP::                        Reading news from an @acronym{NNTP} server.
12384 * News Spool::                  Reading news from the local spool.
12385 @end menu
12386
12387
12388 @node NNTP
12389 @subsection NNTP
12390 @cindex nntp
12391
12392 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12393 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12394 server as the, uhm, address.
12395
12396 If the @acronym{NNTP} server is located at a non-standard port, setting the
12397 third element of the select method to this port number should allow you
12398 to connect to the right port.  You'll have to edit the group info for
12399 that (@pxref{Foreign Groups}).
12400
12401 The name of the foreign group can be the same as a native group.  In
12402 fact, you can subscribe to the same group from as many different servers
12403 you feel like.  There will be no name collisions.
12404
12405 The following variables can be used to create a virtual @code{nntp}
12406 server:
12407
12408 @table @code
12409
12410 @item nntp-server-opened-hook
12411 @vindex nntp-server-opened-hook
12412 @cindex @sc{mode reader}
12413 @cindex authinfo
12414 @cindex authentification
12415 @cindex nntp authentification
12416 @findex nntp-send-authinfo
12417 @findex nntp-send-mode-reader
12418 is run after a connection has been made.  It can be used to send
12419 commands to the @acronym{NNTP} server after it has been contacted.  By
12420 default it sends the command @code{MODE READER} to the server with the
12421 @code{nntp-send-mode-reader} function.  This function should always be
12422 present in this hook.
12423
12424 @item nntp-authinfo-function
12425 @vindex nntp-authinfo-function
12426 @findex nntp-send-authinfo
12427 @vindex nntp-authinfo-file
12428 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12429 server.  The default function is @code{nntp-send-authinfo}, which looks
12430 through your @file{~/.authinfo} (or whatever you've set the
12431 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12432 are found, it will prompt you for a login name and a password.  The
12433 format of the @file{~/.authinfo} file is (almost) the same as the
12434 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12435 manual page, but here are the salient facts:
12436
12437 @enumerate
12438 @item
12439 The file contains one or more line, each of which define one server.
12440
12441 @item
12442 Each line may contain an arbitrary number of token/value pairs.
12443
12444 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12445 @samp{default}.  In addition Gnus introduces two new tokens, not present
12446 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12447 @samp{force}.  (This is the only way the @file{.authinfo} file format
12448 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12449 indicate what port on the server the credentials apply to and
12450 @samp{force} is explained below.
12451
12452 @end enumerate
12453
12454 Here's an example file:
12455
12456 @example
12457 machine news.uio.no login larsi password geheimnis
12458 machine nntp.ifi.uio.no login larsi force yes
12459 @end example
12460
12461 The token/value pairs may appear in any order; @samp{machine} doesn't
12462 have to be first, for instance.
12463
12464 In this example, both login name and password have been supplied for the
12465 former server, while the latter has only the login name listed, and the
12466 user will be prompted for the password.  The latter also has the
12467 @samp{force} tag, which means that the authinfo will be sent to the
12468 @var{nntp} server upon connection; the default (i.e., when there is not
12469 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12470 until the @var{nntp} server asks for it.
12471
12472 You can also add @samp{default} lines that will apply to all servers
12473 that don't have matching @samp{machine} lines.
12474
12475 @example
12476 default force yes
12477 @end example
12478
12479 This will force sending @samp{AUTHINFO} commands to all servers not
12480 previously mentioned.
12481
12482 Remember to not leave the @file{~/.authinfo} file world-readable.
12483
12484 @item nntp-server-action-alist
12485 @vindex nntp-server-action-alist
12486 This is a list of regexps to match on server types and actions to be
12487 taken when matches are made.  For instance, if you want Gnus to beep
12488 every time you connect to innd, you could say something like:
12489
12490 @lisp
12491 (setq nntp-server-action-alist
12492       '(("innd" (ding))))
12493 @end lisp
12494
12495 You probably don't want to do that, though.
12496
12497 The default value is
12498
12499 @lisp
12500 '(("nntpd 1\\.5\\.11t"
12501    (remove-hook 'nntp-server-opened-hook
12502                 'nntp-send-mode-reader)))
12503 @end lisp
12504
12505 This ensures that Gnus doesn't send the @code{MODE READER} command to
12506 nntpd 1.5.11t, since that command chokes that server, I've been told.
12507
12508 @item nntp-maximum-request
12509 @vindex nntp-maximum-request
12510 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12511 will collect headers by sending a series of @code{head} commands.  To
12512 speed things up, the back end sends lots of these commands without
12513 waiting for reply, and then reads all the replies.  This is controlled
12514 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12515 your network is buggy, you should set this to 1.
12516
12517 @item nntp-connection-timeout
12518 @vindex nntp-connection-timeout
12519 If you have lots of foreign @code{nntp} groups that you connect to
12520 regularly, you're sure to have problems with @acronym{NNTP} servers not
12521 responding properly, or being too loaded to reply within reasonable
12522 time.  This is can lead to awkward problems, which can be helped
12523 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12524 that says how many seconds the @code{nntp} back end should wait for a
12525 connection before giving up.  If it is @code{nil}, which is the default,
12526 no timeouts are done.
12527
12528 @c @item nntp-command-timeout
12529 @c @vindex nntp-command-timeout
12530 @c @cindex PPP connections
12531 @c @cindex dynamic IP addresses
12532 @c If you're running Gnus on a machine that has a dynamically assigned
12533 @c address, Gnus may become confused.  If the address of your machine
12534 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12535 @c waiting forever for replies from the server.  To help with this
12536 @c unfortunate problem, you can set this command to a number.  Gnus will
12537 @c then, if it sits waiting for a reply from the server longer than that
12538 @c number of seconds, shut down the connection, start a new one, and resend
12539 @c the command.  This should hopefully be transparent to the user.  A
12540 @c likely number is 30 seconds.
12541 @c
12542 @c @item nntp-retry-on-break
12543 @c @vindex nntp-retry-on-break
12544 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12545 @c hangs.  This will have much the same effect as the command timeout
12546 @c described above.
12547
12548 @item nntp-server-hook
12549 @vindex nntp-server-hook
12550 This hook is run as the last step when connecting to an @acronym{NNTP}
12551 server.
12552
12553 @item nntp-buggy-select
12554 @vindex nntp-buggy-select
12555 Set this to non-@code{nil} if your select routine is buggy.
12556
12557 @item nntp-nov-is-evil
12558 @vindex nntp-nov-is-evil
12559 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12560 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12561 can be used.
12562
12563 @item nntp-xover-commands
12564 @vindex nntp-xover-commands
12565 @cindex @acronym{NOV}
12566 @cindex XOVER
12567 List of strings used as commands to fetch @acronym{NOV} lines from a
12568 server.  The default value of this variable is @code{("XOVER"
12569 "XOVERVIEW")}.
12570
12571 @item nntp-nov-gap
12572 @vindex nntp-nov-gap
12573 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12574 the server.  The server responds with one huge list of lines.  However,
12575 if you have read articles 2-5000 in the group, and only want to read
12576 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12577 lines that you will not need.  This variable says how
12578 big a gap between two consecutive articles is allowed to be before the
12579 @code{XOVER} request is split into several request.  Note that if your
12580 network is fast, setting this variable to a really small number means
12581 that fetching will probably be slower.  If this variable is @code{nil},
12582 @code{nntp} will never split requests.  The default is 5.
12583
12584 @item nntp-prepare-server-hook
12585 @vindex nntp-prepare-server-hook
12586 A hook run before attempting to connect to an @acronym{NNTP} server.
12587
12588 @item nntp-warn-about-losing-connection
12589 @vindex nntp-warn-about-losing-connection
12590 If this variable is non-@code{nil}, some noise will be made when a
12591 server closes connection.
12592
12593 @item nntp-record-commands
12594 @vindex nntp-record-commands
12595 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12596 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12597 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12598 that doesn't seem to work.
12599
12600 @item nntp-open-connection-function
12601 @vindex nntp-open-connection-function
12602 It is possible to customize how the connection to the nntp server will
12603 be opened.  If you specify an @code{nntp-open-connection-function}
12604 parameter, Gnus will use that function to establish the connection.
12605 Five pre-made functions are supplied.  These functions can be grouped in
12606 two categories: direct connection functions (three pre-made), and
12607 indirect ones (two pre-made).
12608
12609 @item nntp-prepare-post-hook
12610 @vindex nntp-prepare-post-hook
12611 A hook run just before posting an article.  If there is no
12612 @code{Message-ID} header in the article and the news server provides the
12613 recommended ID, it will be added to the article before running this
12614 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12615 inhibit Gnus to add a @code{Message-ID} header, you could say:
12616
12617 @lisp
12618 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12619 @end lisp
12620
12621 Note that not all servers support the recommended ID.  This works for
12622 INN versions 2.3.0 and later, for instance.
12623
12624 @item nntp-read-timeout
12625 @vindex nntp-read-timeout
12626 How long nntp should wait between checking for the end of output.
12627 Shorter values mean quicker response, but is more CPU intensive.  The
12628 default is 0.1 seconds.  If you have a slow line to the server (and
12629 don't like to see Emacs eat your available CPU power), you might set
12630 this to, say, 1.
12631
12632 @end table
12633
12634 @menu
12635 * Direct Functions::            Connecting directly to the server.
12636 * Indirect Functions::          Connecting indirectly to the server.
12637 * Common Variables::            Understood by several connection functions.
12638 @end menu
12639
12640
12641 @node Direct Functions
12642 @subsubsection Direct Functions
12643 @cindex direct connection functions
12644
12645 These functions are called direct because they open a direct connection
12646 between your machine and the @acronym{NNTP} server.  The behavior of these
12647 functions is also affected by commonly understood variables
12648 (@pxref{Common Variables}).
12649
12650 @table @code
12651 @findex nntp-open-network-stream
12652 @item nntp-open-network-stream
12653 This is the default, and simply connects to some port or other on the
12654 remote system.
12655
12656 @findex nntp-open-tls-stream
12657 @item nntp-open-tls-stream
12658 Opens a connection to a server over a @dfn{secure} channel.  To use
12659 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12660 installed.  You then define a server as follows:
12661
12662 @lisp
12663 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12664 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12665 ;;
12666 (nntp "snews.bar.com"
12667       (nntp-open-connection-function nntp-open-tls-stream)
12668       (nntp-port-number )
12669       (nntp-address "snews.bar.com"))
12670 @end lisp
12671
12672 @findex nntp-open-ssl-stream
12673 @item nntp-open-ssl-stream
12674 Opens a connection to a server over a @dfn{secure} channel.  To use
12675 this you must have @uref{http://www.openssl.org, OpenSSL} or
12676 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12677 then define a server as follows:
12678
12679 @lisp
12680 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12681 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12682 ;;
12683 (nntp "snews.bar.com"
12684       (nntp-open-connection-function nntp-open-ssl-stream)
12685       (nntp-port-number 563)
12686       (nntp-address "snews.bar.com"))
12687 @end lisp
12688
12689 @findex nntp-open-telnet-stream
12690 @item nntp-open-telnet-stream
12691 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12692 it.  You might wonder why this function exists, since we have the
12693 default @code{nntp-open-network-stream} which would do the job.  (One
12694 of) the reason(s) is that if you are behind a firewall but have direct
12695 connections to the outside world thanks to a command wrapper like
12696 @code{runsocks}, you can use it like this:
12697
12698 @lisp
12699 (nntp "socksified"
12700       (nntp-pre-command "runsocks")
12701       (nntp-open-connection-function nntp-open-telnet-stream)
12702       (nntp-address "the.news.server"))
12703 @end lisp
12704
12705 With the default method, you would need to wrap your whole Emacs
12706 session, which is not a good idea.
12707 @end table
12708
12709
12710 @node Indirect Functions
12711 @subsubsection Indirect Functions
12712 @cindex indirect connection functions
12713
12714 These functions are called indirect because they connect to an
12715 intermediate host before actually connecting to the @acronym{NNTP} server.
12716 All of these functions and related variables are also said to belong to
12717 the ``via'' family of connection: they're all prefixed with ``via'' to make
12718 things cleaner.  The behavior of these functions is also affected by
12719 commonly understood variables (@pxref{Common Variables}).
12720
12721 @table @code
12722 @item nntp-open-via-rlogin-and-telnet
12723 @findex nntp-open-via-rlogin-and-telnet
12724 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12725 to the real @acronym{NNTP} server from there.  This is useful for instance if
12726 you need to connect to a firewall machine first.
12727
12728 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12729
12730 @table @code
12731 @item nntp-via-rlogin-command
12732 @vindex nntp-via-rlogin-command
12733 Command used to log in on the intermediate host.  The default is
12734 @samp{rsh}, but @samp{ssh} is a popular alternative.
12735
12736 @item nntp-via-rlogin-command-switches
12737 @vindex nntp-via-rlogin-command-switches
12738 List of strings to be used as the switches to
12739 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12740 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12741 @samp{("-C")} in order to compress all data connections, otherwise set
12742 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12743 the telnet command requires a pseudo-tty allocation on an intermediate
12744 host.
12745 @end table
12746
12747 @item nntp-open-via-telnet-and-telnet
12748 @findex nntp-open-via-telnet-and-telnet
12749 Does essentially the same, but uses @samp{telnet} instead of
12750 @samp{rlogin} to connect to the intermediate host.
12751
12752 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12753
12754 @table @code
12755 @item nntp-via-telnet-command
12756 @vindex nntp-via-telnet-command
12757 Command used to @code{telnet} the intermediate host.  The default is
12758 @samp{telnet}.
12759
12760 @item nntp-via-telnet-switches
12761 @vindex nntp-via-telnet-switches
12762 List of strings to be used as the switches to the
12763 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12764
12765 @item nntp-via-user-password
12766 @vindex nntp-via-user-password
12767 Password to use when logging in on the intermediate host.
12768
12769 @item nntp-via-envuser
12770 @vindex nntp-via-envuser
12771 If non-@code{nil}, the intermediate @code{telnet} session (client and
12772 server both) will support the @code{ENVIRON} option and not prompt for
12773 login name.  This works for Solaris @code{telnet}, for instance.
12774
12775 @item nntp-via-shell-prompt
12776 @vindex nntp-via-shell-prompt
12777 Regexp matching the shell prompt on the intermediate host.  The default
12778 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12779
12780 @end table
12781
12782 @end table
12783
12784
12785 Here are some additional variables that are understood by all the above
12786 functions:
12787
12788 @table @code
12789
12790 @item nntp-via-user-name
12791 @vindex nntp-via-user-name
12792 User name to use when connecting to the intermediate host.
12793
12794 @item nntp-via-address
12795 @vindex nntp-via-address
12796 Address of the intermediate host to connect to.
12797
12798 @end table
12799
12800
12801 @node Common Variables
12802 @subsubsection Common Variables
12803
12804 The following variables affect the behavior of all, or several of the
12805 pre-made connection functions.  When not specified, all functions are
12806 affected.
12807
12808 @table @code
12809
12810 @item nntp-pre-command
12811 @vindex nntp-pre-command
12812 A command wrapper to use when connecting through a non native
12813 connection function (all except @code{nntp-open-network-stream},
12814 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12815 where you would put a @samp{SOCKS} wrapper for instance.
12816
12817 @item nntp-address
12818 @vindex nntp-address
12819 The address of the @acronym{NNTP} server.
12820
12821 @item nntp-port-number
12822 @vindex nntp-port-number
12823 Port number to connect to the @acronym{NNTP} server.  The default is
12824 @samp{nntp}.  If you use @acronym{NNTP} over
12825 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12826 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12827 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12828 not work with named ports.
12829
12830 @item nntp-end-of-line
12831 @vindex nntp-end-of-line
12832 String to use as end-of-line marker when talking to the @acronym{NNTP}
12833 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12834 using a non native connection function.
12835
12836 @item nntp-telnet-command
12837 @vindex nntp-telnet-command
12838 Command to use when connecting to the @acronym{NNTP} server through
12839 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12840 just for the real @acronym{NNTP} server.  The default is
12841 @samp{telnet}.
12842
12843 @item nntp-telnet-switches
12844 @vindex nntp-telnet-switches
12845 A list of switches to pass to @code{nntp-telnet-command}.  The default
12846 is @samp{("-8")}.
12847
12848 @end table
12849
12850
12851 @node News Spool
12852 @subsection News Spool
12853 @cindex nnspool
12854 @cindex news spool
12855
12856 Subscribing to a foreign group from the local spool is extremely easy,
12857 and might be useful, for instance, to speed up reading groups that
12858 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12859 instance.
12860
12861 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12862 anything else) as the address.
12863
12864 If you have access to a local spool, you should probably use that as the
12865 native select method (@pxref{Finding the News}).  It is normally faster
12866 than using an @code{nntp} select method, but might not be.  It depends.
12867 You just have to try to find out what's best at your site.
12868
12869 @table @code
12870
12871 @item nnspool-inews-program
12872 @vindex nnspool-inews-program
12873 Program used to post an article.
12874
12875 @item nnspool-inews-switches
12876 @vindex nnspool-inews-switches
12877 Parameters given to the inews program when posting an article.
12878
12879 @item nnspool-spool-directory
12880 @vindex nnspool-spool-directory
12881 Where @code{nnspool} looks for the articles.  This is normally
12882 @file{/usr/spool/news/}.
12883
12884 @item nnspool-nov-directory
12885 @vindex nnspool-nov-directory
12886 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12887 @file{/usr/spool/news/over.view/}.
12888
12889 @item nnspool-lib-dir
12890 @vindex nnspool-lib-dir
12891 Where the news lib dir is (@file{/usr/lib/news/} by default).
12892
12893 @item nnspool-active-file
12894 @vindex nnspool-active-file
12895 The name of the active file.
12896
12897 @item nnspool-newsgroups-file
12898 @vindex nnspool-newsgroups-file
12899 The name of the group descriptions file.
12900
12901 @item nnspool-history-file
12902 @vindex nnspool-history-file
12903 The name of the news history file.
12904
12905 @item nnspool-active-times-file
12906 @vindex nnspool-active-times-file
12907 The name of the active date file.
12908
12909 @item nnspool-nov-is-evil
12910 @vindex nnspool-nov-is-evil
12911 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12912 that it finds.
12913
12914 @item nnspool-sift-nov-with-sed
12915 @vindex nnspool-sift-nov-with-sed
12916 @cindex sed
12917 If non-@code{nil}, which is the default, use @code{sed} to get the
12918 relevant portion from the overview file.  If @code{nil},
12919 @code{nnspool} will load the entire file into a buffer and process it
12920 there.
12921
12922 @end table
12923
12924
12925 @node Getting Mail
12926 @section Getting Mail
12927 @cindex reading mail
12928 @cindex mail
12929
12930 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12931 course.
12932
12933 @menu
12934 * Mail in a Newsreader::        Important introductory notes.
12935 * Getting Started Reading Mail::  A simple cookbook example.
12936 * Splitting Mail::              How to create mail groups.
12937 * Mail Sources::                How to tell Gnus where to get mail from.
12938 * Mail Back End Variables::     Variables for customizing mail handling.
12939 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12940 * Group Mail Splitting::        Use group customize to drive mail splitting.
12941 * Incorporating Old Mail::      What about the old mail you have?
12942 * Expiring Mail::               Getting rid of unwanted mail.
12943 * Washing Mail::                Removing cruft from the mail you get.
12944 * Duplicates::                  Dealing with duplicated mail.
12945 * Not Reading Mail::            Using mail back ends for reading other files.
12946 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12947 @end menu
12948
12949
12950 @node Mail in a Newsreader
12951 @subsection Mail in a Newsreader
12952
12953 If you are used to traditional mail readers, but have decided to switch
12954 to reading mail with Gnus, you may find yourself experiencing something
12955 of a culture shock.
12956
12957 Gnus does not behave like traditional mail readers.  If you want to make
12958 it behave that way, you can, but it's an uphill battle.
12959
12960 Gnus, by default, handles all its groups using the same approach.  This
12961 approach is very newsreaderly---you enter a group, see the new/unread
12962 messages, and when you read the messages, they get marked as read, and
12963 you don't see them any more.  (Unless you explicitly ask for them.)
12964
12965 In particular, you do not do anything explicitly to delete messages.
12966
12967 Does this mean that all the messages that have been marked as read are
12968 deleted?  How awful!
12969
12970 But, no, it means that old messages are @dfn{expired} according to some
12971 scheme or other.  For news messages, the expire process is controlled by
12972 the news administrator; for mail, the expire process is controlled by
12973 you.  The expire process for mail is covered in depth in @ref{Expiring
12974 Mail}.
12975
12976 What many Gnus users find, after using it a while for both news and
12977 mail, is that the transport mechanism has very little to do with how
12978 they want to treat a message.
12979
12980 Many people subscribe to several mailing lists.  These are transported
12981 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12982 answering, or even reading these messages very carefully.  We may not
12983 need to save them because if we should need to read one again, they are
12984 archived somewhere else.
12985
12986 Some people have local news groups which have only a handful of readers.
12987 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12988 to read and answer a large fraction of the messages very carefully in
12989 order to do our work.  And there may not be an archive, so we may need
12990 to save the interesting messages the same way we would personal mail.
12991
12992 The important distinction turns out to be not the transport mechanism,
12993 but other factors such as how interested we are in the subject matter,
12994 or how easy it is to retrieve the message if we need to read it again.
12995
12996 Gnus provides many options for sorting mail into ``groups'' which behave
12997 like newsgroups, and for treating each group (whether mail or news)
12998 differently.
12999
13000 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13001 that Gnus should grow up and be a male, er, mail reader.  It is possible
13002 to whip Gnus into a more mailreaderly being, but, as said before, it's
13003 not easy.  People who prefer proper mail readers should try @sc{vm}
13004 instead, which is an excellent, and proper, mail reader.
13005
13006 I don't mean to scare anybody off, but I want to make it clear that you
13007 may be required to learn a new way of thinking about messages.  After
13008 you've been subjected to The Gnus Way, you will come to love it.  I can
13009 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13010 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13011 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13012 You Do.)
13013
13014
13015 @node Getting Started Reading Mail
13016 @subsection Getting Started Reading Mail
13017
13018 It's quite easy to use Gnus to read your new mail.  You just plonk the
13019 mail back end of your choice into @code{gnus-secondary-select-methods},
13020 and things will happen automatically.
13021
13022 For instance, if you want to use @code{nnml} (which is a ``one file per
13023 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13024
13025 @lisp
13026 (setq gnus-secondary-select-methods '((nnml "")))
13027 @end lisp
13028
13029 Now, the next time you start Gnus, this back end will be queried for new
13030 articles, and it will move all the messages in your spool file to its
13031 directory, which is @file{~/Mail/} by default.  The new group that will
13032 be created (@samp{mail.misc}) will be subscribed, and you can read it
13033 like any other group.
13034
13035 You will probably want to split the mail into several groups, though:
13036
13037 @lisp
13038 (setq nnmail-split-methods
13039       '(("junk" "^From:.*Lars Ingebrigtsen")
13040         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13041         ("other" "")))
13042 @end lisp
13043
13044 This will result in three new @code{nnml} mail groups being created:
13045 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13046 mail that doesn't fit into the first two groups will be placed in the
13047 last group.
13048
13049 This should be sufficient for reading mail with Gnus.  You might want to
13050 give the other sections in this part of the manual a perusal, though.
13051 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13052
13053
13054 @node Splitting Mail
13055 @subsection Splitting Mail
13056 @cindex splitting mail
13057 @cindex mail splitting
13058 @cindex mail filtering (splitting)
13059
13060 @vindex nnmail-split-methods
13061 The @code{nnmail-split-methods} variable says how the incoming mail is
13062 to be split into groups.
13063
13064 @lisp
13065 (setq nnmail-split-methods
13066   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13067     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13068     ("mail.other" "")))
13069 @end lisp
13070
13071 This variable is a list of lists, where the first element of each of
13072 these lists is the name of the mail group (they do not have to be called
13073 something beginning with @samp{mail}, by the way), and the second
13074 element is a regular expression used on the header of each mail to
13075 determine if it belongs in this mail group.  The first string may
13076 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13077 insert sub-expressions from the matched text.  For instance:
13078
13079 @lisp
13080 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13081 @end lisp
13082
13083 The second element can also be a function.  In that case, it will be
13084 called narrowed to the headers with the first element of the rule as the
13085 argument.  It should return a non-@code{nil} value if it thinks that the
13086 mail belongs in that group.
13087
13088 The last of these groups should always be a general one, and the regular
13089 expression should @emph{always} be @samp{*} so that it matches any mails
13090 that haven't been matched by any of the other regexps.  (These rules are
13091 processed from the beginning of the alist toward the end.  The first
13092 rule to make a match will ``win'', unless you have crossposting enabled.
13093 In that case, all matching rules will ``win''.)
13094
13095 If you like to tinker with this yourself, you can set this variable to a
13096 function of your choice.  This function will be called without any
13097 arguments in a buffer narrowed to the headers of an incoming mail
13098 message.  The function should return a list of group names that it
13099 thinks should carry this mail message.
13100
13101 Note that the mail back ends are free to maul the poor, innocent,
13102 incoming headers all they want to.  They all add @code{Lines} headers;
13103 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13104 @code{From<SPACE>} line to something else.
13105
13106 @vindex nnmail-crosspost
13107 The mail back ends all support cross-posting.  If several regexps match,
13108 the mail will be ``cross-posted'' to all those groups.
13109 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13110 that no articles are crossposted to the general (@samp{*}) group.
13111
13112 @vindex nnmail-crosspost-link-function
13113 @cindex crosspost
13114 @cindex links
13115 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13116 the crossposted articles.  However, not all file systems support hard
13117 links.  If that's the case for you, set
13118 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13119 variable is @code{add-name-to-file} by default.)
13120
13121 @kindex M-x nnmail-split-history
13122 @findex nnmail-split-history
13123 If you wish to see where the previous mail split put the messages, you
13124 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13125 where re-spooling messages would put the messages, you can use
13126 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13127 Group Commands}).
13128
13129 @vindex nnmail-split-header-length-limit
13130 Header lines longer than the value of
13131 @code{nnmail-split-header-length-limit} are excluded from the split
13132 function.
13133
13134 @vindex nnmail-mail-splitting-charset
13135 @vindex nnmail-mail-splitting-decodes
13136 By default the splitting codes @acronym{MIME} decodes headers so you
13137 can match on non-@acronym{ASCII} strings.  The
13138 @code{nnmail-mail-splitting-charset} variable specifies the default
13139 charset for decoding.  The behaviour can be turned off completely by
13140 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13141 useful if you want to match articles based on the raw header data.
13142
13143 @vindex nnmail-resplit-incoming
13144 By default, splitting is performed on all incoming messages.  If you
13145 specify a @code{directory} entry for the variable @code{mail-sources}
13146 (@pxref{Mail Source Specifiers}), however, then splitting does
13147 @emph{not} happen by default.  You can set the variable
13148 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13149 splitting happen even in this case.  (This variable has no effect on
13150 other kinds of entries.)
13151
13152 Gnus gives you all the opportunity you could possibly want for shooting
13153 yourself in the foot.  Let's say you create a group that will contain
13154 all the mail you get from your boss.  And then you accidentally
13155 unsubscribe from the group.  Gnus will still put all the mail from your
13156 boss in the unsubscribed group, and so, when your boss mails you ``Have
13157 that report ready by Monday or you're fired!'', you'll never see it and,
13158 come Tuesday, you'll still believe that you're gainfully employed while
13159 you really should be out collecting empty bottles to save up for next
13160 month's rent money.
13161
13162
13163 @node Mail Sources
13164 @subsection Mail Sources
13165
13166 Mail can be gotten from many different sources---the mail spool, from
13167 a @acronym{POP} mail server, from a procmail directory, or from a
13168 maildir, for instance.
13169
13170 @menu
13171 * Mail Source Specifiers::      How to specify what a mail source is.
13172 * Mail Source Customization::   Some variables that influence things.
13173 * Fetching Mail::               Using the mail source specifiers.
13174 @end menu
13175
13176
13177 @node Mail Source Specifiers
13178 @subsubsection Mail Source Specifiers
13179 @cindex POP
13180 @cindex mail server
13181 @cindex procmail
13182 @cindex mail spool
13183 @cindex mail source
13184
13185 You tell Gnus how to fetch mail by setting @code{mail-sources}
13186 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13187
13188 Here's an example:
13189
13190 @lisp
13191 (pop :server "pop3.mailserver.com" :user "myname")
13192 @end lisp
13193
13194 As can be observed, a mail source specifier is a list where the first
13195 element is a @dfn{mail source type}, followed by an arbitrary number of
13196 @dfn{keywords}.  Keywords that are not explicitly specified are given
13197 default values.
13198
13199 The following mail source types are available:
13200
13201 @table @code
13202 @item file
13203 Get mail from a single file; typically from the mail spool.
13204
13205 Keywords:
13206
13207 @table @code
13208 @item :path
13209 The file name.  Defaults to the value of the @env{MAIL}
13210 environment variable or the value of @code{rmail-spool-directory}
13211 (usually something like @file{/usr/mail/spool/user-name}).
13212
13213 @item :prescript
13214 @itemx :postscript
13215 Script run before/after fetching mail.
13216 @end table
13217
13218 An example file mail source:
13219
13220 @lisp
13221 (file :path "/usr/spool/mail/user-name")
13222 @end lisp
13223
13224 Or using the default file name:
13225
13226 @lisp
13227 (file)
13228 @end lisp
13229
13230 If the mail spool file is not located on the local machine, it's best
13231 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13232 You can not use ange-ftp file names here---it has no way to lock the
13233 mail spool while moving the mail.
13234
13235 If it's impossible to set up a proper server, you can use ssh instead.
13236
13237 @lisp
13238 (setq mail-sources
13239       '((file :prescript "ssh host bin/getmail >%t")))
13240 @end lisp
13241
13242 The @samp{getmail} script would look something like the following:
13243
13244 @example
13245 #!/bin/sh
13246 #  getmail - move mail from spool to stdout
13247 #  flu@@iki.fi
13248
13249 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13250 TMP=$HOME/Mail/tmp
13251 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13252 @end example
13253
13254 Alter this script to fit find the @samp{movemail} you want to use.
13255
13256
13257 @item directory
13258 @vindex nnmail-scan-directory-mail-source-once
13259 Get mail from several files in a directory.  This is typically used
13260 when you have procmail split the incoming mail into several files.
13261 That is, there is a one-to-one correspondence between files in that
13262 directory and groups, so that mail from the file @file{foo.bar.spool}
13263 will be put in the group @code{foo.bar}.  (You can change the suffix
13264 to be used instead of @code{.spool}.)  Setting
13265 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13266 Gnus to scan the mail source only once.  This is particularly useful
13267 if you want to scan mail groups at a specified level.
13268
13269 @vindex nnmail-resplit-incoming
13270 There is also the variable @code{nnmail-resplit-incoming}, if you set
13271 that to a non-@code{nil} value, then the normal splitting process is
13272 applied to all the files from the directory, @ref{Splitting Mail}.
13273
13274 Keywords:
13275
13276 @table @code
13277 @item :path
13278 The name of the directory where the files are.  There is no default
13279 value.
13280
13281 @item :suffix
13282 Only files ending with this suffix are used.  The default is
13283 @samp{.spool}.
13284
13285 @item :predicate
13286 Only files that have this predicate return non-@code{nil} are returned.
13287 The default is @code{identity}.  This is used as an additional
13288 filter---only files that have the right suffix @emph{and} satisfy this
13289 predicate are considered.
13290
13291 @item :prescript
13292 @itemx :postscript
13293 Script run before/after fetching mail.
13294
13295 @end table
13296
13297 An example directory mail source:
13298
13299 @lisp
13300 (directory :path "/home/user-name/procmail-dir/"
13301            :suffix ".prcml")
13302 @end lisp
13303
13304 @item pop
13305 Get mail from a @acronym{POP} server.
13306
13307 Keywords:
13308
13309 @table @code
13310 @item :server
13311 The name of the @acronym{POP} server.  The default is taken from the
13312 @env{MAILHOST} environment variable.
13313
13314 @item :port
13315 The port number of the @acronym{POP} server.  This can be a number (eg,
13316 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13317 string, it should be a service name as listed in @file{/etc/services} on
13318 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13319 need to specify it as @samp{"pop-3"} instead.
13320
13321 @item :user
13322 The user name to give to the @acronym{POP} server.  The default is the login
13323 name.
13324
13325 @item :password
13326 The password to give to the @acronym{POP} server.  If not specified,
13327 the user is prompted.
13328
13329 @item :program
13330 The program to use to fetch mail from the @acronym{POP} server.  This
13331 should be a @code{format}-like string.  Here's an example:
13332
13333 @example
13334 fetchmail %u@@%s -P %p %t
13335 @end example
13336
13337 The valid format specifier characters are:
13338
13339 @table @samp
13340 @item t
13341 The name of the file the mail is to be moved to.  This must always be
13342 included in this string.
13343
13344 @item s
13345 The name of the server.
13346
13347 @item P
13348 The port number of the server.
13349
13350 @item u
13351 The user name to use.
13352
13353 @item p
13354 The password to use.
13355 @end table
13356
13357 The values used for these specs are taken from the values you give the
13358 corresponding keywords.
13359
13360 @item :prescript
13361 A script to be run before fetching the mail.  The syntax is the same as
13362 the @code{:program} keyword.  This can also be a function to be run.
13363
13364 @item :postscript
13365 A script to be run after fetching the mail.  The syntax is the same as
13366 the @code{:program} keyword.  This can also be a function to be run.
13367
13368 @item :function
13369 The function to use to fetch mail from the @acronym{POP} server.  The
13370 function is called with one parameter---the name of the file where the
13371 mail should be moved to.
13372
13373 @item :authentication
13374 This can be either the symbol @code{password} or the symbol @code{apop}
13375 and says what authentication scheme to use.  The default is
13376 @code{password}.
13377
13378 @end table
13379
13380 If the @code{:program} and @code{:function} keywords aren't specified,
13381 @code{pop3-movemail} will be used.
13382
13383 Here are some examples.  Fetch from the default @acronym{POP} server,
13384 using the default user name, and default fetcher:
13385
13386 @lisp
13387 (pop)
13388 @end lisp
13389
13390 Fetch from a named server with a named user and password:
13391
13392 @lisp
13393 (pop :server "my.pop.server"
13394      :user "user-name" :password "secret")
13395 @end lisp
13396
13397 Use @samp{movemail} to move the mail:
13398
13399 @lisp
13400 (pop :program "movemail po:%u %t %p")
13401 @end lisp
13402
13403 @item maildir
13404 Get mail from a maildir.  This is a type of mailbox that is supported by
13405 at least qmail and postfix, where each file in a special directory
13406 contains exactly one mail.
13407
13408 Keywords:
13409
13410 @table @code
13411 @item :path
13412 The name of the directory where the mails are stored.  The default is
13413 taken from the @env{MAILDIR} environment variable or
13414 @file{~/Maildir/}.
13415 @item :subdirs
13416 The subdirectories of the Maildir.  The default is
13417 @samp{("new" "cur")}.
13418
13419 @c If you sometimes look at your mail through a pop3 daemon before fetching
13420 @c them with Gnus, you may also have to fetch your mails from the
13421 @c @code{cur} directory inside the maildir, like in the first example
13422 @c below.
13423
13424 You can also get mails from remote hosts (because maildirs don't suffer
13425 from locking problems).
13426
13427 @end table
13428
13429 Two example maildir mail sources:
13430
13431 @lisp
13432 (maildir :path "/home/user-name/Maildir/"
13433          :subdirs ("cur" "new"))
13434 @end lisp
13435
13436 @lisp
13437 (maildir :path "/user@@remotehost.org:~/Maildir/"
13438          :subdirs ("new"))
13439 @end lisp
13440
13441 @item imap
13442 Get mail from a @acronym{IMAP} server.  If you don't want to use
13443 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13444 with nnimap), for some reason or other, Gnus let you treat it similar
13445 to a @acronym{POP} server and fetches articles from a given
13446 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13447
13448 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13449 may need external programs and libraries, @xref{IMAP}.
13450
13451 Keywords:
13452
13453 @table @code
13454 @item :server
13455 The name of the @acronym{IMAP} server.  The default is taken from the
13456 @env{MAILHOST} environment variable.
13457
13458 @item :port
13459 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13460 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13461
13462 @item :user
13463 The user name to give to the @acronym{IMAP} server.  The default is the login
13464 name.
13465
13466 @item :password
13467 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13468 prompted.
13469
13470 @item :stream
13471 What stream to use for connecting to the server, this is one of the
13472 symbols in @code{imap-stream-alist}.  Right now, this means
13473 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13474 @samp{ssl}, @samp{shell} or the default @samp{network}.
13475
13476 @item :authentication
13477 Which authenticator to use for authenticating to the server, this is
13478 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13479 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13480 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13481
13482 @item :program
13483 When using the `shell' :stream, the contents of this variable is
13484 mapped into the @code{imap-shell-program} variable.  This should be a
13485 @code{format}-like string (or list of strings).  Here's an example:
13486
13487 @example
13488 ssh %s imapd
13489 @end example
13490
13491 The valid format specifier characters are:
13492
13493 @table @samp
13494 @item s
13495 The name of the server.
13496
13497 @item l
13498 User name from @code{imap-default-user}.
13499
13500 @item p
13501 The port number of the server.
13502 @end table
13503
13504 The values used for these specs are taken from the values you give the
13505 corresponding keywords.
13506
13507 @item :mailbox
13508 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13509 which normally is the mailbox which receive incoming mail.
13510
13511 @item :predicate
13512 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13513 UNDELETED}, is probably the best choice for most people, but if you
13514 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13515 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13516 Then all articles in the mailbox is fetched, no matter what.  For a
13517 complete list of predicates, see RFC 2060 section 6.4.4.
13518
13519 @item :fetchflag
13520 How to flag fetched articles on the server, the default @samp{\Deleted}
13521 will mark them as deleted, an alternative would be @samp{\Seen} which
13522 would simply mark them as read.  These are the two most likely choices,
13523 but more flags are defined in RFC 2060 section 2.3.2.
13524
13525 @item :dontexpunge
13526 If non-@code{nil}, don't remove all articles marked as deleted in the
13527 mailbox after finishing the fetch.
13528
13529 @end table
13530
13531 An example @acronym{IMAP} mail source:
13532
13533 @lisp
13534 (imap :server "mail.mycorp.com"
13535       :stream kerberos4
13536       :fetchflag "\\Seen")
13537 @end lisp
13538
13539 @item webmail
13540 Get mail from a webmail server, such as @uref{www.hotmail.com},
13541 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13542 @uref{mail.yahoo.com}.
13543
13544 NOTE: Webmail largely depends cookies.  A "one-line-cookie" patch is
13545 required for url "4.0pre.46".
13546
13547 WARNING: Mails may be lost.  NO WARRANTY.
13548
13549 Keywords:
13550
13551 @table @code
13552 @item :subtype
13553 The type of the webmail server.  The default is @code{hotmail}.  The
13554 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13555
13556 @item :user
13557 The user name to give to the webmail server.  The default is the login
13558 name.
13559
13560 @item :password
13561 The password to give to the webmail server.  If not specified, the user is
13562 prompted.
13563
13564 @item :dontexpunge
13565 If non-@code{nil}, only fetch unread articles and don't move them to
13566 trash folder after finishing the fetch.
13567
13568 @end table
13569
13570 An example webmail source:
13571
13572 @lisp
13573 (webmail :subtype 'hotmail
13574          :user "user-name"
13575          :password "secret")
13576 @end lisp
13577 @end table
13578
13579 @table @dfn
13580 @item Common Keywords
13581 Common keywords can be used in any type of mail source.
13582
13583 Keywords:
13584
13585 @table @code
13586 @item :plugged
13587 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13588 use directory source to get mail, you can specify it as in this
13589 example:
13590
13591 @lisp
13592 (setq mail-sources
13593       '((directory :path "/home/pavel/.Spool/"
13594                    :suffix ""
13595                    :plugged t)))
13596 @end lisp
13597
13598 Gnus will then fetch your mail even when you are unplugged.  This is
13599 useful when you use local mail and news.
13600
13601 @end table
13602 @end table
13603
13604 @subsubsection Function Interface
13605
13606 Some of the above keywords specify a Lisp function to be executed.
13607 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13608 the value of the keyword while the function is executing.  For example,
13609 consider the following mail-source setting:
13610
13611 @lisp
13612 (setq mail-sources '((pop :user "jrl"
13613                           :server "pophost" :function fetchfunc)))
13614 @end lisp
13615
13616 While the function @code{fetchfunc} is executing, the symbol @code{user}
13617 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13618 @code{"pophost"}.  The symbols @code{port}, @code{password},
13619 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13620 and @code{authentication} are also bound (to their default values).
13621
13622 See above for a list of keywords for each type of mail source.
13623
13624
13625 @node Mail Source Customization
13626 @subsubsection Mail Source Customization
13627
13628 The following is a list of variables that influence how the mail is
13629 fetched.  You would normally not need to set or change any of these
13630 variables.
13631
13632 @table @code
13633 @item mail-source-crash-box
13634 @vindex mail-source-crash-box
13635 File where mail will be stored while processing it.  The default is@*
13636 @file{~/.emacs-mail-crash-box}.
13637
13638 @item mail-source-delete-incoming
13639 @vindex mail-source-delete-incoming
13640 If non-@code{nil}, delete incoming files after handling them.  If
13641 @code{t}, delete the files immediately, if @code{nil}, never delete any
13642 files.  If a positive number, delete files older than number of days
13643 (This will only happen, when receiving new mail).  You may also set
13644 @code{mail-source-delete-incoming} to @code{nil} and call
13645 @code{mail-source-delete-old-incoming} from a hook or interactively.
13646
13647 @item mail-source-delete-old-incoming-confirm
13648 @vindex mail-source-delete-old-incoming-confirm
13649 If non-@code{nil}, ask for for confirmation before deleting old incoming
13650 files.  This variable only applies when
13651 @code{mail-source-delete-incoming} is a positive number.
13652
13653 @item mail-source-ignore-errors
13654 @vindex mail-source-ignore-errors
13655 If non-@code{nil}, ignore errors when reading mail from a mail source.
13656
13657 @item mail-source-directory
13658 @vindex mail-source-directory
13659 Directory where files (if any) will be stored.  The default is
13660 @file{~/Mail/}.  At present, the only thing this is used for is to say
13661 where the incoming files will be stored if the previous variable is
13662 @code{nil}.
13663
13664 @item mail-source-incoming-file-prefix
13665 @vindex mail-source-incoming-file-prefix
13666 Prefix for file name for storing incoming mail.  The default is
13667 @file{Incoming}, in which case files will end up with names like
13668 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13669 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13670
13671 @item mail-source-default-file-modes
13672 @vindex mail-source-default-file-modes
13673 All new mail files will get this file mode.  The default is 384.
13674
13675 @item mail-source-movemail-program
13676 @vindex mail-source-movemail-program
13677 If non-@code{nil}, name of program for fetching new mail.  If
13678 @code{nil}, @code{movemail} in @var{exec-directory}.
13679
13680 @end table
13681
13682
13683 @node Fetching Mail
13684 @subsubsection Fetching Mail
13685
13686 @vindex mail-sources
13687 @vindex nnmail-spool-file
13688 The way to actually tell Gnus where to get new mail from is to set
13689 @code{mail-sources} to a list of mail source specifiers
13690 (@pxref{Mail Source Specifiers}).
13691
13692 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13693 @code{nil}, the mail back ends will never attempt to fetch mail by
13694 themselves.
13695
13696 If you want to fetch mail both from your local spool as well as a
13697 @acronym{POP} mail server, you'd say something like:
13698
13699 @lisp
13700 (setq mail-sources
13701       '((file)
13702         (pop :server "pop3.mail.server"
13703              :password "secret")))
13704 @end lisp
13705
13706 Or, if you don't want to use any of the keyword defaults:
13707
13708 @lisp
13709 (setq mail-sources
13710       '((file :path "/var/spool/mail/user-name")
13711         (pop :server "pop3.mail.server"
13712              :user "user-name"
13713              :port "pop3"
13714              :password "secret")))
13715 @end lisp
13716
13717
13718 When you use a mail back end, Gnus will slurp all your mail from your
13719 inbox and plonk it down in your home directory.  Gnus doesn't move any
13720 mail if you're not using a mail back end---you have to do a lot of magic
13721 invocations first.  At the time when you have finished drawing the
13722 pentagram, lightened the candles, and sacrificed the goat, you really
13723 shouldn't be too surprised when Gnus moves your mail.
13724
13725
13726
13727 @node Mail Back End Variables
13728 @subsection Mail Back End Variables
13729
13730 These variables are (for the most part) pertinent to all the various
13731 mail back ends.
13732
13733 @table @code
13734 @vindex nnmail-read-incoming-hook
13735 @item nnmail-read-incoming-hook
13736 The mail back ends all call this hook after reading new mail.  You can
13737 use this hook to notify any mail watch programs, if you want to.
13738
13739 @vindex nnmail-split-hook
13740 @item nnmail-split-hook
13741 @findex gnus-article-decode-encoded-words
13742 @cindex RFC 1522 decoding
13743 @cindex RFC 2047 decoding
13744 Hook run in the buffer where the mail headers of each message is kept
13745 just before the splitting based on these headers is done.  The hook is
13746 free to modify the buffer contents in any way it sees fit---the buffer
13747 is discarded after the splitting has been done, and no changes performed
13748 in the buffer will show up in any files.
13749 @code{gnus-article-decode-encoded-words} is one likely function to add
13750 to this hook.
13751
13752 @vindex nnmail-pre-get-new-mail-hook
13753 @vindex nnmail-post-get-new-mail-hook
13754 @item nnmail-pre-get-new-mail-hook
13755 @itemx nnmail-post-get-new-mail-hook
13756 These are two useful hooks executed when treating new incoming
13757 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13758 starting to handle the new mail) and
13759 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13760 is done).  Here's and example of using these two hooks to change the
13761 default file modes the new mail files get:
13762
13763 @lisp
13764 (add-hook 'nnmail-pre-get-new-mail-hook
13765           (lambda () (set-default-file-modes 511)))
13766
13767 (add-hook 'nnmail-post-get-new-mail-hook
13768           (lambda () (set-default-file-modes 551)))
13769 @end lisp
13770
13771 @item nnmail-use-long-file-names
13772 @vindex nnmail-use-long-file-names
13773 If non-@code{nil}, the mail back ends will use long file and directory
13774 names.  Groups like @samp{mail.misc} will end up in directories
13775 (assuming use of @code{nnml} back end) or files (assuming use of
13776 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13777 the same group will end up in @file{mail/misc}.
13778
13779 @item nnmail-delete-file-function
13780 @vindex nnmail-delete-file-function
13781 @findex delete-file
13782 Function called to delete files.  It is @code{delete-file} by default.
13783
13784 @item nnmail-cache-accepted-message-ids
13785 @vindex nnmail-cache-accepted-message-ids
13786 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13787 the back end (via @code{Gcc}, for instance) into the mail duplication
13788 discovery cache.  The default is @code{nil}.
13789
13790 @item nnmail-cache-ignore-groups
13791 @vindex nnmail-cache-ignore-groups
13792 This can be a regular expression or a list of regular expressions.
13793 Group names that match any of the regular expressions will never be
13794 recorded in the @code{Message-ID} cache.
13795
13796 This can be useful, for example, when using Fancy Splitting
13797 (@pxref{Fancy Mail Splitting}) together with the function
13798 @code{nnmail-split-fancy-with-parent}.
13799
13800 @end table
13801
13802
13803 @node Fancy Mail Splitting
13804 @subsection Fancy Mail Splitting
13805 @cindex mail splitting
13806 @cindex fancy mail splitting
13807
13808 @vindex nnmail-split-fancy
13809 @findex nnmail-split-fancy
13810 If the rather simple, standard method for specifying how to split mail
13811 doesn't allow you to do what you want, you can set
13812 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13813 play with the @code{nnmail-split-fancy} variable.
13814
13815 Let's look at an example value of this variable first:
13816
13817 @lisp
13818 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13819 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13820 ;; @r{from real errors.}
13821 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13822                    "mail.misc"))
13823    ;; @r{Non-error messages are crossposted to all relevant}
13824    ;; @r{groups, but we don't crosspost between the group for the}
13825    ;; @r{(ding) list and the group for other (ding) related mail.}
13826    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13827          ("subject" "ding" "ding.misc"))
13828       ;; @r{Other mailing lists@dots{}}
13829       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13830       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13831       ;; @r{Both lists below have the same suffix, so prevent}
13832       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13833       ;; @r{the bugs- list, but allow cross-posting when the}
13834       ;; @r{message was really cross-posted.}
13835       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13836       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13837       ;; @r{People@dots{}}
13838       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13839    ;; @r{Unmatched mail goes to the catch all group.}
13840    "misc.misc")
13841 @end lisp
13842
13843 This variable has the format of a @dfn{split}.  A split is a (possibly)
13844 recursive structure where each split may contain other splits.  Here are
13845 the five possible split syntaxes:
13846
13847 @enumerate
13848
13849 @item
13850 @samp{group}: If the split is a string, that will be taken as a group
13851 name.  Normal regexp match expansion will be done.  See below for
13852 examples.
13853
13854 @item
13855 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13856 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13857 first element of which is a string, then store the message as
13858 specified by @var{split}, if header @var{field} (a regexp) contains
13859 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13860 matches some string after @var{field} and before the end of the
13861 matched @var{value}, the @var{split} is ignored.  If none of the
13862 @var{restrict} clauses match, @var{split} is processed.
13863
13864 @item
13865 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13866 element is @code{|} (vertical bar), then process each @var{split} until
13867 one of them matches.  A @var{split} is said to match if it will cause
13868 the mail message to be stored in one or more groups.
13869
13870 @item
13871 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13872 element is @code{&}, then process all @var{split}s in the list.
13873
13874 @item
13875 @code{junk}: If the split is the symbol @code{junk}, then don't save
13876 (i.e., delete) this message.  Use with extreme caution.
13877
13878 @item
13879 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13880 a list, and the first element is @code{:}, then the second element will
13881 be called as a function with @var{args} given as arguments.  The
13882 function should return a @var{split}.
13883
13884 @cindex body split
13885 For instance, the following function could be used to split based on the
13886 body of the messages:
13887
13888 @lisp
13889 (defun split-on-body ()
13890   (save-excursion
13891     (set-buffer " *nnmail incoming*")
13892     (goto-char (point-min))
13893     (when (re-search-forward "Some.*string" nil t)
13894       "string.group")))
13895 @end lisp
13896
13897 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13898 when the @code{:} function is run.
13899
13900 @item
13901 @code{(! @var{func} @var{split})}: If the split is a list, and the
13902 first element is @code{!}, then @var{split} will be processed, and
13903 @var{func} will be called as a function with the result of @var{split}
13904 as argument.  @var{func} should return a split.
13905
13906 @item
13907 @code{nil}: If the split is @code{nil}, it is ignored.
13908
13909 @end enumerate
13910
13911 In these splits, @var{field} must match a complete field name.
13912 @var{value} must match a complete word according to the fundamental mode
13913 syntax table.  You can use @code{.*} in the regexps to match partial
13914 field names or words.  In other words, all @var{value}'s are wrapped in
13915 @samp{\<} and @samp{\>} pairs.
13916
13917 @vindex nnmail-split-abbrev-alist
13918 @var{field} and @var{value} can also be Lisp symbols, in that case
13919 they are expanded as specified by the variable
13920 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13921 where the @code{car} of a cell contains the key, and the @code{cdr}
13922 contains the associated value.  Predefined entries in
13923 @code{nnmail-split-abbrev-alist} include:
13924
13925 @table @code
13926 @item from
13927 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13928 @item to
13929 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13930 @samp{Resent-To} and @samp{Resent-Cc} fields.
13931 @item any
13932 Is the union of the @code{from} and @code{to} entries.
13933 @end table
13934
13935 @vindex nnmail-split-fancy-syntax-table
13936 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13937 when all this splitting is performed.
13938
13939 If you want to have Gnus create groups dynamically based on some
13940 information in the headers (i.e., do @code{replace-match}-like
13941 substitutions in the group names), you can say things like:
13942
13943 @example
13944 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13945 @end example
13946
13947 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13948 will be filed in @samp{mail.debian.foo}.
13949
13950 If the string contains the element @samp{\&}, then the previously
13951 matched string will be substituted.  Similarly, the elements @samp{\\1}
13952 up to @samp{\\9} will be substituted with the text matched by the
13953 groupings 1 through 9.
13954
13955 @findex nnmail-split-fancy-with-parent
13956 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13957 split followups into the same groups their parents are in.  Sometimes
13958 you can't make splitting rules for all your mail.  For example, your
13959 boss might send you personal mail regarding different projects you are
13960 working on, and as you can't tell your boss to put a distinguishing
13961 string into the subject line, you have to resort to manually moving the
13962 messages into the right group.  With this function, you only have to do
13963 it once per thread.
13964
13965 To use this feature, you have to set @code{nnmail-treat-duplicates}
13966 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13967 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13968 using the colon feature, like so:
13969 @lisp
13970 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13971       nnmail-cache-accepted-message-ids t
13972       nnmail-split-fancy
13973       '(| (: nnmail-split-fancy-with-parent)
13974           ;; @r{other splits go here}
13975         ))
13976 @end lisp
13977
13978 This feature works as follows: when @code{nnmail-treat-duplicates} is
13979 non-@code{nil}, Gnus records the message id of every message it sees
13980 in the file specified by the variable
13981 @code{nnmail-message-id-cache-file}, together with the group it is in
13982 (the group is omitted for non-mail messages).  When mail splitting is
13983 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13984 at the References (and In-Reply-To) header of each message to split
13985 and searches the file specified by @code{nnmail-message-id-cache-file}
13986 for the message ids.  When it has found a parent, it returns the
13987 corresponding group name unless the group name matches the regexp
13988 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13989 recommended that you set @code{nnmail-message-id-cache-length} to a
13990 somewhat higher number than the default so that the message ids are
13991 still in the cache.  (A value of 5000 appears to create a file some
13992 300 kBytes in size.)
13993 @vindex nnmail-cache-accepted-message-ids
13994 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13995 also records the message ids of moved articles, so that the followup
13996 messages goes into the new group.
13997
13998 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13999 want certain groups to be recorded in the cache.  For example, if all
14000 outgoing messages are written to an ``outgoing'' group, you could set
14001 @code{nnmail-cache-ignore-groups} to match that group name.
14002 Otherwise, answers to all your messages would end up in the
14003 ``outgoing'' group.
14004
14005
14006 @node Group Mail Splitting
14007 @subsection Group Mail Splitting
14008 @cindex mail splitting
14009 @cindex group mail splitting
14010
14011 @findex gnus-group-split
14012 If you subscribe to dozens of mailing lists but you don't want to
14013 maintain mail splitting rules manually, group mail splitting is for you.
14014 You just have to set @var{to-list} and/or @var{to-address} in group
14015 parameters or group customization and set @code{nnmail-split-methods} to
14016 @code{gnus-group-split}.  This splitting function will scan all groups
14017 for those parameters and split mail accordingly, i.e., messages posted
14018 from or to the addresses specified in the parameters @var{to-list} or
14019 @var{to-address} of a mail group will be stored in that group.
14020
14021 Sometimes, mailing lists have multiple addresses, and you may want mail
14022 splitting to recognize them all: just set the @var{extra-aliases} group
14023 parameter to the list of additional addresses and it's done.  If you'd
14024 rather use a regular expression, set @var{split-regexp}.
14025
14026 All these parameters in a group will be used to create an
14027 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14028 the @var{value} is a single regular expression that matches
14029 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14030 matches of @var{split-regexp}, and the @var{split} is the name of the
14031 group.  @var{restrict}s are also supported: just set the
14032 @var{split-exclude} parameter to a list of regular expressions.
14033
14034 If you can't get the right split to be generated using all these
14035 parameters, or you just need something fancier, you can set the
14036 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14037 this case, all other aforementioned parameters will be ignored by
14038 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14039 @code{nil}, in which case the group will be ignored by
14040 @code{gnus-group-split}.
14041
14042 @vindex gnus-group-split-default-catch-all-group
14043 @code{gnus-group-split} will do cross-posting on all groups that match,
14044 by defining a single @code{&} fancy split containing one split for each
14045 group.  If a message doesn't match any split, it will be stored in the
14046 group named in @code{gnus-group-split-default-catch-all-group}, unless
14047 some group has @var{split-spec} set to @code{catch-all}, in which case
14048 that group is used as the catch-all group.  Even though this variable is
14049 often used just to name a group, it may also be set to an arbitrarily
14050 complex fancy split (after all, a group name is a fancy split), and this
14051 may be useful to split mail that doesn't go to any mailing list to
14052 personal mail folders.  Note that this fancy split is added as the last
14053 element of a @code{|} split list that also contains a @code{&} split
14054 with the rules extracted from group parameters.
14055
14056 It's time for an example.  Assume the following group parameters have
14057 been defined:
14058
14059 @example
14060 nnml:mail.bar:
14061 ((to-address . "bar@@femail.com")
14062  (split-regexp . ".*@@femail\\.com"))
14063 nnml:mail.foo:
14064 ((to-list . "foo@@nowhere.gov")
14065  (extra-aliases "foo@@localhost" "foo-redist@@home")
14066  (split-exclude "bugs-foo" "rambling-foo")
14067  (admin-address . "foo-request@@nowhere.gov"))
14068 nnml:mail.others:
14069 ((split-spec . catch-all))
14070 @end example
14071
14072 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14073 behave as if @code{nnmail-split-fancy} had been selected and variable
14074 @code{nnmail-split-fancy} had been set as follows:
14075
14076 @lisp
14077 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14078       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14079            - "bugs-foo" - "rambling-foo" "mail.foo"))
14080    "mail.others")
14081 @end lisp
14082
14083 @findex gnus-group-split-fancy
14084 If you'd rather not use group splitting for all your mail groups, you
14085 may use it for only some of them, by using @code{nnmail-split-fancy}
14086 splits like this:
14087
14088 @lisp
14089 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14090 @end lisp
14091
14092 @var{groups} may be a regular expression or a list of group names whose
14093 parameters will be scanned to generate the output split.
14094 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14095 single @code{|} split will be output.  @var{catch-all} is the fall back
14096 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14097 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14098 empty string in any selected group, no catch-all split will be issued.
14099 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14100 this group will override the value of the @var{catch-all} argument.
14101
14102 @findex gnus-group-split-setup
14103 Unfortunately, scanning all groups and their parameters can be quite
14104 slow, especially considering that it has to be done for every message.
14105 But don't despair!  The function @code{gnus-group-split-setup} can be
14106 used to enable @code{gnus-group-split} in a much more efficient way.  It
14107 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14108 @code{nnmail-split-fancy} to the split produced by
14109 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14110 scanned once, no matter how many messages are split.
14111
14112 @findex gnus-group-split-update
14113 However, if you change group parameters, you'd have to update
14114 @code{nnmail-split-fancy} manually.  You can do it by running
14115 @code{gnus-group-split-update}.  If you'd rather have it updated
14116 automatically, just tell @code{gnus-group-split-setup} to do it for
14117 you.  For example, add to your @file{~/.gnus.el}:
14118
14119 @lisp
14120 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14121 @end lisp
14122
14123 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14124 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14125 have to worry about updating @code{nnmail-split-fancy} again.  If you
14126 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14127 @code{gnus-group-split-default-catch-all-group} will be set to its
14128 value.
14129
14130 @vindex gnus-group-split-updated-hook
14131 Because you may want to change @code{nnmail-split-fancy} after it is set
14132 by @code{gnus-group-split-update}, this function will run
14133 @code{gnus-group-split-updated-hook} just before finishing.
14134
14135 @node Incorporating Old Mail
14136 @subsection Incorporating Old Mail
14137 @cindex incorporating old mail
14138 @cindex import old mail
14139
14140 Most people have lots of old mail stored in various file formats.  If
14141 you have set up Gnus to read mail using one of the spiffy Gnus mail
14142 back ends, you'll probably wish to have that old mail incorporated into
14143 your mail groups.
14144
14145 Doing so can be quite easy.
14146
14147 To take an example: You're reading mail using @code{nnml}
14148 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14149 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14150 file filled with important, but old, mail.  You want to move it into
14151 your @code{nnml} groups.
14152
14153 Here's how:
14154
14155 @enumerate
14156 @item
14157 Go to the group buffer.
14158
14159 @item
14160 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14161 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14162
14163 @item
14164 Type @kbd{SPACE} to enter the newly created group.
14165
14166 @item
14167 Type @kbd{M P b} to process-mark all articles in this group's buffer
14168 (@pxref{Setting Process Marks}).
14169
14170 @item
14171 Type @kbd{B r} to respool all the process-marked articles, and answer
14172 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14173 @end enumerate
14174
14175 All the mail messages in the mbox file will now also be spread out over
14176 all your @code{nnml} groups.  Try entering them and check whether things
14177 have gone without a glitch.  If things look ok, you may consider
14178 deleting the mbox file, but I wouldn't do that unless I was absolutely
14179 sure that all the mail has ended up where it should be.
14180
14181 Respooling is also a handy thing to do if you're switching from one mail
14182 back end to another.  Just respool all the mail in the old mail groups
14183 using the new mail back end.
14184
14185
14186 @node Expiring Mail
14187 @subsection Expiring Mail
14188 @cindex article expiry
14189
14190 Traditional mail readers have a tendency to remove mail articles when
14191 you mark them as read, in some way.  Gnus takes a fundamentally
14192 different approach to mail reading.
14193
14194 Gnus basically considers mail just to be news that has been received in
14195 a rather peculiar manner.  It does not think that it has the power to
14196 actually change the mail, or delete any mail messages.  If you enter a
14197 mail group, and mark articles as ``read'', or kill them in some other
14198 fashion, the mail articles will still exist on the system.  I repeat:
14199 Gnus will not delete your old, read mail.  Unless you ask it to, of
14200 course.
14201
14202 To make Gnus get rid of your unwanted mail, you have to mark the
14203 articles as @dfn{expirable}.  (With the default key bindings, this means
14204 that you have to type @kbd{E}.)  This does not mean that the articles
14205 will disappear right away, however.  In general, a mail article will be
14206 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14207 more than one week old.  If you do not mark an article as expirable, it
14208 will remain on your system until hell freezes over.  This bears
14209 repeating one more time, with some spurious capitalizations: IF you do
14210 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14211
14212 You do not have to mark articles as expirable by hand.  Gnus provides
14213 two features, called ``auto-expire'' and ``total-expire'', that can help you
14214 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14215 for you when you select an article.  And ``total-expire'' means that Gnus
14216 considers all articles as expirable that are read.  So, in addition to
14217 the articles marked @samp{E}, also the articles marked @samp{r},
14218 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14219 expirable.
14220
14221 When should either auto-expire or total-expire be used?  Most people
14222 who are subscribed to mailing lists split each list into its own group
14223 and then turn on auto-expire or total-expire for those groups.
14224 (@xref{Splitting Mail}, for more information on splitting each list
14225 into its own group.)
14226
14227 Which one is better, auto-expire or total-expire?  It's not easy to
14228 answer.  Generally speaking, auto-expire is probably faster.  Another
14229 advantage of auto-expire is that you get more marks to work with: for
14230 the articles that are supposed to stick around, you can still choose
14231 between tick and dormant and read marks.  But with total-expire, you
14232 only have dormant and ticked to choose from.  The advantage of
14233 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14234 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14235 scoring.
14236
14237 @vindex gnus-auto-expirable-newsgroups
14238 Groups that match the regular expression
14239 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14240 read marked as expirable automatically.  All articles marked as
14241 expirable have an @samp{E} in the first column in the summary buffer.
14242
14243 By default, if you have auto expiry switched on, Gnus will mark all the
14244 articles you read as expirable, no matter if they were read or unread
14245 before.  To avoid having articles marked as read marked as expirable
14246 automatically, you can put something like the following in your
14247 @file{~/.gnus.el} file:
14248
14249 @vindex gnus-mark-article-hook
14250 @lisp
14251 (remove-hook 'gnus-mark-article-hook
14252              'gnus-summary-mark-read-and-unread-as-read)
14253 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14254 @end lisp
14255
14256 Note that making a group auto-expirable doesn't mean that all read
14257 articles are expired---only the articles marked as expirable
14258 will be expired.  Also note that using the @kbd{d} command won't make
14259 articles expirable---only semi-automatic marking of articles as read will
14260 mark the articles as expirable in auto-expirable groups.
14261
14262 Let's say you subscribe to a couple of mailing lists, and you want the
14263 articles you have read to disappear after a while:
14264
14265 @lisp
14266 (setq gnus-auto-expirable-newsgroups
14267       "mail.nonsense-list\\|mail.nice-list")
14268 @end lisp
14269
14270 Another way to have auto-expiry happen is to have the element
14271 @code{auto-expire} in the group parameters of the group.
14272
14273 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14274 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14275 don't really mix very well.
14276
14277 @vindex nnmail-expiry-wait
14278 The @code{nnmail-expiry-wait} variable supplies the default time an
14279 expirable article has to live.  Gnus starts counting days from when the
14280 message @emph{arrived}, not from when it was sent.  The default is seven
14281 days.
14282
14283 Gnus also supplies a function that lets you fine-tune how long articles
14284 are to live, based on what group they are in.  Let's say you want to
14285 have one month expiry period in the @samp{mail.private} group, a one day
14286 expiry period in the @samp{mail.junk} group, and a six day expiry period
14287 everywhere else:
14288
14289 @vindex nnmail-expiry-wait-function
14290 @lisp
14291 (setq nnmail-expiry-wait-function
14292       (lambda (group)
14293        (cond ((string= group "mail.private")
14294                31)
14295              ((string= group "mail.junk")
14296                1)
14297              ((string= group "important")
14298                'never)
14299              (t
14300                6))))
14301 @end lisp
14302
14303 The group names this function is fed are ``unadorned'' group
14304 names---no @samp{nnml:} prefixes and the like.
14305
14306 The @code{nnmail-expiry-wait} variable and
14307 @code{nnmail-expiry-wait-function} function can either be a number (not
14308 necessarily an integer) or one of the symbols @code{immediate} or
14309 @code{never}.
14310
14311 You can also use the @code{expiry-wait} group parameter to selectively
14312 change the expiry period (@pxref{Group Parameters}).
14313
14314 @vindex nnmail-expiry-target
14315 The normal action taken when expiring articles is to delete them.
14316 However, in some circumstances it might make more sense to move them
14317 to other groups instead of deleting them.  The variable
14318 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14319 parameter) controls this.  The variable supplies a default value for
14320 all groups, which can be overridden for specific groups by the group
14321 parameter.  default value is @code{delete}, but this can also be a
14322 string (which should be the name of the group the message should be
14323 moved to), or a function (which will be called in a buffer narrowed to
14324 the message in question, and with the name of the group being moved
14325 from as its parameter) which should return a target---either a group
14326 name or @code{delete}.
14327
14328 Here's an example for specifying a group name:
14329 @lisp
14330 (setq nnmail-expiry-target "nnml:expired")
14331 @end lisp
14332
14333 @findex nnmail-fancy-expiry-target
14334 @vindex nnmail-fancy-expiry-targets
14335 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14336 expire mail to groups according to the variable
14337 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14338
14339 @lisp
14340  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14341        nnmail-fancy-expiry-targets
14342        '((to-from "boss" "nnfolder:Work")
14343          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14344          ("from" ".*" "nnfolder:Archive-%Y")))
14345 @end lisp
14346
14347 With this setup, any mail that has @code{IMPORTANT} in its Subject
14348 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14349 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14350 From or To header contains the string @code{boss}, it will get expired
14351 to @code{nnfolder:Work}.  All other mail will get expired to
14352 @code{nnfolder:Archive-YYYY}.
14353
14354 @vindex nnmail-keep-last-article
14355 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14356 expire the final article in a mail newsgroup.  This is to make life
14357 easier for procmail users.
14358
14359 @vindex gnus-total-expirable-newsgroups
14360 By the way: That line up there, about Gnus never expiring non-expirable
14361 articles, is a lie.  If you put @code{total-expire} in the group
14362 parameters, articles will not be marked as expirable, but all read
14363 articles will be put through the expiry process.  Use with extreme
14364 caution.  Even more dangerous is the
14365 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14366 this regexp will have all read articles put through the expiry process,
14367 which means that @emph{all} old mail articles in the groups in question
14368 will be deleted after a while.  Use with extreme caution, and don't come
14369 crying to me when you discover that the regexp you used matched the
14370 wrong group and all your important mail has disappeared.  Be a
14371 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14372 with!  So there!
14373
14374 Most people make most of their mail groups total-expirable, though.
14375
14376 @vindex gnus-inhibit-user-auto-expire
14377 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14378 commands will not mark an article as expirable, even if the group has
14379 auto-expire turned on.
14380
14381
14382 @node Washing Mail
14383 @subsection Washing Mail
14384 @cindex mail washing
14385 @cindex list server brain damage
14386 @cindex incoming mail treatment
14387
14388 Mailers and list servers are notorious for doing all sorts of really,
14389 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14390 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14391 end of all lines passing through our server, so let's do that!!!!1!''
14392 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14393 considered to be self-evident were not discussed.  So.  Here we are.
14394
14395 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14396 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14397 be shocked and dismayed by this, but I haven't got the energy.  It is to
14398 laugh.
14399
14400 Gnus provides a plethora of functions for washing articles while
14401 displaying them, but it might be nicer to do the filtering before
14402 storing the mail to disk.  For that purpose, we have three hooks and
14403 various functions that can be put in these hooks.
14404
14405 @table @code
14406 @item nnmail-prepare-incoming-hook
14407 @vindex nnmail-prepare-incoming-hook
14408 This hook is called before doing anything with the mail and is meant for
14409 grand, sweeping gestures.  It is called in a buffer that contains all
14410 the new, incoming mail.  Functions to be used include:
14411
14412 @table @code
14413 @item nnheader-ms-strip-cr
14414 @findex nnheader-ms-strip-cr
14415 Remove trailing carriage returns from each line.  This is default on
14416 Emacs running on MS machines.
14417
14418 @end table
14419
14420 @item nnmail-prepare-incoming-header-hook
14421 @vindex nnmail-prepare-incoming-header-hook
14422 This hook is called narrowed to each header.  It can be used when
14423 cleaning up the headers.  Functions that can be used include:
14424
14425 @table @code
14426 @item nnmail-remove-leading-whitespace
14427 @findex nnmail-remove-leading-whitespace
14428 Clear leading white space that ``helpful'' listservs have added to the
14429 headers to make them look nice.  Aaah.
14430
14431 (Note that this function works on both the header on the body of all
14432 messages, so it is a potentially dangerous function to use (if a body
14433 of a message contains something that looks like a header line).  So
14434 rather than fix the bug, it is of course the right solution to make it
14435 into a feature by documenting it.)
14436
14437 @item nnmail-remove-list-identifiers
14438 @findex nnmail-remove-list-identifiers
14439 Some list servers add an identifier---for example, @samp{(idm)}---to the
14440 beginning of all @code{Subject} headers.  I'm sure that's nice for
14441 people who use stone age mail readers.  This function will remove
14442 strings that match the @code{nnmail-list-identifiers} regexp, which can
14443 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14444 @code{\\(..\\)}.
14445
14446 For instance, if you want to remove the @samp{(idm)} and the
14447 @samp{nagnagnag} identifiers:
14448
14449 @lisp
14450 (setq nnmail-list-identifiers
14451       '("(idm)" "nagnagnag"))
14452 @end lisp
14453
14454 This can also be done non-destructively with
14455 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14456
14457 @item nnmail-remove-tabs
14458 @findex nnmail-remove-tabs
14459 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14460
14461 @item nnmail-fix-eudora-headers
14462 @findex nnmail-fix-eudora-headers
14463 @cindex Eudora
14464 Eudora produces broken @code{References} headers, but OK
14465 @code{In-Reply-To} headers.  This function will get rid of the
14466 @code{References} headers.
14467
14468 @end table
14469
14470 @item nnmail-prepare-incoming-message-hook
14471 @vindex nnmail-prepare-incoming-message-hook
14472 This hook is called narrowed to each message.  Functions to be used
14473 include:
14474
14475 @table @code
14476 @item article-de-quoted-unreadable
14477 @findex article-de-quoted-unreadable
14478 Decode Quoted Readable encoding.
14479
14480 @end table
14481 @end table
14482
14483
14484 @node Duplicates
14485 @subsection Duplicates
14486
14487 @vindex nnmail-treat-duplicates
14488 @vindex nnmail-message-id-cache-length
14489 @vindex nnmail-message-id-cache-file
14490 @cindex duplicate mails
14491 If you are a member of a couple of mailing lists, you will sometimes
14492 receive two copies of the same mail.  This can be quite annoying, so
14493 @code{nnmail} checks for and treats any duplicates it might find.  To do
14494 this, it keeps a cache of old @code{Message-ID}s---
14495 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14496 default.  The approximate maximum number of @code{Message-ID}s stored
14497 there is controlled by the @code{nnmail-message-id-cache-length}
14498 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14499 stored.) If all this sounds scary to you, you can set
14500 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14501 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14502 will insert a warning into the head of the mail saying that it thinks
14503 that this is a duplicate of a different message.
14504
14505 This variable can also be a function.  If that's the case, the function
14506 will be called from a buffer narrowed to the message in question with
14507 the @code{Message-ID} as a parameter.  The function must return either
14508 @code{nil}, @code{warn}, or @code{delete}.
14509
14510 You can turn this feature off completely by setting the variable to
14511 @code{nil}.
14512
14513 If you want all the duplicate mails to be put into a special
14514 @dfn{duplicates} group, you could do that using the normal mail split
14515 methods:
14516
14517 @lisp
14518 (setq nnmail-split-fancy
14519       '(| ;; @r{Messages duplicates go to a separate group.}
14520         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14521         ;; @r{Message from daemons, postmaster, and the like to another.}
14522         (any mail "mail.misc")
14523         ;; @r{Other rules.}
14524         [...] ))
14525 @end lisp
14526 @noindent
14527 Or something like:
14528 @lisp
14529 (setq nnmail-split-methods
14530       '(("duplicates" "^Gnus-Warning:.*duplicate")
14531         ;; @r{Other rules.}
14532         [...]))
14533 @end lisp
14534
14535 Here's a neat feature: If you know that the recipient reads her mail
14536 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14537 @code{delete}, you can send her as many insults as you like, just by
14538 using a @code{Message-ID} of a mail that you know that she's already
14539 received.  Think of all the fun!  She'll never see any of it!  Whee!
14540
14541
14542 @node Not Reading Mail
14543 @subsection Not Reading Mail
14544
14545 If you start using any of the mail back ends, they have the annoying
14546 habit of assuming that you want to read mail with them.  This might not
14547 be unreasonable, but it might not be what you want.
14548
14549 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14550 @code{nil}, none of the back ends will ever attempt to read incoming
14551 mail, which should help.
14552
14553 @vindex nnbabyl-get-new-mail
14554 @vindex nnmbox-get-new-mail
14555 @vindex nnml-get-new-mail
14556 @vindex nnmh-get-new-mail
14557 @vindex nnfolder-get-new-mail
14558 This might be too much, if, for instance, you are reading mail quite
14559 happily with @code{nnml} and just want to peek at some old Rmail
14560 file you have stashed away with @code{nnbabyl}.  All back ends have
14561 variables called back-end-@code{get-new-mail}.  If you want to disable
14562 the @code{nnbabyl} mail reading, you edit the virtual server for the
14563 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14564
14565 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14566 narrowed to the article to be saved before saving it when reading
14567 incoming mail.
14568
14569
14570 @node Choosing a Mail Back End
14571 @subsection Choosing a Mail Back End
14572
14573 Gnus will read the mail spool when you activate a mail group.  The mail
14574 file is first copied to your home directory.  What happens after that
14575 depends on what format you want to store your mail in.
14576
14577 There are six different mail back ends in the standard Gnus, and more
14578 back ends are available separately.  The mail back end most people use
14579 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14580 Spool}).
14581
14582 @menu
14583 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14584 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14585 * Mail Spool::                  Store your mail in a private spool?
14586 * MH Spool::                    An mhspool-like back end.
14587 * Maildir::                     Another one-file-per-message format.
14588 * Mail Folders::                Having one file for each group.
14589 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14590 @end menu
14591
14592
14593 @node Unix Mail Box
14594 @subsubsection Unix Mail Box
14595 @cindex nnmbox
14596 @cindex unix mail box
14597
14598 @vindex nnmbox-active-file
14599 @vindex nnmbox-mbox-file
14600 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14601 mail.  @code{nnmbox} will add extra headers to each mail article to say
14602 which group it belongs in.
14603
14604 Virtual server settings:
14605
14606 @table @code
14607 @item nnmbox-mbox-file
14608 @vindex nnmbox-mbox-file
14609 The name of the mail box in the user's home directory.  Default is
14610 @file{~/mbox}.
14611
14612 @item nnmbox-active-file
14613 @vindex nnmbox-active-file
14614 The name of the active file for the mail box.  Default is
14615 @file{~/.mbox-active}.
14616
14617 @item nnmbox-get-new-mail
14618 @vindex nnmbox-get-new-mail
14619 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14620 into groups.  Default is @code{t}.
14621 @end table
14622
14623
14624 @node Rmail Babyl
14625 @subsubsection Rmail Babyl
14626 @cindex nnbabyl
14627 @cindex Rmail mbox
14628
14629 @vindex nnbabyl-active-file
14630 @vindex nnbabyl-mbox-file
14631 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14632 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14633 mail article to say which group it belongs in.
14634
14635 Virtual server settings:
14636
14637 @table @code
14638 @item nnbabyl-mbox-file
14639 @vindex nnbabyl-mbox-file
14640 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14641
14642 @item nnbabyl-active-file
14643 @vindex nnbabyl-active-file
14644 The name of the active file for the rmail box.  The default is
14645 @file{~/.rmail-active}
14646
14647 @item nnbabyl-get-new-mail
14648 @vindex nnbabyl-get-new-mail
14649 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14650 @code{t}
14651 @end table
14652
14653
14654 @node Mail Spool
14655 @subsubsection Mail Spool
14656 @cindex nnml
14657 @cindex mail @acronym{NOV} spool
14658
14659 The @dfn{nnml} spool mail format isn't compatible with any other known
14660 format.  It should be used with some caution.
14661
14662 @vindex nnml-directory
14663 If you use this back end, Gnus will split all incoming mail into files,
14664 one file for each mail, and put the articles into the corresponding
14665 directories under the directory specified by the @code{nnml-directory}
14666 variable.  The default value is @file{~/Mail/}.
14667
14668 You do not have to create any directories beforehand; Gnus will take
14669 care of all that.
14670
14671 If you have a strict limit as to how many files you are allowed to store
14672 in your account, you should not use this back end.  As each mail gets its
14673 own file, you might very well occupy thousands of inodes within a few
14674 weeks.  If this is no problem for you, and it isn't a problem for you
14675 having your friendly systems administrator walking around, madly,
14676 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14677 know that this is probably the fastest format to use.  You do not have
14678 to trudge through a big mbox file just to read your new mail.
14679
14680 @code{nnml} is probably the slowest back end when it comes to article
14681 splitting.  It has to create lots of files, and it also generates
14682 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14683 fastest back end when it comes to reading mail.
14684
14685 @cindex self contained nnml servers
14686 @cindex marks
14687 When the marks file is used (which it is by default), @code{nnml}
14688 servers have the property that you may backup them using @code{tar} or
14689 similar, and later be able to restore them into Gnus (by adding the
14690 proper @code{nnml} server) and have all your marks be preserved.  Marks
14691 for a group is usually stored in the @code{.marks} file (but see
14692 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14693 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14694 to restore the group (after restoring the backup into the nnml
14695 directory).
14696
14697 If for some reason you believe your @file{.marks} files are screwed
14698 up, you can just delete them all.  Gnus will then correctly regenerate
14699 them next time it starts.
14700
14701 Virtual server settings:
14702
14703 @table @code
14704 @item nnml-directory
14705 @vindex nnml-directory
14706 All @code{nnml} directories will be placed under this directory.  The
14707 default is the value of @code{message-directory} (whose default value
14708 is @file{~/Mail}).
14709
14710 @item nnml-active-file
14711 @vindex nnml-active-file
14712 The active file for the @code{nnml} server.  The default is
14713 @file{~/Mail/active}.
14714
14715 @item nnml-newsgroups-file
14716 @vindex nnml-newsgroups-file
14717 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14718 Format}.  The default is @file{~/Mail/newsgroups}.
14719
14720 @item nnml-get-new-mail
14721 @vindex nnml-get-new-mail
14722 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14723 @code{t}.
14724
14725 @item nnml-nov-is-evil
14726 @vindex nnml-nov-is-evil
14727 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14728 default is @code{nil}.
14729
14730 @item nnml-nov-file-name
14731 @vindex nnml-nov-file-name
14732 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14733
14734 @item nnml-prepare-save-mail-hook
14735 @vindex nnml-prepare-save-mail-hook
14736 Hook run narrowed to an article before saving.
14737
14738 @item nnml-marks-is-evil
14739 @vindex nnml-marks-is-evil
14740 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14741 default is @code{nil}.
14742
14743 @item nnml-marks-file-name
14744 @vindex nnml-marks-file-name
14745 The name of the @dfn{marks} files.  The default is @file{.marks}.
14746
14747 @item nnml-use-compressed-files
14748 @vindex nnml-use-compressed-files
14749 If non-@code{nil}, @code{nnml} will allow using compressed message
14750 files.
14751
14752 @end table
14753
14754 @findex nnml-generate-nov-databases
14755 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14756 you can do a complete update by typing @kbd{M-x
14757 nnml-generate-nov-databases}.  This command will trawl through the
14758 entire @code{nnml} hierarchy, looking at each and every article, so it
14759 might take a while to complete.  A better interface to this
14760 functionality can be found in the server buffer (@pxref{Server
14761 Commands}).
14762
14763
14764 @node MH Spool
14765 @subsubsection MH Spool
14766 @cindex nnmh
14767 @cindex mh-e mail spool
14768
14769 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14770 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14771 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14772 but it also makes it easier to write procmail scripts for.
14773
14774 Virtual server settings:
14775
14776 @table @code
14777 @item nnmh-directory
14778 @vindex nnmh-directory
14779 All @code{nnmh} directories will be located under this directory.  The
14780 default is the value of @code{message-directory} (whose default is
14781 @file{~/Mail})
14782
14783 @item nnmh-get-new-mail
14784 @vindex nnmh-get-new-mail
14785 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14786 @code{t}.
14787
14788 @item nnmh-be-safe
14789 @vindex nnmh-be-safe
14790 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14791 sure that the articles in the folder are actually what Gnus thinks they
14792 are.  It will check date stamps and stat everything in sight, so
14793 setting this to @code{t} will mean a serious slow-down.  If you never
14794 use anything but Gnus to read the @code{nnmh} articles, you do not have
14795 to set this variable to @code{t}.  The default is @code{nil}.
14796 @end table
14797
14798
14799 @node Maildir
14800 @subsubsection Maildir
14801 @cindex nnmaildir
14802 @cindex maildir
14803
14804 @code{nnmaildir} stores mail in the maildir format, with each maildir
14805 corresponding to a group in Gnus.  This format is documented here:
14806 @uref{http://cr.yp.to/proto/maildir.html} and here:
14807 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14808 stores extra information in the @file{.nnmaildir/} directory within a
14809 maildir.
14810
14811 Maildir format was designed to allow concurrent deliveries and
14812 reading, without needing locks.  With other back ends, you would have
14813 your mail delivered to a spool of some kind, and then you would
14814 configure Gnus to split mail from that spool into your groups.  You
14815 can still do that with nnmaildir, but the more common configuration is
14816 to have your mail delivered directly to the maildirs that appear as
14817 group in Gnus.
14818
14819 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14820 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14821 data in the filesystem.
14822
14823 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14824 can copy a whole maildir from one Gnus setup to another, and you will
14825 keep your marks.
14826
14827 Virtual server settings:
14828
14829 @table @code
14830 @item directory
14831 For each of your nnmaildir servers (it's very unlikely that you'd need
14832 more than one), you need to create a directory and populate it with
14833 maildirs or symlinks to maildirs (and nothing else; do not choose a
14834 directory already used for other purposes).  Each maildir will be
14835 represented in Gnus as a newsgroup on that server; the filename of the
14836 symlink will be the name of the group.  Any filenames in the directory
14837 starting with @samp{.} are ignored.  The directory is scanned when you
14838 first start Gnus, and each time you type @kbd{g} in the group buffer;
14839 if any maildirs have been removed or added, nnmaildir notices at these
14840 times.
14841
14842 The value of the @code{directory} parameter should be a Lisp form
14843 which is processed by @code{eval} and @code{expand-file-name} to get
14844 the path of the directory for this server.  The form is @code{eval}ed
14845 only when the server is opened; the resulting string is used until the
14846 server is closed.  (If you don't know about forms and @code{eval},
14847 don't worry---a simple string will work.)  This parameter is not
14848 optional; you must specify it.  I don't recommend using
14849 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14850 use that directory by default for various things, and may get confused
14851 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14852
14853 @item target-prefix
14854 This should be a Lisp form which is processed by @code{eval} and
14855 @code{expand-file-name}.  The form is @code{eval}ed only when the
14856 server is opened; the resulting string is used until the server is
14857 closed.
14858
14859 When you create a group on an nnmaildir server, the maildir is created
14860 with @code{target-prefix} prepended to its name, and a symlink
14861 pointing to that maildir is created, named with the plain group name.
14862 So if @code{directory} is @code{"~/.nnmaildir"} and
14863 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14864 the group @code{foo}, nnmaildir will create
14865 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14866 @file{~/.nnmaildir/foo} as a symlink pointing to
14867 @file{../maildirs/foo}.
14868
14869 You can set @code{target-prefix} to a string without any slashes to
14870 create both maildirs and symlinks in the same @code{directory}; in
14871 this case, any maildirs found in @code{directory} whose names start
14872 with @code{target-prefix} will not be listed as groups (but the
14873 symlinks pointing to them will be).
14874
14875 As a special case, if @code{target-prefix} is @code{""} (the default),
14876 then when you create a group, the maildir will be created in
14877 @code{directory} without a corresponding symlink.  Beware that you
14878 cannot use @code{gnus-group-delete-group} on such groups without the
14879 @code{force} argument.
14880
14881 @item directory-files
14882 This should be a function with the same interface as
14883 @code{directory-files} (such as @code{directory-files} itself).  It is
14884 used to scan the server's @code{directory} for maildirs.  This
14885 parameter is optional; the default is
14886 @code{nnheader-directory-files-safe} if
14887 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14888 @code{directory-files} otherwise.
14889 (@code{nnheader-directory-files-is-safe} is checked only once when the
14890 server is opened; if you want to check it each time the directory is
14891 scanned, you'll have to provide your own function that does that.)
14892
14893 @item get-new-mail
14894 If non-@code{nil}, then after scanning for new mail in the group
14895 maildirs themselves as usual, this server will also incorporate mail
14896 the conventional Gnus way, from @code{mail-sources} according to
14897 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14898 value is @code{nil}.
14899
14900 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14901 an nnmaildir group.  The results might happen to be useful, but that
14902 would be by chance, not by design, and the results might be different
14903 in the future.  If your split rules create new groups, remember to
14904 supply a @code{create-directory} server parameter.
14905 @end table
14906
14907 @subsubsection Group parameters
14908
14909 nnmaildir uses several group parameters.  It's safe to ignore all
14910 this; the default behavior for nnmaildir is the same as the default
14911 behavior for other mail back ends: articles are deleted after one week,
14912 etc.  Except for the expiry parameters, all this functionality is
14913 unique to nnmaildir, so you can ignore it if you're just trying to
14914 duplicate the behavior you already have with another back end.
14915
14916 If the value of any of these parameters is a vector, the first element
14917 is evaluated as a Lisp form and the result is used, rather than the
14918 original value.  If the value is not a vector, the value itself is
14919 evaluated as a Lisp form.  (This is why these parameters use names
14920 different from those of other, similar parameters supported by other
14921 back ends: they have different, though similar, meanings.)  (For
14922 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14923 @code{eval} business again; for other values, remember to use an extra
14924 quote and wrap the value in a vector when appropriate.)
14925
14926 @table @code
14927 @item expire-age
14928 An integer specifying the minimum age, in seconds, of an article before
14929 it will be expired, or the symbol @code{never} to specify that
14930 articles should never be expired.  If this parameter is not set,
14931 nnmaildir falls back to the usual
14932 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14933 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14934 wanted a value of 3 days, you could use something like @code{[(* 3 24
14935 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14936 article's age is measured starting from the article file's
14937 modification time.  Normally, this is the same as the article's
14938 delivery time, but editing an article makes it younger.  Moving an
14939 article (other than via expiry) may also make an article younger.
14940
14941 @item expire-group
14942 If this is set to a string such as a full Gnus group name, like
14943 @example
14944 "backend+server.address.string:group.name"
14945 @end example
14946 and if it is not the name of the same group that the parameter belongs
14947 to, then articles will be moved to the specified group during expiry
14948 before being deleted.  @emph{If this is set to an nnmaildir group, the
14949 article will be just as old in the destination group as it was in the
14950 source group.}  So be careful with @code{expire-age} in the
14951 destination group.  If this is set to the name of the same group that
14952 the parameter belongs to, then the article is not expired at all.  If
14953 you use the vector form, the first element is evaluated once for each
14954 article.  So that form can refer to
14955 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14956 article.  @emph{If this parameter is not set, nnmaildir does not fall
14957 back to the @code{expiry-target} group parameter or the
14958 @code{nnmail-expiry-target} variable.}
14959
14960 @item read-only
14961 If this is set to @code{t}, nnmaildir will treat the articles in this
14962 maildir as read-only.  This means: articles are not renamed from
14963 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14964 not @file{cur/}; articles are never deleted; articles cannot be
14965 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14966 directory of another maildir---e.g., a system-wide mailbox containing
14967 a mailing list of common interest.  Everything in the maildir outside
14968 @file{new/} is @emph{not} treated as read-only, so for a shared
14969 mailbox, you do still need to set up your own maildir (or have write
14970 permission to the shared mailbox); your maildir just won't contain
14971 extra copies of the articles.
14972
14973 @item directory-files
14974 A function with the same interface as @code{directory-files}.  It is
14975 used to scan the directories in the maildir corresponding to this
14976 group to find articles.  The default is the function specified by the
14977 server's @code{directory-files} parameter.
14978
14979 @item distrust-Lines:
14980 If non-@code{nil}, nnmaildir will always count the lines of an
14981 article, rather than use the @code{Lines:} header field.  If
14982 @code{nil}, the header field will be used if present.
14983
14984 @item always-marks
14985 A list of mark symbols, such as
14986 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14987 article marks, nnmaildir will say that all articles have these
14988 marks, regardless of whether the marks stored in the filesystem
14989 say so.  This is a proof-of-concept feature that will probably be
14990 removed eventually; it ought to be done in Gnus proper, or
14991 abandoned if it's not worthwhile.
14992
14993 @item never-marks
14994 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14995 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14996 articles have these marks, regardless of whether the marks stored in
14997 the filesystem say so.  @code{never-marks} overrides
14998 @code{always-marks}.  This is a proof-of-concept feature that will
14999 probably be removed eventually; it ought to be done in Gnus proper, or
15000 abandoned if it's not worthwhile.
15001
15002 @item nov-cache-size
15003 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
15004 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
15005 articles in each group.  (This is probably not worthwhile, and will
15006 probably be removed in the future.)  This parameter's value is noticed
15007 only the first time a group is seen after the server is opened---i.e.,
15008 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
15009 until the server is closed and reopened.  The default is an estimate
15010 of the number of articles that would be displayed in the summary
15011 buffer: a count of articles that are either marked with @code{tick} or
15012 not marked with @code{read}, plus a little extra.
15013 @end table
15014
15015 @subsubsection Article identification
15016 Articles are stored in the @file{cur/} subdirectory of each maildir.
15017 Each article file is named like @code{uniq:info}, where @code{uniq}
15018 contains no colons.  nnmaildir ignores, but preserves, the
15019 @code{:info} part.  (Other maildir readers typically use this part of
15020 the filename to store marks.)  The @code{uniq} part uniquely
15021 identifies the article, and is used in various places in the
15022 @file{.nnmaildir/} subdirectory of the maildir to store information
15023 about the corresponding article.  The full pathname of an article is
15024 available in the variable @code{nnmaildir-article-file-name} after you
15025 request the article in the summary buffer.
15026
15027 @subsubsection NOV data
15028 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15029 generate lines in the summary buffer) stored in
15030 @code{.nnmaildir/nov/uniq}.  There is no
15031 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15032 need for it---an article's @acronym{NOV} data is updated automatically when the
15033 article or @code{nnmail-extra-headers} has changed.)  You can force
15034 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15035 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15036 cause nnmaildir to assign a new article number for this article, which
15037 may cause trouble with @code{seen} marks, the Agent, and the cache.
15038
15039 @subsubsection Article marks
15040 An article identified by @code{uniq} is considered to have the mark
15041 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15042 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15043 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15044 to store a new set of marks, nnmaildir creates and deletes the
15045 corresponding files as needed.  (Actually, rather than create a new
15046 file for each mark, it just creates hard links to
15047 @file{.nnmaildir/markfile}, to save inodes.)
15048
15049 You can invent new marks by creating a new directory in
15050 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15051 your server, untar it later, and keep your marks.  You can add and
15052 remove marks yourself by creating and deleting mark files.  If you do
15053 this while Gnus is running and your nnmaildir server is open, it's
15054 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15055 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15056 group buffer afterwards.  Otherwise, Gnus might not pick up the
15057 changes, and might undo them.
15058
15059
15060 @node Mail Folders
15061 @subsubsection Mail Folders
15062 @cindex nnfolder
15063 @cindex mbox folders
15064 @cindex mail folders
15065
15066 @code{nnfolder} is a back end for storing each mail group in a separate
15067 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15068 will add extra headers to keep track of article numbers and arrival
15069 dates.
15070
15071 @cindex self contained nnfolder servers
15072 @cindex marks
15073 When the marks file is used (which it is by default), @code{nnfolder}
15074 servers have the property that you may backup them using @code{tar} or
15075 similar, and later be able to restore them into Gnus (by adding the
15076 proper @code{nnfolder} server) and have all your marks be preserved.
15077 Marks for a group is usually stored in a file named as the mbox file
15078 with @code{.mrk} concatenated to it (but see
15079 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15080 Individual @code{nnfolder} groups are also possible to backup, use
15081 @kbd{G m} to restore the group (after restoring the backup into the
15082 @code{nnfolder} directory).
15083
15084 Virtual server settings:
15085
15086 @table @code
15087 @item nnfolder-directory
15088 @vindex nnfolder-directory
15089 All the @code{nnfolder} mail boxes will be stored under this directory.
15090 The default is the value of @code{message-directory} (whose default is
15091 @file{~/Mail})
15092
15093 @item nnfolder-active-file
15094 @vindex nnfolder-active-file
15095 The name of the active file.  The default is @file{~/Mail/active}.
15096
15097 @item nnfolder-newsgroups-file
15098 @vindex nnfolder-newsgroups-file
15099 The name of the group descriptions file.  @xref{Newsgroups File
15100 Format}.  The default is @file{~/Mail/newsgroups}
15101
15102 @item nnfolder-get-new-mail
15103 @vindex nnfolder-get-new-mail
15104 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15105 is @code{t}
15106
15107 @item nnfolder-save-buffer-hook
15108 @vindex nnfolder-save-buffer-hook
15109 @cindex backup files
15110 Hook run before saving the folders.  Note that Emacs does the normal
15111 backup renaming of files even with the @code{nnfolder} buffers.  If you
15112 wish to switch this off, you could say something like the following in
15113 your @file{.emacs} file:
15114
15115 @lisp
15116 (defun turn-off-backup ()
15117   (set (make-local-variable 'backup-inhibited) t))
15118
15119 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15120 @end lisp
15121
15122 @item nnfolder-delete-mail-hook
15123 @vindex nnfolder-delete-mail-hook
15124 Hook run in a buffer narrowed to the message that is to be deleted.
15125 This function can be used to copy the message to somewhere else, or to
15126 extract some information from it before removing it.
15127
15128 @item nnfolder-nov-is-evil
15129 @vindex nnfolder-nov-is-evil
15130 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15131 default is @code{nil}.
15132
15133 @item nnfolder-nov-file-suffix
15134 @vindex nnfolder-nov-file-suffix
15135 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15136
15137 @item nnfolder-nov-directory
15138 @vindex nnfolder-nov-directory
15139 The directory where the @acronym{NOV} files should be stored.  If
15140 @code{nil}, @code{nnfolder-directory} is used.
15141
15142 @item nnfolder-marks-is-evil
15143 @vindex nnfolder-marks-is-evil
15144 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15145 default is @code{nil}.
15146
15147 @item nnfolder-marks-file-suffix
15148 @vindex nnfolder-marks-file-suffix
15149 The extension for @sc{marks} files.  The default is @file{.mrk}.
15150
15151 @item nnfolder-marks-directory
15152 @vindex nnfolder-marks-directory
15153 The directory where the @sc{marks} files should be stored.  If
15154 @code{nil}, @code{nnfolder-directory} is used.
15155
15156 @end table
15157
15158
15159 @findex nnfolder-generate-active-file
15160 @kindex M-x nnfolder-generate-active-file
15161 If you have lots of @code{nnfolder}-like files you'd like to read with
15162 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15163 command to make @code{nnfolder} aware of all likely files in
15164 @code{nnfolder-directory}.  This only works if you use long file names,
15165 though.
15166
15167 @node Comparing Mail Back Ends
15168 @subsubsection Comparing Mail Back Ends
15169
15170 First, just for terminology, the @dfn{back end} is the common word for a
15171 low-level access method---a transport, if you will, by which something
15172 is acquired.  The sense is that one's mail has to come from somewhere,
15173 and so selection of a suitable back end is required in order to get that
15174 mail within spitting distance of Gnus.
15175
15176 The same concept exists for Usenet itself: Though access to articles is
15177 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15178 in the world got at Usenet by running a reader on the machine where the
15179 articles lay (the machine which today we call an @acronym{NNTP} server), and
15180 access was by the reader stepping into the articles' directory spool
15181 area directly.  One can still select between either the @code{nntp} or
15182 @code{nnspool} back ends, to select between these methods, if one happens
15183 actually to live on the server (or can see its spool directly, anyway,
15184 via NFS).
15185
15186 The goal in selecting a mail back end is to pick one which
15187 simultaneously represents a suitable way of dealing with the original
15188 format plus leaving mail in a form that is convenient to use in the
15189 future.  Here are some high and low points on each:
15190
15191 @table @code
15192 @item nnmbox
15193
15194 UNIX systems have historically had a single, very common, and well-
15195 defined format.  All messages arrive in a single @dfn{spool file}, and
15196 they are delineated by a line whose regular expression matches
15197 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15198 to make it clear in this instance that this is not the RFC-specified
15199 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15200 historically from the Unix environment, it is simplest if one does not
15201 mess a great deal with the original mailbox format, so if one chooses
15202 this back end, Gnus' primary activity in getting mail from the real spool
15203 area to Gnus' preferred directory is simply to copy it, with no
15204 (appreciable) format change in the process.  It is the ``dumbest'' way
15205 to move mail into availability in the Gnus environment.  This makes it
15206 fast to move into place, but slow to parse, when Gnus has to look at
15207 what's where.
15208
15209 @item nnbabyl
15210
15211 Once upon a time, there was the DEC-10 and DEC-20, running operating
15212 systems called TOPS and related things, and the usual (only?) mail
15213 reading environment was a thing called Babyl.  I don't know what format
15214 was used for mail landing on the system, but Babyl had its own internal
15215 format to which mail was converted, primarily involving creating a
15216 spool-file-like entity with a scheme for inserting Babyl-specific
15217 headers and status bits above the top of each message in the file.
15218 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15219 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15220 to understand the mail files folks already had in existence.  Gnus (and
15221 VM, for that matter) continue to support this format because it's
15222 perceived as having some good qualities in those mailer-specific
15223 headers/status bits stuff.  Rmail itself still exists as well, of
15224 course, and is still maintained by Stallman.
15225
15226 Both of the above forms leave your mail in a single file on your
15227 file system, and they must parse that entire file each time you take a
15228 look at your mail.
15229
15230 @item nnml
15231
15232 @code{nnml} is the back end which smells the most as though you were
15233 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15234 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15235 lo these years ago.)  One's mail is taken from the original spool file,
15236 and is then cut up into individual message files, 1:1.  It maintains a
15237 Usenet-style active file (analogous to what one finds in an INN- or
15238 CNews-based news system in (for instance) @file{/var/lib/news/active},
15239 or what is returned via the @samp{NNTP LIST} verb) and also creates
15240 @dfn{overview} files for efficient group entry, as has been defined for
15241 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15242 due to the creation of lots of files, updates to the @code{nnml} active
15243 file, and additions to overview files on a per-message basis, but it is
15244 extremely fast on access because of what amounts to the indexing support
15245 provided by the active file and overviews.
15246
15247 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15248 resource which defines available places in the file system to put new
15249 files.  Sysadmins take a dim view of heavy inode occupation within
15250 tight, shared file systems.  But if you live on a personal machine where
15251 the file system is your own and space is not at a premium, @code{nnml}
15252 wins big.
15253
15254 It is also problematic using this back end if you are living in a
15255 FAT16-based Windows world, since much space will be wasted on all these
15256 tiny files.
15257
15258 @item nnmh
15259
15260 The Rand MH mail-reading system has been around UNIX systems for a very
15261 long time; it operates by splitting one's spool file of messages into
15262 individual files, but with little or no indexing support---@code{nnmh}
15263 is considered to be semantically equivalent to ``@code{nnml} without
15264 active file or overviews''.  This is arguably the worst choice, because
15265 one gets the slowness of individual file creation married to the
15266 slowness of access parsing when learning what's new in one's groups.
15267
15268 @item nnfolder
15269
15270 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15271 method described above) on a per-group basis.  That is, @code{nnmbox}
15272 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15273 little bit of optimization to this so that each of one's mail groups has
15274 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15275 can be parsed separately, and still provides the simple Unix mail box
15276 format requiring minimal effort in moving the mail around.  In addition,
15277 it maintains an ``active'' file making it much faster for Gnus to figure
15278 out how many messages there are in each separate group.
15279
15280 If you have groups that are expected to have a massive amount of
15281 messages, @code{nnfolder} is not the best choice, but if you receive
15282 only a moderate amount of mail, @code{nnfolder} is probably the most
15283 friendly mail back end all over.
15284
15285 @item nnmaildir
15286
15287 For configuring expiry and other things, @code{nnmaildir} uses
15288 incompatible group parameters, slightly different from those of other
15289 mail back ends.
15290
15291 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15292 differences.  Each message is stored in a separate file, but the
15293 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15294 also stores the equivalent of @code{nnml}'s overview files in one file
15295 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15296 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15297 you down or takes up very much space, consider switching to
15298 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15299 file system.
15300
15301 Since maildirs don't require locking for delivery, the maildirs you use
15302 as groups can also be the maildirs your mail is directly delivered to.
15303 This means you can skip Gnus' mail splitting if your mail is already
15304 organized into different mailboxes during delivery.  A @code{directory}
15305 entry in @code{mail-sources} would have a similar effect, but would
15306 require one set of mailboxes for spooling deliveries (in mbox format,
15307 thus damaging message bodies), and another set to be used as groups (in
15308 whatever format you like).  A maildir has a built-in spool, in the
15309 @code{new/} subdirectory.  Beware that currently, mail moved from
15310 @code{new/} to @code{cur/} instead of via mail splitting will not
15311 undergo treatment such as duplicate checking.
15312
15313 @code{nnmaildir} stores article marks for a given group in the
15314 corresponding maildir, in a way designed so that it's easy to manipulate
15315 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15316 else, and still have your marks.  @code{nnml} also stores marks, but
15317 it's not as easy to work with them from outside Gnus as with
15318 @code{nnmaildir}.
15319
15320 @code{nnmaildir} uses a significant amount of memory to speed things up.
15321 (It keeps in memory some of the things that @code{nnml} stores in files
15322 and that @code{nnmh} repeatedly parses out of message files.)  If this
15323 is a problem for you, you can set the @code{nov-cache-size} group
15324 parameter to something small (0 would probably not work, but 1 probably
15325 would) to make it use less memory.  This caching will probably be
15326 removed in the future.
15327
15328 Startup is likely to be slower with @code{nnmaildir} than with other
15329 back ends.  Everything else is likely to be faster, depending in part
15330 on your file system.
15331
15332 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15333 to write an @code{nnmaildir}-derived back end.
15334
15335 @end table
15336
15337
15338 @node Browsing the Web
15339 @section Browsing the Web
15340 @cindex web
15341 @cindex browsing the web
15342 @cindex www
15343 @cindex http
15344
15345 Web-based discussion forums are getting more and more popular.  On many
15346 subjects, the web-based forums have become the most important forums,
15347 eclipsing the importance of mailing lists and news groups.  The reason
15348 is easy to understand---they are friendly to new users; you just point
15349 and click, and there's the discussion.  With mailing lists, you have to
15350 go through a cumbersome subscription procedure, and most people don't
15351 even know what a news group is.
15352
15353 The problem with this scenario is that web browsers are not very good at
15354 being newsreaders.  They do not keep track of what articles you've read;
15355 they do not allow you to score on subjects you're interested in; they do
15356 not allow off-line browsing; they require you to click around and drive
15357 you mad in the end.
15358
15359 So---if web browsers suck at reading discussion forums, why not use Gnus
15360 to do it instead?
15361
15362 Gnus has been getting a bit of a collection of back ends for providing
15363 interfaces to these sources.
15364
15365 @menu
15366 * Archiving Mail::
15367 * Web Searches::                Creating groups from articles that match a string.
15368 * Slashdot::                    Reading the Slashdot comments.
15369 * Ultimate::                    The Ultimate Bulletin Board systems.
15370 * Web Archive::                 Reading mailing list archived on web.
15371 * RSS::                         Reading RDF site summary.
15372 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15373 @end menu
15374
15375 All the web sources require Emacs/w3 and the url library to work.
15376
15377 The main caveat with all these web sources is that they probably won't
15378 work for a very long time.  Gleaning information from the @acronym{HTML} data
15379 is guesswork at best, and when the layout is altered, the Gnus back end
15380 will fail.  If you have reasonably new versions of these back ends,
15381 though, you should be ok.
15382
15383 One thing all these Web methods have in common is that the Web sources
15384 are often down, unavailable or just plain too slow to be fun.  In those
15385 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15386 Unplugged}) handle downloading articles, and then you can read them at
15387 leisure from your local disk.  No more World Wide Wait for you.
15388
15389 @node Archiving Mail
15390 @subsection Archiving Mail
15391 @cindex archiving mail
15392 @cindex backup of mail
15393
15394 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15395 @code{nnmaildir}, now actually store the article marks with each group.
15396 For these servers, archiving and restoring a group while preserving
15397 marks is fairly simple.
15398
15399 (Preserving the group level and group parameters as well still
15400 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15401 though.)
15402
15403 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15404 server, take a recursive copy of the server directory.  There is no need
15405 to shut down Gnus, so archiving may be invoked by @code{cron} or
15406 similar.  You restore the data by restoring the directory tree, and
15407 adding a server definition pointing to that directory in Gnus.  The
15408 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15409 might interfere with overwriting data, so you may want to shut down Gnus
15410 before you restore the data.
15411
15412 It is also possible to archive individual @code{nnml},
15413 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15414 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15415 directory.  For @code{nnfolder} you need to copy both the base folder
15416 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15417 this example).  Restoring the group is done with @kbd{G m} from the Group
15418 buffer.  The last step makes Gnus notice the new directory.
15419 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15420 is unnecessary in that case.
15421
15422 @node Web Searches
15423 @subsection Web Searches
15424 @cindex nnweb
15425 @cindex Google
15426 @cindex dejanews
15427 @cindex gmane
15428 @cindex Usenet searches
15429 @cindex searching the Usenet
15430
15431 It's, like, too neat to search the Usenet for articles that match a
15432 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15433 those, like, Web browsers, and you, like, have to, rilly, like, look at
15434 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15435 searches without having to use a browser.
15436
15437 The @code{nnweb} back end allows an easy interface to the mighty search
15438 engine.  You create an @code{nnweb} group, enter a search pattern, and
15439 then enter the group and read the articles like you would any normal
15440 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15441 Groups}) will do this in an easy-to-use fashion.
15442
15443 @code{nnweb} groups don't really lend themselves to being solid
15444 groups---they have a very fleeting idea of article numbers.  In fact,
15445 each time you enter an @code{nnweb} group (not even changing the search
15446 pattern), you are likely to get the articles ordered in a different
15447 manner.  Not even using duplicate suppression (@pxref{Duplicate
15448 Suppression}) will help, since @code{nnweb} doesn't even know the
15449 @code{Message-ID} of the articles before reading them using some search
15450 engines (Google, for instance).  The only possible way to keep track
15451 of which articles you've read is by scoring on the @code{Date}
15452 header---mark all articles posted before the last date you read the
15453 group as read.
15454
15455 If the search engine changes its output substantially, @code{nnweb}
15456 won't be able to parse it and will fail.  One could hardly fault the Web
15457 providers if they were to do this---their @emph{raison d'être} is to
15458 make money off of advertisements, not to provide services to the
15459 community.  Since @code{nnweb} washes the ads off all the articles, one
15460 might think that the providers might be somewhat miffed.  We'll see.
15461
15462 You must have the @code{url} and @code{w3} package installed to be able
15463 to use @code{nnweb}.
15464
15465 Virtual server variables:
15466
15467 @table @code
15468 @item nnweb-type
15469 @vindex nnweb-type
15470 What search engine type is being used.  The currently supported types
15471 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15472 @code{dejanews} is an alias to @code{google}.
15473
15474 @item nnweb-search
15475 @vindex nnweb-search
15476 The search string to feed to the search engine.
15477
15478 @item nnweb-max-hits
15479 @vindex nnweb-max-hits
15480 Advisory maximum number of hits per search to display.  The default is
15481 999.
15482
15483 @item nnweb-type-definition
15484 @vindex nnweb-type-definition
15485 Type-to-definition alist.  This alist says what @code{nnweb} should do
15486 with the various search engine types.  The following elements must be
15487 present:
15488
15489 @table @code
15490 @item article
15491 Function to decode the article and provide something that Gnus
15492 understands.
15493
15494 @item map
15495 Function to create an article number to message header and URL alist.
15496
15497 @item search
15498 Function to send the search string to the search engine.
15499
15500 @item address
15501 The address the aforementioned function should send the search string
15502 to.
15503
15504 @item id
15505 Format string URL to fetch an article by @code{Message-ID}.
15506 @end table
15507
15508 @end table
15509
15510
15511 @node Slashdot
15512 @subsection Slashdot
15513 @cindex Slashdot
15514 @cindex nnslashdot
15515
15516 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15517 lively discussion following the news articles.  @code{nnslashdot} will
15518 let you read this forum in a convenient manner.
15519
15520 The easiest way to read this source is to put something like the
15521 following in your @file{~/.gnus.el} file:
15522
15523 @lisp
15524 (setq gnus-secondary-select-methods
15525       '((nnslashdot "")))
15526 @end lisp
15527
15528 This will make Gnus query the @code{nnslashdot} back end for new comments
15529 and groups.  The @kbd{F} command will subscribe each new news article as
15530 a new Gnus group, and you can read the comments by entering these
15531 groups.  (Note that the default subscription method is to subscribe new
15532 groups as zombies.  Other methods are available (@pxref{Subscription
15533 Methods}).
15534
15535 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15536 command is the most handy tool (@pxref{Foreign Groups}).
15537
15538 When following up to @code{nnslashdot} comments (or posting new
15539 comments), some light @acronym{HTML}izations will be performed.  In
15540 particular, text quoted with @samp{> } will be quoted with
15541 @code{blockquote} instead, and signatures will have @code{br} added to
15542 the end of each line.  Other than that, you can just write @acronym{HTML}
15543 directly into the message buffer.  Note that Slashdot filters out some
15544 @acronym{HTML} forms.
15545
15546 The following variables can be altered to change its behavior:
15547
15548 @table @code
15549 @item nnslashdot-threaded
15550 Whether @code{nnslashdot} should display threaded groups or not.  The
15551 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15552 has to retrieve absolutely all comments in a group upon entry.  If a
15553 threaded display is not required, @code{nnslashdot} will only retrieve
15554 the comments that are actually wanted by the user.  Threading is nicer,
15555 but much, much slower than unthreaded.
15556
15557 @item nnslashdot-login-name
15558 @vindex nnslashdot-login-name
15559 The login name to use when posting.
15560
15561 @item nnslashdot-password
15562 @vindex nnslashdot-password
15563 The password to use when posting.
15564
15565 @item nnslashdot-directory
15566 @vindex nnslashdot-directory
15567 Where @code{nnslashdot} will store its files.  The default is
15568 @file{~/News/slashdot/}.
15569
15570 @item nnslashdot-active-url
15571 @vindex nnslashdot-active-url
15572 The @sc{url} format string that will be used to fetch the information on
15573 news articles and comments.  The default is@*
15574 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15575
15576 @item nnslashdot-comments-url
15577 @vindex nnslashdot-comments-url
15578 The @sc{url} format string that will be used to fetch comments.  The
15579 default is
15580 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15581
15582 @item nnslashdot-article-url
15583 @vindex nnslashdot-article-url
15584 The @sc{url} format string that will be used to fetch the news article.  The
15585 default is
15586 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15587
15588 @item nnslashdot-threshold
15589 @vindex nnslashdot-threshold
15590 The score threshold.  The default is -1.
15591
15592 @item nnslashdot-group-number
15593 @vindex nnslashdot-group-number
15594 The number of old groups, in addition to the ten latest, to keep
15595 updated.  The default is 0.
15596
15597 @end table
15598
15599
15600
15601 @node Ultimate
15602 @subsection Ultimate
15603 @cindex nnultimate
15604 @cindex Ultimate Bulletin Board
15605
15606 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15607 probably the most popular Web bulletin board system used.  It has a
15608 quite regular and nice interface, and it's possible to get the
15609 information Gnus needs to keep groups updated.
15610
15611 The easiest way to get started with @code{nnultimate} is to say
15612 something like the following in the group buffer:  @kbd{B nnultimate RET
15613 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15614 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15615 you're interested in; there's quite a list of them on the Ultimate web
15616 site.)  Then subscribe to the groups you're interested in from the
15617 server buffer, and read them from the group buffer.
15618
15619 The following @code{nnultimate} variables can be altered:
15620
15621 @table @code
15622 @item nnultimate-directory
15623 @vindex nnultimate-directory
15624 The directory where @code{nnultimate} stores its files.  The default is@*
15625 @file{~/News/ultimate/}.
15626 @end table
15627
15628
15629 @node Web Archive
15630 @subsection Web Archive
15631 @cindex nnwarchive
15632 @cindex Web Archive
15633
15634 Some mailing lists only have archives on Web servers, such as
15635 @uref{http://www.egroups.com/} and
15636 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15637 interface, and it's possible to get the information Gnus needs to keep
15638 groups updated.
15639
15640 @findex gnus-group-make-warchive-group
15641 The easiest way to get started with @code{nnwarchive} is to say
15642 something like the following in the group buffer: @kbd{M-x
15643 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15644 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15645 @var{an_egroup} with the mailing list you subscribed, the
15646 @var{your@@email.address} with your email address.), or to browse the
15647 back end by @kbd{B nnwarchive RET mail-archive RET}.
15648
15649 The following @code{nnwarchive} variables can be altered:
15650
15651 @table @code
15652 @item nnwarchive-directory
15653 @vindex nnwarchive-directory
15654 The directory where @code{nnwarchive} stores its files.  The default is@*
15655 @file{~/News/warchive/}.
15656
15657 @item nnwarchive-login
15658 @vindex nnwarchive-login
15659 The account name on the web server.
15660
15661 @item nnwarchive-passwd
15662 @vindex nnwarchive-passwd
15663 The password for your account on the web server.
15664 @end table
15665
15666 @node RSS
15667 @subsection RSS
15668 @cindex nnrss
15669 @cindex RSS
15670
15671 Some sites have RDF site summary (RSS)
15672 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15673 interface, and it's possible to get the information Gnus needs to keep
15674 groups updated.
15675
15676 The easiest way to get started with @code{nnrss} is to say something
15677 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15678 subscribe groups.
15679
15680 The following @code{nnrss} variables can be altered:
15681
15682 @table @code
15683 @item nnrss-directory
15684 @vindex nnrss-directory
15685 The directory where @code{nnrss} stores its files.  The default is
15686 @file{~/News/rss/}.
15687
15688 @end table
15689
15690 The following code may be helpful, if you want to show the description in
15691 the summary buffer.
15692
15693 @lisp
15694 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15695 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15696
15697 (defun gnus-user-format-function-X (header)
15698   (let ((descr
15699          (assq nnrss-description-field (mail-header-extra header))))
15700     (if descr (concat "\n\t" (cdr descr)) "")))
15701 @end lisp
15702
15703 The following code may be useful to open an nnrss url directly from the
15704 summary buffer.
15705 @lisp
15706 (require 'browse-url)
15707
15708 (defun browse-nnrss-url( arg )
15709   (interactive "p")
15710   (let ((url (assq nnrss-url-field
15711                    (mail-header-extra
15712                     (gnus-data-header
15713                      (assq (gnus-summary-article-number)
15714                            gnus-newsgroup-data))))))
15715     (if url
15716         (progn
15717           (browse-url (cdr url))
15718           (gnus-summary-mark-as-read-forward 1))
15719       (gnus-summary-scroll-up arg))))
15720
15721 (eval-after-load "gnus"
15722   #'(define-key gnus-summary-mode-map
15723       (kbd "<RET>") 'browse-nnrss-url))
15724 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15725 @end lisp
15726
15727 @node Customizing w3
15728 @subsection Customizing w3
15729 @cindex w3
15730 @cindex html
15731 @cindex url
15732 @cindex Netscape
15733
15734 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15735 pages.  Emacs/w3 is documented in its own manual, but there are some
15736 things that may be more relevant for Gnus users.
15737
15738 For instance, a common question is how to make Emacs/w3 follow links
15739 using the @code{browse-url} functions (which will call some external web
15740 browser like Netscape).  Here's one way:
15741
15742 @lisp
15743 (eval-after-load "w3"
15744   '(progn
15745     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15746     (defun w3-fetch (&optional url target)
15747       (interactive (list (w3-read-url-with-default)))
15748       (if (eq major-mode 'gnus-article-mode)
15749           (browse-url url)
15750         (w3-fetch-orig url target)))))
15751 @end lisp
15752
15753 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15754 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15755 follow the link.
15756
15757
15758 @node IMAP
15759 @section IMAP
15760 @cindex nnimap
15761 @cindex @acronym{IMAP}
15762
15763 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15764 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15765 server is much similar to connecting to a news server, you just
15766 specify the network address of the server.
15767
15768 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15769 everything that @acronym{POP} can, it can hence be viewed as a
15770 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15771 similar to @acronym{NNTP} being a news storage protocol---however,
15772 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15773 is more or less read-only whereas mail is read-write.
15774
15775 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15776 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15777 the @acronym{IMAP} server and store them on the local disk.  This is
15778 not the usage described in this section---@xref{Mail Sources}.
15779
15780 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15781 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15782 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15783 usage explained in this section.
15784
15785 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15786 servers might look something like the following.  (Note that for
15787 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15788 see below.)
15789
15790 @lisp
15791 (setq gnus-secondary-select-methods
15792       '((nnimap "simpleserver") ; @r{no special configuration}
15793         ; @r{perhaps a ssh port forwarded server:}
15794         (nnimap "dolk"
15795                 (nnimap-address "localhost")
15796                 (nnimap-server-port 1430))
15797         ; @r{a UW server running on localhost}
15798         (nnimap "barbar"
15799                 (nnimap-server-port 143)
15800                 (nnimap-address "localhost")
15801                 (nnimap-list-pattern ("INBOX" "mail/*")))
15802         ; @r{anonymous public cyrus server:}
15803         (nnimap "cyrus.andrew.cmu.edu"
15804                 (nnimap-authenticator anonymous)
15805                 (nnimap-list-pattern "archive.*")
15806                 (nnimap-stream network))
15807         ; @r{a ssl server on a non-standard port:}
15808         (nnimap "vic20"
15809                 (nnimap-address "vic20.somewhere.com")
15810                 (nnimap-server-port 9930)
15811                 (nnimap-stream ssl))))
15812 @end lisp
15813
15814 After defining the new server, you can subscribe to groups on the
15815 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15816 (@pxref{Subscription Commands}) or via the Server Buffer
15817 (@pxref{Server Buffer}).
15818
15819 The following variables can be used to create a virtual @code{nnimap}
15820 server:
15821
15822 @table @code
15823
15824 @item nnimap-address
15825 @vindex nnimap-address
15826
15827 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15828 server name if not specified.
15829
15830 @item nnimap-server-port
15831 @vindex nnimap-server-port
15832 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15833
15834 Note that this should be an integer, example server specification:
15835
15836 @lisp
15837 (nnimap "mail.server.com"
15838         (nnimap-server-port 4711))
15839 @end lisp
15840
15841 @item nnimap-list-pattern
15842 @vindex nnimap-list-pattern
15843 String or list of strings of mailboxes to limit available groups to.
15844 This is used when the server has very many mailboxes and you're only
15845 interested in a few---some servers export your home directory via
15846 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15847 @file{~/Mail/*} then.
15848
15849 The string can also be a cons of REFERENCE and the string as above, what
15850 REFERENCE is used for is server specific, but on the University of
15851 Washington server it's a directory that will be concatenated with the
15852 mailbox.
15853
15854 Example server specification:
15855
15856 @lisp
15857 (nnimap "mail.server.com"
15858         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15859                                ("~friend/Mail/" . "list/*"))))
15860 @end lisp
15861
15862 @item nnimap-stream
15863 @vindex nnimap-stream
15864 The type of stream used to connect to your server.  By default, nnimap
15865 will detect and automatically use all of the below, with the exception
15866 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
15867 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
15868 be automatically detected, but it's not widely deployed yet.)
15869
15870 Example server specification:
15871
15872 @lisp
15873 (nnimap "mail.server.com"
15874         (nnimap-stream ssl))
15875 @end lisp
15876
15877 Please note that the value of @code{nnimap-stream} is a symbol!
15878
15879 @itemize @bullet
15880 @item
15881 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
15882 @samp{gsasl} or @samp{imtest} program.
15883 @item
15884 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
15885 @item
15886 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15887 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15888 @samp{starttls}.
15889 @item
15890 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15891 @samp{gnutls-cli}).
15892 @item
15893 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15894 @samp{openssl}) or SSLeay (@samp{s_client}).
15895 @item
15896 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15897 @item
15898 @dfn{network:} Plain, TCP/IP network connection.
15899 @end itemize
15900
15901 @vindex imap-kerberos4-program
15902 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15903 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15904 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15905 to make @code{imap.el} use a pty instead of a pipe when communicating
15906 with @samp{imtest}.  You will then suffer from a line length
15907 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15908 indefinitely if you have many articles in a mailbox.  The variable
15909 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15910 program.
15911
15912 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15913 needed.  It is available from
15914 @uref{http://www.gnu.org/software/gnutls/}.
15915
15916 @vindex imap-gssapi-program
15917 This parameter specifies a list of command lines that invoke a GSSAPI
15918 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15919 sequentially until a connection is made, or the list has been
15920 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15921 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15922 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15923 tried.
15924
15925 @vindex imap-ssl-program
15926 For @acronym{SSL} connections, the OpenSSL program is available from
15927 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
15928 and nnimap support it too---although the most recent versions of
15929 SSLeay, 0.9.x, are known to have serious bugs making it
15930 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
15931 work.  The variable @code{imap-ssl-program} contain parameters to pass
15932 to OpenSSL/SSLeay.
15933
15934 @vindex imap-shell-program
15935 @vindex imap-shell-host
15936 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15937 @code{imap-shell-program} specify what program to call.
15938
15939 @item nnimap-authenticator
15940 @vindex nnimap-authenticator
15941
15942 The authenticator used to connect to the server.  By default, nnimap
15943 will use the most secure authenticator your server is capable of.
15944
15945 Example server specification:
15946
15947 @lisp
15948 (nnimap "mail.server.com"
15949         (nnimap-authenticator anonymous))
15950 @end lisp
15951
15952 Please note that the value of @code{nnimap-authenticator} is a symbol!
15953
15954 @itemize @bullet
15955 @item
15956 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
15957 external program @code{gsasl} or @code{imtest}.
15958 @item
15959 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
15960 @code{imtest}.
15961 @item
15962 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
15963 external library @code{digest-md5.el}.
15964 @item
15965 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15966 @item
15967 @dfn{login:} Plain-text username/password via LOGIN.
15968 @item
15969 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
15970 @end itemize
15971
15972 @item nnimap-expunge-on-close
15973 @cindex expunging
15974 @vindex nnimap-expunge-on-close
15975 Unlike Parmenides the @acronym{IMAP} designers have decided things that
15976 don't exist actually do exist.  More specifically, @acronym{IMAP} has
15977 this concept of marking articles @code{Deleted} which doesn't actually
15978 delete them, and this (marking them @code{Deleted}, that is) is what
15979 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15980 similar).
15981
15982 Since the articles aren't really removed when we mark them with the
15983 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15984 running in circles yet?
15985
15986 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15987 when closing a mailbox but this is now configurable by this server
15988 variable.
15989
15990 The possible options are:
15991
15992 @table @code
15993
15994 @item always
15995 The default behavior, delete all articles marked as ``Deleted'' when
15996 closing a mailbox.
15997 @item never
15998 Never actually delete articles.  Currently there is no way of showing
15999 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16000 may allow you to do this.  If you ever want to run the EXPUNGE command
16001 manually, @xref{Expunging mailboxes}.
16002 @item ask
16003 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16004 articles or not.
16005
16006 @end table
16007
16008 @item nnimap-importantize-dormant
16009 @vindex nnimap-importantize-dormant
16010
16011 If non-@code{nil} (the default), marks dormant articles as ticked (as
16012 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16013 naturally still (only) be marked as dormant.  This is to make dormant
16014 articles stand out, just like ticked articles, in other @acronym{IMAP}
16015 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16016 has only one.)
16017
16018 Probably the only reason for frobing this would be if you're trying
16019 enable per-user persistent dormant flags, using something like:
16020
16021 @lisp
16022 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16023         (format "gnus-dormant-%s" (user-login-name)))
16024 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16025         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16026 @end lisp
16027
16028 In this case, you would not want the per-user dormant flag showing up
16029 as ticked for other users.
16030
16031 @item nnimap-expunge-search-string
16032 @cindex expunging
16033 @vindex nnimap-expunge-search-string
16034
16035 This variable contain the @acronym{IMAP} search command sent to server when
16036 searching for articles eligible for expiring.  The default is
16037 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16038 UID set and the second @code{%s} is replaced by a date.
16039
16040 Probably the only useful value to change this to is
16041 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16042 messages instead of the internal article date.  See section 6.4.4 of
16043 RFC 2060 for more information on valid strings.
16044
16045 @item nnimap-authinfo-file
16046 @vindex nnimap-authinfo-file
16047
16048 A file containing credentials used to log in on servers.  The format is
16049 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16050 variable @code{nntp-authinfo-file} for exact syntax; also see
16051 @ref{NNTP}.
16052
16053 @item nnimap-need-unselect-to-notice-new-mail
16054 @vindex nnimap-need-unselect-to-notice-new-mail
16055
16056 Unselect mailboxes before looking for new mail in them.  Some servers
16057 seem to need this under some circumstances; it was reported that
16058 Courier 1.7.1 did.
16059
16060 @end table
16061
16062 @menu
16063 * Splitting in IMAP::           Splitting mail with nnimap.
16064 * Expiring in IMAP::            Expiring mail with nnimap.
16065 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16066 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16067 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16068 @end menu
16069
16070
16071
16072 @node Splitting in IMAP
16073 @subsection Splitting in IMAP
16074 @cindex splitting imap mail
16075
16076 Splitting is something Gnus users have loved and used for years, and now
16077 the rest of the world is catching up.  Yeah, dream on, not many
16078 @acronym{IMAP} servers have server side splitting and those that have
16079 splitting seem to use some non-standard protocol.  This means that
16080 @acronym{IMAP} support for Gnus has to do its own splitting.
16081
16082 And it does.
16083
16084 (Incidentally, people seem to have been dreaming on, and Sieve has
16085 gaining a market share and is supported by several IMAP servers.
16086 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16087
16088 Here are the variables of interest:
16089
16090 @table @code
16091
16092 @item nnimap-split-crosspost
16093 @cindex splitting, crosspost
16094 @cindex crosspost
16095 @vindex nnimap-split-crosspost
16096
16097 If non-@code{nil}, do crossposting if several split methods match the
16098 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16099 found will be used.
16100
16101 Nnmail equivalent: @code{nnmail-crosspost}.
16102
16103 @item nnimap-split-inbox
16104 @cindex splitting, inbox
16105 @cindex inbox
16106 @vindex nnimap-split-inbox
16107
16108 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16109 mailboxes to split from.  Defaults to @code{nil}, which means that
16110 splitting is disabled!
16111
16112 @lisp
16113 (setq nnimap-split-inbox
16114       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16115 @end lisp
16116
16117 No nnmail equivalent.
16118
16119 @item nnimap-split-rule
16120 @cindex splitting, rules
16121 @vindex nnimap-split-rule
16122
16123 New mail found in @code{nnimap-split-inbox} will be split according to
16124 this variable.
16125
16126 This variable contains a list of lists, where the first element in the
16127 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16128 matching the regexp in the second element in the sublist.  Got that?
16129 Neither did I, we need examples.
16130
16131 @lisp
16132 (setq nnimap-split-rule
16133       '(("INBOX.nnimap"
16134          "^Sender: owner-nnimap@@vic20.globalcom.se")
16135         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16136         ("INBOX.private" "")))
16137 @end lisp
16138
16139 This will put all articles from the nnimap mailing list into mailbox
16140 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16141 into INBOX.junk and everything else in INBOX.private.
16142
16143 The first string may contain @samp{\\1} forms, like the ones used by
16144 replace-match to insert sub-expressions from the matched text.  For
16145 instance:
16146
16147 @lisp
16148 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16149 @end lisp
16150
16151 The first element can also be the symbol @code{junk} to indicate that
16152 matching messages should simply be deleted.  Use with care.
16153
16154 The second element can also be a function.  In that case, it will be
16155 called with the first element of the rule as the argument, in a buffer
16156 containing the headers of the article.  It should return a
16157 non-@code{nil} value if it thinks that the mail belongs in that group.
16158
16159 Nnmail users might recollect that the last regexp had to be empty to
16160 match all articles (like in the example above).  This is not required in
16161 nnimap.  Articles not matching any of the regexps will not be moved out
16162 of your inbox.  (This might affect performance if you keep lots of
16163 unread articles in your inbox, since the splitting code would go over
16164 them every time you fetch new mail.)
16165
16166 These rules are processed from the beginning of the alist toward the
16167 end.  The first rule to make a match will ``win'', unless you have
16168 crossposting enabled.  In that case, all matching rules will ``win''.
16169
16170 This variable can also have a function as its value, the function will
16171 be called with the headers narrowed and should return a group where it
16172 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16173
16174 The splitting code tries to create mailboxes if it needs to.
16175
16176 To allow for different split rules on different virtual servers, and
16177 even different split rules in different inboxes on the same server,
16178 the syntax of this variable have been extended along the lines of:
16179
16180 @lisp
16181 (setq nnimap-split-rule
16182       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16183                                ("junk"    "From:.*Simon"))))
16184         ("my2server"    ("INBOX" nnimap-split-fancy))
16185         ("my[34]server" (".*" (("private" "To:.*Simon")
16186                                ("junk"    my-junk-func))))))
16187 @end lisp
16188
16189 The virtual server name is in fact a regexp, so that the same rules
16190 may apply to several servers.  In the example, the servers
16191 @code{my3server} and @code{my4server} both use the same rules.
16192 Similarly, the inbox string is also a regexp.  The actual splitting
16193 rules are as before, either a function, or a list with group/regexp or
16194 group/function elements.
16195
16196 Nnmail equivalent: @code{nnmail-split-methods}.
16197
16198 @item nnimap-split-predicate
16199 @cindex splitting
16200 @vindex nnimap-split-predicate
16201
16202 Mail matching this predicate in @code{nnimap-split-inbox} will be
16203 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16204
16205 This might be useful if you use another @acronym{IMAP} client to read mail in
16206 your inbox but would like Gnus to split all articles in the inbox
16207 regardless of readedness.  Then you might change this to
16208 @samp{UNDELETED}.
16209
16210 @item nnimap-split-fancy
16211 @cindex splitting, fancy
16212 @findex nnimap-split-fancy
16213 @vindex nnimap-split-fancy
16214
16215 It's possible to set @code{nnimap-split-rule} to
16216 @code{nnmail-split-fancy} if you want to use fancy
16217 splitting.  @xref{Fancy Mail Splitting}.
16218
16219 However, to be able to have different fancy split rules for nnmail and
16220 nnimap back ends you can set @code{nnimap-split-rule} to
16221 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16222 rule in @code{nnimap-split-fancy}.
16223
16224 Example:
16225
16226 @lisp
16227 (setq nnimap-split-rule 'nnimap-split-fancy
16228       nnimap-split-fancy ...)
16229 @end lisp
16230
16231 Nnmail equivalent: @code{nnmail-split-fancy}.
16232
16233 @item nnimap-split-download-body
16234 @findex nnimap-split-download-body
16235 @vindex nnimap-split-download-body
16236
16237 Set to non-@code{nil} to download entire articles during splitting.
16238 This is generally not required, and will slow things down
16239 considerably.  You may need it if you want to use an advanced
16240 splitting function that analyses the body to split the article.
16241
16242 @end table
16243
16244 @node Expiring in IMAP
16245 @subsection Expiring in IMAP
16246 @cindex expiring imap mail
16247
16248 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16249 end, it supports most features in regular expiring (@pxref{Expiring
16250 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16251 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16252 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16253 follows below are the variables used by the @code{nnimap} expiry
16254 process.
16255
16256 A note on how the expire mark is stored on the @acronym{IMAP} server is
16257 appropriate here as well.  The expire mark is translated into a
16258 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16259 message.  This means that likely only Gnus will understand and treat
16260 the @code{gnus-expire} mark properly, although other clients may allow
16261 you to view client specific flags on the message.  It also means that
16262 your server must support permanent storage of client specific flags on
16263 messages.  Most do, fortunately.
16264
16265 @table @code
16266
16267 @item nnmail-expiry-wait
16268 @item nnmail-expiry-wait-function
16269
16270 These variables are fully supported.  The expire value can be a
16271 number, the symbol @code{immediate} or @code{never}.
16272
16273 @item nnmail-expiry-target
16274
16275 This variable is supported, and internally implemented by calling the
16276 @code{nnmail} functions that handle this.  It contains an optimization
16277 that if the destination is a @acronym{IMAP} group on the same server, the
16278 article is copied instead of appended (that is, uploaded again).
16279
16280 @end table
16281
16282 @node Editing IMAP ACLs
16283 @subsection Editing IMAP ACLs
16284 @cindex editing imap acls
16285 @cindex Access Control Lists
16286 @cindex Editing @acronym{IMAP} ACLs
16287 @kindex G l
16288 @findex gnus-group-nnimap-edit-acl
16289
16290 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16291 limiting (or enabling) other users access to your mail boxes.  Not all
16292 @acronym{IMAP} servers support this, this function will give an error if it
16293 doesn't.
16294
16295 To edit an ACL for a mailbox, type @kbd{G l}
16296 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16297 editing window with detailed instructions.
16298
16299 Some possible uses:
16300
16301 @itemize @bullet
16302 @item
16303 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16304 on your mailing list mailboxes enables other users on the same server to
16305 follow the list without subscribing to it.
16306 @item
16307 At least with the Cyrus server, you are required to give the user
16308 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16309 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16310 INBOX.mailbox).
16311 @end itemize
16312
16313 @node Expunging mailboxes
16314 @subsection Expunging mailboxes
16315 @cindex expunging
16316
16317 @cindex expunge
16318 @cindex manual expunging
16319 @kindex G x
16320 @findex gnus-group-nnimap-expunge
16321
16322 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16323 you may want the option of expunging all deleted articles in a mailbox
16324 manually.  This is exactly what @kbd{G x} does.
16325
16326 Currently there is no way of showing deleted articles, you can just
16327 delete them.
16328
16329 @node A note on namespaces
16330 @subsection A note on namespaces
16331 @cindex IMAP namespace
16332 @cindex namespaces
16333
16334 The @acronym{IMAP} protocol has a concept called namespaces, described
16335 by the following text in the RFC:
16336
16337 @display
16338 5.1.2.  Mailbox Namespace Naming Convention
16339
16340    By convention, the first hierarchical element of any mailbox name
16341    which begins with "#" identifies the "namespace" of the remainder of
16342    the name.  This makes it possible to disambiguate between different
16343    types of mailbox stores, each of which have their own namespaces.
16344
16345       For example, implementations which offer access to USENET
16346       newsgroups MAY use the "#news" namespace to partition the USENET
16347       newsgroup namespace from that of other mailboxes.  Thus, the
16348       comp.mail.misc newsgroup would have an mailbox name of
16349       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16350       to a different object (e.g. a user's private mailbox).
16351 @end display
16352
16353 While there is nothing in this text that warrants concern for the
16354 @acronym{IMAP} implementation in Gnus, some servers use namespace
16355 prefixes in a way that does not work with how Gnus uses mailbox names.
16356
16357 Specifically, University of Washington's @acronym{IMAP} server uses
16358 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16359 in the @sc{create} and @sc{append} commands.  After the mailbox is
16360 created (or a messages is appended to a mailbox), it must be accessed
16361 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16362 not make it possible for the user to guarantee that user entered
16363 mailbox names will only be used with the CREATE and APPEND commands,
16364 you should simply not use the namespace prefixed mailbox names in
16365 Gnus.
16366
16367 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16368 for more information on how to use the prefixes.  They are a power
16369 tool and should be used only if you are sure what the effects are.
16370
16371 @node Other Sources
16372 @section Other Sources
16373
16374 Gnus can do more than just read news or mail.  The methods described
16375 below allow Gnus to view directories and files as if they were
16376 newsgroups.
16377
16378 @menu
16379 * Directory Groups::            You can read a directory as if it was a newsgroup.
16380 * Anything Groups::             Dired?  Who needs dired?
16381 * Document Groups::             Single files can be the basis of a group.
16382 * SOUP::                        Reading @sc{soup} packets ``offline''.
16383 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16384 @end menu
16385
16386
16387 @node Directory Groups
16388 @subsection Directory Groups
16389 @cindex nndir
16390 @cindex directory groups
16391
16392 If you have a directory that has lots of articles in separate files in
16393 it, you might treat it as a newsgroup.  The files have to have numerical
16394 names, of course.
16395
16396 This might be an opportune moment to mention @code{ange-ftp} (and its
16397 successor @code{efs}), that most wonderful of all wonderful Emacs
16398 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16399 back end to read directories.  Big deal.
16400
16401 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16402 enter the @code{ange-ftp} file name
16403 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16404 @code{ange-ftp} or @code{efs} will actually allow you to read this
16405 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16406
16407 @code{nndir} will use @acronym{NOV} files if they are present.
16408
16409 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16410 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16411 whatever you use @code{nndir} for, so you could switch to any of those
16412 methods if you feel the need to have a non-read-only @code{nndir}.
16413
16414
16415 @node Anything Groups
16416 @subsection Anything Groups
16417 @cindex nneething
16418
16419 From the @code{nndir} back end (which reads a single spool-like
16420 directory), it's just a hop and a skip to @code{nneething}, which
16421 pretends that any arbitrary directory is a newsgroup.  Strange, but
16422 true.
16423
16424 When @code{nneething} is presented with a directory, it will scan this
16425 directory and assign article numbers to each file.  When you enter such
16426 a group, @code{nneething} must create ``headers'' that Gnus can use.
16427 After all, Gnus is a newsreader, in case you're forgetting.
16428 @code{nneething} does this in a two-step process.  First, it snoops each
16429 file in question.  If the file looks like an article (i.e., the first
16430 few lines look like headers), it will use this as the head.  If this is
16431 just some arbitrary file without a head (e.g. a C source file),
16432 @code{nneething} will cobble up a header out of thin air.  It will use
16433 file ownership, name and date and do whatever it can with these
16434 elements.
16435
16436 All this should happen automatically for you, and you will be presented
16437 with something that looks very much like a newsgroup.  Totally like a
16438 newsgroup, to be precise.  If you select an article, it will be displayed
16439 in the article buffer, just as usual.
16440
16441 If you select a line that represents a directory, Gnus will pop you into
16442 a new summary buffer for this @code{nneething} group.  And so on.  You can
16443 traverse the entire disk this way, if you feel like, but remember that
16444 Gnus is not dired, really, and does not intend to be, either.
16445
16446 There are two overall modes to this action---ephemeral or solid.  When
16447 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16448 will not store information on what files you have read, and what files
16449 are new, and so on.  If you create a solid @code{nneething} group the
16450 normal way with @kbd{G m}, Gnus will store a mapping table between
16451 article numbers and file names, and you can treat this group like any
16452 other groups.  When you activate a solid @code{nneething} group, you will
16453 be told how many unread articles it contains, etc., etc.
16454
16455 Some variables:
16456
16457 @table @code
16458 @item nneething-map-file-directory
16459 @vindex nneething-map-file-directory
16460 All the mapping files for solid @code{nneething} groups will be stored
16461 in this directory, which defaults to @file{~/.nneething/}.
16462
16463 @item nneething-exclude-files
16464 @vindex nneething-exclude-files
16465 All files that match this regexp will be ignored.  Nice to use to exclude
16466 auto-save files and the like, which is what it does by default.
16467
16468 @item nneething-include-files
16469 @vindex nneething-include-files
16470 Regexp saying what files to include in the group.  If this variable is
16471 non-@code{nil}, only files matching this regexp will be included.
16472
16473 @item nneething-map-file
16474 @vindex nneething-map-file
16475 Name of the map files.
16476 @end table
16477
16478
16479 @node Document Groups
16480 @subsection Document Groups
16481 @cindex nndoc
16482 @cindex documentation group
16483 @cindex help group
16484
16485 @code{nndoc} is a cute little thing that will let you read a single file
16486 as a newsgroup.  Several files types are supported:
16487
16488 @table @code
16489 @cindex Babyl
16490 @cindex Rmail mbox
16491
16492 @item babyl
16493 The Babyl (Rmail) mail box.
16494 @cindex mbox
16495 @cindex Unix mbox
16496
16497 @item mbox
16498 The standard Unix mbox file.
16499
16500 @cindex MMDF mail box
16501 @item mmdf
16502 The MMDF mail box format.
16503
16504 @item news
16505 Several news articles appended into a file.
16506
16507 @item rnews
16508 @cindex rnews batch files
16509 The rnews batch transport format.
16510 @cindex forwarded messages
16511
16512 @item forward
16513 Forwarded articles.
16514
16515 @item nsmail
16516 Netscape mail boxes.
16517
16518 @item mime-parts
16519 @acronym{MIME} multipart messages.
16520
16521 @item standard-digest
16522 The standard (RFC 1153) digest format.
16523
16524 @item mime-digest
16525 A @acronym{MIME} digest of messages.
16526
16527 @item lanl-gov-announce
16528 Announcement messages from LANL Gov Announce.
16529
16530 @item rfc822-forward
16531 A message forwarded according to RFC822.
16532
16533 @item outlook
16534 The Outlook mail box.
16535
16536 @item oe-dbx
16537 The Outlook Express dbx mail box.
16538
16539 @item exim-bounce
16540 A bounce message from the Exim MTA.
16541
16542 @item forward
16543 A message forwarded according to informal rules.
16544
16545 @item rfc934
16546 An RFC934-forwarded message.
16547
16548 @item mailman
16549 A mailman digest.
16550
16551 @item clari-briefs
16552 A digest of Clarinet brief news items.
16553
16554 @item slack-digest
16555 Non-standard digest format---matches most things, but does it badly.
16556
16557 @item mail-in-mail
16558 The last resort.
16559 @end table
16560
16561 You can also use the special ``file type'' @code{guess}, which means
16562 that @code{nndoc} will try to guess what file type it is looking at.
16563 @code{digest} means that @code{nndoc} should guess what digest type the
16564 file is.
16565
16566 @code{nndoc} will not try to change the file or insert any extra headers into
16567 it---it will simply, like, let you use the file as the basis for a
16568 group.  And that's it.
16569
16570 If you have some old archived articles that you want to insert into your
16571 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16572 that.  Say you have an old @file{RMAIL} file with mail that you now want
16573 to split into your new @code{nnml} groups.  You look at that file using
16574 @code{nndoc} (using the @kbd{G f} command in the group buffer
16575 (@pxref{Foreign Groups})), set the process mark on all the articles in
16576 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16577 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16578 file is now also stored in lots of @code{nnml} directories, and you can
16579 delete that pesky @file{RMAIL} file.  If you have the guts!
16580
16581 Virtual server variables:
16582
16583 @table @code
16584 @item nndoc-article-type
16585 @vindex nndoc-article-type
16586 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16587 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16588 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16589 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16590 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16591
16592 @item nndoc-post-type
16593 @vindex nndoc-post-type
16594 This variable says whether Gnus is to consider the group a news group or
16595 a mail group.  There are two valid values:  @code{mail} (the default)
16596 and @code{news}.
16597 @end table
16598
16599 @menu
16600 * Document Server Internals::   How to add your own document types.
16601 @end menu
16602
16603
16604 @node Document Server Internals
16605 @subsubsection Document Server Internals
16606
16607 Adding new document types to be recognized by @code{nndoc} isn't
16608 difficult.  You just have to whip up a definition of what the document
16609 looks like, write a predicate function to recognize that document type,
16610 and then hook into @code{nndoc}.
16611
16612 First, here's an example document type definition:
16613
16614 @example
16615 (mmdf
16616  (article-begin .  "^\^A\^A\^A\^A\n")
16617  (body-end .  "^\^A\^A\^A\^A\n"))
16618 @end example
16619
16620 The definition is simply a unique @dfn{name} followed by a series of
16621 regexp pseudo-variable settings.  Below are the possible
16622 variables---don't be daunted by the number of variables; most document
16623 types can be defined with very few settings:
16624
16625 @table @code
16626 @item first-article
16627 If present, @code{nndoc} will skip past all text until it finds
16628 something that match this regexp.  All text before this will be
16629 totally ignored.
16630
16631 @item article-begin
16632 This setting has to be present in all document type definitions.  It
16633 says what the beginning of each article looks like.
16634
16635 @item head-begin-function
16636 If present, this should be a function that moves point to the head of
16637 the article.
16638
16639 @item nndoc-head-begin
16640 If present, this should be a regexp that matches the head of the
16641 article.
16642
16643 @item nndoc-head-end
16644 This should match the end of the head of the article.  It defaults to
16645 @samp{^$}---the empty line.
16646
16647 @item body-begin-function
16648 If present, this function should move point to the beginning of the body
16649 of the article.
16650
16651 @item body-begin
16652 This should match the beginning of the body of the article.  It defaults
16653 to @samp{^\n}.
16654
16655 @item body-end-function
16656 If present, this function should move point to the end of the body of
16657 the article.
16658
16659 @item body-end
16660 If present, this should match the end of the body of the article.
16661
16662 @item file-end
16663 If present, this should match the end of the file.  All text after this
16664 regexp will be totally ignored.
16665
16666 @end table
16667
16668 So, using these variables @code{nndoc} is able to dissect a document
16669 file into a series of articles, each with a head and a body.  However, a
16670 few more variables are needed since not all document types are all that
16671 news-like---variables needed to transform the head or the body into
16672 something that's palatable for Gnus:
16673
16674 @table @code
16675 @item prepare-body-function
16676 If present, this function will be called when requesting an article.  It
16677 will be called with point at the start of the body, and is useful if the
16678 document has encoded some parts of its contents.
16679
16680 @item article-transform-function
16681 If present, this function is called when requesting an article.  It's
16682 meant to be used for more wide-ranging transformation of both head and
16683 body of the article.
16684
16685 @item generate-head-function
16686 If present, this function is called to generate a head that Gnus can
16687 understand.  It is called with the article number as a parameter, and is
16688 expected to generate a nice head for the article in question.  It is
16689 called when requesting the headers of all articles.
16690
16691 @end table
16692
16693 Let's look at the most complicated example I can come up with---standard
16694 digests:
16695
16696 @example
16697 (standard-digest
16698  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16699  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16700  (prepare-body-function . nndoc-unquote-dashes)
16701  (body-end-function . nndoc-digest-body-end)
16702  (head-end . "^ ?$")
16703  (body-begin . "^ ?\n")
16704  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16705  (subtype digest guess))
16706 @end example
16707
16708 We see that all text before a 70-width line of dashes is ignored; all
16709 text after a line that starts with that @samp{^End of} is also ignored;
16710 each article begins with a 30-width line of dashes; the line separating
16711 the head from the body may contain a single space; and that the body is
16712 run through @code{nndoc-unquote-dashes} before being delivered.
16713
16714 To hook your own document definition into @code{nndoc}, use the
16715 @code{nndoc-add-type} function.  It takes two parameters---the first
16716 is the definition itself and the second (optional) parameter says
16717 where in the document type definition alist to put this definition.
16718 The alist is traversed sequentially, and
16719 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16720 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16721 @code{mmdf} type, and so on.  These type predicates should return
16722 @code{nil} if the document is not of the correct type; @code{t} if it
16723 is of the correct type; and a number if the document might be of the
16724 correct type.  A high number means high probability; a low number
16725 means low probability with @samp{0} being the lowest valid number.
16726
16727
16728 @node SOUP
16729 @subsection SOUP
16730 @cindex SOUP
16731 @cindex offline
16732
16733 In the PC world people often talk about ``offline'' newsreaders.  These
16734 are thingies that are combined reader/news transport monstrosities.
16735 With built-in modem programs.  Yecchh!
16736
16737 Of course, us Unix Weenie types of human beans use things like
16738 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16739 transport things like Ghod intended.  And then we just use normal
16740 newsreaders.
16741
16742 However, it can sometimes be convenient to do something that's a bit
16743 easier on the brain if you have a very slow modem, and you're not really
16744 that interested in doing things properly.
16745
16746 A file format called @sc{soup} has been developed for transporting news
16747 and mail from servers to home machines and back again.  It can be a bit
16748 fiddly.
16749
16750 First some terminology:
16751
16752 @table @dfn
16753
16754 @item server
16755 This is the machine that is connected to the outside world and where you
16756 get news and/or mail from.
16757
16758 @item home machine
16759 This is the machine that you want to do the actual reading and responding
16760 on.  It is typically not connected to the rest of the world in any way.
16761
16762 @item packet
16763 Something that contains messages and/or commands.  There are two kinds
16764 of packets:
16765
16766 @table @dfn
16767 @item message packets
16768 These are packets made at the server, and typically contain lots of
16769 messages for you to read.  These are called @file{SoupoutX.tgz} by
16770 default, where @var{x} is a number.
16771
16772 @item response packets
16773 These are packets made at the home machine, and typically contains
16774 replies that you've written.  These are called @file{SoupinX.tgz} by
16775 default, where @var{x} is a number.
16776
16777 @end table
16778
16779 @end table
16780
16781
16782 @enumerate
16783
16784 @item
16785 You log in on the server and create a @sc{soup} packet.  You can either
16786 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16787 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16788 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16789
16790 @item
16791 You transfer the packet home.  Rail, boat, car or modem will do fine.
16792
16793 @item
16794 You put the packet in your home directory.
16795
16796 @item
16797 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16798 the native or secondary server.
16799
16800 @item
16801 You read articles and mail and answer and followup to the things you
16802 want (@pxref{SOUP Replies}).
16803
16804 @item
16805 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16806 packet.
16807
16808 @item
16809 You transfer this packet to the server.
16810
16811 @item
16812 You use Gnus to mail this packet out with the @kbd{G s s} command.
16813
16814 @item
16815 You then repeat until you die.
16816
16817 @end enumerate
16818
16819 So you basically have a bipartite system---you use @code{nnsoup} for
16820 reading and Gnus for packing/sending these @sc{soup} packets.
16821
16822 @menu
16823 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16824 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16825 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16826 @end menu
16827
16828
16829 @node SOUP Commands
16830 @subsubsection SOUP Commands
16831
16832 These are commands for creating and manipulating @sc{soup} packets.
16833
16834 @table @kbd
16835 @item G s b
16836 @kindex G s b (Group)
16837 @findex gnus-group-brew-soup
16838 Pack all unread articles in the current group
16839 (@code{gnus-group-brew-soup}).  This command understands the
16840 process/prefix convention.
16841
16842 @item G s w
16843 @kindex G s w (Group)
16844 @findex gnus-soup-save-areas
16845 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16846
16847 @item G s s
16848 @kindex G s s (Group)
16849 @findex gnus-soup-send-replies
16850 Send all replies from the replies packet
16851 (@code{gnus-soup-send-replies}).
16852
16853 @item G s p
16854 @kindex G s p (Group)
16855 @findex gnus-soup-pack-packet
16856 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16857
16858 @item G s r
16859 @kindex G s r (Group)
16860 @findex nnsoup-pack-replies
16861 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16862
16863 @item O s
16864 @kindex O s (Summary)
16865 @findex gnus-soup-add-article
16866 This summary-mode command adds the current article to a @sc{soup} packet
16867 (@code{gnus-soup-add-article}).  It understands the process/prefix
16868 convention (@pxref{Process/Prefix}).
16869
16870 @end table
16871
16872
16873 There are a few variables to customize where Gnus will put all these
16874 thingies:
16875
16876 @table @code
16877
16878 @item gnus-soup-directory
16879 @vindex gnus-soup-directory
16880 Directory where Gnus will save intermediate files while composing
16881 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16882
16883 @item gnus-soup-replies-directory
16884 @vindex gnus-soup-replies-directory
16885 This is what Gnus will use as a temporary directory while sending our
16886 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16887
16888 @item gnus-soup-prefix-file
16889 @vindex gnus-soup-prefix-file
16890 Name of the file where Gnus stores the last used prefix.  The default is
16891 @samp{gnus-prefix}.
16892
16893 @item gnus-soup-packer
16894 @vindex gnus-soup-packer
16895 A format string command for packing a @sc{soup} packet.  The default is
16896 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16897
16898 @item gnus-soup-unpacker
16899 @vindex gnus-soup-unpacker
16900 Format string command for unpacking a @sc{soup} packet.  The default is
16901 @samp{gunzip -c %s | tar xvf -}.
16902
16903 @item gnus-soup-packet-directory
16904 @vindex gnus-soup-packet-directory
16905 Where Gnus will look for reply packets.  The default is @file{~/}.
16906
16907 @item gnus-soup-packet-regexp
16908 @vindex gnus-soup-packet-regexp
16909 Regular expression matching @sc{soup} reply packets in
16910 @code{gnus-soup-packet-directory}.
16911
16912 @end table
16913
16914
16915 @node SOUP Groups
16916 @subsubsection SOUP Groups
16917 @cindex nnsoup
16918
16919 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16920 read incoming packets, unpack them, and put them in a directory where
16921 you can read them at leisure.
16922
16923 These are the variables you can use to customize its behavior:
16924
16925 @table @code
16926
16927 @item nnsoup-tmp-directory
16928 @vindex nnsoup-tmp-directory
16929 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16930 directory.  (@file{/tmp/} by default.)
16931
16932 @item nnsoup-directory
16933 @vindex nnsoup-directory
16934 @code{nnsoup} then moves each message and index file to this directory.
16935 The default is @file{~/SOUP/}.
16936
16937 @item nnsoup-replies-directory
16938 @vindex nnsoup-replies-directory
16939 All replies will be stored in this directory before being packed into a
16940 reply packet.  The default is @file{~/SOUP/replies/}.
16941
16942 @item nnsoup-replies-format-type
16943 @vindex nnsoup-replies-format-type
16944 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16945 (rnews), and I don't think you should touch that variable.  I probably
16946 shouldn't even have documented it.  Drats!  Too late!
16947
16948 @item nnsoup-replies-index-type
16949 @vindex nnsoup-replies-index-type
16950 The index type of the replies packet.  The default is @samp{?n}, which
16951 means ``none''.  Don't fiddle with this one either!
16952
16953 @item nnsoup-active-file
16954 @vindex nnsoup-active-file
16955 Where @code{nnsoup} stores lots of information.  This is not an ``active
16956 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16957 this file or mess it up in any way, you're dead.  The default is
16958 @file{~/SOUP/active}.
16959
16960 @item nnsoup-packer
16961 @vindex nnsoup-packer
16962 Format string command for packing a reply @sc{soup} packet.  The default
16963 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16964
16965 @item nnsoup-unpacker
16966 @vindex nnsoup-unpacker
16967 Format string command for unpacking incoming @sc{soup} packets.  The
16968 default is @samp{gunzip -c %s | tar xvf -}.
16969
16970 @item nnsoup-packet-directory
16971 @vindex nnsoup-packet-directory
16972 Where @code{nnsoup} will look for incoming packets.  The default is
16973 @file{~/}.
16974
16975 @item nnsoup-packet-regexp
16976 @vindex nnsoup-packet-regexp
16977 Regular expression matching incoming @sc{soup} packets.  The default is
16978 @samp{Soupout}.
16979
16980 @item nnsoup-always-save
16981 @vindex nnsoup-always-save
16982 If non-@code{nil}, save the replies buffer after each posted message.
16983
16984 @end table
16985
16986
16987 @node SOUP Replies
16988 @subsubsection SOUP Replies
16989
16990 Just using @code{nnsoup} won't mean that your postings and mailings end
16991 up in @sc{soup} reply packets automagically.  You have to work a bit
16992 more for that to happen.
16993
16994 @findex nnsoup-set-variables
16995 The @code{nnsoup-set-variables} command will set the appropriate
16996 variables to ensure that all your followups and replies end up in the
16997 @sc{soup} system.
16998
16999 In specific, this is what it does:
17000
17001 @lisp
17002 (setq message-send-news-function 'nnsoup-request-post)
17003 (setq message-send-mail-function 'nnsoup-request-mail)
17004 @end lisp
17005
17006 And that's it, really.  If you only want news to go into the @sc{soup}
17007 system you just use the first line.  If you only want mail to be
17008 @sc{soup}ed you use the second.
17009
17010
17011 @node Mail-To-News Gateways
17012 @subsection Mail-To-News Gateways
17013 @cindex mail-to-news gateways
17014 @cindex gateways
17015
17016 If your local @code{nntp} server doesn't allow posting, for some reason
17017 or other, you can post using one of the numerous mail-to-news gateways.
17018 The @code{nngateway} back end provides the interface.
17019
17020 Note that you can't read anything from this back end---it can only be
17021 used to post with.
17022
17023 Server variables:
17024
17025 @table @code
17026 @item nngateway-address
17027 @vindex nngateway-address
17028 This is the address of the mail-to-news gateway.
17029
17030 @item nngateway-header-transformation
17031 @vindex nngateway-header-transformation
17032 News headers often have to be transformed in some odd way or other
17033 for the mail-to-news gateway to accept it.  This variable says what
17034 transformation should be called, and defaults to
17035 @code{nngateway-simple-header-transformation}.  The function is called
17036 narrowed to the headers to be transformed and with one parameter---the
17037 gateway address.
17038
17039 This default function just inserts a new @code{To} header based on the
17040 @code{Newsgroups} header and the gateway address.
17041 For instance, an article with this @code{Newsgroups} header:
17042
17043 @example
17044 Newsgroups: alt.religion.emacs
17045 @end example
17046
17047 will get this @code{To} header inserted:
17048
17049 @example
17050 To: alt-religion-emacs@@GATEWAY
17051 @end example
17052
17053 The following pre-defined functions exist:
17054
17055 @findex nngateway-simple-header-transformation
17056 @table @code
17057
17058 @item nngateway-simple-header-transformation
17059 Creates a @code{To} header that looks like
17060 @var{newsgroup}@@@code{nngateway-address}.
17061
17062 @findex nngateway-mail2news-header-transformation
17063
17064 @item nngateway-mail2news-header-transformation
17065 Creates a @code{To} header that looks like
17066 @code{nngateway-address}.
17067 @end table
17068
17069 @end table
17070
17071 Here's an example:
17072
17073 @lisp
17074 (setq gnus-post-method
17075       '(nngateway
17076         "mail2news@@replay.com"
17077         (nngateway-header-transformation
17078          nngateway-mail2news-header-transformation)))
17079 @end lisp
17080
17081 So, to use this, simply say something like:
17082
17083 @lisp
17084 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17085 @end lisp
17086
17087
17088
17089 @node Combined Groups
17090 @section Combined Groups
17091
17092 Gnus allows combining a mixture of all the other group types into bigger
17093 groups.
17094
17095 @menu
17096 * Virtual Groups::              Combining articles from many groups.
17097 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17098 @end menu
17099
17100
17101 @node Virtual Groups
17102 @subsection Virtual Groups
17103 @cindex nnvirtual
17104 @cindex virtual groups
17105 @cindex merging groups
17106
17107 An @dfn{nnvirtual group} is really nothing more than a collection of
17108 other groups.
17109
17110 For instance, if you are tired of reading many small groups, you can
17111 put them all in one big group, and then grow tired of reading one
17112 big, unwieldy group.  The joys of computing!
17113
17114 You specify @code{nnvirtual} as the method.  The address should be a
17115 regexp to match component groups.
17116
17117 All marks in the virtual group will stick to the articles in the
17118 component groups.  So if you tick an article in a virtual group, the
17119 article will also be ticked in the component group from whence it
17120 came.  (And vice versa---marks from the component groups will also be
17121 shown in the virtual group.).  To create an empty virtual group, run
17122 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17123 and edit the method regexp with @kbd{M-e}
17124 (@code{gnus-group-edit-group-method})
17125
17126 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17127 newsgroups into one, big, happy newsgroup:
17128
17129 @lisp
17130 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17131 @end lisp
17132
17133 The component groups can be native or foreign; everything should work
17134 smoothly, but if your computer explodes, it was probably my fault.
17135
17136 Collecting the same group from several servers might actually be a good
17137 idea if users have set the Distribution header to limit distribution.
17138 If you would like to read @samp{soc.motss} both from a server in Japan
17139 and a server in Norway, you could use the following as the group regexp:
17140
17141 @example
17142 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17143 @end example
17144
17145 (Remember, though, that if you're creating the group with @kbd{G m}, you
17146 shouldn't double the backslashes, and you should leave off the quote
17147 characters at the beginning and the end of the string.)
17148
17149 This should work kinda smoothly---all articles from both groups should
17150 end up in this one, and there should be no duplicates.  Threading (and
17151 the rest) will still work as usual, but there might be problems with the
17152 sequence of articles.  Sorting on date might be an option here
17153 (@pxref{Selecting a Group}).
17154
17155 One limitation, however---all groups included in a virtual
17156 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17157 zombie groups can't be component groups for @code{nnvirtual} groups.
17158
17159 @vindex nnvirtual-always-rescan
17160 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17161 @code{nnvirtual} will always scan groups for unread articles when
17162 entering a virtual group.  If this variable is @code{nil} (which is the
17163 default) and you read articles in a component group after the virtual
17164 group has been activated, the read articles from the component group
17165 will show up when you enter the virtual group.  You'll also see this
17166 effect if you have two virtual groups that have a component group in
17167 common.  If that's the case, you should set this variable to @code{t}.
17168 Or you can just tap @code{M-g} on the virtual group every time before
17169 you enter it---it'll have much the same effect.
17170
17171 @code{nnvirtual} can have both mail and news groups as component groups.
17172 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17173 has to ask the back end of the component group the article comes from
17174 whether it is a news or mail back end.  However, when you do a @kbd{^},
17175 there is typically no sure way for the component back end to know this,
17176 and in that case @code{nnvirtual} tells Gnus that the article came from a
17177 not-news back end.  (Just to be on the safe side.)
17178
17179 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17180 line from the article you respond to in these cases.
17181
17182 @code{nnvirtual} groups do not inherit anything but articles and marks
17183 from component groups---group parameters, for instance, are not
17184 inherited.
17185
17186
17187 @node Kibozed Groups
17188 @subsection Kibozed Groups
17189 @cindex nnkiboze
17190 @cindex kibozing
17191
17192 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17193 the news feed''.  @code{nnkiboze} is a back end that will do this for
17194 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17195 with useless requests!  Oh happiness!
17196
17197 @kindex G k (Group)
17198 To create a kibozed group, use the @kbd{G k} command in the group
17199 buffer.
17200
17201 The address field of the @code{nnkiboze} method is, as with
17202 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17203 @code{nnkiboze} group.  That's where most similarities between
17204 @code{nnkiboze} and @code{nnvirtual} end.
17205
17206 In addition to this regexp detailing component groups, an
17207 @code{nnkiboze} group must have a score file to say what articles are
17208 to be included in the group (@pxref{Scoring}).
17209
17210 @kindex M-x nnkiboze-generate-groups
17211 @findex nnkiboze-generate-groups
17212 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17213 @code{nnkiboze} groups you want to have.  This command will take time.
17214 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17215 headers from all the articles in all the component groups and run them
17216 through the scoring process to determine if there are any articles in
17217 the groups that are to be part of the @code{nnkiboze} groups.
17218
17219 Please limit the number of component groups by using restrictive
17220 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17221 @acronym{NNTP} site may throw you off and never let you back in again.
17222 Stranger things have happened.
17223
17224 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17225 and they can be foreign.  No restrictions.
17226
17227 @vindex nnkiboze-directory
17228 The generation of an @code{nnkiboze} group means writing two files in
17229 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17230 contains the @acronym{NOV} header lines for all the articles in the group,
17231 and the other is an additional @file{.newsrc} file to store information
17232 on what groups have been searched through to find component articles.
17233
17234 Articles marked as read in the @code{nnkiboze} group will have
17235 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17236
17237
17238 @node Gnus Unplugged
17239 @section Gnus Unplugged
17240 @cindex offline
17241 @cindex unplugged
17242 @cindex agent
17243 @cindex Gnus agent
17244 @cindex Gnus unplugged
17245
17246 In olden times (ca. February '88), people used to run their newsreaders
17247 on big machines with permanent connections to the net.  News transport
17248 was dealt with by news servers, and all the newsreaders had to do was to
17249 read news.  Believe it or not.
17250
17251 Nowadays most people read news and mail at home, and use some sort of
17252 modem to connect to the net.  To avoid running up huge phone bills, it
17253 would be nice to have a way to slurp down all the news and mail, hang up
17254 the phone, read for several hours, and then upload any responses you
17255 have to make.  And then you repeat the procedure.
17256
17257 Of course, you can use news servers for doing this as well.  I've used
17258 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17259 for some years, but doing that's a bore.  Moving the news server
17260 functionality up to the newsreader makes sense if you're the only person
17261 reading news on a machine.
17262
17263 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17264 fact, you don't even have to configure anything.
17265
17266 Of course, to use it as such, you have to learn a few new commands.
17267
17268 @menu
17269 * Agent Basics::                How it all is supposed to work.
17270 * Agent Categories::            How to tell the Gnus Agent what to download.
17271 * Agent Commands::              New commands for all the buffers.
17272 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17273 * Agent as Cache::              The Agent is a big cache too.
17274 * Agent Expiry::                How to make old articles go away.
17275 * Agent Regeneration::          How to recover from lost connections and other accidents.
17276 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17277 * Outgoing Messages::           What happens when you post/mail something?
17278 * Agent Variables::             Customizing is fun.
17279 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17280 * Batching Agents::             How to fetch news from a @code{cron} job.
17281 * Agent Caveats::               What you think it'll do and what it does.
17282 @end menu
17283
17284
17285 @node Agent Basics
17286 @subsection Agent Basics
17287
17288 First, let's get some terminology out of the way.
17289
17290 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17291 connection to the net (and notified the Agent that this is the case).
17292 When the connection to the net is up again (and Gnus knows this), the
17293 Agent is @dfn{plugged}.
17294
17295 The @dfn{local} machine is the one you're running on, and which isn't
17296 connected to the net continuously.
17297
17298 @dfn{Downloading} means fetching things from the net to your local
17299 machine.  @dfn{Uploading} is doing the opposite.
17300
17301 You know that Gnus gives you all the opportunity you'd ever want for
17302 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17303 is also customizable to a great extent, which means that the user has a
17304 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17305 you in your foot, but with Gnus, you have a choice!
17306
17307 Gnus is never really in plugged or unplugged state.  Rather, it applies
17308 that state to each server individually.  This means that some servers
17309 can be plugged while others can be unplugged.  Additionally, some
17310 servers can be ignored by the Agent altogether (which means that
17311 they're kinda like plugged always).
17312
17313 So when you unplug the Agent and then wonder why is Gnus opening a
17314 connection to the Net, the next step to do is to look whether all
17315 servers are agentized.  If there is an unagentized server, you found
17316 the culprit.
17317
17318 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17319 reachable.  When Gnus notices this, it asks you whether you want the
17320 server to be switched to offline state.  If you say yes, then the
17321 server will behave somewhat as if it was unplugged, except that Gnus
17322 will ask you whether you want to switch it back online again.
17323
17324 Let's take a typical Gnus session using the Agent.
17325
17326 @itemize @bullet
17327
17328 @item
17329 @findex gnus-unplugged
17330 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17331 Agent in a disconnected state.  You can read all the news that you have
17332 already fetched while in this mode.
17333
17334 @item
17335 You then decide to see whether any new news has arrived.  You connect
17336 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17337 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17338 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17339 Source Specifiers}).
17340
17341 @item
17342 You can then read the new news immediately, or you can download the
17343 news onto your local machine.  If you want to do the latter, you press
17344 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17345 all the eligible articles in all the groups.  (To let Gnus know which
17346 articles you want to download, @pxref{Agent Categories}).
17347
17348 @item
17349 After fetching the articles, you press @kbd{J j} to make Gnus become
17350 unplugged again, and you shut down the PPP thing (or whatever).  And
17351 then you read the news offline.
17352
17353 @item
17354 And then you go to step 2.
17355 @end itemize
17356
17357 Here are some things you should do the first time (or so) that you use
17358 the Agent.
17359
17360 @itemize @bullet
17361
17362 @item
17363 Decide which servers should be covered by the Agent.  If you have a mail
17364 back end, it would probably be nonsensical to have it covered by the
17365 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17366 @kbd{J a} on the server (or servers) that you wish to have covered by the
17367 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17368 added servers you do not wish to have covered by the Agent.  By default,
17369 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17370 @code{gnus-secondary-select-methods} are agentized.
17371
17372 @item
17373 Decide on download policy.  It's fairly simple once you decide whether
17374 you are going to use agent categories, topic parameters, and/or group
17375 parameters to implement your policy.  If you're new to gnus, it
17376 is probably best to start with a category, @xref{Agent Categories}.
17377
17378 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17379 (@pxref{Agent Categories}) provide for setting a policy that applies
17380 to multiple groups.  Which you use is entirely up to you.  Topic
17381 parameters do override categories so, if you mix the two, you'll have
17382 to take that into account.  If you have a few groups that deviate from
17383 your policy, you can use group parameters (@pxref{Group Parameters}) to
17384 configure them.
17385
17386 @item
17387 Uhm@dots{} that's it.
17388 @end itemize
17389
17390
17391 @node Agent Categories
17392 @subsection Agent Categories
17393
17394 One of the main reasons to integrate the news transport layer into the
17395 newsreader is to allow greater control over what articles to download.
17396 There's not much point in downloading huge amounts of articles, just to
17397 find out that you're not interested in reading any of them.  It's better
17398 to be somewhat more conservative in choosing what to download, and then
17399 mark the articles for downloading manually if it should turn out that
17400 you're interested in the articles anyway.
17401
17402 One of the more effective methods for controlling what is to be
17403 downloaded is to create a @dfn{category} and then assign some (or all)
17404 groups to this category.  Groups that do not belong in any other
17405 category belong to the @code{default} category.  Gnus has its own
17406 buffer for creating and managing categories.
17407
17408 If you prefer, you can also use group parameters (@pxref{Group
17409 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17410 alternative approach to controlling the agent.  The only real
17411 difference is that categories are specific to the agent (so there is
17412 less to learn) while group and topic parameters include the kitchen
17413 sink.
17414
17415 Since you can set agent parameters in several different places we have
17416 a rule to decide which source to believe.  This rule specifies that
17417 the parameter sources are checked in the following order: group
17418 parameters, topic parameters, agent category, and finally customizable
17419 variables.  So you can mix all of these sources to produce a wide range
17420 of behavior, just don't blame me if you don't remember where you put
17421 your settings.
17422
17423 @menu
17424 * Category Syntax::             What a category looks like.
17425 * Category Buffer::             A buffer for maintaining categories.
17426 * Category Variables::          Customize'r'Us.
17427 @end menu
17428
17429
17430 @node Category Syntax
17431 @subsubsection Category Syntax
17432
17433 A category consists of a name, the list of groups belonging to the
17434 category, and a number of optional parameters that override the
17435 customizable variables.  The complete list of agent parameters are
17436 listed below.
17437
17438 @table @code
17439 @item gnus-agent-cat-name
17440 The name of the category.
17441
17442 @item gnus-agent-cat-groups
17443 The list of groups that are in this category.
17444
17445 @item gnus-agent-cat-predicate
17446 A predicate which (generally) gives a rough outline of which articles
17447 are eligible for downloading; and
17448
17449 @item gnus-agent-cat-score-file
17450 a score rule which (generally) gives you a finer granularity when
17451 deciding what articles to download.  (Note that this @dfn{download
17452 score} is not necessarily related to normal scores.)
17453
17454 @item gnus-agent-cat-enable-expiration
17455 a boolean indicating whether the agent should expire old articles in
17456 this group.  Most groups should be expired to conserve disk space.  In
17457 fact, its probably safe to say that the gnus.* hierarchy contains the
17458 only groups that should not be expired.
17459
17460 @item gnus-agent-cat-days-until-old
17461 an integer indicating the number of days that the agent should wait
17462 before deciding that a read article is safe to expire.
17463
17464 @item gnus-agent-cat-low-score
17465 an integer that overrides the value of @code{gnus-agent-low-score}.
17466
17467 @item gnus-agent-cat-high-score
17468 an integer that overrides the value of @code{gnus-agent-high-score}.
17469
17470 @item gnus-agent-cat-length-when-short
17471 an integer that overrides the value of
17472 @code{gnus-agent-short-article}.
17473
17474 @item gnus-agent-cat-length-when-long
17475 an integer that overrides the value of @code{gnus-agent-long-article}.
17476 @end table
17477
17478 The name of a category can not be changed once the category has been
17479 created.
17480
17481 Each category maintains a list of groups that are exclusive members of
17482 that category.  The exclusivity rule is automatically enforced, add a
17483 group to a new category and it is automatically removed from its old
17484 category.
17485
17486 A predicate in its simplest form can be a single predicate such as
17487 @code{true} or @code{false}.  These two will download every available
17488 article or nothing respectively.  In the case of these two special
17489 predicates an additional score rule is superfluous.
17490
17491 Predicates of @code{high} or @code{low} download articles in respect of
17492 their scores in relationship to @code{gnus-agent-high-score} and
17493 @code{gnus-agent-low-score} as described below.
17494
17495 To gain even finer control of what is to be regarded eligible for
17496 download a predicate can consist of a number of predicates with logical
17497 operators sprinkled in between.
17498
17499 Perhaps some examples are in order.
17500
17501 Here's a simple predicate.  (It's the default predicate, in fact, used
17502 for all groups that don't belong to any other category.)
17503
17504 @lisp
17505 short
17506 @end lisp
17507
17508 Quite simple, eh?  This predicate is true if and only if the article is
17509 short (for some value of ``short'').
17510
17511 Here's a more complex predicate:
17512
17513 @lisp
17514 (or high
17515     (and
17516      (not low)
17517      (not long)))
17518 @end lisp
17519
17520 This means that an article should be downloaded if it has a high score,
17521 or if the score is not low and the article is not long.  You get the
17522 drift.
17523
17524 The available logical operators are @code{or}, @code{and} and
17525 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17526 @samp{|}, @code{&} and @code{!} instead.)
17527
17528 The following predicates are pre-defined, but if none of these fit what
17529 you want to do, you can write your own.
17530
17531 When evaluating each of these predicates, the named constant will be
17532 bound to the value determined by calling
17533 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17534 example, gnus-agent-short-article will be bound to
17535 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17536 means that you can specify a predicate in your category then tune that
17537 predicate to individual groups.
17538
17539 @table @code
17540 @item short
17541 True iff the article is shorter than @code{gnus-agent-short-article}
17542 lines; default 100.
17543
17544 @item long
17545 True iff the article is longer than @code{gnus-agent-long-article}
17546 lines; default 200.
17547
17548 @item low
17549 True iff the article has a download score less than
17550 @code{gnus-agent-low-score}; default 0.
17551
17552 @item high
17553 True iff the article has a download score greater than
17554 @code{gnus-agent-high-score}; default 0.
17555
17556 @item spam
17557 True iff the Gnus Agent guesses that the article is spam.  The
17558 heuristics may change over time, but at present it just computes a
17559 checksum and sees whether articles match.
17560
17561 @item true
17562 Always true.
17563
17564 @item false
17565 Always false.
17566 @end table
17567
17568 If you want to create your own predicate function, here's what you have
17569 to know:  The functions are called with no parameters, but the
17570 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17571 useful values.
17572
17573 For example, you could decide that you don't want to download articles
17574 that were posted more than a certain number of days ago (e.g. posted
17575 more than @code{gnus-agent-expire-days} ago) you might write a function
17576 something along the lines of the following:
17577
17578 @lisp
17579 (defun my-article-old-p ()
17580   "Say whether an article is old."
17581   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17582      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17583 @end lisp
17584
17585 with the predicate then defined as:
17586
17587 @lisp
17588 (not my-article-old-p)
17589 @end lisp
17590
17591 or you could append your predicate to the predefined
17592 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17593 wherever.
17594
17595 @lisp
17596 (require 'gnus-agent)
17597 (setq  gnus-category-predicate-alist
17598   (append gnus-category-predicate-alist
17599          '((old . my-article-old-p))))
17600 @end lisp
17601
17602 and simply specify your predicate as:
17603
17604 @lisp
17605 (not old)
17606 @end lisp
17607
17608 If/when using something like the above, be aware that there are many
17609 misconfigured systems/mailers out there and so an article's date is not
17610 always a reliable indication of when it was posted.  Hell, some people
17611 just don't give a damn.
17612
17613 The above predicates apply to @emph{all} the groups which belong to the
17614 category.  However, if you wish to have a specific predicate for an
17615 individual group within a category, or you're just too lazy to set up a
17616 new category, you can enter a group's individual predicate in its group
17617 parameters like so:
17618
17619 @lisp
17620 (agent-predicate . short)
17621 @end lisp
17622
17623 This is the group/topic parameter equivalent of the agent category default.
17624 Note that when specifying a single word predicate like this, the
17625 @code{agent-predicate} specification must be in dotted pair notation.
17626
17627 The equivalent of the longer example from above would be:
17628
17629 @lisp
17630 (agent-predicate or high (and (not low) (not long)))
17631 @end lisp
17632
17633 The outer parenthesis required in the category specification are not
17634 entered here as, not being in dotted pair notation, the value of the
17635 predicate is assumed to be a list.
17636
17637
17638 Now, the syntax of the download score is the same as the syntax of
17639 normal score files, except that all elements that require actually
17640 seeing the article itself are verboten.  This means that only the
17641 following headers can be scored on: @code{Subject}, @code{From},
17642 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17643 @code{Lines}, and @code{Xref}.
17644
17645 As with predicates, the specification of the @code{download score rule}
17646 to use in respect of a group can be in either the category definition if
17647 it's to be applicable to all groups in therein, or a group's parameters
17648 if it's to be specific to that group.
17649
17650 In both of these places the @code{download score rule} can take one of
17651 three forms:
17652
17653 @enumerate
17654 @item
17655 Score rule
17656
17657 This has the same syntax as a normal gnus score file except only a
17658 subset of scoring keywords are available as mentioned above.
17659
17660 example:
17661
17662 @itemize @bullet
17663 @item
17664 Category specification
17665
17666 @lisp
17667 (("from"
17668        ("Lars Ingebrigtsen" 1000000 nil s))
17669 ("lines"
17670        (500 -100 nil <)))
17671 @end lisp
17672
17673 @item
17674 Group/Topic Parameter specification
17675
17676 @lisp
17677 (agent-score ("from"
17678                    ("Lars Ingebrigtsen" 1000000 nil s))
17679              ("lines"
17680                    (500 -100 nil <)))
17681 @end lisp
17682
17683 Again, note the omission of the outermost parenthesis here.
17684 @end itemize
17685
17686 @item
17687 Agent score file
17688
17689 These score files must @emph{only} contain the permitted scoring
17690 keywords stated above.
17691
17692 example:
17693
17694 @itemize @bullet
17695 @item
17696 Category specification
17697
17698 @lisp
17699 ("~/News/agent.SCORE")
17700 @end lisp
17701
17702 or perhaps
17703
17704 @lisp
17705 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17706 @end lisp
17707
17708 @item
17709 Group Parameter specification
17710
17711 @lisp
17712 (agent-score "~/News/agent.SCORE")
17713 @end lisp
17714
17715 Additional score files can be specified as above.  Need I say anything
17716 about parenthesis?
17717 @end itemize
17718
17719 @item
17720 Use @code{normal} score files
17721
17722 If you don't want to maintain two sets of scoring rules for a group, and
17723 your desired @code{downloading} criteria for a group are the same as your
17724 @code{reading} criteria then you can tell the agent to refer to your
17725 @code{normal} score files when deciding what to download.
17726
17727 These directives in either the category definition or a group's
17728 parameters will cause the agent to read in all the applicable score
17729 files for a group, @emph{filtering out} those sections that do not
17730 relate to one of the permitted subset of scoring keywords.
17731
17732 @itemize @bullet
17733 @item
17734 Category Specification
17735
17736 @lisp
17737 file
17738 @end lisp
17739
17740 @item
17741 Group Parameter specification
17742
17743 @lisp
17744 (agent-score . file)
17745 @end lisp
17746 @end itemize
17747 @end enumerate
17748
17749 @node Category Buffer
17750 @subsubsection Category Buffer
17751
17752 You'd normally do all category maintenance from the category buffer.
17753 When you enter it for the first time (with the @kbd{J c} command from
17754 the group buffer), you'll only see the @code{default} category.
17755
17756 The following commands are available in this buffer:
17757
17758 @table @kbd
17759 @item q
17760 @kindex q (Category)
17761 @findex gnus-category-exit
17762 Return to the group buffer (@code{gnus-category-exit}).
17763
17764 @item e
17765 @kindex e (Category)
17766 @findex gnus-category-customize-category
17767 Use a customization buffer to set all of the selected category's
17768 parameters at one time (@code{gnus-category-customize-category}).
17769
17770 @item k
17771 @kindex k (Category)
17772 @findex gnus-category-kill
17773 Kill the current category (@code{gnus-category-kill}).
17774
17775 @item c
17776 @kindex c (Category)
17777 @findex gnus-category-copy
17778 Copy the current category (@code{gnus-category-copy}).
17779
17780 @item a
17781 @kindex a (Category)
17782 @findex gnus-category-add
17783 Add a new category (@code{gnus-category-add}).
17784
17785 @item p
17786 @kindex p (Category)
17787 @findex gnus-category-edit-predicate
17788 Edit the predicate of the current category
17789 (@code{gnus-category-edit-predicate}).
17790
17791 @item g
17792 @kindex g (Category)
17793 @findex gnus-category-edit-groups
17794 Edit the list of groups belonging to the current category
17795 (@code{gnus-category-edit-groups}).
17796
17797 @item s
17798 @kindex s (Category)
17799 @findex gnus-category-edit-score
17800 Edit the download score rule of the current category
17801 (@code{gnus-category-edit-score}).
17802
17803 @item l
17804 @kindex l (Category)
17805 @findex gnus-category-list
17806 List all the categories (@code{gnus-category-list}).
17807 @end table
17808
17809
17810 @node Category Variables
17811 @subsubsection Category Variables
17812
17813 @table @code
17814 @item gnus-category-mode-hook
17815 @vindex gnus-category-mode-hook
17816 Hook run in category buffers.
17817
17818 @item gnus-category-line-format
17819 @vindex gnus-category-line-format
17820 Format of the lines in the category buffer (@pxref{Formatting
17821 Variables}).  Valid elements are:
17822
17823 @table @samp
17824 @item c
17825 The name of the category.
17826
17827 @item g
17828 The number of groups in the category.
17829 @end table
17830
17831 @item gnus-category-mode-line-format
17832 @vindex gnus-category-mode-line-format
17833 Format of the category mode line (@pxref{Mode Line Formatting}).
17834
17835 @item gnus-agent-short-article
17836 @vindex gnus-agent-short-article
17837 Articles that have fewer lines than this are short.  Default 100.
17838
17839 @item gnus-agent-long-article
17840 @vindex gnus-agent-long-article
17841 Articles that have more lines than this are long.  Default 200.
17842
17843 @item gnus-agent-low-score
17844 @vindex gnus-agent-low-score
17845 Articles that have a score lower than this have a low score.  Default
17846 0.
17847
17848 @item gnus-agent-high-score
17849 @vindex gnus-agent-high-score
17850 Articles that have a score higher than this have a high score.  Default
17851 0.
17852
17853 @item gnus-agent-expire-days
17854 @vindex gnus-agent-expire-days
17855 The number of days that a @samp{read} article must stay in the agent's
17856 local disk before becoming eligible for expiration (While the name is
17857 the same, this doesn't mean expiring the article on the server.  It
17858 just means deleting the local copy of the article).  What is also
17859 important to understand is that the counter starts with the time the
17860 article was written to the local disk and not the time the article was
17861 read.
17862 Default 7.
17863
17864 @item gnus-agent-enable-expiration
17865 @vindex gnus-agent-enable-expiration
17866 Determines whether articles in a group are, by default, expired or
17867 retained indefinitely.  The default is @code{ENABLE} which means that
17868 you'll have to disable expiration when desired.  On the other hand,
17869 you could set this to @code{DISABLE}.  In that case, you would then
17870 have to enable expiration in selected groups.
17871
17872 @end table
17873
17874
17875 @node Agent Commands
17876 @subsection Agent Commands
17877 @findex gnus-agent-toggle-plugged
17878 @kindex J j (Agent)
17879
17880 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17881 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17882 toggles the plugged/unplugged state of the Gnus Agent.
17883
17884
17885 @menu
17886 * Group Agent Commands::        Configure groups and fetch their contents.
17887 * Summary Agent Commands::      Manually select then fetch specific articles.
17888 * Server Agent Commands::       Select the servers that are supported by the agent.
17889 @end menu
17890
17891
17892
17893
17894 @node Group Agent Commands
17895 @subsubsection Group Agent Commands
17896
17897 @table @kbd
17898 @item J u
17899 @kindex J u (Agent Group)
17900 @findex gnus-agent-fetch-groups
17901 Fetch all eligible articles in the current group
17902 (@code{gnus-agent-fetch-groups}).
17903
17904 @item J c
17905 @kindex J c (Agent Group)
17906 @findex gnus-enter-category-buffer
17907 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17908
17909 @item J s
17910 @kindex J s (Agent Group)
17911 @findex gnus-agent-fetch-session
17912 Fetch all eligible articles in all groups
17913 (@code{gnus-agent-fetch-session}).
17914
17915 @item J S
17916 @kindex J S (Agent Group)
17917 @findex gnus-group-send-queue
17918 Send all sendable messages in the queue group
17919 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17920
17921 @item J a
17922 @kindex J a (Agent Group)
17923 @findex gnus-agent-add-group
17924 Add the current group to an Agent category
17925 (@code{gnus-agent-add-group}).  This command understands the
17926 process/prefix convention (@pxref{Process/Prefix}).
17927
17928 @item J r
17929 @kindex J r (Agent Group)
17930 @findex gnus-agent-remove-group
17931 Remove the current group from its category, if any
17932 (@code{gnus-agent-remove-group}).  This command understands the
17933 process/prefix convention (@pxref{Process/Prefix}).
17934
17935 @item J Y
17936 @kindex J Y (Agent Group)
17937 @findex gnus-agent-synchronize-flags
17938 Synchronize flags changed while unplugged with remote server, if any.
17939
17940
17941 @end table
17942
17943
17944 @node Summary Agent Commands
17945 @subsubsection Summary Agent Commands
17946
17947 @table @kbd
17948 @item J #
17949 @kindex J # (Agent Summary)
17950 @findex gnus-agent-mark-article
17951 Mark the article for downloading (@code{gnus-agent-mark-article}).
17952
17953 @item J M-#
17954 @kindex J M-# (Agent Summary)
17955 @findex gnus-agent-unmark-article
17956 Remove the downloading mark from the article
17957 (@code{gnus-agent-unmark-article}).
17958
17959 @cindex %
17960 @item @@
17961 @kindex @@ (Agent Summary)
17962 @findex gnus-agent-toggle-mark
17963 Toggle whether to download the article
17964 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17965 default.
17966
17967 @item J c
17968 @kindex J c (Agent Summary)
17969 @findex gnus-agent-catchup
17970 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17971
17972 @item J S
17973 @kindex J S (Agent Summary)
17974 @findex gnus-agent-fetch-group
17975 Download all eligible (@pxref{Agent Categories}) articles in this group.
17976 (@code{gnus-agent-fetch-group}).
17977
17978 @item J s
17979 @kindex J s (Agent Summary)
17980 @findex gnus-agent-fetch-series
17981 Download all processable articles in this group.
17982 (@code{gnus-agent-fetch-series}).
17983
17984 @item J u
17985 @kindex J u (Agent Summary)
17986 @findex gnus-agent-summary-fetch-group
17987 Download all downloadable articles in the current group
17988 (@code{gnus-agent-summary-fetch-group}).
17989
17990 @end table
17991
17992
17993 @node Server Agent Commands
17994 @subsubsection Server Agent Commands
17995
17996 @table @kbd
17997 @item J a
17998 @kindex J a (Agent Server)
17999 @findex gnus-agent-add-server
18000 Add the current server to the list of servers covered by the Gnus Agent
18001 (@code{gnus-agent-add-server}).
18002
18003 @item J r
18004 @kindex J r (Agent Server)
18005 @findex gnus-agent-remove-server
18006 Remove the current server from the list of servers covered by the Gnus
18007 Agent (@code{gnus-agent-remove-server}).
18008
18009 @end table
18010
18011
18012 @node Agent Visuals
18013 @subsection Agent Visuals
18014
18015 If you open a summary while unplugged and, Gnus knows from the group's
18016 active range that there are more articles than the headers currently
18017 stored in the Agent, you may see some articles whose subject looks
18018 something like @samp{[Undownloaded article #####]}.  These are
18019 placeholders for the missing headers.  Aside from setting a mark,
18020 there is not much that can be done with one of these placeholders.
18021 When Gnus finally gets a chance to fetch the group's headers, the
18022 placeholders will automatically be replaced by the actual headers.
18023 You can configure the summary buffer's maneuvering to skip over the
18024 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18025
18026 While it may be obvious to all, the only headers and articles
18027 available while unplugged are those headers and articles that were
18028 fetched into the Agent while previously plugged.  To put it another
18029 way, "If you forget to fetch something while plugged, you might have a
18030 less than satisfying unplugged session".  For this reason, the Agent
18031 adds two visual effects to your summary buffer.  These effects display
18032 the download status of each article so that you always know which
18033 articles will be available when unplugged.
18034
18035 The first visual effect is the @samp{%O} spec.  If you customize
18036 @code{gnus-summary-line-format} to include this specifier, you will add
18037 a single character field that indicates an article's download status.
18038 Articles that have been fetched into either the Agent or the Cache,
18039 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18040 other articles will display @code{gnus-undownloaded-mark} (defaults to
18041 @samp{-}).  If you open a group that has not been agentized, a space
18042 (@samp{ }) will be displayed.
18043
18044 The second visual effect are the undownloaded faces.  The faces, there
18045 are three indicating the article's score (low, normal, high), seem to
18046 result in a love/hate response from many Gnus users.  The problem is
18047 that the face selection is controlled by a list of condition tests and
18048 face names (See @code{gnus-summary-highlight}).  Each condition is
18049 tested in the order in which it appears in the list so early
18050 conditions have precedence over later conditions.  All of this means
18051 that, if you tick an undownloaded article, the article will continue
18052 to be displayed in the undownloaded face rather than the ticked face.
18053
18054 If you use the Agent as a cache (to avoid downloading the same article
18055 each time you visit it or to minimize your connection time), the
18056 undownloaded face will probably seem like a good idea.  The reason
18057 being that you do all of our work (marking, reading, deleting) with
18058 downloaded articles so the normal faces always appear.
18059
18060 For occasional Agent users, the undownloaded faces may appear to be an
18061 absolutely horrible idea.  The issue being that, since most of their
18062 articles have not been fetched into the Agent, most of the normal
18063 faces will be obscured by the undownloaded faces.  If this is your
18064 situation, you have two choices available.  First, you can completely
18065 disable the undownload faces by customizing
18066 @code{gnus-summary-highlight} to delete the three cons-cells that
18067 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18068 you prefer to take a more fine-grained approach, you may set the
18069 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18070 parameter, like all other agent parameters, may be set on an Agent
18071 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18072 Parameters}), or an individual group (@pxref{Group Parameters}).
18073
18074 @node Agent as Cache
18075 @subsection Agent as Cache
18076
18077 When Gnus is plugged, it is not efficient to download headers or
18078 articles from the server again, if they are already stored in the
18079 Agent.  So, Gnus normally only downloads headers once, and stores them
18080 in the Agent.  These headers are later used when generating the summary
18081 buffer, regardless of whether you are plugged or unplugged.  Articles
18082 are not cached in the Agent by default though (that would potentially
18083 consume lots of disk space), but if you have already downloaded an
18084 article into the Agent, Gnus will not download the article from the
18085 server again but use the locally stored copy instead.
18086
18087 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18088 @pxref{Agent Variables}) to always download headers and articles while
18089 plugged.  Gnus will almost certainly be slower, but it will be kept
18090 synchronized with the server.  That last point probably won't make any
18091 sense if you are using a nntp or nnimap back end.
18092
18093 @node Agent Expiry
18094 @subsection Agent Expiry
18095
18096 @vindex gnus-agent-expire-days
18097 @findex gnus-agent-expire
18098 @kindex M-x gnus-agent-expire
18099 @kindex M-x gnus-agent-expire-group
18100 @findex gnus-agent-expire-group
18101 @cindex agent expiry
18102 @cindex Gnus agent expiry
18103 @cindex expiry
18104
18105 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18106 least it doesn't handle it like other back ends.  Instead, there are
18107 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18108 commands that will expire all read articles that are older than
18109 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18110 that you're running out of space.  Neither are particularly fast or
18111 efficient, and it's not a particularly good idea to interrupt them (with
18112 @kbd{C-g} or anything else) once you've started one of them.
18113
18114 Note that other functions, e.g. @code{gnus-request-expire-articles},
18115 might run @code{gnus-agent-expire} for you to keep the agent
18116 synchronized with the group.
18117
18118 The agent parameter @code{agent-enable-expiration} may be used to
18119 prevent expiration in selected groups.
18120
18121 @vindex gnus-agent-expire-all
18122 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18123 expiration commands will expire all articles---unread, read, ticked
18124 and dormant.  If @code{nil} (which is the default), only read articles
18125 are eligible for expiry, and unread, ticked and dormant articles will
18126 be kept indefinitely.
18127
18128 If you find that some articles eligible for expiry are never expired,
18129 perhaps some Gnus Agent files are corrupted.  There's are special
18130 commands, @code{gnus-agent-regenerate} and
18131 @code{gnus-agent-regenerate-group}, to fix possible problems.
18132
18133 @node Agent Regeneration
18134 @subsection Agent Regeneration
18135
18136 @cindex agent regeneration
18137 @cindex Gnus agent regeneration
18138 @cindex regeneration
18139
18140 The local data structures used by @code{nnagent} may become corrupted
18141 due to certain exceptional conditions.  When this happens,
18142 @code{nnagent} functionality may degrade or even fail.  The solution
18143 to this problem is to repair the local data structures by removing all
18144 internal inconsistencies.
18145
18146 For example, if your connection to your server is lost while
18147 downloaded articles into the agent, the local data structures will not
18148 know about articles successfully downloaded prior to the connection
18149 failure.  Running @code{gnus-agent-regenerate} or
18150 @code{gnus-agent-regenerate-group} will update the data structures
18151 such that you don't need to download these articles a second time.
18152
18153 @findex gnus-agent-regenerate
18154 @kindex M-x gnus-agent-regenerate
18155 The command @code{gnus-agent-regenerate} will perform
18156 @code{gnus-agent-regenerate-group} on every agentized group.  While
18157 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18158 recommended that you first close all summary buffers.
18159
18160 @findex gnus-agent-regenerate-group
18161 @kindex M-x gnus-agent-regenerate-group
18162 The command @code{gnus-agent-regenerate-group} uses the local copies
18163 of individual articles to repair the local @acronym{NOV}(header) database.  It
18164 then updates the internal data structures that document which articles
18165 are stored locally.  An optional argument will mark articles in the
18166 agent as unread.
18167
18168 @node Agent and IMAP
18169 @subsection Agent and IMAP
18170
18171 The Agent works with any Gnus back end, including nnimap.  However,
18172 since there are some conceptual differences between @acronym{NNTP} and
18173 @acronym{IMAP}, this section (should) provide you with some information to
18174 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18175
18176 The first thing to keep in mind is that all flags (read, ticked, etc)
18177 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18178 case for nntp.  Thus Gnus need to remember flag changes when
18179 disconnected, and synchronize these flags when you plug back in.
18180
18181 Gnus keeps track of flag changes when reading nnimap groups under the
18182 Agent.  When you plug back in, Gnus will check if you have any changed
18183 any flags and ask if you wish to synchronize these with the server.
18184 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18185
18186 @vindex gnus-agent-synchronize-flags
18187 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18188 never automatically synchronize flags.  If it is @code{ask}, which is
18189 the default, the Agent will check if you made any changes and if so
18190 ask if you wish to synchronize these when you re-connect.  If it has
18191 any other value, all flags will be synchronized automatically.
18192
18193 If you do not wish to synchronize flags automatically when you
18194 re-connect, you can do it manually with the
18195 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18196 in the group buffer.
18197
18198 Some things are currently not implemented in the Agent that you'd might
18199 expect from a disconnected @acronym{IMAP} client, including:
18200
18201 @itemize @bullet
18202
18203 @item
18204 Copying/moving articles into nnimap groups when unplugged.
18205
18206 @item
18207 Creating/deleting nnimap groups when unplugged.
18208
18209 @end itemize
18210
18211 Technical note: the synchronization algorithm does not work by ``pushing''
18212 all local flags to the server, but rather incrementally update the
18213 server view of flags by changing only those flags that were changed by
18214 the user.  Thus, if you set one flag on an article, quit the group and
18215 re-select the group and remove the flag; the flag will be set and
18216 removed from the server when you ``synchronize''.  The queued flag
18217 operations can be found in the per-server @code{flags} file in the Agent
18218 directory.  It's emptied when you synchronize flags.
18219
18220
18221 @node Outgoing Messages
18222 @subsection Outgoing Messages
18223
18224 When Gnus is unplugged, all outgoing messages (both mail and news) are
18225 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18226 them there after posting, and edit them at will.
18227
18228 When Gnus is plugged again, you can send the messages either from the
18229 draft group with the special commands available there, or you can use
18230 the @kbd{J S} command in the group buffer to send all the sendable
18231 messages in the draft group.
18232
18233
18234
18235 @node Agent Variables
18236 @subsection Agent Variables
18237
18238 @table @code
18239 @item gnus-agent-directory
18240 @vindex gnus-agent-directory
18241 Where the Gnus Agent will store its files.  The default is
18242 @file{~/News/agent/}.
18243
18244 @item gnus-agent-handle-level
18245 @vindex gnus-agent-handle-level
18246 Groups on levels (@pxref{Group Levels}) higher than this variable will
18247 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18248 which means that only subscribed group will be considered by the Agent
18249 by default.
18250
18251 @item gnus-agent-plugged-hook
18252 @vindex gnus-agent-plugged-hook
18253 Hook run when connecting to the network.
18254
18255 @item gnus-agent-unplugged-hook
18256 @vindex gnus-agent-unplugged-hook
18257 Hook run when disconnecting from the network.
18258
18259 @item gnus-agent-fetched-hook
18260 @vindex gnus-agent-fetched-hook
18261 Hook run when finished fetching articles.
18262
18263 @item gnus-agent-cache
18264 @vindex gnus-agent-cache
18265 Variable to control whether use the locally stored @acronym{NOV} and
18266 articles when plugged, e.g. essentially using the Agent as a cache.
18267 The default is non-@code{nil}, which means to use the Agent as a cache.
18268
18269 @item gnus-agent-go-online
18270 @vindex gnus-agent-go-online
18271 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18272 automatically switch offline servers into online status.  If it is
18273 @code{ask}, the default, the Agent will ask if you wish to switch
18274 offline servers into online status when you re-connect.  If it has any
18275 other value, all offline servers will be automatically switched into
18276 online status.
18277
18278 @item gnus-agent-mark-unread-after-downloaded
18279 @vindex gnus-agent-mark-unread-after-downloaded
18280 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18281 mark articles as unread after downloading.  This is usually a safe
18282 thing to do as the newly downloaded article has obviously not been
18283 read.  The default is t.
18284
18285 @item gnus-agent-consider-all-articles
18286 @vindex gnus-agent-consider-all-articles
18287 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18288 agent will fetch all missing headers.  When @code{nil}, the agent will
18289 fetch only new headers.  The default is @code{nil}.
18290
18291 @item gnus-agent-max-fetch-size
18292 @vindex gnus-agent-max-fetch-size
18293 The agent fetches articles into a temporary buffer prior to parsing
18294 them into individual files.  To avoid exceeding the max. buffer size,
18295 the agent alternates between fetching and parsing until all articles
18296 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18297 limit to control how often the cycling occurs.  A large value improves
18298 performance.  A small value minimizes the time lost should the
18299 connection be lost while fetching (You may need to run
18300 @code{gnus-agent-regenerate-group} to update the group's state.
18301 However, all articles parsed prior to loosing the connection will be
18302 available while unplugged).  The default is 10M so it is unusual to
18303 see any cycling.
18304
18305 @item gnus-server-unopen-status
18306 @vindex gnus-server-unopen-status
18307 Perhaps not an Agent variable, but closely related to the Agent, this
18308 variable says what will happen if Gnus cannot open a server.  If the
18309 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18310 whether to deny the server or whether to unplug the agent.  If the
18311 Agent is disabled, Gnus always simply deny the server.  Other choices
18312 for this variable include @code{denied} and @code{offline} the latter
18313 is only valid if the Agent is used.
18314
18315 @item gnus-auto-goto-ignores
18316 @vindex gnus-auto-goto-ignores
18317 Another variable that isn't an Agent variable, yet so closely related
18318 that most will look for it here, this variable tells the summary
18319 buffer how to maneuver around undownloaded (only headers stored in the
18320 agent) and unfetched (neither article nor headers stored) articles.
18321
18322 The legal values are @code{nil} (maneuver to any article),
18323 @code{undownloaded} (maneuvering while unplugged ignores articles that
18324 have not been fetched), @code{always-undownloaded} (maneuvering always
18325 ignores articles that have not been fetched), @code{unfetched}
18326 (maneuvering ignores articles whose headers have not been fetched).
18327
18328 @end table
18329
18330
18331 @node Example Setup
18332 @subsection Example Setup
18333
18334 If you don't want to read this manual, and you have a fairly standard
18335 setup, you may be able to use something like the following as your
18336 @file{~/.gnus.el} file to get started.
18337
18338 @lisp
18339 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18340 ;;; @r{from your ISP's server.}
18341 (setq gnus-select-method '(nntp "news.your-isp.com"))
18342
18343 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18344 ;;; @r{your ISP's @acronym{POP} server.}
18345 (setq mail-sources '((pop :server "pop.your-isp.com")))
18346
18347 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18348 (setq gnus-secondary-select-methods '((nnml "")))
18349
18350 ;;; @r{Make Gnus into an offline newsreader.}
18351 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18352 ;;; (setq gnus-agent t) ; @r{Now the default.}
18353 @end lisp
18354
18355 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18356 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18357 gnus}.
18358
18359 If this is the first time you've run Gnus, you will be subscribed
18360 automatically to a few default newsgroups.  You'll probably want to
18361 subscribe to more groups, and to do that, you have to query the
18362 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18363 command.  This usually takes quite a while, but you only have to do it
18364 once.
18365
18366 After reading and parsing a while, you'll be presented with a list of
18367 groups.  Subscribe to the ones you want to read with the @kbd{u}
18368 command.  @kbd{l} to make all the killed groups disappear after you've
18369 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18370 back all the killed groups.)
18371
18372 You can now read the groups at once, or you can download the articles
18373 with the @kbd{J s} command.  And then read the rest of this manual to
18374 find out which of the other gazillion things you want to customize.
18375
18376
18377 @node Batching Agents
18378 @subsection Batching Agents
18379 @findex gnus-agent-batch
18380
18381 Having the Gnus Agent fetch articles (and post whatever messages you've
18382 written) is quite easy once you've gotten things set up properly.  The
18383 following shell script will do everything that is necessary:
18384
18385 You can run a complete batch command from the command line with the
18386 following incantation:
18387
18388 @example
18389 #!/bin/sh
18390 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18391 @end example
18392
18393
18394 @node Agent Caveats
18395 @subsection Agent Caveats
18396
18397 The Gnus Agent doesn't seem to work like most other offline
18398 newsreaders.  Here are some common questions that some imaginary people
18399 may ask:
18400
18401 @table @dfn
18402 @item If I read an article while plugged, do they get entered into the Agent?
18403
18404 @strong{No}.  If you want this behaviour, add
18405 @code{gnus-agent-fetch-selected-article} to
18406 @code{gnus-select-article-hook}.
18407
18408 @item If I read an article while plugged, and the article already exists in
18409 the Agent, will it get downloaded once more?
18410
18411 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18412
18413 @end table
18414
18415 In short, when Gnus is unplugged, it only looks into the locally stored
18416 articles; when it's plugged, it talks to your ISP and may also use the
18417 locally stored articles.
18418
18419
18420 @node Scoring
18421 @chapter Scoring
18422 @cindex scoring
18423
18424 Other people use @dfn{kill files}, but we here at Gnus Towers like
18425 scoring better than killing, so we'd rather switch than fight.  They do
18426 something completely different as well, so sit up straight and pay
18427 attention!
18428
18429 @vindex gnus-summary-mark-below
18430 All articles have a default score (@code{gnus-summary-default-score}),
18431 which is 0 by default.  This score may be raised or lowered either
18432 interactively or by score files.  Articles that have a score lower than
18433 @code{gnus-summary-mark-below} are marked as read.
18434
18435 Gnus will read any @dfn{score files} that apply to the current group
18436 before generating the summary buffer.
18437
18438 There are several commands in the summary buffer that insert score
18439 entries based on the current article.  You can, for instance, ask Gnus to
18440 lower or increase the score of all articles with a certain subject.
18441
18442 There are two sorts of scoring entries: Permanent and temporary.
18443 Temporary score entries are self-expiring entries.  Any entries that are
18444 temporary and have not been used for, say, a week, will be removed
18445 silently to help keep the sizes of the score files down.
18446
18447 @menu
18448 * Summary Score Commands::      Adding score entries for the current group.
18449 * Group Score Commands::        General score commands.
18450 * Score Variables::             Customize your scoring.  (My, what terminology).
18451 * Score File Format::           What a score file may contain.
18452 * Score File Editing::          You can edit score files by hand as well.
18453 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18454 * Home Score File::             How to say where new score entries are to go.
18455 * Followups To Yourself::       Having Gnus notice when people answer you.
18456 * Scoring On Other Headers::    Scoring on non-standard headers.
18457 * Scoring Tips::                How to score effectively.
18458 * Reverse Scoring::             That problem child of old is not problem.
18459 * Global Score Files::          Earth-spanning, ear-splitting score files.
18460 * Kill Files::                  They are still here, but they can be ignored.
18461 * Converting Kill Files::       Translating kill files to score files.
18462 * GroupLens::                   Getting predictions on what you like to read.
18463 * Advanced Scoring::            Using logical expressions to build score rules.
18464 * Score Decays::                It can be useful to let scores wither away.
18465 @end menu
18466
18467
18468 @node Summary Score Commands
18469 @section Summary Score Commands
18470 @cindex score commands
18471
18472 The score commands that alter score entries do not actually modify real
18473 score files.  That would be too inefficient.  Gnus maintains a cache of
18474 previously loaded score files, one of which is considered the
18475 @dfn{current score file alist}.  The score commands simply insert
18476 entries into this list, and upon group exit, this list is saved.
18477
18478 The current score file is by default the group's local score file, even
18479 if no such score file actually exists.  To insert score commands into
18480 some other score file (e.g. @file{all.SCORE}), you must first make this
18481 score file the current one.
18482
18483 General score commands that don't actually change the score file:
18484
18485 @table @kbd
18486
18487 @item V s
18488 @kindex V s (Summary)
18489 @findex gnus-summary-set-score
18490 Set the score of the current article (@code{gnus-summary-set-score}).
18491
18492 @item V S
18493 @kindex V S (Summary)
18494 @findex gnus-summary-current-score
18495 Display the score of the current article
18496 (@code{gnus-summary-current-score}).
18497
18498 @item V t
18499 @kindex V t (Summary)
18500 @findex gnus-score-find-trace
18501 Display all score rules that have been used on the current article
18502 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18503 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18504 When point is on a string within the match element, @kbd{e} will try to
18505 bring you to this string in the score file.
18506
18507 @item V w
18508 @kindex V w (Summary)
18509 @findex gnus-score-find-favourite-words
18510 List words used in scoring (@code{gnus-score-find-favourite-words}).
18511
18512 @item V R
18513 @kindex V R (Summary)
18514 @findex gnus-summary-rescore
18515 Run the current summary through the scoring process
18516 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18517 around with your score files behind Gnus' back and want to see the
18518 effect you're having.
18519
18520 @item V c
18521 @kindex V c (Summary)
18522 @findex gnus-score-change-score-file
18523 Make a different score file the current
18524 (@code{gnus-score-change-score-file}).
18525
18526 @item V e
18527 @kindex V e (Summary)
18528 @findex gnus-score-edit-current-scores
18529 Edit the current score file (@code{gnus-score-edit-current-scores}).
18530 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18531 File Editing}).
18532
18533 @item V f
18534 @kindex V f (Summary)
18535 @findex gnus-score-edit-file
18536 Edit a score file and make this score file the current one
18537 (@code{gnus-score-edit-file}).
18538
18539 @item V F
18540 @kindex V F (Summary)
18541 @findex gnus-score-flush-cache
18542 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18543 after editing score files.
18544
18545 @item V C
18546 @kindex V C (Summary)
18547 @findex gnus-score-customize
18548 Customize a score file in a visually pleasing manner
18549 (@code{gnus-score-customize}).
18550
18551 @end table
18552
18553 The rest of these commands modify the local score file.
18554
18555 @table @kbd
18556
18557 @item V m
18558 @kindex V m (Summary)
18559 @findex gnus-score-set-mark-below
18560 Prompt for a score, and mark all articles with a score below this as
18561 read (@code{gnus-score-set-mark-below}).
18562
18563 @item V x
18564 @kindex V x (Summary)
18565 @findex gnus-score-set-expunge-below
18566 Prompt for a score, and add a score rule to the current score file to
18567 expunge all articles below this score
18568 (@code{gnus-score-set-expunge-below}).
18569 @end table
18570
18571 The keystrokes for actually making score entries follow a very regular
18572 pattern, so there's no need to list all the commands.  (Hundreds of
18573 them.)
18574
18575 @findex gnus-summary-increase-score
18576 @findex gnus-summary-lower-score
18577
18578 @enumerate
18579 @item
18580 The first key is either @kbd{I} (upper case i) for increasing the score
18581 or @kbd{L} for lowering the score.
18582 @item
18583 The second key says what header you want to score on.  The following
18584 keys are available:
18585 @table @kbd
18586
18587 @item a
18588 Score on the author name.
18589
18590 @item s
18591 Score on the subject line.
18592
18593 @item x
18594 Score on the @code{Xref} line---i.e., the cross-posting line.
18595
18596 @item r
18597 Score on the @code{References} line.
18598
18599 @item d
18600 Score on the date.
18601
18602 @item l
18603 Score on the number of lines.
18604
18605 @item i
18606 Score on the @code{Message-ID} header.
18607
18608 @item e
18609 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18610 if your @acronym{NNTP} server tracks additional header data in overviews.
18611
18612 @item f
18613 Score on followups---this matches the author name, and adds scores to
18614 the followups to this author.  (Using this key leads to the creation of
18615 @file{ADAPT} files.)
18616
18617 @item b
18618 Score on the body.
18619
18620 @item h
18621 Score on the head.
18622
18623 @item t
18624 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18625 files.)
18626
18627 @end table
18628
18629 @item
18630 The third key is the match type.  Which match types are valid depends on
18631 what headers you are scoring on.
18632
18633 @table @code
18634
18635 @item strings
18636
18637 @table @kbd
18638
18639 @item e
18640 Exact matching.
18641
18642 @item s
18643 Substring matching.
18644
18645 @item f
18646 Fuzzy matching (@pxref{Fuzzy Matching}).
18647
18648 @item r
18649 Regexp matching
18650 @end table
18651
18652 @item date
18653 @table @kbd
18654
18655 @item b
18656 Before date.
18657
18658 @item a
18659 After date.
18660
18661 @item n
18662 This date.
18663 @end table
18664
18665 @item number
18666 @table @kbd
18667
18668 @item <
18669 Less than number.
18670
18671 @item =
18672 Equal to number.
18673
18674 @item >
18675 Greater than number.
18676 @end table
18677 @end table
18678
18679 @item
18680 The fourth and usually final key says whether this is a temporary (i.e.,
18681 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18682 or whether it is to be done immediately, without adding to the score
18683 file.
18684 @table @kbd
18685
18686 @item t
18687 Temporary score entry.
18688
18689 @item p
18690 Permanent score entry.
18691
18692 @item i
18693 Immediately scoring.
18694 @end table
18695
18696 @item
18697 If you are scoring on `e' (extra) headers, you will then be prompted for
18698 the header name on which you wish to score.  This must be a header named
18699 in gnus-extra-headers, and @samp{TAB} completion is available.
18700
18701 @end enumerate
18702
18703 So, let's say you want to increase the score on the current author with
18704 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18705 score based on the subject line, using substring matching, and make a
18706 temporary score entry: @kbd{L s s t}.  Pretty easy.
18707
18708 To make things a bit more complicated, there are shortcuts.  If you use
18709 a capital letter on either the second or third keys, Gnus will use
18710 defaults for the remaining one or two keystrokes.  The defaults are
18711 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18712 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18713
18714 These functions take both the numerical prefix and the symbolic prefix
18715 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18716 (or increase) the score of the article.  A symbolic prefix of @code{a}
18717 says to use the @file{all.SCORE} file for the command instead of the
18718 current score file.
18719
18720 @vindex gnus-score-mimic-keymap
18721 The @code{gnus-score-mimic-keymap} says whether these commands will
18722 pretend they are keymaps or not.
18723
18724
18725 @node Group Score Commands
18726 @section Group Score Commands
18727 @cindex group score commands
18728
18729 There aren't many of these as yet, I'm afraid.
18730
18731 @table @kbd
18732
18733 @item W f
18734 @kindex W f (Group)
18735 @findex gnus-score-flush-cache
18736 Gnus maintains a cache of score alists to avoid having to reload them
18737 all the time.  This command will flush the cache
18738 (@code{gnus-score-flush-cache}).
18739
18740 @end table
18741
18742 You can do scoring from the command line by saying something like:
18743
18744 @findex gnus-batch-score
18745 @cindex batch scoring
18746 @example
18747 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18748 @end example
18749
18750
18751 @node Score Variables
18752 @section Score Variables
18753 @cindex score variables
18754
18755 @table @code
18756
18757 @item gnus-use-scoring
18758 @vindex gnus-use-scoring
18759 If @code{nil}, Gnus will not check for score files, and will not, in
18760 general, do any score-related work.  This is @code{t} by default.
18761
18762 @item gnus-kill-killed
18763 @vindex gnus-kill-killed
18764 If this variable is @code{nil}, Gnus will never apply score files to
18765 articles that have already been through the kill process.  While this
18766 may save you lots of time, it also means that if you apply a kill file
18767 to a group, and then change the kill file and want to run it over you
18768 group again to kill more articles, it won't work.  You have to set this
18769 variable to @code{t} to do that.  (It is @code{t} by default.)
18770
18771 @item gnus-kill-files-directory
18772 @vindex gnus-kill-files-directory
18773 All kill and score files will be stored in this directory, which is
18774 initialized from the @env{SAVEDIR} environment variable by default.
18775 This is @file{~/News/} by default.
18776
18777 @item gnus-score-file-suffix
18778 @vindex gnus-score-file-suffix
18779 Suffix to add to the group name to arrive at the score file name
18780 (@file{SCORE} by default.)
18781
18782 @item gnus-score-uncacheable-files
18783 @vindex gnus-score-uncacheable-files
18784 @cindex score cache
18785 All score files are normally cached to avoid excessive re-loading of
18786 score files.  However, if this might make your Emacs grow big and
18787 bloated, so this regexp can be used to weed out score files unlikely
18788 to be needed again.  It would be a bad idea to deny caching of
18789 @file{all.SCORE}, while it might be a good idea to not cache
18790 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18791 variable is @samp{ADAPT$} by default, so no adaptive score files will
18792 be cached.
18793
18794 @item gnus-save-score
18795 @vindex gnus-save-score
18796 If you have really complicated score files, and do lots of batch
18797 scoring, then you might set this variable to @code{t}.  This will make
18798 Gnus save the scores into the @file{.newsrc.eld} file.
18799
18800 If you do not set this to @code{t}, then manual scores (like those set
18801 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18802 across group visits.
18803
18804 @item gnus-score-interactive-default-score
18805 @vindex gnus-score-interactive-default-score
18806 Score used by all the interactive raise/lower commands to raise/lower
18807 score with.  Default is 1000, which may seem excessive, but this is to
18808 ensure that the adaptive scoring scheme gets enough room to play with.
18809 We don't want the small changes from the adaptive scoring to overwrite
18810 manually entered data.
18811
18812 @item gnus-summary-default-score
18813 @vindex gnus-summary-default-score
18814 Default score of an article, which is 0 by default.
18815
18816 @item gnus-summary-expunge-below
18817 @vindex gnus-summary-expunge-below
18818 Don't display the summary lines of articles that have scores lower than
18819 this variable.  This is @code{nil} by default, which means that no
18820 articles will be hidden.  This variable is local to the summary buffers,
18821 and has to be set from @code{gnus-summary-mode-hook}.
18822
18823 @item gnus-score-over-mark
18824 @vindex gnus-score-over-mark
18825 Mark (in the third column) used for articles with a score over the
18826 default.  Default is @samp{+}.
18827
18828 @item gnus-score-below-mark
18829 @vindex gnus-score-below-mark
18830 Mark (in the third column) used for articles with a score below the
18831 default.  Default is @samp{-}.
18832
18833 @item gnus-score-find-score-files-function
18834 @vindex gnus-score-find-score-files-function
18835 Function used to find score files for the current group.  This function
18836 is called with the name of the group as the argument.
18837
18838 Predefined functions available are:
18839 @table @code
18840
18841 @item gnus-score-find-single
18842 @findex gnus-score-find-single
18843 Only apply the group's own score file.
18844
18845 @item gnus-score-find-bnews
18846 @findex gnus-score-find-bnews
18847 Apply all score files that match, using bnews syntax.  This is the
18848 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18849 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18850 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18851 @samp{all} in the score file names are translated into @samp{.*}, and
18852 then a regexp match is done.
18853
18854 This means that if you have some score entries that you want to apply to
18855 all groups, then you put those entries in the @file{all.SCORE} file.
18856
18857 The score files are applied in a semi-random order, although Gnus will
18858 try to apply the more general score files before the more specific score
18859 files.  It does this by looking at the number of elements in the score
18860 file names---discarding the @samp{all} elements.
18861
18862 @item gnus-score-find-hierarchical
18863 @findex gnus-score-find-hierarchical
18864 Apply all score files from all the parent groups.  This means that you
18865 can't have score files like @file{all.SCORE}, but you can have
18866 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18867 server.
18868
18869 @end table
18870 This variable can also be a list of functions.  In that case, all
18871 these functions will be called with the group name as argument, and
18872 all the returned lists of score files will be applied.  These
18873 functions can also return lists of lists of score alists directly.  In
18874 that case, the functions that return these non-file score alists
18875 should probably be placed before the ``real'' score file functions, to
18876 ensure that the last score file returned is the local score file.
18877 Phu.
18878
18879 For example, to do hierarchical scoring but use a non-server-specific
18880 overall score file, you could use the value
18881 @example
18882 (list (lambda (group) ("all.SCORE"))
18883       'gnus-score-find-hierarchical)
18884 @end example
18885
18886 @item gnus-score-expiry-days
18887 @vindex gnus-score-expiry-days
18888 This variable says how many days should pass before an unused score file
18889 entry is expired.  If this variable is @code{nil}, no score file entries
18890 are expired.  It's 7 by default.
18891
18892 @item gnus-update-score-entry-dates
18893 @vindex gnus-update-score-entry-dates
18894 If this variable is non-@code{nil}, temporary score entries that have
18895 been triggered (matched) will have their dates updated.  (This is how Gnus
18896 controls expiry---all non-matched-entries will become too old while
18897 matched entries will stay fresh and young.)  However, if you set this
18898 variable to @code{nil}, even matched entries will grow old and will
18899 have to face that oh-so grim reaper.
18900
18901 @item gnus-score-after-write-file-function
18902 @vindex gnus-score-after-write-file-function
18903 Function called with the name of the score file just written.
18904
18905 @item gnus-score-thread-simplify
18906 @vindex gnus-score-thread-simplify
18907 If this variable is non-@code{nil}, article subjects will be
18908 simplified for subject scoring purposes in the same manner as with
18909 threading---according to the current value of
18910 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18911 @code{substring} or @code{exact} matching, the match will also be
18912 simplified in this manner.
18913
18914 @end table
18915
18916
18917 @node Score File Format
18918 @section Score File Format
18919 @cindex score file format
18920
18921 A score file is an @code{emacs-lisp} file that normally contains just a
18922 single form.  Casual users are not expected to edit these files;
18923 everything can be changed from the summary buffer.
18924
18925 Anyway, if you'd like to dig into it yourself, here's an example:
18926
18927 @lisp
18928 (("from"
18929   ("Lars Ingebrigtsen" -10000)
18930   ("Per Abrahamsen")
18931   ("larsi\\|lmi" -50000 nil R))
18932  ("subject"
18933   ("Ding is Badd" nil 728373))
18934  ("xref"
18935   ("alt.politics" -1000 728372 s))
18936  ("lines"
18937   (2 -100 nil <))
18938  (mark 0)
18939  (expunge -1000)
18940  (mark-and-expunge -10)
18941  (read-only nil)
18942  (orphan -10)
18943  (adapt t)
18944  (files "/hom/larsi/News/gnu.SCORE")
18945  (exclude-files "all.SCORE")
18946  (local (gnus-newsgroup-auto-expire t)
18947         (gnus-summary-make-false-root empty))
18948  (eval (ding)))
18949 @end lisp
18950
18951 This example demonstrates most score file elements.  @xref{Advanced
18952 Scoring}, for a different approach.
18953
18954 Even though this looks much like Lisp code, nothing here is actually
18955 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18956 has to be valid syntactically, if not semantically.
18957
18958 Six keys are supported by this alist:
18959
18960 @table @code
18961
18962 @item STRING
18963 If the key is a string, it is the name of the header to perform the
18964 match on.  Scoring can only be performed on these eight headers:
18965 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18966 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18967 these headers, there are three strings to tell Gnus to fetch the entire
18968 article and do the match on larger parts of the article: @code{Body}
18969 will perform the match on the body of the article, @code{Head} will
18970 perform the match on the head of the article, and @code{All} will
18971 perform the match on the entire article.  Note that using any of these
18972 last three keys will slow down group entry @emph{considerably}.  The
18973 final ``header'' you can score on is @code{Followup}.  These score
18974 entries will result in new score entries being added for all follow-ups
18975 to articles that matches these score entries.
18976
18977 Following this key is an arbitrary number of score entries, where each
18978 score entry has one to four elements.
18979 @enumerate
18980
18981 @item
18982 The first element is the @dfn{match element}.  On most headers this will
18983 be a string, but on the Lines and Chars headers, this must be an
18984 integer.
18985
18986 @item
18987 If the second element is present, it should be a number---the @dfn{score
18988 element}.  This number should be an integer in the neginf to posinf
18989 interval.  This number is added to the score of the article if the match
18990 is successful.  If this element is not present, the
18991 @code{gnus-score-interactive-default-score} number will be used
18992 instead.  This is 1000 by default.
18993
18994 @item
18995 If the third element is present, it should be a number---the @dfn{date
18996 element}.  This date says when the last time this score entry matched,
18997 which provides a mechanism for expiring the score entries.  It this
18998 element is not present, the score entry is permanent.  The date is
18999 represented by the number of days since December 31, 1 BCE.
19000
19001 @item
19002 If the fourth element is present, it should be a symbol---the @dfn{type
19003 element}.  This element specifies what function should be used to see
19004 whether this score entry matches the article.  What match types that can
19005 be used depends on what header you wish to perform the match on.
19006 @table @dfn
19007
19008 @item From, Subject, References, Xref, Message-ID
19009 For most header types, there are the @code{r} and @code{R} (regexp), as
19010 well as @code{s} and @code{S} (substring) types, and @code{e} and
19011 @code{E} (exact match), and @code{w} (word match) types.  If this
19012 element is not present, Gnus will assume that substring matching should
19013 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19014 that the matches will be done in a case-sensitive manner.  All these
19015 one-letter types are really just abbreviations for the @code{regexp},
19016 @code{string}, @code{exact}, and @code{word} types, which you can use
19017 instead, if you feel like.
19018
19019 @item Extra
19020 Just as for the standard string overview headers, if you are using
19021 gnus-extra-headers, you can score on these headers' values.  In this
19022 case, there is a 5th element in the score entry, being the name of the
19023 header to be scored.  The following entry is useful in your
19024 @file{all.SCORE} file in case of spam attacks from a single origin host,
19025 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19026
19027 @lisp
19028 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19029 @end lisp
19030
19031 @item Lines, Chars
19032 These two headers use different match types: @code{<}, @code{>},
19033 @code{=}, @code{>=} and @code{<=}.
19034
19035 These predicates are true if
19036
19037 @example
19038 (PREDICATE HEADER MATCH)
19039 @end example
19040
19041 evaluates to non-@code{nil}.  For instance, the advanced match
19042 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19043 following form:
19044
19045 @lisp
19046 (< header-value 4)
19047 @end lisp
19048
19049 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19050 the match, we get the score added if the article has less than 4 lines.
19051 (It's easy to get confused and think it's the other way around.  But
19052 it's not.  I think.)
19053
19054 When matching on @code{Lines}, be careful because some back ends (like
19055 @code{nndir}) do not generate @code{Lines} header, so every article ends
19056 up being marked as having 0 lines.  This can lead to strange results if
19057 you happen to lower score of the articles with few lines.
19058
19059 @item Date
19060 For the Date header we have three kinda silly match types:
19061 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19062 ever being useful, but, like, it would feel kinda silly not to provide
19063 this function.  Just in case.  You never know.  Better safe than sorry.
19064 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19065 sex on a first date.  (I have been told that at least one person, and I
19066 quote, ``found this function indispensable'', however.)
19067
19068 @cindex ISO8601
19069 @cindex date
19070 A more useful match type is @code{regexp}.  With it, you can match the
19071 date string using a regular expression.  The date is normalized to
19072 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19073 you want to match all articles that have been posted on April 1st in
19074 every year, you could use @samp{....0401.........} as a match string,
19075 for instance.  (Note that the date is kept in its original time zone, so
19076 this will match articles that were posted when it was April 1st where
19077 the article was posted from.  Time zones are such wholesome fun for the
19078 whole family, eh?)
19079
19080 @item Head, Body, All
19081 These three match keys use the same match types as the @code{From} (etc)
19082 header uses.
19083
19084 @item Followup
19085 This match key is somewhat special, in that it will match the
19086 @code{From} header, and affect the score of not only the matching
19087 articles, but also all followups to the matching articles.  This allows
19088 you e.g. increase the score of followups to your own articles, or
19089 decrease the score of followups to the articles of some known
19090 trouble-maker.  Uses the same match types as the @code{From} header
19091 uses.  (Using this match key will lead to creation of @file{ADAPT}
19092 files.)
19093
19094 @item Thread
19095 This match key works along the same lines as the @code{Followup} match
19096 key.  If you say that you want to score on a (sub-)thread started by an
19097 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19098 match.  This will add a new @samp{thread} match for each article that
19099 has @var{x} in its @code{References} header.  (These new @samp{thread}
19100 matches will use the @code{Message-ID}s of these matching articles.)
19101 This will ensure that you can raise/lower the score of an entire thread,
19102 even though some articles in the thread may not have complete
19103 @code{References} headers.  Note that using this may lead to
19104 undeterministic scores of the articles in the thread.  (Using this match
19105 key will lead to creation of @file{ADAPT} files.)
19106 @end table
19107 @end enumerate
19108
19109 @cindex score file atoms
19110 @item mark
19111 The value of this entry should be a number.  Any articles with a score
19112 lower than this number will be marked as read.
19113
19114 @item expunge
19115 The value of this entry should be a number.  Any articles with a score
19116 lower than this number will be removed from the summary buffer.
19117
19118 @item mark-and-expunge
19119 The value of this entry should be a number.  Any articles with a score
19120 lower than this number will be marked as read and removed from the
19121 summary buffer.
19122
19123 @item thread-mark-and-expunge
19124 The value of this entry should be a number.  All articles that belong to
19125 a thread that has a total score below this number will be marked as read
19126 and removed from the summary buffer.  @code{gnus-thread-score-function}
19127 says how to compute the total score for a thread.
19128
19129 @item files
19130 The value of this entry should be any number of file names.  These files
19131 are assumed to be score files as well, and will be loaded the same way
19132 this one was.
19133
19134 @item exclude-files
19135 The clue of this entry should be any number of files.  These files will
19136 not be loaded, even though they would normally be so, for some reason or
19137 other.
19138
19139 @item eval
19140 The value of this entry will be @code{eval}el.  This element will be
19141 ignored when handling global score files.
19142
19143 @item read-only
19144 Read-only score files will not be updated or saved.  Global score files
19145 should feature this atom (@pxref{Global Score Files}).  (Note:
19146 @dfn{Global} here really means @dfn{global}; not your personal
19147 apply-to-all-groups score files.)
19148
19149 @item orphan
19150 The value of this entry should be a number.  Articles that do not have
19151 parents will get this number added to their scores.  Imagine you follow
19152 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19153 will only follow a few of the threads, also want to see any new threads.
19154
19155 You can do this with the following two score file entries:
19156
19157 @example
19158         (orphan -500)
19159         (mark-and-expunge -100)
19160 @end example
19161
19162 When you enter the group the first time, you will only see the new
19163 threads.  You then raise the score of the threads that you find
19164 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19165 rest.  Next time you enter the group, you will see new articles in the
19166 interesting threads, plus any new threads.
19167
19168 I.e.---the orphan score atom is for high-volume groups where a few
19169 interesting threads which can't be found automatically by ordinary
19170 scoring rules exist.
19171
19172 @item adapt
19173 This entry controls the adaptive scoring.  If it is @code{t}, the
19174 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19175 adaptive scoring will be performed on this group.  If it is a list, this
19176 list will be used as the adaptive scoring rules.  If it isn't present,
19177 or is something other than @code{t} or @code{ignore}, the default
19178 adaptive scoring rules will be used.  If you want to use adaptive
19179 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19180 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19181 not want adaptive scoring.  If you only want adaptive scoring in a few
19182 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19183 insert @code{(adapt t)} in the score files of the groups where you want
19184 it.
19185
19186 @item adapt-file
19187 All adaptive score entries will go to the file named by this entry.  It
19188 will also be applied when entering the group.  This atom might be handy
19189 if you want to adapt on several groups at once, using the same adaptive
19190 file for a number of groups.
19191
19192 @item local
19193 @cindex local variables
19194 The value of this entry should be a list of @code{(@var{var}
19195 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19196 current summary buffer, and set to the value specified.  This is a
19197 convenient, if somewhat strange, way of setting variables in some
19198 groups if you don't like hooks much.  Note that the @var{value} won't
19199 be evaluated.
19200 @end table
19201
19202
19203 @node Score File Editing
19204 @section Score File Editing
19205
19206 You normally enter all scoring commands from the summary buffer, but you
19207 might feel the urge to edit them by hand as well, so we've supplied you
19208 with a mode for that.
19209
19210 It's simply a slightly customized @code{emacs-lisp} mode, with these
19211 additional commands:
19212
19213 @table @kbd
19214
19215 @item C-c C-c
19216 @kindex C-c C-c (Score)
19217 @findex gnus-score-edit-done
19218 Save the changes you have made and return to the summary buffer
19219 (@code{gnus-score-edit-done}).
19220
19221 @item C-c C-d
19222 @kindex C-c C-d (Score)
19223 @findex gnus-score-edit-insert-date
19224 Insert the current date in numerical format
19225 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19226 you were wondering.
19227
19228 @item C-c C-p
19229 @kindex C-c C-p (Score)
19230 @findex gnus-score-pretty-print
19231 The adaptive score files are saved in an unformatted fashion.  If you
19232 intend to read one of these files, you want to @dfn{pretty print} it
19233 first.  This command (@code{gnus-score-pretty-print}) does that for
19234 you.
19235
19236 @end table
19237
19238 Type @kbd{M-x gnus-score-mode} to use this mode.
19239
19240 @vindex gnus-score-mode-hook
19241 @code{gnus-score-menu-hook} is run in score mode buffers.
19242
19243 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19244 e} to begin editing score files.
19245
19246
19247 @node Adaptive Scoring
19248 @section Adaptive Scoring
19249 @cindex adaptive scoring
19250
19251 If all this scoring is getting you down, Gnus has a way of making it all
19252 happen automatically---as if by magic.  Or rather, as if by artificial
19253 stupidity, to be precise.
19254
19255 @vindex gnus-use-adaptive-scoring
19256 When you read an article, or mark an article as read, or kill an
19257 article, you leave marks behind.  On exit from the group, Gnus can sniff
19258 these marks and add score elements depending on what marks it finds.
19259 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19260 @code{t} or @code{(line)}.  If you want score adaptively on separate
19261 words appearing in the subjects, you should set this variable to
19262 @code{(word)}.  If you want to use both adaptive methods, set this
19263 variable to @code{(word line)}.
19264
19265 @vindex gnus-default-adaptive-score-alist
19266 To give you complete control over the scoring process, you can customize
19267 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19268 might look something like this:
19269
19270 @lisp
19271 (setq gnus-default-adaptive-score-alist
19272   '((gnus-unread-mark)
19273     (gnus-ticked-mark (from 4))
19274     (gnus-dormant-mark (from 5))
19275     (gnus-del-mark (from -4) (subject -1))
19276     (gnus-read-mark (from 4) (subject 2))
19277     (gnus-expirable-mark (from -1) (subject -1))
19278     (gnus-killed-mark (from -1) (subject -3))
19279     (gnus-kill-file-mark)
19280     (gnus-ancient-mark)
19281     (gnus-low-score-mark)
19282     (gnus-catchup-mark (from -1) (subject -1))))
19283 @end lisp
19284
19285 As you see, each element in this alist has a mark as a key (either a
19286 variable name or a ``real'' mark---a character).  Following this key is
19287 a arbitrary number of header/score pairs.  If there are no header/score
19288 pairs following the key, no adaptive scoring will be done on articles
19289 that have that key as the article mark.  For instance, articles with
19290 @code{gnus-unread-mark} in the example above will not get adaptive score
19291 entries.
19292
19293 Each article can have only one mark, so just a single of these rules
19294 will be applied to each article.
19295
19296 To take @code{gnus-del-mark} as an example---this alist says that all
19297 articles that have that mark (i.e., are marked with @samp{e}) will have a
19298 score entry added to lower based on the @code{From} header by -4, and
19299 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19300
19301 If you have marked 10 articles with the same subject with
19302 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19303 That means that that subject will get a score of ten times -1, which
19304 should be, unless I'm much mistaken, -10.
19305
19306 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19307 the read articles will be marked with the @samp{E} mark.  This'll
19308 probably make adaptive scoring slightly impossible, so auto-expiring and
19309 adaptive scoring doesn't really mix very well.
19310
19311 The headers you can score on are @code{from}, @code{subject},
19312 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19313 @code{chars} and @code{date}.  In addition, you can score on
19314 @code{followup}, which will create an adaptive score entry that matches
19315 on the @code{References} header using the @code{Message-ID} of the
19316 current article, thereby matching the following thread.
19317
19318 If you use this scheme, you should set the score file atom @code{mark}
19319 to something small---like -300, perhaps, to avoid having small random
19320 changes result in articles getting marked as read.
19321
19322 After using adaptive scoring for a week or so, Gnus should start to
19323 become properly trained and enhance the authors you like best, and kill
19324 the authors you like least, without you having to say so explicitly.
19325
19326 You can control what groups the adaptive scoring is to be performed on
19327 by using the score files (@pxref{Score File Format}).  This will also
19328 let you use different rules in different groups.
19329
19330 @vindex gnus-adaptive-file-suffix
19331 The adaptive score entries will be put into a file where the name is the
19332 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19333 is @file{ADAPT}.
19334
19335 @vindex gnus-score-exact-adapt-limit
19336 When doing adaptive scoring, substring or fuzzy matching would probably
19337 give you the best results in most cases.  However, if the header one
19338 matches is short, the possibility for false positives is great, so if
19339 the length of the match is less than
19340 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19341 this variable is @code{nil}, exact matching will always be used to avoid
19342 this problem.
19343
19344 @vindex gnus-default-adaptive-word-score-alist
19345 As mentioned above, you can adapt either on individual words or entire
19346 headers.  If you adapt on words, the
19347 @code{gnus-default-adaptive-word-score-alist} variable says what score
19348 each instance of a word should add given a mark.
19349
19350 @lisp
19351 (setq gnus-default-adaptive-word-score-alist
19352       `((,gnus-read-mark . 30)
19353         (,gnus-catchup-mark . -10)
19354         (,gnus-killed-mark . -20)
19355         (,gnus-del-mark . -15)))
19356 @end lisp
19357
19358 This is the default value.  If you have adaption on words enabled, every
19359 word that appears in subjects of articles marked with
19360 @code{gnus-read-mark} will result in a score rule that increase the
19361 score with 30 points.
19362
19363 @vindex gnus-default-ignored-adaptive-words
19364 @vindex gnus-ignored-adaptive-words
19365 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19366 will be ignored.  If you wish to add more words to be ignored, use the
19367 @code{gnus-ignored-adaptive-words} list instead.
19368
19369 @vindex gnus-adaptive-word-length-limit
19370 Some may feel that short words shouldn't count when doing adaptive
19371 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19372 an integer.  Words shorter than this number will be ignored.  This
19373 variable defaults to @code{nil}.
19374
19375 @vindex gnus-adaptive-word-syntax-table
19376 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19377 syntax table in effect.  It is similar to the standard syntax table, but
19378 it considers numbers to be non-word-constituent characters.
19379
19380 @vindex gnus-adaptive-word-minimum
19381 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19382 word scoring process will never bring down the score of an article to
19383 below this number.  The default is @code{nil}.
19384
19385 @vindex gnus-adaptive-word-no-group-words
19386 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19387 won't adaptively word score any of the words in the group name.  Useful
19388 for groups like @samp{comp.editors.emacs}, where most of the subject
19389 lines contain the word @samp{emacs}.
19390
19391 After using this scheme for a while, it might be nice to write a
19392 @code{gnus-psychoanalyze-user} command to go through the rules and see
19393 what words you like and what words you don't like.  Or perhaps not.
19394
19395 Note that the adaptive word scoring thing is highly experimental and is
19396 likely to change in the future.  Initial impressions seem to indicate
19397 that it's totally useless as it stands.  Some more work (involving more
19398 rigorous statistical methods) will have to be done to make this useful.
19399
19400
19401 @node Home Score File
19402 @section Home Score File
19403
19404 The score file where new score file entries will go is called the
19405 @dfn{home score file}.  This is normally (and by default) the score file
19406 for the group itself.  For instance, the home score file for
19407 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19408
19409 However, this may not be what you want.  It is often convenient to share
19410 a common home score file among many groups---all @samp{emacs} groups
19411 could perhaps use the same home score file.
19412
19413 @vindex gnus-home-score-file
19414 The variable that controls this is @code{gnus-home-score-file}.  It can
19415 be:
19416
19417 @enumerate
19418 @item
19419 A string.  Then this file will be used as the home score file for all
19420 groups.
19421
19422 @item
19423 A function.  The result of this function will be used as the home score
19424 file.  The function will be called with the name of the group as the
19425 parameter.
19426
19427 @item
19428 A list.  The elements in this list can be:
19429
19430 @enumerate
19431 @item
19432 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19433 group name, the @var{file-name} will be used as the home score file.
19434
19435 @item
19436 A function.  If the function returns non-@code{nil}, the result will
19437 be used as the home score file.
19438
19439 @item
19440 A string.  Use the string as the home score file.
19441 @end enumerate
19442
19443 The list will be traversed from the beginning towards the end looking
19444 for matches.
19445
19446 @end enumerate
19447
19448 So, if you want to use just a single score file, you could say:
19449
19450 @lisp
19451 (setq gnus-home-score-file
19452       "my-total-score-file.SCORE")
19453 @end lisp
19454
19455 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19456 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19457
19458 @findex gnus-hierarchial-home-score-file
19459 @lisp
19460 (setq gnus-home-score-file
19461       'gnus-hierarchial-home-score-file)
19462 @end lisp
19463
19464 This is a ready-made function provided for your convenience.
19465 Other functions include
19466
19467 @table @code
19468 @item gnus-current-home-score-file
19469 @findex gnus-current-home-score-file
19470 Return the ``current'' regular score file.  This will make scoring
19471 commands add entry to the ``innermost'' matching score file.
19472
19473 @end table
19474
19475 If you want to have one score file for the @samp{emacs} groups and
19476 another for the @samp{comp} groups, while letting all other groups use
19477 their own home score files:
19478
19479 @lisp
19480 (setq gnus-home-score-file
19481       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19482       '(("\\.emacs" "emacs.SCORE")
19483         ;; @r{All the comp groups in one score file}
19484         ("^comp" "comp.SCORE")))
19485 @end lisp
19486
19487 @vindex gnus-home-adapt-file
19488 @code{gnus-home-adapt-file} works exactly the same way as
19489 @code{gnus-home-score-file}, but says what the home adaptive score file
19490 is instead.  All new adaptive file entries will go into the file
19491 specified by this variable, and the same syntax is allowed.
19492
19493 In addition to using @code{gnus-home-score-file} and
19494 @code{gnus-home-adapt-file}, you can also use group parameters
19495 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19496 Parameters}) to achieve much the same.  Group and topic parameters take
19497 precedence over this variable.
19498
19499
19500 @node Followups To Yourself
19501 @section Followups To Yourself
19502
19503 Gnus offers two commands for picking out the @code{Message-ID} header in
19504 the current buffer.  Gnus will then add a score rule that scores using
19505 this @code{Message-ID} on the @code{References} header of other
19506 articles.  This will, in effect, increase the score of all articles that
19507 respond to the article in the current buffer.  Quite useful if you want
19508 to easily note when people answer what you've said.
19509
19510 @table @code
19511
19512 @item gnus-score-followup-article
19513 @findex gnus-score-followup-article
19514 This will add a score to articles that directly follow up your own
19515 article.
19516
19517 @item gnus-score-followup-thread
19518 @findex gnus-score-followup-thread
19519 This will add a score to all articles that appear in a thread ``below''
19520 your own article.
19521 @end table
19522
19523 @vindex message-sent-hook
19524 These two functions are both primarily meant to be used in hooks like
19525 @code{message-sent-hook}, like this:
19526 @lisp
19527 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19528 @end lisp
19529
19530
19531 If you look closely at your own @code{Message-ID}, you'll notice that
19532 the first two or three characters are always the same.  Here's two of
19533 mine:
19534
19535 @example
19536 <x6u3u47icf.fsf@@eyesore.no>
19537 <x6sp9o7ibw.fsf@@eyesore.no>
19538 @end example
19539
19540 So ``my'' ident on this machine is @samp{x6}.  This can be
19541 exploited---the following rule will raise the score on all followups to
19542 myself:
19543
19544 @lisp
19545 ("references"
19546  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19547   1000 nil r))
19548 @end lisp
19549
19550 Whether it's the first two or first three characters that are ``yours''
19551 is system-dependent.
19552
19553
19554 @node Scoring On Other Headers
19555 @section Scoring On Other Headers
19556 @cindex scoring on other headers
19557
19558 Gnus is quite fast when scoring the ``traditional''
19559 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19560 other headers requires writing a @code{head} scoring rule, which means
19561 that Gnus has to request every single article from the back end to find
19562 matches.  This takes a long time in big groups.
19563
19564 Now, there's not much you can do about this for news groups, but for
19565 mail groups, you have greater control.  In @ref{To From Newsgroups},
19566 it's explained in greater detail what this mechanism does, but here's
19567 a cookbook example for @code{nnml} on how to allow scoring on the
19568 @samp{To} and @samp{Cc} headers.
19569
19570 Put the following in your @file{~/.gnus.el} file.
19571
19572 @lisp
19573 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19574       nnmail-extra-headers gnus-extra-headers)
19575 @end lisp
19576
19577 Restart Gnus and rebuild your @code{nnml} overview files with the
19578 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19579 time if you have much mail.
19580
19581 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19582 so: @kbd{I e s p To RET <your name> RET}.
19583
19584 See?  Simple.
19585
19586
19587 @node Scoring Tips
19588 @section Scoring Tips
19589 @cindex scoring tips
19590
19591 @table @dfn
19592
19593 @item Crossposts
19594 @cindex crossposts
19595 @cindex scoring crossposts
19596 If you want to lower the score of crossposts, the line to match on is
19597 the @code{Xref} header.
19598 @lisp
19599 ("xref" (" talk.politics.misc:" -1000))
19600 @end lisp
19601
19602 @item Multiple crossposts
19603 If you want to lower the score of articles that have been crossposted to
19604 more than, say, 3 groups:
19605 @lisp
19606 ("xref"
19607   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19608    -1000 nil r))
19609 @end lisp
19610
19611 @item Matching on the body
19612 This is generally not a very good idea---it takes a very long time.
19613 Gnus actually has to fetch each individual article from the server.  But
19614 you might want to anyway, I guess.  Even though there are three match
19615 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19616 and stick with it in each score file.  If you use any two, each article
19617 will be fetched @emph{twice}.  If you want to match a bit on the
19618 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19619 the matches.
19620
19621 @item Marking as read
19622 You will probably want to mark articles that have scores below a certain
19623 number as read.  This is most easily achieved by putting the following
19624 in your @file{all.SCORE} file:
19625 @lisp
19626 ((mark -100))
19627 @end lisp
19628 You may also consider doing something similar with @code{expunge}.
19629
19630 @item Negated character classes
19631 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19632 That will match newlines, which might lead to, well, The Unknown.  Say
19633 @code{[^abcd\n]*} instead.
19634 @end table
19635
19636
19637 @node Reverse Scoring
19638 @section Reverse Scoring
19639 @cindex reverse scoring
19640
19641 If you want to keep just articles that have @samp{Sex with Emacs} in the
19642 subject header, and expunge all other articles, you could put something
19643 like this in your score file:
19644
19645 @lisp
19646 (("subject"
19647   ("Sex with Emacs" 2))
19648  (mark 1)
19649  (expunge 1))
19650 @end lisp
19651
19652 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19653 rest as read, and expunge them to boot.
19654
19655
19656 @node Global Score Files
19657 @section Global Score Files
19658 @cindex global score files
19659
19660 Sure, other newsreaders have ``global kill files''.  These are usually
19661 nothing more than a single kill file that applies to all groups, stored
19662 in the user's home directory.  Bah!  Puny, weak newsreaders!
19663
19664 What I'm talking about here are Global Score Files.  Score files from
19665 all over the world, from users everywhere, uniting all nations in one
19666 big, happy score file union!  Ange-score!  New and untested!
19667
19668 @vindex gnus-global-score-files
19669 All you have to do to use other people's score files is to set the
19670 @code{gnus-global-score-files} variable.  One entry for each score file,
19671 or each score file directory.  Gnus will decide by itself what score
19672 files are applicable to which group.
19673
19674 To use the score file
19675 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19676 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19677 say this:
19678
19679 @lisp
19680 (setq gnus-global-score-files
19681       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19682         "/ftp@@ftp.some-where:/pub/score/"))
19683 @end lisp
19684
19685 @findex gnus-score-search-global-directories
19686 @noindent
19687 Simple, eh?  Directory names must end with a @samp{/}.  These
19688 directories are typically scanned only once during each Gnus session.
19689 If you feel the need to manually re-scan the remote directories, you can
19690 use the @code{gnus-score-search-global-directories} command.
19691
19692 Note that, at present, using this option will slow down group entry
19693 somewhat.  (That is---a lot.)
19694
19695 If you want to start maintaining score files for other people to use,
19696 just put your score file up for anonymous ftp and announce it to the
19697 world.  Become a retro-moderator!  Participate in the retro-moderator
19698 wars sure to ensue, where retro-moderators battle it out for the
19699 sympathy of the people, luring them to use their score files on false
19700 premises!  Yay!  The net is saved!
19701
19702 Here are some tips for the would-be retro-moderator, off the top of my
19703 head:
19704
19705 @itemize @bullet
19706
19707 @item
19708 Articles heavily crossposted are probably junk.
19709 @item
19710 To lower a single inappropriate article, lower by @code{Message-ID}.
19711 @item
19712 Particularly brilliant authors can be raised on a permanent basis.
19713 @item
19714 Authors that repeatedly post off-charter for the group can safely be
19715 lowered out of existence.
19716 @item
19717 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19718 articles completely.
19719
19720 @item
19721 Use expiring score entries to keep the size of the file down.  You
19722 should probably have a long expiry period, though, as some sites keep
19723 old articles for a long time.
19724 @end itemize
19725
19726 @dots{} I wonder whether other newsreaders will support global score files
19727 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19728 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19729 holding our breath yet?
19730
19731
19732 @node Kill Files
19733 @section Kill Files
19734 @cindex kill files
19735
19736 Gnus still supports those pesky old kill files.  In fact, the kill file
19737 entries can now be expiring, which is something I wrote before Daniel
19738 Quinlan thought of doing score files, so I've left the code in there.
19739
19740 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19741 than score processing, so it might be a good idea to rewrite your kill
19742 files into score files.
19743
19744 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19745 forms into this file, which means that you can use kill files as some
19746 sort of primitive hook function to be run on group entry, even though
19747 that isn't a very good idea.
19748
19749 Normal kill files look like this:
19750
19751 @lisp
19752 (gnus-kill "From" "Lars Ingebrigtsen")
19753 (gnus-kill "Subject" "ding")
19754 (gnus-expunge "X")
19755 @end lisp
19756
19757 This will mark every article written by me as read, and remove the
19758 marked articles from the summary buffer.  Very useful, you'll agree.
19759
19760 Other programs use a totally different kill file syntax.  If Gnus
19761 encounters what looks like a @code{rn} kill file, it will take a stab at
19762 interpreting it.
19763
19764 Two summary functions for editing a @sc{gnus} kill file:
19765
19766 @table @kbd
19767
19768 @item M-k
19769 @kindex M-k (Summary)
19770 @findex gnus-summary-edit-local-kill
19771 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19772
19773 @item M-K
19774 @kindex M-K (Summary)
19775 @findex gnus-summary-edit-global-kill
19776 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19777 @end table
19778
19779 Two group mode functions for editing the kill files:
19780
19781 @table @kbd
19782
19783 @item M-k
19784 @kindex M-k (Group)
19785 @findex gnus-group-edit-local-kill
19786 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19787
19788 @item M-K
19789 @kindex M-K (Group)
19790 @findex gnus-group-edit-global-kill
19791 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19792 @end table
19793
19794 Kill file variables:
19795
19796 @table @code
19797 @item gnus-kill-file-name
19798 @vindex gnus-kill-file-name
19799 A kill file for the group @samp{soc.motss} is normally called
19800 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19801 this file name is detailed by the @code{gnus-kill-file-name} variable.
19802 The ``global'' kill file (not in the score file sense of ``global'', of
19803 course) is just called @file{KILL}.
19804
19805 @vindex gnus-kill-save-kill-file
19806 @item gnus-kill-save-kill-file
19807 If this variable is non-@code{nil}, Gnus will save the
19808 kill file after processing, which is necessary if you use expiring
19809 kills.
19810
19811 @item gnus-apply-kill-hook
19812 @vindex gnus-apply-kill-hook
19813 @findex gnus-apply-kill-file-unless-scored
19814 @findex gnus-apply-kill-file
19815 A hook called to apply kill files to a group.  It is
19816 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19817 kill file if you have a score file for the same group, you can set this
19818 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19819 kill files to be processed, you should set this variable to @code{nil}.
19820
19821 @item gnus-kill-file-mode-hook
19822 @vindex gnus-kill-file-mode-hook
19823 A hook called in kill-file mode buffers.
19824
19825 @end table
19826
19827
19828 @node Converting Kill Files
19829 @section Converting Kill Files
19830 @cindex kill files
19831 @cindex converting kill files
19832
19833 If you have loads of old kill files, you may want to convert them into
19834 score files.  If they are ``regular'', you can use
19835 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19836 by hand.
19837
19838 The kill to score conversion package isn't included in Gnus by default.
19839 You can fetch it from
19840 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19841
19842 If your old kill files are very complex---if they contain more
19843 non-@code{gnus-kill} forms than not, you'll have to convert them by
19844 hand.  Or just let them be as they are.  Gnus will still use them as
19845 before.
19846
19847
19848 @node GroupLens
19849 @section GroupLens
19850 @cindex GroupLens
19851
19852 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19853 collaborative filtering system that helps you work together with other
19854 people to find the quality news articles out of the huge volume of
19855 news articles generated every day.
19856
19857 To accomplish this the GroupLens system combines your opinions about
19858 articles you have already read with the opinions of others who have done
19859 likewise and gives you a personalized prediction for each unread news
19860 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19861 rate articles, and finds other people that rate articles the same way.
19862 Once it has found some people you agree with it tells you, in the form
19863 of a prediction, what they thought of the article.  You can use this
19864 prediction to help you decide whether or not you want to read the
19865 article.
19866
19867 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19868 so this section is mostly of historical interest.
19869
19870 @menu
19871 * Using GroupLens::             How to make Gnus use GroupLens.
19872 * Rating Articles::             Letting GroupLens know how you rate articles.
19873 * Displaying Predictions::      Displaying predictions given by GroupLens.
19874 * GroupLens Variables::         Customizing GroupLens.
19875 @end menu
19876
19877
19878 @node Using GroupLens
19879 @subsection Using GroupLens
19880
19881 To use GroupLens you must register a pseudonym with your local
19882 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19883 Bureau (BBB)} is the only better bit in town at the moment.
19884
19885 Once you have registered you'll need to set a couple of variables.
19886
19887 @table @code
19888
19889 @item gnus-use-grouplens
19890 @vindex gnus-use-grouplens
19891 Setting this variable to a non-@code{nil} value will make Gnus hook into
19892 all the relevant GroupLens functions.
19893
19894 @item grouplens-pseudonym
19895 @vindex grouplens-pseudonym
19896 This variable should be set to the pseudonym you got when registering
19897 with the Better Bit Bureau.
19898
19899 @item grouplens-newsgroups
19900 @vindex grouplens-newsgroups
19901 A list of groups that you want to get GroupLens predictions for.
19902
19903 @end table
19904
19905 That's the minimum of what you need to get up and running with GroupLens.
19906 Once you've registered, GroupLens will start giving you scores for
19907 articles based on the average of what other people think.  But, to get
19908 the real benefit of GroupLens you need to start rating articles
19909 yourself.  Then the scores GroupLens gives you will be personalized for
19910 you, based on how the people you usually agree with have already rated.
19911
19912
19913 @node Rating Articles
19914 @subsection Rating Articles
19915
19916 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19917 Where 1 means something like this article is a waste of bandwidth and 5
19918 means that the article was really good.  The basic question to ask
19919 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19920 like this one?''
19921
19922 There are four ways to enter a rating for an article in GroupLens.
19923
19924 @table @kbd
19925
19926 @item r
19927 @kindex r (GroupLens)
19928 @findex bbb-summary-rate-article
19929 This function will prompt you for a rating on a scale of one to five.
19930
19931 @item k
19932 @kindex k (GroupLens)
19933 @findex grouplens-score-thread
19934 This function will prompt you for a rating, and rate all the articles in
19935 the thread.  This is really useful for some of those long running giant
19936 threads in rec.humor.
19937
19938 @end table
19939
19940 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19941 the score of the article you're reading.
19942
19943 @table @kbd
19944
19945 @item 1-5 n
19946 @kindex n (GroupLens)
19947 @findex grouplens-next-unread-article
19948 Rate the article and go to the next unread article.
19949
19950 @item 1-5 ,
19951 @kindex , (GroupLens)
19952 @findex grouplens-best-unread-article
19953 Rate the article and go to the next unread article with the highest score.
19954
19955 @end table
19956
19957 If you want to give the current article a score of 4 and then go to the
19958 next article, just type @kbd{4 n}.
19959
19960
19961 @node Displaying Predictions
19962 @subsection Displaying Predictions
19963
19964 GroupLens makes a prediction for you about how much you will like a
19965 news article.  The predictions from GroupLens are on a scale from 1 to
19966 5, where 1 is the worst and 5 is the best.  You can use the predictions
19967 from GroupLens in one of three ways controlled by the variable
19968 @code{gnus-grouplens-override-scoring}.
19969
19970 @vindex gnus-grouplens-override-scoring
19971 There are three ways to display predictions in grouplens.  You may
19972 choose to have the GroupLens scores contribute to, or override the
19973 regular gnus scoring mechanism.  override is the default; however, some
19974 people prefer to see the Gnus scores plus the grouplens scores.  To get
19975 the separate scoring behavior you need to set
19976 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19977 GroupLens predictions combined with the grouplens scores set it to
19978 @code{'override} and to combine the scores set
19979 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19980 the combine option you will also want to set the values for
19981 @code{grouplens-prediction-offset} and
19982 @code{grouplens-score-scale-factor}.
19983
19984 @vindex grouplens-prediction-display
19985 In either case, GroupLens gives you a few choices for how you would like
19986 to see your predictions displayed.  The display of predictions is
19987 controlled by the @code{grouplens-prediction-display} variable.
19988
19989 The following are valid values for that variable.
19990
19991 @table @code
19992 @item prediction-spot
19993 The higher the prediction, the further to the right an @samp{*} is
19994 displayed.
19995
19996 @item confidence-interval
19997 A numeric confidence interval.
19998
19999 @item prediction-bar
20000 The higher the prediction, the longer the bar.
20001
20002 @item confidence-bar
20003 Numerical confidence.
20004
20005 @item confidence-spot
20006 The spot gets bigger with more confidence.
20007
20008 @item prediction-num
20009 Plain-old numeric value.
20010
20011 @item confidence-plus-minus
20012 Prediction +/- confidence.
20013
20014 @end table
20015
20016
20017 @node GroupLens Variables
20018 @subsection GroupLens Variables
20019
20020 @table @code
20021
20022 @item gnus-summary-grouplens-line-format
20023 The summary line format used in GroupLens-enhanced summary buffers.  It
20024 accepts the same specs as the normal summary line format (@pxref{Summary
20025 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20026 %s\n}.
20027
20028 @item grouplens-bbb-host
20029 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20030 default.
20031
20032 @item grouplens-bbb-port
20033 Port of the host running the bbbd server.  The default is 9000.
20034
20035 @item grouplens-score-offset
20036 Offset the prediction by this value.  In other words, subtract the
20037 prediction value by this number to arrive at the effective score.  The
20038 default is 0.
20039
20040 @item grouplens-score-scale-factor
20041 This variable allows the user to magnify the effect of GroupLens scores.
20042 The scale factor is applied after the offset.  The default is 1.
20043
20044 @end table
20045
20046
20047 @node Advanced Scoring
20048 @section Advanced Scoring
20049
20050 Scoring on Subjects and From headers is nice enough, but what if you're
20051 really interested in what a person has to say only when she's talking
20052 about a particular subject?  Or what if you really don't want to
20053 read what person A has to say when she's following up to person B, but
20054 want to read what she says when she's following up to person C?
20055
20056 By using advanced scoring rules you may create arbitrarily complex
20057 scoring patterns.
20058
20059 @menu
20060 * Advanced Scoring Syntax::     A definition.
20061 * Advanced Scoring Examples::   What they look like.
20062 * Advanced Scoring Tips::       Getting the most out of it.
20063 @end menu
20064
20065
20066 @node Advanced Scoring Syntax
20067 @subsection Advanced Scoring Syntax
20068
20069 Ordinary scoring rules have a string as the first element in the rule.
20070 Advanced scoring rules have a list as the first element.  The second
20071 element is the score to be applied if the first element evaluated to a
20072 non-@code{nil} value.
20073
20074 These lists may consist of three logical operators, one redirection
20075 operator, and various match operators.
20076
20077 Logical operators:
20078
20079 @table @code
20080 @item &
20081 @itemx and
20082 This logical operator will evaluate each of its arguments until it finds
20083 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20084 evaluate to @code{true} values, then this operator will return
20085 @code{true}.
20086
20087 @item |
20088 @itemx or
20089 This logical operator will evaluate each of its arguments until it finds
20090 one that evaluates to @code{true}.  If no arguments are @code{true},
20091 then this operator will return @code{false}.
20092
20093 @item !
20094 @itemx not
20095 @itemx Â¬
20096 This logical operator only takes a single argument.  It returns the
20097 logical negation of the value of its argument.
20098
20099 @end table
20100
20101 There is an @dfn{indirection operator} that will make its arguments
20102 apply to the ancestors of the current article being scored.  For
20103 instance, @code{1-} will make score rules apply to the parent of the
20104 current article.  @code{2-} will make score rules apply to the
20105 grandparent of the current article.  Alternatively, you can write
20106 @code{^^}, where the number of @code{^}s (carets) says how far back into
20107 the ancestry you want to go.
20108
20109 Finally, we have the match operators.  These are the ones that do the
20110 real work.  Match operators are header name strings followed by a match
20111 and a match type.  A typical match operator looks like @samp{("from"
20112 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20113 simple scoring, and the match types are also the same.
20114
20115
20116 @node Advanced Scoring Examples
20117 @subsection Advanced Scoring Examples
20118
20119 Please note that the following examples are score file rules.  To
20120 make a complete score file from them, surround them with another pair
20121 of parentheses.
20122
20123 Let's say you want to increase the score of articles written by Lars
20124 when he's talking about Gnus:
20125
20126 @example
20127 @group
20128 ((&
20129   ("from" "Lars Ingebrigtsen")
20130   ("subject" "Gnus"))
20131  1000)
20132 @end group
20133 @end example
20134
20135 Quite simple, huh?
20136
20137 When he writes long articles, he sometimes has something nice to say:
20138
20139 @example
20140 ((&
20141   ("from" "Lars Ingebrigtsen")
20142   (|
20143    ("subject" "Gnus")
20144    ("lines" 100 >)))
20145  1000)
20146 @end example
20147
20148 However, when he responds to things written by Reig Eigil Logge, you
20149 really don't want to read what he's written:
20150
20151 @example
20152 ((&
20153   ("from" "Lars Ingebrigtsen")
20154   (1- ("from" "Reig Eigir Logge")))
20155  -100000)
20156 @end example
20157
20158 Everybody that follows up Redmondo when he writes about disappearing
20159 socks should have their scores raised, but only when they talk about
20160 white socks.  However, when Lars talks about socks, it's usually not
20161 very interesting:
20162
20163 @example
20164 ((&
20165   (1-
20166    (&
20167     ("from" "redmondo@@.*no" r)
20168     ("body" "disappearing.*socks" t)))
20169   (! ("from" "Lars Ingebrigtsen"))
20170   ("body" "white.*socks"))
20171  1000)
20172 @end example
20173
20174 The possibilities are endless.
20175
20176
20177 @node Advanced Scoring Tips
20178 @subsection Advanced Scoring Tips
20179
20180 The @code{&} and @code{|} logical operators do short-circuit logic.
20181 That is, they stop processing their arguments when it's clear what the
20182 result of the operation will be.  For instance, if one of the arguments
20183 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20184 the rest of the arguments.  This means that you should put slow matches
20185 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20186 @samp{subject}) first.
20187
20188 The indirection arguments (@code{1-} and so on) will make their
20189 arguments work on previous generations of the thread.  If you say
20190 something like:
20191
20192 @example
20193 ...
20194 (1-
20195  (1-
20196   ("from" "lars")))
20197 ...
20198 @end example
20199
20200 Then that means "score on the from header of the grandparent of the
20201 current article".  An indirection is quite fast, but it's better to say:
20202
20203 @example
20204 (1-
20205  (&
20206   ("from" "Lars")
20207   ("subject" "Gnus")))
20208 @end example
20209
20210 than it is to say:
20211
20212 @example
20213 (&
20214  (1- ("from" "Lars"))
20215  (1- ("subject" "Gnus")))
20216 @end example
20217
20218
20219 @node Score Decays
20220 @section Score Decays
20221 @cindex score decays
20222 @cindex decays
20223
20224 You may find that your scores have a tendency to grow without
20225 bounds, especially if you're using adaptive scoring.  If scores get too
20226 big, they lose all meaning---they simply max out and it's difficult to
20227 use them in any sensible way.
20228
20229 @vindex gnus-decay-scores
20230 @findex gnus-decay-score
20231 @vindex gnus-decay-score-function
20232 Gnus provides a mechanism for decaying scores to help with this problem.
20233 When score files are loaded and @code{gnus-decay-scores} is
20234 non-@code{nil}, Gnus will run the score files through the decaying
20235 mechanism thereby lowering the scores of all non-permanent score rules.
20236 The decay itself if performed by the @code{gnus-decay-score-function}
20237 function, which is @code{gnus-decay-score} by default.  Here's the
20238 definition of that function:
20239
20240 @lisp
20241 (defun gnus-decay-score (score)
20242   "Decay SCORE.
20243 This is done according to `gnus-score-decay-constant'
20244 and `gnus-score-decay-scale'."
20245   (floor
20246    (- score
20247       (* (if (< score 0) 1 -1)
20248          (min (abs score)
20249               (max gnus-score-decay-constant
20250                    (* (abs score)
20251                       gnus-score-decay-scale)))))))
20252 @end lisp
20253
20254 @vindex gnus-score-decay-scale
20255 @vindex gnus-score-decay-constant
20256 @code{gnus-score-decay-constant} is 3 by default and
20257 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20258
20259 @enumerate
20260 @item
20261 Scores between -3 and 3 will be set to 0 when this function is called.
20262
20263 @item
20264 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20265
20266 @item
20267 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20268 score.
20269 @end enumerate
20270
20271 If you don't like this decay function, write your own.  It is called
20272 with the score to be decayed as its only parameter, and it should return
20273 the new score, which should be an integer.
20274
20275 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20276 four days, Gnus will decay the scores four times, for instance.
20277
20278 @iftex
20279 @iflatex
20280 @chapter Message
20281 @include message.texi
20282 @chapter Emacs MIME
20283 @include emacs-mime.texi
20284 @chapter Sieve
20285 @include sieve.texi
20286 @chapter PGG
20287 @include pgg.texi
20288 @end iflatex
20289 @end iftex
20290
20291 @node Various
20292 @chapter Various
20293
20294 @menu
20295 * Process/Prefix::              A convention used by many treatment commands.
20296 * Interactive::                 Making Gnus ask you many questions.
20297 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20298 * Formatting Variables::        You can specify what buffers should look like.
20299 * Window Layout::               Configuring the Gnus buffer windows.
20300 * Faces and Fonts::             How to change how faces look.
20301 * Compilation::                 How to speed Gnus up.
20302 * Mode Lines::                  Displaying information in the mode lines.
20303 * Highlighting and Menus::      Making buffers look all nice and cozy.
20304 * Buttons::                     Get tendinitis in ten easy steps!
20305 * Daemons::                     Gnus can do things behind your back.
20306 * NoCeM::                       How to avoid spam and other fatty foods.
20307 * Undo::                        Some actions can be undone.
20308 * Predicate Specifiers::        Specifying predicates.
20309 * Moderation::                  What to do if you're a moderator.
20310 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20311 * Fuzzy Matching::              What's the big fuzz?
20312 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20313 * Various Various::             Things that are really various.
20314 @end menu
20315
20316
20317 @node Process/Prefix
20318 @section Process/Prefix
20319 @cindex process/prefix convention
20320
20321 Many functions, among them functions for moving, decoding and saving
20322 articles, use what is known as the @dfn{Process/Prefix convention}.
20323
20324 This is a method for figuring out what articles the user wants the
20325 command to be performed on.
20326
20327 It goes like this:
20328
20329 If the numeric prefix is N, perform the operation on the next N
20330 articles, starting with the current one.  If the numeric prefix is
20331 negative, perform the operation on the previous N articles, starting
20332 with the current one.
20333
20334 @vindex transient-mark-mode
20335 If @code{transient-mark-mode} in non-@code{nil} and the region is
20336 active, all articles in the region will be worked upon.
20337
20338 If there is no numeric prefix, but some articles are marked with the
20339 process mark, perform the operation on the articles marked with
20340 the process mark.
20341
20342 If there is neither a numeric prefix nor any articles marked with the
20343 process mark, just perform the operation on the current article.
20344
20345 Quite simple, really, but it needs to be made clear so that surprises
20346 are avoided.
20347
20348 Commands that react to the process mark will push the current list of
20349 process marked articles onto a stack and will then clear all process
20350 marked articles.  You can restore the previous configuration with the
20351 @kbd{M P y} command (@pxref{Setting Process Marks}).
20352
20353 @vindex gnus-summary-goto-unread
20354 One thing that seems to shock & horrify lots of people is that, for
20355 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20356 Since each @kbd{d} (which marks the current article as read) by default
20357 goes to the next unread article after marking, this means that @kbd{3 d}
20358 will mark the next three unread articles as read, no matter what the
20359 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20360 @code{nil} for a more straightforward action.
20361
20362 Many commands do not use the process/prefix convention.  All commands
20363 that do explicitly say so in this manual.  To apply the process/prefix
20364 convention to commands that do not use it, you can use the @kbd{M-&}
20365 command.  For instance, to mark all the articles in the group as
20366 expirable, you could say @kbd{M P b M-& E}.
20367
20368
20369 @node Interactive
20370 @section Interactive
20371 @cindex interaction
20372
20373 @table @code
20374
20375 @item gnus-novice-user
20376 @vindex gnus-novice-user
20377 If this variable is non-@code{nil}, you are either a newcomer to the
20378 World of Usenet, or you are very cautious, which is a nice thing to be,
20379 really.  You will be given questions of the type ``Are you sure you want
20380 to do this?'' before doing anything dangerous.  This is @code{t} by
20381 default.
20382
20383 @item gnus-expert-user
20384 @vindex gnus-expert-user
20385 If this variable is non-@code{nil}, you will seldom be asked any
20386 questions by Gnus.  It will simply assume you know what you're doing, no
20387 matter how strange.
20388
20389 @item gnus-interactive-catchup
20390 @vindex gnus-interactive-catchup
20391 Require confirmation before catching up a group if non-@code{nil}.  It
20392 is @code{t} by default.
20393
20394 @item gnus-interactive-exit
20395 @vindex gnus-interactive-exit
20396 Require confirmation before exiting Gnus.  This variable is @code{t} by
20397 default.
20398 @end table
20399
20400
20401 @node Symbolic Prefixes
20402 @section Symbolic Prefixes
20403 @cindex symbolic prefixes
20404
20405 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20406 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20407 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20408 rule of 900 to the current article.
20409
20410 This is all nice and well, but what if you want to give a command some
20411 additional information?  Well, what most commands do is interpret the
20412 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20413 doesn't want a backup file to be created when saving the current buffer,
20414 for instance.  But what if you want to save without making a backup
20415 file, and you want Emacs to flash lights and play a nice tune at the
20416 same time?  You can't, and you're probably perfectly happy that way.
20417
20418 @kindex M-i (Summary)
20419 @findex gnus-symbolic-argument
20420 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20421 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20422 character typed in is the value.  You can stack as many @kbd{M-i}
20423 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20424 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20425 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20426 @code{b}''.  You get the drift.
20427
20428 Typing in symbolic prefixes to commands that don't accept them doesn't
20429 hurt, but it doesn't do any good either.  Currently not many Gnus
20430 functions make use of the symbolic prefix.
20431
20432 If you're interested in how Gnus implements this, @pxref{Extended
20433 Interactive}.
20434
20435
20436 @node Formatting Variables
20437 @section Formatting Variables
20438 @cindex formatting variables
20439
20440 Throughout this manual you've probably noticed lots of variables called
20441 things like @code{gnus-group-line-format} and
20442 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20443 output lines in the various buffers.  There's quite a lot of them.
20444 Fortunately, they all use the same syntax, so there's not that much to
20445 be annoyed by.
20446
20447 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20448 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20449 lots of percentages everywhere.
20450
20451 @menu
20452 * Formatting Basics::           A formatting variable is basically a format string.
20453 * Mode Line Formatting::        Some rules about mode line formatting variables.
20454 * Advanced Formatting::         Modifying output in various ways.
20455 * User-Defined Specs::          Having Gnus call your own functions.
20456 * Formatting Fonts::            Making the formatting look colorful and nice.
20457 * Positioning Point::           Moving point to a position after an operation.
20458 * Tabulation::                  Tabulating your output.
20459 * Wide Characters::             Dealing with wide characters.
20460 @end menu
20461
20462 Currently Gnus uses the following formatting variables:
20463 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20464 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20465 @code{gnus-group-mode-line-format},
20466 @code{gnus-summary-mode-line-format},
20467 @code{gnus-article-mode-line-format},
20468 @code{gnus-server-mode-line-format}, and
20469 @code{gnus-summary-pick-line-format}.
20470
20471 All these format variables can also be arbitrary elisp forms.  In that
20472 case, they will be @code{eval}ed to insert the required lines.
20473
20474 @kindex M-x gnus-update-format
20475 @findex gnus-update-format
20476 Gnus includes a command to help you while creating your own format
20477 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20478 update the spec in question and pop you to a buffer where you can
20479 examine the resulting Lisp code to be run to generate the line.
20480
20481
20482
20483 @node Formatting Basics
20484 @subsection Formatting Basics
20485
20486 Each @samp{%} element will be replaced by some string or other when the
20487 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20488 spec, and pad with spaces to get a 5-character field''.
20489
20490 As with normal C and Emacs Lisp formatting strings, the numerical
20491 modifier between the @samp{%} and the formatting type character will
20492 @dfn{pad} the output so that it is always at least that long.
20493 @samp{%5y} will make the field always (at least) five characters wide by
20494 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20495 the right instead.
20496
20497 You may also wish to limit the length of the field to protect against
20498 particularly wide values.  For that you can say @samp{%4,6y}, which
20499 means that the field will never be more than 6 characters wide and never
20500 less than 4 characters wide.
20501
20502 Also Gnus supports some extended format specifications, such as
20503 @samp{%&user-date;}.
20504
20505
20506 @node Mode Line Formatting
20507 @subsection Mode Line Formatting
20508
20509 Mode line formatting variables (e.g.,
20510 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20511 buffer line oriented formatting variables (@pxref{Formatting Basics})
20512 with the following two differences:
20513
20514 @enumerate
20515
20516 @item
20517 There must be no newline (@samp{\n}) at the end.
20518
20519 @item
20520 The special @samp{%%b} spec can be used to display the buffer name.
20521 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20522 @samp{%} to allow it to pass through the formatting machinery unmangled,
20523 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20524 display interprets to mean ``show the buffer name''.  For a full list of
20525 mode line specs Emacs understands, see the documentation of the
20526 @code{mode-line-format} variable.
20527
20528 @end enumerate
20529
20530
20531 @node Advanced Formatting
20532 @subsection Advanced Formatting
20533
20534 It is frequently useful to post-process the fields in some way.
20535 Padding, limiting, cutting off parts and suppressing certain values can
20536 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20537 look like @samp{%~(cut 3)~(ignore "0")y}.
20538
20539 These are the valid modifiers:
20540
20541 @table @code
20542 @item pad
20543 @itemx pad-left
20544 Pad the field to the left with spaces until it reaches the required
20545 length.
20546
20547 @item pad-right
20548 Pad the field to the right with spaces until it reaches the required
20549 length.
20550
20551 @item max
20552 @itemx max-left
20553 Cut off characters from the left until it reaches the specified length.
20554
20555 @item max-right
20556 Cut off characters from the right until it reaches the specified
20557 length.
20558
20559 @item cut
20560 @itemx cut-left
20561 Cut off the specified number of characters from the left.
20562
20563 @item cut-right
20564 Cut off the specified number of characters from the right.
20565
20566 @item ignore
20567 Return an empty string if the field is equal to the specified value.
20568
20569 @item form
20570 Use the specified form as the field value when the @samp{@@} spec is
20571 used.
20572
20573 Here's an example:
20574
20575 @lisp
20576 "~(form (current-time-string))@@"
20577 @end lisp
20578
20579 @end table
20580
20581 Let's take an example.  The @samp{%o} spec in the summary mode lines
20582 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20583 This is quite a mouthful, so we want to shave off the century number and
20584 the time, leaving us with a six-character date.  That would be
20585 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20586 maxing, and we need the padding to ensure that the date is never less
20587 than 6 characters to make it look nice in columns.)
20588
20589 Ignoring is done first; then cutting; then maxing; and then as the very
20590 last operation, padding.
20591
20592 If you use lots of these advanced thingies, you'll find that Gnus gets
20593 quite slow.  This can be helped enormously by running @kbd{M-x
20594 gnus-compile} when you are satisfied with the look of your lines.
20595 @xref{Compilation}.
20596
20597
20598 @node User-Defined Specs
20599 @subsection User-Defined Specs
20600
20601 All the specs allow for inserting user defined specifiers---@samp{u}.
20602 The next character in the format string should be a letter.  Gnus
20603 will call the function @code{gnus-user-format-function-}@samp{X}, where
20604 @samp{X} is the letter following @samp{%u}.  The function will be passed
20605 a single parameter---what the parameter means depends on what buffer
20606 it's being called from.  The function should return a string, which will
20607 be inserted into the buffer just like information from any other
20608 specifier.  This function may also be called with dummy values, so it
20609 should protect against that.
20610
20611 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20612 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20613
20614 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20615 much the same without defining new functions.  Here's an example:
20616 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20617 given here will be evaluated to yield the current line number, and then
20618 inserted.
20619
20620
20621 @node Formatting Fonts
20622 @subsection Formatting Fonts
20623
20624 There are specs for highlighting, and these are shared by all the format
20625 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20626 the special @code{mouse-face} property set, which means that it will be
20627 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20628 over it.
20629
20630 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20631 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20632 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20633 and so on.  Create as many faces as you wish.  The same goes for the
20634 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20635 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20636
20637 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20638 special @code{balloon-help} property set to
20639 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20640 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20641 variables should be either strings or symbols naming functions that
20642 return a string.  When the mouse passes over text with this property
20643 set, a balloon window will appear and display the string.  Please
20644 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20645 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20646 XEmacs) for more information on this.  (For technical reasons, the
20647 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20648 paragraph.)
20649
20650 Here's an alternative recipe for the group buffer:
20651
20652 @lisp
20653 ;; @r{Create three face types.}
20654 (setq gnus-face-1 'bold)
20655 (setq gnus-face-3 'italic)
20656
20657 ;; @r{We want the article count to be in}
20658 ;; @r{a bold and green face.  So we create}
20659 ;; @r{a new face called @code{my-green-bold}.}
20660 (copy-face 'bold 'my-green-bold)
20661 ;; @r{Set the color.}
20662 (set-face-foreground 'my-green-bold "ForestGreen")
20663 (setq gnus-face-2 'my-green-bold)
20664
20665 ;; @r{Set the new & fancy format.}
20666 (setq gnus-group-line-format
20667       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20668 @end lisp
20669
20670 I'm sure you'll be able to use this scheme to create totally unreadable
20671 and extremely vulgar displays.  Have fun!
20672
20673 Note that the @samp{%(} specs (and friends) do not make any sense on the
20674 mode-line variables.
20675
20676 @node Positioning Point
20677 @subsection Positioning Point
20678
20679 Gnus usually moves point to a pre-defined place on each line in most
20680 buffers.  By default, point move to the first colon character on the
20681 line.  You can customize this behaviour in three different ways.
20682
20683 You can move the colon character to somewhere else on the line.
20684
20685 @findex gnus-goto-colon
20686 You can redefine the function that moves the point to the colon.  The
20687 function is called @code{gnus-goto-colon}.
20688
20689 But perhaps the most convenient way to deal with this, if you don't want
20690 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20691 put a @samp{%*} somewhere in your format line definition, Gnus will
20692 place point there.
20693
20694
20695 @node Tabulation
20696 @subsection Tabulation
20697
20698 You can usually line up your displays by padding and cutting your
20699 strings.  However, when combining various strings of different size, it
20700 can often be more convenient to just output the strings, and then worry
20701 about lining up the following text afterwards.
20702
20703 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20704 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20705
20706 @samp{%50=} will insert space characters to pad the line up to column
20707 50.  If the text is already past column 50, nothing will be inserted.
20708 This is the soft tabulator.
20709
20710 @samp{%-50=} will insert space characters to pad the line up to column
20711 50.  If the text is already past column 50, the excess text past column
20712 50 will be removed.  This is the hard tabulator.
20713
20714
20715 @node Wide Characters
20716 @subsection Wide Characters
20717
20718 Fixed width fonts in most countries have characters of the same width.
20719 Some countries, however, use Latin characters mixed with wider
20720 characters---most notable East Asian countries.
20721
20722 The problem is that when formatting, Gnus assumes that if a string is 10
20723 characters wide, it'll be 10 Latin characters wide on the screen.  In
20724 these countries, that's not true.
20725
20726 @vindex gnus-use-correct-string-widths
20727 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20728 @code{t}.  This makes buffer generation slower, but the results will be
20729 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20730 for Emacs.
20731
20732
20733 @node Window Layout
20734 @section Window Layout
20735 @cindex window layout
20736
20737 No, there's nothing here about X, so be quiet.
20738
20739 @vindex gnus-use-full-window
20740 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20741 other windows and occupy the entire Emacs screen by itself.  It is
20742 @code{t} by default.
20743
20744 Setting this variable to @code{nil} kinda works, but there are
20745 glitches.  Use at your own peril.
20746
20747 @vindex gnus-buffer-configuration
20748 @code{gnus-buffer-configuration} describes how much space each Gnus
20749 buffer should be given.  Here's an excerpt of this variable:
20750
20751 @lisp
20752 ((group (vertical 1.0 (group 1.0 point)
20753                       (if gnus-carpal (group-carpal 4))))
20754  (article (vertical 1.0 (summary 0.25 point)
20755                         (article 1.0))))
20756 @end lisp
20757
20758 This is an alist.  The @dfn{key} is a symbol that names some action or
20759 other.  For instance, when displaying the group buffer, the window
20760 configuration function will use @code{group} as the key.  A full list of
20761 possible names is listed below.
20762
20763 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20764 should occupy.  To take the @code{article} split as an example -
20765
20766 @lisp
20767 (article (vertical 1.0 (summary 0.25 point)
20768                        (article 1.0)))
20769 @end lisp
20770
20771 This @dfn{split} says that the summary buffer should occupy 25% of upper
20772 half of the screen, and that it is placed over the article buffer.  As
20773 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20774 reaching for that calculator there).  However, the special number
20775 @code{1.0} is used to signal that this buffer should soak up all the
20776 rest of the space available after the rest of the buffers have taken
20777 whatever they need.  There should be only one buffer with the @code{1.0}
20778 size spec per split.
20779
20780 Point will be put in the buffer that has the optional third element
20781 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20782 split where the tag @code{frame-focus} is a member (i.e. is the third or
20783 fourth element in the list, depending on whether the @code{point} tag is
20784 present) gets focus.
20785
20786 Here's a more complicated example:
20787
20788 @lisp
20789 (article (vertical 1.0 (group 4)
20790                        (summary 0.25 point)
20791                        (if gnus-carpal (summary-carpal 4))
20792                        (article 1.0)))
20793 @end lisp
20794
20795 If the size spec is an integer instead of a floating point number,
20796 then that number will be used to say how many lines a buffer should
20797 occupy, not a percentage.
20798
20799 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20800 precise---if the @code{car} of the split is a function or a subr), this
20801 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20802 be used as a split.  This means that there will be three buffers if
20803 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20804 is non-@code{nil}.
20805
20806 Not complicated enough for you?  Well, try this on for size:
20807
20808 @lisp
20809 (article (horizontal 1.0
20810              (vertical 0.5
20811                  (group 1.0)
20812                  (gnus-carpal 4))
20813              (vertical 1.0
20814                  (summary 0.25 point)
20815                  (summary-carpal 4)
20816                  (article 1.0))))
20817 @end lisp
20818
20819 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20820 @code{horizontal} thingie?
20821
20822 If the first element in one of the split is @code{horizontal}, Gnus will
20823 split the window horizontally, giving you two windows side-by-side.
20824 Inside each of these strips you may carry on all you like in the normal
20825 fashion.  The number following @code{horizontal} says what percentage of
20826 the screen is to be given to this strip.
20827
20828 For each split, there @emph{must} be one element that has the 100% tag.
20829 The splitting is never accurate, and this buffer will eat any leftover
20830 lines from the splits.
20831
20832 To be slightly more formal, here's a definition of what a valid split
20833 may look like:
20834
20835 @example
20836 @group
20837 split      = frame | horizontal | vertical | buffer | form
20838 frame      = "(frame " size *split ")"
20839 horizontal = "(horizontal " size *split ")"
20840 vertical   = "(vertical " size *split ")"
20841 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20842 size       = number | frame-params
20843 buf-name   = group | article | summary ...
20844 @end group
20845 @end example
20846
20847 The limitations are that the @code{frame} split can only appear as the
20848 top-level split.  @var{form} should be an Emacs Lisp form that should
20849 return a valid split.  We see that each split is fully recursive, and
20850 may contain any number of @code{vertical} and @code{horizontal} splits.
20851
20852 @vindex gnus-window-min-width
20853 @vindex gnus-window-min-height
20854 @cindex window height
20855 @cindex window width
20856 Finding the right sizes can be a bit complicated.  No window may be less
20857 than @code{gnus-window-min-height} (default 1) characters high, and all
20858 windows must be at least @code{gnus-window-min-width} (default 1)
20859 characters wide.  Gnus will try to enforce this before applying the
20860 splits.  If you want to use the normal Emacs window width/height limit,
20861 you can just set these two variables to @code{nil}.
20862
20863 If you're not familiar with Emacs terminology, @code{horizontal} and
20864 @code{vertical} splits may work the opposite way of what you'd expect.
20865 Windows inside a @code{horizontal} split are shown side-by-side, and
20866 windows within a @code{vertical} split are shown above each other.
20867
20868 @findex gnus-configure-frame
20869 If you want to experiment with window placement, a good tip is to call
20870 @code{gnus-configure-frame} directly with a split.  This is the function
20871 that does all the real work when splitting buffers.  Below is a pretty
20872 nonsensical configuration with 5 windows; two for the group buffer and
20873 three for the article buffer.  (I said it was nonsensical.)  If you
20874 @code{eval} the statement below, you can get an idea of how that would
20875 look straight away, without going through the normal Gnus channels.
20876 Play with it until you're satisfied, and then use
20877 @code{gnus-add-configuration} to add your new creation to the buffer
20878 configuration list.
20879
20880 @lisp
20881 (gnus-configure-frame
20882  '(horizontal 1.0
20883     (vertical 10
20884       (group 1.0)
20885       (article 0.3 point))
20886     (vertical 1.0
20887       (article 1.0)
20888       (horizontal 4
20889         (group 1.0)
20890         (article 10)))))
20891 @end lisp
20892
20893 You might want to have several frames as well.  No prob---just use the
20894 @code{frame} split:
20895
20896 @lisp
20897 (gnus-configure-frame
20898  '(frame 1.0
20899          (vertical 1.0
20900                    (summary 0.25 point frame-focus)
20901                    (article 1.0))
20902          (vertical ((height . 5) (width . 15)
20903                     (user-position . t)
20904                     (left . -1) (top . 1))
20905                    (picon 1.0))))
20906
20907 @end lisp
20908
20909 This split will result in the familiar summary/article window
20910 configuration in the first (or ``main'') frame, while a small additional
20911 frame will be created where picons will be shown.  As you can see,
20912 instead of the normal @code{1.0} top-level spec, each additional split
20913 should have a frame parameter alist as the size spec.
20914 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20915 Reference Manual}.  Under XEmacs, a frame property list will be
20916 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20917 is such a plist.
20918 The list of all possible keys for @code{gnus-buffer-configuration} can
20919 be found in its default value.
20920
20921 Note that the @code{message} key is used for both
20922 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20923 it is desirable to distinguish between the two, something like this
20924 might be used:
20925
20926 @lisp
20927 (message (horizontal 1.0
20928                      (vertical 1.0 (message 1.0 point))
20929                      (vertical 0.24
20930                                (if (buffer-live-p gnus-summary-buffer)
20931                                    '(summary 0.5))
20932                                (group 1.0))))
20933 @end lisp
20934
20935 One common desire for a multiple frame split is to have a separate frame
20936 for composing mail and news while leaving the original frame intact.  To
20937 accomplish that, something like the following can be done:
20938
20939 @lisp
20940 (message
20941   (frame 1.0
20942          (if (not (buffer-live-p gnus-summary-buffer))
20943              (car (cdr (assoc 'group gnus-buffer-configuration)))
20944            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20945          (vertical ((user-position . t) (top . 1) (left . 1)
20946                     (name . "Message"))
20947                    (message 1.0 point))))
20948 @end lisp
20949
20950 @findex gnus-add-configuration
20951 Since the @code{gnus-buffer-configuration} variable is so long and
20952 complicated, there's a function you can use to ease changing the config
20953 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20954 you want to change the @code{article} setting, you could say:
20955
20956 @lisp
20957 (gnus-add-configuration
20958  '(article (vertical 1.0
20959                (group 4)
20960                (summary .25 point)
20961                (article 1.0))))
20962 @end lisp
20963
20964 You'd typically stick these @code{gnus-add-configuration} calls in your
20965 @file{~/.gnus.el} file or in some startup hook---they should be run after
20966 Gnus has been loaded.
20967
20968 @vindex gnus-always-force-window-configuration
20969 If all windows mentioned in the configuration are already visible, Gnus
20970 won't change the window configuration.  If you always want to force the
20971 ``right'' window configuration, you can set
20972 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20973
20974 If you're using tree displays (@pxref{Tree Display}), and the tree
20975 window is displayed vertically next to another window, you may also want
20976 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20977 windows resized.
20978
20979 @subsection Example Window Configurations
20980
20981 @itemize @bullet
20982 @item
20983 Narrow left hand side occupied by group buffer.  Right hand side split
20984 between summary buffer (top one-sixth) and article buffer (bottom).
20985
20986 @ifinfo
20987 @example
20988 +---+---------+
20989 | G | Summary |
20990 | r +---------+
20991 | o |         |
20992 | u | Article |
20993 | p |         |
20994 +---+---------+
20995 @end example
20996 @end ifinfo
20997
20998 @lisp
20999 (gnus-add-configuration
21000  '(article
21001    (horizontal 1.0
21002                (vertical 25 (group 1.0))
21003                (vertical 1.0
21004                          (summary 0.16 point)
21005                          (article 1.0)))))
21006
21007 (gnus-add-configuration
21008  '(summary
21009    (horizontal 1.0
21010                (vertical 25 (group 1.0))
21011                (vertical 1.0 (summary 1.0 point)))))
21012 @end lisp
21013
21014 @end itemize
21015
21016
21017 @node Faces and Fonts
21018 @section Faces and Fonts
21019 @cindex faces
21020 @cindex fonts
21021 @cindex colors
21022
21023 Fiddling with fonts and faces used to be very difficult, but these days
21024 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21025 the face you want to alter, and alter it via the standard Customize
21026 interface.
21027
21028
21029 @node Compilation
21030 @section Compilation
21031 @cindex compilation
21032 @cindex byte-compilation
21033
21034 @findex gnus-compile
21035
21036 Remember all those line format specification variables?
21037 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21038 on.  Now, Gnus will of course heed whatever these variables are, but,
21039 unfortunately, changing them will mean a quite significant slow-down.
21040 (The default values of these variables have byte-compiled functions
21041 associated with them, while the user-generated versions do not, of
21042 course.)
21043
21044 To help with this, you can run @kbd{M-x gnus-compile} after you've
21045 fiddled around with the variables and feel that you're (kind of)
21046 satisfied.  This will result in the new specs being byte-compiled, and
21047 you'll get top speed again.  Gnus will save these compiled specs in the
21048 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21049 this function, though---you should compile them yourself by sticking
21050 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21051
21052
21053 @node Mode Lines
21054 @section Mode Lines
21055 @cindex mode lines
21056
21057 @vindex gnus-updated-mode-lines
21058 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21059 lines updated.  It is a list of symbols.  Supported symbols include
21060 @code{group}, @code{article}, @code{summary}, @code{server},
21061 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21062 Gnus will keep that mode line updated with information that may be
21063 pertinent.  If this variable is @code{nil}, screen refresh may be
21064 quicker.
21065
21066 @cindex display-time
21067
21068 @vindex gnus-mode-non-string-length
21069 By default, Gnus displays information on the current article in the mode
21070 lines of the summary and article buffers.  The information Gnus wishes
21071 to display (e.g. the subject of the article) is often longer than the
21072 mode lines, and therefore have to be cut off at some point.  The
21073 @code{gnus-mode-non-string-length} variable says how long the other
21074 elements on the line is (i.e., the non-info part).  If you put
21075 additional elements on the mode line (e.g. a clock), you should modify
21076 this variable:
21077
21078 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21079 @lisp
21080 (add-hook 'display-time-hook
21081           (lambda () (setq gnus-mode-non-string-length
21082                            (+ 21
21083                               (if line-number-mode 5 0)
21084                               (if column-number-mode 4 0)
21085                               (length display-time-string)))))
21086 @end lisp
21087
21088 If this variable is @code{nil} (which is the default), the mode line
21089 strings won't be chopped off, and they won't be padded either.  Note
21090 that the default is unlikely to be desirable, as even the percentage
21091 complete in the buffer may be crowded off the mode line; the user should
21092 configure this variable appropriately for her configuration.
21093
21094
21095 @node Highlighting and Menus
21096 @section Highlighting and Menus
21097 @cindex visual
21098 @cindex highlighting
21099 @cindex menus
21100
21101 @vindex gnus-visual
21102 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21103 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21104 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21105 file.
21106
21107 This variable can be a list of visual properties that are enabled.  The
21108 following elements are valid, and are all included by default:
21109
21110 @table @code
21111 @item group-highlight
21112 Do highlights in the group buffer.
21113 @item summary-highlight
21114 Do highlights in the summary buffer.
21115 @item article-highlight
21116 Do highlights in the article buffer.
21117 @item highlight
21118 Turn on highlighting in all buffers.
21119 @item group-menu
21120 Create menus in the group buffer.
21121 @item summary-menu
21122 Create menus in the summary buffers.
21123 @item article-menu
21124 Create menus in the article buffer.
21125 @item browse-menu
21126 Create menus in the browse buffer.
21127 @item server-menu
21128 Create menus in the server buffer.
21129 @item score-menu
21130 Create menus in the score buffers.
21131 @item menu
21132 Create menus in all buffers.
21133 @end table
21134
21135 So if you only want highlighting in the article buffer and menus in all
21136 buffers, you could say something like:
21137
21138 @lisp
21139 (setq gnus-visual '(article-highlight menu))
21140 @end lisp
21141
21142 If you want highlighting only and no menus whatsoever, you'd say:
21143
21144 @lisp
21145 (setq gnus-visual '(highlight))
21146 @end lisp
21147
21148 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21149 in all Gnus buffers.
21150
21151 Other general variables that influence the look of all buffers include:
21152
21153 @table @code
21154 @item gnus-mouse-face
21155 @vindex gnus-mouse-face
21156 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21157 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21158
21159 @end table
21160
21161 There are hooks associated with the creation of all the different menus:
21162
21163 @table @code
21164
21165 @item gnus-article-menu-hook
21166 @vindex gnus-article-menu-hook
21167 Hook called after creating the article mode menu.
21168
21169 @item gnus-group-menu-hook
21170 @vindex gnus-group-menu-hook
21171 Hook called after creating the group mode menu.
21172
21173 @item gnus-summary-menu-hook
21174 @vindex gnus-summary-menu-hook
21175 Hook called after creating the summary mode menu.
21176
21177 @item gnus-server-menu-hook
21178 @vindex gnus-server-menu-hook
21179 Hook called after creating the server mode menu.
21180
21181 @item gnus-browse-menu-hook
21182 @vindex gnus-browse-menu-hook
21183 Hook called after creating the browse mode menu.
21184
21185 @item gnus-score-menu-hook
21186 @vindex gnus-score-menu-hook
21187 Hook called after creating the score mode menu.
21188
21189 @end table
21190
21191
21192 @node Buttons
21193 @section Buttons
21194 @cindex buttons
21195 @cindex mouse
21196 @cindex click
21197
21198 Those new-fangled @dfn{mouse} contraptions is very popular with the
21199 young, hep kids who don't want to learn the proper way to do things
21200 these days.  Why, I remember way back in the summer of '89, when I was
21201 using Emacs on a Tops 20 system.  Three hundred users on one single
21202 machine, and every user was running Simula compilers.  Bah!
21203
21204 Right.
21205
21206 @vindex gnus-carpal
21207 Well, you can make Gnus display bufferfuls of buttons you can click to
21208 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21209 really.  Tell the chiropractor I sent you.
21210
21211
21212 @table @code
21213
21214 @item gnus-carpal-mode-hook
21215 @vindex gnus-carpal-mode-hook
21216 Hook run in all carpal mode buffers.
21217
21218 @item gnus-carpal-button-face
21219 @vindex gnus-carpal-button-face
21220 Face used on buttons.
21221
21222 @item gnus-carpal-header-face
21223 @vindex gnus-carpal-header-face
21224 Face used on carpal buffer headers.
21225
21226 @item gnus-carpal-group-buffer-buttons
21227 @vindex gnus-carpal-group-buffer-buttons
21228 Buttons in the group buffer.
21229
21230 @item gnus-carpal-summary-buffer-buttons
21231 @vindex gnus-carpal-summary-buffer-buttons
21232 Buttons in the summary buffer.
21233
21234 @item gnus-carpal-server-buffer-buttons
21235 @vindex gnus-carpal-server-buffer-buttons
21236 Buttons in the server buffer.
21237
21238 @item gnus-carpal-browse-buffer-buttons
21239 @vindex gnus-carpal-browse-buffer-buttons
21240 Buttons in the browse buffer.
21241 @end table
21242
21243 All the @code{buttons} variables are lists.  The elements in these list
21244 are either cons cells where the @code{car} contains a text to be displayed and
21245 the @code{cdr} contains a function symbol, or a simple string.
21246
21247
21248 @node Daemons
21249 @section Daemons
21250 @cindex demons
21251 @cindex daemons
21252
21253 Gnus, being larger than any program ever written (allegedly), does lots
21254 of strange stuff that you may wish to have done while you're not
21255 present.  For instance, you may want it to check for new mail once in a
21256 while.  Or you may want it to close down all connections to all servers
21257 when you leave Emacs idle.  And stuff like that.
21258
21259 Gnus will let you do stuff like that by defining various
21260 @dfn{handlers}.  Each handler consists of three elements:  A
21261 @var{function}, a @var{time}, and an @var{idle} parameter.
21262
21263 Here's an example of a handler that closes connections when Emacs has
21264 been idle for thirty minutes:
21265
21266 @lisp
21267 (gnus-demon-close-connections nil 30)
21268 @end lisp
21269
21270 Here's a handler that scans for @acronym{PGP} headers every hour when
21271 Emacs is idle:
21272
21273 @lisp
21274 (gnus-demon-scan-pgp 60 t)
21275 @end lisp
21276
21277 This @var{time} parameter and that @var{idle} parameter work together
21278 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21279 @code{nil}, then the function will be called every @var{time} minutes.
21280
21281 If @var{idle} is @code{t}, then the function will be called after
21282 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21283 the function will never be called.  But once Emacs goes idle, the
21284 function will be called every @var{time} minutes.
21285
21286 If @var{idle} is a number and @var{time} is a number, the function will
21287 be called every @var{time} minutes only when Emacs has been idle for
21288 @var{idle} minutes.
21289
21290 If @var{idle} is a number and @var{time} is @code{nil}, the function
21291 will be called once every time Emacs has been idle for @var{idle}
21292 minutes.
21293
21294 And if @var{time} is a string, it should look like @samp{07:31}, and
21295 the function will then be called once every day somewhere near that
21296 time.  Modified by the @var{idle} parameter, of course.
21297
21298 @vindex gnus-demon-timestep
21299 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21300 seconds.  This is 60 by default.  If you change that variable,
21301 all the timings in the handlers will be affected.)
21302
21303 So, if you want to add a handler, you could put something like this in
21304 your @file{~/.gnus.el} file:
21305
21306 @findex gnus-demon-add-handler
21307 @lisp
21308 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21309 @end lisp
21310
21311 @findex gnus-demon-add-nocem
21312 @findex gnus-demon-add-scanmail
21313 @findex gnus-demon-add-rescan
21314 @findex gnus-demon-add-scan-timestamps
21315 @findex gnus-demon-add-disconnection
21316 Some ready-made functions to do this have been created:
21317 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21318 @code{gnus-demon-add-nntp-close-connection},
21319 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21320 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21321 @file{~/.gnus.el} if you want those abilities.
21322
21323 @findex gnus-demon-init
21324 @findex gnus-demon-cancel
21325 @vindex gnus-demon-handlers
21326 If you add handlers to @code{gnus-demon-handlers} directly, you should
21327 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21328 daemons, you can use the @code{gnus-demon-cancel} function.
21329
21330 Note that adding daemons can be pretty naughty if you over do it.  Adding
21331 functions that scan all news and mail from all servers every two seconds
21332 is a sure-fire way of getting booted off any respectable system.  So
21333 behave.
21334
21335
21336 @node NoCeM
21337 @section NoCeM
21338 @cindex nocem
21339 @cindex spam
21340
21341 @dfn{Spamming} is posting the same article lots and lots of times.
21342 Spamming is bad.  Spamming is evil.
21343
21344 Spamming is usually canceled within a day or so by various anti-spamming
21345 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21346 NoCeM is pronounced ``no see-'em'', and means what the name
21347 implies---these are messages that make the offending articles, like, go
21348 away.
21349
21350 What use are these NoCeM messages if the articles are canceled anyway?
21351 Some sites do not honor cancel messages and some sites just honor cancels
21352 from a select few people.  Then you may wish to make use of the NoCeM
21353 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21354
21355 Gnus can read and parse the messages in this group automatically, and
21356 this will make spam disappear.
21357
21358 There are some variables to customize, of course:
21359
21360 @table @code
21361 @item gnus-use-nocem
21362 @vindex gnus-use-nocem
21363 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21364 by default.
21365
21366 @item gnus-nocem-groups
21367 @vindex gnus-nocem-groups
21368 Gnus will look for NoCeM messages in the groups in this list.  The
21369 default is
21370 @lisp
21371 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21372  "alt.nocem.misc" "news.admin.net-abuse.announce")
21373 @end lisp
21374
21375 @item gnus-nocem-issuers
21376 @vindex gnus-nocem-issuers
21377 There are many people issuing NoCeM messages.  This list says what
21378 people you want to listen to.  The default is
21379 @lisp
21380 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21381  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21382 @end lisp
21383 fine, upstanding citizens all of them.
21384
21385 Known despammers that you can put in this list are listed at@*
21386 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21387
21388 You do not have to heed NoCeM messages from all these people---just the
21389 ones you want to listen to.  You also don't have to accept all NoCeM
21390 messages from the people you like.  Each NoCeM message has a @dfn{type}
21391 header that gives the message a (more or less, usually less) rigorous
21392 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21393 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21394 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21395 Each condition is either a string (which is a regexp that matches types
21396 you want to use) or a list on the form @code{(not @var{string})}, where
21397 @var{string} is a regexp that matches types you don't want to use.
21398
21399 For instance, if you want all NoCeM messages from Chris Lewis except his
21400 @samp{troll} messages, you'd say:
21401
21402 @lisp
21403 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21404 @end lisp
21405
21406 On the other hand, if you just want nothing but his @samp{spam} and
21407 @samp{spew} messages, you'd say:
21408
21409 @lisp
21410 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21411 @end lisp
21412
21413 The specs are applied left-to-right.
21414
21415
21416 @item gnus-nocem-verifyer
21417 @vindex gnus-nocem-verifyer
21418 @findex mc-verify
21419 This should be a function for verifying that the NoCeM issuer is who she
21420 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21421 function.  If this is too slow and you don't care for verification
21422 (which may be dangerous), you can set this variable to @code{nil}.
21423
21424 If you want signed NoCeM messages to be verified and unsigned messages
21425 not to be verified (but used anyway), you could do something like:
21426
21427 @lisp
21428 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21429
21430 (defun my-gnus-mc-verify ()
21431   (not (eq 'forged
21432            (ignore-errors
21433              (if (mc-verify)
21434                  t
21435                'forged)))))
21436 @end lisp
21437
21438 This might be dangerous, though.
21439
21440 @item gnus-nocem-directory
21441 @vindex gnus-nocem-directory
21442 This is where Gnus will store its NoCeM cache files.  The default is@*
21443 @file{~/News/NoCeM/}.
21444
21445 @item gnus-nocem-expiry-wait
21446 @vindex gnus-nocem-expiry-wait
21447 The number of days before removing old NoCeM entries from the cache.
21448 The default is 15.  If you make it shorter Gnus will be faster, but you
21449 might then see old spam.
21450
21451 @item gnus-nocem-check-from
21452 @vindex gnus-nocem-check-from
21453 Non-@code{nil} means check for valid issuers in message bodies.
21454 Otherwise don't bother fetching articles unless their author matches a
21455 valid issuer; that is much faster if you are selective about the
21456 issuers.
21457
21458 @item gnus-nocem-check-article-limit
21459 @vindex gnus-nocem-check-article-limit
21460 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21461 group.  NoCeM groups can be huge and very slow to process.
21462
21463 @end table
21464
21465 Using NoCeM could potentially be a memory hog.  If you have many living
21466 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21467 big.  If this is a problem, you should kill off all (or most) of your
21468 unsubscribed groups (@pxref{Subscription Commands}).
21469
21470
21471 @node Undo
21472 @section Undo
21473 @cindex undo
21474
21475 It is very useful to be able to undo actions one has done.  In normal
21476 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21477 In Gnus buffers, however, it isn't that simple.
21478
21479 The things Gnus displays in its buffer is of no value whatsoever to
21480 Gnus---it's all just data designed to look nice to the user.
21481 Killing a group in the group buffer with @kbd{C-k} makes the line
21482 disappear, but that's just a side-effect of the real action---the
21483 removal of the group in question from the internal Gnus structures.
21484 Undoing something like that can't be done by the normal Emacs
21485 @code{undo} function.
21486
21487 Gnus tries to remedy this somewhat by keeping track of what the user
21488 does and coming up with actions that would reverse the actions the user
21489 takes.  When the user then presses the @code{undo} key, Gnus will run
21490 the code to reverse the previous action, or the previous actions.
21491 However, not all actions are easily reversible, so Gnus currently offers
21492 a few key functions to be undoable.  These include killing groups,
21493 yanking groups, and changing the list of read articles of groups.
21494 That's it, really.  More functions may be added in the future, but each
21495 added function means an increase in data to be stored, so Gnus will
21496 never be totally undoable.
21497
21498 @findex gnus-undo-mode
21499 @vindex gnus-use-undo
21500 @findex gnus-undo
21501 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21502 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21503 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21504 command, which should feel kinda like the normal Emacs @code{undo}
21505 command.
21506
21507
21508 @node Predicate Specifiers
21509 @section Predicate Specifiers
21510 @cindex predicate specifiers
21511
21512 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21513 form that allows flexible specification of predicates without having
21514 to type all that much.
21515
21516 These specifiers are lists consisting of functions, symbols and lists.
21517
21518 Here's an example:
21519
21520 @lisp
21521 (or gnus-article-unseen-p
21522     gnus-article-unread-p)
21523 @end lisp
21524
21525 The available symbols are @code{or}, @code{and} and @code{not}.  The
21526 functions all take one parameter.
21527
21528 @findex gnus-make-predicate
21529 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21530 to create a function that can be called.  This input parameter to this
21531 function will be passed along to all the functions in the predicate
21532 specifier.
21533
21534
21535 @node Moderation
21536 @section Moderation
21537 @cindex moderation
21538
21539 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21540 It is not included in the standard Gnus package.  Write a mail to
21541 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21542 get a copy.
21543
21544 The moderation package is implemented as a minor mode for summary
21545 buffers.  Put
21546
21547 @lisp
21548 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21549 @end lisp
21550
21551 in your @file{~/.gnus.el} file.
21552
21553 If you are the moderator of @samp{rec.zoofle}, this is how it's
21554 supposed to work:
21555
21556 @enumerate
21557 @item
21558 You split your incoming mail by matching on
21559 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21560 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21561
21562 @item
21563 You enter that group once in a while and post articles using the @kbd{e}
21564 (edit-and-post) or @kbd{s} (just send unedited) commands.
21565
21566 @item
21567 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21568 articles that weren't approved by you, you can cancel them with the
21569 @kbd{c} command.
21570 @end enumerate
21571
21572 To use moderation mode in these two groups, say:
21573
21574 @lisp
21575 (setq gnus-moderated-list
21576       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21577 @end lisp
21578
21579
21580 @node Image Enhancements
21581 @section Image Enhancements
21582
21583 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21584 support images yet.}, is able to display pictures and stuff, so Gnus has
21585 taken advantage of that.
21586
21587 @menu
21588 * X-Face::                      Display a funky, teensy black-and-white image.
21589 * Face::                        Display a funkier, teensier colored image.
21590 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21591 * Picons::                      How to display pictures of what you're reading.
21592 * XVarious::                    Other XEmacsy Gnusey variables.
21593 @end menu
21594
21595
21596 @node X-Face
21597 @subsection X-Face
21598 @cindex x-face
21599
21600 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21601 depth) image that's supposed to represent the author of the message.
21602 It seems to be supported by an ever-growing number of mail and news
21603 readers.
21604
21605 @cindex x-face
21606 @findex gnus-article-display-x-face
21607 @vindex gnus-article-x-face-command
21608 @vindex gnus-article-x-face-too-ugly
21609 @iftex
21610 @iflatex
21611 \include{xface}
21612 @end iflatex
21613 @end iftex
21614 @c @anchor{X-Face}
21615
21616 Decoding an @code{X-Face} header either requires an Emacs that has
21617 @samp{compface} support (which most XEmacs versions has), or that you
21618 have @samp{compface} installed on your system.  If either is true,
21619 Gnus will default to displaying @code{X-Face} headers.
21620
21621 The variable that controls this is the
21622 @code{gnus-article-x-face-command} variable.  If this variable is a
21623 string, this string will be executed in a sub-shell.  If it is a
21624 function, this function will be called with the face as the argument.
21625 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21626 the @code{From} header, the face will not be shown.
21627
21628 The default action under Emacs 20 is to fork off the @code{display}
21629 program@footnote{@code{display} is from the ImageMagick package.  For
21630 the @code{uncompface} and @code{icontopbm} programs look for a package
21631 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21632 view the face.
21633
21634 Under XEmacs or Emacs 21+ with suitable image support, the default
21635 action is to display the face before the @code{From} header.  (It's
21636 nicer if XEmacs has been compiled with @code{X-Face} support---that
21637 will make display somewhat faster.  If there's no native @code{X-Face}
21638 support, Gnus will try to convert the @code{X-Face} header using
21639 external programs from the @code{pbmplus} package and
21640 friends.@footnote{On a GNU/Linux system look for packages with names
21641 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21642
21643 (Note: @code{x-face} is used in the variable/function names, not
21644 @code{xface}).
21645
21646 Gnus provides a few convenience functions and variables to allow
21647 easier insertion of X-Face headers in outgoing messages.
21648
21649 @findex gnus-random-x-face
21650 @vindex gnus-convert-pbm-to-x-face-command
21651 @vindex gnus-x-face-directory
21652 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21653 @code{gnus-x-face-directory} and picks one at random, and then
21654 converts it to the X-Face format by using the
21655 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21656 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21657 header data as a string.
21658
21659 @findex gnus-insert-random-x-face-header
21660 @code{gnus-insert-random-x-face-header} calls
21661 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21662 randomly generated data.
21663
21664 @findex gnus-x-face-from-file
21665 @vindex gnus-convert-image-to-x-face-command
21666 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21667 converts the file to X-Face format by using the
21668 @code{gnus-convert-image-to-x-face-command} shell command.
21669
21670 Here's how you would typically use the first function.  Put something
21671 like the following in your @file{~/.gnus.el} file:
21672
21673 @lisp
21674 (setq message-required-news-headers
21675       (nconc message-required-news-headers
21676              (list '(X-Face . gnus-random-x-face))))
21677 @end lisp
21678
21679 Using the last function would be something like this:
21680
21681 @lisp
21682 (setq message-required-news-headers
21683       (nconc message-required-news-headers
21684              (list '(X-Face . (lambda ()
21685                                 (gnus-x-face-from-file
21686                                  "~/My-face.gif"))))))
21687 @end lisp
21688
21689
21690 @node Face
21691 @subsection Face
21692 @cindex face
21693
21694 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21695
21696 @code{Face} headers are essentially a funkier version of @code{X-Face}
21697 ones. They describe a 48x48 pixel colored image that's supposed to
21698 represent the author of the message.
21699
21700 @cindex face
21701 @findex gnus-article-display-face
21702 The contents of a @code{Face} header must be a base64 encoded PNG image.
21703 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21704 specifications.
21705
21706 Gnus provides a few convenience functions and variables to allow
21707 easier insertion of Face headers in outgoing messages.
21708
21709 @findex gnus-convert-png-to-face
21710 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21711 726 bytes long, and converts it to a face.
21712
21713 @findex gnus-face-from-file
21714 @vindex gnus-convert-image-to-face-command
21715 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21716 converts the file to Face format by using the
21717 @code{gnus-convert-image-to-face-command} shell command.
21718
21719 Here's how you would typically use this function. Put something like the
21720 following in your @file{~/.gnus.el} file:
21721
21722 @lisp
21723 (setq message-required-news-headers
21724       (nconc message-required-news-headers
21725              (list '(Face . (lambda ()
21726                               (gnus-face-from-file "~/face.jpg"))))))
21727 @end lisp
21728
21729
21730 @node Smileys
21731 @subsection Smileys
21732 @cindex smileys
21733
21734 @iftex
21735 @iflatex
21736 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21737 \input{smiley}
21738 @end iflatex
21739 @end iftex
21740
21741 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21742 currently the only package that uses Smiley, it is documented here.
21743
21744 In short---to use Smiley in Gnus, put the following in your
21745 @file{~/.gnus.el} file:
21746
21747 @lisp
21748 (setq gnus-treat-display-smileys t)
21749 @end lisp
21750
21751 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21752 the like---to pictures and displays those instead of the text smiley
21753 faces.  The conversion is controlled by a list of regexps that matches
21754 text and maps that to file names.
21755
21756 @vindex smiley-regexp-alist
21757 The alist used is specified by the @code{smiley-regexp-alist}
21758 variable.  The first item in each element is the regexp to be matched;
21759 the second element is the regexp match group that is to be replaced by
21760 the picture; and the third element is the name of the file to be
21761 displayed.
21762
21763 The following variables customize where Smiley will look for these
21764 files:
21765
21766 @table @code
21767
21768 @item smiley-data-directory
21769 @vindex smiley-data-directory
21770 Where Smiley will look for smiley faces files.
21771
21772 @item gnus-smiley-file-types
21773 @vindex gnus-smiley-file-types
21774 List of suffixes on smiley file names to try.
21775
21776 @end table
21777
21778
21779 @node Picons
21780 @subsection Picons
21781
21782 @iftex
21783 @iflatex
21784 \include{picons}
21785 @end iflatex
21786 @end iftex
21787
21788 So@dots{}  You want to slow down your news reader even more!  This is a
21789 good way to do so.  It's also a great way to impress people staring
21790 over your shoulder as you read news.
21791
21792 What are Picons?  To quote directly from the Picons Web site:
21793
21794 @iftex
21795 @iflatex
21796 \margindex{}
21797 @end iflatex
21798 @end iftex
21799
21800 @quotation
21801 @dfn{Picons} is short for ``personal icons''.  They're small,
21802 constrained images used to represent users and domains on the net,
21803 organized into databases so that the appropriate image for a given
21804 e-mail address can be found.  Besides users and domains, there are picon
21805 databases for Usenet newsgroups and weather forecasts.  The picons are
21806 in either monochrome @code{XBM} format or color @code{XPM} and
21807 @code{GIF} formats.
21808 @end quotation
21809
21810 @vindex gnus-picon-databases
21811 For instructions on obtaining and installing the picons databases,
21812 point your Web browser at
21813 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21814
21815 If you are using Debian GNU/Linux, saying @samp{apt-get install
21816 picons.*} will install the picons where Gnus can find them.
21817
21818 To enable displaying picons, simply make sure that
21819 @code{gnus-picon-databases} points to the directory containing the
21820 Picons databases.
21821
21822 The following variables offer control over where things are located.
21823
21824 @table @code
21825
21826 @item gnus-picon-databases
21827 @vindex gnus-picon-databases
21828 The location of the picons database.  This is a list of directories
21829 containing the @file{news}, @file{domains}, @file{users} (and so on)
21830 subdirectories.  Defaults to @code{("/usr/lib/picon"
21831 "/usr/local/faces")}.
21832
21833 @item gnus-picon-news-directories
21834 @vindex gnus-picon-news-directories
21835 List of subdirectories to search in @code{gnus-picon-databases} for
21836 newsgroups faces.  @code{("news")} is the default.
21837
21838 @item gnus-picon-user-directories
21839 @vindex gnus-picon-user-directories
21840 List of subdirectories to search in @code{gnus-picon-databases} for user
21841 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21842
21843 @item gnus-picon-domain-directories
21844 @vindex gnus-picon-domain-directories
21845 List of subdirectories to search in @code{gnus-picon-databases} for
21846 domain name faces.  Defaults to @code{("domains")}.  Some people may
21847 want to add @samp{"unknown"} to this list.
21848
21849 @item gnus-picon-file-types
21850 @vindex gnus-picon-file-types
21851 Ordered list of suffixes on picon file names to try.  Defaults to
21852 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21853
21854 @end table
21855
21856
21857 @node XVarious
21858 @subsection Various XEmacs Variables
21859
21860 @table @code
21861 @item gnus-xmas-glyph-directory
21862 @vindex gnus-xmas-glyph-directory
21863 This is where Gnus will look for pictures.  Gnus will normally
21864 auto-detect this directory, but you may set it manually if you have an
21865 unusual directory structure.
21866
21867 @item gnus-xmas-logo-color-alist
21868 @vindex gnus-xmas-logo-color-alist
21869 This is an alist where the key is a type symbol and the values are the
21870 foreground and background color of the splash page glyph.
21871
21872 @item gnus-xmas-logo-color-style
21873 @vindex gnus-xmas-logo-color-style
21874 This is the key used to look up the color in the alist described above.
21875 Valid values include @code{flame}, @code{pine}, @code{moss},
21876 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21877 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21878
21879 @item gnus-xmas-modeline-glyph
21880 @vindex gnus-xmas-modeline-glyph
21881 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21882 default.
21883
21884 @end table
21885
21886 @subsubsection Toolbar
21887
21888 @table @code
21889
21890 @item gnus-use-toolbar
21891 @vindex gnus-use-toolbar
21892 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21893 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21894 @code{right-toolbar}, or @code{left-toolbar}.
21895
21896 @item gnus-group-toolbar
21897 @vindex gnus-group-toolbar
21898 The toolbar in the group buffer.
21899
21900 @item gnus-summary-toolbar
21901 @vindex gnus-summary-toolbar
21902 The toolbar in the summary buffer.
21903
21904 @item gnus-summary-mail-toolbar
21905 @vindex gnus-summary-mail-toolbar
21906 The toolbar in the summary buffer of mail groups.
21907
21908 @end table
21909
21910 @iftex
21911 @iflatex
21912 \margindex{}
21913 @end iflatex
21914 @end iftex
21915
21916
21917 @node Fuzzy Matching
21918 @section Fuzzy Matching
21919 @cindex fuzzy matching
21920
21921 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21922 things like scoring, thread gathering and thread comparison.
21923
21924 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21925 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21926 means, and the implementation has changed over time.
21927
21928 Basically, it tries to remove all noise from lines before comparing.
21929 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21930 out of the strings before comparing the results.  This often leads to
21931 adequate results---even when faced with strings generated by text
21932 manglers masquerading as newsreaders.
21933
21934
21935 @node Thwarting Email Spam
21936 @section Thwarting Email Spam
21937 @cindex email spam
21938 @cindex spam
21939 @cindex UCE
21940 @cindex unsolicited commercial email
21941
21942 In these last days of the Usenet, commercial vultures are hanging about
21943 and grepping through news like crazy to find email addresses they can
21944 foist off their scams and products to.  As a reaction to this, many
21945 people have started putting nonsense addresses into their @code{From}
21946 lines.  I think this is counterproductive---it makes it difficult for
21947 people to send you legitimate mail in response to things you write, as
21948 well as making it difficult to see who wrote what.  This rewriting may
21949 perhaps be a bigger menace than the unsolicited commercial email itself
21950 in the end.
21951
21952 The biggest problem I have with email spam is that it comes in under
21953 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21954 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21955 mail group, only to find two pyramid schemes, seven advertisements
21956 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21957 and one mail asking me to repent and find some god.
21958
21959 This is annoying.  Here's what you can do about it.
21960
21961 @menu
21962 * The problem of spam::         Some background, and some solutions
21963 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21964 * SpamAssassin::                How to use external anti-spam tools.
21965 * Hashcash::                    Reduce spam by burning CPU time.
21966 * Filtering Spam Using The Spam ELisp Package::
21967 * Filtering Spam Using Statistics with spam-stat::
21968 @end menu
21969
21970 @node The problem of spam
21971 @subsection The problem of spam
21972 @cindex email spam
21973 @cindex spam filtering approaches
21974 @cindex filtering approaches, spam
21975 @cindex UCE
21976 @cindex unsolicited commercial email
21977
21978 First, some background on spam.
21979
21980 If you have access to e-mail, you are familiar with spam (technically
21981 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21982 because e-mail delivery is very cheap compared to paper mail, so only
21983 a very small percentage of people need to respond to an UCE to make it
21984 worthwhile to the advertiser.  Ironically, one of the most common
21985 spams is the one offering a database of e-mail addresses for further
21986 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21987 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21988
21989 Spam comes from a wide variety of sources.  It is simply impossible to
21990 dispose of all spam without discarding useful messages.  A good
21991 example is the TMDA system, which requires senders
21992 unknown to you to confirm themselves as legitimate senders before
21993 their e-mail can reach you.  Without getting into the technical side
21994 of TMDA, a downside is clearly that e-mail from legitimate sources may
21995 be discarded if those sources can't or won't confirm themselves
21996 through the TMDA system.  Another problem with TMDA is that it
21997 requires its users to have a basic understanding of e-mail delivery
21998 and processing.
21999
22000 The simplest approach to filtering spam is filtering.  If you get 200
22001 spam messages per day from @samp{random-address@@vmadmin.com}, you
22002 block @samp{vmadmin.com}.  If you get 200 messages about
22003 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
22004 message.  This, unfortunately, is a great way to discard legitimate
22005 e-mail.  For instance, the very informative and useful RISKS digest
22006 has been blocked by overzealous mail filters because it
22007 @strong{contained} words that were common in spam messages.
22008 Nevertheless, in isolated cases, with great care, direct filtering of
22009 mail can be useful.
22010
22011 Another approach to filtering e-mail is the distributed spam
22012 processing, for instance DCC implements such a system.  In essence,
22013 @var{N} systems around the world agree that a machine @var{X} in
22014 China, Ghana, or California is sending out spam e-mail, and these
22015 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into
22016 a database.  The criteria for spam detection vary---it may be the
22017 number of messages sent, the content of the messages, and so on.  When
22018 a user of the distributed processing system wants to find out if a
22019 message is spam, he consults one of those @var{N} systems.
22020
22021 Distributed spam processing works very well against spammers that send
22022 a large number of messages at once, but it requires the user to set up
22023 fairly complicated checks.  There are commercial and free distributed
22024 spam processing systems.  Distributed spam processing has its risks as
22025 well.  For instance legitimate e-mail senders have been accused of
22026 sending spam, and their web sites have been shut down for some time
22027 because of the incident.
22028
22029 The statistical approach to spam filtering is also popular.  It is
22030 based on a statistical analysis of previous spam messages.  Usually
22031 the analysis is a simple word frequency count, with perhaps pairs of
22032 words or 3-word combinations thrown into the mix.  Statistical
22033 analysis of spam works very well in most of the cases, but it can
22034 classify legitimate e-mail as spam in some cases.  It takes time to
22035 run the analysis, the full message must be analyzed, and the user has
22036 to store the database of spam analyses.
22037
22038 @node Anti-Spam Basics
22039 @subsection Anti-Spam Basics
22040 @cindex email spam
22041 @cindex spam
22042 @cindex UCE
22043 @cindex unsolicited commercial email
22044
22045 One way of dealing with spam is having Gnus split out all spam into a
22046 @samp{spam} mail group (@pxref{Splitting Mail}).
22047
22048 First, pick one (1) valid mail address that you can be reached at, and
22049 put it in your @code{From} header of all your news articles.  (I've
22050 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22051 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22052 sysadmin whether your sendmail installation accepts keywords in the local
22053 part of the mail address.)
22054
22055 @lisp
22056 (setq message-default-news-headers
22057       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22058 @end lisp
22059
22060 Then put the following split rule in @code{nnmail-split-fancy}
22061 (@pxref{Fancy Mail Splitting}):
22062
22063 @lisp
22064 (
22065  ...
22066  (to "larsi@@trym.ifi.uio.no"
22067       (| ("subject" "re:.*" "misc")
22068          ("references" ".*@@.*" "misc")
22069          "spam"))
22070  ...
22071 )
22072 @end lisp
22073
22074 This says that all mail to this address is suspect, but if it has a
22075 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22076 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22077 (This idea probably comes from Tim Pierce.)
22078
22079 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22080 and do not include your email address explicitly in the @code{To}
22081 header.  Why they do this is unknown---perhaps it's to thwart this
22082 thwarting scheme?  In any case, this is trivial to deal with---you just
22083 put anything not addressed to you in the @samp{spam} group by ending
22084 your fancy split rule in this way:
22085
22086 @lisp
22087 (
22088  ...
22089  (to "larsi" "misc")
22090  "spam")
22091 @end lisp
22092
22093 In my experience, this will sort virtually everything into the right
22094 group.  You still have to check the @samp{spam} group from time to time to
22095 check for legitimate mail, though.  If you feel like being a good net
22096 citizen, you can even send off complaints to the proper authorities on
22097 each unsolicited commercial email---at your leisure.
22098
22099 This works for me.  It allows people an easy way to contact me (they can
22100 just press @kbd{r} in the usual way), and I'm not bothered at all with
22101 spam.  It's a win-win situation.  Forging @code{From} headers to point
22102 to non-existent domains is yucky, in my opinion.
22103
22104
22105
22106 @node SpamAssassin
22107 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22108 @cindex SpamAssassin
22109 @cindex Vipul's Razor
22110 @cindex DCC
22111
22112 The days where the hints in the previous section was sufficient in
22113 avoiding spam are coming to an end.  There are many tools out there
22114 that claim to reduce the amount of spam you get.  This section could
22115 easily become outdated fast, as new products replace old, but
22116 fortunately most of these tools seem to have similar interfaces.  Even
22117 though this section will use SpamAssassin as an example, it should be
22118 easy to adapt it to most other tools.
22119
22120 If the tool you are using is not installed on the mail server, you
22121 need to invoke it yourself.  Ideas on how to use the
22122 @code{:postscript} mail source parameter (@pxref{Mail Source
22123 Specifiers}) follow.
22124
22125 @lisp
22126 (setq mail-sources
22127       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22128         (pop :user "jrl"
22129              :server "pophost"
22130              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22131 @end lisp
22132
22133 Once you manage to process your incoming spool somehow, thus making
22134 the mail contain e.g.@: a header indicating it is spam, you are ready to
22135 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22136
22137 @lisp
22138 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22139                              ...))
22140 @end lisp
22141
22142 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22143
22144 @lisp
22145 (setq nnmail-split-methods 'nnmail-split-fancy
22146       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22147                              ...))
22148 @end lisp
22149
22150 Some people might not like the idea of piping the mail through various
22151 programs using a @code{:prescript} (if some program is buggy, you
22152 might lose all mail).  If you are one of them, another solution is to
22153 call the external tools during splitting.  Example fancy split method:
22154
22155 @lisp
22156 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22157                              ...))
22158 (defun kevin-spamassassin ()
22159   (save-excursion
22160     (let ((buf (or (get-buffer " *nnmail incoming*")
22161                    (get-buffer " *nnml move*"))))
22162       (if (not buf)
22163           (progn (message "Oops, cannot find message buffer") nil)
22164         (set-buffer buf)
22165         (if (eq 1 (call-process-region (point-min) (point-max)
22166                                        "spamc" nil nil nil "-c"))
22167             "spam")))))
22168 @end lisp
22169
22170 That is about it.  As some spam is likely to get through anyway, you
22171 might want to have a nifty function to call when you happen to read
22172 spam.  And here is the nifty function:
22173
22174 @lisp
22175  (defun my-gnus-raze-spam ()
22176   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22177   (interactive)
22178   (gnus-summary-show-raw-article)
22179   (gnus-summary-save-in-pipe "razor-report -f -d")
22180   (gnus-summary-mark-as-expirable 1))
22181 @end lisp
22182
22183 @node Hashcash
22184 @subsection Hashcash
22185 @cindex hashcash
22186
22187 A novel technique to fight spam is to require senders to do something
22188 costly for each message they send.  This has the obvious drawback that
22189 you cannot rely on everyone in the world using this technique,
22190 since it is not part of the Internet standards, but it may be useful
22191 in smaller communities.
22192
22193 While the tools in the previous section work well in practice, they
22194 work only because the tools are constantly maintained and updated as
22195 new form of spam appears.  This means that a small percentage of spam
22196 will always get through.  It also means that somewhere, someone needs
22197 to read lots of spam to update these tools.  Hashcash avoids that, but
22198 instead requires that everyone you communicate with supports the
22199 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22200 The approaches have their own advantages and disadvantages, but as
22201 often in the real world, a combination of them is stronger than either
22202 one of them separately.
22203
22204 @cindex X-Hashcash
22205 The ``something costly'' is to burn CPU time, more specifically to
22206 compute a hash collision up to a certain number of bits.  The
22207 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22208 header.  For more details, and for the external application
22209 @code{hashcash} you need to install to use this feature, see
22210 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22211 information can be found at @uref{http://www.camram.org/}.
22212
22213 If you wish to call hashcash for each message you send, say something
22214 like:
22215
22216 @lisp
22217 (require 'hashcash)
22218 (add-hook 'message-send-hook 'mail-add-payment)
22219 @end lisp
22220
22221 The @file{hashcash.el} library can be found in the Gnus development
22222 contrib directory or at
22223 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22224
22225 You will need to set up some additional variables as well:
22226
22227 @table @code
22228
22229 @item hashcash-default-payment
22230 @vindex hashcash-default-payment
22231 This variable indicates the default number of bits the hash collision
22232 should consist of.  By default this is 0, meaning nothing will be
22233 done.  Suggested useful values include 17 to 29.
22234
22235 @item hashcash-payment-alist
22236 @vindex hashcash-payment-alist
22237 Some receivers may require you to spend burn more CPU time than the
22238 default.  This variable contains a list of @samp{(@var{addr}
22239 @var{amount})} cells, where @var{addr} is the receiver (email address
22240 or newsgroup) and @var{amount} is the number of bits in the collision
22241 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22242 @var{amount})} cells, where the @var{string} is the string to use
22243 (normally the email address or newsgroup name is used).
22244
22245 @item hashcash
22246 @vindex hashcash
22247 Where the @code{hashcash} binary is installed.
22248
22249 @end table
22250
22251 Currently there is no built in functionality in Gnus to verify
22252 hashcash cookies, it is expected that this is performed by your hand
22253 customized mail filtering scripts.  Improvements in this area would be
22254 a useful contribution, however.
22255
22256 @node Filtering Spam Using The Spam ELisp Package
22257 @subsection Filtering Spam Using The Spam ELisp Package
22258 @cindex spam filtering
22259 @cindex spam
22260
22261 The idea behind @file{spam.el} is to have a control center for spam detection
22262 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22263 filters incoming mail, and it analyzes mail known to be spam or ham.
22264 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22265 non-spam messages.
22266
22267 So, what happens when you load @file{spam.el}?  
22268
22269 First of all, you @strong{must} set the variable
22270 @code{spam-install-hooks} to @code{t} and install the @code{spam.el} hooks:
22271
22272 @example
22273 (setq spam-install-hooks t)
22274 (spam-install-hooks-function)
22275 @end example
22276
22277 This is automatically done for you if you load @code{spam.el}
22278 @emph{after} one of the @code{spam-use-*} variables explained later
22279 are set.  So you should load @code{spam.el} after you set one of the
22280 @code{spam-use-*} variables:
22281
22282 @example
22283 (setq spam-use-bogofilter t)
22284 (require 'spam)
22285 @end example
22286
22287 You get the following keyboard commands:
22288
22289 @table @kbd
22290
22291 @item M-d
22292 @itemx M s x
22293 @itemx S x
22294 @kindex M-d
22295 @kindex S x
22296 @kindex M s x
22297 @findex gnus-summary-mark-as-spam
22298 @code{gnus-summary-mark-as-spam}.
22299
22300 Mark current article as spam, showing it with the @samp{$} mark.
22301 Whenever you see a spam article, make sure to mark its summary line
22302 with @kbd{M-d} before leaving the group.  This is done automatically
22303 for unread articles in @emph{spam} groups.
22304
22305 @item M s t
22306 @itemx S t
22307 @kindex M s t
22308 @kindex S t
22309 @findex spam-bogofilter-score
22310 @code{spam-bogofilter-score}.
22311
22312 You must have Bogofilter installed for that command to work properly.
22313
22314 @xref{Bogofilter}.
22315
22316 @end table
22317
22318 Also, when you load @file{spam.el}, you will be able to customize its
22319 variables.  Try @code{customize-group} on the @samp{spam} variable
22320 group.
22321
22322 @vindex gnus-spam-process-newsgroups
22323 The concepts of ham processors and spam processors are very important.
22324 Ham processors and spam processors for a group can be set with the
22325 @code{spam-process} group parameter, or the
22326 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22327 mail known to be non-spam (@emph{ham}) and process it in some way so
22328 that later similar mail will also be considered non-spam.  Spam
22329 processors take mail known to be spam and process it so similar spam
22330 will be detected later.
22331
22332 @vindex gnus-spam-newsgroup-contents
22333 Gnus learns from the spam you get.  You have to collect your spam in
22334 one or more spam groups, and set or customize the variable
22335 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22336 groups to contain spam by setting their group parameter
22337 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22338 by customizing the corresponding variable
22339 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22340 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22341 also be used to declare groups as @emph{ham} groups if you set their
22342 classification to @code{gnus-group-spam-classification-ham}.  If
22343 groups are not classified by means of @code{spam-junk-mailgroups},
22344 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22345 considered @emph{unclassified}.  All groups are unclassified by
22346 default.
22347
22348 @vindex gnus-spam-mark
22349 @cindex $
22350 In spam groups, all messages are considered to be spam by default:
22351 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22352 group.  If you have seen a message, had it marked as spam, then
22353 unmarked it, it won't be marked as spam when you enter the group
22354 thereafter.  You can disable that behavior, so all unread messages
22355 will get the @samp{$} mark, if you set the
22356 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22357 remove the @samp{$} mark when you are in the group summary buffer for
22358 every message that is not spam after all.  To remove the @samp{$}
22359 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22360 declaring it read the non-spam way.  When you leave a group, all
22361 spam-marked (@samp{$}) articles are sent to a spam processor which
22362 will study them as spam samples.
22363
22364 Messages may also be deleted in various other ways, and unless
22365 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22366 and @samp{r} for default read or explicit delete, marks @samp{X} and
22367 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22368 low scores, are all considered to be associated with articles which
22369 are not spam.  This assumption might be false, in particular if you
22370 use kill files or score files as means for detecting genuine spam, you
22371 should then adjust the @code{ham-marks} group parameter.
22372
22373 @defvar ham-marks
22374 You can customize this group or topic parameter to be the list of
22375 marks you want to consider ham.  By default, the list contains the
22376 deleted, read, killed, kill-filed, and low-score marks.
22377 @end defvar
22378
22379 @defvar spam-marks
22380 You can customize this group or topic parameter to be the list of
22381 marks you want to consider spam.  By default, the list contains only
22382 the spam mark.
22383 @end defvar
22384
22385 When you leave @emph{any} group, regardless of its
22386 @code{spam-contents} classification, all spam-marked articles are sent
22387 to a spam processor, which will study these as spam samples.  If you
22388 explicit kill a lot, you might sometimes end up with articles marked
22389 @samp{K} which you never saw, and which might accidentally contain
22390 spam.  Best is to make sure that real spam is marked with @samp{$},
22391 and nothing else.
22392
22393 @vindex gnus-ham-process-destinations
22394 When you leave a @emph{spam} group, all spam-marked articles are
22395 marked as expired after processing with the spam processor.  This is
22396 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22397 @strong{ham} articles in a spam group will be moved to a location
22398 determined by either the @code{ham-process-destination} group
22399 parameter or a match in the @code{gnus-ham-process-destinations}
22400 variable, which is a list of regular expressions matched with group
22401 names (it's easiest to customize this variable with
22402 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22403 location is a group name.  If the @code{ham-process-destination}
22404 parameter is not set, ham articles are left in place.  If the
22405 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22406 set, the ham articles are marked as unread before being moved.
22407
22408 When you leave a @emph{ham} group, all ham-marked articles are sent to
22409 a ham processor, which will study these as non-spam samples.
22410
22411 @vindex gnus-spam-process-destinations
22412 When you leave a @emph{ham} or @emph{unclassified} group, all
22413 @strong{spam} articles are moved to a location determined by either
22414 the @code{spam-process-destination} group parameter or a match in the
22415 @code{gnus-spam-process-destinations} variable, which is a list of
22416 regular expressions matched with group names (it's easiest to
22417 customize this variable with @code{customize-variable
22418 gnus-spam-process-destinations}).  The ultimate location is a group
22419 name.  If the @code{spam-process-destination} parameter is not set,
22420 the spam articles are only expired.
22421
22422 To use the @file{spam.el} facilities for incoming mail filtering, you
22423 must add the following to your fancy split list
22424 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22425
22426 @example
22427 (: spam-split)
22428 @end example
22429
22430 Note that the fancy split may be called @code{nnmail-split-fancy} or
22431 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22432 nnimap back ends to retrieve your mail.
22433
22434 The @code{spam-split} function will process incoming mail and send the
22435 mail considered to be spam into the group name given by the variable
22436 @code{spam-split-group}.  By default that group name is @samp{spam},
22437 but you can customize @code{spam-split-group}.
22438
22439 You can also give @code{spam-split} a parameter,
22440 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22441
22442 Take these split rules (with @code{spam-use-regex-headers} and
22443 @code{spam-use-blackholes} set):
22444
22445 @example
22446  nnimap-split-fancy '(|
22447                       (any "ding" "ding")
22448                       (: spam-split)
22449                       ;; default mailbox
22450                       "mail")
22451 @end example
22452
22453 Now, the problem is that you want all ding messages to make it to the
22454 ding folder.  But that will let obvious spam (for example, spam
22455 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22456 when it's sent to the ding list.  On the other hand, some messages to
22457 the ding list are from a mail server in the blackhole list, so the
22458 invocation of @code{spam-split} can't be before the ding rule.
22459
22460 You can let SpamAssassin headers supercede ding rules, but all other
22461 @code{spam-split} rules (including a second invocation of the
22462 regex-headers check) will be after the ding rule:
22463
22464 @example
22465  nnimap-split-fancy '(|
22466                       (: spam-split 'spam-use-regex-headers)
22467                       (any "ding" "ding")
22468                       (: spam-split)
22469                       ;; default mailbox
22470                       "mail")
22471 @end example
22472
22473 Basically, this lets you invoke specific @code{spam-split} checks
22474 depending on your particular needs.  You don't have to throw all mail
22475 into all the spam tests.  Another reason why this is nice is that
22476 messages to mailing lists you have rules for don't have to have
22477 resource-intensive blackhole checks performed on them.  You could also
22478 specify different spam checks for your nnmail split vs. your nnimap
22479 split.  Go crazy.
22480
22481 You still have to have specific checks such as
22482 @code{spam-use-regex-headers} set to @code{t}, even if you specifically
22483 invoke @code{spam-split} with the check.  The reason is that when
22484 loading @file{spam.el}, some conditional loading is done depending on
22485 what @code{spam-use-xyz} variables you have set.
22486
22487 @emph{Note for IMAP users}
22488
22489 The boolean variable @code{nnimap-split-download-body} needs to be
22490 set, if you want to split based on the whole message instead of just
22491 the headers.  By default, the nnimap back end will only retrieve the
22492 message headers.  If you use @code{spam-check-bogofilter},
22493 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22494 can benefit from the full message body), you should set this variable.
22495 It is not set by default because it will slow @acronym{IMAP} down, and
22496 that is not an appropriate decision to make on behalf of the user.
22497
22498 @xref{Splitting in IMAP}.
22499
22500 @emph{TODO: Currently, spam.el only supports insertion of articles
22501 into a back end.  There is no way to tell spam.el that an article is no
22502 longer spam or ham.}
22503
22504 @emph{TODO: spam.el needs to provide a uniform way of training all the
22505 statistical databases.  Some have that functionality built-in, others
22506 don't.}
22507
22508 The following are the methods you can use to control the behavior of
22509 @code{spam-split} and their corresponding spam and ham processors:
22510
22511 @menu
22512 * Blacklists and Whitelists::
22513 * BBDB Whitelists::
22514 * Gmane Spam Reporting::
22515 * Anti-spam Hashcash Payments::
22516 * Blackholes::
22517 * Regular Expressions Header Matching::
22518 * Bogofilter::
22519 * ifile spam filtering::
22520 * spam-stat spam filtering::
22521 * SpamOracle::
22522 * Extending the spam elisp package::
22523 @end menu
22524
22525 @node Blacklists and Whitelists
22526 @subsubsection Blacklists and Whitelists
22527 @cindex spam filtering
22528 @cindex whitelists, spam filtering
22529 @cindex blacklists, spam filtering
22530 @cindex spam
22531
22532 @defvar spam-use-blacklist
22533
22534 Set this variable to @code{t} if you want to use blacklists when
22535 splitting incoming mail.  Messages whose senders are in the blacklist
22536 will be sent to the @code{spam-split-group}.  This is an explicit
22537 filter, meaning that it acts only on mail senders @emph{declared} to
22538 be spammers.
22539
22540 @end defvar
22541
22542 @defvar spam-use-whitelist
22543
22544 Set this variable to @code{t} if you want to use whitelists when
22545 splitting incoming mail.  Messages whose senders are not in the
22546 whitelist will be sent to the next spam-split rule.  This is an
22547 explicit filter, meaning that unless someone is in the whitelist, their
22548 messages are not assumed to be spam or ham.
22549
22550 @end defvar
22551
22552 @defvar spam-use-whitelist-exclusive
22553
22554 Set this variable to @code{t} if you want to use whitelists as an
22555 implicit filter, meaning that every message will be considered spam
22556 unless the sender is in the whitelist.  Use with care.
22557
22558 @end defvar
22559
22560 @defvar gnus-group-spam-exit-processor-blacklist
22561
22562 Add this symbol to a group's @code{spam-process} parameter by
22563 customizing the group parameters or the
22564 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22565 added to a group's @code{spam-process} parameter, the senders of
22566 spam-marked articles will be added to the blacklist.
22567
22568 @end defvar
22569
22570 @defvar gnus-group-ham-exit-processor-whitelist
22571
22572 Add this symbol to a group's @code{spam-process} parameter by
22573 customizing the group parameters or the
22574 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22575 added to a group's @code{spam-process} parameter, the senders of
22576 ham-marked articles in @emph{ham} groups will be added to the
22577 whitelist.  Note that this ham processor has no effect in @emph{spam}
22578 or @emph{unclassified} groups.
22579
22580 @end defvar
22581
22582 Blacklists are lists of regular expressions matching addresses you
22583 consider to be spam senders.  For instance, to block mail from any
22584 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22585 blacklist.  You start out with an empty blacklist.  Blacklist entries
22586 use the Emacs regular expression syntax.
22587
22588 Conversely, whitelists tell Gnus what addresses are considered
22589 legitimate.  All messages from whitelisted addresses are considered
22590 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22591 Emacs regular expression syntax.
22592
22593 The blacklist and whitelist file locations can be customized with the
22594 @code{spam-directory} variable (@file{~/News/spam} by default), or
22595 the @code{spam-whitelist} and @code{spam-blacklist} variables
22596 directly.  The whitelist and blacklist files will by default be in the
22597 @code{spam-directory} directory, named @file{whitelist} and
22598 @file{blacklist} respectively.
22599
22600 @node BBDB Whitelists
22601 @subsubsection BBDB Whitelists
22602 @cindex spam filtering
22603 @cindex BBDB whitelists, spam filtering
22604 @cindex BBDB, spam filtering
22605 @cindex spam
22606
22607 @defvar spam-use-BBDB
22608
22609 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22610 Whitelists}), but uses the BBDB as the source of whitelisted
22611 addresses, without regular expressions.  You must have the BBDB loaded
22612 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22613 not in the BBDB will be sent to the next spam-split rule.  This is an
22614 explicit filter, meaning that unless someone is in the BBDB, their
22615 messages are not assumed to be spam or ham.
22616
22617 @end defvar
22618
22619 @defvar spam-use-BBDB-exclusive
22620
22621 Set this variable to @code{t} if you want to use the BBDB as an
22622 implicit filter, meaning that every message will be considered spam
22623 unless the sender is in the BBDB.  Use with care.  Only sender
22624 addresses in the BBDB will be allowed through; all others will be
22625 classified as spammers.
22626
22627 @end defvar
22628
22629 @defvar gnus-group-ham-exit-processor-BBDB
22630
22631 Add this symbol to a group's @code{spam-process} parameter by
22632 customizing the group parameters or the
22633 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22634 added to a group's @code{spam-process} parameter, the senders of
22635 ham-marked articles in @emph{ham} groups will be added to the
22636 BBDB.  Note that this ham processor has no effect in @emph{spam}
22637 or @emph{unclassified} groups.
22638
22639 @end defvar
22640
22641 @node Gmane Spam Reporting
22642 @subsubsection Gmane Spam Reporting
22643 @cindex spam reporting
22644 @cindex Gmane, spam reporting
22645 @cindex Gmane, spam reporting
22646 @cindex spam
22647
22648 @defvar gnus-group-spam-exit-processor-report-gmane
22649
22650 Add this symbol to a group's @code{spam-process} parameter by
22651 customizing the group parameters or the
22652 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22653 added to a group's @code{spam-process} parameter, the spam-marked
22654 articles groups will be reported to the Gmane administrators.
22655
22656 @end defvar
22657
22658 @node Anti-spam Hashcash Payments
22659 @subsubsection Anti-spam Hashcash Payments
22660 @cindex spam filtering
22661 @cindex hashcash, spam filtering
22662 @cindex spam
22663
22664 @defvar spam-use-hashcash
22665
22666 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22667 Whitelists}), but uses hashcash tokens for whitelisting messages
22668 instead of the sender address.  You must have the @code{hashcash.el}
22669 package loaded for @code{spam-use-hashcash} to work properly.
22670 Messages without a hashcash payment token will be sent to the next
22671 spam-split rule.  This is an explicit filter, meaning that unless a
22672 hashcash token is found, the messages are not assumed to be spam or
22673 ham.
22674
22675 @end defvar
22676
22677 @node Blackholes
22678 @subsubsection Blackholes
22679 @cindex spam filtering
22680 @cindex blackholes, spam filtering
22681 @cindex spam
22682
22683 @defvar spam-use-blackholes
22684
22685 This option is disabled by default.  You can let Gnus consult the
22686 blackhole-type distributed spam processing systems (DCC, for instance)
22687 when you set this option.  The variable @code{spam-blackhole-servers}
22688 holds the list of blackhole servers Gnus will consult.  The current
22689 list is fairly comprehensive, but make sure to let us know if it
22690 contains outdated servers.
22691
22692 The blackhole check uses the @code{dig.el} package, but you can tell
22693 @file{spam.el} to use @code{dns.el} instead for better performance if
22694 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22695 this time to set @code{spam-use-dig} to @code{nil} despite the
22696 possible performance improvements, because some users may be unable to
22697 use it, but you can try it and see if it works for you.
22698
22699 @end defvar
22700
22701 @defvar spam-blackhole-servers
22702
22703 The list of servers to consult for blackhole checks.
22704
22705 @end defvar
22706
22707 @defvar spam-blackhole-good-server-regex
22708
22709 A regular expression for IPs that should not be checked against the
22710 blackhole server list.  When set to @code{nil}, it has no effect.
22711
22712 @end defvar
22713
22714 @defvar spam-use-dig
22715
22716 Use the @code{dig.el} package instead of the @code{dns.el} package.
22717 The default setting of @code{t} is recommended.
22718
22719 @end defvar
22720
22721 Blackhole checks are done only on incoming mail.  There is no spam or
22722 ham processor for blackholes.
22723
22724 @node Regular Expressions Header Matching
22725 @subsubsection Regular Expressions Header Matching
22726 @cindex spam filtering
22727 @cindex regular expressions header matching, spam filtering
22728 @cindex spam
22729
22730 @defvar spam-use-regex-headers
22731
22732 This option is disabled by default.  You can let Gnus check the
22733 message headers against lists of regular expressions when you set this
22734 option.  The variables @code{spam-regex-headers-spam} and
22735 @code{spam-regex-headers-ham} hold the list of regular expressions.
22736 Gnus will check against the message headers to determine if the
22737 message is spam or ham, respectively.
22738
22739 @end defvar
22740
22741 @defvar spam-regex-headers-spam
22742
22743 The list of regular expressions that, when matched in the headers of
22744 the message, positively identify it as spam.
22745
22746 @end defvar
22747
22748 @defvar spam-regex-headers-ham
22749
22750 The list of regular expressions that, when matched in the headers of
22751 the message, positively identify it as ham.
22752
22753 @end defvar
22754
22755 Regular expression header checks are done only on incoming mail.
22756 There is no specific spam or ham processor for regular expressions.
22757
22758 @node Bogofilter
22759 @subsubsection Bogofilter
22760 @cindex spam filtering
22761 @cindex bogofilter, spam filtering
22762 @cindex spam
22763
22764 @defvar spam-use-bogofilter
22765
22766 Set this variable if you want @code{spam-split} to use Eric Raymond's
22767 speedy Bogofilter.
22768
22769 With a minimum of care for associating the @samp{$} mark for spam
22770 articles only, Bogofilter training all gets fairly automatic.  You
22771 should do this until you get a few hundreds of articles in each
22772 category, spam or not.  The command @kbd{S t} in summary mode, either
22773 for debugging or for curiosity, shows the @emph{spamicity} score of
22774 the current article (between 0.0 and 1.0).
22775
22776 Bogofilter determines if a message is spam based on a specific
22777 threshold.  That threshold can be customized, consult the Bogofilter
22778 documentation.
22779
22780 If the @code{bogofilter} executable is not in your path, Bogofilter
22781 processing will be turned off.
22782
22783 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22784
22785 @end defvar
22786
22787 @defvar spam-use-bogofilter-headers
22788
22789 Set this variable if you want @code{spam-split} to use Eric Raymond's
22790 speedy Bogofilter, looking only at the message headers.  It works
22791 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22792 must be in the message already.  Normally you would do this with a
22793 procmail recipe or something similar; consult the Bogofilter
22794 installation documents for details.
22795
22796 You should not enable this if you use @code{spam-use-bogofilter}.
22797
22798 @end defvar
22799
22800 @defvar gnus-group-spam-exit-processor-bogofilter
22801 Add this symbol to a group's @code{spam-process} parameter by
22802 customizing the group parameters or the
22803 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22804 added to a group's @code{spam-process} parameter, spam-marked articles
22805 will be added to the Bogofilter spam database.
22806 @end defvar
22807
22808 @defvar gnus-group-ham-exit-processor-bogofilter
22809 Add this symbol to a group's @code{spam-process} parameter by
22810 customizing the group parameters or the
22811 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22812 added to a group's @code{spam-process} parameter, the ham-marked
22813 articles in @emph{ham} groups will be added to the Bogofilter database
22814 of non-spam messages.  Note that this ham processor has no effect in
22815 @emph{spam} or @emph{unclassified} groups.
22816 @end defvar
22817
22818 @defvar spam-bogofilter-database-directory
22819
22820 This is the directory where Bogofilter will store its databases.  It
22821 is not specified by default, so Bogofilter will use its own default
22822 database directory.
22823
22824 @end defvar
22825
22826 The Bogofilter mail classifier is similar to @command{ifile} in intent and
22827 purpose.  A ham and a spam processor are provided, plus the
22828 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22829 variables to indicate to spam-split that Bogofilter should either be
22830 used, or has already been used on the article.  The 0.9.2.1 version of
22831 Bogofilter was used to test this functionality.
22832
22833 @node ifile spam filtering
22834 @subsubsection ifile spam filtering
22835 @cindex spam filtering
22836 @cindex ifile, spam filtering
22837 @cindex spam
22838
22839 @defvar spam-use-ifile
22840
22841 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
22842 statistical analyzer similar to Bogofilter.
22843
22844 @end defvar
22845
22846 @defvar spam-ifile-all-categories
22847
22848 Enable this variable if you want @code{spam-use-ifile} to give you all
22849 the ifile categories, not just spam/non-spam.  If you use this, make
22850 sure you train ifile as described in its documentation.
22851
22852 @end defvar
22853
22854 @defvar spam-ifile-spam-category
22855
22856 This is the category of spam messages as far as ifile is concerned.
22857 The actual string used is irrelevant, but you probably want to leave
22858 the default value of @samp{spam}.
22859 @end defvar
22860
22861 @defvar spam-ifile-database-path
22862
22863 This is the filename for the ifile database.  It is not specified by
22864 default, so ifile will use its own default database name.
22865
22866 @end defvar
22867
22868 The ifile mail classifier is similar to Bogofilter in intent and
22869 purpose.  A ham and a spam processor are provided, plus the
22870 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22871 should be used.  The 1.2.1 version of ifile was used to test this
22872 functionality.
22873
22874 @node spam-stat spam filtering
22875 @subsubsection spam-stat spam filtering
22876 @cindex spam filtering
22877 @cindex spam-stat, spam filtering
22878 @cindex spam-stat
22879 @cindex spam
22880
22881 @xref{Filtering Spam Using Statistics with spam-stat}.
22882
22883 @defvar spam-use-stat
22884
22885 Enable this variable if you want @code{spam-split} to use
22886 spam-stat.el, an Emacs Lisp statistical analyzer.
22887
22888 @end defvar
22889
22890 @defvar gnus-group-spam-exit-processor-stat
22891 Add this symbol to a group's @code{spam-process} parameter by
22892 customizing the group parameters or the
22893 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22894 added to a group's @code{spam-process} parameter, the spam-marked
22895 articles will be added to the spam-stat database of spam messages.
22896 @end defvar
22897
22898 @defvar gnus-group-ham-exit-processor-stat
22899 Add this symbol to a group's @code{spam-process} parameter by
22900 customizing the group parameters or the
22901 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22902 added to a group's @code{spam-process} parameter, the ham-marked
22903 articles in @emph{ham} groups will be added to the spam-stat database
22904 of non-spam messages.  Note that this ham processor has no effect in
22905 @emph{spam} or @emph{unclassified} groups.
22906 @end defvar
22907
22908 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
22909 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
22910 which unlike ifile or Bogofilter does not require external programs.
22911 A spam and a ham processor, and the @code{spam-use-stat} variable for
22912 @code{spam-split} are provided.
22913
22914 @node SpamOracle
22915 @subsubsection Using SpamOracle with Gnus
22916 @cindex spam filtering
22917 @cindex SpamOracle
22918 @cindex spam
22919
22920 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
22921 statistical mail filtering tool written by Xavier Leroy and needs to be
22922 installed separately.
22923
22924 There are several ways to use SpamOracle with Gnus.  In all cases, your
22925 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
22926 then enter an @samp{X-Spam} header indicating whether it regards the
22927 mail as a spam mail or not.
22928
22929 One possibility is to run SpamOracle as a @code{:prescript} from the
22930 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
22931 the advantage that the user can see the @emph{X-Spam} headers.
22932
22933 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
22934 Using The Spam ELisp Package}) call SpamOracle.
22935
22936 @vindex spam-use-spamoracle
22937 To enable SpamOracle usage by @file{spam.el}, set the variable
22938 @code{spam-use-spamoracle} to @code{t} and configure the
22939 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
22940 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
22941 this example the @samp{INBOX} of an nnimap server is filtered using
22942 SpamOracle.  Mails recognized as spam mails will be moved to
22943 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
22944 in @samp{INBOX}:
22945
22946 @example
22947 (setq spam-use-spamoracle t
22948       spam-split-group "Junk"
22949       nnimap-split-inbox '("INBOX")
22950       nnimap-split-rule 'nnimap-split-fancy
22951       nnimap-split-fancy '(| (: spam-split) "INBOX"))
22952 @end example
22953
22954 @defvar spam-use-spamoracle
22955 Set to @code{t} if you want Gnus to enable spam filtering using
22956 SpamOracle.
22957 @end defvar
22958
22959 @defvar spam-spamoracle-binary
22960 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
22961 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
22962 can be customized.
22963 @end defvar
22964
22965 @defvar spam-spamoracle-database
22966 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
22967 store its analyses.  This is controlled by the variable
22968 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
22969 the default SpamOracle database will be used.  In case you want your
22970 database to live somewhere special, set
22971 @code{spam-spamoracle-database} to this path.
22972 @end defvar
22973
22974 SpamOracle employs a statistical algorithm to determine whether a
22975 message is spam or ham.  In order to get good results, meaning few
22976 false hits or misses, SpamOracle needs training.  SpamOracle learns the
22977 characteristics of your spam mails.  Using the @emph{add} mode
22978 (training mode) one has to feed good (ham) and spam mails to
22979 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
22980 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
22981 spam- and ham-processors, which is much more convenient.  For a
22982 detailed description of spam- and ham-processors, @xref{Filtering Spam
22983 Using The Spam ELisp Package}.
22984
22985 @defvar gnus-group-spam-exit-processor-spamoracle
22986 Add this symbol to a group's @code{spam-process} parameter by
22987 customizing the group parameter or the
22988 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22989 to a group's @code{spam-process} parameter, spam-marked articles will be
22990 sent to SpamOracle as spam samples.
22991 @end defvar
22992
22993 @defvar gnus-group-ham-exit-processor-spamoracle
22994 Add this symbol to a group's @code{spam-process} parameter by
22995 customizing the group parameter or the
22996 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
22997 to a grup's @code{spam-process} parameter, the ham-marked articles in
22998 @emph{ham} groups will be sent to the SpamOracle as samples of ham
22999 messages.  Note that this ham processor has no effect in @emph{spam} or
23000 @emph{unclassified} groups.
23001 @end defvar
23002
23003 @emph{Example:} These are the Group Parameters of an group that has been
23004 classified as a ham group, meaning that it should only contain ham
23005 messages.
23006 @example
23007  ((spam-contents gnus-group-spam-classification-ham)
23008   (spam-process
23009    (gnus-group-spam-exit-processor-spamoracle)))
23010 @end example
23011 For this group the @code{gnus-group-spam-exit-processor-spamoracle} is
23012 installed.  If the group contains spam message (e.g. because SpamOracle
23013 has not had enough sample messages yet) and the user marks some
23014 messages as spam messages, these messages will be processed by
23015 @code{gnus-group-spam-exit-processor-spamoracle}.  This processor sends
23016 the messages to SpamOracle as new samples for spam.
23017
23018 @node Extending the spam elisp package
23019 @subsubsection Extending the spam elisp package
23020 @cindex spam filtering
23021 @cindex spam elisp package, extending
23022 @cindex extending the spam elisp package
23023
23024 Say you want to add a new back end called blackbox.  For filtering
23025 incoming mail, provide the following:
23026
23027 @enumerate
23028
23029 @item
23030 code
23031
23032 @lisp
23033 (defvar spam-use-blackbox nil
23034   "True if blackbox should be used.")
23035 @end lisp
23036
23037 Add
23038 @example
23039     (spam-use-blackbox   . spam-check-blackbox)
23040 @end example
23041 to @code{spam-list-of-checks}.
23042
23043 @item
23044 functionality
23045
23046 Write the @code{spam-check-blackbox} function.  It should return
23047 @samp{nil} or @code{spam-split-group}.  See the existing
23048 @code{spam-check-*} functions for examples of what you can do.
23049
23050 Make sure to add @code{spam-use-blackbox} to
23051 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23052 mail analyzer that needs the full message body to operate.
23053
23054 @end enumerate
23055
23056 For processing spam and ham messages, provide the following:
23057
23058 @enumerate
23059
23060 @item
23061 code
23062
23063 Note you don't have to provide a spam or a ham processor.  Only
23064 provide them if Blackbox supports spam or ham processing.
23065
23066 @lisp
23067 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
23068   "The Blackbox summary exit spam processor.
23069 Only applicable to spam groups.")
23070
23071 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
23072   "The whitelist summary exit ham processor.
23073 Only applicable to non-spam (unclassified and ham) groups.")
23074
23075 @end lisp
23076
23077 @item
23078 functionality
23079
23080 @lisp
23081 (defun spam-blackbox-register-spam-routine ()
23082   (spam-generic-register-routine
23083    ;; @r{the spam function}
23084    (lambda (article)
23085      (let ((from (spam-fetch-field-from-fast article)))
23086        (when (stringp from)
23087            (blackbox-do-something-with-this-spammer from))))
23088    ;; @r{the ham function}
23089    nil))
23090
23091 (defun spam-blackbox-register-ham-routine ()
23092   (spam-generic-register-routine
23093    ;; @r{the spam function}
23094    nil
23095    ;; @r{the ham function}
23096    (lambda (article)
23097      (let ((from (spam-fetch-field-from-fast article)))
23098        (when (stringp from)
23099            (blackbox-do-something-with-this-ham-sender from))))))
23100 @end lisp
23101
23102 Write the @code{blackbox-do-something-with-this-ham-sender} and
23103 @code{blackbox-do-something-with-this-spammer} functions.  You can add
23104 more complex code than fetching the message sender, but keep in mind
23105 that retrieving the whole message takes significantly longer than the
23106 sender through @code{spam-fetch-field-from-fast}, because the message
23107 senders are kept in memory by Gnus.
23108
23109 @end enumerate
23110
23111
23112 @node Filtering Spam Using Statistics with spam-stat
23113 @subsection Filtering Spam Using Statistics with spam-stat
23114 @cindex Paul Graham
23115 @cindex Graham, Paul
23116 @cindex naive Bayesian spam filtering
23117 @cindex Bayesian spam filtering, naive
23118 @cindex spam filtering, naive Bayesian
23119
23120 Paul Graham has written an excellent essay about spam filtering using
23121 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23122 Spam}.  In it he describes the inherent deficiency of rule-based
23123 filtering as used by SpamAssassin, for example: Somebody has to write
23124 the rules, and everybody else has to install these rules.  You are
23125 always late.  It would be much better, he argues, to filter mail based
23126 on whether it somehow resembles spam or non-spam.  One way to measure
23127 this is word distribution.  He then goes on to describe a solution
23128 that checks whether a new mail resembles any of your other spam mails
23129 or not.
23130
23131 The basic idea is this:  Create a two collections of your mail, one
23132 with spam, one with non-spam.  Count how often each word appears in
23133 either collection, weight this by the total number of mails in the
23134 collections, and store this information in a dictionary.  For every
23135 word in a new mail, determine its probability to belong to a spam or a
23136 non-spam mail.  Use the 15 most conspicuous words, compute the total
23137 probability of the mail being spam.  If this probability is higher
23138 than a certain threshold, the mail is considered to be spam.
23139
23140 Gnus supports this kind of filtering.  But it needs some setting up.
23141 First, you need two collections of your mail, one with spam, one with
23142 non-spam.  Then you need to create a dictionary using these two
23143 collections, and save it.  And last but not least, you need to use
23144 this dictionary in your fancy mail splitting rules.
23145
23146 @menu
23147 * Creating a spam-stat dictionary::
23148 * Splitting mail using spam-stat::
23149 * Low-level interface to the spam-stat dictionary::
23150 @end menu
23151
23152 @node Creating a spam-stat dictionary
23153 @subsubsection Creating a spam-stat dictionary
23154
23155 Before you can begin to filter spam based on statistics, you must
23156 create these statistics based on two mail collections, one with spam,
23157 one with non-spam.  These statistics are then stored in a dictionary
23158 for later use.  In order for these statistics to be meaningful, you
23159 need several hundred emails in both collections.
23160
23161 Gnus currently supports only the nnml back end for automated dictionary
23162 creation.  The nnml back end stores all mails in a directory, one file
23163 per mail.  Use the following:
23164
23165 @defun spam-stat-process-spam-directory
23166 Create spam statistics for every file in this directory.  Every file
23167 is treated as one spam mail.
23168 @end defun
23169
23170 @defun spam-stat-process-non-spam-directory
23171 Create non-spam statistics for every file in this directory.  Every
23172 file is treated as one non-spam mail.
23173 @end defun
23174
23175 Usually you would call @code{spam-stat-process-spam-directory} on a
23176 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23177 the the group @samp{nnml:mail.spam}), and you would call
23178 @code{spam-stat-process-non-spam-directory} on a directory such as
23179 @file{~/Mail/mail/misc} (this usually corresponds the the group
23180 @samp{nnml:mail.misc}).
23181
23182 When you are using @acronym{IMAP}, you won't have the mails available
23183 locally, so that will not work.  One solution is to use the Gnus Agent
23184 to cache the articles.  Then you can use directories such as
23185 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23186 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23187
23188 @defvar spam-stat
23189 This variable holds the hash-table with all the statistics---the
23190 dictionary we have been talking about.  For every word in either
23191 collection, this hash-table stores a vector describing how often the
23192 word appeared in spam and often it appeared in non-spam mails.
23193 @end defvar
23194
23195 If you want to regenerate the statistics from scratch, you need to
23196 reset the dictionary.
23197
23198 @defun spam-stat-reset
23199 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23200 @end defun
23201
23202 When you are done, you must save the dictionary.  The dictionary may
23203 be rather large.  If you will not update the dictionary incrementally
23204 (instead, you will recreate it once a month, for example), then you
23205 can reduce the size of the dictionary by deleting all words that did
23206 not appear often enough or that do not clearly belong to only spam or
23207 only non-spam mails.
23208
23209 @defun spam-stat-reduce-size
23210 Reduce the size of the dictionary.  Use this only if you do not want
23211 to update the dictionary incrementally.
23212 @end defun
23213
23214 @defun spam-stat-save
23215 Save the dictionary.
23216 @end defun
23217
23218 @defvar spam-stat-file
23219 The filename used to store the dictionary.  This defaults to
23220 @file{~/.spam-stat.el}.
23221 @end defvar
23222
23223 @node Splitting mail using spam-stat
23224 @subsubsection Splitting mail using spam-stat
23225
23226 In order to use @code{spam-stat} to split your mail, you need to add the
23227 following to your @file{~/.gnus.el} file:
23228
23229 @lisp
23230 (require 'spam-stat)
23231 (spam-stat-load)
23232 @end lisp
23233
23234 This will load the necessary Gnus code, and the dictionary you
23235 created.
23236
23237 Next, you need to adapt your fancy splitting rules:  You need to
23238 determine how to use @code{spam-stat}.  The following examples are for
23239 the nnml back end.  Using the nnimap back end works just as well.  Just
23240 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23241
23242 In the simplest case, you only have two groups, @samp{mail.misc} and
23243 @samp{mail.spam}.  The following expression says that mail is either
23244 spam or it should go into @samp{mail.misc}.  If it is spam, then
23245 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23246
23247 @lisp
23248 (setq nnmail-split-fancy
23249       `(| (: spam-stat-split-fancy)
23250           "mail.misc"))
23251 @end lisp
23252
23253 @defvar spam-stat-split-fancy-spam-group
23254 The group to use for spam.  Default is @samp{mail.spam}.
23255 @end defvar
23256
23257 If you also filter mail with specific subjects into other groups, use
23258 the following expression.  Only mails not matching the regular
23259 expression are considered potential spam.
23260
23261 @lisp
23262 (setq nnmail-split-fancy
23263       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23264           (: spam-stat-split-fancy)
23265           "mail.misc"))
23266 @end lisp
23267
23268 If you want to filter for spam first, then you must be careful when
23269 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23270 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23271 non-spam, therefore both should be in your collection of non-spam
23272 mails, when creating the dictionary!
23273
23274 @lisp
23275 (setq nnmail-split-fancy
23276       `(| (: spam-stat-split-fancy)
23277           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23278           "mail.misc"))
23279 @end lisp
23280
23281 You can combine this with traditional filtering.  Here, we move all
23282 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23283 @code{spam-stat-split-fancy} will never see them, the mails in
23284 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23285 nor in your collection of non-spam mails, when creating the
23286 dictionary!
23287
23288 @lisp
23289 (setq nnmail-split-fancy
23290       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23291           (: spam-stat-split-fancy)
23292           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23293           "mail.misc"))
23294 @end lisp
23295
23296
23297 @node Low-level interface to the spam-stat dictionary
23298 @subsubsection Low-level interface to the spam-stat dictionary
23299
23300 The main interface to using @code{spam-stat}, are the following functions:
23301
23302 @defun spam-stat-buffer-is-spam
23303 Called in a buffer, that buffer is considered to be a new spam mail.
23304 Use this for new mail that has not been processed before.
23305 @end defun
23306
23307 @defun spam-stat-buffer-is-no-spam
23308 Called in a buffer, that buffer is considered to be a new non-spam
23309 mail.  Use this for new mail that has not been processed before.
23310 @end defun
23311
23312 @defun spam-stat-buffer-change-to-spam
23313 Called in a buffer, that buffer is no longer considered to be normal
23314 mail but spam.  Use this to change the status of a mail that has
23315 already been processed as non-spam.
23316 @end defun
23317
23318 @defun spam-stat-buffer-change-to-non-spam
23319 Called in a buffer, that buffer is no longer considered to be spam but
23320 normal mail.  Use this to change the status of a mail that has already
23321 been processed as spam.
23322 @end defun
23323
23324 @defun spam-stat-save
23325 Save the hash table to the file.  The filename used is stored in the
23326 variable @code{spam-stat-file}.
23327 @end defun
23328
23329 @defun spam-stat-load
23330 Load the hash table from a file.  The filename used is stored in the
23331 variable @code{spam-stat-file}.
23332 @end defun
23333
23334 @defun spam-stat-score-word
23335 Return the spam score for a word.
23336 @end defun
23337
23338 @defun spam-stat-score-buffer
23339 Return the spam score for a buffer.
23340 @end defun
23341
23342 @defun spam-stat-split-fancy
23343 Use this function for fancy mail splitting.  Add the rule @samp{(:
23344 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23345 @end defun
23346
23347 Make sure you load the dictionary before using it.  This requires the
23348 following in your @file{~/.gnus.el} file:
23349
23350 @lisp
23351 (require 'spam-stat)
23352 (spam-stat-load)
23353 @end lisp
23354
23355 Typical test will involve calls to the following functions:
23356
23357 @smallexample
23358 Reset: (setq spam-stat (make-hash-table :test 'equal))
23359 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23360 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23361 Save table: (spam-stat-save)
23362 File size: (nth 7 (file-attributes spam-stat-file))
23363 Number of words: (hash-table-count spam-stat)
23364 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23365 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23366 Reduce table size: (spam-stat-reduce-size)
23367 Save table: (spam-stat-save)
23368 File size: (nth 7 (file-attributes spam-stat-file))
23369 Number of words: (hash-table-count spam-stat)
23370 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23371 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23372 @end smallexample
23373
23374 Here is how you would create your dictionary:
23375
23376 @smallexample
23377 Reset: (setq spam-stat (make-hash-table :test 'equal))
23378 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23379 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23380 Repeat for any other non-spam group you need...
23381 Reduce table size: (spam-stat-reduce-size)
23382 Save table: (spam-stat-save)
23383 @end smallexample
23384
23385 @node Various Various
23386 @section Various Various
23387 @cindex mode lines
23388 @cindex highlights
23389
23390 @table @code
23391
23392 @item gnus-home-directory
23393 @vindex gnus-home-directory
23394 All Gnus file and directory variables will be initialized from this
23395 variable, which defaults to @file{~/}.
23396
23397 @item gnus-directory
23398 @vindex gnus-directory
23399 Most Gnus storage file and directory variables will be initialized from
23400 this variable, which defaults to the @env{SAVEDIR} environment
23401 variable, or @file{~/News/} if that variable isn't set.
23402
23403 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23404 This means that other directory variables that are initialized from this
23405 variable won't be set properly if you set this variable in
23406 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23407
23408 @item gnus-default-directory
23409 @vindex gnus-default-directory
23410 Not related to the above variable at all---this variable says what the
23411 default directory of all Gnus buffers should be.  If you issue commands
23412 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23413 default directory.  If this variable is @code{nil} (which is the
23414 default), the default directory will be the default directory of the
23415 buffer you were in when you started Gnus.
23416
23417 @item gnus-verbose
23418 @vindex gnus-verbose
23419 This variable is an integer between zero and ten.  The higher the value,
23420 the more messages will be displayed.  If this variable is zero, Gnus
23421 will never flash any messages, if it is seven (which is the default),
23422 most important messages will be shown, and if it is ten, Gnus won't ever
23423 shut up, but will flash so many messages it will make your head swim.
23424
23425 @item gnus-verbose-backends
23426 @vindex gnus-verbose-backends
23427 This variable works the same way as @code{gnus-verbose}, but it applies
23428 to the Gnus back ends instead of Gnus proper.
23429
23430 @item nnheader-max-head-length
23431 @vindex nnheader-max-head-length
23432 When the back ends read straight heads of articles, they all try to read
23433 as little as possible.  This variable (default 4096) specifies
23434 the absolute max length the back ends will try to read before giving up
23435 on finding a separator line between the head and the body.  If this
23436 variable is @code{nil}, there is no upper read bound.  If it is
23437 @code{t}, the back ends won't try to read the articles piece by piece,
23438 but read the entire articles.  This makes sense with some versions of
23439 @code{ange-ftp} or @code{efs}.
23440
23441 @item nnheader-head-chop-length
23442 @vindex nnheader-head-chop-length
23443 This variable (default 2048) says how big a piece of each article to
23444 read when doing the operation described above.
23445
23446 @item nnheader-file-name-translation-alist
23447 @vindex nnheader-file-name-translation-alist
23448 @cindex file names
23449 @cindex invalid characters in file names
23450 @cindex characters in file names
23451 This is an alist that says how to translate characters in file names.
23452 For instance, if @samp{:} is invalid as a file character in file names
23453 on your system (you OS/2 user you), you could say something like:
23454
23455 @lisp
23456 @group
23457 (setq nnheader-file-name-translation-alist
23458       '((?: . ?_)))
23459 @end group
23460 @end lisp
23461
23462 In fact, this is the default value for this variable on OS/2 and MS
23463 Windows (phooey) systems.
23464
23465 @item gnus-hidden-properties
23466 @vindex gnus-hidden-properties
23467 This is a list of properties to use to hide ``invisible'' text.  It is
23468 @code{(invisible t intangible t)} by default on most systems, which
23469 makes invisible text invisible and intangible.
23470
23471 @item gnus-parse-headers-hook
23472 @vindex gnus-parse-headers-hook
23473 A hook called before parsing headers.  It can be used, for instance, to
23474 gather statistics on the headers fetched, or perhaps you'd like to prune
23475 some headers.  I don't see why you'd want that, though.
23476
23477 @item gnus-shell-command-separator
23478 @vindex gnus-shell-command-separator
23479 String used to separate two shell commands.  The default is @samp{;}.
23480
23481 @item gnus-invalid-group-regexp
23482 @vindex gnus-invalid-group-regexp
23483
23484 Regexp to match ``invalid'' group names when querying user for a group
23485 name.  The default value catches some @strong{really} invalid group
23486 names who could possibly mess up Gnus internally (like allowing
23487 @samp{:} in a group name, which is normally used to delimit method and
23488 group).
23489
23490 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23491
23492
23493 @end table
23494
23495 @node The End
23496 @chapter The End
23497
23498 Well, that's the manual---you can get on with your life now.  Keep in
23499 touch.  Say hello to your cats from me.
23500
23501 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23502
23503 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23504
23505 @quotation
23506 @strong{Te Deum}
23507
23508 @sp 1
23509 Not because of victories @*
23510 I sing,@*
23511 having none,@*
23512 but for the common sunshine,@*
23513 the breeze,@*
23514 the largess of the spring.
23515
23516 @sp 1
23517 Not for victory@*
23518 but for the day's work done@*
23519 as well as I was able;@*
23520 not for a seat upon the dais@*
23521 but at the common table.@*
23522 @end quotation
23523
23524
23525 @node Appendices
23526 @chapter Appendices
23527
23528 @menu
23529 * XEmacs::                      Requirements for installing under XEmacs.
23530 * History::                     How Gnus got where it is today.
23531 * On Writing Manuals::          Why this is not a beginner's guide.
23532 * Terminology::                 We use really difficult, like, words here.
23533 * Customization::               Tailoring Gnus to your needs.
23534 * Troubleshooting::             What you might try if things do not work.
23535 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23536 * Emacs for Heathens::          A short introduction to Emacsian terms.
23537 * Frequently Asked Questions::  The Gnus FAQ
23538 @end menu
23539
23540
23541 @node XEmacs
23542 @section XEmacs
23543 @cindex XEmacs
23544 @cindex installing under XEmacs
23545
23546 XEmacs is distributed as a collection of packages.  You should install
23547 whatever packages the Gnus XEmacs package requires.  The current
23548 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23549 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23550 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23551 @samp{misc-games} package is required for Morse decoding.
23552
23553
23554 @node History
23555 @section History
23556
23557 @cindex history
23558 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23559 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23560
23561 If you want to investigate the person responsible for this outrage,
23562 you can point your (feh!) web browser to
23563 @uref{http://quimby.gnus.org/}.  This is also the primary
23564 distribution point for the new and spiffy versions of Gnus, and is
23565 known as The Site That Destroys Newsrcs And Drives People Mad.
23566
23567 During the first extended alpha period of development, the new Gnus was
23568 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23569 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23570 (Besides, the ``Gnus'' in this abbreviation should probably be
23571 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23572 appropriate name, don't you think?)
23573
23574 In any case, after spending all that energy on coming up with a new and
23575 spunky name, we decided that the name was @emph{too} spunky, so we
23576 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23577 ``@sc{gnus}''.  New vs. old.
23578
23579 @menu
23580 * Gnus Versions::               What Gnus versions have been released.
23581 * Other Gnus Versions::         Other Gnus versions that also have been released.
23582 * Why?::                        What's the point of Gnus?
23583 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23584 * Conformity::                  Gnus tries to conform to all standards.
23585 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23586 * Gnus Development::            How Gnus is developed.
23587 * Contributors::                Oodles of people.
23588 * New Features::                Pointers to some of the new stuff in Gnus.
23589 @end menu
23590
23591
23592 @node Gnus Versions
23593 @subsection Gnus Versions
23594 @cindex ding Gnus
23595 @cindex September Gnus
23596 @cindex Red Gnus
23597 @cindex Quassia Gnus
23598 @cindex Pterodactyl Gnus
23599 @cindex Oort Gnus
23600 @cindex No Gnus
23601 @cindex Gnus versions
23602
23603 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23604 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23605 plus 15 Gnus 5.0 releases).
23606
23607 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23608 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23609
23610 On July 28th 1996 work on Red Gnus was begun, and it was released on
23611 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23612
23613 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23614 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23615
23616 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23617 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23618 1999.
23619
23620 On the 26th of October 2000, Oort Gnus was begun.
23621
23622 If you happen upon a version of Gnus that has a prefixed name --
23623 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23624 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23625 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23626 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23627 released version of Gnus and snuggle up to that instead.
23628
23629
23630 @node Other Gnus Versions
23631 @subsection Other Gnus Versions
23632 @cindex Semi-gnus
23633
23634 In addition to the versions of Gnus which have had their releases
23635 coordinated by Lars, one major development has been Semi-gnus from
23636 Japan.  It's based on a library called @acronym{SEMI}, which provides
23637 @acronym{MIME} capabilities.
23638
23639 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23640 Collectively, they are called ``Semi-gnus'', and different strains are
23641 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23642 @acronym{MIME} and multilingualization things, especially important for
23643 Japanese users.
23644
23645
23646 @node Why?
23647 @subsection Why?
23648
23649 What's the point of Gnus?
23650
23651 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23652 newsreader, that lets you do anything you can think of.  That was my
23653 original motivation, but while working on Gnus, it has become clear to
23654 me that this generation of newsreaders really belong in the stone age.
23655 Newsreaders haven't developed much since the infancy of the net.  If the
23656 volume continues to rise with the current rate of increase, all current
23657 newsreaders will be pretty much useless.  How do you deal with
23658 newsgroups that have thousands of new articles each day?  How do you
23659 keep track of millions of people who post?
23660
23661 Gnus offers no real solutions to these questions, but I would very much
23662 like to see Gnus being used as a testing ground for new methods of
23663 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23664 to separate the newsreader from the back ends, Gnus now offers a simple
23665 interface for anybody who wants to write new back ends for fetching mail
23666 and news from different sources.  I have added hooks for customizations
23667 everywhere I could imagine it being useful.  By doing so, I'm inviting
23668 every one of you to explore and invent.
23669
23670 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23671 @kbd{C-u 100 M-x all-hail-xemacs}.
23672
23673
23674 @node Compatibility
23675 @subsection Compatibility
23676
23677 @cindex compatibility
23678 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23679 bindings have been kept.  More key bindings have been added, of course,
23680 but only in one or two obscure cases have old bindings been changed.
23681
23682 Our motto is:
23683 @quotation
23684 @cartouche
23685 @center In a cloud bones of steel.
23686 @end cartouche
23687 @end quotation
23688
23689 All commands have kept their names.  Some internal functions have changed
23690 their names.
23691
23692 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23693 Articles}.
23694
23695 One major compatibility question is the presence of several summary
23696 buffers.  All variables relevant while reading a group are
23697 buffer-local to the summary buffer they belong in.  Although many
23698 important variables have their values copied into their global
23699 counterparts whenever a command is executed in the summary buffer, this
23700 change might lead to incorrect values being used unless you are careful.
23701
23702 All code that relies on knowledge of @sc{gnus} internals will probably
23703 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23704 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23705 maintains a hash table that points to the entries in this alist (which
23706 speeds up many functions), and changing the alist directly will lead to
23707 peculiar results.
23708
23709 @cindex hilit19
23710 @cindex highlighting
23711 Old hilit19 code does not work at all.  In fact, you should probably
23712 remove all hilit code from all Gnus hooks
23713 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23714 Gnus provides various integrated functions for highlighting.  These are
23715 faster and more accurate.  To make life easier for everybody, Gnus will
23716 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23717 Away!
23718
23719 Packages like @code{expire-kill} will no longer work.  As a matter of
23720 fact, you should probably remove all old @sc{gnus} packages (and other
23721 code) when you start using Gnus.  More likely than not, Gnus already
23722 does what you have written code to make @sc{gnus} do.  (Snicker.)
23723
23724 Even though old methods of doing things are still supported, only the
23725 new methods are documented in this manual.  If you detect a new method of
23726 doing something while reading this manual, that does not mean you have
23727 to stop doing it the old way.
23728
23729 Gnus understands all @sc{gnus} startup files.
23730
23731 @kindex M-x gnus-bug
23732 @findex gnus-bug
23733 @cindex reporting bugs
23734 @cindex bugs
23735 Overall, a casual user who hasn't written much code that depends on
23736 @sc{gnus} internals should suffer no problems.  If problems occur,
23737 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23738
23739 @vindex gnus-bug-create-help-buffer
23740 If you are in the habit of sending bug reports @emph{very} often, you
23741 may find the helpful help buffer annoying after a while.  If so, set
23742 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23743 up at you.
23744
23745
23746 @node Conformity
23747 @subsection Conformity
23748
23749 No rebels without a clue here, ma'am.  We conform to all standards known
23750 to (wo)man.  Except for those standards and/or conventions we disagree
23751 with, of course.
23752
23753 @table @strong
23754
23755 @item RFC (2)822
23756 @cindex RFC 822
23757 @cindex RFC 2822
23758 There are no known breaches of this standard.
23759
23760 @item RFC 1036
23761 @cindex RFC 1036
23762 There are no known breaches of this standard, either.
23763
23764 @item Son-of-RFC 1036
23765 @cindex Son-of-RFC 1036
23766 We do have some breaches to this one.
23767
23768 @table @emph
23769
23770 @item X-Newsreader
23771 @itemx User-Agent
23772 These are considered to be ``vanity headers'', while I consider them
23773 to be consumer information.  After seeing so many badly formatted
23774 articles coming from @code{tin} and @code{Netscape} I know not to use
23775 either of those for posting articles.  I would not have known that if
23776 it wasn't for the @code{X-Newsreader} header.
23777 @end table
23778
23779 @item USEFOR
23780 @cindex USEFOR
23781 USEFOR is an IETF working group writing a successor to RFC 1036, based
23782 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23783 various changes to the format of news articles.  The Gnus towers will
23784 look into implementing the changes when the draft is accepted as an RFC.
23785
23786 @item MIME - RFC 2045-2049 etc
23787 @cindex @acronym{MIME}
23788 All the various @acronym{MIME} RFCs are supported.
23789
23790 @item Disposition Notifications - RFC 2298
23791 Message Mode is able to request notifications from the receiver.
23792
23793 @item PGP - RFC 1991 and RFC 2440
23794 @cindex RFC 1991
23795 @cindex RFC 2440
23796 RFC 1991 is the original @acronym{PGP} message specification,
23797 published as an informational RFC.  RFC 2440 was the follow-up, now
23798 called Open PGP, and put on the Standards Track.  Both document a
23799 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23800 encoding (signing and encryption) and decoding (verification and
23801 decryption).
23802
23803 @item PGP/MIME - RFC 2015/3156
23804 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23805 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23806 Gnus supports both encoding and decoding.
23807
23808 @item S/MIME - RFC 2633
23809 RFC 2633 describes the @acronym{S/MIME} format.
23810
23811 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23812 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23813 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23814 authentication for @acronym{IMAP}.  RFC 2086 describes access control
23815 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
23816 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23817 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23818 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23819
23820 @end table
23821
23822 If you ever notice Gnus acting non-compliant with regards to the texts
23823 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23824 know.
23825
23826
23827 @node Emacsen
23828 @subsection Emacsen
23829 @cindex Emacsen
23830 @cindex XEmacs
23831 @cindex Mule
23832 @cindex Emacs
23833
23834 Gnus should work on :
23835
23836 @itemize @bullet
23837
23838 @item
23839 Emacs 20.7 and up.
23840
23841 @item
23842 XEmacs 21.1 and up.
23843
23844 @end itemize
23845
23846 This Gnus version will absolutely not work on any Emacsen older than
23847 that.  Not reliably, at least.  Older versions of Gnus may work on older
23848 Emacs versions.
23849
23850 There are some vague differences between Gnus on the various
23851 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23852 other than that, things should look pretty much the same under all
23853 Emacsen.
23854
23855
23856 @node Gnus Development
23857 @subsection Gnus Development
23858
23859 Gnus is developed in a two-phased cycle.  The first phase involves much
23860 discussion on the @samp{ding@@gnus.org} mailing list, where people
23861 propose changes and new features, post patches and new back ends.  This
23862 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23863 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23864 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23865 unstable and should not be used by casual users.  Gnus alpha releases
23866 have names like ``Red Gnus'' and ``Quassia Gnus''.
23867
23868 After futzing around for 50-100 alpha releases, Gnus is declared
23869 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23870 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23871 supposed to be able to use these, and these are mostly discussed on the
23872 @samp{gnu.emacs.gnus} newsgroup.
23873
23874 @cindex Incoming*
23875 @vindex mail-source-delete-incoming
23876 Some variable defaults differ between alpha Gnusae and released Gnusae.
23877 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23878 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23879 lossage of mail if an alpha release hiccups while handling the mail.
23880
23881 The division of discussion between the ding mailing list and the Gnus
23882 newsgroup is not purely based on publicity concerns.  It's true that
23883 having people write about the horrible things that an alpha Gnus release
23884 can do (sometimes) in a public forum may scare people off, but more
23885 importantly, talking about new experimental features that have been
23886 introduced may confuse casual users.  New features are frequently
23887 introduced, fiddled with, and judged to be found wanting, and then
23888 either discarded or totally rewritten.  People reading the mailing list
23889 usually keep up with these rapid changes, while people on the newsgroup
23890 can't be assumed to do so.
23891
23892
23893
23894 @node Contributors
23895 @subsection Contributors
23896 @cindex contributors
23897
23898 The new Gnus version couldn't have been done without the help of all the
23899 people on the (ding) mailing list.  Every day for over a year I have
23900 gotten billions of nice bug reports from them, filling me with joy,
23901 every single one of them.  Smooches.  The people on the list have been
23902 tried beyond endurance, what with my ``oh, that's a neat idea <type
23903 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23904 work at all <type type>, yup, I'll ship that one off right away <ship
23905 off> no, wait, that absolutely does not work'' policy for releases.
23906 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23907 ``worser''? ``much worser''?  ``worsest''?)
23908
23909 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23910 wrong show.
23911
23912 @itemize @bullet
23913
23914 @item
23915 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23916
23917 @item
23918 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23919 nnwarchive and many, many other things connected with @acronym{MIME} and
23920 other types of en/decoding, as well as general bug fixing, new
23921 functionality and stuff.
23922
23923 @item
23924 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23925 well as numerous other things).
23926
23927 @item
23928 Luis Fernandes---design and graphics.
23929
23930 @item
23931 Joe Reiss---creator of the smiley faces.
23932
23933 @item
23934 Justin Sheehy---the @acronym{FAQ} maintainer.
23935
23936 @item
23937 Erik Naggum---help, ideas, support, code and stuff.
23938
23939 @item
23940 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23941 @dfn{picons} (@pxref{Picons}).
23942
23943 @item
23944 Kim-Minh Kaplan---further work on the picon code.
23945
23946 @item
23947 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23948 (@pxref{GroupLens}).
23949
23950 @item
23951 Sudish Joseph---innumerable bug fixes.
23952
23953 @item
23954 Ilja Weis---@file{gnus-topic.el}.
23955
23956 @item
23957 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23958
23959 @item
23960 Vladimir Alexiev---the refcard and reference booklets.
23961
23962 @item
23963 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23964 distribution by Felix Lee and JWZ.
23965
23966 @item
23967 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23968
23969 @item
23970 Peter Mutsaers---orphan article scoring code.
23971
23972 @item
23973 Ken Raeburn---POP mail support.
23974
23975 @item
23976 Hallvard B Furuseth---various bits and pieces, especially dealing with
23977 .newsrc files.
23978
23979 @item
23980 Brian Edmonds---@file{gnus-bbdb.el}.
23981
23982 @item
23983 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23984
23985 @item
23986 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23987
23988 @item
23989 François Pinard---many, many interesting and thorough bug reports, as
23990 well as autoconf support.
23991
23992 @end itemize
23993
23994 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23995 Borges, and Jost Krieger proof-reading parts of the manual.
23996
23997 The following people have contributed many patches and suggestions:
23998
23999 Christopher Davis,
24000 Andrew Eskilsson,
24001 Kai Grossjohann,
24002 Kevin Greiner,
24003 Jesper Harder,
24004 Paul Jarc,
24005 Simon Josefsson,
24006 David KÃ¥gedal,
24007 Richard Pieri,
24008 Fabrice Popineau,
24009 Daniel Quinlan,
24010 Michael Shields,
24011 Reiner Steib,
24012 Jason L. Tibbitts, III,
24013 Jack Vinson,
24014 Katsumi Yamaoka, @c Yamaoka
24015 and
24016 Teodor Zlatanov.
24017
24018 Also thanks to the following for patches and stuff:
24019
24020 Jari Aalto,
24021 Adrian Aichner,
24022 Vladimir Alexiev,
24023 Russ Allbery,
24024 Peter Arius,
24025 Matt Armstrong,
24026 Marc Auslander,
24027 Miles Bader,
24028 Alexei V. Barantsev,
24029 Frank Bennett,
24030 Robert Bihlmeyer,
24031 Chris Bone,
24032 Mark Borges,
24033 Mark Boyns,
24034 Lance A. Brown,
24035 Rob Browning,
24036 Kees de Bruin,
24037 Martin Buchholz,
24038 Joe Buehler,
24039 Kevin Buhr,
24040 Alastair Burt,
24041 Joao Cachopo,
24042 Zlatko Calusic,
24043 Massimo Campostrini,
24044 Castor,
24045 David Charlap,
24046 Dan Christensen,
24047 Kevin Christian,
24048 Jae-you Chung, @c ?
24049 James H. Cloos, Jr.,
24050 Laura Conrad,
24051 Michael R. Cook,
24052 Glenn Coombs,
24053 Andrew J. Cosgriff,
24054 Neil Crellin,
24055 Frank D. Cringle,
24056 Geoffrey T. Dairiki,
24057 Andre Deparade,
24058 Ulrik Dickow,
24059 Dave Disser,
24060 Rui-Tao Dong, @c ?
24061 Joev Dubach,
24062 Michael Welsh Duggan,
24063 Dave Edmondson,
24064 Paul Eggert,
24065 Mark W. Eichin,
24066 Karl Eichwalder,
24067 Enami Tsugutomo, @c Enami
24068 Michael Ernst,
24069 Luc Van Eycken,
24070 Sam Falkner,
24071 Nelson Jose dos Santos Ferreira,
24072 Sigbjorn Finne,
24073 Sven Fischer,
24074 Paul Fisher,
24075 Decklin Foster,
24076 Gary D. Foster,
24077 Paul Franklin,
24078 Guy Geens,
24079 Arne Georg Gleditsch,
24080 David S. Goldberg,
24081 Michelangelo Grigni,
24082 Dale Hagglund,
24083 D. Hall,
24084 Magnus Hammerin,
24085 Kenichi Handa, @c Handa
24086 Raja R. Harinath,
24087 Yoshiki Hayashi, @c Hayashi
24088 P. E. Jareth Hein,
24089 Hisashige Kenji, @c Hisashige
24090 Scott Hofmann,
24091 Marc Horowitz,
24092 Gunnar Horrigmo,
24093 Richard Hoskins,
24094 Brad Howes,
24095 Miguel de Icaza,
24096 François Felix Ingrand,
24097 Tatsuya Ichikawa, @c Ichikawa
24098 Ishikawa Ichiro, @c Ishikawa
24099 Lee Iverson,
24100 Iwamuro Motonori, @c Iwamuro
24101 Rajappa Iyer,
24102 Andreas Jaeger,
24103 Adam P. Jenkins,
24104 Randell Jesup,
24105 Fred Johansen,
24106 Gareth Jones,
24107 Greg Klanderman,
24108 Karl Kleinpaste,
24109 Michael Klingbeil,
24110 Peter Skov Knudsen,
24111 Shuhei Kobayashi, @c Kobayashi
24112 Petr Konecny,
24113 Koseki Yoshinori, @c Koseki
24114 Thor Kristoffersen,
24115 Jens Lautenbacher,
24116 Martin Larose,
24117 Seokchan Lee, @c Lee
24118 Joerg Lenneis,
24119 Carsten Leonhardt,
24120 James LewisMoss,
24121 Christian Limpach,
24122 Markus Linnala,
24123 Dave Love,
24124 Mike McEwan,
24125 Tonny Madsen,
24126 Shlomo Mahlab,
24127 Nat Makarevitch,
24128 Istvan Marko,
24129 David Martin,
24130 Jason R. Mastaler,
24131 Gordon Matzigkeit,
24132 Timo Metzemakers,
24133 Richard Mlynarik,
24134 Lantz Moore,
24135 Morioka Tomohiko, @c Morioka
24136 Erik Toubro Nielsen,
24137 Hrvoje Niksic,
24138 Andy Norman,
24139 Fred Oberhauser,
24140 C. R. Oldham,
24141 Alexandre Oliva,
24142 Ken Olstad,
24143 Masaharu Onishi, @c Onishi
24144 Hideki Ono, @c Ono
24145 Ettore Perazzoli,
24146 William Perry,
24147 Stephen Peters,
24148 Jens-Ulrik Holger Petersen,
24149 Ulrich Pfeifer,
24150 Matt Pharr,
24151 Andy Piper,
24152 John McClary Prevost,
24153 Bill Pringlemeir,
24154 Mike Pullen,
24155 Jim Radford,
24156 Colin Rafferty,
24157 Lasse Rasinen,
24158 Lars Balker Rasmussen,
24159 Joe Reiss,
24160 Renaud Rioboo,
24161 Roland B. Roberts,
24162 Bart Robinson,
24163 Christian von Roques,
24164 Markus Rost,
24165 Jason Rumney,
24166 Wolfgang Rupprecht,
24167 Jay Sachs,
24168 Dewey M. Sasser,
24169 Conrad Sauerwald,
24170 Loren Schall,
24171 Dan Schmidt,
24172 Ralph Schleicher,
24173 Philippe Schnoebelen,
24174 Andreas Schwab,
24175 Randal L. Schwartz,
24176 Danny Siu,
24177 Matt Simmons,
24178 Paul D. Smith,
24179 Jeff Sparkes,
24180 Toby Speight,
24181 Michael Sperber,
24182 Darren Stalder,
24183 Richard Stallman,
24184 Greg Stark,
24185 Sam Steingold,
24186 Paul Stevenson,
24187 Jonas Steverud,
24188 Paul Stodghill,
24189 Kiyokazu Suto, @c Suto
24190 Kurt Swanson,
24191 Samuel Tardieu,
24192 Teddy,
24193 Chuck Thompson,
24194 Tozawa Akihiko, @c Tozawa
24195 Philippe Troin,
24196 James Troup,
24197 Trung Tran-Duc,
24198 Jack Twilley,
24199 Aaron M. Ucko,
24200 Aki Vehtari,
24201 Didier Verna,
24202 Vladimir Volovich,
24203 Jan Vroonhof,
24204 Stefan Waldherr,
24205 Pete Ware,
24206 Barry A. Warsaw,
24207 Christoph Wedler,
24208 Joe Wells,
24209 Lee Willis,
24210 and
24211 Lloyd Zusman.
24212
24213
24214 For a full overview of what each person has done, the ChangeLogs
24215 included in the Gnus alpha distributions should give ample reading
24216 (550kB and counting).
24217
24218 Apologies to everybody that I've forgotten, of which there are many, I'm
24219 sure.
24220
24221 Gee, that's quite a list of people.  I guess that must mean that there
24222 actually are people who are using Gnus.  Who'd'a thunk it!
24223
24224
24225 @node New Features
24226 @subsection New Features
24227 @cindex new features
24228
24229 @menu
24230 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24231 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24232 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24233 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24234 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24235 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24236 @end menu
24237
24238 These lists are, of course, just @emph{short} overviews of the
24239 @emph{most} important new features.  No, really.  There are tons more.
24240 Yes, we have feeping creaturism in full effect.
24241
24242 @node ding Gnus
24243 @subsubsection (ding) Gnus
24244
24245 New features in Gnus 5.0/5.1:
24246
24247 @itemize @bullet
24248
24249 @item
24250 The look of all buffers can be changed by setting format-like variables
24251 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24252
24253 @item
24254 Local spool and several @acronym{NNTP} servers can be used at once
24255 (@pxref{Select Methods}).
24256
24257 @item
24258 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24259
24260 @item
24261 You can read a number of different mail formats (@pxref{Getting Mail}).
24262 All the mail back ends implement a convenient mail expiry scheme
24263 (@pxref{Expiring Mail}).
24264
24265 @item
24266 Gnus can use various strategies for gathering threads that have lost
24267 their roots (thereby gathering loose sub-threads into one thread) or it
24268 can go back and retrieve enough headers to build a complete thread
24269 (@pxref{Customizing Threading}).
24270
24271 @item
24272 Killed groups can be displayed in the group buffer, and you can read
24273 them as well (@pxref{Listing Groups}).
24274
24275 @item
24276 Gnus can do partial group updates---you do not have to retrieve the
24277 entire active file just to check for new articles in a few groups
24278 (@pxref{The Active File}).
24279
24280 @item
24281 Gnus implements a sliding scale of subscribedness to groups
24282 (@pxref{Group Levels}).
24283
24284 @item
24285 You can score articles according to any number of criteria
24286 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24287 articles for you (@pxref{Adaptive Scoring}).
24288
24289 @item
24290 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24291 manner, so it should be difficult to lose much data on what you have
24292 read if your machine should go down (@pxref{Auto Save}).
24293
24294 @item
24295 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24296 cluttering up the @file{.emacs} file.
24297
24298 @item
24299 You can set the process mark on both groups and articles and perform
24300 operations on all the marked items (@pxref{Process/Prefix}).
24301
24302 @item
24303 You can grep through a subset of groups and create a group from the
24304 results (@pxref{Kibozed Groups}).
24305
24306 @item
24307 You can list subsets of groups according to, well, anything
24308 (@pxref{Listing Groups}).
24309
24310 @item
24311 You can browse foreign servers and subscribe to groups from those
24312 servers (@pxref{Browse Foreign Server}).
24313
24314 @item
24315 Gnus can fetch articles, asynchronously, on a second connection to the
24316 server (@pxref{Asynchronous Fetching}).
24317
24318 @item
24319 You can cache articles locally (@pxref{Article Caching}).
24320
24321 @item
24322 The uudecode functions have been expanded and generalized
24323 (@pxref{Decoding Articles}).
24324
24325 @item
24326 You can still post uuencoded articles, which was a little-known feature
24327 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24328
24329 @item
24330 Fetching parents (and other articles) now actually works without
24331 glitches (@pxref{Finding the Parent}).
24332
24333 @item
24334 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24335
24336 @item
24337 Digests (and other files) can be used as the basis for groups
24338 (@pxref{Document Groups}).
24339
24340 @item
24341 Articles can be highlighted and customized (@pxref{Customizing
24342 Articles}).
24343
24344 @item
24345 URLs and other external references can be buttonized (@pxref{Article
24346 Buttons}).
24347
24348 @item
24349 You can do lots of strange stuff with the Gnus window & frame
24350 configuration (@pxref{Window Layout}).
24351
24352 @item
24353 You can click on buttons instead of using the keyboard
24354 (@pxref{Buttons}).
24355
24356 @end itemize
24357
24358
24359 @node September Gnus
24360 @subsubsection September Gnus
24361
24362 @iftex
24363 @iflatex
24364 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24365 @end iflatex
24366 @end iftex
24367
24368 New features in Gnus 5.2/5.3:
24369
24370 @itemize @bullet
24371
24372 @item
24373 A new message composition mode is used.  All old customization variables
24374 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24375 now obsolete.
24376
24377 @item
24378 Gnus is now able to generate @dfn{sparse} threads---threads where
24379 missing articles are represented by empty nodes (@pxref{Customizing
24380 Threading}).
24381
24382 @lisp
24383 (setq gnus-build-sparse-threads 'some)
24384 @end lisp
24385
24386 @item
24387 Outgoing articles are stored on a special archive server
24388 (@pxref{Archived Messages}).
24389
24390 @item
24391 Partial thread regeneration now happens when articles are
24392 referred.
24393
24394 @item
24395 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24396
24397 @item
24398 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24399
24400 @item
24401 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24402
24403 @lisp
24404 (setq gnus-use-trees t)
24405 @end lisp
24406
24407 @item
24408 An @code{nn}-like pick-and-read minor mode is available for the summary
24409 buffers (@pxref{Pick and Read}).
24410
24411 @lisp
24412 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24413 @end lisp
24414
24415 @item
24416 In binary groups you can use a special binary minor mode (@pxref{Binary
24417 Groups}).
24418
24419 @item
24420 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24421 Topics}).
24422
24423 @lisp
24424 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24425 @end lisp
24426
24427 @item
24428 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24429
24430 @item
24431 Groups can now have a score, and bubbling based on entry frequency
24432 is possible (@pxref{Group Score}).
24433
24434 @lisp
24435 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24436 @end lisp
24437
24438 @item
24439 Groups can be process-marked, and commands can be performed on
24440 groups of groups (@pxref{Marking Groups}).
24441
24442 @item
24443 Caching is possible in virtual groups.
24444
24445 @item
24446 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24447 news batches, ClariNet briefs collections, and just about everything
24448 else (@pxref{Document Groups}).
24449
24450 @item
24451 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24452 (@pxref{SOUP}).
24453
24454 @item
24455 The Gnus cache is much faster.
24456
24457 @item
24458 Groups can be sorted according to many criteria (@pxref{Sorting
24459 Groups}).
24460
24461 @item
24462 New group parameters have been introduced to set list-addresses and
24463 expiry times (@pxref{Group Parameters}).
24464
24465 @item
24466 All formatting specs allow specifying faces to be used
24467 (@pxref{Formatting Fonts}).
24468
24469 @item
24470 There are several more commands for setting/removing/acting on process
24471 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24472
24473 @item
24474 The summary buffer can be limited to show parts of the available
24475 articles based on a wide range of criteria.  These commands have been
24476 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24477
24478 @item
24479 Articles can be made persistent with the @kbd{*} command
24480 (@pxref{Persistent Articles}).
24481
24482 @item
24483 All functions for hiding article elements are now toggles.
24484
24485 @item
24486 Article headers can be buttonized (@pxref{Article Washing}).
24487
24488 @item
24489 All mail back ends support fetching articles by @code{Message-ID}.
24490
24491 @item
24492 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24493
24494 @item
24495 All summary mode commands are available directly from the article
24496 buffer (@pxref{Article Keymap}).
24497
24498 @item
24499 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24500 Layout}).
24501
24502 @item
24503 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24504 @iftex
24505 @iflatex
24506 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24507 @end iflatex
24508 @end iftex
24509
24510 @item
24511 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24512
24513 @lisp
24514 (setq gnus-use-nocem t)
24515 @end lisp
24516
24517 @item
24518 Groups can be made permanently visible (@pxref{Listing Groups}).
24519
24520 @lisp
24521 (setq gnus-permanently-visible-groups "^nnml:")
24522 @end lisp
24523
24524 @item
24525 Many new hooks have been introduced to make customizing easier.
24526
24527 @item
24528 Gnus respects the @code{Mail-Copies-To} header.
24529
24530 @item
24531 Threads can be gathered by looking at the @code{References} header
24532 (@pxref{Customizing Threading}).
24533
24534 @lisp
24535 (setq gnus-summary-thread-gathering-function
24536       'gnus-gather-threads-by-references)
24537 @end lisp
24538
24539 @item
24540 Read articles can be stored in a special backlog buffer to avoid
24541 refetching (@pxref{Article Backlog}).
24542
24543 @lisp
24544 (setq gnus-keep-backlog 50)
24545 @end lisp
24546
24547 @item
24548 A clean copy of the current article is always stored in a separate
24549 buffer to allow easier treatment.
24550
24551 @item
24552 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24553
24554 @item
24555 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24556 Articles}).
24557
24558 @lisp
24559 (setq gnus-prompt-before-saving t)
24560 @end lisp
24561
24562 @item
24563 @code{gnus-uu} can view decoded files asynchronously while fetching
24564 articles (@pxref{Other Decode Variables}).
24565
24566 @lisp
24567 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24568 @end lisp
24569
24570 @item
24571 Filling in the article buffer now works properly on cited text
24572 (@pxref{Article Washing}).
24573
24574 @item
24575 Hiding cited text adds buttons to toggle hiding, and how much
24576 cited text to hide is now customizable (@pxref{Article Hiding}).
24577
24578 @lisp
24579 (setq gnus-cited-lines-visible 2)
24580 @end lisp
24581
24582 @item
24583 Boring headers can be hidden (@pxref{Article Hiding}).
24584
24585 @item
24586 Default scoring values can now be set from the menu bar.
24587
24588 @item
24589 Further syntax checking of outgoing articles have been added.
24590
24591 @end itemize
24592
24593
24594 @node Red Gnus
24595 @subsubsection Red Gnus
24596
24597 New features in Gnus 5.4/5.5:
24598
24599 @iftex
24600 @iflatex
24601 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24602 @end iflatex
24603 @end iftex
24604
24605 @itemize @bullet
24606
24607 @item
24608 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24609
24610 @item
24611 Article prefetching functionality has been moved up into
24612 Gnus (@pxref{Asynchronous Fetching}).
24613
24614 @item
24615 Scoring can now be performed with logical operators like @code{and},
24616 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24617 Scoring}).
24618
24619 @item
24620 Article washing status can be displayed in the
24621 article mode line (@pxref{Misc Article}).
24622
24623 @item
24624 @file{gnus.el} has been split into many smaller files.
24625
24626 @item
24627 Suppression of duplicate articles based on Message-ID can be done
24628 (@pxref{Duplicate Suppression}).
24629
24630 @lisp
24631 (setq gnus-suppress-duplicates t)
24632 @end lisp
24633
24634 @item
24635 New variables for specifying what score and adapt files are to be
24636 considered home score and adapt files (@pxref{Home Score File}) have
24637 been added.
24638
24639 @item
24640 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24641 Server Internals}).
24642
24643 @item
24644 Groups can inherit group parameters from parent topics (@pxref{Topic
24645 Parameters}).
24646
24647 @item
24648 Article editing has been revamped and is now actually usable.
24649
24650 @item
24651 Signatures can be recognized in more intelligent fashions
24652 (@pxref{Article Signature}).
24653
24654 @item
24655 Summary pick mode has been made to look more @code{nn}-like.  Line
24656 numbers are displayed and the @kbd{.} command can be used to pick
24657 articles (@code{Pick and Read}).
24658
24659 @item
24660 Commands for moving the @file{.newsrc.eld} from one server to
24661 another have been added (@pxref{Changing Servers}).
24662
24663 @item
24664 There's a way now to specify that ``uninteresting'' fields be suppressed
24665 when generating lines in buffers (@pxref{Advanced Formatting}).
24666
24667 @item
24668 Several commands in the group buffer can be undone with @kbd{C-M-_}
24669 (@pxref{Undo}).
24670
24671 @item
24672 Scoring can be done on words using the new score type @code{w}
24673 (@pxref{Score File Format}).
24674
24675 @item
24676 Adaptive scoring can be done on a Subject word-by-word basis
24677 (@pxref{Adaptive Scoring}).
24678
24679 @lisp
24680 (setq gnus-use-adaptive-scoring '(word))
24681 @end lisp
24682
24683 @item
24684 Scores can be decayed (@pxref{Score Decays}).
24685
24686 @lisp
24687 (setq gnus-decay-scores t)
24688 @end lisp
24689
24690 @item
24691 Scoring can be performed using a regexp on the Date header.  The Date is
24692 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24693
24694 @item
24695 A new command has been added to remove all data on articles from
24696 the native server (@pxref{Changing Servers}).
24697
24698 @item
24699 A new command for reading collections of documents
24700 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24701 (@pxref{Really Various Summary Commands}).
24702
24703 @item
24704 Process mark sets can be pushed and popped (@pxref{Setting Process
24705 Marks}).
24706
24707 @item
24708 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24709 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24710
24711 @item
24712 A new back end for reading searches from Web search engines
24713 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24714 (@pxref{Web Searches}).
24715
24716 @item
24717 Groups inside topics can now be sorted using the standard sorting
24718 functions, and each topic can be sorted independently (@pxref{Topic
24719 Sorting}).
24720
24721 @item
24722 Subsets of the groups can be sorted independently (@code{Sorting
24723 Groups}).
24724
24725 @item
24726 Cached articles can be pulled into the groups (@pxref{Summary Generation
24727 Commands}).
24728 @iftex
24729 @iflatex
24730 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24731 @end iflatex
24732 @end iftex
24733
24734 @item
24735 Score files are now applied in a more reliable order (@pxref{Score
24736 Variables}).
24737
24738 @item
24739 Reports on where mail messages end up can be generated (@pxref{Splitting
24740 Mail}).
24741
24742 @item
24743 More hooks and functions have been added to remove junk from incoming
24744 mail before saving the mail (@pxref{Washing Mail}).
24745
24746 @item
24747 Emphasized text can be properly fontisized:
24748
24749 @end itemize
24750
24751
24752 @node Quassia Gnus
24753 @subsubsection Quassia Gnus
24754
24755 New features in Gnus 5.6:
24756
24757 @itemize @bullet
24758
24759 @item
24760 New functionality for using Gnus as an offline newsreader has been
24761 added.  A plethora of new commands and modes have been added.
24762 @xref{Gnus Unplugged}, for the full story.
24763
24764 @item
24765 The @code{nndraft} back end has returned, but works differently than
24766 before.  All Message buffers are now also articles in the @code{nndraft}
24767 group, which is created automatically.
24768
24769 @item
24770 @code{gnus-alter-header-function} can now be used to alter header
24771 values.
24772
24773 @item
24774 @code{gnus-summary-goto-article} now accept Message-ID's.
24775
24776 @item
24777 A new Message command for deleting text in the body of a message
24778 outside the region: @kbd{C-c C-v}.
24779
24780 @item
24781 You can now post to component group in @code{nnvirtual} groups with
24782 @kbd{C-u C-c C-c}.
24783
24784 @item
24785  @code{nntp-rlogin-program}---new variable to ease customization.
24786
24787 @item
24788 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24789 re-highlighting of the article buffer.
24790
24791 @item
24792 New element in @code{gnus-boring-article-headers}---@code{long-to}.
24793
24794 @item
24795 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
24796 details.
24797
24798 @item
24799 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24800 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24801
24802 @item
24803 @code{gnus-simplify-subject-functions} variable to allow greater
24804 control over simplification.
24805
24806 @item
24807 @kbd{A T}---new command for fetching the current thread.
24808
24809 @item
24810 @kbd{/ T}---new command for including the current thread in the
24811 limit.
24812
24813 @item
24814 @kbd{M-RET} is a new Message command for breaking cited text.
24815
24816 @item
24817 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24818
24819 @item
24820 The @code{custom-face-lookup} function has been removed.
24821 If you used this function in your initialization files, you must
24822 rewrite them to use @code{face-spec-set} instead.
24823
24824 @item
24825 Canceling now uses the current select method.  Symbolic prefix
24826 @kbd{a} forces normal posting method.
24827
24828 @item
24829 New command to translate M******** sm*rtq**t*s into proper
24830 text---@kbd{W d}.
24831
24832 @item
24833 For easier debugging of @code{nntp}, you can set
24834 @code{nntp-record-commands} to a non-@code{nil} value.
24835
24836 @item
24837 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24838 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24839
24840 @item
24841 A command for editing group parameters from the summary buffer
24842 has been added.
24843
24844 @item
24845 A history of where mails have been split is available.
24846
24847 @item
24848 A new article date command has been added---@code{article-date-iso8601}.
24849
24850 @item
24851 Subjects can be simplified when threading by setting
24852 @code{gnus-score-thread-simplify}.
24853
24854 @item
24855 A new function for citing in Message has been
24856 added---@code{message-cite-original-without-signature}.
24857
24858 @item
24859 @code{article-strip-all-blank-lines}---new article command.
24860
24861 @item
24862 A new Message command to kill to the end of the article has
24863 been added.
24864
24865 @item
24866 A minimum adaptive score can be specified by using the
24867 @code{gnus-adaptive-word-minimum} variable.
24868
24869 @item
24870 The ``lapsed date'' article header can be kept continually
24871 updated by the @code{gnus-start-date-timer} command.
24872
24873 @item
24874 Web listserv archives can be read with the @code{nnlistserv} back end.
24875
24876 @item
24877 Old dejanews archives can now be read by @code{nnweb}.
24878
24879 @end itemize
24880
24881 @node Pterodactyl Gnus
24882 @subsubsection Pterodactyl Gnus
24883
24884 New features in Gnus 5.8:
24885
24886 @itemize @bullet
24887
24888 @item
24889 The mail-fetching functions have changed.  See the manual for the
24890 many details.  In particular, all procmail fetching variables are gone.
24891
24892 If you used procmail like in
24893
24894 @lisp
24895 (setq nnmail-use-procmail t)
24896 (setq nnmail-spool-file 'procmail)
24897 (setq nnmail-procmail-directory "~/mail/incoming/")
24898 (setq nnmail-procmail-suffix "\\.in")
24899 @end lisp
24900
24901 this now has changed to
24902
24903 @lisp
24904 (setq mail-sources
24905       '((directory :path "~/mail/incoming/"
24906                    :suffix ".in")))
24907 @end lisp
24908
24909 @xref{Mail Source Specifiers}.
24910
24911 @item
24912 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24913 Gnus, and adds a slew of new commands.  See the manual for details.
24914
24915 @item
24916 Gnus has also been multilingualized.  This also affects too
24917 many parts of Gnus to summarize here, and adds many new variables.
24918
24919 @item
24920 @code{gnus-auto-select-first} can now be a function to be
24921 called to position point.
24922
24923 @item
24924 The user can now decide which extra headers should be included in
24925 summary buffers and @acronym{NOV} files.
24926
24927 @item
24928 @code{gnus-article-display-hook} has been removed.  Instead, a number
24929 of variables starting with @code{gnus-treat-} have been added.
24930
24931 @item
24932 The Gnus posting styles have been redone again and now works in a
24933 subtly different manner.
24934
24935 @item
24936 New web-based back ends have been added: @code{nnslashdot},
24937 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24938 again, to keep up with ever-changing layouts.
24939
24940 @item
24941 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24942
24943 @end itemize
24944
24945 @node Oort Gnus
24946 @subsubsection Oort Gnus
24947 @cindex Oort Gnus
24948
24949 New features in Gnus 5.10:
24950
24951 @itemize @bullet
24952
24953 @item
24954 The revised Gnus @acronym{FAQ} is included in the manual,
24955 @xref{Frequently Asked Questions}.
24956
24957 @item
24958 Upgrading from previous (stable) version if you have used Oort.
24959
24960 If you have tried Oort (the unstable Gnus branch leading to this
24961 release) but went back to a stable version, be careful when upgrading to
24962 this version.  In particular, you will probably want to remove all
24963 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24964 read from your @file{.newsrc.eld} instead of from the
24965 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24966 later entry for more information about marks.  Note that downgrading
24967 isn't save in general.
24968
24969 @item
24970 Article Buttons
24971
24972 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24973 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24974 variables @code{gnus-button-@var{*}-level} can be used to control the
24975 appearance of all article buttons.  @xref{Article Button Levels}.
24976
24977 @item
24978 Dired integration
24979
24980 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24981 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24982 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24983 (@kbd{C-c P}).  It is enabled with
24984 @lisp
24985 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24986 @end lisp
24987
24988 @item
24989 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24990
24991 @item
24992 Single-part yenc encoded attachments can be decoded.
24993
24994 @item
24995 Picons
24996
24997 The picons code has been reimplemented to work in GNU Emacs---some of
24998 the previous options have been removed or renamed.
24999
25000 Picons are small ``personal icons'' representing users, domain and
25001 newsgroups, which can be displayed in the Article buffer.
25002 @xref{Picons}.
25003
25004 @item
25005 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25006 boundary line is drawn at the end of the headers.
25007
25008 @item
25009 Retrieval of charters and control messages
25010
25011 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25012 control messages (@kbd{H C}).
25013
25014 @item
25015 Delayed articles
25016
25017 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25018 buffer.  The messages are delivered at specified time.  This is useful
25019 for sending yourself reminders.  @xref{Delayed Articles}.
25020
25021 @item
25022 If @code{auto-compression-mode} is enabled, attachments are automatically
25023 decompressed when activated.
25024
25025 @item
25026 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25027 the nnml back end allows compressed message files.
25028
25029 @item
25030 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25031
25032 @item
25033 The Summary Buffer uses an arrow in the fringe to indicate the current
25034 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25035
25036 @item
25037 Warn about email replies to news
25038
25039 Do you often find yourself replying to news by email by mistake?  Then
25040 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25041 you.
25042
25043 @item
25044 If the new option @code{gnus-summary-display-while-building} is
25045 non-@code{nil}, the summary buffer is shown and updated as it's being
25046 built.
25047
25048 @item
25049 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25050 opposed to old but unread messages).
25051
25052 @item
25053 The new option @code{gnus-gcc-mark-as-read} automatically marks
25054 Gcc articles as read.
25055
25056 @item
25057 The nndoc back end now supports mailman digests and exim bounces.
25058
25059 @item
25060 Gnus supports RFC 2369 mailing list headers, and adds a number of
25061 related commands in mailing list groups.  @xref{Mailing List}.
25062
25063 @item
25064 The Date header can be displayed in a format that can be read aloud
25065 in English.  @xref{Article Date}.
25066
25067 @item
25068 The envelope sender address can be customized when using Sendmail.
25069 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25070
25071 @item
25072 diffs are automatically highlighted in groups matching
25073 @code{mm-uu-diff-groups-regexp}
25074
25075 @item
25076 @acronym{TLS} wrapper shipped with Gnus
25077
25078 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25079 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25080 @acronym{TLS}/@acronym{SSL} support via (external third party)
25081 @file{ssl.el} and OpenSSL still works.
25082
25083 @item
25084 New @file{make.bat} for compiling and installing Gnus under MS Windows
25085
25086 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25087 first argument to the batch-program should be the directory where
25088 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25089 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25090 the second parameter.
25091
25092 @file{make.bat} has been rewritten from scratch, it now features
25093 automatic recognition of XEmacs and GNU Emacs, generates
25094 @file{gnus-load.el}, checks if errors occur while compilation and
25095 generation of info files and reports them at the end of the build
25096 process.  It now uses @code{makeinfo} if it is available and falls
25097 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25098 install all files which are necessary to run Gnus and be generally a
25099 complete replacement for the @code{configure; make; make install}
25100 cycle used under Unix systems.
25101
25102 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25103 been removed.
25104
25105 @item
25106 Support for non-@acronym{ASCII} domain names
25107
25108 Message supports non-@acronym{ASCII} domain names in From:, To: and
25109 Cc: and will query you whether to perform encoding when you try to
25110 send a message.  The variable @code{message-use-idna} controls this.
25111 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25112 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25113 controls this.
25114
25115 @item
25116 Better handling of Microsoft citation styles
25117
25118 Gnus now tries to recognize the mangled header block that some Microsoft
25119 mailers use to indicate that the rest of the message is a citation, even
25120 though it is not quoted in any way.  The variable
25121 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25122 citations.
25123
25124 @item
25125 @code{gnus-article-skip-boring}
25126
25127 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25128 not scroll down to show you a page that contains only boring text,
25129 which by default means cited text and signature.  You can customize
25130 what is skippable using @code{gnus-article-boring-faces}.
25131
25132 This feature is especially useful if you read many articles that
25133 consist of a little new content at the top with a long, untrimmed
25134 message cited below.
25135
25136 @item
25137 The format spec @code{%C} for positioning point has changed to @code{%*}.
25138
25139 @item
25140 The new variable @code{gnus-parameters} can be used to set group parameters.
25141
25142 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25143 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25144 enjoy the powers of customize, and simplified backups since you set the
25145 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25146 variable maps regular expressions matching group names to group
25147 parameters, a'la:
25148 @lisp
25149 (setq gnus-parameters
25150       '(("mail\\..*"
25151          (gnus-show-threads nil)
25152          (gnus-use-scoring nil))
25153         ("^nnimap:\\(foo.bar\\)$"
25154          (to-group . "\\1"))))
25155 @end lisp
25156
25157 @item
25158 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25159
25160 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25161 disable it.
25162
25163 @item
25164 Gnus no longer generate the Sender: header automatically.
25165
25166 Earlier it was generated iff the user configurable email address was
25167 different from the Gnus guessed default user address.  As the guessing
25168 algorithm is rarely correct these days, and (more controversially) the
25169 only use of the Sender: header was to check if you are entitled to
25170 cancel/supersede news (which is now solved by Cancel Locks instead,
25171 see another entry), generation of the header has been disabled by
25172 default.  See the variables @code{message-required-headers},
25173 @code{message-required-news-headers}, and
25174 @code{message-required-mail-headers}.
25175
25176 @item
25177 Features from third party @file{message-utils.el} added to @file{message.el}.
25178
25179 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25180 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25181 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25182 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25183 appropriate headers and a note in the body for cross-postings and
25184 followups (see the variables @code{message-cross-post-@var{*}}).
25185
25186 @item
25187 References and X-Draft-Headers are no longer generated when you start
25188 composing messages and @code{message-generate-headers-first} is
25189 @code{nil}.
25190
25191 @item
25192 Improved anti-spam features.
25193
25194 Gnus is now able to take out spam from your mail and news streams
25195 using a wide variety of programs and filter rules.  Among the supported
25196 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25197 for easy use of external packages such as SpamAssassin and Hashcash
25198 are also new.  @xref{Thwarting Email Spam}.
25199
25200 @item
25201 Easy inclusion of X-Faces headers.
25202
25203 @item
25204 Face headers handling.
25205
25206 @item
25207 In the summary buffer, the new command @kbd{/ N} inserts new messages
25208 and @kbd{/ o} inserts old messages.
25209
25210 @item
25211 Gnus decodes morse encoded messages if you press @kbd{W m}.
25212
25213 @item
25214 Unread count correct in nnimap groups.
25215
25216 The estimated number of unread articles in the group buffer should now
25217 be correct for nnimap groups.  This is achieved by calling
25218 @code{nnimap-fixup-unread-after-getting-new-news} from the
25219 @code{gnus-setup-news-hook} (called on startup) and
25220 @code{gnus-after-getting-new-news-hook}. (called after getting new
25221 mail).  If you have modified those variables from the default, you may
25222 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25223 you were happy with the estimate and want to save some (minimal) time
25224 when getting new mail, remove the function.
25225
25226 @item
25227 Group Carbon Copy (GCC) quoting
25228
25229 To support groups that contains SPC and other weird characters, groups
25230 are quoted before they are placed in the Gcc: header.  This means
25231 variables such as @code{gnus-message-archive-group} should no longer
25232 contain quote characters to make groups containing SPC work.  Also, if
25233 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25234 into two groups) you must change it to return the list
25235 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25236 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25237 was incorrect earlier, it just didn't generate any problems since it
25238 was inserted directly.
25239
25240 @item
25241 @file{~/News/overview/} not used.
25242
25243 As a result of the following change, the @file{~/News/overview/}
25244 directory is not used any more.  You can safely delete the entire
25245 hierarchy.
25246
25247 @item
25248 @code{gnus-agent}
25249
25250 The Gnus Agent has seen a major updated and is now enabled by default,
25251 and all nntp and nnimap servers from @code{gnus-select-method} and
25252 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25253 only the server in @code{gnus-select-method} was agentized by the
25254 default, and the agent was disabled by default.  When the agent is
25255 enabled, headers are now also retrieved from the Agent cache instead
25256 of the back ends when possible.  Earlier this only happened in the
25257 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25258 @kbd{J r} in the server buffer.  Gnus will not download articles into
25259 the Agent cache, unless you instruct it to do so, though, by using
25260 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25261 behaviour of having the Agent disabled with @code{(setq gnus-agent
25262 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25263 is not needed any more.
25264
25265 @item
25266 @code{gnus-summary-line-format}
25267
25268 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25269 %s\n}.  Moreover @code{gnus-extra-headers},
25270 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25271 changed their default so that the users name will be replaced by the
25272 recipient's name or the group name posting to for @acronym{NNTP}
25273 groups.
25274
25275 @item
25276 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25277
25278 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25279 broken Outlook (Express) articles.
25280
25281 @item
25282 @code{(require 'gnus-load)}
25283
25284 If you use a stand-alone Gnus distribution, you'd better add
25285 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25286 lisp directory into load-path.
25287
25288 File @file{gnus-load.el} contains autoload commands, functions and variables,
25289 some of which may not be included in distributions of Emacsen.
25290
25291 @item
25292 @code{gnus-slave-unplugged}
25293
25294 A new command which starts Gnus offline in slave mode.
25295
25296 @item
25297 @code{message-insinuate-rmail}
25298
25299 Adding @code{(message-insinuate-rmail)} and @code{(setq
25300 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25301 compose, reply and forward messages in message-mode, where you can
25302 enjoy the power of @acronym{MML}.
25303
25304 @item
25305 @code{message-minibuffer-local-map}
25306
25307 The line below enables BBDB in resending a message:
25308 @lisp
25309 (define-key message-minibuffer-local-map [(tab)]
25310   'bbdb-complete-name)
25311 @end lisp
25312
25313 @item
25314 Externalizing and deleting of attachments.
25315
25316 If @code{gnus-gcc-externalize-attachments} or
25317 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25318 local files as external parts.
25319
25320 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25321 on @acronym{MIME} buttons) saves a part and replaces the part with an
25322 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25323 @acronym{MIME} buttons) removes a part.  It works only on back ends
25324 that support editing.
25325
25326 @item
25327 @code{gnus-default-charset}
25328
25329 The default value is determined from the
25330 @code{current-language-environment} variable, instead of
25331 @code{iso-8859-1}.  Also the @samp{.*} item in
25332 @code{gnus-group-charset-alist} is removed.
25333
25334 @item
25335 @code{gnus-posting-styles}
25336
25337 Add a new format of match like
25338 @lisp
25339 ((header "to" "larsi.*org")
25340  (Organization "Somewhere, Inc."))
25341 @end lisp
25342 The old format like the lines below is obsolete, but still accepted.
25343 @lisp
25344 (header "to" "larsi.*org"
25345         (Organization "Somewhere, Inc."))
25346 @end lisp
25347
25348 @item
25349 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25350
25351 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25352 added into these two variables.  If you customized those, perhaps you
25353 need add those two headers too.
25354
25355 @item
25356 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25357
25358 If one reads an article while plugged, and the article already exists
25359 in the Agent, it won't get downloaded once more.  @code{(setq
25360 gnus-agent-cache nil)} reverts to the old behavior.
25361
25362 @item
25363 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25364 composing messages, it is enabled by @code{use-hard-newlines}.
25365 Decoding format=flowed was present but not documented in earlier
25366 versions.
25367
25368 @item
25369 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25370
25371 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25372
25373 @item
25374 Gnus supports Maildir groups.
25375
25376 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25377
25378 @item
25379 Printing capabilities are enhanced.
25380
25381 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25382 Article buffers.  Also, each individual @acronym{MIME} part can be
25383 printed using @kbd{p} on the @acronym{MIME} button.
25384
25385 @item
25386 Message supports the Importance: (RFC 2156) header.
25387
25388 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25389 the valid values.
25390
25391 @item
25392 Gnus supports Cancel Locks in News.
25393
25394 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25395 used to determine if you wrote an article or not (for cancelling and
25396 superseding).  Gnus generates a random password string the first time
25397 you post a message, and saves it in your @file{~/.emacs} using the Custom
25398 system.  While the variable is called @code{canlock-password}, it is not
25399 security sensitive data.  Publishing your canlock string on the web
25400 will not allow anyone to be able to anything she could not already do.
25401 The behaviour can be changed by customizing @code{message-insert-canlock}.
25402
25403 @item
25404 Gnus supports server-side mail filtering using Sieve.
25405
25406 Sieve rules can be added as Group Parameters for groups, and the
25407 complete Sieve script is generated using @kbd{D g} from the Group
25408 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25409 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25410 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25411
25412 @item
25413 Extended format specs.
25414
25415 Format spec @samp{%&user-date;} is added into
25416 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25417 format specs are supported.  The extended format specs look like
25418 @samp{%u&foo;}, which invokes function
25419 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25420 escape character, old user defined format @samp{%u&} is no longer supported.
25421
25422 @item
25423 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25424
25425 It was aliased to @kbd{Y c}
25426 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25427 out other articles.
25428
25429 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25430
25431 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25432 s}, @kbd{/ a}, and @kbd{/ x}
25433 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25434 result will be to display all articles that do not match the expression.
25435
25436 @item
25437 Group names are treated as UTF-8 by default.
25438
25439 This is supposedly what USEFOR wanted to migrate to.  See
25440 @code{gnus-group-name-charset-group-alist} and
25441 @code{gnus-group-name-charset-method-alist} for customization.
25442
25443 @item
25444 The nnml and nnfolder back ends store marks for each groups.
25445
25446 This makes it possible to take backup of nnml/nnfolder servers/groups
25447 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25448 makes it possible to share articles and marks between users (without
25449 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25450 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25451 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25452 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25453 another machine, Gnus will automatically use the @file{.marks} or
25454 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25455 The new server variables @code{nnml-marks-is-evil} and
25456 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25457
25458 @item
25459 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25460 been renamed to ``Gnus''.
25461
25462 @item
25463 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25464 renamed to ``Attachments''.  Note that this menu also contains security
25465 related stuff, like signing and encryption (@pxref{Security, Security,,
25466 message, Message Manual}).
25467
25468 @item
25469 @code{gnus-group-charset-alist} and
25470 @code{gnus-group-ignored-charsets-alist}.
25471
25472 The regexps in these variables are compared with full group names
25473 instead of real group names in 5.8.  Users who customize these
25474 variables should change those regexps accordingly.  For example:
25475 @lisp
25476 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25477 @end lisp
25478
25479 @item
25480 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25481 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25482
25483 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25484 additional Lisp libraries.  This add several menu items to the
25485 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25486 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25487
25488 @item
25489 Gnus inlines external parts (message/external).
25490
25491 @item
25492 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25493 C-m}.
25494
25495 This change was made to avoid conflict with the standard binding of
25496 @code{back-to-indentation}, which is also useful in message mode.
25497 @end itemize
25498
25499 @iftex
25500
25501 @page
25502 @node The Manual
25503 @section The Manual
25504 @cindex colophon
25505 @cindex manual
25506
25507 This manual was generated from a TeXinfo file and then run through
25508 either @code{texi2dvi}
25509 @iflatex
25510 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25511 and then run through @code{latex} and @code{dvips}
25512 @end iflatex
25513 to get what you hold in your hands now.
25514
25515 The following conventions have been used:
25516
25517 @enumerate
25518
25519 @item
25520 This is a @samp{string}
25521
25522 @item
25523 This is a @kbd{keystroke}
25524
25525 @item
25526 This is a @file{file}
25527
25528 @item
25529 This is a @code{symbol}
25530
25531 @end enumerate
25532
25533 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25534 mean:
25535
25536 @lisp
25537 (setq flargnoze "yes")
25538 @end lisp
25539
25540 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25541
25542 @lisp
25543 (setq flumphel 'yes)
25544 @end lisp
25545
25546 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25547 ever get them confused.
25548
25549 @iflatex
25550 @c @head
25551 Of course, everything in this manual is of vital interest, so you should
25552 read it all.  Several times.  However, if you feel like skimming the
25553 manual, look for that gnu head you should see in the margin over
25554 there---it means that what's being discussed is of more importance than
25555 the rest of the stuff.  (On the other hand, if everything is infinitely
25556 important, how can anything be more important than that?  Just one more
25557 of the mysteries of this world, I guess.)
25558 @end iflatex
25559
25560 @end iftex
25561
25562
25563 @node On Writing Manuals
25564 @section On Writing Manuals
25565
25566 I guess most manuals are written after-the-fact; documenting a program
25567 that's already there.  This is not how this manual is written.  When
25568 implementing something, I write the manual entry for that something
25569 straight away.  I then see that it's difficult to explain the
25570 functionality, so I write how it's supposed to be, and then I change the
25571 implementation.  Writing the documentation and writing the code goes
25572 hand in hand.
25573
25574 This, of course, means that this manual has no, or little, flow.  It
25575 documents absolutely everything in Gnus, but often not where you're
25576 looking for it.  It is a reference manual, and not a guide to how to get
25577 started with Gnus.
25578
25579 That would be a totally different book, that should be written using the
25580 reference manual as source material.  It would look quite differently.
25581
25582
25583 @page
25584 @node Terminology
25585 @section Terminology
25586
25587 @cindex terminology
25588 @table @dfn
25589
25590 @item news
25591 @cindex news
25592 This is what you are supposed to use this thing for---reading news.
25593 News is generally fetched from a nearby @acronym{NNTP} server, and is
25594 generally publicly available to everybody.  If you post news, the entire
25595 world is likely to read just what you have written, and they'll all
25596 snigger mischievously.  Behind your back.
25597
25598 @item mail
25599 @cindex mail
25600 Everything that's delivered to you personally is mail.  Some news/mail
25601 readers (like Gnus) blur the distinction between mail and news, but
25602 there is a difference.  Mail is private.  News is public.  Mailing is
25603 not posting, and replying is not following up.
25604
25605 @item reply
25606 @cindex reply
25607 Send a mail to the person who has written what you are reading.
25608
25609 @item follow up
25610 @cindex follow up
25611 Post an article to the current newsgroup responding to the article you
25612 are reading.
25613
25614 @item back end
25615 @cindex back end
25616 Gnus considers mail and news to be mostly the same, really.  The only
25617 difference is how to access the actual articles.  News articles are
25618 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25619 messages could be read from a file on the local disk.  The internal
25620 architecture of Gnus thus comprises a ``front end'' and a number of
25621 ``back ends''.  Internally, when you enter a group (by hitting
25622 @key{RET}, say), you thereby invoke a function in the front end in
25623 Gnus.  The front end then ``talks'' to a back end and says things like
25624 ``Give me the list of articles in the foo group'' or ``Show me article
25625 number 4711''.
25626
25627 So a back end mainly defines either a protocol (the @code{nntp} back
25628 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25629 accesses mail via @acronym{IMAP}) or a file format and directory
25630 layout (the @code{nnspool} back end accesses news via the common
25631 ``spool directory'' format, the @code{nnml} back end access mail via a
25632 file format and directory layout that's quite similar).
25633
25634 Gnus does not handle the underlying media, so to speak---this is all
25635 done by the back ends.  A back end is a collection of functions to
25636 access the articles.
25637
25638 However, sometimes the term ``back end'' is also used where ``server''
25639 would have been more appropriate.  And then there is the term ``select
25640 method'' which can mean either.  The Gnus terminology can be quite
25641 confusing.
25642
25643 @item native
25644 @cindex native
25645 Gnus will always use one method (and back end) as the @dfn{native}, or
25646 default, way of getting news.
25647
25648 @item foreign
25649 @cindex foreign
25650 You can also have any number of foreign groups active at the same time.
25651 These are groups that use non-native non-secondary back ends for getting
25652 news.
25653
25654 @item secondary
25655 @cindex secondary
25656 Secondary back ends are somewhere half-way between being native and being
25657 foreign, but they mostly act like they are native.
25658
25659 @item article
25660 @cindex article
25661 A message that has been posted as news.
25662
25663 @item mail message
25664 @cindex mail message
25665 A message that has been mailed.
25666
25667 @item message
25668 @cindex message
25669 A mail message or news article
25670
25671 @item head
25672 @cindex head
25673 The top part of a message, where administrative information (etc.) is
25674 put.
25675
25676 @item body
25677 @cindex body
25678 The rest of an article.  Everything not in the head is in the
25679 body.
25680
25681 @item header
25682 @cindex header
25683 A line from the head of an article.
25684
25685 @item headers
25686 @cindex headers
25687 A collection of such lines, or a collection of heads.  Or even a
25688 collection of @acronym{NOV} lines.
25689
25690 @item @acronym{NOV}
25691 @cindex @acronym{NOV}
25692 When Gnus enters a group, it asks the back end for the headers of all
25693 unread articles in the group.  Most servers support the News OverView
25694 format, which is more compact and much faster to read and parse than the
25695 normal @sc{head} format.
25696
25697 @item level
25698 @cindex levels
25699 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25700 that have a lower level are ``more'' subscribed than the groups with a
25701 higher level.  In fact, groups on levels 1-5 are considered
25702 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25703 are @dfn{killed}.  Commands for listing groups and scanning for new
25704 articles will all use the numeric prefix as @dfn{working level}.
25705
25706 @item killed groups
25707 @cindex killed groups
25708 No information on killed groups is stored or updated, which makes killed
25709 groups much easier to handle than subscribed groups.
25710
25711 @item zombie groups
25712 @cindex zombie groups
25713 Just like killed groups, only slightly less dead.
25714
25715 @item active file
25716 @cindex active file
25717 The news server has to keep track of what articles it carries, and what
25718 groups exist.  All this information in stored in the active file, which
25719 is rather large, as you might surmise.
25720
25721 @item bogus groups
25722 @cindex bogus groups
25723 A group that exists in the @file{.newsrc} file, but isn't known to the
25724 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25725 This means that the group probably doesn't exist (any more).
25726
25727 @item activating
25728 @cindex activating groups
25729 The act of asking the server for info on a group and computing the
25730 number of unread articles is called @dfn{activating the group}.
25731 Un-activated groups are listed with @samp{*} in the group buffer.
25732
25733 @item server
25734 @cindex server
25735 A machine one can connect to and get news (or mail) from.
25736
25737 @item select method
25738 @cindex select method
25739 A structure that specifies the back end, the server and the virtual
25740 server settings.
25741
25742 @item virtual server
25743 @cindex virtual server
25744 A named select method.  Since a select method defines all there is to
25745 know about connecting to a (physical) server, taking the thing as a
25746 whole is a virtual server.
25747
25748 @item washing
25749 @cindex washing
25750 Taking a buffer and running it through a filter of some sort.  The
25751 result will (more often than not) be cleaner and more pleasing than the
25752 original.
25753
25754 @item ephemeral groups
25755 @cindex ephemeral groups
25756 @cindex temporary groups
25757 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25758 groups are groups that will have no data stored---when you exit the
25759 group, it'll disappear into the aether.
25760
25761 @item solid groups
25762 @cindex solid groups
25763 This is the opposite of ephemeral groups.  All groups listed in the
25764 group buffer are solid groups.
25765
25766 @item sparse articles
25767 @cindex sparse articles
25768 These are article placeholders shown in the summary buffer when
25769 @code{gnus-build-sparse-threads} has been switched on.
25770
25771 @item threading
25772 @cindex threading
25773 To put responses to articles directly after the articles they respond
25774 to---in a hierarchical fashion.
25775
25776 @item root
25777 @cindex root
25778 @cindex thread root
25779 The first article in a thread is the root.  It is the ancestor of all
25780 articles in the thread.
25781
25782 @item parent
25783 @cindex parent
25784 An article that has responses.
25785
25786 @item child
25787 @cindex child
25788 An article that responds to a different article---its parent.
25789
25790 @item digest
25791 @cindex digest
25792 A collection of messages in one file.  The most common digest format is
25793 specified by RFC 1153.
25794
25795 @item splitting
25796 @cindex splitting, terminolgy
25797 @cindex mail sorting
25798 @cindex mail filtering (splitting)
25799 The action of sorting your emails according to certain rules. Sometimes
25800 incorrectly called mail filtering.
25801
25802 @end table
25803
25804
25805 @page
25806 @node Customization
25807 @section Customization
25808 @cindex general customization
25809
25810 All variables are properly documented elsewhere in this manual.  This
25811 section is designed to give general pointers on how to customize Gnus
25812 for some quite common situations.
25813
25814 @menu
25815 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25816 * Slow Terminal Connection::    You run a remote Emacs.
25817 * Little Disk Space::           You feel that having large setup files is icky.
25818 * Slow Machine::                You feel like buying a faster machine.
25819 @end menu
25820
25821
25822 @node Slow/Expensive Connection
25823 @subsection Slow/Expensive NNTP Connection
25824
25825 If you run Emacs on a machine locally, and get your news from a machine
25826 over some very thin strings, you want to cut down on the amount of data
25827 Gnus has to get from the @acronym{NNTP} server.
25828
25829 @table @code
25830
25831 @item gnus-read-active-file
25832 Set this to @code{nil}, which will inhibit Gnus from requesting the
25833 entire active file from the server.  This file is often v.  large.  You
25834 also have to set @code{gnus-check-new-newsgroups} and
25835 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25836 doesn't suddenly decide to fetch the active file anyway.
25837
25838 @item gnus-nov-is-evil
25839 This one has to be @code{nil}.  If not, grabbing article headers from
25840 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25841 support @sc{xover}; Gnus will detect this by itself.
25842 @end table
25843
25844
25845 @node Slow Terminal Connection
25846 @subsection Slow Terminal Connection
25847
25848 Let's say you use your home computer for dialing up the system that runs
25849 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25850 possible) the amount of data sent over the wires.
25851
25852 @table @code
25853
25854 @item gnus-auto-center-summary
25855 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25856 buffer all the time.  If it is @code{vertical}, do only vertical
25857 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25858 horizontal and vertical recentering.
25859
25860 @item gnus-visible-headers
25861 Cut down on the headers included in the articles to the
25862 minimum.  You can, in fact, make do without them altogether---most of the
25863 useful data is in the summary buffer, anyway.  Set this variable to
25864 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25865
25866 Set this hook to all the available hiding commands:
25867 @lisp
25868 (setq gnus-treat-hide-headers 'head
25869       gnus-treat-hide-signature t
25870       gnus-treat-hide-citation t)
25871 @end lisp
25872
25873 @item gnus-use-full-window
25874 By setting this to @code{nil}, you can make all the windows smaller.
25875 While this doesn't really cut down much generally, it means that you
25876 have to see smaller portions of articles before deciding that you didn't
25877 want to read them anyway.
25878
25879 @item gnus-thread-hide-subtree
25880 If this is non-@code{nil}, all threads in the summary buffer will be
25881 hidden initially.
25882
25883
25884 @item gnus-updated-mode-lines
25885 If this is @code{nil}, Gnus will not put information in the buffer mode
25886 lines, which might save some time.
25887 @end table
25888
25889
25890 @node Little Disk Space
25891 @subsection Little Disk Space
25892 @cindex disk space
25893
25894 The startup files can get rather large, so you may want to cut their
25895 sizes a bit if you are running out of space.
25896
25897 @table @code
25898
25899 @item gnus-save-newsrc-file
25900 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25901 only save @file{.newsrc.eld}.  This means that you will not be able to
25902 use any other newsreaders than Gnus.  This variable is @code{t} by
25903 default.
25904
25905 @item gnus-read-newsrc-file
25906 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25907 only read @file{.newsrc.eld}.  This means that you will not be able to
25908 use any other newsreaders than Gnus.  This variable is @code{t} by
25909 default.
25910
25911 @item gnus-save-killed-list
25912 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25913 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25914 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25915 variable to @code{nil}.  This variable is @code{t} by default.
25916
25917 @end table
25918
25919
25920 @node Slow Machine
25921 @subsection Slow Machine
25922 @cindex slow machine
25923
25924 If you have a slow machine, or are just really impatient, there are a
25925 few things you can do to make Gnus run faster.
25926
25927 Set @code{gnus-check-new-newsgroups} and
25928 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25929
25930 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25931 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25932 summary buffer faster.
25933
25934
25935 @page
25936 @node Troubleshooting
25937 @section Troubleshooting
25938 @cindex troubleshooting
25939
25940 Gnus works @emph{so} well straight out of the box---I can't imagine any
25941 problems, really.
25942
25943 Ahem.
25944
25945 @enumerate
25946
25947 @item
25948 Make sure your computer is switched on.
25949
25950 @item
25951 Make sure that you really load the current Gnus version.  If you have
25952 been running @sc{gnus}, you need to exit Emacs and start it up again before
25953 Gnus will work.
25954
25955 @item
25956 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25957 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
25958 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
25959 flee}, you have some old @file{.el} files lying around.  Delete these.
25960
25961 @item
25962 Read the help group (@kbd{G h} in the group buffer) for a
25963 @acronym{FAQ} and a how-to.
25964
25965 @item
25966 @vindex max-lisp-eval-depth
25967 Gnus works on many recursive structures, and in some extreme (and very
25968 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25969 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25970 something like that.
25971 @end enumerate
25972
25973 If all else fails, report the problem as a bug.
25974
25975 @cindex bugs
25976 @cindex reporting bugs
25977
25978 @kindex M-x gnus-bug
25979 @findex gnus-bug
25980 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25981 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25982 me the backtrace.  I will fix bugs, but I can only fix them if you send
25983 me a precise description as to how to reproduce the bug.
25984
25985 You really can never be too detailed in a bug report.  Always use the
25986 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25987 a 10Kb mail each time you use it, and even if you have sent me your
25988 environment 500 times before.  I don't care.  I want the full info each
25989 time.
25990
25991 It is also important to remember that I have no memory whatsoever.  If
25992 you send a bug report, and I send you a reply, and then you just send
25993 back ``No, it's not! Moron!'', I will have no idea what you are
25994 insulting me about.  Always over-explain everything.  It's much easier
25995 for all of us---if I don't have all the information I need, I will just
25996 mail you and ask for more info, and everything takes more time.
25997
25998 If the problem you're seeing is very visual, and you can't quite explain
25999 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26000 it somewhere it can be reached, and include the URL of the picture in
26001 the bug report.
26002
26003 @cindex patches
26004 If you would like to contribute a patch to fix bugs or make
26005 improvements, please produce the patch using @samp{diff -u}.
26006
26007 @cindex edebug
26008 If you want to debug your problem further before reporting, possibly
26009 in order to solve the problem yourself and send a patch, you can use
26010 edebug.  Debugging Lisp code is documented in the Elisp manual
26011 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26012 Lisp Reference Manual}).  To get you started with edebug, consider if
26013 you discover some weird behaviour when pressing @kbd{c}, the first
26014 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26015 the documentation buffer that leads you to the function definition,
26016 then press @kbd{M-x edebug-defun RET} with point inside that function,
26017 return to Gnus and press @kbd{c} to invoke the code.  You will be
26018 placed in the lisp buffer and can single step using @kbd{SPC} and
26019 evaluate expressions using @kbd{M-:} or inspect variables using
26020 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26021 @kbd{c} or @kbd{g}.
26022
26023 @cindex elp
26024 @cindex profile
26025 @cindex slow
26026 Sometimes, a problem do not directly generate an elisp error but
26027 manifests itself by causing Gnus to be very slow.  In these cases, you
26028 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26029 slow, and then try to analyze the backtrace (repeating the procedure
26030 helps isolating the real problem areas).
26031
26032 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26033 (or should be) fully documented elsewhere, but to get you started
26034 there are a few steps that need to be followed.  First, instrument the
26035 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26036 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26037 RET message}.  Then perform the operation that is slow and press
26038 @kbd{M-x elp-results}.  You will then see which operations that takes
26039 time, and can debug them further.  If the entire operation takes much
26040 longer than the time spent in the slowest function in the profiler
26041 output, you probably profiled the wrong part of Gnus.  To reset
26042 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26043 elp-restore-all} is supposed to remove profiling, but given the
26044 complexities and dynamic code generation in Gnus, it might not always
26045 work perfectly.
26046
26047 @cindex gnu.emacs.gnus
26048 @cindex ding mailing list
26049 If you just need help, you are better off asking on
26050 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26051 @email{ding@@gnus.org, the ding mailing list}.  Write to
26052 @email{ding-request@@gnus.org} to subscribe.
26053
26054
26055 @page
26056 @node Gnus Reference Guide
26057 @section Gnus Reference Guide
26058
26059 It is my hope that other people will figure out smart stuff that Gnus
26060 can do, and that other people will write those smart things as well.  To
26061 facilitate that I thought it would be a good idea to describe the inner
26062 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26063 it.
26064
26065 You can never expect the internals of a program not to change, but I
26066 will be defining (in some details) the interface between Gnus and its
26067 back ends (this is written in stone), the format of the score files
26068 (ditto), data structures (some are less likely to change than others)
26069 and general methods of operation.
26070
26071 @menu
26072 * Gnus Utility Functions::      Common functions and variable to use.
26073 * Back End Interface::          How Gnus communicates with the servers.
26074 * Score File Syntax::           A BNF definition of the score file standard.
26075 * Headers::                     How Gnus stores headers internally.
26076 * Ranges::                      A handy format for storing mucho numbers.
26077 * Group Info::                  The group info format.
26078 * Extended Interactive::        Symbolic prefixes and stuff.
26079 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26080 * Various File Formats::        Formats of files that Gnus use.
26081 @end menu
26082
26083
26084 @node Gnus Utility Functions
26085 @subsection Gnus Utility Functions
26086 @cindex Gnus utility functions
26087 @cindex utility functions
26088 @cindex functions
26089 @cindex internal variables
26090
26091 When writing small functions to be run from hooks (and stuff), it's
26092 vital to have access to the Gnus internal functions and variables.
26093 Below is a list of the most common ones.
26094
26095 @table @code
26096
26097 @item gnus-newsgroup-name
26098 @vindex gnus-newsgroup-name
26099 This variable holds the name of the current newsgroup.
26100
26101 @item gnus-find-method-for-group
26102 @findex gnus-find-method-for-group
26103 A function that returns the select method for @var{group}.
26104
26105 @item gnus-group-real-name
26106 @findex gnus-group-real-name
26107 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26108 name.
26109
26110 @item gnus-group-prefixed-name
26111 @findex gnus-group-prefixed-name
26112 Takes an unprefixed group name and a select method, and returns the full
26113 (prefixed) Gnus group name.
26114
26115 @item gnus-get-info
26116 @findex gnus-get-info
26117 Returns the group info list for @var{group}.
26118
26119 @item gnus-group-unread
26120 @findex gnus-group-unread
26121 The number of unread articles in @var{group}, or @code{t} if that is
26122 unknown.
26123
26124 @item gnus-active
26125 @findex gnus-active
26126 The active entry for @var{group}.
26127
26128 @item gnus-set-active
26129 @findex gnus-set-active
26130 Set the active entry for @var{group}.
26131
26132 @item gnus-add-current-to-buffer-list
26133 @findex gnus-add-current-to-buffer-list
26134 Adds the current buffer to the list of buffers to be killed on Gnus
26135 exit.
26136
26137 @item gnus-continuum-version
26138 @findex gnus-continuum-version
26139 Takes a Gnus version string as a parameter and returns a floating point
26140 number.  Earlier versions will always get a lower number than later
26141 versions.
26142
26143 @item gnus-group-read-only-p
26144 @findex gnus-group-read-only-p
26145 Says whether @var{group} is read-only or not.
26146
26147 @item gnus-news-group-p
26148 @findex gnus-news-group-p
26149 Says whether @var{group} came from a news back end.
26150
26151 @item gnus-ephemeral-group-p
26152 @findex gnus-ephemeral-group-p
26153 Says whether @var{group} is ephemeral or not.
26154
26155 @item gnus-server-to-method
26156 @findex gnus-server-to-method
26157 Returns the select method corresponding to @var{server}.
26158
26159 @item gnus-server-equal
26160 @findex gnus-server-equal
26161 Says whether two virtual servers are equal.
26162
26163 @item gnus-group-native-p
26164 @findex gnus-group-native-p
26165 Says whether @var{group} is native or not.
26166
26167 @item gnus-group-secondary-p
26168 @findex gnus-group-secondary-p
26169 Says whether @var{group} is secondary or not.
26170
26171 @item gnus-group-foreign-p
26172 @findex gnus-group-foreign-p
26173 Says whether @var{group} is foreign or not.
26174
26175 @item gnus-group-find-parameter
26176 @findex gnus-group-find-parameter
26177 Returns the parameter list of @var{group}.  If given a second parameter,
26178 returns the value of that parameter for @var{group}.
26179
26180 @item gnus-group-set-parameter
26181 @findex gnus-group-set-parameter
26182 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26183
26184 @item gnus-narrow-to-body
26185 @findex gnus-narrow-to-body
26186 Narrows the current buffer to the body of the article.
26187
26188 @item gnus-check-backend-function
26189 @findex gnus-check-backend-function
26190 Takes two parameters, @var{function} and @var{group}.  If the back end
26191 @var{group} comes from supports @var{function}, return non-@code{nil}.
26192
26193 @lisp
26194 (gnus-check-backend-function "request-scan" "nnml:misc")
26195 @result{} t
26196 @end lisp
26197
26198 @item gnus-read-method
26199 @findex gnus-read-method
26200 Prompts the user for a select method.
26201
26202 @end table
26203
26204
26205 @node Back End Interface
26206 @subsection Back End Interface
26207
26208 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26209 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26210 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26211 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26212 examples of the latter we have @code{nntp-port-number} and
26213 @code{nnmbox-directory}.
26214
26215 When Gnus asks for information from a back end---say @code{nntp}---on
26216 something, it will normally include a virtual server name in the
26217 function parameters.  (If not, the back end should use the ``current''
26218 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26219 server as its only (optional) parameter.  If this virtual server hasn't
26220 been opened, the function should fail.
26221
26222 Note that a virtual server name has no relation to some physical server
26223 name.  Take this example:
26224
26225 @lisp
26226 (nntp "odd-one"
26227       (nntp-address "ifi.uio.no")
26228       (nntp-port-number 4324))
26229 @end lisp
26230
26231 Here the virtual server name is @samp{odd-one} while the name of
26232 the physical server is @samp{ifi.uio.no}.
26233
26234 The back ends should be able to switch between several virtual servers.
26235 The standard back ends implement this by keeping an alist of virtual
26236 server environments that they pull down/push up when needed.
26237
26238 There are two groups of interface functions: @dfn{required functions},
26239 which must be present, and @dfn{optional functions}, which Gnus will
26240 always check for presence before attempting to call 'em.
26241
26242 All these functions are expected to return data in the buffer
26243 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26244 unfortunately named, but we'll have to live with it.  When I talk about
26245 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26246 talk about @dfn{return value}, I talk about the function value returned by
26247 the function call.  Functions that fail should return @code{nil} as the
26248 return value.
26249
26250 Some back ends could be said to be @dfn{server-forming} back ends, and
26251 some might be said not to be.  The latter are back ends that generally
26252 only operate on one group at a time, and have no concept of ``server''
26253 ---they have a group, and they deliver info on that group and nothing
26254 more.
26255
26256 Gnus identifies each message by way of group name and article number.  A
26257 few remarks about these article numbers might be useful.  First of all,
26258 the numbers are positive integers.  Secondly, it is normally not
26259 possible for later articles to ``re-use'' older article numbers without
26260 confusing Gnus.  That is, if a group has ever contained a message
26261 numbered 42, then no other message may get that number, or Gnus will get
26262 mightily confused.@footnote{See the function
26263 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26264 Third, article numbers must be assigned in order of arrival in the
26265 group; this is not necessarily the same as the date of the message.
26266
26267 The previous paragraph already mentions all the ``hard'' restrictions that
26268 article numbers must fulfill.  But it seems that it might be useful to
26269 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26270 if there are holes in the article numbering sequence.  However, due to
26271 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26272 also useful for the article numbers to start at 1 to avoid running out
26273 of numbers as long as possible.
26274
26275 Note that by convention, back ends are named @code{nnsomething}, but
26276 Gnus also comes with some @code{nnnotbackends}, such as
26277 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26278
26279 In the examples and definitions I will refer to the imaginary back end
26280 @code{nnchoke}.
26281
26282 @cindex @code{nnchoke}
26283
26284 @menu
26285 * Required Back End Functions::  Functions that must be implemented.
26286 * Optional Back End Functions::  Functions that need not be implemented.
26287 * Error Messaging::             How to get messages and report errors.
26288 * Writing New Back Ends::       Extending old back ends.
26289 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26290 * Mail-like Back Ends::         Some tips on mail back ends.
26291 @end menu
26292
26293
26294 @node Required Back End Functions
26295 @subsubsection Required Back End Functions
26296
26297 @table @code
26298
26299 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26300
26301 @var{articles} is either a range of article numbers or a list of
26302 @code{Message-ID}s.  Current back ends do not fully support either---only
26303 sequences (lists) of article numbers, and most back ends do not support
26304 retrieval of @code{Message-ID}s.  But they should try for both.
26305
26306 The result data should either be HEADs or @acronym{NOV} lines, and the result
26307 value should either be @code{headers} or @code{nov} to reflect this.
26308 This might later be expanded to @code{various}, which will be a mixture
26309 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26310
26311 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26312 headers'', in some meaning of the word.  This is generally done by
26313 fetching (at most) @var{fetch-old} extra headers less than the smallest
26314 article number in @code{articles}, and filling the gaps as well.  The
26315 presence of this parameter can be ignored if the back end finds it
26316 cumbersome to follow the request.  If this is non-@code{nil} and not a
26317 number, do maximum fetches.
26318
26319 Here's an example HEAD:
26320
26321 @example
26322 221 1056 Article retrieved.
26323 Path: ifi.uio.no!sturles
26324 From: sturles@@ifi.uio.no (Sturle Sunde)
26325 Newsgroups: ifi.discussion
26326 Subject: Re: Something very droll
26327 Date: 27 Oct 1994 14:02:57 +0100
26328 Organization: Dept. of Informatics, University of Oslo, Norway
26329 Lines: 26
26330 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26331 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26332 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26333 .
26334 @end example
26335
26336 So a @code{headers} return value would imply that there's a number of
26337 these in the data buffer.
26338
26339 Here's a BNF definition of such a buffer:
26340
26341 @example
26342 headers        = *head
26343 head           = error / valid-head
26344 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26345 valid-head     = valid-message *header "." eol
26346 valid-message  = "221 " <number> " Article retrieved." eol
26347 header         = <text> eol
26348 @end example
26349
26350 @cindex BNF
26351 (The version of BNF used here is the one used in RFC822.)
26352
26353 If the return value is @code{nov}, the data buffer should contain
26354 @dfn{network overview database} lines.  These are basically fields
26355 separated by tabs.
26356
26357 @example
26358 nov-buffer = *nov-line
26359 nov-line   = field 7*8[ <TAB> field ] eol
26360 field      = <text except TAB>
26361 @end example
26362
26363 For a closer look at what should be in those fields,
26364 @pxref{Headers}.
26365
26366
26367 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26368
26369 @var{server} is here the virtual server name.  @var{definitions} is a
26370 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26371
26372 If the server can't be opened, no error should be signaled.  The back end
26373 may then choose to refuse further attempts at connecting to this
26374 server.  In fact, it should do so.
26375
26376 If the server is opened already, this function should return a
26377 non-@code{nil} value.  There should be no data returned.
26378
26379
26380 @item (nnchoke-close-server &optional SERVER)
26381
26382 Close connection to @var{server} and free all resources connected
26383 to it.  Return @code{nil} if the server couldn't be closed for some
26384 reason.
26385
26386 There should be no data returned.
26387
26388
26389 @item (nnchoke-request-close)
26390
26391 Close connection to all servers and free all resources that the back end
26392 have reserved.  All buffers that have been created by that back end
26393 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26394 function is generally only called when Gnus is shutting down.
26395
26396 There should be no data returned.
26397
26398
26399 @item (nnchoke-server-opened &optional SERVER)
26400
26401 If @var{server} is the current virtual server, and the connection to the
26402 physical server is alive, then this function should return a
26403 non-@code{nil} value.  This function should under no circumstances
26404 attempt to reconnect to a server we have lost connection to.
26405
26406 There should be no data returned.
26407
26408
26409 @item (nnchoke-status-message &optional SERVER)
26410
26411 This function should return the last error message from @var{server}.
26412
26413 There should be no data returned.
26414
26415
26416 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26417
26418 The result data from this function should be the article specified by
26419 @var{article}.  This might either be a @code{Message-ID} or a number.
26420 It is optional whether to implement retrieval by @code{Message-ID}, but
26421 it would be nice if that were possible.
26422
26423 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26424 in this buffer instead of the normal data buffer.  This is to make it
26425 possible to avoid copying large amounts of data from one buffer to
26426 another, while Gnus mainly requests articles to be inserted directly
26427 into its article buffer.
26428
26429 If it is at all possible, this function should return a cons cell where
26430 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26431 the article number.  This will enable Gnus to find out what the real
26432 group and article numbers are when fetching articles by
26433 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26434 on successful article retrieval.
26435
26436
26437 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26438
26439 Get data on @var{group}.  This function also has the side effect of
26440 making @var{group} the current group.
26441
26442 If @var{fast}, don't bother to return useful data, just make @var{group}
26443 the current group.
26444
26445 Here's an example of some result data and a definition of the same:
26446
26447 @example
26448 211 56 1000 1059 ifi.discussion
26449 @end example
26450
26451 The first number is the status, which should be 211.  Next is the
26452 total number of articles in the group, the lowest article number, the
26453 highest article number, and finally the group name.  Note that the total
26454 number of articles may be less than one might think while just
26455 considering the highest and lowest article numbers, but some articles
26456 may have been canceled.  Gnus just discards the total-number, so
26457 whether one should take the bother to generate it properly (if that is a
26458 problem) is left as an exercise to the reader.  If the group contains no
26459 articles, the lowest article number should be reported as 1 and the
26460 highest as 0.
26461
26462 @example
26463 group-status = [ error / info ] eol
26464 error        = [ "4" / "5" ] 2<number> " " <Error message>
26465 info         = "211 " 3* [ <number> " " ] <string>
26466 @end example
26467
26468
26469 @item (nnchoke-close-group GROUP &optional SERVER)
26470
26471 Close @var{group} and free any resources connected to it.  This will be
26472 a no-op on most back ends.
26473
26474 There should be no data returned.
26475
26476
26477 @item (nnchoke-request-list &optional SERVER)
26478
26479 Return a list of all groups available on @var{server}.  And that means
26480 @emph{all}.
26481
26482 Here's an example from a server that only carries two groups:
26483
26484 @example
26485 ifi.test 0000002200 0000002000 y
26486 ifi.discussion 3324 3300 n
26487 @end example
26488
26489 On each line we have a group name, then the highest article number in
26490 that group, the lowest article number, and finally a flag.  If the group
26491 contains no articles, the lowest article number should be reported as 1
26492 and the highest as 0.
26493
26494 @example
26495 active-file = *active-line
26496 active-line = name " " <number> " " <number> " " flags eol
26497 name        = <string>
26498 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26499 @end example
26500
26501 The flag says whether the group is read-only (@samp{n}), is moderated
26502 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26503 (@samp{=other-group}) or none of the above (@samp{y}).
26504
26505
26506 @item (nnchoke-request-post &optional SERVER)
26507
26508 This function should post the current buffer.  It might return whether
26509 the posting was successful or not, but that's not required.  If, for
26510 instance, the posting is done asynchronously, it has generally not been
26511 completed by the time this function concludes.  In that case, this
26512 function should set up some kind of sentinel to beep the user loud and
26513 clear if the posting could not be completed.
26514
26515 There should be no result data from this function.
26516
26517 @end table
26518
26519
26520 @node Optional Back End Functions
26521 @subsubsection Optional Back End Functions
26522
26523 @table @code
26524
26525 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26526
26527 @var{groups} is a list of groups, and this function should request data
26528 on all those groups.  How it does it is of no concern to Gnus, but it
26529 should attempt to do this in a speedy fashion.
26530
26531 The return value of this function can be either @code{active} or
26532 @code{group}, which says what the format of the result data is.  The
26533 former is in the same format as the data from
26534 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26535 in the same format as @code{nnchoke-request-group} gives.
26536
26537 @example
26538 group-buffer = *active-line / *group-status
26539 @end example
26540
26541
26542 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26543
26544 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26545 alterations.  This comes in handy if the back end really carries all
26546 the information (as is the case with virtual and imap groups).  This
26547 function should destructively alter the info to suit its needs, and
26548 should return a non-@code{nil} value.
26549
26550 There should be no result data from this function.
26551
26552
26553 @item (nnchoke-request-type GROUP &optional ARTICLE)
26554
26555 When the user issues commands for ``sending news'' (@kbd{F} in the
26556 summary buffer, for instance), Gnus has to know whether the article the
26557 user is following up on is news or mail.  This function should return
26558 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26559 is mail and @code{unknown} if the type can't be decided.  (The
26560 @var{article} parameter is necessary in @code{nnvirtual} groups which
26561 might very well combine mail groups and news groups.)  Both @var{group}
26562 and @var{article} may be @code{nil}.
26563
26564 There should be no result data from this function.
26565
26566
26567 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26568
26569 Set/remove/add marks on articles.  Normally Gnus handles the article
26570 marks (such as read, ticked, expired etc) internally, and store them in
26571 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26572 all information about the articles on the server, so Gnus need to
26573 propagate the mark information to the server.
26574
26575 @var{action} is a list of mark setting requests, having this format:
26576
26577 @example
26578 (RANGE ACTION MARK)
26579 @end example
26580
26581 @var{range} is a range of articles you wish to update marks on.
26582 @var{action} is @code{add} or @code{del}, used to add marks or remove
26583 marks (preserving all marks not mentioned).  @var{mark} is a list of
26584 marks; where each mark is a symbol.  Currently used marks are
26585 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26586 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26587 @code{forward} and @code{recent}, but your back end should, if
26588 possible, not limit itself to these.
26589
26590 Given contradictory actions, the last action in the list should be the
26591 effective one.  That is, if your action contains a request to add the
26592 @code{tick} mark on article 1 and, later in the list, a request to
26593 remove the mark on the same article, the mark should in fact be removed.
26594
26595 An example action list:
26596
26597 @example
26598 (((5 12 30) 'del '(tick))
26599  ((10 . 90) 'add '(read expire))
26600  ((92 94) 'del '(read)))
26601 @end example
26602
26603 The function should return a range of articles it wasn't able to set the
26604 mark on (currently not used for anything).
26605
26606 There should be no result data from this function.
26607
26608 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26609
26610 If the user tries to set a mark that the back end doesn't like, this
26611 function may change the mark.  Gnus will use whatever this function
26612 returns as the mark for @var{article} instead of the original
26613 @var{mark}.  If the back end doesn't care, it must return the original
26614 @var{mark}, and not @code{nil} or any other type of garbage.
26615
26616 The only use for this I can see is what @code{nnvirtual} does with
26617 it---if a component group is auto-expirable, marking an article as read
26618 in the virtual group should result in the article being marked as
26619 expirable.
26620
26621 There should be no result data from this function.
26622
26623
26624 @item (nnchoke-request-scan &optional GROUP SERVER)
26625
26626 This function may be called at any time (by Gnus or anything else) to
26627 request that the back end check for incoming articles, in one way or
26628 another.  A mail back end will typically read the spool file or query
26629 the @acronym{POP} server when this function is invoked.  The
26630 @var{group} doesn't have to be heeded---if the back end decides that
26631 it is too much work just scanning for a single group, it may do a
26632 total scan of all groups.  It would be nice, however, to keep things
26633 local if that's practical.
26634
26635 There should be no result data from this function.
26636
26637
26638 @item (nnchoke-request-group-description GROUP &optional SERVER)
26639
26640 The result data from this function should be a description of
26641 @var{group}.
26642
26643 @example
26644 description-line = name <TAB> description eol
26645 name             = <string>
26646 description      = <text>
26647 @end example
26648
26649 @item (nnchoke-request-list-newsgroups &optional SERVER)
26650
26651 The result data from this function should be the description of all
26652 groups available on the server.
26653
26654 @example
26655 description-buffer = *description-line
26656 @end example
26657
26658
26659 @item (nnchoke-request-newgroups DATE &optional SERVER)
26660
26661 The result data from this function should be all groups that were
26662 created after @samp{date}, which is in normal human-readable date format
26663 (i.e., the date format used in mail and news headers, and returned by
26664 the function @code{message-make-date} by default).  The data should be
26665 in the active buffer format.
26666
26667 It is okay for this function to return ``too many'' groups; some back ends
26668 might find it cheaper to return the full list of groups, rather than
26669 just the new groups.  But don't do this for back ends with many groups.
26670 Normally, if the user creates the groups herself, there won't be too
26671 many groups, so @code{nnml} and the like are probably safe.  But for
26672 back ends like @code{nntp}, where the groups have been created by the
26673 server, it is quite likely that there can be many groups.
26674
26675
26676 @item (nnchoke-request-create-group GROUP &optional SERVER)
26677
26678 This function should create an empty group with name @var{group}.
26679
26680 There should be no return data.
26681
26682
26683 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26684
26685 This function should run the expiry process on all articles in the
26686 @var{articles} range (which is currently a simple list of article
26687 numbers.)  It is left up to the back end to decide how old articles
26688 should be before they are removed by this function.  If @var{force} is
26689 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26690 they are.
26691
26692 This function should return a list of articles that it did not/was not
26693 able to delete.
26694
26695 There should be no result data returned.
26696
26697
26698 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26699
26700 This function should move @var{article} (which is a number) from
26701 @var{group} by calling @var{accept-form}.
26702
26703 This function should ready the article in question for moving by
26704 removing any header lines it has added to the article, and generally
26705 should ``tidy up'' the article.  Then it should @code{eval}
26706 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26707 will do the actual copying.  If this @code{eval} returns a
26708 non-@code{nil} value, the article should be removed.
26709
26710 If @var{last} is @code{nil}, that means that there is a high likelihood
26711 that there will be more requests issued shortly, so that allows some
26712 optimizations.
26713
26714 The function should return a cons where the @code{car} is the group name and
26715 the @code{cdr} is the article number that the article was entered as.
26716
26717 There should be no data returned.
26718
26719
26720 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26721
26722 This function takes the current buffer and inserts it into @var{group}.
26723 If @var{last} in @code{nil}, that means that there will be more calls to
26724 this function in short order.
26725
26726 The function should return a cons where the @code{car} is the group name and
26727 the @code{cdr} is the article number that the article was entered as.
26728
26729 The group should exist before the back end is asked to accept the
26730 article for that group.
26731
26732 There should be no data returned.
26733
26734
26735 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26736
26737 This function should remove @var{article} (which is a number) from
26738 @var{group} and insert @var{buffer} there instead.
26739
26740 There should be no data returned.
26741
26742
26743 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26744
26745 This function should delete @var{group}.  If @var{force}, it should
26746 really delete all the articles in the group, and then delete the group
26747 itself.  (If there is such a thing as ``the group itself''.)
26748
26749 There should be no data returned.
26750
26751
26752 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26753
26754 This function should rename @var{group} into @var{new-name}.  All
26755 articles in @var{group} should move to @var{new-name}.
26756
26757 There should be no data returned.
26758
26759 @end table
26760
26761
26762 @node Error Messaging
26763 @subsubsection Error Messaging
26764
26765 @findex nnheader-report
26766 @findex nnheader-get-report
26767 The back ends should use the function @code{nnheader-report} to report
26768 error conditions---they should not raise errors when they aren't able to
26769 perform a request.  The first argument to this function is the back end
26770 symbol, and the rest are interpreted as arguments to @code{format} if
26771 there are multiple of them, or just a string if there is one of them.
26772 This function must always returns @code{nil}.
26773
26774 @lisp
26775 (nnheader-report 'nnchoke "You did something totally bogus")
26776
26777 (nnheader-report 'nnchoke "Could not request group %s" group)
26778 @end lisp
26779
26780 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26781 @code{nil} back from a server, and this function returns the most
26782 recently reported message for the back end in question.  This function
26783 takes one argument---the server symbol.
26784
26785 Internally, these functions access @var{back-end}@code{-status-string},
26786 so the @code{nnchoke} back end will have its error message stored in
26787 @code{nnchoke-status-string}.
26788
26789
26790 @node Writing New Back Ends
26791 @subsubsection Writing New Back Ends
26792
26793 Many back ends are quite similar.  @code{nnml} is just like
26794 @code{nnspool}, but it allows you to edit the articles on the server.
26795 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26796 and it doesn't maintain overview databases.  @code{nndir} is just like
26797 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26798 editing articles.
26799
26800 It would make sense if it were possible to ``inherit'' functions from
26801 back ends when writing new back ends.  And, indeed, you can do that if you
26802 want to.  (You don't have to if you don't want to, of course.)
26803
26804 All the back ends declare their public variables and functions by using a
26805 package called @code{nnoo}.
26806
26807 To inherit functions from other back ends (and allow other back ends to
26808 inherit functions from the current back end), you should use the
26809 following macros:
26810
26811 @table @code
26812
26813 @item nnoo-declare
26814 This macro declares the first parameter to be a child of the subsequent
26815 parameters.  For instance:
26816
26817 @lisp
26818 (nnoo-declare nndir
26819   nnml nnmh)
26820 @end lisp
26821
26822 @code{nndir} has declared here that it intends to inherit functions from
26823 both @code{nnml} and @code{nnmh}.
26824
26825 @item defvoo
26826 This macro is equivalent to @code{defvar}, but registers the variable as
26827 a public server variable.  Most state-oriented variables should be
26828 declared with @code{defvoo} instead of @code{defvar}.
26829
26830 In addition to the normal @code{defvar} parameters, it takes a list of
26831 variables in the parent back ends to map the variable to when executing
26832 a function in those back ends.
26833
26834 @lisp
26835 (defvoo nndir-directory nil
26836   "Where nndir will look for groups."
26837   nnml-current-directory nnmh-current-directory)
26838 @end lisp
26839
26840 This means that @code{nnml-current-directory} will be set to
26841 @code{nndir-directory} when an @code{nnml} function is called on behalf
26842 of @code{nndir}.  (The same with @code{nnmh}.)
26843
26844 @item nnoo-define-basics
26845 This macro defines some common functions that almost all back ends should
26846 have.
26847
26848 @lisp
26849 (nnoo-define-basics nndir)
26850 @end lisp
26851
26852 @item deffoo
26853 This macro is just like @code{defun} and takes the same parameters.  In
26854 addition to doing the normal @code{defun} things, it registers the
26855 function as being public so that other back ends can inherit it.
26856
26857 @item nnoo-map-functions
26858 This macro allows mapping of functions from the current back end to
26859 functions from the parent back ends.
26860
26861 @lisp
26862 (nnoo-map-functions nndir
26863   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26864   (nnmh-request-article 0 nndir-current-group 0 0))
26865 @end lisp
26866
26867 This means that when @code{nndir-retrieve-headers} is called, the first,
26868 third, and fourth parameters will be passed on to
26869 @code{nnml-retrieve-headers}, while the second parameter is set to the
26870 value of @code{nndir-current-group}.
26871
26872 @item nnoo-import
26873 This macro allows importing functions from back ends.  It should be the
26874 last thing in the source file, since it will only define functions that
26875 haven't already been defined.
26876
26877 @lisp
26878 (nnoo-import nndir
26879   (nnmh
26880    nnmh-request-list
26881    nnmh-request-newgroups)
26882   (nnml))
26883 @end lisp
26884
26885 This means that calls to @code{nndir-request-list} should just be passed
26886 on to @code{nnmh-request-list}, while all public functions from
26887 @code{nnml} that haven't been defined in @code{nndir} yet should be
26888 defined now.
26889
26890 @end table
26891
26892 Below is a slightly shortened version of the @code{nndir} back end.
26893
26894 @lisp
26895 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26896 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26897
26898 ;;; @r{Code:}
26899
26900 (require 'nnheader)
26901 (require 'nnmh)
26902 (require 'nnml)
26903 (require 'nnoo)
26904 (eval-when-compile (require 'cl))
26905
26906 (nnoo-declare nndir
26907   nnml nnmh)
26908
26909 (defvoo nndir-directory nil
26910   "Where nndir will look for groups."
26911   nnml-current-directory nnmh-current-directory)
26912
26913 (defvoo nndir-nov-is-evil nil
26914   "*Non-nil means that nndir will never retrieve NOV headers."
26915   nnml-nov-is-evil)
26916
26917 (defvoo nndir-current-group ""
26918   nil
26919   nnml-current-group nnmh-current-group)
26920 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26921 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26922
26923 (defvoo nndir-status-string "" nil nnmh-status-string)
26924 (defconst nndir-version "nndir 1.0")
26925
26926 ;;; @r{Interface functions.}
26927
26928 (nnoo-define-basics nndir)
26929
26930 (deffoo nndir-open-server (server &optional defs)
26931   (setq nndir-directory
26932         (or (cadr (assq 'nndir-directory defs))
26933             server))
26934   (unless (assq 'nndir-directory defs)
26935     (push `(nndir-directory ,server) defs))
26936   (push `(nndir-current-group
26937           ,(file-name-nondirectory
26938             (directory-file-name nndir-directory)))
26939         defs)
26940   (push `(nndir-top-directory
26941           ,(file-name-directory (directory-file-name nndir-directory)))
26942         defs)
26943   (nnoo-change-server 'nndir server defs))
26944
26945 (nnoo-map-functions nndir
26946   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26947   (nnmh-request-article 0 nndir-current-group 0 0)
26948   (nnmh-request-group nndir-current-group 0 0)
26949   (nnmh-close-group nndir-current-group 0))
26950
26951 (nnoo-import nndir
26952   (nnmh
26953    nnmh-status-message
26954    nnmh-request-list
26955    nnmh-request-newgroups))
26956
26957 (provide 'nndir)
26958 @end lisp
26959
26960
26961 @node Hooking New Back Ends Into Gnus
26962 @subsubsection Hooking New Back Ends Into Gnus
26963
26964 @vindex gnus-valid-select-methods
26965 @findex gnus-declare-backend
26966 Having Gnus start using your new back end is rather easy---you just
26967 declare it with the @code{gnus-declare-backend} functions.  This will
26968 enter the back end into the @code{gnus-valid-select-methods} variable.
26969
26970 @code{gnus-declare-backend} takes two parameters---the back end name and
26971 an arbitrary number of @dfn{abilities}.
26972
26973 Here's an example:
26974
26975 @lisp
26976 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26977 @end lisp
26978
26979 The above line would then go in the @file{nnchoke.el} file.
26980
26981 The abilities can be:
26982
26983 @table @code
26984 @item mail
26985 This is a mailish back end---followups should (probably) go via mail.
26986 @item post
26987 This is a newsish back end---followups should (probably) go via news.
26988 @item post-mail
26989 This back end supports both mail and news.
26990 @item none
26991 This is neither a post nor mail back end---it's something completely
26992 different.
26993 @item respool
26994 It supports respooling---or rather, it is able to modify its source
26995 articles and groups.
26996 @item address
26997 The name of the server should be in the virtual server name.  This is
26998 true for almost all back ends.
26999 @item prompt-address
27000 The user should be prompted for an address when doing commands like
27001 @kbd{B} in the group buffer.  This is true for back ends like
27002 @code{nntp}, but not @code{nnmbox}, for instance.
27003 @end table
27004
27005
27006 @node Mail-like Back Ends
27007 @subsubsection Mail-like Back Ends
27008
27009 One of the things that separate the mail back ends from the rest of the
27010 back ends is the heavy dependence by most of the mail back ends on
27011 common functions in @file{nnmail.el}.  For instance, here's the
27012 definition of @code{nnml-request-scan}:
27013
27014 @lisp
27015 (deffoo nnml-request-scan (&optional group server)
27016   (setq nnml-article-file-alist nil)
27017   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27018 @end lisp
27019
27020 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27021 and @code{nnmail} takes care of all the moving and splitting of the
27022 mail.
27023
27024 This function takes four parameters.
27025
27026 @table @var
27027 @item method
27028 This should be a symbol to designate which back end is responsible for
27029 the call.
27030
27031 @item exit-function
27032 This function should be called after the splitting has been performed.
27033
27034 @item temp-directory
27035 Where the temporary files should be stored.
27036
27037 @item group
27038 This optional argument should be a group name if the splitting is to be
27039 performed for one group only.
27040 @end table
27041
27042 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27043 save each article.  @var{back-end}@code{-active-number} will be called to
27044 find the article number assigned to this article.
27045
27046 The function also uses the following variables:
27047 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27048 this back end); and @var{back-end}@code{-group-alist} and
27049 @var{back-end}@code{-active-file} to generate the new active file.
27050 @var{back-end}@code{-group-alist} should be a group-active alist, like
27051 this:
27052
27053 @example
27054 (("a-group" (1 . 10))
27055  ("some-group" (34 . 39)))
27056 @end example
27057
27058
27059 @node Score File Syntax
27060 @subsection Score File Syntax
27061
27062 Score files are meant to be easily parseable, but yet extremely
27063 mallable.  It was decided that something that had the same read syntax
27064 as an Emacs Lisp list would fit that spec.
27065
27066 Here's a typical score file:
27067
27068 @lisp
27069 (("summary"
27070   ("win95" -10000 nil s)
27071   ("Gnus"))
27072  ("from"
27073   ("Lars" -1000))
27074  (mark -100))
27075 @end lisp
27076
27077 BNF definition of a score file:
27078
27079 @example
27080 score-file      = "" / "(" *element ")"
27081 element         = rule / atom
27082 rule            = string-rule / number-rule / date-rule
27083 string-rule     = "(" quote string-header quote space *string-match ")"
27084 number-rule     = "(" quote number-header quote space *number-match ")"
27085 date-rule       = "(" quote date-header quote space *date-match ")"
27086 quote           = <ascii 34>
27087 string-header   = "subject" / "from" / "references" / "message-id" /
27088                   "xref" / "body" / "head" / "all" / "followup"
27089 number-header   = "lines" / "chars"
27090 date-header     = "date"
27091 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27092                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27093 score           = "nil" / <integer>
27094 date            = "nil" / <natural number>
27095 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27096                   "r" / "regex" / "R" / "Regex" /
27097                   "e" / "exact" / "E" / "Exact" /
27098                   "f" / "fuzzy" / "F" / "Fuzzy"
27099 number-match    = "(" <integer> [ "" / [ space score [ "" /
27100                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27101 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27102 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27103                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27104 date-match-t    = "nil" / "at" / "before" / "after"
27105 atom            = "(" [ required-atom / optional-atom ] ")"
27106 required-atom   = mark / expunge / mark-and-expunge / files /
27107                   exclude-files / read-only / touched
27108 optional-atom   = adapt / local / eval
27109 mark            = "mark" space nil-or-number
27110 nil-or-number   = "nil" / <integer>
27111 expunge         = "expunge" space nil-or-number
27112 mark-and-expunge = "mark-and-expunge" space nil-or-number
27113 files           = "files" *[ space <string> ]
27114 exclude-files   = "exclude-files" *[ space <string> ]
27115 read-only       = "read-only" [ space "nil" / space "t" ]
27116 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27117 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27118 local           = "local" *[ space "(" <string> space <form> ")" ]
27119 eval            = "eval" space <form>
27120 space           = *[ " " / <TAB> / <NEWLINE> ]
27121 @end example
27122
27123 Any unrecognized elements in a score file should be ignored, but not
27124 discarded.
27125
27126 As you can see, white space is needed, but the type and amount of white
27127 space is irrelevant.  This means that formatting of the score file is
27128 left up to the programmer---if it's simpler to just spew it all out on
27129 one looong line, then that's ok.
27130
27131 The meaning of the various atoms are explained elsewhere in this
27132 manual (@pxref{Score File Format}).
27133
27134
27135 @node Headers
27136 @subsection Headers
27137
27138 Internally Gnus uses a format for storing article headers that
27139 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27140 almost suspect that the author looked at the @acronym{NOV} specification and
27141 just shamelessly @emph{stole} the entire thing, and one would be right.
27142
27143 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27144 RFC 1036 to talk about lines in the head of an article (e.g.,
27145 @code{From}).  It is used by many people as a synonym for
27146 ``head''---``the header and the body''.  (That should be avoided, in my
27147 opinion.)  And Gnus uses a format internally that it calls ``header'',
27148 which is what I'm talking about here.  This is a 9-element vector,
27149 basically, with each header (ouch) having one slot.
27150
27151 These slots are, in order: @code{number}, @code{subject}, @code{from},
27152 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27153 @code{xref}, and @code{extra}.  There are macros for accessing and
27154 setting these slots---they all have predictable names beginning with
27155 @code{mail-header-} and @code{mail-header-set-}, respectively.
27156
27157 All these slots contain strings, except the @code{extra} slot, which
27158 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27159
27160
27161 @node Ranges
27162 @subsection Ranges
27163
27164 @sc{gnus} introduced a concept that I found so useful that I've started
27165 using it a lot and have elaborated on it greatly.
27166
27167 The question is simple: If you have a large amount of objects that are
27168 identified by numbers (say, articles, to take a @emph{wild} example)
27169 that you want to qualify as being ``included'', a normal sequence isn't
27170 very useful.  (A 200,000 length sequence is a bit long-winded.)
27171
27172 The solution is as simple as the question: You just collapse the
27173 sequence.
27174
27175 @example
27176 (1 2 3 4 5 6 10 11 12)
27177 @end example
27178
27179 is transformed into
27180
27181 @example
27182 ((1 . 6) (10 . 12))
27183 @end example
27184
27185 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27186 lonesome object, a @samp{13} is a valid element:
27187
27188 @example
27189 ((1 . 6) 7 (10 . 12))
27190 @end example
27191
27192 This means that comparing two ranges to find out whether they are equal
27193 is slightly tricky:
27194
27195 @example
27196 ((1 . 5) 7 8 (10 . 12))
27197 @end example
27198
27199 and
27200
27201 @example
27202 ((1 . 5) (7 . 8) (10 . 12))
27203 @end example
27204
27205 are equal.  In fact, any non-descending list is a range:
27206
27207 @example
27208 (1 2 3 4 5)
27209 @end example
27210
27211 is a perfectly valid range, although a pretty long-winded one.  This is
27212 also valid:
27213
27214 @example
27215 (1 . 5)
27216 @end example
27217
27218 and is equal to the previous range.
27219
27220 Here's a BNF definition of ranges.  Of course, one must remember the
27221 semantic requirement that the numbers are non-descending.  (Any number
27222 of repetition of the same number is allowed, but apt to disappear in
27223 range handling.)
27224
27225 @example
27226 range           = simple-range / normal-range
27227 simple-range    = "(" number " . " number ")"
27228 normal-range    = "(" start-contents ")"
27229 contents        = "" / simple-range *[ " " contents ] /
27230                   number *[ " " contents ]
27231 @end example
27232
27233 Gnus currently uses ranges to keep track of read articles and article
27234 marks.  I plan on implementing a number of range operators in C if The
27235 Powers That Be are willing to let me.  (I haven't asked yet, because I
27236 need to do some more thinking on what operators I need to make life
27237 totally range-based without ever having to convert back to normal
27238 sequences.)
27239
27240
27241 @node Group Info
27242 @subsection Group Info
27243
27244 Gnus stores all permanent info on groups in a @dfn{group info} list.
27245 This list is from three to six elements (or more) long and exhaustively
27246 describes the group.
27247
27248 Here are two example group infos; one is a very simple group while the
27249 second is a more complex one:
27250
27251 @example
27252 ("no.group" 5 ((1 . 54324)))
27253
27254 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27255                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27256                 (nnml "")
27257                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27258 @end example
27259
27260 The first element is the @dfn{group name}---as Gnus knows the group,
27261 anyway.  The second element is the @dfn{subscription level}, which
27262 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27263 cons cell where the @code{car} is the level and the @code{cdr} is the
27264 score.)  The third element is a list of ranges of read articles.  The
27265 fourth element is a list of lists of article marks of various kinds.
27266 The fifth element is the select method (or virtual server, if you like).
27267 The sixth element is a list of @dfn{group parameters}, which is what
27268 this section is about.
27269
27270 Any of the last three elements may be missing if they are not required.
27271 In fact, the vast majority of groups will normally only have the first
27272 three elements, which saves quite a lot of cons cells.
27273
27274 Here's a BNF definition of the group info format:
27275
27276 @example
27277 info          = "(" group space ralevel space read
27278                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27279                 space parameters ] ] ] ] ] ")"
27280 group         = quote <string> quote
27281 ralevel       = rank / level
27282 level         = <integer in the range of 1 to inf>
27283 rank          = "(" level "." score ")"
27284 score         = <integer in the range of 1 to inf>
27285 read          = range
27286 marks-lists   = nil / "(" *marks ")"
27287 marks         = "(" <string> range ")"
27288 method        = "(" <string> *elisp-forms ")"
27289 parameters    = "(" *elisp-forms ")"
27290 @end example
27291
27292 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27293 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27294 in pseudo-BNF.
27295
27296 If you have a Gnus info and want to access the elements, Gnus offers a
27297 series of macros for getting/setting these elements.
27298
27299 @table @code
27300 @item gnus-info-group
27301 @itemx gnus-info-set-group
27302 @findex gnus-info-group
27303 @findex gnus-info-set-group
27304 Get/set the group name.
27305
27306 @item gnus-info-rank
27307 @itemx gnus-info-set-rank
27308 @findex gnus-info-rank
27309 @findex gnus-info-set-rank
27310 Get/set the group rank (@pxref{Group Score}).
27311
27312 @item gnus-info-level
27313 @itemx gnus-info-set-level
27314 @findex gnus-info-level
27315 @findex gnus-info-set-level
27316 Get/set the group level.
27317
27318 @item gnus-info-score
27319 @itemx gnus-info-set-score
27320 @findex gnus-info-score
27321 @findex gnus-info-set-score
27322 Get/set the group score (@pxref{Group Score}).
27323
27324 @item gnus-info-read
27325 @itemx gnus-info-set-read
27326 @findex gnus-info-read
27327 @findex gnus-info-set-read
27328 Get/set the ranges of read articles.
27329
27330 @item gnus-info-marks
27331 @itemx gnus-info-set-marks
27332 @findex gnus-info-marks
27333 @findex gnus-info-set-marks
27334 Get/set the lists of ranges of marked articles.
27335
27336 @item gnus-info-method
27337 @itemx gnus-info-set-method
27338 @findex gnus-info-method
27339 @findex gnus-info-set-method
27340 Get/set the group select method.
27341
27342 @item gnus-info-params
27343 @itemx gnus-info-set-params
27344 @findex gnus-info-params
27345 @findex gnus-info-set-params
27346 Get/set the group parameters.
27347 @end table
27348
27349 All the getter functions take one parameter---the info list.  The setter
27350 functions take two parameters---the info list and the new value.
27351
27352 The last three elements in the group info aren't mandatory, so it may be
27353 necessary to extend the group info before setting the element.  If this
27354 is necessary, you can just pass on a non-@code{nil} third parameter to
27355 the three final setter functions to have this happen automatically.
27356
27357
27358 @node Extended Interactive
27359 @subsection Extended Interactive
27360 @cindex interactive
27361 @findex gnus-interactive
27362
27363 Gnus extends the standard Emacs @code{interactive} specification
27364 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27365 Prefixes}).  Here's an example of how this is used:
27366
27367 @lisp
27368 (defun gnus-summary-increase-score (&optional score symp)
27369   (interactive (gnus-interactive "P\ny"))
27370   ...
27371   )
27372 @end lisp
27373
27374 The best thing to do would have been to implement
27375 @code{gnus-interactive} as a macro which would have returned an
27376 @code{interactive} form, but this isn't possible since Emacs checks
27377 whether a function is interactive or not by simply doing an @code{assq}
27378 on the lambda form.  So, instead we have @code{gnus-interactive}
27379 function that takes a string and returns values that are usable to
27380 @code{interactive}.
27381
27382 This function accepts (almost) all normal @code{interactive} specs, but
27383 adds a few more.
27384
27385 @table @samp
27386 @item y
27387 @vindex gnus-current-prefix-symbol
27388 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27389 variable.
27390
27391 @item Y
27392 @vindex gnus-current-prefix-symbols
27393 A list of the current symbolic prefixes---the
27394 @code{gnus-current-prefix-symbol} variable.
27395
27396 @item A
27397 The current article number---the @code{gnus-summary-article-number}
27398 function.
27399
27400 @item H
27401 The current article header---the @code{gnus-summary-article-header}
27402 function.
27403
27404 @item g
27405 The current group name---the @code{gnus-group-group-name}
27406 function.
27407
27408 @end table
27409
27410
27411 @node Emacs/XEmacs Code
27412 @subsection Emacs/XEmacs Code
27413 @cindex XEmacs
27414 @cindex Emacsen
27415
27416 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27417 platforms must be the primary one.  I chose Emacs.  Not because I don't
27418 like XEmacs or Mule, but because it comes first alphabetically.
27419
27420 This means that Gnus will byte-compile under Emacs with nary a warning,
27421 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27422 As I use byte-compilation warnings to help me root out trivial errors in
27423 Gnus, that's very useful.
27424
27425 I've also consistently used Emacs function interfaces, but have used
27426 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27427 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27428 function.  I then define a function called @code{gnus-run-at-time} that
27429 takes the same parameters as the Emacs @code{run-at-time}.  When running
27430 Gnus under Emacs, the former function is just an alias for the latter.
27431 However, when running under XEmacs, the former is an alias for the
27432 following function:
27433
27434 @lisp
27435 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27436   (start-itimer
27437    "gnus-run-at-time"
27438    `(lambda ()
27439       (,function ,@@args))
27440    time repeat))
27441 @end lisp
27442
27443 This sort of thing has been done for bunches of functions.  Gnus does
27444 not redefine any native Emacs functions while running under XEmacs---it
27445 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27446 all over.
27447
27448 In the cases where the XEmacs function interface was obviously cleaner,
27449 I used it instead.  For example @code{gnus-region-active-p} is an alias
27450 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27451
27452 Of course, I could have chosen XEmacs as my native platform and done
27453 mapping functions the other way around.  But I didn't.  The performance
27454 hit these indirections impose on Gnus under XEmacs should be slight.
27455
27456
27457 @node Various File Formats
27458 @subsection Various File Formats
27459
27460 @menu
27461 * Active File Format::          Information on articles and groups available.
27462 * Newsgroups File Format::      Group descriptions.
27463 @end menu
27464
27465
27466 @node Active File Format
27467 @subsubsection Active File Format
27468
27469 The active file lists all groups available on the server in
27470 question.  It also lists the highest and lowest current article numbers
27471 in each group.
27472
27473 Here's an excerpt from a typical active file:
27474
27475 @example
27476 soc.motss 296030 293865 y
27477 alt.binaries.pictures.fractals 3922 3913 n
27478 comp.sources.unix 1605 1593 m
27479 comp.binaries.ibm.pc 5097 5089 y
27480 no.general 1000 900 y
27481 @end example
27482
27483 Here's a pseudo-BNF definition of this file:
27484
27485 @example
27486 active      = *group-line
27487 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27488 group       = <non-white-space string>
27489 spc         = " "
27490 high-number = <non-negative integer>
27491 low-number  = <positive integer>
27492 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27493 @end example
27494
27495 For a full description of this file, see the manual pages for
27496 @samp{innd}, in particular @samp{active(5)}.
27497
27498
27499 @node Newsgroups File Format
27500 @subsubsection Newsgroups File Format
27501
27502 The newsgroups file lists groups along with their descriptions.  Not all
27503 groups on the server have to be listed,  and not all groups in the file
27504 have to exist on the server.  The file is meant purely as information to
27505 the user.
27506
27507 The format is quite simple; a group name, a tab, and the description.
27508 Here's the definition:
27509
27510 @example
27511 newsgroups    = *line
27512 line          = group tab description <NEWLINE>
27513 group         = <non-white-space string>
27514 tab           = <TAB>
27515 description   = <string>
27516 @end example
27517
27518
27519 @page
27520 @node Emacs for Heathens
27521 @section Emacs for Heathens
27522
27523 Believe it or not, but some people who use Gnus haven't really used
27524 Emacs much before they embarked on their journey on the Gnus Love Boat.
27525 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27526 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27527 is a regexp that is used for matching on the group name'' are magical
27528 phrases with little or no meaning, then this appendix is for you.  If
27529 you are already familiar with Emacs, just ignore this and go fondle your
27530 cat instead.
27531
27532 @menu
27533 * Keystrokes::                  Entering text and executing commands.
27534 * Emacs Lisp::                  The built-in Emacs programming language.
27535 @end menu
27536
27537
27538 @node Keystrokes
27539 @subsection Keystrokes
27540
27541 @itemize @bullet
27542 @item
27543 Q: What is an experienced Emacs user?
27544
27545 @item
27546 A: A person who wishes that the terminal had pedals.
27547 @end itemize
27548
27549 Yes, when you use Emacs, you are apt to use the control key, the shift
27550 key and the meta key a lot.  This is very annoying to some people
27551 (notably @code{vi}le users), and the rest of us just love the hell out
27552 of it.  Just give up and submit.  Emacs really does stand for
27553 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27554 may have heard from other disreputable sources (like the Emacs author).
27555
27556 The shift keys are normally located near your pinky fingers, and are
27557 normally used to get capital letters and stuff.  You probably use it all
27558 the time.  The control key is normally marked ``CTRL'' or something like
27559 that.  The meta key is, funnily enough, never marked as such on any
27560 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27561 which is the meta key on this keyboard.  It's usually located somewhere
27562 to the left hand side of the keyboard, usually on the bottom row.
27563
27564 Now, us Emacs people don't say ``press the meta-control-m key'',
27565 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27566 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27567 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27568 down the control key, and hold it down while you press @kbd{k}''.
27569 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27570 the control key and then press @kbd{k}''.  Simple, ay?
27571
27572 This is somewhat complicated by the fact that not all keyboards have a
27573 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27574 means ``press escape, release escape, press @kbd{k}''.  That's much more
27575 work than if you have a meta key, so if that's the case, I respectfully
27576 suggest you get a real keyboard with a meta key.  You can't live without
27577 it.
27578
27579
27580
27581 @node Emacs Lisp
27582 @subsection Emacs Lisp
27583
27584 Emacs is the King of Editors because it's really a Lisp interpreter.
27585 Each and every key you tap runs some Emacs Lisp code snippet, and since
27586 Emacs Lisp is an interpreted language, that means that you can configure
27587 any key to run any arbitrary code.  You just, like, do it.
27588
27589 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27590 functions.  (These are byte-compiled for speed, but it's still
27591 interpreted.)  If you decide that you don't like the way Gnus does
27592 certain things, it's trivial to have it do something a different way.
27593 (Well, at least if you know how to write Lisp code.)  However, that's
27594 beyond the scope of this manual, so we are simply going to talk about
27595 some common constructs that you normally use in your @file{.emacs} file
27596 to customize Gnus.
27597
27598 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27599 write the following:
27600
27601 @lisp
27602 (setq gnus-florgbnize 4)
27603 @end lisp
27604
27605 This function (really ``special form'') @code{setq} is the one that can
27606 set a variable to some value.  This is really all you need to know.  Now
27607 you can go and fill your @file{.emacs} file with lots of these to change
27608 how Gnus works.
27609
27610 If you have put that thing in your @file{.emacs} file, it will be read
27611 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27612 start Emacs.  If you want to change the variable right away, simply say
27613 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27614 previous ``form'', which is a simple @code{setq} statement here.
27615
27616 Go ahead---just try it, if you're located at your Emacs.  After you
27617 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27618 is the return value of the form you @code{eval}ed.
27619
27620 Some pitfalls:
27621
27622 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27623 that means:
27624
27625 @lisp
27626 (setq gnus-read-active-file 'some)
27627 @end lisp
27628
27629 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27630 @samp{nntp.ifi.uio.no}'', that means:
27631
27632 @lisp
27633 (setq gnus-nntp-server "nntp.ifi.uio.no")
27634 @end lisp
27635
27636 So be careful not to mix up strings (the latter) with symbols (the
27637 former).  The manual is unambiguous, but it can be confusing.
27638
27639 @page
27640 @include gnus-faq.texi
27641
27642 @node Index
27643 @chapter Index
27644 @printindex cp
27645
27646 @node Key Index
27647 @chapter Key Index
27648 @printindex ky
27649
27650 @summarycontents
27651 @contents
27652 @bye
27653
27654 @iftex
27655 @iflatex
27656 \end{document}
27657 @end iflatex
27658 @end iftex
27659
27660 @c Local Variables:
27661 @c mode: texinfo
27662 @c coding: iso-8859-1
27663 @c End: